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

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

@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info = private unnamed_addr constant [8 x i8] c"{R4,R4}\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 [8 x i8] c"{R4,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
@serialization_info.2 = private unnamed_addr constant [8 x i8] c"{R4,R4}\00", align 1
@5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1

define i32 @main(i32 %0, i8** %1) {
.entry:
  %stringFormat_desc4 = alloca %string_descriptor, align 8
  %stringFormat_desc1 = alloca %string_descriptor, align 8
  %stringFormat_desc = alloca %string_descriptor, align 8
  %2 = call i8* @_lfortran_get_default_allocator()
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  %x = alloca %complex_4, align 8
  store %complex_4 <{ float 3.000000e+00, float 4.000000e+00 }>, %complex_4* %x, align 1
  %3 = load %complex_4, %complex_4* %x, align 1
  %4 = extractvalue %complex_4 %3, 0
  %5 = extractvalue %complex_4 %3, 1
  %6 = fadd float %4, 4.000000e+00
  %7 = fadd float %5, 0.000000e+00
  %8 = insertvalue %complex_4 undef, float %6, 0
  %9 = insertvalue %complex_4 %8, float %7, 1
  store %complex_4 %9, %complex_4* %x, align 1
  %10 = alloca i64, align 8
  %11 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @serialization_info, i32 0, i32 0), i64* %10, i32 0, i32 0, i32 0, i32 0, i32 0, %complex_4* %x)
  %12 = load i64, i64* %10, align 8
  %13 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  store i8* %11, i8** %13, align 8
  %14 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  store i64 %12, i64* %14, align 8
  %15 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  %16 = load i8*, i8** %15, align 8
  %17 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  %18 = load i64, i64* %17, align 8
  %19 = trunc i64 %18 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %16, i32 %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
  %20 = icmp eq i8* %11, null
  br i1 %20, label %free_done, label %free_nonnull

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

free_done:                                        ; preds = %free_nonnull, %.entry
  %21 = load %complex_4, %complex_4* %x, align 1
  %22 = extractvalue %complex_4 %21, 0
  %23 = extractvalue %complex_4 %21, 1
  %24 = fadd float 2.000000e+00, %22
  %25 = fadd float 0.000000e+00, %23
  %26 = insertvalue %complex_4 undef, float %24, 0
  %27 = insertvalue %complex_4 %26, float %25, 1
  store %complex_4 %27, %complex_4* %x, align 1
  %28 = alloca i64, align 8
  %29 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @serialization_info.1, i32 0, i32 0), i64* %28, i32 0, i32 0, i32 0, i32 0, i32 0, %complex_4* %x)
  %30 = load i64, i64* %28, align 8
  %31 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
  store i8* %29, i8** %31, align 8
  %32 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
  store i64 %30, i64* %32, align 8
  %33 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
  %34 = load i8*, i8** %33, align 8
  %35 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
  %36 = load i64, i64* %35, align 8
  %37 = trunc i64 %36 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %34, i32 %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1)
  %38 = icmp eq i8* %29, null
  br i1 %38, label %free_done3, label %free_nonnull2

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

free_done3:                                       ; preds = %free_nonnull2, %free_done
  %39 = load %complex_4, %complex_4* %x, align 1
  %40 = extractvalue %complex_4 %39, 0
  %41 = extractvalue %complex_4 %39, 1
  %42 = fadd float 2.000000e+00, %40
  %43 = fadd float 0.000000e+00, %41
  %44 = insertvalue %complex_4 undef, float %42, 0
  %45 = insertvalue %complex_4 %44, float %43, 1
  %46 = extractvalue %complex_4 %45, 0
  %47 = extractvalue %complex_4 %45, 1
  %48 = fadd float %46, 0.000000e+00
  %49 = fadd float %47, 3.000000e+00
  %50 = insertvalue %complex_4 undef, float %48, 0
  %51 = insertvalue %complex_4 %50, float %49, 1
  store %complex_4 %51, %complex_4* %x, align 1
  %52 = alloca i64, align 8
  %53 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @serialization_info.2, i32 0, i32 0), i64* %52, i32 0, i32 0, i32 0, i32 0, i32 0, %complex_4* %x)
  %54 = load i64, i64* %52, align 8
  %55 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0
  store i8* %53, i8** %55, align 8
  %56 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1
  store i64 %54, i64* %56, align 8
  %57 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0
  %58 = load i8*, i8** %57, align 8
  %59 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1
  %60 = load i64, i64* %59, align 8
  %61 = trunc i64 %60 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %58, i32 %61, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1)
  %62 = icmp eq i8* %53, null
  br i1 %62, label %free_done6, label %free_nonnull5

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

free_done6:                                       ; preds = %free_nonnull5, %free_done3
  br label %return

return:                                           ; preds = %free_done6
  br label %FINALIZE_SYMTABLE_complex2

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

declare void @_lpython_call_initial_functions(i32, i8**)

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

declare void @_lfortran_internal_alloc_finalize()
