; LLVM IR from chrr/libECP :: src (gc_integrators)

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

%struct.GCIntegrationTable = type { i32, i32, ptr, ptr, double, double, i32, i32 }

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #1

; 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) #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @initGridGC_PSM92(i32 noundef %0, double noundef %1) #4 {
  %3 = alloca i32, align 4
  %4 = alloca double, align 8
  %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 double, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %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 ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  %25 = sitofp i32 %24 to double
  %26 = call double @log(double noundef %25) #5
  %27 = call double @log(double noundef 2.000000e+00) #5
  %28 = fdiv double %26, %27
  %29 = call double @llvm.floor.f64(double %28)
  %30 = call double @pow(double noundef 2.000000e+00, double noundef %29) #5
  %31 = fsub double %30, 1.000000e+00
  %32 = fptosi double %31 to i32
  store i32 %32, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %33 = load i32, ptr %5, align 4, !tbaa !5
  %34 = sitofp i32 %33 to double
  %35 = call double @log(double noundef %34) #5
  %36 = call double @log(double noundef 2.000000e+00) #5
  %37 = fdiv double %35, %36
  %38 = call double @llvm.floor.f64(double %37)
  %39 = fptosi double %38 to i32
  store i32 %39, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %40 = load i32, ptr %6, align 4, !tbaa !5
  %41 = sitofp i32 %40 to double
  %42 = call double @pow(double noundef 2.000000e+00, double noundef %41) #5
  %43 = fptosi double %42 to i32
  store i32 %43, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = sub nsw i32 %44, 1
  %46 = sdiv i32 %45, 2
  store i32 %46, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %47 = load i32, ptr %9, align 4, !tbaa !5
  %48 = sitofp i32 %47 to double
  %49 = fadd double %48, 1.000000e+00
  store double %49, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store double 1.000000e+00, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store double 0.000000e+00, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %50 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 48) #6
  store ptr %50, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = call noalias ptr @calloc(i64 noundef %52, i64 noundef 8) #6
  %54 = load ptr, ptr %20, align 8, !tbaa !11
  %55 = getelementptr inbounds %struct.GCIntegrationTable, ptr %54, i32 0, i32 2
  store ptr %53, ptr %55, align 8, !tbaa !13
  store ptr %53, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = call noalias ptr @calloc(i64 noundef %57, i64 noundef 8) #6
  %59 = load ptr, ptr %20, align 8, !tbaa !11
  %60 = getelementptr inbounds %struct.GCIntegrationTable, ptr %59, i32 0, i32 3
  store ptr %58, ptr %60, align 8, !tbaa !15
  store ptr %58, ptr %22, align 8, !tbaa !11
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = load ptr, ptr %20, align 8, !tbaa !11
  %63 = getelementptr inbounds %struct.GCIntegrationTable, ptr %62, i32 0, i32 1
  store i32 %61, ptr %63, align 4, !tbaa !16
  %64 = load ptr, ptr %20, align 8, !tbaa !11
  %65 = getelementptr inbounds %struct.GCIntegrationTable, ptr %64, i32 0, i32 0
  store i32 %61, ptr %65, align 8, !tbaa !17
  %66 = load ptr, ptr %20, align 8, !tbaa !11
  %67 = getelementptr inbounds %struct.GCIntegrationTable, ptr %66, i32 0, i32 6
  store i32 0, ptr %67, align 8, !tbaa !18
  %68 = load i32, ptr %5, align 4, !tbaa !5
  %69 = sub nsw i32 %68, 1
  %70 = load ptr, ptr %20, align 8, !tbaa !11
  %71 = getelementptr inbounds %struct.GCIntegrationTable, ptr %70, i32 0, i32 7
  store i32 %69, ptr %71, align 4, !tbaa !19
  %72 = load double, ptr %4, align 8, !tbaa !9
  %73 = load ptr, ptr %20, align 8, !tbaa !11
  %74 = getelementptr inbounds %struct.GCIntegrationTable, ptr %73, i32 0, i32 4
  store double %72, ptr %74, align 8, !tbaa !20
  %75 = load ptr, ptr %21, align 8, !tbaa !11
  %76 = load i32, ptr %8, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds double, ptr %75, i64 %77
  store double 0.000000e+00, ptr %78, align 8, !tbaa !9
  %79 = load ptr, ptr %22, align 8, !tbaa !11
  %80 = load i32, ptr %8, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds double, ptr %79, i64 %81
  store double 1.000000e+00, ptr %82, align 8, !tbaa !9
  br label %83

83:                                               ; preds = %174, %2
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = load i32, ptr %8, align 4, !tbaa !5
  %86 = icmp sle i32 %84, %85
  br i1 %86, label %87, label %181

87:                                               ; preds = %83
  %88 = load double, ptr %14, align 8, !tbaa !9
  store double %88, ptr %16, align 8, !tbaa !9
  %89 = load double, ptr %13, align 8, !tbaa !9
  store double %89, ptr %15, align 8, !tbaa !9
  %90 = load double, ptr %16, align 8, !tbaa !9
  %91 = fadd double 1.000000e+00, %90
  %92 = fdiv double %91, 2.000000e+00
  %93 = call double @sqrt(double noundef %92) #5
  store double %93, ptr %14, align 8, !tbaa !9
  %94 = load double, ptr %15, align 8, !tbaa !9
  %95 = load double, ptr %14, align 8, !tbaa !9
  %96 = fmul double 2.000000e+00, %95
  %97 = fdiv double %94, %96
  store double %97, ptr %13, align 8, !tbaa !9
  %98 = load double, ptr %13, align 8, !tbaa !9
  store double %98, ptr %17, align 8, !tbaa !9
  %99 = load double, ptr %14, align 8, !tbaa !9
  store double %99, ptr %18, align 8, !tbaa !9
  %100 = load i32, ptr %7, align 4, !tbaa !5
  %101 = sdiv i32 %100, 2
  store i32 %101, ptr %7, align 4, !tbaa !5
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %171, %87
  %103 = load i32, ptr %11, align 4, !tbaa !5
  %104 = load i32, ptr %9, align 4, !tbaa !5
  %105 = icmp sle i32 %103, %104
  br i1 %105, label %106, label %174

106:                                              ; preds = %102
  %107 = load double, ptr %17, align 8, !tbaa !9
  %108 = fmul double 2.000000e+00, %107
  %109 = load double, ptr %17, align 8, !tbaa !9
  %110 = call double @llvm.fmuladd.f64(double %108, double %109, double 3.000000e+00)
  %111 = fmul double 0x3FCB2995E7B7B604, %110
  %112 = load double, ptr %17, align 8, !tbaa !9
  %113 = fmul double %111, %112
  %114 = load double, ptr %18, align 8, !tbaa !9
  %115 = call double @llvm.fmuladd.f64(double %113, double %114, double 1.000000e+00)
  %116 = load i32, ptr %11, align 4, !tbaa !5
  %117 = sitofp i32 %116 to double
  %118 = load double, ptr %10, align 8, !tbaa !9
  %119 = fdiv double %117, %118
  %120 = fsub double %115, %119
  store double %120, ptr %19, align 8, !tbaa !9
  %121 = load i32, ptr %11, align 4, !tbaa !5
  %122 = load i32, ptr %7, align 4, !tbaa !5
  %123 = mul nsw i32 %121, %122
  %124 = sub nsw i32 %123, 1
  store i32 %124, ptr %12, align 4, !tbaa !5
  %125 = load double, ptr %19, align 8, !tbaa !9
  %126 = load ptr, ptr %21, align 8, !tbaa !11
  %127 = load i32, ptr %5, align 4, !tbaa !5
  %128 = load i32, ptr %12, align 4, !tbaa !5
  %129 = sub nsw i32 %127, %128
  %130 = sub nsw i32 %129, 1
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds double, ptr %126, i64 %131
  store double %125, ptr %132, align 8, !tbaa !9
  %133 = load double, ptr %19, align 8, !tbaa !9
  %134 = fneg double %133
  %135 = load ptr, ptr %21, align 8, !tbaa !11
  %136 = load i32, ptr %12, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds double, ptr %135, i64 %137
  store double %134, ptr %138, align 8, !tbaa !9
  %139 = load double, ptr %17, align 8, !tbaa !9
  %140 = load double, ptr %17, align 8, !tbaa !9
  %141 = fmul double %139, %140
  %142 = load double, ptr %17, align 8, !tbaa !9
  %143 = fmul double %141, %142
  %144 = load double, ptr %17, align 8, !tbaa !9
  %145 = fmul double %143, %144
  %146 = load ptr, ptr %22, align 8, !tbaa !11
  %147 = load i32, ptr %12, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds double, ptr %146, i64 %148
  store double %145, ptr %149, align 8, !tbaa !9
  %150 = load ptr, ptr %22, align 8, !tbaa !11
  %151 = load i32, ptr %5, align 4, !tbaa !5
  %152 = load i32, ptr %12, align 4, !tbaa !5
  %153 = sub nsw i32 %151, %152
  %154 = sub nsw i32 %153, 1
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds double, ptr %150, i64 %155
  store double %145, ptr %156, align 8, !tbaa !9
  %157 = load double, ptr %17, align 8, !tbaa !9
  store double %157, ptr %19, align 8, !tbaa !9
  %158 = load double, ptr %17, align 8, !tbaa !9
  %159 = load double, ptr %16, align 8, !tbaa !9
  %160 = load double, ptr %18, align 8, !tbaa !9
  %161 = load double, ptr %15, align 8, !tbaa !9
  %162 = fmul double %160, %161
  %163 = call double @llvm.fmuladd.f64(double %158, double %159, double %162)
  store double %163, ptr %17, align 8, !tbaa !9
  %164 = load double, ptr %18, align 8, !tbaa !9
  %165 = load double, ptr %16, align 8, !tbaa !9
  %166 = load double, ptr %19, align 8, !tbaa !9
  %167 = load double, ptr %15, align 8, !tbaa !9
  %168 = fmul double %166, %167
  %169 = fneg double %168
  %170 = call double @llvm.fmuladd.f64(double %164, double %165, double %169)
  store double %170, ptr %18, align 8, !tbaa !9
  br label %171

171:                                              ; preds = %106
  %172 = load i32, ptr %11, align 4, !tbaa !5
  %173 = add nsw i32 %172, 2
  store i32 %173, ptr %11, align 4, !tbaa !5
  br label %102, !llvm.loop !21

174:                                              ; preds = %102
  %175 = load i32, ptr %9, align 4, !tbaa !5
  %176 = mul nsw i32 2, %175
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %9, align 4, !tbaa !5
  %178 = load i32, ptr %9, align 4, !tbaa !5
  %179 = sitofp i32 %178 to double
  %180 = fadd double %179, 1.000000e+00
  store double %180, ptr %10, align 8, !tbaa !9
  br label %83, !llvm.loop !23

181:                                              ; preds = %83
  %182 = load ptr, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret ptr %182
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind allocsize(0,1) "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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { nounwind }
attributes #6 = { nounwind allocsize(0,1) }

!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}
!13 = !{!14, !12, i64 8}
!14 = !{!"", !6, i64 0, !6, i64 4, !12, i64 8, !12, i64 16, !10, i64 24, !10, i64 32, !6, i64 40, !6, i64 44}
!15 = !{!14, !12, i64 16}
!16 = !{!14, !6, i64 4}
!17 = !{!14, !6, i64 0}
!18 = !{!14, !6, i64 40}
!19 = !{!14, !6, i64 44}
!20 = !{!14, !10, i64 24}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}


; 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 nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local noalias noundef ptr @initGridGC_PSM92(i32 noundef %0, double noundef %1) local_unnamed_addr #3 {
  %3 = add nsw i32 %0, 1
  %4 = sitofp i32 %3 to double
  %5 = tail call double @log(double noundef %4) #5
  %6 = fdiv double %5, 0x3FE62E42FEFA39EF
  %7 = tail call double @llvm.floor.f64(double %6)
  %exp2 = tail call double @exp2(double %7) #5
  %8 = fadd double %exp2, -1.000000e+00
  %9 = fptosi double %8 to i32
  %10 = sitofp i32 %9 to double
  %11 = tail call double @log(double noundef %10) #5
  %12 = fdiv double %11, 0x3FE62E42FEFA39EF
  %13 = tail call double @llvm.floor.f64(double %12)
  %14 = fptosi double %13 to i32
  %ldexp = tail call double @ldexp(double 1.000000e+00, i32 %14) #5
  %15 = add nsw i32 %9, -1
  %16 = sdiv i32 %15, 2
  %17 = tail call noalias dereferenceable_or_null(48) ptr @calloc(i64 noundef 1, i64 noundef 48) #6
  %18 = sext i32 %9 to i64
  %19 = tail call noalias ptr @calloc(i64 noundef %18, i64 noundef 8) #6
  %20 = getelementptr inbounds i8, ptr %17, i64 8
  store ptr %19, ptr %20, align 8, !tbaa !5
  %21 = tail call noalias ptr @calloc(i64 noundef %18, i64 noundef 8) #6
  %22 = getelementptr inbounds i8, ptr %17, i64 16
  store ptr %21, ptr %22, align 8, !tbaa !12
  %23 = getelementptr inbounds i8, ptr %17, i64 4
  store i32 %9, ptr %23, align 4, !tbaa !13
  store i32 %9, ptr %17, align 8, !tbaa !14
  %24 = getelementptr inbounds i8, ptr %17, i64 44
  store i32 %15, ptr %24, align 4, !tbaa !15
  %25 = getelementptr inbounds i8, ptr %17, i64 24
  store double %1, ptr %25, align 8, !tbaa !16
  %26 = sext i32 %16 to i64
  %27 = getelementptr inbounds double, ptr %21, i64 %26
  store double 1.000000e+00, ptr %27, align 8, !tbaa !17
  %.not81 = icmp slt i32 %9, 3
  br i1 %.not81, label %._crit_edge89, label %.lr.ph88.preheader

.lr.ph88.preheader:                               ; preds = %2
  %28 = fptosi double %ldexp to i32
  br label %.lr.ph88

.lr.ph88:                                         ; preds = %.lr.ph88.preheader, %._crit_edge
  %.086 = phi i32 [ %34, %._crit_edge ], [ %28, %.lr.ph88.preheader ]
  %.06985 = phi i32 [ %65, %._crit_edge ], [ 1, %.lr.ph88.preheader ]
  %.07084 = phi double [ %67, %._crit_edge ], [ 2.000000e+00, %.lr.ph88.preheader ]
  %.07483 = phi double [ %33, %._crit_edge ], [ 1.000000e+00, %.lr.ph88.preheader ]
  %.07582 = phi double [ %31, %._crit_edge ], [ 0.000000e+00, %.lr.ph88.preheader ]
  %29 = fadd double %.07582, 1.000000e+00
  %30 = fmul double %29, 5.000000e-01
  %31 = tail call double @sqrt(double noundef %30) #5
  %32 = fmul double %31, 2.000000e+00
  %33 = fdiv double %.07483, %32
  %34 = sdiv i32 %.086, 2
  %.not7677 = icmp slt i32 %.06985, 1
  br i1 %.not7677, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph88
  %35 = sext i32 %34 to i64
  %36 = zext nneg i32 %.06985 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %.07279 = phi double [ %31, %.lr.ph.preheader ], [ %63, %.lr.ph ]
  %.07378 = phi double [ %33, %.lr.ph.preheader ], [ %60, %.lr.ph ]
  %37 = fmul double %.07378, 2.000000e+00
  %38 = tail call double @llvm.fmuladd.f64(double %37, double %.07378, double 3.000000e+00)
  %39 = fmul double %38, 0x3FCB2995E7B7B604
  %40 = fmul double %.07378, %39
  %41 = tail call double @llvm.fmuladd.f64(double %40, double %.07279, double 1.000000e+00)
  %42 = trunc nuw nsw i64 %indvars.iv to i32
  %43 = uitofp nneg i32 %42 to double
  %44 = fdiv double %43, %.07084
  %45 = fsub double %41, %44
  %46 = mul nsw i64 %indvars.iv, %35
  %47 = add nsw i64 %46, -1
  %48 = trunc nsw i64 %46 to i32
  %49 = sub i32 %9, %48
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds double, ptr %19, i64 %50
  store double %45, ptr %51, align 8, !tbaa !17
  %52 = fneg double %45
  %53 = getelementptr inbounds double, ptr %19, i64 %47
  store double %52, ptr %53, align 8, !tbaa !17
  %54 = fmul double %.07378, %.07378
  %55 = fmul double %.07378, %54
  %56 = fmul double %.07378, %55
  %57 = getelementptr inbounds double, ptr %21, i64 %47
  store double %56, ptr %57, align 8, !tbaa !17
  %58 = getelementptr inbounds double, ptr %21, i64 %50
  store double %56, ptr %58, align 8, !tbaa !17
  %59 = fmul double %.07483, %.07279
  %60 = tail call double @llvm.fmuladd.f64(double %.07378, double %.07582, double %59)
  %61 = fneg double %.07378
  %62 = fmul double %.07483, %61
  %63 = tail call double @llvm.fmuladd.f64(double %.07279, double %.07582, double %62)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 2
  %.not76 = icmp ugt i64 %indvars.iv.next, %36
  br i1 %.not76, label %._crit_edge, label %.lr.ph, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph88
  %64 = shl nsw i32 %.06985, 1
  %65 = or disjoint i32 %64, 1
  %66 = sitofp i32 %65 to double
  %67 = fadd double %66, 1.000000e+00
  %.not.not = icmp slt i32 %64, %16
  br i1 %.not.not, label %.lr.ph88, label %._crit_edge89, !llvm.loop !20

._crit_edge89:                                    ; preds = %._crit_edge, %2
  ret ptr %17
}

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

declare double @exp2(double) local_unnamed_addr

; Function Attrs: nofree willreturn
declare double @ldexp(double, i32) local_unnamed_addr #4

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 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 = { nofree willreturn }
attributes #5 = { nounwind }
attributes #6 = { nounwind allocsize(0,1) }

!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, !10, i64 8}
!6 = !{!"", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !11, i64 24, !11, i64 32, !7, i64 40, !7, i64 44}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!6, !10, i64 16}
!13 = !{!6, !7, i64 4}
!14 = !{!6, !7, i64 0}
!15 = !{!6, !7, i64 44}
!16 = !{!6, !11, i64 24}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


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