; ModuleID = 'LFortran'
source_filename = "LFortran"

@0 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@1 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@2 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@3 = private unnamed_addr constant [11 x i8] c"ERROR STOP\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
@6 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@7 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@8 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@9 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@12 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@13 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@14 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@15 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@16 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@17 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@18 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@19 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@20 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@21 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@22 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@23 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@24 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@25 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@26 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@27 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@28 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@29 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@30 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@31 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@32 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@33 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@34 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@35 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@36 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@37 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@38 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@39 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@40 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@41 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@42 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@43 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@44 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@45 = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@46 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@47 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1

define i32 @main(i32 %0, i8** %1) {
.entry:
  %i = alloca i32, align 4
  %j = alloca i32, align 4
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  %a = alloca [3 x double], align 8
  %b = alloca [4 x double], align 8
  %c = alloca [4 x double], align 8
  %i1 = alloca i32, align 4
  %j2 = alloca i32, align 4
  store i32 0, i32* %i1, align 4
  br label %loop.head

loop.head:                                        ; preds = %loop.body, %.entry
  %2 = load i32, i32* %i1, align 4
  %3 = add i32 %2, 1
  %4 = icmp sle i32 %3, 3
  br i1 %4, label %loop.body, label %loop.end

loop.body:                                        ; preds = %loop.head
  %5 = load i32, i32* %i1, align 4
  %6 = add i32 %5, 1
  store i32 %6, i32* %i1, align 4
  %7 = load i32, i32* %i1, align 4
  %8 = sub i32 %7, 1
  %9 = mul i32 1, %8
  %10 = add i32 0, %9
  %11 = getelementptr [3 x double], [3 x double]* %a, i32 0, i32 %10
  %12 = load i32, i32* %i1, align 4
  %13 = add i32 %12, 10
  %14 = sitofp i32 %13 to double
  store double %14, double* %11, align 8
  br label %loop.head

loop.end:                                         ; preds = %loop.head
  %15 = getelementptr [3 x double], [3 x double]* %a, i32 0, i32 0
  %16 = load double, double* %15, align 8
  %17 = fcmp une double %16, 1.100000e+01
  br i1 %17, label %then, label %else

then:                                             ; preds = %loop.end
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @2, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @0, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @1, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont

else:                                             ; preds = %loop.end
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  %18 = getelementptr [3 x double], [3 x double]* %a, i32 0, i32 1
  %19 = load double, double* %18, align 8
  %20 = fcmp une double %19, 1.200000e+01
  br i1 %20, label %then3, label %else4

then3:                                            ; preds = %ifcont
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont5

else4:                                            ; preds = %ifcont
  br label %ifcont5

ifcont5:                                          ; preds = %else4, %then3
  %21 = getelementptr [3 x double], [3 x double]* %a, i32 0, i32 2
  %22 = load double, double* %21, align 8
  %23 = fcmp une double %22, 1.300000e+01
  br i1 %23, label %then6, label %else7

then6:                                            ; preds = %ifcont5
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @8, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @6, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @7, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont8

else7:                                            ; preds = %ifcont5
  br label %ifcont8

ifcont8:                                          ; preds = %else7, %then6
  store i32 10, i32* %i1, align 4
  br label %loop.head9

loop.head9:                                       ; preds = %loop.body10, %ifcont8
  %24 = load i32, i32* %i1, align 4
  %25 = add i32 %24, 1
  %26 = icmp sle i32 %25, 14
  br i1 %26, label %loop.body10, label %loop.end11

loop.body10:                                      ; preds = %loop.head9
  %27 = load i32, i32* %i1, align 4
  %28 = add i32 %27, 1
  store i32 %28, i32* %i1, align 4
  %29 = load i32, i32* %i1, align 4
  %30 = sub i32 %29, 10
  %31 = sub i32 %30, 1
  %32 = mul i32 1, %31
  %33 = add i32 0, %32
  %34 = getelementptr [4 x double], [4 x double]* %b, i32 0, i32 %33
  %35 = load i32, i32* %i1, align 4
  %36 = sitofp i32 %35 to double
  store double %36, double* %34, align 8
  br label %loop.head9

loop.end11:                                       ; preds = %loop.head9
  %37 = getelementptr [4 x double], [4 x double]* %b, i32 0, i32 0
  %38 = load double, double* %37, align 8
  %39 = fcmp une double %38, 1.100000e+01
  br i1 %39, label %then12, label %else13

then12:                                           ; preds = %loop.end11
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @9, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont14

else13:                                           ; preds = %loop.end11
  br label %ifcont14

ifcont14:                                         ; preds = %else13, %then12
  %40 = getelementptr [4 x double], [4 x double]* %b, i32 0, i32 1
  %41 = load double, double* %40, align 8
  %42 = fcmp une double %41, 1.200000e+01
  br i1 %42, label %then15, label %else16

then15:                                           ; preds = %ifcont14
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @14, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @12, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @13, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont17

else16:                                           ; preds = %ifcont14
  br label %ifcont17

ifcont17:                                         ; preds = %else16, %then15
  %43 = getelementptr [4 x double], [4 x double]* %b, i32 0, i32 2
  %44 = load double, double* %43, align 8
  %45 = fcmp une double %44, 1.300000e+01
  br i1 %45, label %then18, label %else19

then18:                                           ; preds = %ifcont17
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @17, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @15, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @16, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont20

else19:                                           ; preds = %ifcont17
  br label %ifcont20

ifcont20:                                         ; preds = %else19, %then18
  %46 = getelementptr [4 x double], [4 x double]* %b, i32 0, i32 3
  %47 = load double, double* %46, align 8
  %48 = fcmp une double %47, 1.400000e+01
  br i1 %48, label %then21, label %else22

then21:                                           ; preds = %ifcont20
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @20, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @18, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @19, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont23

else22:                                           ; preds = %ifcont20
  br label %ifcont23

ifcont23:                                         ; preds = %else22, %then21
  store i32 0, i32* %i1, align 4
  br label %loop.head24

loop.head24:                                      ; preds = %loop.body25, %ifcont23
  %49 = load i32, i32* %i1, align 4
  %50 = add i32 %49, 1
  %51 = icmp sle i32 %50, 3
  br i1 %51, label %loop.body25, label %loop.end26

loop.body25:                                      ; preds = %loop.head24
  %52 = load i32, i32* %i1, align 4
  %53 = add i32 %52, 1
  store i32 %53, i32* %i1, align 4
  %54 = load i32, i32* %i1, align 4
  %55 = sub i32 %54, 1
  %56 = mul i32 1, %55
  %57 = add i32 0, %56
  %58 = getelementptr [4 x double], [4 x double]* %b, i32 0, i32 %57
  %59 = load i32, i32* %i1, align 4
  %60 = sub i32 %59, 1
  %61 = mul i32 1, %60
  %62 = add i32 0, %61
  %63 = getelementptr [3 x double], [3 x double]* %a, i32 0, i32 %62
  %64 = load double, double* %63, align 8
  %65 = fsub double %64, 1.000000e+01
  store double %65, double* %58, align 8
  br label %loop.head24

loop.end26:                                       ; preds = %loop.head24
  %66 = getelementptr [4 x double], [4 x double]* %b, i32 0, i32 0
  %67 = load double, double* %66, align 8
  %68 = fcmp une double %67, 1.000000e+00
  br i1 %68, label %then27, label %else28

then27:                                           ; preds = %loop.end26
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @23, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @21, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @22, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont29

else28:                                           ; preds = %loop.end26
  br label %ifcont29

ifcont29:                                         ; preds = %else28, %then27
  %69 = getelementptr [4 x double], [4 x double]* %b, i32 0, i32 1
  %70 = load double, double* %69, align 8
  %71 = fcmp une double %70, 2.000000e+00
  br i1 %71, label %then30, label %else31

then30:                                           ; preds = %ifcont29
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @26, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @24, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @25, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont32

else31:                                           ; preds = %ifcont29
  br label %ifcont32

ifcont32:                                         ; preds = %else31, %then30
  %72 = getelementptr [4 x double], [4 x double]* %b, i32 0, i32 2
  %73 = load double, double* %72, align 8
  %74 = fcmp une double %73, 3.000000e+00
  br i1 %74, label %then33, label %else34

then33:                                           ; preds = %ifcont32
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @29, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @27, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @28, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont35

else34:                                           ; preds = %ifcont32
  br label %ifcont35

ifcont35:                                         ; preds = %else34, %then33
  %75 = getelementptr [4 x double], [4 x double]* %b, i32 0, i32 3
  %76 = getelementptr [4 x double], [4 x double]* %b, i32 0, i32 0
  %77 = load double, double* %76, align 8
  %78 = getelementptr [4 x double], [4 x double]* %b, i32 0, i32 1
  %79 = load double, double* %78, align 8
  %80 = fadd double %77, %79
  %81 = getelementptr [4 x double], [4 x double]* %b, i32 0, i32 2
  %82 = load double, double* %81, align 8
  %83 = fadd double %80, %82
  %84 = getelementptr [3 x double], [3 x double]* %a, i32 0, i32 0
  %85 = load double, double* %84, align 8
  %86 = fadd double %83, %85
  store double %86, double* %75, align 8
  %87 = getelementptr [4 x double], [4 x double]* %b, i32 0, i32 3
  %88 = load double, double* %87, align 8
  %89 = fcmp une double %88, 1.700000e+01
  br i1 %89, label %then36, label %else37

then36:                                           ; preds = %ifcont35
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @32, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @30, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @31, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont38

else37:                                           ; preds = %ifcont35
  br label %ifcont38

ifcont38:                                         ; preds = %else37, %then36
  %90 = getelementptr [4 x double], [4 x double]* %b, i32 0, i32 3
  %91 = getelementptr [3 x double], [3 x double]* %a, i32 0, i32 0
  %92 = load double, double* %91, align 8
  store double %92, double* %90, align 8
  %93 = getelementptr [4 x double], [4 x double]* %b, i32 0, i32 3
  %94 = load double, double* %93, align 8
  %95 = fcmp une double %94, 1.100000e+01
  br i1 %95, label %then39, label %else40

then39:                                           ; preds = %ifcont38
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @35, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @33, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @34, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont41

else40:                                           ; preds = %ifcont38
  br label %ifcont41

ifcont41:                                         ; preds = %else40, %then39
  store i32 0, i32* %i1, align 4
  br label %loop.head42

loop.head42:                                      ; preds = %loop.end46, %ifcont41
  %96 = load i32, i32* %i1, align 4
  %97 = add i32 %96, 1
  %98 = icmp sle i32 %97, 2
  br i1 %98, label %loop.body43, label %loop.end47

loop.body43:                                      ; preds = %loop.head42
  %99 = load i32, i32* %i1, align 4
  %100 = add i32 %99, 1
  store i32 %100, i32* %i1, align 4
  store i32 0, i32* %j2, align 4
  br label %loop.head44

loop.head44:                                      ; preds = %loop.body45, %loop.body43
  %101 = load i32, i32* %j2, align 4
  %102 = add i32 %101, 1
  %103 = icmp sle i32 %102, 2
  br i1 %103, label %loop.body45, label %loop.end46

loop.body45:                                      ; preds = %loop.head44
  %104 = load i32, i32* %j2, align 4
  %105 = add i32 %104, 1
  store i32 %105, i32* %j2, align 4
  %106 = load i32, i32* %i1, align 4
  %107 = load i32, i32* %j2, align 4
  %108 = sub i32 %106, 1
  %109 = mul i32 1, %108
  %110 = add i32 0, %109
  %111 = sub i32 %107, 1
  %112 = mul i32 2, %111
  %113 = add i32 %110, %112
  %114 = getelementptr [4 x double], [4 x double]* %c, i32 0, i32 %113
  %115 = load i32, i32* %i1, align 4
  %116 = load i32, i32* %j2, align 4
  %117 = add i32 %115, %116
  %118 = add i32 %117, 10
  %119 = sitofp i32 %118 to double
  store double %119, double* %114, align 8
  br label %loop.head44

loop.end46:                                       ; preds = %loop.head44
  br label %loop.head42

loop.end47:                                       ; preds = %loop.head42
  %120 = getelementptr [4 x double], [4 x double]* %c, i32 0, i32 0
  %121 = load double, double* %120, align 8
  %122 = fcmp une double %121, 1.200000e+01
  br i1 %122, label %then48, label %else49

then48:                                           ; preds = %loop.end47
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @38, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @36, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @37, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont50

else49:                                           ; preds = %loop.end47
  br label %ifcont50

ifcont50:                                         ; preds = %else49, %then48
  %123 = getelementptr [4 x double], [4 x double]* %c, i32 0, i32 2
  %124 = load double, double* %123, align 8
  %125 = fcmp une double %124, 1.300000e+01
  br i1 %125, label %then51, label %else52

then51:                                           ; preds = %ifcont50
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @41, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @39, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @40, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont53

else52:                                           ; preds = %ifcont50
  br label %ifcont53

ifcont53:                                         ; preds = %else52, %then51
  %126 = getelementptr [4 x double], [4 x double]* %c, i32 0, i32 1
  %127 = load double, double* %126, align 8
  %128 = fcmp une double %127, 1.300000e+01
  br i1 %128, label %then54, label %else55

then54:                                           ; preds = %ifcont53
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @44, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @42, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @43, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont56

else55:                                           ; preds = %ifcont53
  br label %ifcont56

ifcont56:                                         ; preds = %else55, %then54
  %129 = getelementptr [4 x double], [4 x double]* %c, i32 0, i32 3
  %130 = load double, double* %129, align 8
  %131 = fcmp une double %130, 1.400000e+01
  br i1 %131, label %then57, label %else58

then57:                                           ; preds = %ifcont56
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @47, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @45, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @46, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont59

else58:                                           ; preds = %ifcont56
  br label %ifcont59

ifcont59:                                         ; preds = %else58, %then57
  call void @_lpython_free_argv()
  br label %return

return:                                           ; preds = %ifcont59
  ret i32 0
}

declare void @_lpython_call_initial_functions(i32, i8**)

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

declare void @exit(i32)

declare void @_lpython_free_argv()
