; LLVM IR from VastoLorde95/Competitive-Programming :: SPOJ/DP Level 3/Help Bob (bob)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [33000 x double], align 16
  %3 = alloca [15 x [2 x i32]], align 16
  %4 = alloca [15 x [15 x i32]], align 16
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 264000, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 120, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 900, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5)
  br label %16

16:                                               ; preds = %193, %0
  %17 = load i32, ptr %5, align 4, !tbaa !5
  %18 = icmp ne i32 %17, 0
  br i1 %18, label %19, label %197

19:                                               ; preds = %16
  %20 = load i32, ptr %5, align 4, !tbaa !5
  %21 = shl i32 1, %20
  store i32 %21, ptr %6, align 4, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %30, %19
  %23 = load i32, ptr %7, align 4, !tbaa !5
  %24 = load i32, ptr %6, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %26, label %33

26:                                               ; preds = %22
  %27 = load i32, ptr %7, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [33000 x double], ptr %2, i64 0, i64 %28
  store double 1.000000e+20, ptr %29, align 8, !tbaa !9
  br label %30

30:                                               ; preds = %26
  %31 = load i32, ptr %7, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %7, align 4, !tbaa !5
  br label %22, !llvm.loop !11

33:                                               ; preds = %22
  %34 = getelementptr inbounds [15 x [15 x i32]], ptr %4, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %34, i8 0, i64 900, i1 false)
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %67, %33
  %36 = load i32, ptr %7, align 4, !tbaa !5
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %39, label %70

39:                                               ; preds = %35
  %40 = load i32, ptr %7, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [15 x [2 x i32]], ptr %3, i64 0, i64 %41
  %43 = getelementptr inbounds [2 x i32], ptr %42, i64 0, i64 0
  %44 = load i32, ptr %7, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [15 x [2 x i32]], ptr %3, i64 0, i64 %45
  %47 = getelementptr inbounds [2 x i32], ptr %46, i64 0, i64 1
  %48 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %43, ptr noundef %47, ptr noundef %10)
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %63, %39
  %50 = load i32, ptr %8, align 4, !tbaa !5
  %51 = load i32, ptr %10, align 4, !tbaa !5
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %53, label %66

53:                                               ; preds = %49
  %54 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %11)
  %55 = load i32, ptr %7, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [15 x [15 x i32]], ptr %4, i64 0, i64 %56
  %58 = load i32, ptr %11, align 4, !tbaa !5
  %59 = sub nsw i32 %58, 1
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [15 x i32], ptr %57, i64 0, i64 %60
  %62 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %61)
  br label %63

63:                                               ; preds = %53
  %64 = load i32, ptr %8, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %8, align 4, !tbaa !5
  br label %49, !llvm.loop !13

66:                                               ; preds = %49
  br label %67

67:                                               ; preds = %66
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %7, align 4, !tbaa !5
  br label %35, !llvm.loop !14

70:                                               ; preds = %35
  store double 1.000000e+20, ptr %12, align 8, !tbaa !9
  %71 = getelementptr inbounds [33000 x double], ptr %2, i64 0, i64 0
  store double 0.000000e+00, ptr %71, align 16, !tbaa !9
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %190, %70
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %76, label %193

76:                                               ; preds = %72
  store double 0.000000e+00, ptr %13, align 8, !tbaa !9
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %166, %76
  %78 = load i32, ptr %8, align 4, !tbaa !5
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %81, label %169

81:                                               ; preds = %77
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = load i32, ptr %8, align 4, !tbaa !5
  %84 = shl i32 1, %83
  %85 = and i32 %82, %84
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %96

87:                                               ; preds = %81
  %88 = load i32, ptr %8, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [15 x [2 x i32]], ptr %3, i64 0, i64 %89
  %91 = getelementptr inbounds [2 x i32], ptr %90, i64 0, i64 1
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = sitofp i32 %92 to double
  %94 = load double, ptr %13, align 8, !tbaa !9
  %95 = fadd double %94, %93
  store double %95, ptr %13, align 8, !tbaa !9
  br label %165

96:                                               ; preds = %81
  store double 1.000000e+00, ptr %14, align 8, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %121, %96
  %98 = load i32, ptr %9, align 4, !tbaa !5
  %99 = load i32, ptr %5, align 4, !tbaa !5
  %100 = icmp slt i32 %98, %99
  br i1 %100, label %101, label %124

101:                                              ; preds = %97
  %102 = load i32, ptr %7, align 4, !tbaa !5
  %103 = load i32, ptr %9, align 4, !tbaa !5
  %104 = shl i32 1, %103
  %105 = and i32 %102, %104
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %120

107:                                              ; preds = %101
  %108 = load i32, ptr %9, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [15 x [15 x i32]], ptr %4, i64 0, i64 %109
  %111 = load i32, ptr %8, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [15 x i32], ptr %110, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = sub nsw i32 100, %114
  %116 = sitofp i32 %115 to double
  %117 = fdiv double %116, 1.000000e+02
  %118 = load double, ptr %14, align 8, !tbaa !9
  %119 = fmul double %118, %117
  store double %119, ptr %14, align 8, !tbaa !9
  br label %120

120:                                              ; preds = %107, %101
  br label %121

121:                                              ; preds = %120
  %122 = load i32, ptr %9, align 4, !tbaa !5
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %9, align 4, !tbaa !5
  br label %97, !llvm.loop !15

124:                                              ; preds = %97
  %125 = load i32, ptr %7, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [33000 x double], ptr %2, i64 0, i64 %126
  %128 = load double, ptr %127, align 8, !tbaa !9
  %129 = load i32, ptr %8, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [15 x [2 x i32]], ptr %3, i64 0, i64 %130
  %132 = getelementptr inbounds [2 x i32], ptr %131, i64 0, i64 0
  %133 = load i32, ptr %132, align 8, !tbaa !5
  %134 = sitofp i32 %133 to double
  %135 = load double, ptr %14, align 8, !tbaa !9
  %136 = call double @llvm.fmuladd.f64(double %134, double %135, double %128)
  %137 = load i32, ptr %7, align 4, !tbaa !5
  %138 = load i32, ptr %8, align 4, !tbaa !5
  %139 = shl i32 1, %138
  %140 = or i32 %137, %139
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [33000 x double], ptr %2, i64 0, i64 %141
  %143 = load double, ptr %142, align 8, !tbaa !9
  %144 = fcmp olt double %136, %143
  br i1 %144, label %145, label %164

145:                                              ; preds = %124
  %146 = load i32, ptr %7, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [33000 x double], ptr %2, i64 0, i64 %147
  %149 = load double, ptr %148, align 8, !tbaa !9
  %150 = load i32, ptr %8, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [15 x [2 x i32]], ptr %3, i64 0, i64 %151
  %153 = getelementptr inbounds [2 x i32], ptr %152, i64 0, i64 0
  %154 = load i32, ptr %153, align 8, !tbaa !5
  %155 = sitofp i32 %154 to double
  %156 = load double, ptr %14, align 8, !tbaa !9
  %157 = call double @llvm.fmuladd.f64(double %155, double %156, double %149)
  %158 = load i32, ptr %7, align 4, !tbaa !5
  %159 = load i32, ptr %8, align 4, !tbaa !5
  %160 = shl i32 1, %159
  %161 = or i32 %158, %160
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [33000 x double], ptr %2, i64 0, i64 %162
  store double %157, ptr %163, align 8, !tbaa !9
  br label %164

164:                                              ; preds = %145, %124
  br label %165

165:                                              ; preds = %164, %87
  br label %166

166:                                              ; preds = %165
  %167 = load i32, ptr %8, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %8, align 4, !tbaa !5
  br label %77, !llvm.loop !16

169:                                              ; preds = %77
  %170 = load i32, ptr %7, align 4, !tbaa !5
  %171 = icmp sgt i32 %170, 0
  br i1 %171, label %172, label %189

172:                                              ; preds = %169
  %173 = load i32, ptr %7, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [33000 x double], ptr %2, i64 0, i64 %174
  %176 = load double, ptr %175, align 8, !tbaa !9
  %177 = load double, ptr %13, align 8, !tbaa !9
  %178 = fdiv double %176, %177
  %179 = load double, ptr %12, align 8, !tbaa !9
  %180 = fcmp olt double %178, %179
  br i1 %180, label %181, label %188

181:                                              ; preds = %172
  %182 = load i32, ptr %7, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [33000 x double], ptr %2, i64 0, i64 %183
  %185 = load double, ptr %184, align 8, !tbaa !9
  %186 = load double, ptr %13, align 8, !tbaa !9
  %187 = fdiv double %185, %186
  store double %187, ptr %12, align 8, !tbaa !9
  br label %188

188:                                              ; preds = %181, %172
  br label %189

189:                                              ; preds = %188, %169
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %7, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %7, align 4, !tbaa !5
  br label %72, !llvm.loop !17

193:                                              ; preds = %72
  %194 = load double, ptr %12, align 8, !tbaa !9
  %195 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, double noundef %194)
  %196 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5)
  br label %16, !llvm.loop !18

197:                                              ; preds = %16
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 900, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 120, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 264000, ptr %2) #5
  ret i32 0
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [33000 x double], align 16
  %2 = alloca [15 x [2 x i32]], align 16
  %3 = alloca [15 x [15 x i32]], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 264000, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 900, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %4)
  %8 = load i32, ptr %4, align 4, !tbaa !5
  %.not83 = icmp eq i32 %8, 0
  br i1 %.not83, label %._crit_edge86, label %.lr.ph85.preheader

.lr.ph85.preheader:                               ; preds = %0
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  %10 = getelementptr inbounds i8, ptr %1, i64 16
  br label %.lr.ph85

.lr.ph85:                                         ; preds = %.lr.ph85.preheader, %._crit_edge81
  %11 = phi i32 [ %114, %._crit_edge81 ], [ %8, %.lr.ph85.preheader ]
  %12 = shl nuw i32 1, %11
  %.not87 = icmp eq i32 %11, 31
  br i1 %.not87, label %._crit_edge.thread, label %.lr.ph.preheader

._crit_edge.thread:                               ; preds = %.lr.ph85
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(900) %3, i8 0, i64 900, i1 false)
  br label %.lr.ph67.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph85
  %min.iters.check = icmp slt i32 %12, 4
  br i1 %min.iters.check, label %.lr.ph, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %13 = and i32 %12, 2147483644
  %n.vec = zext nneg i32 %13 to i64
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %14 = getelementptr inbounds [33000 x double], ptr %1, i64 0, i64 %index
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  store <2 x double> <double 1.000000e+20, double 1.000000e+20>, ptr %14, align 16, !tbaa !9
  store <2 x double> <double 1.000000e+20, double 1.000000e+20>, ptr %15, align 16, !tbaa !9
  %index.next = add nuw i64 %index, 4
  %16 = icmp eq i64 %index.next, %n.vec
  br i1 %16, label %._crit_edge, label %vector.body, !llvm.loop !11

.lr.ph:                                           ; preds = %.lr.ph.preheader
  store double 1.000000e+20, ptr %1, align 16, !tbaa !9
  %exitcond.not = icmp slt i32 %12, 2
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.1, !llvm.loop !15

.lr.ph.1:                                         ; preds = %.lr.ph
  store double 1.000000e+20, ptr %9, align 8, !tbaa !9
  %exitcond.not.1 = icmp eq i32 %11, 1
  br i1 %exitcond.not.1, label %._crit_edge, label %.lr.ph.2, !llvm.loop !15

.lr.ph.2:                                         ; preds = %.lr.ph.1
  store double 1.000000e+20, ptr %10, align 16, !tbaa !9
  br label %._crit_edge

._crit_edge:                                      ; preds = %vector.body, %.lr.ph, %.lr.ph.1, %.lr.ph.2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(900) %3, i8 0, i64 900, i1 false)
  %17 = icmp sgt i32 %11, 0
  br i1 %17, label %.lr.ph67.preheader, label %.preheader59.lr.ph.thread

.lr.ph67.preheader:                               ; preds = %._crit_edge.thread, %._crit_edge
  br label %.lr.ph67

.preheader59.lr.ph.thread:                        ; preds = %._crit_edge
  store double 0.000000e+00, ptr %1, align 16, !tbaa !9
  br label %36

.lr.ph67:                                         ; preds = %.lr.ph67.preheader, %._crit_edge64
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %._crit_edge64 ], [ 0, %.lr.ph67.preheader ]
  %18 = getelementptr inbounds [15 x [2 x i32]], ptr %2, i64 0, i64 %indvars.iv92
  %19 = getelementptr inbounds i8, ptr %18, i64 4
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %18, ptr noundef nonnull %19, ptr noundef nonnull %5)
  %21 = load i32, ptr %5, align 4, !tbaa !5
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph63, label %._crit_edge64

.lr.ph63:                                         ; preds = %.lr.ph67, %.lr.ph63
  %.04861 = phi i32 [ %29, %.lr.ph63 ], [ 0, %.lr.ph67 ]
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %6)
  %24 = load i32, ptr %6, align 4, !tbaa !5
  %25 = add nsw i32 %24, -1
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [15 x [15 x i32]], ptr %3, i64 0, i64 %indvars.iv92, i64 %26
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %27)
  %29 = add nuw nsw i32 %.04861, 1
  %30 = load i32, ptr %5, align 4, !tbaa !5
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %.lr.ph63, label %._crit_edge64, !llvm.loop !16

._crit_edge64:                                    ; preds = %.lr.ph63, %.lr.ph67
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = icmp slt i64 %indvars.iv.next93, %33
  br i1 %34, label %.lr.ph67, label %._crit_edge68, !llvm.loop !17

._crit_edge68:                                    ; preds = %._crit_edge64
  store double 0.000000e+00, ptr %1, align 16, !tbaa !9
  br i1 %.not87, label %._crit_edge81, label %.preheader59.lr.ph

.preheader59.lr.ph:                               ; preds = %._crit_edge68
  %35 = icmp sgt i32 %32, 0
  br i1 %35, label %.preheader59.us.preheader, label %36

36:                                               ; preds = %.preheader59.lr.ph, %.preheader59.lr.ph.thread
  %exitcond100.peel.not = icmp slt i32 %12, 2
  br i1 %exitcond100.peel.not, label %._crit_edge81, label %.preheader59.peel.next.preheader

.preheader59.peel.next.preheader:                 ; preds = %36
  %wide.trip.count99 = zext nneg i32 %12 to i64
  %37 = add nsw i64 %wide.trip.count99, -1
  %xtraiter = and i64 %37, 1
  %38 = icmp eq i32 %11, 1
  br i1 %38, label %._crit_edge81.loopexit124.unr-lcssa, label %.preheader59.peel.next.preheader.new

.preheader59.peel.next.preheader.new:             ; preds = %.preheader59.peel.next.preheader
  %unroll_iter = and i64 %37, -2
  br label %.preheader59.peel.next

.preheader59.us.preheader:                        ; preds = %.preheader59.lr.ph
  %smax115 = call i32 @llvm.smax.i32(i32 %12, i32 1)
  %wide.trip.count116 = zext nneg i32 %smax115 to i64
  %wide.trip.count110 = zext nneg i32 %32 to i64
  %xtraiter128 = and i64 %wide.trip.count110, 1
  %39 = icmp eq i32 %32, 1
  %unroll_iter131 = and i64 %wide.trip.count110, 2147483646
  %lcmp.mod129.not = icmp eq i64 %xtraiter128, 0
  br label %.preheader59.us

.preheader59.us:                                  ; preds = %.preheader59.us.preheader, %47
  %indvars.iv112 = phi i64 [ 0, %.preheader59.us.preheader ], [ %indvars.iv.next113, %47 ]
  %.04580.us = phi double [ 1.000000e+20, %.preheader59.us.preheader ], [ %.146.us, %47 ]
  %40 = getelementptr inbounds [33000 x double], ptr %1, i64 0, i64 %indvars.iv112
  %41 = trunc nuw nsw i64 %indvars.iv112 to i32
  br label %48

42:                                               ; preds = %._crit_edge77.split.us.us
  %43 = load double, ptr %40, align 8, !tbaa !9
  %44 = fdiv double %43, %.144.us.us
  %45 = fcmp olt double %44, %.04580.us
  br i1 %45, label %46, label %47

46:                                               ; preds = %42
  br label %47

47:                                               ; preds = %46, %42, %._crit_edge77.split.us.us
  %.146.us = phi double [ %44, %46 ], [ %.04580.us, %42 ], [ %.04580.us, %._crit_edge77.split.us.us ]
  %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1
  %exitcond117.not = icmp eq i64 %indvars.iv.next113, %wide.trip.count116
  br i1 %exitcond117.not, label %._crit_edge81, label %.preheader59.us, !llvm.loop !18

48:                                               ; preds = %58, %.preheader59.us
  %indvars.iv107 = phi i64 [ %indvars.iv.next108, %58 ], [ 0, %.preheader59.us ]
  %.04375.us.us = phi double [ %.144.us.us, %58 ], [ 0.000000e+00, %.preheader59.us ]
  %49 = trunc nuw nsw i64 %indvars.iv107 to i32
  %50 = shl nuw i32 1, %49
  %51 = and i32 %50, %41
  %.not57.us.us = icmp eq i32 %51, 0
  br i1 %.not57.us.us, label %.preheader.us.us.preheader, label %52

.preheader.us.us.preheader:                       ; preds = %48
  br i1 %39, label %._crit_edge72.us.us.unr-lcssa, label %.preheader.us.us

52:                                               ; preds = %48
  %53 = getelementptr inbounds [15 x [2 x i32]], ptr %2, i64 0, i64 %indvars.iv107, i64 1
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = sitofp i32 %54 to double
  %56 = fadd double %.04375.us.us, %55
  br label %58

57:                                               ; preds = %._crit_edge72.us.us
  store double %94, ptr %97, align 8, !tbaa !9
  br label %58

58:                                               ; preds = %._crit_edge72.us.us, %57, %52
  %.144.us.us = phi double [ %56, %52 ], [ %.04375.us.us, %57 ], [ %.04375.us.us, %._crit_edge72.us.us ]
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %exitcond111.not = icmp eq i64 %indvars.iv.next108, %wide.trip.count110
  br i1 %exitcond111.not, label %._crit_edge77.split.us.us, label %48, !llvm.loop !19

.preheader.us.us:                                 ; preds = %.preheader.us.us.preheader, %79
  %indvars.iv102 = phi i64 [ %indvars.iv.next103.1, %79 ], [ 0, %.preheader.us.us.preheader ]
  %.070.us.us = phi double [ %.1.us.us.1, %79 ], [ 1.000000e+00, %.preheader.us.us.preheader ]
  %niter132 = phi i64 [ %niter132.next.1, %79 ], [ 0, %.preheader.us.us.preheader ]
  %59 = trunc nuw nsw i64 %indvars.iv102 to i32
  %60 = shl nuw i32 1, %59
  %61 = and i32 %60, %41
  %.not58.us.us = icmp eq i32 %61, 0
  br i1 %.not58.us.us, label %.preheader.us.us.1, label %62

62:                                               ; preds = %.preheader.us.us
  %63 = getelementptr inbounds [15 x [15 x i32]], ptr %3, i64 0, i64 %indvars.iv102, i64 %indvars.iv107
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = sub nsw i32 100, %64
  %66 = sitofp i32 %65 to double
  %67 = fdiv double %66, 1.000000e+02
  %68 = fmul double %.070.us.us, %67
  br label %.preheader.us.us.1

.preheader.us.us.1:                               ; preds = %62, %.preheader.us.us
  %.1.us.us = phi double [ %68, %62 ], [ %.070.us.us, %.preheader.us.us ]
  %indvars.iv.next103 = or disjoint i64 %indvars.iv102, 1
  %69 = trunc nuw nsw i64 %indvars.iv.next103 to i32
  %70 = shl nuw i32 1, %69
  %71 = and i32 %70, %41
  %.not58.us.us.1 = icmp eq i32 %71, 0
  br i1 %.not58.us.us.1, label %79, label %72

72:                                               ; preds = %.preheader.us.us.1
  %73 = getelementptr inbounds [15 x [15 x i32]], ptr %3, i64 0, i64 %indvars.iv.next103, i64 %indvars.iv107
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = sub nsw i32 100, %74
  %76 = sitofp i32 %75 to double
  %77 = fdiv double %76, 1.000000e+02
  %78 = fmul double %.1.us.us, %77
  br label %79

79:                                               ; preds = %72, %.preheader.us.us.1
  %.1.us.us.1 = phi double [ %78, %72 ], [ %.1.us.us, %.preheader.us.us.1 ]
  %indvars.iv.next103.1 = add nuw nsw i64 %indvars.iv102, 2
  %niter132.next.1 = add i64 %niter132, 2
  %niter132.ncmp.1 = icmp eq i64 %niter132.next.1, %unroll_iter131
  br i1 %niter132.ncmp.1, label %._crit_edge72.us.us.unr-lcssa, label %.preheader.us.us, !llvm.loop !20

._crit_edge72.us.us.unr-lcssa:                    ; preds = %79, %.preheader.us.us.preheader
  %.1.us.us.lcssa.ph = phi double [ poison, %.preheader.us.us.preheader ], [ %.1.us.us.1, %79 ]
  %indvars.iv102.unr = phi i64 [ 0, %.preheader.us.us.preheader ], [ %indvars.iv.next103.1, %79 ]
  %.070.us.us.unr = phi double [ 1.000000e+00, %.preheader.us.us.preheader ], [ %.1.us.us.1, %79 ]
  br i1 %lcmp.mod129.not, label %._crit_edge72.us.us, label %.preheader.us.us.epil

.preheader.us.us.epil:                            ; preds = %._crit_edge72.us.us.unr-lcssa
  %80 = trunc nuw nsw i64 %indvars.iv102.unr to i32
  %81 = shl nuw i32 1, %80
  %82 = and i32 %81, %41
  %.not58.us.us.epil = icmp eq i32 %82, 0
  br i1 %.not58.us.us.epil, label %._crit_edge72.us.us, label %83

83:                                               ; preds = %.preheader.us.us.epil
  %84 = getelementptr inbounds [15 x [15 x i32]], ptr %3, i64 0, i64 %indvars.iv102.unr, i64 %indvars.iv107
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = sub nsw i32 100, %85
  %87 = sitofp i32 %86 to double
  %88 = fdiv double %87, 1.000000e+02
  %89 = fmul double %.070.us.us.unr, %88
  br label %._crit_edge72.us.us

._crit_edge72.us.us:                              ; preds = %.preheader.us.us.epil, %83, %._crit_edge72.us.us.unr-lcssa
  %.1.us.us.lcssa = phi double [ %.1.us.us.lcssa.ph, %._crit_edge72.us.us.unr-lcssa ], [ %89, %83 ], [ %.070.us.us.unr, %.preheader.us.us.epil ]
  %90 = load double, ptr %40, align 8, !tbaa !9
  %91 = getelementptr inbounds [15 x [2 x i32]], ptr %2, i64 0, i64 %indvars.iv107
  %92 = load i32, ptr %91, align 8, !tbaa !5
  %93 = sitofp i32 %92 to double
  %94 = call double @llvm.fmuladd.f64(double %93, double %.1.us.us.lcssa, double %90)
  %95 = or i32 %50, %41
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [33000 x double], ptr %1, i64 0, i64 %96
  %98 = load double, ptr %97, align 8, !tbaa !9
  %99 = fcmp olt double %94, %98
  br i1 %99, label %57, label %58

._crit_edge77.split.us.us:                        ; preds = %58
  %.not56.us = icmp eq i64 %indvars.iv112, 0
  br i1 %.not56.us, label %47, label %42

.preheader59.peel.next:                           ; preds = %.preheader59.peel.next, %.preheader59.peel.next.preheader.new
  %indvars.iv95 = phi i64 [ 1, %.preheader59.peel.next.preheader.new ], [ %indvars.iv.next96.1, %.preheader59.peel.next ]
  %.04580 = phi double [ 1.000000e+20, %.preheader59.peel.next.preheader.new ], [ %.146.1, %.preheader59.peel.next ]
  %niter = phi i64 [ 0, %.preheader59.peel.next.preheader.new ], [ %niter.next.1, %.preheader59.peel.next ]
  %100 = getelementptr inbounds [33000 x double], ptr %1, i64 0, i64 %indvars.iv95
  %101 = load double, ptr %100, align 8, !tbaa !9
  %102 = fdiv double %101, 0.000000e+00
  %103 = fcmp olt double %102, %.04580
  %.146 = select i1 %103, double %102, double %.04580
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %104 = getelementptr inbounds [33000 x double], ptr %1, i64 0, i64 %indvars.iv.next96
  %105 = load double, ptr %104, align 8, !tbaa !9
  %106 = fdiv double %105, 0.000000e+00
  %107 = fcmp olt double %106, %.146
  %.146.1 = select i1 %107, double %106, double %.146
  %indvars.iv.next96.1 = add nuw nsw i64 %indvars.iv95, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge81.loopexit124.unr-lcssa, label %.preheader59.peel.next, !llvm.loop !21

._crit_edge81.loopexit124.unr-lcssa:              ; preds = %.preheader59.peel.next, %.preheader59.peel.next.preheader
  %.146.lcssa.ph = phi double [ poison, %.preheader59.peel.next.preheader ], [ %.146.1, %.preheader59.peel.next ]
  %indvars.iv95.unr = phi i64 [ 1, %.preheader59.peel.next.preheader ], [ %indvars.iv.next96.1, %.preheader59.peel.next ]
  %.04580.unr = phi double [ 1.000000e+20, %.preheader59.peel.next.preheader ], [ %.146.1, %.preheader59.peel.next ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge81, label %.preheader59.peel.next.epil

.preheader59.peel.next.epil:                      ; preds = %._crit_edge81.loopexit124.unr-lcssa
  %108 = getelementptr inbounds [33000 x double], ptr %1, i64 0, i64 %indvars.iv95.unr
  %109 = load double, ptr %108, align 8, !tbaa !9
  %110 = fdiv double %109, 0.000000e+00
  %111 = fcmp olt double %110, %.04580.unr
  %.146.epil = select i1 %111, double %110, double %.04580.unr
  br label %._crit_edge81

._crit_edge81:                                    ; preds = %.preheader59.peel.next.epil, %._crit_edge81.loopexit124.unr-lcssa, %47, %36, %._crit_edge68
  %.045.lcssa = phi double [ 1.000000e+20, %._crit_edge68 ], [ 1.000000e+20, %36 ], [ %.146.us, %47 ], [ %.146.lcssa.ph, %._crit_edge81.loopexit124.unr-lcssa ], [ %.146.epil, %.preheader59.peel.next.epil ]
  %112 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %.045.lcssa)
  %113 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %4)
  %114 = load i32, ptr %4, align 4, !tbaa !5
  %.not = icmp eq i32 %114, 0
  br i1 %.not, label %._crit_edge86, label %.lr.ph85, !llvm.loop !23

._crit_edge86:                                    ; preds = %._crit_edge81, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 900, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 264000, ptr nonnull %1) #6
  ret i32 0
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #5

attributes #0 = { mustprogress nofree norecurse nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !12, !14, !13}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12, !22}
!22 = !{!"llvm.loop.peeled.count", i32 1}
!23 = distinct !{!23, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass