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

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

@__module___lcompilers_created__nested_context__b__x = 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"R4\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
@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 }>
@5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1

define void @__module_nested_03_a_b() {
.entry:
  %x = alloca float, align 4
  store float 6.000000e+00, float* %x, align 4
  %0 = 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]* @5, i32 0, i32 0), i8* %0, i32 3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1)
  %1 = load float, float* %x, align 4
  store float %1, float* @__module___lcompilers_created__nested_context__b__x, align 4
  call void @b.__module_nested_03_a_c()
  %2 = load float, float* @__module___lcompilers_created__nested_context__b__x, align 4
  store float %2, float* %x, align 4
  br label %return

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

FINALIZE_SYMTABLE_b:                              ; preds = %return
  ret void
}

define void @b.__module_nested_03_a_c() {
.entry:
  %stringFormat_desc1 = alloca %string_descriptor, align 8
  %stringFormat_desc = alloca %string_descriptor, align 8
  %0 = call i8* @_lfortran_get_default_allocator()
  %1 = alloca i64, align 8
  %2 = alloca i32, align 4
  store i32 5, i32* %2, align 4
  %3 = 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* %2)
  %4 = load i64, i64* %1, align 8
  %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  store i8* %3, i8** %5, align 8
  %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  store i64 %4, i64* %6, align 8
  %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  %8 = load i8*, i8** %7, align 8
  %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  %10 = load i64, i64* %9, align 8
  %11 = trunc i64 %10 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %8, i32 %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
  %12 = icmp eq i8* %3, null
  br i1 %12, label %free_done, label %free_nonnull

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

free_done:                                        ; preds = %free_nonnull, %.entry
  %13 = alloca i64, align 8
  %14 = 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* %13, i32 0, i32 0, i32 0, i32 0, i32 0, float* @__module___lcompilers_created__nested_context__b__x)
  %15 = load i64, i64* %13, align 8
  %16 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
  store i8* %14, i8** %16, align 8
  %17 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
  store i64 %15, i64* %17, align 8
  %18 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
  %19 = load i8*, i8** %18, align 8
  %20 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
  %21 = load i64, i64* %20, align 8
  %22 = trunc i64 %21 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %19, i32 %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1)
  %23 = icmp eq i8* %14, null
  br i1 %23, label %free_done3, label %free_nonnull2

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

free_done3:                                       ; preds = %free_nonnull2, %free_done
  br label %return

return:                                           ; preds = %free_done3
  br label %FINALIZE_SYMTABLE_c

FINALIZE_SYMTABLE_c:                              ; preds = %return
  ret void
}

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 void @_lpython_call_initial_functions(i32 %0, i8** %1)
  call void @__module_nested_03_a_b()
  br label %return

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

FINALIZE_SYMTABLE_nested_03:                      ; 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()
