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

; 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 @pow(double noundef, double noundef) #1

; 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: nounwind
declare double @asin(double noundef) #1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @ClosedModY(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local double @airy_cheb_approx(double noundef) #3

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

35:                                               ; preds = %5
  %36 = load double, ptr %9, align 8, !tbaa !9
  %37 = fadd double %36, 4.000000e-01
  %38 = fptosi double %37 to i32
  store i32 %38, ptr %28, align 4, !tbaa !5
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = load i32, ptr %28, align 4, !tbaa !5
  %41 = call i32 @ClosedModY(i32 noundef %39, i32 noundef %40, ptr noundef %10, ptr noundef %26, ptr noundef %27)
  br label %42

42:                                               ; preds = %35, %5
  %43 = load double, ptr %29, align 8, !tbaa !9
  %44 = load double, ptr %29, align 8, !tbaa !9
  %45 = fadd double %44, 1.000000e+00
  %46 = fmul double %43, %45
  %47 = call double @sqrt(double noundef %46) #4
  %48 = fdiv double 1.000000e+00, %47
  store double %48, ptr %12, align 8, !tbaa !9
  %49 = load double, ptr %9, align 8, !tbaa !9
  %50 = load double, ptr %12, align 8, !tbaa !9
  %51 = fmul double %49, %50
  store double %51, ptr %15, align 8, !tbaa !9
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = icmp eq i32 %52, -1
  br i1 %53, label %54, label %61

54:                                               ; preds = %42
  %55 = load double, ptr %10, align 8, !tbaa !9
  %56 = call double @sinh(double noundef %55) #4
  %57 = fdiv double 1.000000e+00, %56
  store double %57, ptr %17, align 8, !tbaa !9
  %58 = load double, ptr %15, align 8, !tbaa !9
  %59 = fdiv double 1.000000e+00, %58
  %60 = call double @asinh(double noundef %59) #4
  store double %60, ptr %18, align 8, !tbaa !9
  br label %73

61:                                               ; preds = %42
  %62 = load i32, ptr %7, align 4, !tbaa !5
  %63 = icmp eq i32 %62, 1
  br i1 %63, label %64, label %71

64:                                               ; preds = %61
  %65 = load double, ptr %10, align 8, !tbaa !9
  %66 = call double @sin(double noundef %65) #4
  %67 = fdiv double 1.000000e+00, %66
  store double %67, ptr %17, align 8, !tbaa !9
  %68 = load double, ptr %15, align 8, !tbaa !9
  %69 = fdiv double 1.000000e+00, %68
  %70 = call double @asin(double noundef %69) #4
  store double %70, ptr %18, align 8, !tbaa !9
  br label %72

71:                                               ; preds = %61
  store i32 1, ptr %6, align 4
  store i32 1, ptr %30, align 4
  br label %234

72:                                               ; preds = %64
  br label %73

73:                                               ; preds = %72, %54
  %74 = load double, ptr %15, align 8, !tbaa !9
  %75 = load double, ptr %17, align 8, !tbaa !9
  %76 = fdiv double %74, %75
  store double %76, ptr %13, align 8, !tbaa !9
  %77 = load double, ptr %13, align 8, !tbaa !9
  %78 = load double, ptr %13, align 8, !tbaa !9
  %79 = fmul double %77, %78
  store double %79, ptr %14, align 8, !tbaa !9
  %80 = load double, ptr %15, align 8, !tbaa !9
  %81 = load double, ptr %15, align 8, !tbaa !9
  %82 = fmul double %80, %81
  store double %82, ptr %16, align 8, !tbaa !9
  %83 = load i32, ptr %7, align 4, !tbaa !5
  %84 = icmp eq i32 %83, -1
  br i1 %84, label %85, label %137

85:                                               ; preds = %73
  %86 = load double, ptr %10, align 8, !tbaa !9
  %87 = load double, ptr %18, align 8, !tbaa !9
  %88 = fcmp ogt double %86, %87
  br i1 %88, label %89, label %117

89:                                               ; preds = %85
  %90 = load double, ptr %15, align 8, !tbaa !9
  %91 = load double, ptr %14, align 8, !tbaa !9
  %92 = fsub double %91, 1.000000e+00
  %93 = call double @sqrt(double noundef %92) #4
  %94 = load double, ptr %14, align 8, !tbaa !9
  %95 = load double, ptr %16, align 8, !tbaa !9
  %96 = fadd double %94, %95
  %97 = call double @sqrt(double noundef %96) #4
  %98 = fadd double %93, %97
  %99 = load double, ptr %16, align 8, !tbaa !9
  %100 = fadd double 1.000000e+00, %99
  %101 = call double @sqrt(double noundef %100) #4
  %102 = fdiv double %98, %101
  %103 = call double @log(double noundef %102) #4
  %104 = load double, ptr %15, align 8, !tbaa !9
  %105 = fdiv double 1.000000e+00, %104
  %106 = load double, ptr %14, align 8, !tbaa !9
  %107 = load double, ptr %16, align 8, !tbaa !9
  %108 = fadd double %106, %107
  %109 = load double, ptr %14, align 8, !tbaa !9
  %110 = fsub double %109, 1.000000e+00
  %111 = fdiv double %108, %110
  %112 = call double @sqrt(double noundef %111) #4
  %113 = fmul double %105, %112
  %114 = call double @atan(double noundef %113) #4
  %115 = call double @llvm.fmuladd.f64(double %90, double %103, double %114)
  %116 = fsub double %115, 0x3FF921FB54442D18
  store double %116, ptr %20, align 8, !tbaa !9
  store i32 -1, ptr %25, align 4, !tbaa !5
  br label %136

117:                                              ; preds = %85
  %118 = load double, ptr %14, align 8, !tbaa !9
  %119 = fsub double 1.000000e+00, %118
  %120 = call double @sqrt(double noundef %119) #4
  %121 = load double, ptr %14, align 8, !tbaa !9
  %122 = load double, ptr %16, align 8, !tbaa !9
  %123 = fdiv double %121, %122
  %124 = fadd double 1.000000e+00, %123
  %125 = call double @sqrt(double noundef %124) #4
  %126 = fdiv double %120, %125
  store double %126, ptr %19, align 8, !tbaa !9
  %127 = load double, ptr %19, align 8, !tbaa !9
  %128 = call double @atanh(double noundef %127) #4
  %129 = load double, ptr %15, align 8, !tbaa !9
  %130 = load double, ptr %19, align 8, !tbaa !9
  %131 = load double, ptr %15, align 8, !tbaa !9
  %132 = fdiv double %130, %131
  %133 = call double @atan(double noundef %132) #4
  %134 = fneg double %129
  %135 = call double @llvm.fmuladd.f64(double %134, double %133, double %128)
  store double %135, ptr %20, align 8, !tbaa !9
  store i32 1, ptr %25, align 4, !tbaa !5
  br label %136

136:                                              ; preds = %117, %89
  br label %193

137:                                              ; preds = %73
  %138 = load i32, ptr %7, align 4, !tbaa !5
  %139 = icmp eq i32 %138, 1
  br i1 %139, label %140, label %192

140:                                              ; preds = %137
  %141 = load double, ptr %10, align 8, !tbaa !9
  %142 = load double, ptr %18, align 8, !tbaa !9
  %143 = fcmp ogt double %141, %142
  br i1 %143, label %144, label %164

144:                                              ; preds = %140
  %145 = load double, ptr %14, align 8, !tbaa !9
  %146 = load double, ptr %16, align 8, !tbaa !9
  %147 = fdiv double %145, %146
  %148 = fsub double 1.000000e+00, %147
  %149 = call double @sqrt(double noundef %148) #4
  %150 = load double, ptr %14, align 8, !tbaa !9
  %151 = fsub double %150, 1.000000e+00
  %152 = call double @sqrt(double noundef %151) #4
  %153 = fdiv double %149, %152
  store double %153, ptr %19, align 8, !tbaa !9
  %154 = load double, ptr %19, align 8, !tbaa !9
  %155 = call double @atan(double noundef %154) #4
  %156 = load double, ptr %15, align 8, !tbaa !9
  %157 = load double, ptr %19, align 8, !tbaa !9
  %158 = load double, ptr %15, align 8, !tbaa !9
  %159 = fmul double %157, %158
  %160 = fdiv double 1.000000e+00, %159
  %161 = call double @atan(double noundef %160) #4
  %162 = call double @llvm.fmuladd.f64(double %156, double %161, double %155)
  %163 = fsub double %162, 0x3FF921FB54442D18
  store double %163, ptr %20, align 8, !tbaa !9
  store i32 -1, ptr %25, align 4, !tbaa !5
  br label %191

164:                                              ; preds = %140
  %165 = load double, ptr %14, align 8, !tbaa !9
  %166 = fsub double 1.000000e+00, %165
  %167 = call double @sqrt(double noundef %166) #4
  %168 = load double, ptr %14, align 8, !tbaa !9
  %169 = load double, ptr %16, align 8, !tbaa !9
  %170 = fdiv double %168, %169
  %171 = fsub double 1.000000e+00, %170
  %172 = call double @sqrt(double noundef %171) #4
  %173 = fdiv double %167, %172
  %174 = call double @atanh(double noundef %173) #4
  %175 = load double, ptr %15, align 8, !tbaa !9
  %176 = load double, ptr %16, align 8, !tbaa !9
  %177 = load double, ptr %14, align 8, !tbaa !9
  %178 = fsub double %176, %177
  %179 = call double @sqrt(double noundef %178) #4
  %180 = load double, ptr %14, align 8, !tbaa !9
  %181 = fsub double 1.000000e+00, %180
  %182 = call double @sqrt(double noundef %181) #4
  %183 = fadd double %179, %182
  %184 = load double, ptr %16, align 8, !tbaa !9
  %185 = fsub double %184, 1.000000e+00
  %186 = call double @sqrt(double noundef %185) #4
  %187 = fdiv double %183, %186
  %188 = call double @log(double noundef %187) #4
  %189 = fneg double %175
  %190 = call double @llvm.fmuladd.f64(double %189, double %188, double %174)
  store double %190, ptr %20, align 8, !tbaa !9
  store i32 1, ptr %25, align 4, !tbaa !5
  br label %191

191:                                              ; preds = %164, %144
  br label %192

192:                                              ; preds = %191, %137
  br label %193

193:                                              ; preds = %192, %136
  %194 = load double, ptr %20, align 8, !tbaa !9
  %195 = fmul double 3.000000e+00, %194
  %196 = load double, ptr %12, align 8, !tbaa !9
  %197 = fmul double 2.000000e+00, %196
  %198 = fdiv double %195, %197
  store double %198, ptr %23, align 8, !tbaa !9
  %199 = load double, ptr %17, align 8, !tbaa !9
  %200 = load double, ptr %17, align 8, !tbaa !9
  %201 = load double, ptr %16, align 8, !tbaa !9
  %202 = fneg double %201
  %203 = call double @llvm.fmuladd.f64(double %199, double %200, double %202)
  store double %203, ptr %21, align 8, !tbaa !9
  %204 = load double, ptr %15, align 8, !tbaa !9
  %205 = call double @sqrt(double noundef %204) #4
  %206 = fmul double 5.000000e-01, %205
  %207 = load double, ptr %9, align 8, !tbaa !9
  %208 = fdiv double %206, %207
  store double %208, ptr %22, align 8, !tbaa !9
  %209 = load i32, ptr %25, align 4, !tbaa !5
  %210 = sitofp i32 %209 to double
  %211 = load double, ptr %23, align 8, !tbaa !9
  %212 = call double @pow(double noundef %211, double noundef 0x3FE5555555555555) #4
  %213 = fmul double %210, %212
  %214 = call double @airy_cheb_approx(double noundef %213)
  store double %214, ptr %24, align 8, !tbaa !9
  %215 = load i32, ptr %26, align 4, !tbaa !5
  %216 = sitofp i32 %215 to double
  %217 = fmul double %216, 2.000000e+00
  %218 = call double @sqrt(double noundef 0x400921FB54442D18) #4
  %219 = fmul double %217, %218
  %220 = load double, ptr %22, align 8, !tbaa !9
  %221 = fmul double %219, %220
  %222 = load double, ptr %23, align 8, !tbaa !9
  %223 = call double @pow(double noundef %222, double noundef 0x3FC5555555555555) #4
  %224 = fmul double %221, %223
  %225 = load double, ptr %21, align 8, !tbaa !9
  %226 = call double @llvm.fabs.f64(double %225)
  %227 = call double @pow(double noundef %226, double noundef -2.500000e-01) #4
  %228 = fmul double %224, %227
  %229 = load double, ptr %24, align 8, !tbaa !9
  %230 = fmul double %228, %229
  %231 = load double, ptr %17, align 8, !tbaa !9
  %232 = fmul double %230, %231
  %233 = load ptr, ptr %11, align 8, !tbaa !11
  store double %232, ptr %233, align 8, !tbaa !9
  store i32 0, ptr %6, align 4
  store i32 1, ptr %30, align 4
  br label %234

234:                                              ; preds = %193, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, 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 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %235 = load i32, ptr %6, align 4
  ret i32 %235
}

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 = !{!"int", !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 = !{!"any pointer", !7, i64 0}


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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @pow(double noundef, double noundef) local_unnamed_addr #1

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @ClosedModY(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local double @airy_cheb_approx(double noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @hyperspherical_WKB(i32 noundef %0, i32 noundef %1, double noundef %2, double noundef %3, ptr nocapture noundef writeonly %4) local_unnamed_addr #3 {
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store double %3, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store i32 1, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  store i32 1, ptr %8, align 4, !tbaa !9
  %9 = sitofp i32 %1 to double
  %10 = icmp eq i32 %0, 1
  br i1 %10, label %11, label %15

11:                                               ; preds = %5
  %12 = fadd double %2, 4.000000e-01
  %13 = fptosi double %12 to i32
  %14 = call i32 @ClosedModY(i32 noundef %1, i32 noundef %13, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  br label %15

15:                                               ; preds = %11, %5
  %16 = fadd double %9, 1.000000e+00
  %17 = fmul double %16, %9
  %18 = call double @sqrt(double noundef %17) #5
  %19 = fdiv double 1.000000e+00, %18
  %20 = fmul double %19, %2
  %21 = icmp eq i32 %0, -1
  br i1 %21, label %23, label %22

22:                                               ; preds = %15
  br i1 %10, label %58, label %124

23:                                               ; preds = %15
  %24 = load double, ptr %6, align 8, !tbaa !5
  %25 = call double @sinh(double noundef %24) #5
  %26 = fdiv double 1.000000e+00, %20
  %27 = call double @asinh(double noundef %26) #5
  %.06975 = fdiv double 1.000000e+00, %25
  %28 = fdiv double %20, %.06975
  %29 = fmul double %28, %28
  %30 = fmul double %20, %20
  %31 = load double, ptr %6, align 8, !tbaa !5
  %32 = fcmp ogt double %31, %27
  br i1 %32, label %33, label %47

33:                                               ; preds = %23
  %34 = fadd double %29, -1.000000e+00
  %35 = call double @sqrt(double noundef %34) #5
  %36 = fadd double %30, %29
  %sqrt79 = call double @llvm.sqrt.f64(double %36)
  %37 = fadd double %sqrt79, %35
  %38 = fadd double %30, 1.000000e+00
  %sqrt = call double @llvm.sqrt.f64(double %38)
  %39 = fdiv double %37, %sqrt
  %40 = call double @log(double noundef %39) #5
  %41 = fdiv double %36, %34
  %42 = call double @sqrt(double noundef %41) #5
  %43 = fmul double %26, %42
  %44 = call double @atan(double noundef %43) #5
  %45 = call double @llvm.fmuladd.f64(double %20, double %40, double %44)
  %46 = fadd double %45, 0xBFF921FB54442D18
  br label %99

47:                                               ; preds = %23
  %48 = fsub double 1.000000e+00, %29
  %49 = call double @sqrt(double noundef %48) #5
  %50 = fdiv double %29, %30
  %51 = fadd double %50, 1.000000e+00
  %sqrt80 = call double @llvm.sqrt.f64(double %51)
  %52 = fdiv double %49, %sqrt80
  %53 = call double @atanh(double noundef %52) #5
  %54 = fdiv double %52, %20
  %55 = call double @atan(double noundef %54) #5
  %56 = fneg double %20
  %57 = call double @llvm.fmuladd.f64(double %56, double %55, double %53)
  br label %99

58:                                               ; preds = %22
  %59 = load double, ptr %6, align 8, !tbaa !5
  %60 = call double @sin(double noundef %59) #5
  %61 = fdiv double 1.000000e+00, %20
  %62 = call double @asin(double noundef %61) #5
  %.069 = fdiv double 1.000000e+00, %60
  %63 = fdiv double %20, %.069
  %64 = fmul double %63, %63
  %65 = fmul double %20, %20
  %66 = load double, ptr %6, align 8, !tbaa !5
  %67 = fcmp ogt double %66, %62
  br i1 %67, label %68, label %81

68:                                               ; preds = %58
  %69 = fdiv double %64, %65
  %70 = fsub double 1.000000e+00, %69
  %71 = call double @sqrt(double noundef %70) #5
  %72 = fadd double %64, -1.000000e+00
  %73 = call double @sqrt(double noundef %72) #5
  %74 = fdiv double %71, %73
  %75 = call double @atan(double noundef %74) #5
  %76 = fmul double %20, %74
  %77 = fdiv double 1.000000e+00, %76
  %78 = call double @atan(double noundef %77) #5
  %79 = call double @llvm.fmuladd.f64(double %20, double %78, double %75)
  %80 = fadd double %79, 0xBFF921FB54442D18
  br label %99

81:                                               ; preds = %58
  %82 = fsub double 1.000000e+00, %64
  %83 = call double @sqrt(double noundef %82) #5
  %84 = fdiv double %64, %65
  %85 = fsub double 1.000000e+00, %84
  %86 = call double @sqrt(double noundef %85) #5
  %87 = fdiv double %83, %86
  %88 = call double @atanh(double noundef %87) #5
  %89 = fsub double %65, %64
  %90 = call double @sqrt(double noundef %89) #5
  %91 = call double @sqrt(double noundef %82) #5
  %92 = fadd double %90, %91
  %93 = fadd double %65, -1.000000e+00
  %94 = call double @sqrt(double noundef %93) #5
  %95 = fdiv double %92, %94
  %96 = call double @log(double noundef %95) #5
  %97 = fneg double %20
  %98 = call double @llvm.fmuladd.f64(double %97, double %96, double %88)
  br label %99

99:                                               ; preds = %81, %68, %33, %47
  %100 = phi double [ %30, %33 ], [ %30, %47 ], [ %65, %68 ], [ %65, %81 ]
  %.06977 = phi double [ %.06975, %33 ], [ %.06975, %47 ], [ %.069, %68 ], [ %.069, %81 ]
  %.072 = phi double [ %46, %33 ], [ %57, %47 ], [ %80, %68 ], [ %98, %81 ]
  %.070 = phi double [ -1.000000e+00, %33 ], [ 1.000000e+00, %47 ], [ -1.000000e+00, %68 ], [ 1.000000e+00, %81 ]
  %101 = fmul double %.072, 3.000000e+00
  %102 = fmul double %19, 2.000000e+00
  %103 = fdiv double %101, %102
  %104 = fneg double %100
  %105 = call double @llvm.fmuladd.f64(double %.06977, double %.06977, double %104)
  %106 = call double @sqrt(double noundef %20) #5
  %107 = fmul double %106, 5.000000e-01
  %108 = fdiv double %107, %2
  %109 = call double @pow(double noundef %103, double noundef 0x3FE5555555555555) #5
  %110 = fmul double %.070, %109
  %111 = call double @airy_cheb_approx(double noundef %110)
  %112 = load i32, ptr %7, align 4, !tbaa !9
  %113 = sitofp i32 %112 to double
  %114 = fmul double %113, 2.000000e+00
  %115 = fmul double %114, 0x3FFC5BF891B4EF6A
  %116 = fmul double %108, %115
  %117 = call double @pow(double noundef %103, double noundef 0x3FC5555555555555) #5
  %118 = fmul double %117, %116
  %119 = call double @llvm.fabs.f64(double %105)
  %120 = call double @pow(double noundef %119, double noundef -2.500000e-01) #5
  %121 = fmul double %120, %118
  %122 = fmul double %111, %121
  %123 = fmul double %.06977, %122
  store double %123, ptr %4, align 8, !tbaa !5
  br label %124

124:                                              ; preds = %22, %99
  %.0 = phi i32 [ 0, %99 ], [ 1, %22 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  ret i32 %.0
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress 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 = { 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 = !{!"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}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass