; 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 1, 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, 11
  br i1 %3, label %loop.body, label %loop.end

loop.body:                                        ; preds = %loop.head
  %4 = load i32, i32* %j, align 4
  %5 = load i32, i32* %i, align 4
  %6 = add i32 %4, %5
  store i32 %6, i32* %j, align 4
  %7 = load i32, i32* %i, align 4
  %8 = add i32 %7, 1
  store i32 %8, i32* %i, 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, 11
  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 1, i32* %i, align 4
  store i32 0, i32* %j, align 4
  br label %loop.head4

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

loop.body5:                                       ; preds = %loop.head4
  %15 = load i32, i32* %j, align 4
  %16 = load i32, i32* %i, align 4
  %17 = add i32 %15, %16
  store i32 %17, i32* %j, align 4
  %18 = load i32, i32* %i, align 4
  %19 = add i32 %18, 1
  store i32 %19, i32* %i, align 4
  br label %loop.head4

loop.end6:                                        ; preds = %loop.head4
  %20 = load i32, i32* %j, align 4
  %21 = icmp ne i32 %20, 55
  br i1 %21, label %then7, label %else8

then7:                                            ; preds = %loop.end6
  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 %ifcont9

else8:                                            ; preds = %loop.end6
  br label %ifcont9

ifcont9:                                          ; preds = %else8, %then7
  %22 = load i32, i32* %i, align 4
  %23 = icmp ne i32 %22, 11
  br i1 %23, label %then10, label %else11

then10:                                           ; preds = %ifcont9
  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 %ifcont12

else11:                                           ; preds = %ifcont9
  br label %ifcont12

ifcont12:                                         ; preds = %else11, %then10
  store i32 1, i32* %i, align 4
  store i32 0, i32* %j, align 4
  br label %loop.head13

loop.head13:                                      ; preds = %loop.body14, %ifcont12
  %24 = load i32, i32* %i, align 4
  %25 = icmp slt i32 %24, 1
  br i1 %25, label %loop.body14, label %loop.end15

loop.body14:                                      ; preds = %loop.head13
  %26 = load i32, i32* %j, align 4
  %27 = load i32, i32* %i, align 4
  %28 = add i32 %26, %27
  store i32 %28, i32* %j, align 4
  %29 = load i32, i32* %i, align 4
  %30 = add i32 %29, 1
  store i32 %30, i32* %i, align 4
  br label %loop.head13

loop.end15:                                       ; preds = %loop.head13
  %31 = load i32, i32* %j, align 4
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %then16, label %else17

then16:                                           ; preds = %loop.end15
  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 %ifcont18

else17:                                           ; preds = %loop.end15
  br label %ifcont18

ifcont18:                                         ; preds = %else17, %then16
  %33 = load i32, i32* %i, align 4
  %34 = icmp ne i32 %33, 1
  br i1 %34, label %then19, label %else20

then19:                                           ; preds = %ifcont18
  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 %ifcont21

else20:                                           ; preds = %ifcont18
  br label %ifcont21

ifcont21:                                         ; preds = %else20, %then19
  br label %return

return:                                           ; preds = %ifcont21
  br label %FINALIZE_SYMTABLE_while_01

FINALIZE_SYMTABLE_while_01:                       ; 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)
