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

%string_descriptor = type <{ i8*, i64 }>
%complex_4 = type <{ float, float }>

@s_data = private global [4 x i8] c"left"
@s = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @s_data, i32 0, i32 0), i64 4 }>
@s1_data = private global [1 x i8] c"l"
@s1 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @s1_data, i32 0, i32 0), i64 1 }>
@s2_data = private global [3 x i8] c"eft"
@s2 = private global %string_descriptor <{ i8* getelementptr inbounds ([3 x i8], [3 x i8]* @s2_data, i32 0, i32 0), i64 3 }>
@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info = private unnamed_addr constant [40 x i8] c"I4,I4,R4,{R4,R4},I4,L32,L32,R4,S-DESC-4\00", align 1
@string_const_data = private constant [4 x i8] c"left"
@string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data, i32 0, i32 0), i64 4 }>
@1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1

define i32 @main(i32 %0, i8** %1) {
.entry:
  %2 = call i8* @_lfortran_get_default_allocator()
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  %i = alloca i32, align 4
  store i32 1, i32* %i, align 4
  %j = alloca i32, align 4
  store i32 2, i32* %j, align 4
  %a = alloca i32, align 4
  store i32 3, i32* %a, align 4
  %l = alloca i32, align 4
  store i32 1, i32* %l, align 4
  %b = alloca i32, align 4
  store i32 1, i32* %b, align 4
  %c = alloca %complex_4, align 8
  store %complex_4 <{ float 3.000000e+00, float 4.000000e+00 }>, %complex_4* %c, align 1
  %r = alloca float, align 4
  store float 4.000000e+00, float* %r, align 4
  %r_minus = alloca float, align 4
  store float -4.000000e+00, float* %r_minus, align 4
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  store i32 1, i32* %4, align 4
  %5 = alloca i32, align 4
  store i32 2, i32* %5, align 4
  %6 = alloca float, align 4
  store float 4.000000e+00, float* %6, align 4
  %7 = alloca %complex_4, align 8
  store %complex_4 <{ float 3.000000e+00, float 4.000000e+00 }>, %complex_4* %7, align 1
  %8 = alloca i32, align 4
  store i32 3, i32* %8, align 4
  %9 = alloca i32, align 4
  store i32 1, i32* %9, align 4
  %10 = alloca i32, align 4
  store i32 1, i32* %10, align 4
  %11 = alloca float, align 4
  store float -4.000000e+00, float* %11, align 4
  %12 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %4, i32* %5, float* %6, %complex_4* %7, i32* %8, i32* %9, i32* %10, float* %11, %string_descriptor* @string_const)
  %13 = load i64, i64* %3, align 8
  %stringFormat_desc = alloca %string_descriptor, align 8
  %14 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  store i8* %12, i8** %14, align 8
  %15 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  store i64 %13, i64* %15, align 8
  %16 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  %17 = load i8*, i8** %16, align 8
  %18 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  %19 = load i64, i64* %18, align 8
  %20 = trunc i64 %19 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %17, i32 %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
  %21 = icmp eq i8* %12, null
  br i1 %21, label %free_done, label %free_nonnull

free_nonnull:                                     ; preds = %.entry
  call void @_lfortran_free_alloc(i8* %2, i8* %12)
  br label %free_done

free_done:                                        ; preds = %free_nonnull, %.entry
  br label %return

return:                                           ; preds = %free_done
  br label %FINALIZE_SYMTABLE_init_values

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

declare void @_lpython_call_initial_functions(i32, i8**)

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

declare i8* @_lfortran_get_default_allocator()

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

declare void @_lfortran_free_alloc(i8*, i8*)

declare void @_lfortran_internal_alloc_finalize()
