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

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

@__module___lcompilers_created__nested_context__b__y = global i32 0
@__module___lcompilers_created__nested_context__b__yy = global float 0.000000e+00
@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info = private unnamed_addr constant [3 x i8] c"I4\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
@serialization_info.1 = private unnamed_addr constant [3 x i8] c"I4\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
@serialization_info.2 = private unnamed_addr constant [3 x i8] c"R4\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
@string_const_data = private constant [3 x i8] c"b()"
@string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([3 x i8], [3 x i8]* @string_const_data, i32 0, i32 0), i64 3 }>
@7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1

define i32 @__module_nested_04_a_b(i32* %x) {
.entry:
  %call_arg_value = alloca i32, align 4
  %b = alloca i32, align 4
  %y = alloca i32, align 4
  %yy = alloca float, align 4
  store float 0x401A666660000000, float* %yy, align 4
  %0 = load i32, i32* %x, align 4
  store i32 %0, i32* %y, align 4
  %1 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %1, i32 3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1)
  %2 = load i32, i32* %y, align 4
  store i32 %2, i32* @__module___lcompilers_created__nested_context__b__y, align 4
  %3 = load float, float* %yy, align 4
  store float %3, float* @__module___lcompilers_created__nested_context__b__yy, align 4
  store i32 6, i32* %call_arg_value, align 4
  %4 = call i32 @b.__module_nested_04_a_c(i32* %call_arg_value)
  store i32 %4, i32* %b, align 4
  %5 = load i32, i32* @__module___lcompilers_created__nested_context__b__y, align 4
  store i32 %5, i32* %y, align 4
  %6 = load float, float* @__module___lcompilers_created__nested_context__b__yy, align 4
  store float %6, float* %yy, align 4
  br label %return

return:                                           ; preds = %.entry
  br label %FINALIZE_SYMTABLE_b

FINALIZE_SYMTABLE_b:                              ; preds = %return
  %7 = load i32, i32* %b, align 4
  ret i32 %7
}

define i32 @b.__module_nested_04_a_c(i32* %z) {
.entry:
  %0 = call i8* @_lfortran_get_default_allocator()
  %c = alloca i32, align 4
  %1 = alloca i64, align 8
  %2 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %1, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %z)
  %3 = load i64, i64* %1, align 8
  %stringFormat_desc = alloca %string_descriptor, align 8
  %4 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  store i8* %2, i8** %4, align 8
  %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  store i64 %3, i64* %5, align 8
  %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  %7 = load i8*, i8** %6, align 8
  %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  %9 = load i64, i64* %8, align 8
  %10 = trunc i64 %9 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %7, i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
  %11 = icmp eq i8* %2, null
  br i1 %11, label %free_done, label %free_nonnull

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

free_done:                                        ; preds = %free_nonnull, %.entry
  %12 = alloca i64, align 8
  %13 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %12, i32 0, i32 0, i32 0, i32 0, i32 0, i32* @__module___lcompilers_created__nested_context__b__y)
  %14 = load i64, i64* %12, align 8
  %stringFormat_desc1 = alloca %string_descriptor, align 8
  %15 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
  store i8* %13, i8** %15, align 8
  %16 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
  store i64 %14, i64* %16, align 8
  %17 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
  %18 = load i8*, i8** %17, align 8
  %19 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
  %20 = load i64, i64* %19, align 8
  %21 = trunc i64 %20 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %18, i32 %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1)
  %22 = icmp eq i8* %13, null
  br i1 %22, label %free_done3, label %free_nonnull2

free_nonnull2:                                    ; preds = %free_done
  call void @_lfortran_free_alloc(i8* %0, i8* %13)
  br label %free_done3

free_done3:                                       ; preds = %free_nonnull2, %free_done
  %23 = alloca i64, align 8
  %24 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.2, i32 0, i32 0), i64* %23, i32 0, i32 0, i32 0, i32 0, i32 0, float* @__module___lcompilers_created__nested_context__b__yy)
  %25 = load i64, i64* %23, align 8
  %stringFormat_desc4 = alloca %string_descriptor, align 8
  %26 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0
  store i8* %24, i8** %26, align 8
  %27 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1
  store i64 %25, i64* %27, align 8
  %28 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0
  %29 = load i8*, i8** %28, align 8
  %30 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1
  %31 = load i64, i64* %30, align 8
  %32 = trunc i64 %31 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %29, i32 %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1)
  %33 = icmp eq i8* %24, null
  br i1 %33, label %free_done6, label %free_nonnull5

free_nonnull5:                                    ; preds = %free_done3
  call void @_lfortran_free_alloc(i8* %0, i8* %24)
  br label %free_done6

free_done6:                                       ; preds = %free_nonnull5, %free_done3
  %34 = load i32, i32* %z, align 4
  store i32 %34, i32* %c, align 4
  br label %return

return:                                           ; preds = %free_done6
  br label %FINALIZE_SYMTABLE_c

FINALIZE_SYMTABLE_c:                              ; preds = %return
  %35 = load i32, i32* %c, align 4
  ret i32 %35
}

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*)

define i32 @main(i32 %0, i8** %1) {
.entry:
  %call_arg_value = alloca i32, align 4
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  %test = alloca i32, align 4
  store i32 5, i32* %call_arg_value, align 4
  %2 = call i32 @__module_nested_04_a_b(i32* %call_arg_value)
  store i32 %2, i32* %test, align 4
  br label %return

return:                                           ; preds = %.entry
  br label %FINALIZE_SYMTABLE_nested_04

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

declare void @_lpython_call_initial_functions(i32, i8**)

declare void @_lfortran_internal_alloc_finalize()
