; LLVM IR from bbenligiray/stag :: src/Ellipse.ll (ZN13customEllipse11GetDistanceEddRd)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.customEllipse = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i32, ptr, ptr, ptr, ptr, ptr, ptr }

; 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN13customEllipse28NewtonRaphsonThetaEstimationEddd(ptr noundef nonnull align 8 dereferenceable(272), double noundef, double noundef, double noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN13customEllipse11GetDistanceEddRd(ptr noundef nonnull align 8 dereferenceable(272) %0, double noundef %1, double noundef %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #3 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [4 x double], align 16
  %10 = alloca [4 x double], align 16
  %11 = alloca [4 x double], align 16
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca [4 x double], align 16
  %15 = alloca [4 x double], align 16
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store double %1, ptr %6, align 8, !tbaa !9
  store double %2, ptr %7, align 8, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  %20 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 32, 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
  %21 = load double, ptr %6, align 8, !tbaa !9
  %22 = getelementptr inbounds %class.customEllipse, ptr %20, i32 0, i32 18
  %23 = load double, ptr %22, align 8, !tbaa !11
  %24 = fsub double %21, %23
  store double %24, ptr %16, align 8, !tbaa !9
  %25 = load double, ptr %7, align 8, !tbaa !9
  %26 = getelementptr inbounds %class.customEllipse, ptr %20, i32 0, i32 19
  %27 = load double, ptr %26, align 8, !tbaa !14
  %28 = fsub double %25, %27
  store double %28, ptr %17, align 8, !tbaa !9
  %29 = getelementptr inbounds %class.customEllipse, ptr %20, i32 0, i32 23
  %30 = load double, ptr %29, align 8, !tbaa !15
  %31 = fcmp une double %30, 0.000000e+00
  br i1 %31, label %32, label %60

32:                                               ; preds = %4
  %33 = load double, ptr %16, align 8, !tbaa !9
  %34 = getelementptr inbounds %class.customEllipse, ptr %20, i32 0, i32 23
  %35 = load double, ptr %34, align 8, !tbaa !15
  %36 = fneg double %35
  %37 = call double @cos(double noundef %36) #5
  %38 = load double, ptr %17, align 8, !tbaa !9
  %39 = getelementptr inbounds %class.customEllipse, ptr %20, i32 0, i32 23
  %40 = load double, ptr %39, align 8, !tbaa !15
  %41 = fneg double %40
  %42 = call double @sin(double noundef %41) #5
  %43 = fmul double %38, %42
  %44 = fneg double %43
  %45 = call double @llvm.fmuladd.f64(double %33, double %37, double %44)
  store double %45, ptr %12, align 8, !tbaa !9
  %46 = load double, ptr %16, align 8, !tbaa !9
  %47 = getelementptr inbounds %class.customEllipse, ptr %20, i32 0, i32 23
  %48 = load double, ptr %47, align 8, !tbaa !15
  %49 = fneg double %48
  %50 = call double @sin(double noundef %49) #5
  %51 = load double, ptr %17, align 8, !tbaa !9
  %52 = getelementptr inbounds %class.customEllipse, ptr %20, i32 0, i32 23
  %53 = load double, ptr %52, align 8, !tbaa !15
  %54 = fneg double %53
  %55 = call double @cos(double noundef %54) #5
  %56 = fmul double %51, %55
  %57 = call double @llvm.fmuladd.f64(double %46, double %50, double %56)
  store double %57, ptr %13, align 8, !tbaa !9
  %58 = load double, ptr %12, align 8, !tbaa !9
  store double %58, ptr %16, align 8, !tbaa !9
  %59 = load double, ptr %13, align 8, !tbaa !9
  store double %59, ptr %17, align 8, !tbaa !9
  br label %60

60:                                               ; preds = %32, %4
  %61 = getelementptr inbounds %class.customEllipse, ptr %20, i32 0, i32 20
  %62 = load double, ptr %61, align 8, !tbaa !16
  %63 = load double, ptr %13, align 8, !tbaa !9
  %64 = fmul double %62, %63
  %65 = getelementptr inbounds %class.customEllipse, ptr %20, i32 0, i32 21
  %66 = load double, ptr %65, align 8, !tbaa !17
  %67 = fdiv double %64, %66
  %68 = load double, ptr %12, align 8, !tbaa !9
  %69 = fmul double %67, %68
  %70 = call double @atan(double noundef %69) #5
  %71 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 0
  store double %70, ptr %71, align 16, !tbaa !9
  %72 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 0
  %73 = load double, ptr %72, align 16, !tbaa !9
  %74 = fadd double %73, 1.570700e+00
  %75 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 1
  store double %74, ptr %75, align 8, !tbaa !9
  %76 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 0
  %77 = load double, ptr %76, align 16, !tbaa !9
  %78 = fadd double %77, 0x400921FB53C8D4F1
  %79 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 2
  store double %78, ptr %79, align 16, !tbaa !9
  %80 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 0
  %81 = load double, ptr %80, align 16, !tbaa !9
  %82 = fadd double %81, 4.712300e+00
  %83 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 3
  store double %82, ptr %83, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !18
  br label %84

84:                                               ; preds = %147, %60
  %85 = load i32, ptr %19, align 4, !tbaa !18
  %86 = icmp slt i32 %85, 4
  br i1 %86, label %88, label %87

87:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %150

88:                                               ; preds = %84
  %89 = load i32, ptr %19, align 4, !tbaa !18
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !9
  %93 = load double, ptr %12, align 8, !tbaa !9
  %94 = load double, ptr %13, align 8, !tbaa !9
  %95 = call noundef double @_ZN13customEllipse28NewtonRaphsonThetaEstimationEddd(ptr noundef nonnull align 8 dereferenceable(272) %20, double noundef %92, double noundef %93, double noundef %94)
  %96 = load i32, ptr %19, align 4, !tbaa !18
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [4 x double], ptr %10, i64 0, i64 %97
  store double %95, ptr %98, align 8, !tbaa !9
  %99 = getelementptr inbounds %class.customEllipse, ptr %20, i32 0, i32 20
  %100 = load double, ptr %99, align 8, !tbaa !16
  %101 = load i32, ptr %19, align 4, !tbaa !18
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [4 x double], ptr %10, i64 0, i64 %102
  %104 = load double, ptr %103, align 8, !tbaa !9
  %105 = call double @cos(double noundef %104) #5
  %106 = fmul double %100, %105
  %107 = load i32, ptr %19, align 4, !tbaa !18
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [4 x double], ptr %14, i64 0, i64 %108
  store double %106, ptr %109, align 8, !tbaa !9
  %110 = getelementptr inbounds %class.customEllipse, ptr %20, i32 0, i32 21
  %111 = load double, ptr %110, align 8, !tbaa !17
  %112 = load i32, ptr %19, align 4, !tbaa !18
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [4 x double], ptr %10, i64 0, i64 %113
  %115 = load double, ptr %114, align 8, !tbaa !9
  %116 = call double @sin(double noundef %115) #5
  %117 = fmul double %111, %116
  %118 = load i32, ptr %19, align 4, !tbaa !18
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [4 x double], ptr %15, i64 0, i64 %119
  store double %117, ptr %120, align 8, !tbaa !9
  %121 = load double, ptr %16, align 8, !tbaa !9
  %122 = load double, ptr %17, align 8, !tbaa !9
  %123 = load i32, ptr %19, align 4, !tbaa !18
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [4 x double], ptr %14, i64 0, i64 %124
  %126 = load double, ptr %125, align 8, !tbaa !9
  %127 = load i32, ptr %19, align 4, !tbaa !18
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [4 x double], ptr %15, i64 0, i64 %128
  %130 = load double, ptr %129, align 8, !tbaa !9
  %131 = call noundef double @_ZN13customEllipse16DistanceBwPointsEdddd(ptr noundef nonnull align 8 dereferenceable(272) %20, double noundef %121, double noundef %122, double noundef %126, double noundef %130)
  %132 = load i32, ptr %19, align 4, !tbaa !18
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [4 x double], ptr %11, i64 0, i64 %133
  store double %131, ptr %134, align 8, !tbaa !9
  %135 = load i32, ptr %19, align 4, !tbaa !18
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [4 x double], ptr %11, i64 0, i64 %136
  %138 = load double, ptr %137, align 8, !tbaa !9
  %139 = load i32, ptr %18, align 4, !tbaa !18
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [4 x double], ptr %11, i64 0, i64 %140
  %142 = load double, ptr %141, align 8, !tbaa !9
  %143 = fcmp olt double %138, %142
  br i1 %143, label %144, label %146

144:                                              ; preds = %88
  %145 = load i32, ptr %19, align 4, !tbaa !18
  store i32 %145, ptr %18, align 4, !tbaa !18
  br label %146

146:                                              ; preds = %144, %88
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %19, align 4, !tbaa !18
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %19, align 4, !tbaa !18
  br label %84, !llvm.loop !19

150:                                              ; preds = %87
  %151 = load i32, ptr %18, align 4, !tbaa !18
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [4 x double], ptr %10, i64 0, i64 %152
  %154 = load double, ptr %153, align 8, !tbaa !9
  %155 = load ptr, ptr %8, align 8, !tbaa !5
  store double %154, ptr %155, align 8, !tbaa !9
  %156 = load i32, ptr %18, align 4, !tbaa !18
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [4 x double], ptr %11, i64 0, i64 %157
  %159 = load double, ptr %158, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, 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 32, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  ret double %159
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN13customEllipse16DistanceBwPointsEdddd(ptr noundef nonnull align 8 dereferenceable(272), double noundef, double noundef, double noundef, double noundef) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 144}
!12 = !{!"_ZTS13customEllipse", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !13, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !10, i64 152}
!15 = !{!12, !10, i64 184}
!16 = !{!12, !10, i64 160}
!17 = !{!12, !10, i64 168}
!18 = !{!13, !13, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"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"

; 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 nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN13customEllipse28NewtonRaphsonThetaEstimationEddd(ptr noundef nonnull align 8 dereferenceable(272), double noundef, double noundef, double noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN13customEllipse11GetDistanceEddRd(ptr noundef nonnull align 8 dereferenceable(272) %0, double noundef %1, double noundef %2, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %3) local_unnamed_addr #3 align 2 {
  %5 = alloca [4 x double], align 16
  %6 = alloca [4 x double], align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  %7 = getelementptr inbounds i8, ptr %0, i64 144
  %8 = load double, ptr %7, align 8, !tbaa !5
  %9 = fsub double %1, %8
  %10 = getelementptr inbounds i8, ptr %0, i64 152
  %11 = load double, ptr %10, align 8, !tbaa !12
  %12 = fsub double %2, %11
  %13 = getelementptr inbounds i8, ptr %0, i64 184
  %14 = load double, ptr %13, align 8, !tbaa !13
  %15 = fcmp une double %14, 0.000000e+00
  br i1 %15, label %16, label %29

16:                                               ; preds = %4
  %17 = tail call double @cos(double %14)
  %18 = load double, ptr %13, align 8, !tbaa !13
  %19 = tail call double @sin(double %18)
  %20 = fmul double %12, %19
  %21 = tail call double @llvm.fmuladd.f64(double %9, double %17, double %20)
  %22 = load double, ptr %13, align 8, !tbaa !13
  %23 = tail call double @sin(double %22)
  %24 = fneg double %23
  %25 = load double, ptr %13, align 8, !tbaa !13
  %26 = tail call double @cos(double %25)
  %27 = fmul double %12, %26
  %28 = tail call double @llvm.fmuladd.f64(double %9, double %24, double %27)
  br label %29

29:                                               ; preds = %16, %4
  %.035 = phi double [ %21, %16 ], [ undef, %4 ]
  %.034 = phi double [ %28, %16 ], [ undef, %4 ]
  %.033 = phi double [ %21, %16 ], [ %9, %4 ]
  %.032 = phi double [ %28, %16 ], [ %12, %4 ]
  %30 = getelementptr inbounds i8, ptr %0, i64 160
  %31 = load double, ptr %30, align 8, !tbaa !14
  %32 = fmul double %.034, %31
  %33 = getelementptr inbounds i8, ptr %0, i64 168
  %34 = load double, ptr %33, align 8, !tbaa !15
  %35 = fdiv double %32, %34
  %36 = fmul double %.035, %35
  %37 = tail call double @atan(double noundef %36) #5
  %38 = fadd double %37, 1.570700e+00
  %39 = fadd double %37, 0x400921FB53C8D4F1
  %40 = fadd double %37, 4.712300e+00
  %41 = tail call noundef double @_ZN13customEllipse28NewtonRaphsonThetaEstimationEddd(ptr noundef nonnull align 8 dereferenceable(272) %0, double noundef %37, double noundef %.035, double noundef %.034)
  store double %41, ptr %5, align 16, !tbaa !16
  %42 = load double, ptr %30, align 8, !tbaa !14
  %43 = tail call double @cos(double noundef %41) #5
  %44 = fmul double %42, %43
  %45 = load double, ptr %33, align 8, !tbaa !15
  %46 = tail call double @sin(double noundef %41) #5
  %47 = fmul double %45, %46
  %48 = tail call noundef double @_ZN13customEllipse16DistanceBwPointsEdddd(ptr noundef nonnull align 8 dereferenceable(272) %0, double noundef %.033, double noundef %.032, double noundef %44, double noundef %47)
  store double %48, ptr %6, align 16, !tbaa !16
  %49 = tail call noundef double @_ZN13customEllipse28NewtonRaphsonThetaEstimationEddd(ptr noundef nonnull align 8 dereferenceable(272) %0, double noundef %38, double noundef %.035, double noundef %.034)
  %50 = getelementptr inbounds i8, ptr %5, i64 8
  store double %49, ptr %50, align 8, !tbaa !16
  %51 = load double, ptr %30, align 8, !tbaa !14
  %52 = tail call double @cos(double noundef %49) #5
  %53 = fmul double %51, %52
  %54 = load double, ptr %33, align 8, !tbaa !15
  %55 = tail call double @sin(double noundef %49) #5
  %56 = fmul double %54, %55
  %57 = tail call noundef double @_ZN13customEllipse16DistanceBwPointsEdddd(ptr noundef nonnull align 8 dereferenceable(272) %0, double noundef %.033, double noundef %.032, double noundef %53, double noundef %56)
  %58 = getelementptr inbounds i8, ptr %6, i64 8
  store double %57, ptr %58, align 8, !tbaa !16
  %59 = fcmp olt double %57, %48
  %.1.1 = zext i1 %59 to i32
  %60 = tail call noundef double @_ZN13customEllipse28NewtonRaphsonThetaEstimationEddd(ptr noundef nonnull align 8 dereferenceable(272) %0, double noundef %39, double noundef %.035, double noundef %.034)
  %61 = getelementptr inbounds i8, ptr %5, i64 16
  store double %60, ptr %61, align 16, !tbaa !16
  %62 = load double, ptr %30, align 8, !tbaa !14
  %63 = tail call double @cos(double noundef %60) #5
  %64 = fmul double %62, %63
  %65 = load double, ptr %33, align 8, !tbaa !15
  %66 = tail call double @sin(double noundef %60) #5
  %67 = fmul double %65, %66
  %68 = tail call noundef double @_ZN13customEllipse16DistanceBwPointsEdddd(ptr noundef nonnull align 8 dereferenceable(272) %0, double noundef %.033, double noundef %.032, double noundef %64, double noundef %67)
  %69 = getelementptr inbounds i8, ptr %6, i64 16
  store double %68, ptr %69, align 16, !tbaa !16
  %70 = zext i1 %59 to i64
  %71 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 %70
  %72 = load double, ptr %71, align 8, !tbaa !16
  %73 = fcmp olt double %68, %72
  %.1.2 = select i1 %73, i32 2, i32 %.1.1
  %74 = tail call noundef double @_ZN13customEllipse28NewtonRaphsonThetaEstimationEddd(ptr noundef nonnull align 8 dereferenceable(272) %0, double noundef %40, double noundef %.035, double noundef %.034)
  %75 = getelementptr inbounds i8, ptr %5, i64 24
  store double %74, ptr %75, align 8, !tbaa !16
  %76 = load double, ptr %30, align 8, !tbaa !14
  %77 = tail call double @cos(double noundef %74) #5
  %78 = fmul double %76, %77
  %79 = load double, ptr %33, align 8, !tbaa !15
  %80 = tail call double @sin(double noundef %74) #5
  %81 = fmul double %79, %80
  %82 = tail call noundef double @_ZN13customEllipse16DistanceBwPointsEdddd(ptr noundef nonnull align 8 dereferenceable(272) %0, double noundef %.033, double noundef %.032, double noundef %78, double noundef %81)
  %83 = getelementptr inbounds i8, ptr %6, i64 24
  store double %82, ptr %83, align 8, !tbaa !16
  %84 = zext nneg i32 %.1.2 to i64
  %85 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 %84
  %86 = load double, ptr %85, align 8, !tbaa !16
  %87 = fcmp olt double %82, %86
  %88 = zext nneg i32 %.1.2 to i64
  %89 = select i1 %87, i64 3, i64 %88
  %90 = getelementptr inbounds [4 x double], ptr %5, i64 0, i64 %89
  %91 = load double, ptr %90, align 8, !tbaa !16
  store double %91, ptr %3, align 8, !tbaa !16
  %92 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 %89
  %93 = load double, ptr %92, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  ret double %93
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN13customEllipse16DistanceBwPointsEdddd(ptr noundef nonnull align 8 dereferenceable(272), double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #3 = { 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 #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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, !7, i64 144}
!6 = !{!"_ZTS13customEllipse", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !10, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !11, i64 248, !11, i64 256, !11, i64 264}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !7, i64 152}
!13 = !{!6, !7, i64 184}
!14 = !{!6, !7, i64 160}
!15 = !{!6, !7, i64 168}
!16 = !{!7, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LoopRotatePass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass