; ModuleID = 'LFortran'
source_filename = "LFortran"

@0 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@1 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@2 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@3 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@4 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@5 = private unnamed_addr constant [11 x i8] c"ERROR STOP\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 [11 x i8] c"ERROR STOP\00", align 1
@9 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@10 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@11 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@12 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@13 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@14 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@15 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@16 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@17 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@18 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@19 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@20 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@21 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@22 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@23 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@24 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@25 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@26 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@27 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@28 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@29 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@30 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@31 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@32 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@33 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@34 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1

define i32 @main(i32 %0, i8** %1) {
.entry:
  %call_arg_value25 = alloca i32, align 4
  %call_arg_value18 = alloca i32, align 4
  %call_arg_value = alloca i32, align 4
  %i = alloca i32, align 4
  %j = alloca i32, align 4
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  %i1 = alloca i32, align 4
  %j2 = alloca i32, align 4
  store i32 1, i32* %i1, align 4
  store i32 1, i32* %j2, align 4
  %2 = load i32, i32* %j2, align 4
  %3 = icmp ne i32 %2, 1
  br i1 %3, label %then, label %else

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

else:                                             ; preds = %.entry
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  call void @f(i32* %i1, i32* %j2)
  %4 = load i32, i32* %i1, align 4
  %5 = sext i32 %4 to i64
  %6 = load i32, i32* %j2, align 4
  %7 = sext i32 %6 to i64
  %8 = call i8* (i32, i8*, ...) @_lcompilers_string_format_fortran(i32 4, i8* null, i32 2, i64 %5, i32 2, i64 %7)
  call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @4, i32 0, i32 0), i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @3, i32 0, i32 0))
  %9 = load i32, i32* %i1, align 4
  %10 = icmp ne i32 %9, 1
  br i1 %10, label %then3, label %else4

then3:                                            ; preds = %ifcont
  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]* @5, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont5

else4:                                            ; preds = %ifcont
  br label %ifcont5

ifcont5:                                          ; preds = %else4, %then3
  %11 = load i32, i32* %j2, align 4
  %12 = icmp ne i32 %11, 2
  br i1 %12, label %then6, label %else7

then6:                                            ; preds = %ifcont5
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @10, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @8, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @9, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont8

else7:                                            ; preds = %ifcont5
  br label %ifcont8

ifcont8:                                          ; preds = %else7, %then6
  store i32 1, i32* %j2, align 4
  %13 = load i32, i32* %j2, align 4
  %14 = icmp ne i32 %13, 1
  br i1 %14, label %then9, label %else10

then9:                                            ; preds = %ifcont8
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @13, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @11, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @12, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont11

else10:                                           ; preds = %ifcont8
  br label %ifcont11

ifcont11:                                         ; preds = %else10, %then9
  store i32 3, i32* %call_arg_value, align 4
  call void @f(i32* %call_arg_value, i32* %j2)
  %15 = load i32, i32* %j2, align 4
  %16 = sext i32 %15 to i64
  %17 = call i8* (i32, i8*, ...) @_lcompilers_string_format_fortran(i32 2, i8* null, i32 2, i64 %16)
  call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @15, i32 0, i32 0), i8* %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @14, i32 0, i32 0))
  %18 = load i32, i32* %j2, align 4
  %19 = icmp ne i32 %18, 4
  br i1 %19, label %then12, label %else13

then12:                                           ; preds = %ifcont11
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @18, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @16, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @17, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont14

else13:                                           ; preds = %ifcont11
  br label %ifcont14

ifcont14:                                         ; preds = %else13, %then12
  store i32 1, i32* %j2, align 4
  %20 = load i32, i32* %j2, align 4
  %21 = icmp ne i32 %20, 1
  br i1 %21, label %then15, label %else16

then15:                                           ; preds = %ifcont14
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @21, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @19, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @20, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont17

else16:                                           ; preds = %ifcont14
  br label %ifcont17

ifcont17:                                         ; preds = %else16, %then15
  store i32 3, i32* %call_arg_value18, align 4
  call void @f(i32* %call_arg_value18, i32* %j2)
  %22 = load i32, i32* %j2, align 4
  %23 = sext i32 %22 to i64
  %24 = call i8* (i32, i8*, ...) @_lcompilers_string_format_fortran(i32 2, i8* null, i32 2, i64 %23)
  call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @23, i32 0, i32 0), i8* %24, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @22, i32 0, i32 0))
  %25 = load i32, i32* %j2, align 4
  %26 = icmp ne i32 %25, 4
  br i1 %26, label %then19, label %else20

then19:                                           ; preds = %ifcont17
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @26, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @24, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @25, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont21

else20:                                           ; preds = %ifcont17
  br label %ifcont21

ifcont21:                                         ; preds = %else20, %then19
  store i32 1, i32* %j2, align 4
  %27 = load i32, i32* %j2, align 4
  %28 = icmp ne i32 %27, 1
  br i1 %28, label %then22, label %else23

then22:                                           ; preds = %ifcont21
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @29, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @27, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @28, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont24

else23:                                           ; preds = %ifcont21
  br label %ifcont24

ifcont24:                                         ; preds = %else23, %then22
  %29 = load i32, i32* %i1, align 4
  %30 = add i32 %29, 2
  store i32 %30, i32* %call_arg_value25, align 4
  call void @f(i32* %call_arg_value25, i32* %j2)
  %31 = load i32, i32* %j2, align 4
  %32 = sext i32 %31 to i64
  %33 = call i8* (i32, i8*, ...) @_lcompilers_string_format_fortran(i32 2, i8* null, i32 2, i64 %32)
  call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @31, i32 0, i32 0), i8* %33, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @30, i32 0, i32 0))
  %34 = load i32, i32* %j2, align 4
  %35 = icmp ne i32 %34, 4
  br i1 %35, label %then26, label %else27

then26:                                           ; preds = %ifcont24
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @34, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @32, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @33, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont28

else27:                                           ; preds = %ifcont24
  br label %ifcont28

ifcont28:                                         ; preds = %else27, %then26
  call void @_lpython_free_argv()
  br label %return

return:                                           ; preds = %ifcont28
  ret i32 0
}

define void @f(i32* %a, i32* %b) {
.entry:
  %0 = load i32, i32* %a, align 4
  %1 = add i32 %0, 1
  store i32 %1, i32* %b, align 4
  br label %return

return:                                           ; preds = %.entry
  ret void
}

declare void @_lpython_call_initial_functions(i32, i8**)

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

declare void @exit(i32)

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

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

declare void @_lpython_free_argv()
