; ModuleID = 'LFortran'
source_filename = "LFortran"

@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 [2 x i8] c"\0A\00", align 1
@5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@main.res = internal global float 0.000000e+00

define void @__module_callback_02_cb(float* %res, float* %a, float* %b, void (float*, float*)* %f) {
.entry:
  call void %f(float* %a, float* %res)
  %0 = load float, float* %res, align 4
  %1 = fpext float %0 to double
  %2 = call i8* (i32, i8*, ...) @_lcompilers_string_format_fortran(i32 2, i8* null, i32 6, double %1)
  call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0))
  call void %f(float* %b, float* %res)
  %3 = load float, float* %res, align 4
  %4 = fpext float %3 to double
  %5 = call i8* (i32, i8*, ...) @_lcompilers_string_format_fortran(i32 2, i8* null, i32 6, double %4)
  call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0))
  %6 = load float, float* %b, align 4
  %7 = load float, float* %a, align 4
  %8 = fsub float %6, %7
  %9 = load float, float* %res, align 4
  %10 = fmul float %8, %9
  store float %10, float* %res, align 4
  %11 = load float, float* %res, align 4
  %12 = fpext float %11 to double
  %13 = call i8* (i32, i8*, ...) @_lcompilers_string_format_fortran(i32 2, i8* null, i32 6, double %12)
  call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0))
  br label %return

return:                                           ; preds = %.entry
  ret void
}

declare void @f(float*, float*)

define float @__module_callback_02_foo(float* %c, float* %d, float* %res) {
.entry:
  %foo = alloca float, align 4
  call void @__module_callback_02_cb(float* %res, float* %c, float* %d, void (float*, float*)* @__module_callback_02_f)
  %0 = load float, float* %res, align 4
  store float %0, float* %foo, align 4
  br label %return

return:                                           ; preds = %.entry
  %1 = load float, float* %foo, align 4
  ret float %1
}

define void @__module_callback_02_f(float* %x, float* %res) {
.entry:
  %0 = load float, float* %x, align 4
  %1 = fmul float 2.000000e+00, %0
  store float %1, float* %res, align 4
  br label %return

return:                                           ; preds = %.entry
  ret void
}

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

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

define i32 @main(i32 %0, i8** %1) {
.entry:
  %call_arg_value1 = alloca float, align 4
  %call_arg_value = alloca float, align 4
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  store float 1.500000e+00, float* %call_arg_value, align 4
  store float 2.000000e+00, float* %call_arg_value1, align 4
  %2 = call float @__module_callback_02_foo(float* %call_arg_value, float* %call_arg_value1, float* @main.res)
  store float %2, float* @main.res, align 4
  call void @_lpython_free_argv()
  br label %return

return:                                           ; preds = %.entry
  ret i32 0
}

declare void @_lpython_call_initial_functions(i32, i8**)

declare void @_lpython_free_argv()
