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

%array.1.1 = type { %string_descriptor*, i64, i32, i8, i8, i8, i8, i64, [1 x %dimension_descriptor] }
%string_descriptor = type <{ i8*, i64 }>
%dimension_descriptor = type { i64, i64, i64 }
%array.1.0 = type { i32*, i64, i32, i8, i8, i8, i8, i64, [1 x %dimension_descriptor] }
%array.1 = type { %finalize_02.tt*, i64, i32, i8, i8, i8, i8, i64, [1 x %dimension_descriptor] }
%finalize_02.tt = type { float, %finalize_02.t }
%finalize_02.t = type { i32 }

@deep_0 = internal global i32 0

define i32 @main(i32 %0, i8** %1) {
.entry:
  %call_arg_value = alloca i32, align 4
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  store i32 200, i32* %call_arg_value, align 4
  call void @ss(i32* %call_arg_value)
  br label %return

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

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

define void @ss(i32* %nang) {
.entry:
  %0 = call i8* @_lfortran_get_default_allocator()
  %1 = call i8* @_lfortran_get_default_allocator()
  %arr_desc4 = alloca %array.1.1, align 8
  %arr_desc3 = alloca %array.1.0, align 8
  %arr_desc2 = alloca %array.1.1, align 8
  %arr_desc1 = alloca %array.1.0, align 8
  %arr_desc = alloca %array.1, align 8
  %arr_01 = alloca %array.1*, align 8
  store %array.1* null, %array.1** %arr_01, align 8
  %2 = getelementptr %array.1, %array.1* %arr_desc, i32 0, i32 8
  %3 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %2, i32 0, i32 0
  %4 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %3, i32 0
  %5 = getelementptr %dimension_descriptor, %dimension_descriptor* %4, i32 0, i32 0
  store i64 1, i64* %5, align 8
  %6 = getelementptr %dimension_descriptor, %dimension_descriptor* %4, i32 0, i32 1
  store i64 1, i64* %6, align 8
  %7 = getelementptr %dimension_descriptor, %dimension_descriptor* %4, i32 0, i32 2
  store i64 0, i64* %7, align 8
  %8 = getelementptr %array.1, %array.1* %arr_desc, i32 0, i32 3
  store i8 1, i8* %8, align 1
  %9 = getelementptr %array.1, %array.1* %arr_desc, i32 0, i32 0
  store %finalize_02.tt* null, %finalize_02.tt** %9, align 8
  store %array.1* %arr_desc, %array.1** %arr_01, align 8
  %arr_02 = alloca %array.1.0*, align 8
  store %array.1.0* null, %array.1.0** %arr_02, align 8
  %10 = getelementptr %array.1.0, %array.1.0* %arr_desc1, i32 0, i32 8
  %11 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %10, i32 0, i32 0
  %12 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %11, i32 0
  %13 = getelementptr %dimension_descriptor, %dimension_descriptor* %12, i32 0, i32 0
  store i64 1, i64* %13, align 8
  %14 = getelementptr %dimension_descriptor, %dimension_descriptor* %12, i32 0, i32 1
  store i64 1, i64* %14, align 8
  %15 = getelementptr %dimension_descriptor, %dimension_descriptor* %12, i32 0, i32 2
  store i64 0, i64* %15, align 8
  %16 = getelementptr %array.1.0, %array.1.0* %arr_desc1, i32 0, i32 3
  store i8 1, i8* %16, align 1
  %17 = getelementptr %array.1.0, %array.1.0* %arr_desc1, i32 0, i32 0
  store i32* null, i32** %17, align 8
  store %array.1.0* %arr_desc1, %array.1.0** %arr_02, align 8
  %arr_03 = alloca i32*, align 8
  store i32* null, i32** %arr_03, align 8
  %arr_04 = alloca %array.1.1*, align 8
  store %array.1.1* null, %array.1.1** %arr_04, align 8
  %arr_desc_str_desc = alloca %string_descriptor, align 8
  %18 = getelementptr %string_descriptor, %string_descriptor* %arr_desc_str_desc, i32 0, i32 0
  store i8* null, i8** %18, align 8
  %19 = getelementptr %string_descriptor, %string_descriptor* %arr_desc_str_desc, i32 0, i32 1
  store i64 0, i64* %19, align 8
  %20 = getelementptr %array.1.1, %array.1.1* %arr_desc2, i32 0, i32 0
  store %string_descriptor* %arr_desc_str_desc, %string_descriptor** %20, align 8
  %21 = getelementptr %array.1.1, %array.1.1* %arr_desc2, i32 0, i32 8
  %22 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %21, i32 0, i32 0
  %23 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %22, i32 0
  %24 = getelementptr %dimension_descriptor, %dimension_descriptor* %23, i32 0, i32 0
  store i64 1, i64* %24, align 8
  %25 = getelementptr %dimension_descriptor, %dimension_descriptor* %23, i32 0, i32 1
  store i64 1, i64* %25, align 8
  %26 = getelementptr %dimension_descriptor, %dimension_descriptor* %23, i32 0, i32 2
  store i64 0, i64* %26, align 8
  %27 = getelementptr %array.1.1, %array.1.1* %arr_desc2, i32 0, i32 3
  store i8 1, i8* %27, align 1
  store %array.1.1* %arr_desc2, %array.1.1** %arr_04, align 8
  %arr_05 = alloca %string_descriptor, align 8
  %28 = getelementptr %string_descriptor, %string_descriptor* %arr_05, i32 0, i32 0
  store i8* null, i8** %28, align 8
  %29 = getelementptr %string_descriptor, %string_descriptor* %arr_05, i32 0, i32 1
  store i64 0, i64* %29, align 8
  %30 = getelementptr %string_descriptor, %string_descriptor* %arr_05, i32 0, i32 1
  store i64 20, i64* %30, align 8
  %31 = call i8* @_lfortran_get_default_allocator()
  %32 = call i8* @_lfortran_malloc_alloc(i8* %31, i64 100)
  %33 = getelementptr %string_descriptor, %string_descriptor* %arr_05, i32 0, i32 0
  store i8* %32, i8** %33, align 8
  %arr_06 = alloca %array.1.0*, align 8
  store %array.1.0* null, %array.1.0** %arr_06, align 8
  %34 = getelementptr %array.1.0, %array.1.0* %arr_desc3, i32 0, i32 8
  %35 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %34, i32 0, i32 0
  %36 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %35, i32 0
  %37 = getelementptr %dimension_descriptor, %dimension_descriptor* %36, i32 0, i32 0
  store i64 1, i64* %37, align 8
  %38 = getelementptr %dimension_descriptor, %dimension_descriptor* %36, i32 0, i32 1
  store i64 1, i64* %38, align 8
  %39 = getelementptr %dimension_descriptor, %dimension_descriptor* %36, i32 0, i32 2
  store i64 0, i64* %39, align 8
  %40 = getelementptr %array.1.0, %array.1.0* %arr_desc3, i32 0, i32 3
  store i8 1, i8* %40, align 1
  %41 = getelementptr %array.1.0, %array.1.0* %arr_desc3, i32 0, i32 0
  store i32* null, i32** %41, align 8
  store %array.1.0* %arr_desc3, %array.1.0** %arr_06, align 8
  %arr_07 = alloca %string_descriptor, align 8
  store %string_descriptor zeroinitializer, %string_descriptor* %arr_07, align 1
  %arr_08 = alloca %array.1.1*, align 8
  store %array.1.1* null, %array.1.1** %arr_08, align 8
  %arr_desc_str_desc5 = alloca %string_descriptor, align 8
  %42 = getelementptr %string_descriptor, %string_descriptor* %arr_desc_str_desc5, i32 0, i32 0
  store i8* null, i8** %42, align 8
  %43 = getelementptr %string_descriptor, %string_descriptor* %arr_desc_str_desc5, i32 0, i32 1
  store i64 0, i64* %43, align 8
  %44 = getelementptr %array.1.1, %array.1.1* %arr_desc4, i32 0, i32 0
  store %string_descriptor* %arr_desc_str_desc5, %string_descriptor** %44, align 8
  %45 = getelementptr %array.1.1, %array.1.1* %arr_desc4, i32 0, i32 8
  %46 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %45, i32 0, i32 0
  %47 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %46, i32 0
  %48 = getelementptr %dimension_descriptor, %dimension_descriptor* %47, i32 0, i32 0
  store i64 1, i64* %48, align 8
  %49 = getelementptr %dimension_descriptor, %dimension_descriptor* %47, i32 0, i32 1
  store i64 1, i64* %49, align 8
  %50 = getelementptr %dimension_descriptor, %dimension_descriptor* %47, i32 0, i32 2
  store i64 0, i64* %50, align 8
  %51 = getelementptr %array.1.1, %array.1.1* %arr_desc4, i32 0, i32 3
  store i8 1, i8* %51, align 1
  store %array.1.1* %arr_desc4, %array.1.1** %arr_08, align 8
  %52 = load i32, i32* %nang, align 4
  store i32 %52, i32* @deep_0, align 4
  %53 = load i32, i32* @deep_0, align 4
  %54 = mul i32 1, %53
  %55 = mul i32 %54, 4
  %56 = sext i32 %55 to i64
  %57 = call i8* @_lfortran_get_default_allocator()
  %58 = call i8* @_lfortran_malloc_alloc(i8* %57, i64 %56)
  %59 = bitcast i8* %58 to i32*
  br label %return

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

FINALIZE_SYMTABLE_ss:                             ; preds = %return
  br label %Finalize_Variable_arr_01

Finalize_Variable_arr_01:                         ; preds = %FINALIZE_SYMTABLE_ss
  %60 = load %array.1*, %array.1** %arr_01, align 8
  call void @finalize_allocatable__Array_1_StructType__tt(%array.1* %60)
  br label %Finalize_Variable_arr_02

Finalize_Variable_arr_02:                         ; preds = %Finalize_Variable_arr_01
  %61 = load %array.1.0*, %array.1.0** %arr_02, align 8
  call void @finalize_allocatable__Array_1_i32(%array.1.0* %61)
  br label %Finalize_Variable_arr_03

Finalize_Variable_arr_03:                         ; preds = %Finalize_Variable_arr_02
  %62 = load i32*, i32** %arr_03, align 8
  %63 = bitcast i32* %62 to i8*
  call void @_lfortran_free_alloc(i8* %1, i8* %63)
  br label %Finalize_Variable_arr_04

Finalize_Variable_arr_04:                         ; preds = %Finalize_Variable_arr_03
  %64 = load %array.1.1*, %array.1.1** %arr_04, align 8
  call void @finalize_allocatable__Array_1_str(%array.1.1* %64)
  br label %Finalize_Variable_arr_05

Finalize_Variable_arr_05:                         ; preds = %Finalize_Variable_arr_04
  %65 = getelementptr %string_descriptor, %string_descriptor* %arr_05, i32 0, i32 0
  %66 = load i8*, i8** %65, align 8
  call void @_lfortran_free_alloc(i8* %0, i8* %66)
  br label %Finalize_Variable_arr_06

Finalize_Variable_arr_06:                         ; preds = %Finalize_Variable_arr_05
  %67 = load %array.1.0*, %array.1.0** %arr_06, align 8
  call void @finalize_allocatable__Array_1_i32(%array.1.0* %67)
  br label %Finalize_Variable_arr_07

Finalize_Variable_arr_07:                         ; preds = %Finalize_Variable_arr_06
  %68 = getelementptr %string_descriptor, %string_descriptor* %arr_07, i32 0, i32 0
  %69 = load i8*, i8** %68, align 8
  call void @_lfortran_free_alloc(i8* %0, i8* %69)
  br label %Finalize_Variable_arr_08

Finalize_Variable_arr_08:                         ; preds = %Finalize_Variable_arr_07
  %70 = load %array.1.1*, %array.1.1** %arr_08, align 8
  call void @finalize_allocatable__Array_1_str(%array.1.1* %70)
  br label %Finalize_Variable_arr_09

Finalize_Variable_arr_09:                         ; preds = %Finalize_Variable_arr_08
  %71 = bitcast i32* %59 to i8*
  call void @_lfortran_free_alloc(i8* %0, i8* %71)
  ret void
}

declare i8* @_lfortran_malloc_alloc(i8*, i64)

declare i8* @_lfortran_get_default_allocator()

define internal void @finalize_allocatable__Array_1_StructType__tt(%array.1* %0) {
entry:
  %1 = icmp ne %array.1* %0, null
  br i1 %1, label %is_allocated.then, label %is_allocated.else

is_allocated.then:                                ; preds = %entry
  call void @finalize_descriptorArray_Array_1_StructType__tt(%array.1* %0)
  br label %is_allocated.ifcont

is_allocated.else:                                ; preds = %entry
  br label %is_allocated.ifcont

is_allocated.ifcont:                              ; preds = %is_allocated.else, %is_allocated.then
  ret void
}

define internal void @finalize_descriptorArray_Array_1_StructType__tt(%array.1* %0) {
entry:
  %1 = call i8* @_lfortran_get_default_allocator()
  %2 = alloca i32, align 4
  %3 = alloca i64, align 8
  %4 = getelementptr %array.1, %array.1* %0, i32 0, i32 0
  %5 = load %finalize_02.tt*, %finalize_02.tt** %4, align 8
  %6 = icmp ne %finalize_02.tt* %5, null
  br i1 %6, label %is_allocated.then, label %is_allocated.else

is_allocated.then:                                ; preds = %entry
  br label %Calculate_arraySize

Calculate_arraySize:                              ; preds = %is_allocated.then
  %7 = getelementptr %array.1, %array.1* %0, i32 0, i32 8
  %8 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %7, i32 0, i32 0
  %9 = getelementptr %array.1, %array.1* %0, i32 0, i32 3
  %10 = load i8, i8* %9, align 1
  %11 = zext i8 %10 to i32
  store i64 1, i64* %3, align 8
  store i32 0, i32* %2, align 4
  br label %loop.head

loop.head:                                        ; preds = %loop.body, %Calculate_arraySize
  %12 = load i32, i32* %2, align 4
  %13 = icmp slt i32 %12, %11
  br i1 %13, label %loop.body, label %loop.end

loop.body:                                        ; preds = %loop.head
  %14 = load i32, i32* %2, align 4
  %15 = load i64, i64* %3, align 8
  %16 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %8, i32 %14
  %17 = getelementptr %dimension_descriptor, %dimension_descriptor* %16, i32 0, i32 1
  %18 = load i64, i64* %17, align 8
  %19 = mul i64 %15, %18
  store i64 %19, i64* %3, align 8
  %20 = add i32 %14, 1
  store i32 %20, i32* %2, align 4
  br label %loop.head

loop.end:                                         ; preds = %loop.head
  %21 = load i64, i64* %3, align 8
  call void @finalize_array_data_StructType__tt(%finalize_02.tt* %5, i64 %21)
  br label %is_allocated.ifcont

is_allocated.else:                                ; preds = %entry
  br label %is_allocated.ifcont

is_allocated.ifcont:                              ; preds = %is_allocated.else, %loop.end
  %22 = bitcast %finalize_02.tt* %5 to i8*
  call void @_lfortran_free_alloc(i8* %1, i8* %22)
  ret void
}

define internal void @finalize_array_data_StructType__tt(%finalize_02.tt* %0, i64 %1) {
entry:
  %arrSize_iter = alloca i64, align 8
  store i64 -1, i64* %arrSize_iter, align 8
  br label %Finalize_array_of_structs.head

Finalize_array_of_structs.head:                   ; preds = %Finalize_array_of_structs.body, %entry
  %2 = load i64, i64* %arrSize_iter, align 8
  %3 = add i64 %2, 1
  store i64 %3, i64* %arrSize_iter, align 8
  %4 = icmp slt i64 %3, %1
  br i1 %4, label %Finalize_array_of_structs.body, label %Finalize_array_of_structs.end

Finalize_array_of_structs.body:                   ; preds = %Finalize_array_of_structs.head
  %5 = load i64, i64* %arrSize_iter, align 8
  %6 = getelementptr inbounds %finalize_02.tt, %finalize_02.tt* %0, i64 %5
  br label %Finalize_array_of_structs.head

Finalize_array_of_structs.end:                    ; preds = %Finalize_array_of_structs.head
  ret void
}

declare void @_lfortran_free_alloc(i8*, i8*)

define internal void @finalize_allocatable__Array_1_i32(%array.1.0* %0) {
entry:
  %1 = icmp ne %array.1.0* %0, null
  br i1 %1, label %is_allocated.then, label %is_allocated.else

is_allocated.then:                                ; preds = %entry
  call void @finalize_descriptorArray_Array_1_i32(%array.1.0* %0)
  br label %is_allocated.ifcont

is_allocated.else:                                ; preds = %entry
  br label %is_allocated.ifcont

is_allocated.ifcont:                              ; preds = %is_allocated.else, %is_allocated.then
  ret void
}

define internal void @finalize_descriptorArray_Array_1_i32(%array.1.0* %0) {
entry:
  %1 = call i8* @_lfortran_get_default_allocator()
  %2 = getelementptr %array.1.0, %array.1.0* %0, i32 0, i32 0
  %3 = load i32*, i32** %2, align 8
  %4 = bitcast i32* %3 to i8*
  call void @_lfortran_free_alloc(i8* %1, i8* %4)
  ret void
}

define internal void @finalize_allocatable__Array_1_str(%array.1.1* %0) {
entry:
  %1 = icmp ne %array.1.1* %0, null
  br i1 %1, label %is_allocated.then, label %is_allocated.else

is_allocated.then:                                ; preds = %entry
  call void @finalize_descriptorArray_Array_1_str(%array.1.1* %0)
  br label %is_allocated.ifcont

is_allocated.else:                                ; preds = %entry
  br label %is_allocated.ifcont

is_allocated.ifcont:                              ; preds = %is_allocated.else, %is_allocated.then
  ret void
}

define internal void @finalize_descriptorArray_Array_1_str(%array.1.1* %0) {
entry:
  %1 = call i8* @_lfortran_get_default_allocator()
  %2 = getelementptr %array.1.1, %array.1.1* %0, i32 0, i32 0
  %3 = load %string_descriptor*, %string_descriptor** %2, align 8
  %4 = getelementptr %string_descriptor, %string_descriptor* %3, i32 0, i32 0
  %5 = load i8*, i8** %4, align 8
  call void @_lfortran_free_alloc(i8* %1, i8* %5)
  ret void
}

declare void @_lpython_call_initial_functions(i32, i8**)

declare void @_lfortran_internal_alloc_finalize()
