; LLVM IR from tangjz/acm-icpc :: codeforces/gym/100827D.ll (Z5solvev)

; 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 [15 x i8], align 1
@_ZZ5solvevE3seq = external hidden global [201 x i32], align 16
@_ZZ5solvevE3pos = external hidden global [201 x i32], align 16
@_ZZ5solvevE1f = external hidden global [201 x double], align 16
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #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 i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = call noundef i32 @_ZSt3gcdIiiENSt11common_typeIJT_T0_EE4typeES1_S2_(i32 noundef %19, i32 noundef %20) #6
  store i32 %21, ptr %8, align 4, !tbaa !5
  %22 = load i32, ptr %8, align 4, !tbaa !5
  %23 = load i32, ptr %1, align 4, !tbaa !5
  %24 = sdiv i32 %23, %22
  store i32 %24, ptr %1, align 4, !tbaa !5
  %25 = load i32, ptr %8, align 4, !tbaa !5
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sdiv i32 %26, %25
  store i32 %27, ptr %2, align 4, !tbaa !5
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = shl i32 %28, 1
  %30 = or i32 %29, 1
  %31 = sext i32 %30 to i64
  %32 = mul i64 %31, 4
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ5solvevE3pos, i8 -1, i64 %32, i1 false)
  %33 = load i32, ptr %1, align 4, !tbaa !5
  store i32 %33, ptr @_ZZ5solvevE3seq, align 16, !tbaa !5
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = load i32, ptr %1, align 4, !tbaa !5
  %36 = add nsw i32 %34, %35
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [201 x i32], ptr @_ZZ5solvevE3pos, i64 0, i64 %37
  store i32 0, ptr %38, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %181, %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %40 = load i32, ptr %9, align 4, !tbaa !5
  %41 = sub nsw i32 %40, 1
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [201 x i32], ptr @_ZZ5solvevE3seq, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = load i32, ptr %9, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [201 x i32], ptr @_ZZ5solvevE3seq, i64 0, i64 %46
  store i32 %44, ptr %47, align 4, !tbaa !5
  store ptr %47, ptr %10, align 8, !tbaa !9
  %48 = load ptr, ptr %10, align 8, !tbaa !9
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %51, label %53

51:                                               ; preds = %39
  %52 = load i32, ptr %2, align 4, !tbaa !5
  br label %56

53:                                               ; preds = %39
  %54 = load i32, ptr %2, align 4, !tbaa !5
  %55 = sub nsw i32 0, %54
  br label %56

56:                                               ; preds = %53, %51
  %57 = phi i32 [ %52, %51 ], [ %55, %53 ]
  %58 = load ptr, ptr %10, align 8, !tbaa !9
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = sub nsw i32 %57, %59
  %61 = load ptr, ptr %10, align 8, !tbaa !9
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = sub nsw i32 %60, %62
  %64 = load ptr, ptr %10, align 8, !tbaa !9
  store i32 %63, ptr %64, align 4, !tbaa !5
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = load ptr, ptr %10, align 8, !tbaa !9
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = add nsw i32 %65, %67
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [201 x i32], ptr @_ZZ5solvevE3pos, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = icmp eq i32 %71, -1
  br i1 %72, label %73, label %81

73:                                               ; preds = %56
  %74 = load i32, ptr %9, align 4, !tbaa !5
  %75 = load i32, ptr %2, align 4, !tbaa !5
  %76 = load ptr, ptr %10, align 8, !tbaa !9
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = add nsw i32 %75, %77
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [201 x i32], ptr @_ZZ5solvevE3pos, i64 0, i64 %79
  store i32 %74, ptr %80, align 4, !tbaa !5
  store i32 4, ptr %11, align 4
  br label %179

81:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store double 1.000000e+00, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store double 0.000000e+00, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %82 = load i32, ptr %9, align 4, !tbaa !5
  %83 = sub nsw i32 %82, 1
  store i32 %83, ptr %14, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %175, %81
  %85 = load i32, ptr %14, align 4, !tbaa !5
  %86 = icmp sge i32 %85, 0
  br i1 %86, label %88, label %87

87:                                               ; preds = %84
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %178

88:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %89 = load i32, ptr %14, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [201 x i32], ptr @_ZZ5solvevE3seq, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  store i32 %92, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %93 = load i32, ptr %15, align 4, !tbaa !5
  %94 = icmp sgt i32 %93, 0
  br i1 %94, label %95, label %97

95:                                               ; preds = %88
  %96 = load i32, ptr %6, align 4, !tbaa !5
  br label %99

97:                                               ; preds = %88
  %98 = load i32, ptr %4, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %97, %95
  %100 = phi i32 [ %96, %95 ], [ %98, %97 ]
  %101 = sitofp i32 %100 to double
  %102 = load i32, ptr %7, align 4, !tbaa !5
  %103 = sitofp i32 %102 to double
  %104 = fdiv double %101, %103
  %105 = load i32, ptr %15, align 4, !tbaa !5
  %106 = load i32, ptr %15, align 4, !tbaa !5
  %107 = mul nsw i32 %105, %106
  %108 = sitofp i32 %107 to double
  %109 = load i32, ptr %2, align 4, !tbaa !5
  %110 = load i32, ptr %2, align 4, !tbaa !5
  %111 = mul nsw i32 %109, %110
  %112 = sitofp i32 %111 to double
  %113 = fdiv double %108, %112
  %114 = fadd double %104, %113
  store double %114, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %115 = load i32, ptr %15, align 4, !tbaa !5
  %116 = icmp sgt i32 %115, 0
  br i1 %116, label %117, label %119

117:                                              ; preds = %99
  %118 = load i32, ptr %5, align 4, !tbaa !5
  br label %121

119:                                              ; preds = %99
  %120 = load i32, ptr %3, align 4, !tbaa !5
  br label %121

121:                                              ; preds = %119, %117
  %122 = phi i32 [ %118, %117 ], [ %120, %119 ]
  %123 = sitofp i32 %122 to double
  %124 = load i32, ptr %7, align 4, !tbaa !5
  %125 = sitofp i32 %124 to double
  %126 = fdiv double %123, %125
  store double %126, ptr %17, align 8, !tbaa !11
  %127 = load i32, ptr %14, align 4, !tbaa !5
  %128 = load i32, ptr %2, align 4, !tbaa !5
  %129 = load ptr, ptr %10, align 8, !tbaa !9
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = add nsw i32 %128, %130
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [201 x i32], ptr @_ZZ5solvevE3pos, i64 0, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = icmp sge i32 %127, %134
  br i1 %135, label %136, label %162

136:                                              ; preds = %121
  %137 = load double, ptr %12, align 8, !tbaa !11
  %138 = load double, ptr %16, align 8, !tbaa !11
  %139 = fmul double %137, %138
  store double %139, ptr %12, align 8, !tbaa !11
  %140 = load double, ptr %13, align 8, !tbaa !11
  %141 = load double, ptr %16, align 8, !tbaa !11
  %142 = load double, ptr %17, align 8, !tbaa !11
  %143 = call double @llvm.fmuladd.f64(double %140, double %141, double %142)
  store double %143, ptr %13, align 8, !tbaa !11
  %144 = load i32, ptr %14, align 4, !tbaa !5
  %145 = load i32, ptr %2, align 4, !tbaa !5
  %146 = load ptr, ptr %10, align 8, !tbaa !9
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = add nsw i32 %145, %147
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [201 x i32], ptr @_ZZ5solvevE3pos, i64 0, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = icmp eq i32 %144, %151
  br i1 %152, label %153, label %161

153:                                              ; preds = %136
  %154 = load double, ptr %13, align 8, !tbaa !11
  %155 = load double, ptr %12, align 8, !tbaa !11
  %156 = fsub double 1.000000e+00, %155
  %157 = fdiv double %154, %156
  %158 = load i32, ptr %14, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [201 x double], ptr @_ZZ5solvevE1f, i64 0, i64 %159
  store double %157, ptr %160, align 8, !tbaa !11
  br label %161

161:                                              ; preds = %153, %136
  br label %174

162:                                              ; preds = %121
  %163 = load double, ptr %16, align 8, !tbaa !11
  %164 = load i32, ptr %14, align 4, !tbaa !5
  %165 = add nsw i32 %164, 1
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [201 x double], ptr @_ZZ5solvevE1f, i64 0, i64 %166
  %168 = load double, ptr %167, align 8, !tbaa !11
  %169 = load double, ptr %17, align 8, !tbaa !11
  %170 = call double @llvm.fmuladd.f64(double %163, double %168, double %169)
  %171 = load i32, ptr %14, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [201 x double], ptr @_ZZ5solvevE1f, i64 0, i64 %172
  store double %170, ptr %173, align 8, !tbaa !11
  br label %174

