; ModuleID = 'Crayon'

@fmt = private unnamed_addr constant [4 x i8] c"%d\0A\00"
@fmt.1 = private unnamed_addr constant [4 x i8] c"%s\0A\00"

declare i32 @printf(i8*, ...)

declare i32 @loadfile(i32*, i32, i32)

define i32 @main() {
entry:
  %i = alloca i32
  %j = alloca i32
  %g = alloca [100 x [100 x [3 x i32]]]
  %p = alloca i32*
  %r = alloca [5 x i32]
  %q = alloca i32*
  store [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5], [5 x i32]* %r
  store i32 0, i32* %i
  br label %while

while:                                            ; preds = %merge, %entry
  %i11 = load i32, i32* %i
  %tmp12 = icmp slt i32 %i11, 100
  br i1 %tmp12, label %while_body, label %merge13

while_body:                                       ; preds = %while
  store i32 0, i32* %j
  br label %while1

while1:                                           ; preds = %while_body2, %while_body
  %j7 = load i32, i32* %j
  %tmp8 = icmp slt i32 %j7, 100
  br i1 %tmp8, label %while_body2, label %merge

while_body2:                                      ; preds = %while1
  %i3 = load i32, i32* %i
  %j4 = load i32, i32* %j
  %g5 = getelementptr [100 x [100 x [3 x i32]]], [100 x [100 x [3 x i32]]]* %g, i32 0, i32 %i3, i32 %j4
  store [3 x i32] [i32 255, i32 0, i32 0], [3 x i32]* %g5
  %j6 = load i32, i32* %j
  %tmp = add i32 %j6, 1
  store i32 %tmp, i32* %j
  br label %while1

merge:                                            ; preds = %while1
  %i9 = load i32, i32* %i
  %tmp10 = add i32 %i9, 1
  store i32 %tmp10, i32* %i
  br label %while

merge13:                                          ; preds = %while
  %g14 = getelementptr inbounds [100 x [100 x [3 x i32]]], [100 x [100 x [3 x i32]]]* %g, i32 0, i32 0, i32 0, i32 0
  store i32* %g14, i32** %p
  %r15 = getelementptr inbounds [5 x i32], [5 x i32]* %r, i32 0, i32 0
  store i32* %r15, i32** %q
  %p16 = load i32*, i32** %p
  %loadfile = call i32 @loadfile(i32* %p16, i32 100, i32 100)
  ret i32 0
}
