; ModuleID = 'LFortran'
source_filename = "LFortran"

@associate_03.t1 = internal global i32 2
@associate_03.t2 = internal global i32 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 [11 x i8] c"ERROR STOP\00", align 1
@5 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@6 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1

define i32 @main(i32 %0, i8** %1) {
.entry:
  %i = alloca i32, align 4
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  %i1 = alloca i32, align 4
  %p1 = alloca i32*, align 8
  store i32* null, i32** %p1, align 8
  %2 = load i32, i32* @associate_03.t1, align 4
  %3 = sext i32 %2 to i64
  %4 = load i32, i32* @associate_03.t2, align 4
  %5 = sext i32 %4 to i64
  %6 = call i8* (i32, i8*, ...) @_lcompilers_string_format_fortran(i32 4, i8* null, i32 2, i64 %3, i32 2, i64 %5)
  call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0))
  %7 = load i32, i32* @associate_03.t1, align 4
  %8 = load i32, i32* @associate_03.t2, align 4
  %9 = icmp sgt i32 %7, %8
  br i1 %9, label %then, label %else

then:                                             ; preds = %.entry
  store i32* @associate_03.t1, i32** %p1, align 8
  br label %ifcont

else:                                             ; preds = %.entry
  store i32* @associate_03.t2, i32** %p1, align 8
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  %10 = load i32*, i32** %p1, align 8
  %11 = ptrtoint i32* %10 to i64
  %12 = call i8* (i32, i8*, ...) @_lcompilers_string_format_fortran(i32 2, i8* null, i32 19, i64 %11)
  call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0))
  %13 = load i32*, i32** %p1, align 8
  %14 = load i32, i32* %13, align 4
  store i32 %14, i32* %i1, align 4
  %15 = load i32, i32* %i1, align 4
  %16 = load i32, i32* @associate_03.t2, align 4
  %17 = icmp eq i32 %15, %16
  br i1 %17, label %then2, label %else3

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

else3:                                            ; preds = %ifcont
  br label %ifcont4

ifcont4:                                          ; preds = %else3, %then2
  call void @_lpython_free_argv()
  br label %return

return:                                           ; preds = %ifcont4
  ret i32 0
}

declare void @_lpython_call_initial_functions(i32, i8**)

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

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

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

declare void @exit(i32)

declare void @_lpython_free_argv()
