; LLVM IR from CLASS-SZ/class_sz :: class-sz/tools (hyperspherical)

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

@stderr = external global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [34 x i8], align 1

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

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @fzero_ridder(ptr noundef %0, double noundef %1, double noundef %2, double noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #3 {
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca i32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store double %1, ptr %12, align 8, !tbaa !9
  store double %2, ptr %13, align 8, !tbaa !9
  store double %3, ptr %14, align 8, !tbaa !9
  store ptr %4, ptr %15, align 8, !tbaa !5
  store ptr %5, ptr %16, align 8, !tbaa !5
  store ptr %6, ptr %17, align 8, !tbaa !5
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  store i32 1000, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  %33 = load ptr, ptr %16, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %35, label %43

35:                                               ; preds = %9
  %36 = load ptr, ptr %17, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %43

38:                                               ; preds = %35
  %39 = load ptr, ptr %16, align 8, !tbaa !5
  %40 = load double, ptr %39, align 8, !tbaa !9
  store double %40, ptr %24, align 8, !tbaa !9
  %41 = load ptr, ptr %17, align 8, !tbaa !5
  %42 = load double, ptr %41, align 8, !tbaa !9
  store double %42, ptr %23, align 8, !tbaa !9
  br label %56

43:                                               ; preds = %35, %9
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = load double, ptr %12, align 8, !tbaa !9
  %46 = load ptr, ptr %15, align 8, !tbaa !5
  %47 = call double %44(double noundef %45, ptr noundef %46)
  store double %47, ptr %24, align 8, !tbaa !9
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  %49 = load double, ptr %13, align 8, !tbaa !9
  %50 = load ptr, ptr %15, align 8, !tbaa !5
  %51 = call double %48(double noundef %49, ptr noundef %50)
  store double %51, ptr %23, align 8, !tbaa !9
  %52 = load ptr, ptr %19, align 8, !tbaa !5
  %53 = load i32, ptr %52, align 4, !tbaa !11
  %54 = add nsw i32 %53, 2
  %55 = load ptr, ptr %19, align 8, !tbaa !5
  store i32 %54, ptr %55, align 4, !tbaa !11
  br label %56

56:                                               ; preds = %43, %38
  %57 = load double, ptr %24, align 8, !tbaa !9
  %58 = fcmp ogt double %57, 0.000000e+00
  br i1 %58, label %59, label %62

59:                                               ; preds = %56
  %60 = load double, ptr %23, align 8, !tbaa !9
  %61 = fcmp olt double %60, 0.000000e+00
  br i1 %61, label %68, label %62

62:                                               ; preds = %59, %56
  %63 = load double, ptr %24, align 8, !tbaa !9
  %64 = fcmp olt double %63, 0.000000e+00
  br i1 %64, label %65, label %213

65:                                               ; preds = %62
  %66 = load double, ptr %23, align 8, !tbaa !9
  %67 = fcmp ogt double %66, 0.000000e+00
  br i1 %67, label %68, label %213

68:                                               ; preds = %65, %59
  %69 = load double, ptr %12, align 8, !tbaa !9
  store double %69, ptr %29, align 8, !tbaa !9
  %70 = load double, ptr %13, align 8, !tbaa !9
  store double %70, ptr %28, align 8, !tbaa !9
  store double -1.110000e+11, ptr %22, align 8, !tbaa !9
  store i32 1, ptr %20, align 4, !tbaa !11
  br label %71

71:                                               ; preds = %207, %68
  %72 = load i32, ptr %20, align 4, !tbaa !11
  %73 = load i32, ptr %21, align 4, !tbaa !11
  %74 = icmp sle i32 %72, %73
  br i1 %74, label %75, label %210

75:                                               ; preds = %71
  %76 = load double, ptr %29, align 8, !tbaa !9
  %77 = load double, ptr %28, align 8, !tbaa !9
  %78 = fadd double %76, %77
  %79 = fmul double 5.000000e-01, %78
  store double %79, ptr %30, align 8, !tbaa !9
  %80 = load ptr, ptr %11, align 8, !tbaa !5
  %81 = load double, ptr %30, align 8, !tbaa !9
  %82 = load ptr, ptr %15, align 8, !tbaa !5
  %83 = call double %80(double noundef %81, ptr noundef %82)
  store double %83, ptr %25, align 8, !tbaa !9
  %84 = load ptr, ptr %19, align 8, !tbaa !5
  %85 = load i32, ptr %84, align 4, !tbaa !11
  %86 = add nsw i32 %85, 1
  %87 = load ptr, ptr %19, align 8, !tbaa !5
  store i32 %86, ptr %87, align 4, !tbaa !11
  %88 = load double, ptr %25, align 8, !tbaa !9
  %89 = load double, ptr %25, align 8, !tbaa !9
  %90 = load double, ptr %24, align 8, !tbaa !9
  %91 = load double, ptr %23, align 8, !tbaa !9
  %92 = fmul double %90, %91
  %93 = fneg double %92
  %94 = call double @llvm.fmuladd.f64(double %88, double %89, double %93)
  %95 = call double @sqrt(double noundef %94) #4
  store double %95, ptr %27, align 8, !tbaa !9
  %96 = load double, ptr %27, align 8, !tbaa !9
  %97 = fcmp oeq double %96, 0.000000e+00
  br i1 %97, label %98, label %101

98:                                               ; preds = %75
  %99 = load double, ptr %22, align 8, !tbaa !9
  %100 = load ptr, ptr %18, align 8, !tbaa !5
  store double %99, ptr %100, align 8, !tbaa !9
  store i32 0, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %228

101:                                              ; preds = %75
  %102 = load double, ptr %30, align 8, !tbaa !9
  %103 = load double, ptr %30, align 8, !tbaa !9
  %104 = load double, ptr %29, align 8, !tbaa !9
  %105 = fsub double %103, %104
  %106 = load double, ptr %24, align 8, !tbaa !9
  %107 = load double, ptr %23, align 8, !tbaa !9
  %108 = fcmp oge double %106, %107
  %109 = zext i1 %108 to i64
  %110 = select i1 %108, double 1.000000e+00, double -1.000000e+00
  %111 = load double, ptr %25, align 8, !tbaa !9
  %112 = fmul double %110, %111
  %113 = load double, ptr %27, align 8, !tbaa !9
  %114 = fdiv double %112, %113
  %115 = call double @llvm.fmuladd.f64(double %105, double %114, double %102)
  store double %115, ptr %31, align 8, !tbaa !9
  %116 = load double, ptr %31, align 8, !tbaa !9
  %117 = load double, ptr %22, align 8, !tbaa !9
  %118 = fsub double %116, %117
  %119 = call double @llvm.fabs.f64(double %118)
  %120 = load double, ptr %14, align 8, !tbaa !9
  %121 = fcmp ole double %119, %120
  br i1 %121, label %122, label %125

122:                                              ; preds = %101
  %123 = load double, ptr %22, align 8, !tbaa !9
  %124 = load ptr, ptr %18, align 8, !tbaa !5
  store double %123, ptr %124, align 8, !tbaa !9
  store i32 0, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %228

125:                                              ; preds = %101
  %126 = load double, ptr %31, align 8, !tbaa !9
  store double %126, ptr %22, align 8, !tbaa !9
  %127 = load ptr, ptr %11, align 8, !tbaa !5
  %128 = load double, ptr %22, align 8, !tbaa !9
  %129 = load ptr, ptr %15, align 8, !tbaa !5
  %130 = call double %127(double noundef %128, ptr noundef %129)
  store double %130, ptr %26, align 8, !tbaa !9
  %131 = load ptr, ptr %19, align 8, !tbaa !5
  %132 = load i32, ptr %131, align 4, !tbaa !11
  %133 = add nsw i32 %132, 1
  %134 = load ptr, ptr %19, align 8, !tbaa !5
  store i32 %133, ptr %134, align 4, !tbaa !11
  %135 = load double, ptr %26, align 8, !tbaa !9
  %136 = fcmp oeq double %135, 0.000000e+00
  br i1 %136, label %137, label %140

137:                                              ; preds = %125
  %138 = load double, ptr %22, align 8, !tbaa !9
  %139 = load ptr, ptr %18, align 8, !tbaa !5
  store double %138, ptr %139, align 8, !tbaa !9
  store i32 0, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %228

140:                                              ; preds = %125
  %141 = load double, ptr %26, align 8, !tbaa !9
  %142 = fcmp oge double %141, 0.000000e+00
  br i1 %142, label %143, label %146

143:                                              ; preds = %140
  %144 = load double, ptr %25, align 8, !tbaa !9
  %145 = call double @llvm.fabs.f64(double %144)
  br label %150

146:                                              ; preds = %140
  %147 = load double, ptr %25, align 8, !tbaa !9
  %148 = call double @llvm.fabs.f64(double %147)
  %149 = fneg double %148
  br label %150

150:                                              ; preds = %146, %143
  %151 = phi double [ %145, %143 ], [ %149, %146 ]
  %152 = load double, ptr %25, align 8, !tbaa !9
  %153 = fcmp une double %151, %152
  br i1 %153, label %154, label %159

154:                                              ; preds = %150
  %155 = load double, ptr %30, align 8, !tbaa !9
  store double %155, ptr %29, align 8, !tbaa !9
  %156 = load double, ptr %25, align 8, !tbaa !9
  store double %156, ptr %24, align 8, !tbaa !9
  %157 = load double, ptr %22, align 8, !tbaa !9
  store double %157, ptr %28, align 8, !tbaa !9
  %158 = load double, ptr %26, align 8, !tbaa !9
  store double %158, ptr %23, align 8, !tbaa !9
  br label %196

159:                                              ; preds = %150
  %160 = load double, ptr %26, align 8, !tbaa !9
  %161 = fcmp oge double %160, 0.000000e+00
  br i1 %161, label %162, label %165

162:                                              ; preds = %159
  %163 = load double, ptr %24, align 8, !tbaa !9
  %164 = call double @llvm.fabs.f64(double %163)
  br label %169

165:                                              ; preds = %159
  %166 = load double, ptr %24, align 8, !tbaa !9
  %167 = call double @llvm.fabs.f64(double %166)
  %168 = fneg double %167
  br label %169

169:                                              ; preds = %165, %162
  %170 = phi double [ %164, %162 ], [ %168, %165 ]
  %171 = load double, ptr %24, align 8, !tbaa !9
  %172 = fcmp une double %170, %171
  br i1 %172, label %173, label %176

173:                                              ; preds = %169
  %174 = load double, ptr %22, align 8, !tbaa !9
  store double %174, ptr %28, align 8, !tbaa !9
  %175 = load double, ptr %26, align 8, !tbaa !9
  store double %175, ptr %23, align 8, !tbaa !9
  br label %195

176:                                              ; preds = %169
  %177 = load double, ptr %26, align 8, !tbaa !9
  %178 = fcmp oge double %177, 0.000000e+00
  br i1 %178, label %179, label %182

179:                                              ; preds = %176
  %180 = load double, ptr %23, align 8, !tbaa !9
  %181 = call double @llvm.fabs.f64(double %180)
  br label %186

182:                                              ; preds = %176
  %183 = load double, ptr %23, align 8, !tbaa !9
  %184 = call double @llvm.fabs.f64(double %183)
  %185 = fneg double %184
  br label %186

186:                                              ; preds = %182, %179
  %187 = phi double [ %181, %179 ], [ %185, %182 ]
  %188 = load double, ptr %23, align 8, !tbaa !9
  %189 = fcmp une double %187, %188
  br i1 %189, label %190, label %193

190:                                              ; preds = %186
  %191 = load double, ptr %22, align 8, !tbaa !9
  store double %191, ptr %29, align 8, !tbaa !9
  %192 = load double, ptr %26, align 8, !tbaa !9
  store double %192, ptr %24, align 8, !tbaa !9
  br label %194

193:                                              ; preds = %186
  store i32 1, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %228

194:                                              ; preds = %190
  br label %195

195:                                              ; preds = %194, %173
  br label %196

196:                                              ; preds = %195, %154
  %197 = load double, ptr %28, align 8, !tbaa !9
  %198 = load double, ptr %29, align 8, !tbaa !9
  %199 = fsub double %197, %198
  %200 = call double @llvm.fabs.f64(double %199)
  %201 = load double, ptr %14, align 8, !tbaa !9
  %202 = fcmp ole double %200, %201
  br i1 %202, label %203, label %206

203:                                              ; preds = %196
  %204 = load double, ptr %22, align 8, !tbaa !9
  %205 = load ptr, ptr %18, align 8, !tbaa !5
  store double %204, ptr %205, align 8, !tbaa !9
  store i32 0, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %228

206:                                              ; preds = %196
  br label %207

207:                                              ; preds = %206
  %208 = load i32, ptr %20, align 4, !tbaa !11
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %20, align 4, !tbaa !11
  br label %71, !llvm.loop !13

210:                                              ; preds = %71
  %211 = load ptr, ptr @stderr, align 8, !tbaa !5
  %212 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %211, ptr noundef @.str.12) #4
  store i32 1, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %228

213:                                              ; preds = %65, %62
  %214 = load double, ptr %24, align 8, !tbaa !9
  %215 = fcmp oeq double %214, 0.000000e+00
  br i1 %215, label %216, label %219

216:                                              ; preds = %213
  %217 = load double, ptr %12, align 8, !tbaa !9
  %218 = fptosi double %217 to i32
  store i32 %218, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %228

219:                                              ; preds = %213
  %220 = load double, ptr %23, align 8, !tbaa !9
  %221 = fcmp oeq double %220, 0.000000e+00
  br i1 %221, label %222, label %225

222:                                              ; preds = %219
  %223 = load double, ptr %13, align 8, !tbaa !9
  %224 = fptosi double %223 to i32
  store i32 %224, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %228

225:                                              ; preds = %219
  %226 = load ptr, ptr @stderr, align 8, !tbaa !5
  %227 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %226, ptr noundef @.str.13) #4
  store i32 1, ptr %10, align 4
  store i32 1, ptr %32, align 4
  br label %228

228:                                              ; preds = %225, %222, %216, %210, %203, %193, %137, %122, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  %229 = load i32, ptr %10, align 4
  ret i32 %229
}

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @fzero_ridder(ptr nocapture noundef readonly %0, double noundef %1, double noundef %2, double noundef %3, ptr noundef %4, ptr noundef readonly %5, ptr noundef readonly %6, ptr nocapture noundef writeonly %7, ptr nocapture noundef %8) local_unnamed_addr #2 {
  %10 = icmp ne ptr %5, null
  %11 = icmp ne ptr %6, null
  %or.cond = and i1 %10, %11
  br i1 %or.cond, label %12, label %15

12:                                               ; preds = %9
  %13 = load double, ptr %5, align 8, !tbaa !5
  %14 = load double, ptr %6, align 8, !tbaa !5
  br label %20

15:                                               ; preds = %9
  %16 = tail call double %0(double noundef %1, ptr noundef %4) #4
  %17 = tail call double %0(double noundef %2, ptr noundef %4) #4
  %18 = load i32, ptr %8, align 4, !tbaa !9
  %19 = add nsw i32 %18, 2
  store i32 %19, ptr %8, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %15, %12
  %.097 = phi double [ %13, %12 ], [ %16, %15 ]
  %.095 = phi double [ %14, %12 ], [ %17, %15 ]
  %21 = fcmp ogt double %.097, 0.000000e+00
  %22 = fcmp olt double %.095, 0.000000e+00
  %or.cond3 = select i1 %21, i1 %22, i1 false
  br i1 %or.cond3, label %.preheader, label %23

23:                                               ; preds = %20
  %24 = fcmp olt double %.097, 0.000000e+00
  %25 = fcmp ogt double %.095, 0.000000e+00
  %or.cond5 = select i1 %24, i1 %25, i1 false
  br i1 %or.cond5, label %.preheader, label %85

.preheader:                                       ; preds = %23, %20
  br label %28

26:                                               ; preds = %77
  %27 = add nuw nsw i32 %.090122, 1
  %exitcond.not = icmp eq i32 %27, 1001
  br i1 %exitcond.not, label %82, label %28, !llvm.loop !11

28:                                               ; preds = %.preheader, %26
  %.090122 = phi i32 [ %27, %26 ], [ 1, %.preheader ]
  %.091121 = phi double [ %.1, %26 ], [ %1, %.preheader ]
  %.092120 = phi double [ %.193, %26 ], [ %2, %.preheader ]
  %.094119 = phi double [ %46, %26 ], [ -1.110000e+11, %.preheader ]
  %.196118 = phi double [ %.2, %26 ], [ %.095, %.preheader ]
  %.198117 = phi double [ %.299, %26 ], [ %.097, %.preheader ]
  %29 = fadd double %.092120, %.091121
  %30 = fmul double %29, 5.000000e-01
  %31 = tail call double %0(double noundef %30, ptr noundef %4) #4
  %32 = load i32, ptr %8, align 4, !tbaa !9
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %8, align 4, !tbaa !9
  %34 = fneg double %.198117
  %35 = fmul double %.196118, %34
  %36 = tail call double @llvm.fmuladd.f64(double %31, double %31, double %35)
  %37 = tail call double @sqrt(double noundef %36) #4
  %38 = fcmp oeq double %37, 0.000000e+00
  br i1 %38, label %39, label %40

39:                                               ; preds = %28
  store double %.094119, ptr %7, align 8, !tbaa !5
  br label %.loopexit

40:                                               ; preds = %28
  %41 = fsub double %30, %.091121
  %42 = fcmp oge double %.198117, %.196118
  %43 = fneg double %31
  %44 = select i1 %42, double %31, double %43
  %45 = fdiv double %44, %37
  %46 = tail call double @llvm.fmuladd.f64(double %41, double %45, double %30)
  %47 = fsub double %46, %.094119
  %48 = tail call double @llvm.fabs.f64(double %47)
  %49 = fcmp ugt double %48, %3
  br i1 %49, label %51, label %50

50:                                               ; preds = %40
  store double %.094119, ptr %7, align 8, !tbaa !5
  br label %.loopexit

51:                                               ; preds = %40
  %52 = tail call double %0(double noundef %46, ptr noundef %4) #4
  %53 = load i32, ptr %8, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %8, align 4, !tbaa !9
  %55 = fcmp oeq double %52, 0.000000e+00
  br i1 %55, label %56, label %57

56:                                               ; preds = %51
  store double %46, ptr %7, align 8, !tbaa !5
  br label %.loopexit

57:                                               ; preds = %51
  %58 = fcmp ult double %52, 0.000000e+00
  %59 = tail call double @llvm.fabs.f64(double %31)
  br i1 %58, label %.thread, label %60

60:                                               ; preds = %57
  %61 = fcmp une double %59, %31
  br i1 %61, label %77, label %64

.thread:                                          ; preds = %57
  %62 = fneg double %59
  %63 = fcmp une double %31, %62
  br i1 %63, label %77, label %.thread107

64:                                               ; preds = %60
  %65 = tail call double @llvm.fabs.f64(double %.198117)
  %66 = fcmp une double %65, %.198117
  br i1 %66, label %77, label %70

.thread107:                                       ; preds = %.thread
  %67 = tail call double @llvm.fabs.f64(double %.198117)
  %68 = fneg double %67
  %69 = fcmp une double %.198117, %68
  br i1 %69, label %77, label %.thread108

70:                                               ; preds = %64
  %71 = tail call double @llvm.fabs.f64(double %.196118)
  br label %74

.thread108:                                       ; preds = %.thread107
  %72 = tail call double @llvm.fabs.f64(double %.196118)
  %73 = fneg double %72
  br label %74

74:                                               ; preds = %.thread108, %70
  %75 = phi double [ %71, %70 ], [ %73, %.thread108 ]
  %76 = fcmp une double %75, %.196118
  br i1 %76, label %77, label %.loopexit

77:                                               ; preds = %.thread107, %.thread, %74, %64, %60
  %.299 = phi double [ %31, %60 ], [ %.198117, %64 ], [ %52, %74 ], [ %31, %.thread ], [ %.198117, %.thread107 ]
  %.2 = phi double [ %52, %60 ], [ %52, %64 ], [ %.196118, %74 ], [ %52, %.thread ], [ %52, %.thread107 ]
  %.193 = phi double [ %46, %60 ], [ %46, %64 ], [ %.092120, %74 ], [ %46, %.thread ], [ %46, %.thread107 ]
  %.1 = phi double [ %30, %60 ], [ %.091121, %64 ], [ %46, %74 ], [ %30, %.thread ], [ %.091121, %.thread107 ]
  %78 = fsub double %.193, %.1
  %79 = tail call double @llvm.fabs.f64(double %78)
  %80 = fcmp ugt double %79, %3
  br i1 %80, label %26, label %81

81:                                               ; preds = %77
  store double %46, ptr %7, align 8, !tbaa !5
  br label %.loopexit

82:                                               ; preds = %26
  %83 = load ptr, ptr @stderr, align 8, !tbaa !13
  %84 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef nonnull @.str.12) #5
  br label %.loopexit

85:                                               ; preds = %23
  %86 = fcmp oeq double %.097, 0.000000e+00
  br i1 %86, label %87, label %89

87:                                               ; preds = %85
  %88 = fptosi double %1 to i32
  br label %.loopexit

89:                                               ; preds = %85
  %90 = fcmp oeq double %.095, 0.000000e+00
  br i1 %90, label %91, label %93

91:                                               ; preds = %89
  %92 = fptosi double %2 to i32
  br label %.loopexit

93:                                               ; preds = %89
  %94 = load ptr, ptr @stderr, align 8, !tbaa !13
  %95 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %94, ptr noundef nonnull @.str.13) #5
  br label %.loopexit

.loopexit:                                        ; preds = %74, %93, %91, %87, %82, %81, %56, %50, %39
  %.0 = phi i32 [ 0, %39 ], [ 0, %50 ], [ 0, %56 ], [ 0, %81 ], [ 1, %82 ], [ %88, %87 ], [ %92, %91 ], [ 1, %93 ], [ 1, %74 ]
  ret i32 %.0
}

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

attributes #0 = { mustprogress nofree nounwind willreturn memory(write) "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 speculatable willreturn memory(none) }
attributes #2 = { 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 #3 = { 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 #4 = { nounwind }
attributes #5 = { cold 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}


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