174:                                              ; preds = %162, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %175

175:                                              ; preds = %174
  %176 = load i32, ptr %14, align 4, !tbaa !5
  %177 = add nsw i32 %176, -1
  store i32 %177, ptr %14, align 4, !tbaa !5
  br label %84, !llvm.loop !13

178:                                              ; preds = %87
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %179

179:                                              ; preds = %178, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  %180 = load i32, ptr %11, align 4
  switch i32 %180, label %184 [
    i32 4, label %181
  ]

181:                                              ; preds = %179
  %182 = load i32, ptr %9, align 4, !tbaa !5
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %9, align 4, !tbaa !5
  br label %39, !llvm.loop !15

184:                                              ; preds = %179
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %185

185:                                              ; preds = %184
  %186 = load double, ptr @_ZZ5solvevE1f, align 16, !tbaa !11
  %187 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, double noundef %186)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void
}

; 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: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZSt3gcdIiiENSt11common_typeIJT_T0_EE4typeES1_S2_(i32 noundef, i32 noundef) #3

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

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

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

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

attributes #0 = { 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 #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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; 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 [15 x i8], align 1
@_ZZ5solvevE3seq = external hidden local_unnamed_addr global [201 x i32], align 16
@_ZZ5solvevE3pos = external hidden local_unnamed_addr global [201 x i32], align 16
@_ZZ5solvevE1f = external hidden local_unnamed_addr global [201 x double], align 16
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #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
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = call noundef i32 @_ZSt3gcdIiiENSt11common_typeIJT_T0_EE4typeES1_S2_(i32 noundef %9, i32 noundef %10) #5
  %12 = load i32, ptr %1, align 4, !tbaa !5
  %13 = sdiv i32 %12, %11
  store i32 %13, ptr %1, align 4, !tbaa !5
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = sdiv i32 %14, %11
  store i32 %15, ptr %2, align 4, !tbaa !5
  %16 = shl i32 %15, 1
  %17 = or disjoint i32 %16, 1
  %18 = sext i32 %17 to i64
  %19 = shl nsw i64 %18, 2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) @_ZZ5solvevE3pos, i8 -1, i64 %19, i1 false)
  store i32 %13, ptr @_ZZ5solvevE3seq, align 16, !tbaa !5
  %20 = add nsw i32 %15, %13
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [201 x i32], ptr @_ZZ5solvevE3pos, i64 0, i64 %21
  store i32 0, ptr %22, align 4, !tbaa !5
  %23 = sub nsw i32 0, %15
  %24 = load i32, ptr %6, align 4
  %25 = load i32, ptr %4, align 4
  %26 = load i32, ptr %7, align 4
  %27 = sitofp i32 %26 to double
  %28 = mul nsw i32 %15, %15
  %29 = uitofp nneg i32 %28 to double
  %30 = load i32, ptr %5, align 4
  %31 = load i32, ptr %3, align 4
  %32 = icmp sgt i32 %13, 0
  %33 = select i1 %32, i32 %15, i32 %23
  %34 = shl i32 %13, 1
  %35 = sub i32 %33, %34
  store i32 %35, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3seq, i64 4), align 4, !tbaa !5
  %36 = add nsw i32 %35, %15
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [201 x i32], ptr @_ZZ5solvevE3pos, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = icmp eq i32 %39, -1
  br i1 %40, label %.lr.ph, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.lr.ph, %0
  %indvars.iv.lcssa = phi i64 [ 0, %0 ], [ %indvars.iv.next, %.lr.ph ]
  %.lcssa = phi i32 [ %39, %0 ], [ %83, %.lr.ph ]
  %41 = zext i32 %.lcssa to i64
  %sext = sext i32 %.lcssa to i64
  %42 = getelementptr inbounds [201 x double], ptr @_ZZ5solvevE1f, i64 0, i64 %41
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %70
  %indvars.iv45 = phi i64 [ %indvars.iv.lcssa, %.preheader.preheader ], [ %indvars.iv.next46, %70 ]
  %.03744 = phi double [ 1.000000e+00, %.preheader.preheader ], [ %.1, %70 ]
  %.03942 = phi double [ 0.000000e+00, %.preheader.preheader ], [ %.140, %70 ]
  %43 = getelementptr inbounds [201 x i32], ptr @_ZZ5solvevE3seq, i64 0, i64 %indvars.iv45
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = icmp sgt i32 %44, 0
  %46 = select i1 %45, i32 %24, i32 %25
  %47 = sitofp i32 %46 to double
  %48 = fdiv double %47, %27
  %49 = mul nsw i32 %44, %44
  %50 = uitofp nneg i32 %49 to double
  %51 = fdiv double %50, %29
  %52 = fadd double %51, %48
  %53 = select i1 %45, i32 %30, i32 %31
  %54 = sitofp i32 %53 to double
  %55 = fdiv double %54, %27
  %56 = icmp slt i64 %indvars.iv45, %sext
  br i1 %56, label %64, label %57

57:                                               ; preds = %.preheader
  %58 = fmul double %.03744, %52
  %59 = call double @llvm.fmuladd.f64(double %.03942, double %52, double %55)
  %60 = icmp eq i64 %indvars.iv45, %41
  br i1 %60, label %61, label %70

61:                                               ; preds = %57
  %62 = fsub double 1.000000e+00, %58
  %63 = fdiv double %59, %62
  store double %63, ptr %42, align 8, !tbaa !9
  br label %70

64:                                               ; preds = %.preheader
  %65 = add nuw nsw i64 %indvars.iv45, 1
  %66 = getelementptr inbounds [201 x double], ptr @_ZZ5solvevE1f, i64 0, i64 %65
  %67 = load double, ptr %66, align 8, !tbaa !9
  %68 = call double @llvm.fmuladd.f64(double %52, double %67, double %55)
  %69 = getelementptr inbounds [201 x double], ptr @_ZZ5solvevE1f, i64 0, i64 %indvars.iv45
  store double %68, ptr %69, align 8, !tbaa !9
  br label %70

70:                                               ; preds = %57, %61, %64
  %.140 = phi double [ %59, %61 ], [ %59, %57 ], [ %.03942, %64 ]
  %.1 = phi double [ %58, %61 ], [ %58, %57 ], [ %.03744, %64 ]
  %indvars.iv.next46 = add nsw i64 %indvars.iv45, -1
  %71 = icmp sgt i64 %indvars.iv45, 0
  br i1 %71, label %.preheader, label %85, !llvm.loop !11

.lr.ph:                                           ; preds = %0, %.lr.ph
  %72 = phi ptr [ %82, %.lr.ph ], [ %38, %0 ]
  %73 = phi i32 [ %79, %.lr.ph ], [ %35, %0 ]
  %indvars.iv52 = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %indvars.iv4851 = phi i64 [ %indvars.iv.next49, %.lr.ph ], [ 1, %0 ]
  %74 = trunc nuw nsw i64 %indvars.iv4851 to i32
  store i32 %74, ptr %72, align 4, !tbaa !5
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv4851, 1
  %indvars.iv.next = add nuw nsw i64 %indvars.iv52, 1
  %75 = getelementptr inbounds [201 x i32], ptr @_ZZ5solvevE3seq, i64 0, i64 %indvars.iv.next49
  %76 = icmp sgt i32 %73, 0
  %77 = select i1 %76, i32 %15, i32 %23
  %78 = shl i32 %73, 1
  %79 = sub i32 %77, %78
  store i32 %79, ptr %75, align 4, !tbaa !5
  %80 = add nsw i32 %79, %15
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [201 x i32], ptr @_ZZ5solvevE3pos, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = icmp eq i32 %83, -1
  br i1 %84, label %.lr.ph, label %.preheader.preheader, !llvm.loop !13

85:                                               ; preds = %70
  %86 = load double, ptr @_ZZ5solvevE1f, align 16, !tbaa !9
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %86)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret void
}

; 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 nounwind uwtable
declare dso_local noundef i32 @_ZSt3gcdIiiENSt11common_typeIJT_T0_EE4typeES1_S2_(i32 noundef, i32 noundef) local_unnamed_addr #0

; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

attributes #0 = { 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 #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 = { 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}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass