; LLVM IR from ravireddy07/cpp-book :: src/AtCoder (increment-of-coins)

; 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"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::_Setprecision" = type { i32 }

@dp = external dso_local global [102 x [102 x [102 x double]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::_Setprecision", align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %17
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [102 x [102 x double]], ptr %18, i64 0, i64 %20
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [102 x double], ptr %21, i64 0, i64 %23
  store double 1.000000e+00, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %155, %0
  %26 = load i32, ptr %5, align 4, !tbaa !5
  %27 = icmp slt i32 %26, 100
  br i1 %27, label %29, label %28

28:                                               ; preds = %25
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %158

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %151, %29
  %31 = load i32, ptr %7, align 4, !tbaa !5
  %32 = icmp slt i32 %31, 100
  br i1 %32, label %34, label %33

33:                                               ; preds = %30
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %154

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %147, %34
  %36 = load i32, ptr %8, align 4, !tbaa !5
  %37 = icmp slt i32 %36, 100
  br i1 %37, label %39, label %38

38:                                               ; preds = %35
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %150

39:                                               ; preds = %35
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = load i32, ptr %7, align 4, !tbaa !5
  %42 = add nsw i32 %40, %41
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = add nsw i32 %42, %43
  %45 = icmp eq i32 %44, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %39
  br label %147

47:                                               ; preds = %39
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = sitofp i32 %48 to double
  %50 = fmul double 1.000000e+00, %49
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %52
  %54 = load i32, ptr %7, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [102 x [102 x double]], ptr %53, i64 0, i64 %55
  %57 = load i32, ptr %8, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [102 x double], ptr %56, i64 0, i64 %58
  %60 = load double, ptr %59, align 8, !tbaa !9
  %61 = fmul double %50, %60
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = add nsw i32 %62, %63
  %65 = load i32, ptr %8, align 4, !tbaa !5
  %66 = add nsw i32 %64, %65
  %67 = sitofp i32 %66 to double
  %68 = fdiv double %61, %67
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %71
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [102 x [102 x double]], ptr %72, i64 0, i64 %74
  %76 = load i32, ptr %8, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [102 x double], ptr %75, i64 0, i64 %77
  %79 = load double, ptr %78, align 8, !tbaa !9
  %80 = fadd double %79, %68
  store double %80, ptr %78, align 8, !tbaa !9
  %81 = load i32, ptr %7, align 4, !tbaa !5
  %82 = sitofp i32 %81 to double
  %83 = fmul double 1.000000e+00, %82
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %85
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [102 x [102 x double]], ptr %86, i64 0, i64 %88
  %90 = load i32, ptr %8, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [102 x double], ptr %89, i64 0, i64 %91
  %93 = load double, ptr %92, align 8, !tbaa !9
  %94 = fmul double %83, %93
  %95 = load i32, ptr %5, align 4, !tbaa !5
  %96 = load i32, ptr %7, align 4, !tbaa !5
  %97 = add nsw i32 %95, %96
  %98 = load i32, ptr %8, align 4, !tbaa !5
  %99 = add nsw i32 %97, %98
  %100 = sitofp i32 %99 to double
  %101 = fdiv double %94, %100
  %102 = load i32, ptr %5, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %103
  %105 = load i32, ptr %7, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [102 x [102 x double]], ptr %104, i64 0, i64 %107
  %109 = load i32, ptr %8, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [102 x double], ptr %108, i64 0, i64 %110
  %112 = load double, ptr %111, align 8, !tbaa !9
  %113 = fadd double %112, %101
  store double %113, ptr %111, align 8, !tbaa !9
  %114 = load i32, ptr %8, align 4, !tbaa !5
  %115 = sitofp i32 %114 to double
  %116 = fmul double 1.000000e+00, %115
  %117 = load i32, ptr %5, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %118
  %120 = load i32, ptr %7, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [102 x [102 x double]], ptr %119, i64 0, i64 %121
  %123 = load i32, ptr %8, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [102 x double], ptr %122, i64 0, i64 %124
  %126 = load double, ptr %125, align 8, !tbaa !9
  %127 = fmul double %116, %126
  %128 = load i32, ptr %5, align 4, !tbaa !5
  %129 = load i32, ptr %7, align 4, !tbaa !5
  %130 = add nsw i32 %128, %129
  %131 = load i32, ptr %8, align 4, !tbaa !5
  %132 = add nsw i32 %130, %131
  %133 = sitofp i32 %132 to double
  %134 = fdiv double %127, %133
  %135 = load i32, ptr %5, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %136
  %138 = load i32, ptr %7, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [102 x [102 x double]], ptr %137, i64 0, i64 %139
  %141 = load i32, ptr %8, align 4, !tbaa !5
  %142 = add nsw i32 %141, 1
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [102 x double], ptr %140, i64 0, i64 %143
  %145 = load double, ptr %144, align 8, !tbaa !9
  %146 = fadd double %145, %134
  store double %146, ptr %144, align 8, !tbaa !9
  br label %147

147:                                              ; preds = %47, %46
  %148 = load i32, ptr %8, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %8, align 4, !tbaa !5
  br label %35, !llvm.loop !11

150:                                              ; preds = %38
  br label %151

151:                                              ; preds = %150
  %152 = load i32, ptr %7, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %7, align 4, !tbaa !5
  br label %30, !llvm.loop !13

154:                                              ; preds = %33
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %5, align 4, !tbaa !5
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %5, align 4, !tbaa !5
  br label %25, !llvm.loop !14

158:                                              ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store double 0.000000e+00, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %159

159:                                              ; preds = %211, %158
  %160 = load i32, ptr %10, align 4, !tbaa !5
  %161 = icmp slt i32 %160, 100
  br i1 %161, label %163, label %162

162:                                              ; preds = %159
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %214

163:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %164

164:                                              ; preds = %207, %163
  %165 = load i32, ptr %11, align 4, !tbaa !5
  %166 = icmp slt i32 %165, 100
  br i1 %166, label %168, label %167

167:                                              ; preds = %164
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %210

168:                                              ; preds = %164
  %169 = load i32, ptr %10, align 4, !tbaa !5
  %170 = add nsw i32 100, %169
  %171 = load i32, ptr %11, align 4, !tbaa !5
  %172 = add nsw i32 %170, %171
  %173 = load i32, ptr %2, align 4, !tbaa !5
  %174 = sub nsw i32 %172, %173
  %175 = load i32, ptr %3, align 4, !tbaa !5
  %176 = sub nsw i32 %174, %175
  %177 = load i32, ptr %4, align 4, !tbaa !5
  %178 = sub nsw i32 %176, %177
  %179 = sitofp i32 %178 to double
  %180 = load i32, ptr %10, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %181
  %183 = load i32, ptr %11, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [102 x [102 x double]], ptr %182, i64 0, i64 %184
  %186 = getelementptr inbounds [102 x double], ptr %185, i64 0, i64 100
  %187 = load double, ptr %186, align 16, !tbaa !9
  %188 = load i32, ptr %10, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %189
  %191 = getelementptr inbounds [102 x [102 x double]], ptr %190, i64 0, i64 100
  %192 = load i32, ptr %11, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [102 x double], ptr %191, i64 0, i64 %193
  %195 = load double, ptr %194, align 8, !tbaa !9
  %196 = fadd double %187, %195
  %197 = load i32, ptr %10, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [102 x [102 x double]], ptr getelementptr inbounds ([102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 100), i64 0, i64 %198
  %200 = load i32, ptr %11, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [102 x double], ptr %199, i64 0, i64 %201
  %203 = load double, ptr %202, align 8, !tbaa !9
  %204 = fadd double %196, %203
  %205 = load double, ptr %9, align 8, !tbaa !9
  %206 = call double @llvm.fmuladd.f64(double %179, double %204, double %205)
  store double %206, ptr %9, align 8, !tbaa !9
  br label %207

207:                                              ; preds = %168
  %208 = load i32, ptr %11, align 4, !tbaa !5
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %11, align 4, !tbaa !5
  br label %164, !llvm.loop !15

210:                                              ; preds = %167
  br label %211

211:                                              ; preds = %210
  %212 = load i32, ptr %10, align 4, !tbaa !5
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %10, align 4, !tbaa !5
  br label %159, !llvm.loop !16

214:                                              ; preds = %162
  %215 = call i32 @_ZSt12setprecisioni(i32 noundef 10)
  %216 = getelementptr inbounds %"struct.std::_Setprecision", ptr %12, i32 0, i32 0
  store i32 %215, ptr %216, align 4
  %217 = getelementptr inbounds %"struct.std::_Setprecision", ptr %12, i32 0, i32 0
  %218 = load i32, ptr %217, align 4
  %219 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %218)
  %220 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %219, ptr noundef @_ZSt5fixedRSt8ios_base)
  %221 = load double, ptr %9, align 8, !tbaa !9
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %220, double noundef %221)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %223 = load i32, ptr %1, align 4
  ret i32 %223
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: 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 double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8), i32) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt12setprecisioni(i32 noundef) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5fixedRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #6 align 2

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 nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { inlinehint mustprogress 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 #5 = { inlinehint mustprogress 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 #6 = { mustprogress 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 #7 = { 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}


; 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"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@dp = external dso_local local_unnamed_addr global [102 x [102 x [102 x double]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %4 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %7 = load i32, ptr %1, align 4, !tbaa !5
  %8 = sext i32 %7 to i64
  %9 = load i32, ptr %2, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = load i32, ptr %3, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %8, i64 %10, i64 %12
  store double 1.000000e+00, ptr %13, align 8, !tbaa !9
  br label %.preheader65

.preheader65:                                     ; preds = %0, %21
  %indvars.iv78 = phi i64 [ 0, %0 ], [ %indvars.iv.next79, %21 ]
  %14 = trunc nuw nsw i64 %indvars.iv78 to i32
  %15 = uitofp nneg i32 %14 to double
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  br label %.preheader64

.preheader63:                                     ; preds = %21
  %16 = add i32 %7, %9
  %17 = add i32 %16, %11
  br label %.preheader

.preheader64:                                     ; preds = %.preheader65, %22
  %indvars.iv74 = phi i64 [ 0, %.preheader65 ], [ %indvars.iv.next75, %22 ]
  %18 = add nuw nsw i64 %indvars.iv74, %indvars.iv78
  %19 = trunc nuw nsw i64 %indvars.iv74 to i32
  %20 = uitofp nneg i32 %19 to double
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  br label %23

21:                                               ; preds = %22
  %exitcond81.not = icmp eq i64 %indvars.iv.next79, 100
  br i1 %exitcond81.not, label %.preheader63, label %.preheader65, !llvm.loop !11

22:                                               ; preds = %49
  %exitcond77.not = icmp eq i64 %indvars.iv.next75, 100
  br i1 %exitcond77.not, label %21, label %.preheader64, !llvm.loop !13

23:                                               ; preds = %.preheader64, %49
  %indvars.iv = phi i64 [ 0, %.preheader64 ], [ %indvars.iv.next.pre-phi, %49 ]
  %24 = add nuw nsw i64 %18, %indvars.iv
  %25 = icmp eq i64 %24, 0
  br i1 %25, label %._crit_edge, label %26

._crit_edge:                                      ; preds = %23
  %.pre = add nuw nsw i64 %indvars.iv, 1
  br label %49

26:                                               ; preds = %23
  %27 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %indvars.iv78, i64 %indvars.iv74, i64 %indvars.iv
  %28 = load double, ptr %27, align 8, !tbaa !9
  %29 = fmul double %28, %15
  %30 = trunc nuw nsw i64 %24 to i32
  %31 = uitofp nneg i32 %30 to double
  %32 = fdiv double %29, %31
  %33 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %indvars.iv.next79, i64 %indvars.iv74, i64 %indvars.iv
  %34 = load double, ptr %33, align 8, !tbaa !9
  %35 = fadd double %34, %32
  store double %35, ptr %33, align 8, !tbaa !9
  %36 = fmul double %28, %20
  %37 = fdiv double %36, %31
  %38 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %indvars.iv78, i64 %indvars.iv.next75, i64 %indvars.iv
  %39 = load double, ptr %38, align 8, !tbaa !9
  %40 = fadd double %37, %39
  store double %40, ptr %38, align 8, !tbaa !9
  %41 = trunc nuw nsw i64 %indvars.iv to i32
  %42 = uitofp nneg i32 %41 to double
  %43 = fmul double %28, %42
  %44 = fdiv double %43, %31
  %45 = add nuw nsw i64 %indvars.iv, 1
  %46 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %indvars.iv78, i64 %indvars.iv74, i64 %45
  %47 = load double, ptr %46, align 8, !tbaa !9
  %48 = fadd double %44, %47
  store double %48, ptr %46, align 8, !tbaa !9
  br label %49

49:                                               ; preds = %._crit_edge, %26
  %indvars.iv.next.pre-phi = phi i64 [ %.pre, %._crit_edge ], [ %45, %26 ]
  %exitcond.not = icmp eq i64 %indvars.iv.next.pre-phi, 100
  br i1 %exitcond.not, label %22, label %23, !llvm.loop !14

.preheader:                                       ; preds = %.preheader63, %57
  %indvars.iv86 = phi i64 [ 0, %.preheader63 ], [ %indvars.iv.next87, %57 ]
  %.05471 = phi double [ 0.000000e+00, %.preheader63 ], [ %82, %57 ]
  %50 = trunc nuw nsw i64 %indvars.iv86 to i32
  %reass.sub = sub i32 %50, %17
  %51 = add i32 %reass.sub, 100
  br label %58

52:                                               ; preds = %57
  %53 = call i32 @_ZSt12setprecisioni(i32 noundef 10)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %53)
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull @_ZSt5fixedRSt8ios_base)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %55, double noundef %82)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

57:                                               ; preds = %58
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond89.not = icmp eq i64 %indvars.iv.next87, 100
  br i1 %exitcond89.not, label %52, label %.preheader, !llvm.loop !15

58:                                               ; preds = %58, %.preheader
  %indvars.iv82 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next83.1, %58 ]
  %.169 = phi double [ %.05471, %.preheader ], [ %82, %58 ]
  %59 = trunc nuw nsw i64 %indvars.iv82 to i32
  %60 = add i32 %51, %59
  %61 = sitofp i32 %60 to double
  %62 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %indvars.iv86, i64 %indvars.iv82, i64 100
  %63 = load double, ptr %62, align 16, !tbaa !9
  %64 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %indvars.iv86, i64 100, i64 %indvars.iv82
  %65 = load double, ptr %64, align 16, !tbaa !9
  %66 = fadd double %63, %65
  %67 = getelementptr inbounds [102 x [102 x double]], ptr getelementptr inbounds (i8, ptr @dp, i64 8323200), i64 0, i64 %indvars.iv86, i64 %indvars.iv82
  %68 = load double, ptr %67, align 16, !tbaa !9
  %69 = fadd double %66, %68
  %70 = call double @llvm.fmuladd.f64(double %61, double %69, double %.169)
  %indvars.iv.next83 = or disjoint i64 %indvars.iv82, 1
  %71 = trunc nuw nsw i64 %indvars.iv.next83 to i32
  %72 = add i32 %51, %71
  %73 = sitofp i32 %72 to double
  %74 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %indvars.iv86, i64 %indvars.iv.next83, i64 100
  %75 = load double, ptr %74, align 16, !tbaa !9
  %76 = getelementptr inbounds [102 x [102 x [102 x double]]], ptr @dp, i64 0, i64 %indvars.iv86, i64 100, i64 %indvars.iv.next83
  %77 = load double, ptr %76, align 8, !tbaa !9
  %78 = fadd double %75, %77
  %79 = getelementptr inbounds [102 x [102 x double]], ptr getelementptr inbounds (i8, ptr @dp, i64 8323200), i64 0, i64 %indvars.iv86, i64 %indvars.iv.next83
  %80 = load double, ptr %79, align 8, !tbaa !9
  %81 = fadd double %78, %80
  %82 = call double @llvm.fmuladd.f64(double %73, double %81, double %70)
  %indvars.iv.next83.1 = add nuw nsw i64 %indvars.iv82, 2
  %exitcond85.not.1 = icmp eq i64 %indvars.iv.next83.1, 100
  br i1 %exitcond85.not.1, label %57, label %58, !llvm.loop !16
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) 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: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8), i32) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt12setprecisioni(i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5fixedRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) local_unnamed_addr #6 align 2

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 = { mustprogress 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { inlinehint mustprogress 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 #5 = { inlinehint mustprogress 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 #6 = { mustprogress 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 #7 = { 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}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass