; ModuleID = 'LFortran'
source_filename = "LFortran"

%circle_polymorphic = type { i64, %circle* }
%circle = type { float }
%__vtab_circle = type { i64 }

@pi = global float 0x400921FB60000000
@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@1 = private unnamed_addr constant [13 x i8] c"Circle: r = \00", align 1
@2 = private unnamed_addr constant [9 x i8] c" area = \00", align 1
@3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1

define float @__module_class_circle1_circle_area(%circle_polymorphic* %this) {
.entry:
  %0 = alloca %__vtab_circle, align 8
  %1 = getelementptr %__vtab_circle, %__vtab_circle* %0, i32 0, i32 0
  store i64 0, i64* %1, align 4
  %area = alloca float, align 4
  %2 = load float, float* @pi, align 4
  %3 = getelementptr %circle_polymorphic, %circle_polymorphic* %this, i32 0, i32 1
  %4 = load %circle*, %circle** %3, align 8
  %5 = getelementptr %circle, %circle* %4, i32 0, i32 0
  %6 = load float, float* %5, align 4
  %7 = call float @llvm.pow.f32(float %6, float 2.000000e+00)
  %8 = fmul float %2, %7
  store float %8, float* %area, align 4
  br label %return

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

define void @__module_class_circle1_circle_print(%circle_polymorphic* %this) {
.entry:
  %0 = alloca %__vtab_circle, align 8
  %1 = getelementptr %__vtab_circle, %__vtab_circle* %0, i32 0, i32 0
  store i64 0, i64* %1, align 4
  %area = alloca float, align 4
  %2 = call float @__module_class_circle1_circle_area(%circle_polymorphic* %this)
  store float %2, float* %area, align 4
  %3 = getelementptr %circle_polymorphic, %circle_polymorphic* %this, i32 0, i32 1
  %4 = load %circle*, %circle** %3, align 8
  %5 = getelementptr %circle, %circle* %4, i32 0, i32 0
  %6 = load float, float* %5, align 4
  %7 = fpext float %6 to double
  %8 = load float, float* %area, align 4
  %9 = fpext float %8 to double
  %10 = call i8* (i32, i8*, ...) @_lcompilers_string_format_fortran(i32 8, i8* null, i32 7, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @1, i32 0, i32 0), i32 6, double %7, i32 7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @2, i32 0, i32 0), i32 6, double %9)
  call void (i8*, ...) @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0))
  br label %return

return:                                           ; preds = %.entry
  ret void
}

; Function Attrs: nounwind readnone speculatable willreturn
declare float @llvm.pow.f32(float, float) #0

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

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

define i32 @main(i32 %0, i8** %1) {
.entry:
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  %c = alloca %circle, align 8
  %2 = getelementptr %circle, %circle* %c, i32 0, i32 0
  %3 = getelementptr %circle, %circle* %c, i32 0, i32 0
  store float 1.500000e+00, float* %3, align 4
  %4 = alloca %circle_polymorphic, align 8
  %5 = getelementptr %circle_polymorphic, %circle_polymorphic* %4, i32 0, i32 0
  store i64 0, i64* %5, align 4
  %6 = getelementptr %circle_polymorphic, %circle_polymorphic* %4, i32 0, i32 1
  store %circle* %c, %circle** %6, align 8
  call void @__module_class_circle1_circle_print(%circle_polymorphic* %4)
  %7 = getelementptr %circle, %circle* %c, i32 0, i32 0
  store float 2.000000e+00, float* %7, align 4
  %8 = alloca %circle_polymorphic, align 8
  %9 = getelementptr %circle_polymorphic, %circle_polymorphic* %8, i32 0, i32 0
  store i64 0, i64* %9, align 4
  %10 = getelementptr %circle_polymorphic, %circle_polymorphic* %8, i32 0, i32 1
  store %circle* %c, %circle** %10, align 8
  call void @__module_class_circle1_circle_print(%circle_polymorphic* %8)
  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()

attributes #0 = { nounwind readnone speculatable willreturn }
