; LLVM IR from jrl-umi3218/mc_rtc :: 3rd-party/qhull/src/libqhull (geom2)

; 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.qhT = type { i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [29 x i32], i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, i32, ptr, i32, [256 x i8], i32, [256 x i8], [512 x i8], i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, double, double, double, double, double, double, double, double, double, double, double, double, double, double, ptr, double, double, double, double, i32, [6 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, double, i32, i32, i32, i32, i32, i32, ptr, ptr, i32 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.setT = type { i32, [1 x %union.setelemT] }
%union.setelemT = type { ptr }
%struct.vertexT = type { ptr, ptr, ptr, ptr, i32, i32, i8 }

@qh_qh = external global %struct.qhT, align 8

; 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

declare i32 @qh_setsize(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local double @qh_vertex_bestdist2(ptr noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store double 0x7FEFFFFFFFFFFFFF, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store ptr null, ptr %7, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = icmp ne ptr %16, null
  br i1 %17, label %18, label %73

18:                                               ; preds = %3
  store i32 0, ptr %14, align 4, !tbaa !11
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.setT, ptr %19, i32 0, i32 1
  %21 = getelementptr inbounds [1 x %union.setelemT], ptr %20, i64 0, i64 0
  %22 = load ptr, ptr %21, align 8, !tbaa !13
  store ptr %22, ptr %7, align 8, !tbaa !5
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = call i32 @qh_setsize(ptr noundef %23)
  store i32 %24, ptr %15, align 4, !tbaa !11
  br label %25

25:                                               ; preds = %64, %18
  %26 = load i32, ptr %14, align 4, !tbaa !11
  %27 = load i32, ptr %15, align 4, !tbaa !11
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %29, label %72

29:                                               ; preds = %25
  %30 = load i32, ptr %14, align 4, !tbaa !11
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %13, align 4, !tbaa !11
  br label %32

32:                                               ; preds = %60, %29
  %33 = load i32, ptr %13, align 4, !tbaa !11
  %34 = load i32, ptr %15, align 4, !tbaa !11
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %36, label %63

36:                                               ; preds = %32
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.setT, ptr %37, i32 0, i32 1
  %39 = load i32, ptr %13, align 4, !tbaa !11
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [1 x %union.setelemT], ptr %38, i64 0, i64 %40
  %42 = load ptr, ptr %41, align 8, !tbaa !13
  store ptr %42, ptr %8, align 8, !tbaa !5
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.vertexT, ptr %43, i32 0, i32 2
  %45 = load ptr, ptr %44, align 8, !tbaa !14
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.vertexT, ptr %46, i32 0, i32 2
  %48 = load ptr, ptr %47, align 8, !tbaa !14
  %49 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 110), align 8, !tbaa !16
  %50 = sub nsw i32 0, %49
  %51 = call double @qh_pointdist(ptr noundef %45, ptr noundef %48, i32 noundef %50)
  store double %51, ptr %11, align 8, !tbaa !9
  %52 = load double, ptr %11, align 8, !tbaa !9
  %53 = load double, ptr %12, align 8, !tbaa !9
  %54 = fcmp olt double %52, %53
  br i1 %54, label %55, label %59

55:                                               ; preds = %36
  %56 = load double, ptr %11, align 8, !tbaa !9
  store double %56, ptr %12, align 8, !tbaa !9
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %57, ptr %9, align 8, !tbaa !5
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %58, ptr %10, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %55, %36
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %13, align 4, !tbaa !11
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %13, align 4, !tbaa !11
  br label %32, !llvm.loop !19

63:                                               ; preds = %32
  br label %64

64:                                               ; preds = %63
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.setT, ptr %65, i32 0, i32 1
  %67 = load i32, ptr %14, align 4, !tbaa !11
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %14, align 4, !tbaa !11
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [1 x %union.setelemT], ptr %66, i64 0, i64 %69
  %71 = load ptr, ptr %70, align 8, !tbaa !13
  store ptr %71, ptr %7, align 8, !tbaa !5
  br label %25, !llvm.loop !21

72:                                               ; preds = %25
  br label %73

73:                                               ; preds = %72, %3
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %74, ptr %75, align 8, !tbaa !5
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %76, ptr %77, align 8, !tbaa !5
  %78 = load double, ptr %12, align 8, !tbaa !9
  %79 = call double @sqrt(double noundef %78) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  ret double %79
}

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 = { "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 = { 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 = !{!7, !7, i64 0}
!14 = !{!15, !6, i64 16}
!15 = !{!"vertexT", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 40, !12, i64 40, !12, i64 40, !12, i64 40, !12, i64 40}
!16 = !{!17, !12, i64 632}
!17 = !{!"qhT", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !10, i64 24, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !10, i64 64, !10, i64 72, !12, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !6, i64 104, !12, i64 112, !12, i64 116, !6, i64 120, !12, i64 128, !12, i64 132, !12, i64 136, !12, i64 140, !12, i64 144, !12, i64 148, !12, i64 152, !10, i64 160, !10, i64 168, !12, i64 176, !12, i64 180, !12, i64 184, !12, i64 188, !10, i64 192, !10, i64 200, !12, i64 208, !12, i64 212, !10, i64 216, !12, i64 224, !12, i64 228, !12, i64 232, !12, i64 236, !12, i64 240, !12, i64 244, !12, i64 248, !12, i64 252, !12, i64 256, !12, i64 260, !12, i64 264, !12, i64 268, !12, i64 272, !12, i64 276, !12, i64 280, !12, i64 284, !12, i64 288, !12, i64 292, !12, i64 296, !7, i64 300, !12, i64 416, !12, i64 420, !12, i64 424, !12, i64 428, !12, i64 432, !12, i64 436, !12, i64 440, !12, i64 444, !10, i64 448, !10, i64 456, !10, i64 464, !12, i64 472, !12, i64 476, !12, i64 480, !12, i64 484, !12, i64 488, !12, i64 492, !12, i64 496, !12, i64 500, !12, i64 504, !12, i64 508, !12, i64 512, !12, i64 516, !12, i64 520, !12, i64 524, !12, i64 528, !12, i64 532, !12, i64 536, !12, i64 540, !12, i64 544, !10, i64 552, !12, i64 560, !12, i64 564, !12, i64 568, !12, i64 572, !12, i64 576, !12, i64 580, !12, i64 584, !12, i64 588, !10, i64 592, !12, i64 600, !6, i64 608, !6, i64 616, !12, i64 624, !12, i64 628, !12, i64 632, !12, i64 636, !12, i64 640, !6, i64 648, !12, i64 656, !6, i64 664, !12, i64 672, !7, i64 676, !12, i64 932, !7, i64 936, !7, i64 1192, !12, i64 1704, !12, i64 1708, !12, i64 1712, !12, i64 1716, !12, i64 1720, !12, i64 1724, !6, i64 1728, !6, i64 1736, !6, i64 1744, !6, i64 1752, !10, i64 1760, !10, i64 1768, !10, i64 1776, !10, i64 1784, !10, i64 1792, !10, i64 1800, !10, i64 1808, !10, i64 1816, !10, i64 1824, !10, i64 1832, !10, i64 1840, !10, i64 1848, !10, i64 1856, !10, i64 1864, !6, i64 1872, !10, i64 1880, !10, i64 1888, !10, i64 1896, !10, i64 1904, !12, i64 1912, !7, i64 1916, !7, i64 1928, !7, i64 2128, !7, i64 2168, !7, i64 2368, !6, i64 2408, !6, i64 2416, !6, i64 2424, !6, i64 2432, !12, i64 2440, !12, i64 2444, !12, i64 2448, !6, i64 2456, !6, i64 2464, !6, i64 2472, !6, i64 2480, !6, i64 2488, !12, i64 2496, !12, i64 2500, !6, i64 2504, !12, i64 2512, !6, i64 2520, !12, i64 2528, !6, i64 2536, !6, i64 2544, !6, i64 2552, !6, i64 2560, !12, i64 2568, !12, i64 2572, !12, i64 2576, !12, i64 2580, !12, i64 2584, !12, i64 2588, !12, i64 2592, !12, i64 2596, !18, i64 2600, !12, i64 2608, !12, i64 2612, !12, i64 2616, !12, i64 2620, !12, i64 2624, !6, i64 2632, !6, i64 2640, !12, i64 2648, !12, i64 2652, !12, i64 2656, !10, i64 2664, !12, i64 2672, !10, i64 2680, !10, i64 2688, !10, i64 2696, !12, i64 2704, !12, i64 2708, !12, i64 2712, !12, i64 2716, !12, i64 2720, !10, i64 2728, !10, i64 2736, !12, i64 2744, !12, i64 2748, !12, i64 2752, !12, i64 2756, !12, i64 2760, !12, i64 2764, !10, i64 2768, !10, i64 2776, !12, i64 2784, !12, i64 2788, !12, i64 2792, !12, i64 2796, !6, i64 2800, !6, i64 2808, !6, i64 2816, !6, i64 2824, !6, i64 2832, !6, i64 2840, !6, i64 2848, !6, i64 2856, !6, i64 2864, !12, i64 2872, !6, i64 2880, !6, i64 2888, !12, i64 2896, !12, i64 2900, !12, i64 2904, !6, i64 2912, !10, i64 2920, !10, i64 2928, !10, i64 2936, !10, i64 2944, !12, i64 2952, !12, i64 2956, !12, i64 2960, !12, i64 2964, !12, i64 2968, !12, i64 2972, !6, i64 2976, !6, i64 2984, !12, i64 2992}
!18 = !{!"long", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}


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

%struct.qhT = type { i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [29 x i32], i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, i32, ptr, i32, [256 x i8], i32, [256 x i8], [512 x i8], i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, double, double, double, double, double, double, double, double, double, double, double, double, double, double, ptr, double, double, double, double, i32, [6 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, double, i32, i32, i32, i32, i32, i32, ptr, ptr, i32 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%union.setelemT = type { ptr }

@qh_qh = external local_unnamed_addr global %struct.qhT, align 8

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

declare i32 @qh_setsize(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local double @qh_pointdist(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local double @qh_vertex_bestdist2(ptr noundef %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef writeonly %2) local_unnamed_addr #2 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %.loopexit, label %4

4:                                                ; preds = %3
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = tail call i32 @qh_setsize(ptr noundef nonnull %0) #3
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph50.preheader, label %.loopexit

.lr.ph50.preheader:                               ; preds = %4
  %9 = zext nneg i32 %7 to i64
  %wide.trip.count60 = zext nneg i32 %7 to i64
  br label %.lr.ph50

.lr.ph50:                                         ; preds = %.lr.ph50.preheader, %._crit_edge
  %indvars.iv57 = phi i64 [ 0, %.lr.ph50.preheader ], [ %indvars.iv.next58, %._crit_edge ]
  %indvars.iv = phi i64 [ 1, %.lr.ph50.preheader ], [ %indvars.iv.next, %._crit_edge ]
  %.048 = phi ptr [ %6, %.lr.ph50.preheader ], [ %23, %._crit_edge ]
  %.02646 = phi double [ 0x7FEFFFFFFFFFFFFF, %.lr.ph50.preheader ], [ %.1.lcssa, %._crit_edge ]
  %.02745 = phi ptr [ null, %.lr.ph50.preheader ], [ %.128.lcssa, %._crit_edge ]
  %.03144 = phi ptr [ null, %.lr.ph50.preheader ], [ %.132.lcssa, %._crit_edge ]
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %10 = icmp ult i64 %indvars.iv.next58, %9
  br i1 %10, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph50
  %11 = getelementptr inbounds i8, ptr %.048, i64 16
  br label %12

12:                                               ; preds = %.lr.ph, %12
  %indvars.iv54 = phi i64 [ %indvars.iv, %.lr.ph ], [ %indvars.iv.next55, %12 ]
  %.140 = phi double [ %.02646, %.lr.ph ], [ %.2, %12 ]
  %.12839 = phi ptr [ %.02745, %.lr.ph ], [ %.229, %12 ]
  %.13238 = phi ptr [ %.03144, %.lr.ph ], [ %.233, %12 ]
  %13 = getelementptr inbounds [1 x %union.setelemT], ptr %5, i64 0, i64 %indvars.iv54
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = load ptr, ptr %11, align 8, !tbaa !8
  %16 = getelementptr inbounds i8, ptr %14, i64 16
  %17 = load ptr, ptr %16, align 8, !tbaa !8
  %18 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 632), align 8, !tbaa !12
  %19 = sub nsw i32 0, %18
  %20 = tail call double @qh_pointdist(ptr noundef %15, ptr noundef %17, i32 noundef %19)
  %21 = fcmp olt double %20, %.140
  %.233 = select i1 %21, ptr %14, ptr %.13238
  %.229 = select i1 %21, ptr %.048, ptr %.12839
  %.2 = select i1 %21, double %20, double %.140
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count60
  br i1 %exitcond.not, label %._crit_edge, label %12, !llvm.loop !16

._crit_edge:                                      ; preds = %12, %.lr.ph50
  %.132.lcssa = phi ptr [ %.03144, %.lr.ph50 ], [ %.233, %12 ]
  %.128.lcssa = phi ptr [ %.02745, %.lr.ph50 ], [ %.229, %12 ]
  %.1.lcssa = phi double [ %.02646, %.lr.ph50 ], [ %.2, %12 ]
  %22 = getelementptr inbounds [1 x %union.setelemT], ptr %5, i64 0, i64 %indvars.iv.next58
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond61.not = icmp eq i64 %indvars.iv.next58, %wide.trip.count60
  br i1 %exitcond61.not, label %.loopexit, label %.lr.ph50, !llvm.loop !18

.loopexit:                                        ; preds = %._crit_edge, %4, %3
  %.334 = phi ptr [ null, %3 ], [ null, %4 ], [ %.132.lcssa, %._crit_edge ]
  %.330 = phi ptr [ null, %3 ], [ null, %4 ], [ %.128.lcssa, %._crit_edge ]
  %.3 = phi double [ 0x7FEFFFFFFFFFFFFF, %3 ], [ 0x7FEFFFFFFFFFFFFF, %4 ], [ %.1.lcssa, %._crit_edge ]
  store ptr %.330, ptr %1, align 8, !tbaa !19
  store ptr %.334, ptr %2, align 8, !tbaa !19
  %24 = tail call double @sqrt(double noundef %.3) #3
  ret double %24
}

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 = { "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 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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !10, i64 16}
!9 = !{!"vertexT", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 40, !11, i64 40, !11, i64 40, !11, i64 40, !11, i64 40}
!10 = !{!"any pointer", !6, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = !{!13, !11, i64 632}
!13 = !{!"qhT", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !14, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !14, i64 64, !14, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !10, i64 104, !11, i64 112, !11, i64 116, !10, i64 120, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144, !11, i64 148, !11, i64 152, !14, i64 160, !14, i64 168, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !14, i64 192, !14, i64 200, !11, i64 208, !11, i64 212, !14, i64 216, !11, i64 224, !11, i64 228, !11, i64 232, !11, i64 236, !11, i64 240, !11, i64 244, !11, i64 248, !11, i64 252, !11, i64 256, !11, i64 260, !11, i64 264, !11, i64 268, !11, i64 272, !11, i64 276, !11, i64 280, !11, i64 284, !11, i64 288, !11, i64 292, !11, i64 296, !6, i64 300, !11, i64 416, !11, i64 420, !11, i64 424, !11, i64 428, !11, i64 432, !11, i64 436, !11, i64 440, !11, i64 444, !14, i64 448, !14, i64 456, !14, i64 464, !11, i64 472, !11, i64 476, !11, i64 480, !11, i64 484, !11, i64 488, !11, i64 492, !11, i64 496, !11, i64 500, !11, i64 504, !11, i64 508, !11, i64 512, !11, i64 516, !11, i64 520, !11, i64 524, !11, i64 528, !11, i64 532, !11, i64 536, !11, i64 540, !11, i64 544, !14, i64 552, !11, i64 560, !11, i64 564, !11, i64 568, !11, i64 572, !11, i64 576, !11, i64 580, !11, i64 584, !11, i64 588, !14, i64 592, !11, i64 600, !10, i64 608, !10, i64 616, !11, i64 624, !11, i64 628, !11, i64 632, !11, i64 636, !11, i64 640, !10, i64 648, !11, i64 656, !10, i64 664, !11, i64 672, !6, i64 676, !11, i64 932, !6, i64 936, !6, i64 1192, !11, i64 1704, !11, i64 1708, !11, i64 1712, !11, i64 1716, !11, i64 1720, !11, i64 1724, !10, i64 1728, !10, i64 1736, !10, i64 1744, !10, i64 1752, !14, i64 1760, !14, i64 1768, !14, i64 1776, !14, i64 1784, !14, i64 1792, !14, i64 1800, !14, i64 1808, !14, i64 1816, !14, i64 1824, !14, i64 1832, !14, i64 1840, !14, i64 1848, !14, i64 1856, !14, i64 1864, !10, i64 1872, !14, i64 1880, !14, i64 1888, !14, i64 1896, !14, i64 1904, !11, i64 1912, !6, i64 1916, !6, i64 1928, !6, i64 2128, !6, i64 2168, !6, i64 2368, !10, i64 2408, !10, i64 2416, !10, i64 2424, !10, i64 2432, !11, i64 2440, !11, i64 2444, !11, i64 2448, !10, i64 2456, !10, i64 2464, !10, i64 2472, !10, i64 2480, !10, i64 2488, !11, i64 2496, !11, i64 2500, !10, i64 2504, !11, i64 2512, !10, i64 2520, !11, i64 2528, !10, i64 2536, !10, i64 2544, !10, i64 2552, !10, i64 2560, !11, i64 2568, !11, i64 2572, !11, i64 2576, !11, i64 2580, !11, i64 2584, !11, i64 2588, !11, i64 2592, !11, i64 2596, !15, i64 2600, !11, i64 2608, !11, i64 2612, !11, i64 2616, !11, i64 2620, !11, i64 2624, !10, i64 2632, !10, i64 2640, !11, i64 2648, !11, i64 2652, !11, i64 2656, !14, i64 2664, !11, i64 2672, !14, i64 2680, !14, i64 2688, !14, i64 2696, !11, i64 2704, !11, i64 2708, !11, i64 2712, !11, i64 2716, !11, i64 2720, !14, i64 2728, !14, i64 2736, !11, i64 2744, !11, i64 2748, !11, i64 2752, !11, i64 2756, !11, i64 2760, !11, i64 2764, !14, i64 2768, !14, i64 2776, !11, i64 2784, !11, i64 2788, !11, i64 2792, !11, i64 2796, !10, i64 2800, !10, i64 2808, !10, i64 2816, !10, i64 2824, !10, i64 2832, !10, i64 2840, !10, i64 2848, !10, i64 2856, !10, i64 2864, !11, i64 2872, !10, i64 2880, !10, i64 2888, !11, i64 2896, !11, i64 2900, !11, i64 2904, !10, i64 2912, !14, i64 2920, !14, i64 2928, !14, i64 2936, !14, i64 2944, !11, i64 2952, !11, i64 2956, !11, i64 2960, !11, i64 2964, !11, i64 2968, !11, i64 2972, !10, i64 2976, !10, i64 2984, !11, i64 2992}
!14 = !{!"double", !6, i64 0}
!15 = !{!"long", !6, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!10, !10, i64 0}


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