; ModuleID = 'LFortran'
source_filename = "LFortran"
target datalayout = "..."

@"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1

define i32 @main(i32 %0, i8** %1) {
.entry:
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  %i = alloca i32, align 4
  %j = alloca i32, align 4
  store i32 0, i32* %i, align 4
  store i32 0, i32* %j, align 4
  br label %loop.head

loop.head:                                        ; preds = %loop.body, %.entry
  %2 = load i32, i32* %i, align 4
  %3 = icmp slt i32 %2, 10
  br i1 %3, label %loop.body, label %loop.end

loop.body:                                        ; preds = %loop.head
  %4 = load i32, i32* %i, align 4
  %5 = add i32 %4, 1
  store i32 %5, i32* %i, align 4
  %6 = load i32, i32* %j, align 4
  %7 = load i32, i32* %i, align 4
  %8 = add i32 %6, %7
  store i32 %8, i32* %j, align 4
  br label %loop.head

loop.end:                                         ; preds = %loop.head
  %9 = load i32, i32* %j, align 4
  %10 = icmp ne i32 %9, 55
  br i1 %10, label %then, label %else

then:                                             ; preds = %loop.end
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0))
  call void @_lfortran_internal_alloc_finalize()
  call void @exit(i32 1)
  br label %ifcont

else:                                             ; preds = %loop.end
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  %11 = load i32, i32* %i, align 4
  %12 = icmp ne i32 %11, 10
  br i1 %12, label %then1, label %else2

then1:                                            ; preds = %ifcont
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0))
  call void @_lfortran_internal_alloc_finalize()
  call void @exit(i32 1)
  br label %ifcont3

else2:                                            ; preds = %ifcont
  br label %ifcont3

ifcont3:                                          ; preds = %else2, %then1
  store i32 0, i32* %i, align 4
  store i32 0, i32* %j, align 4
  br label %loop.head4

loop.head4:                                       ; preds = %ifcont8, %ifcont3
  %13 = load i32, i32* %i, align 4
  %14 = icmp slt i32 %13, 10
  br i1 %14, label %loop.body5, label %loop.end9

loop.body5:                                       ; preds = %loop.head4
  %15 = load i32, i32* %i, align 4
  %16 = add i32 %15, 1
  store i32 %16, i32* %i, align 4
  %17 = load i32, i32* %i, align 4
  %18 = icmp eq i32 %17, 2
  br i1 %18, label %then6, label %else7

then6:                                            ; preds = %loop.body5
  br label %loop.end9

unreachable_after_exit:                           ; No predecessors!
  br label %ifcont8

else7:                                            ; preds = %loop.body5
  br label %ifcont8

ifcont8:                                          ; preds = %else7, %unreachable_after_exit
  %19 = load i32, i32* %j, align 4
  %20 = load i32, i32* %i, align 4
  %21 = add i32 %19, %20
  store i32 %21, i32* %j, align 4
  br label %loop.head4

loop.end9:                                        ; preds = %then6, %loop.head4
  %22 = load i32, i32* %j, align 4
  %23 = icmp ne i32 %22, 1
  br i1 %23, label %then10, label %else11

then10:                                           ; preds = %loop.end9
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0))
  call void @_lfortran_internal_alloc_finalize()
  call void @exit(i32 1)
  br label %ifcont12

else11:                                           ; preds = %loop.end9
  br label %ifcont12

ifcont12:                                         ; preds = %else11, %then10
  %24 = load i32, i32* %i, align 4
  %25 = icmp ne i32 %24, 2
  br i1 %25, label %then13, label %else14

then13:                                           ; preds = %ifcont12
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0))
  call void @_lfortran_internal_alloc_finalize()
  call void @exit(i32 1)
  br label %ifcont15

else14:                                           ; preds = %ifcont12
  br label %ifcont15

ifcont15:                                         ; preds = %else14, %then13
  store i32 0, i32* %i, align 4
  store i32 0, i32* %j, align 4
  br label %loop.head16

loop.head16:                                      ; preds = %ifcont20, %then18, %ifcont15
  %26 = load i32, i32* %i, align 4
  %27 = icmp slt i32 %26, 10
  br i1 %27, label %loop.body17, label %loop.end21

loop.body17:                                      ; preds = %loop.head16
  %28 = load i32, i32* %i, align 4
  %29 = add i32 %28, 1
  store i32 %29, i32* %i, align 4
  %30 = load i32, i32* %i, align 4
  %31 = icmp eq i32 %30, 2
  br i1 %31, label %then18, label %else19

then18:                                           ; preds = %loop.body17
  br label %loop.head16

unreachable_after_cycle:                          ; No predecessors!
  br label %ifcont20

else19:                                           ; preds = %loop.body17
  br label %ifcont20

ifcont20:                                         ; preds = %else19, %unreachable_after_cycle
  %32 = load i32, i32* %j, align 4
  %33 = load i32, i32* %i, align 4
  %34 = add i32 %32, %33
  store i32 %34, i32* %j, align 4
  br label %loop.head16

loop.end21:                                       ; preds = %loop.head16
  %35 = load i32, i32* %j, align 4
  %36 = icmp ne i32 %35, 53
  br i1 %36, label %then22, label %else23

then22:                                           ; preds = %loop.end21
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0))
  call void @_lfortran_internal_alloc_finalize()
  call void @exit(i32 1)
  br label %ifcont24

else23:                                           ; preds = %loop.end21
  br label %ifcont24

ifcont24:                                         ; preds = %else23, %then22
  %37 = load i32, i32* %i, align 4
  %38 = icmp ne i32 %37, 10
  br i1 %38, label %then25, label %else26

then25:                                           ; preds = %ifcont24
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0))
  call void @_lfortran_internal_alloc_finalize()
  call void @exit(i32 1)
  br label %ifcont27

else26:                                           ; preds = %ifcont24
  br label %ifcont27

ifcont27:                                         ; preds = %else26, %then25
  br label %return

return:                                           ; preds = %ifcont27
  br label %FINALIZE_SYMTABLE_while_02

FINALIZE_SYMTABLE_while_02:                       ; preds = %return
  call void @_lfortran_internal_alloc_finalize()
  ret i32 0
}

declare void @_lpython_call_initial_functions(i32, i8**)

declare void @_lcompilers_print_error(i8*, ...)

declare void @_lfortran_internal_alloc_finalize()

declare void @exit(i32)
