; 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

define float @__module_callback_03_cb(float (float*)* %f, float* %a, float* %b) {
.entry:
  %cb = alloca float, align 4
  %0 = load float, float* %b, align 4
  %1 = load float, float* %a, align 4
  %2 = fsub float %0, %1
  %3 = call float %f(float* %a)
  %4 = fadd float %2, %3
  %5 = call float %f(float* %b)
  %6 = fadd float %4, %5
  store float %6, float* %cb, align 4
  br label %return

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

declare float @f(float*)

define void @__module_callback_03_foo1(float* %c, float* %d) {
.entry:
  %0 = call float @__module_callback_03_cb(float (float*)* @__module_callback_03_f, float* %c, float* %d)
  %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))
  br label %return

return:                                           ; preds = %.entry
  ret void
}

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

return:                                           ; preds = %.entry
  %2 = load float, float* %f, align 4
  ret float %2

.entry1:                                          ; No predecessors!
  %f2 = alloca float, align 4
  %3 = load float, float* %x, align 4
  %4 = fmul float -2.000000e+00, %3
  store float %4, float* %f2, align 4
  br label %return3

return3:                                          ; preds = %.entry1
  %5 = load float, float* %f2, align 4
  ret float %5
}

define void @__module_callback_03_foo2(float* %c, float* %d) {
.entry:
  %0 = call float @__module_callback_03_cb(float (float*)* @__module_callback_03_f, float* %c, float* %d)
  %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]* @3, i32 0, i32 0), i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0))
  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_value3 = alloca float, align 4
  %call_arg_value2 = alloca float, align 4
  %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
  call void @__module_callback_03_foo1(float* %call_arg_value, float* %call_arg_value1)
  store float 1.500000e+00, float* %call_arg_value2, align 4
  store float 2.000000e+00, float* %call_arg_value3, align 4
  call void @__module_callback_03_foo2(float* %call_arg_value2, float* %call_arg_value3)
  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()
