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

; 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.qhstatT = type { [249 x %union.intrealT], [259 x i8], [249 x ptr], [249 x i16], [249 x i8], [249 x i8], [9 x %union.intrealT], i32, i32, i32, i32, double }
%union.intrealT = type { double }
%struct.facetT = type { double, double, double, ptr, %union.anon, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32 }
%union.anon = type { double }
%struct.vertexT = type { ptr, ptr, ptr, ptr, i32, i32, i8 }

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

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

declare void @qh_initmergesets() #1

declare void @qh_resetlists(i32 noundef, i32 noundef) #1

declare void @qh_all_vertexmerges(i32 noundef, ptr noundef, ptr noundef) #1

declare void @qh_freemergesets() #1

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

declare i32 @qh_pointid(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @qh_partitioncoplanar(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

declare void @qh_printlists() #1

; Function Attrs: nounwind uwtable
define dso_local i32 @qh_buildcone_mergepinched(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca i32, align 4
  %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 i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %15 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr null, ptr %15, align 8, !tbaa !5
  %16 = call double @qh_matchnewfacets()
  store double %16, ptr %11, align 8, !tbaa !9
  %17 = load double, ptr %11, align 8, !tbaa !9
  %18 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 147), align 8, !tbaa !11
  %19 = fmul double 4.000000e+00, %18
  %20 = fcmp ogt double %17, %19
  br i1 %20, label %21, label %78

21:                                               ; preds = %3
  %22 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !15
  %23 = icmp sge i32 %22, 4
  br i1 %23, label %24, label %28

24:                                               ; preds = %21
  %25 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 178), align 8, !tbaa !16
  %26 = icmp slt i32 %25, 1000
  br i1 %26, label %27, label %28

27:                                               ; preds = %24
  call void @qh_printlists()
  br label %28

28:                                               ; preds = %27, %24, %21
  call void @qh_initmergesets()
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = load double, ptr %11, align 8, !tbaa !9
  %31 = call i32 @qh_getpinchedmerges(ptr noundef %29, double noundef %30, ptr noundef %13)
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %33, label %77

33:                                               ; preds = %28
  %34 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 166), align 8, !tbaa !17
  store ptr %34, ptr %8, align 8, !tbaa !5
  br label %35

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

38:                                               ; preds = %35
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.facetT, ptr %39, i32 0, i32 7
  %41 = load ptr, ptr %40, align 8, !tbaa !18
  %42 = icmp ne ptr %41, null
  br label %43

43:                                               ; preds = %38, %35
  %44 = phi i1 [ false, %35 ], [ %42, %38 ]
  br i1 %44, label %45, label %52

45:                                               ; preds = %43
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.facetT, ptr %46, i32 0, i32 7
  %48 = load ptr, ptr %47, align 8, !tbaa !18
  store ptr %48, ptr %9, align 8, !tbaa !5
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  call void @qh_delfacet(ptr noundef %49)
  br label %50

50:                                               ; preds = %45
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %51, ptr %8, align 8, !tbaa !5
  br label %35, !llvm.loop !20

52:                                               ; preds = %43
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.vertexT, ptr %53, i32 0, i32 2
  %55 = load ptr, ptr %54, align 8, !tbaa !22
  store ptr %55, ptr %10, align 8, !tbaa !5
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = call i32 @qh_pointid(ptr noundef %56)
  store i32 %57, ptr %12, align 4, !tbaa !24
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_delvertex(ptr noundef %58)
  call void @qh_resetlists(i32 noundef 0, i32 noundef 1)
  %59 = load i32, ptr %13, align 4, !tbaa !24
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %61, label %72

61:                                               ; preds = %52
  %62 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 183), align 8, !tbaa !25
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 183), align 8, !tbaa !25
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.facetT, ptr %64, i32 0, i32 15
  %66 = load i32, ptr %65, align 8
  %67 = and i32 %66, -262145
  %68 = or i32 %67, 262144
  store i32 %68, ptr %65, align 8
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 204), align 8, !tbaa !26
  call void @qh_partitioncoplanar(ptr noundef %69, ptr noundef %70, ptr noundef null, i32 noundef %71)
  br label %76

72:                                               ; preds = %52
  %73 = load i32, ptr %12, align 4, !tbaa !24
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  call void @qh_all_vertexmerges(i32 noundef %73, ptr noundef %74, ptr noundef %75)
  br label %76

76:                                               ; preds = %72, %61
  call void @qh_freemergesets()
  store i32 1, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %79

77:                                               ; preds = %28
  call void @qh_freemergesets()
  br label %78

78:                                               ; preds = %77, %3
  call void @qh_attachnewfacets()
  call void @qh_makenewplanes()
  call void @qh_update_vertexneighbors_cone()
  store i32 0, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %79

79:                                               ; preds = %78, %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  %80 = load i32, ptr %4, align 4
  ret i32 %80
}

declare double @qh_matchnewfacets() #1

declare void @qh_makenewplanes() #1

declare void @qh_update_vertexneighbors_cone() #1

declare i32 @qh_getpinchedmerges(ptr noundef, double noundef, ptr noundef) #1

declare void @qh_delfacet(ptr noundef) #1

declare void @qh_delvertex(ptr noundef) #1

declare void @qh_attachnewfacets() #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"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, !10, i64 1888}
!12 = !{!"qhT", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !10, i64 24, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !10, i64 64, !10, i64 72, !13, i64 80, !13, i64 84, !13, i64 88, !13, i64 92, !13, i64 96, !13, i64 100, !6, i64 104, !13, i64 112, !13, i64 116, !6, i64 120, !13, i64 128, !13, i64 132, !13, i64 136, !13, i64 140, !13, i64 144, !13, i64 148, !13, i64 152, !10, i64 160, !10, i64 168, !13, i64 176, !13, i64 180, !13, i64 184, !13, i64 188, !10, i64 192, !10, i64 200, !13, i64 208, !13, i64 212, !10, i64 216, !13, i64 224, !13, i64 228, !13, i64 232, !13, i64 236, !13, i64 240, !13, i64 244, !13, i64 248, !13, i64 252, !13, i64 256, !13, i64 260, !13, i64 264, !13, i64 268, !13, i64 272, !13, i64 276, !13, i64 280, !13, i64 284, !13, i64 288, !13, i64 292, !13, i64 296, !7, i64 300, !13, i64 416, !13, i64 420, !13, i64 424, !13, i64 428, !13, i64 432, !13, i64 436, !13, i64 440, !13, i64 444, !10, i64 448, !10, i64 456, !10, i64 464, !13, i64 472, !13, i64 476, !13, i64 480, !13, i64 484, !13, i64 488, !13, i64 492, !13, i64 496, !13, i64 500, !13, i64 504, !13, i64 508, !13, i64 512, !13, i64 516, !13, i64 520, !13, i64 524, !13, i64 528, !13, i64 532, !13, i64 536, !13, i64 540, !13, i64 544, !10, i64 552, !13, i64 560, !13, i64 564, !13, i64 568, !13, i64 572, !13, i64 576, !13, i64 580, !13, i64 584, !13, i64 588, !10, i64 592, !13, i64 600, !6, i64 608, !6, i64 616, !13, i64 624, !13, i64 628, !13, i64 632, !13, i64 636, !13, i64 640, !6, i64 648, !13, i64 656, !6, i64 664, !13, i64 672, !7, i64 676, !13, i64 932, !7, i64 936, !7, i64 1192, !13, i64 1704, !13, i64 1708, !13, i64 1712, !13, i64 1716, !13, i64 1720, !13, 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, !13, 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, !13, i64 2440, !13, i64 2444, !13, i64 2448, !6, i64 2456, !6, i64 2464, !6, i64 2472, !6, i64 2480, !6, i64 2488, !13, i64 2496, !13, i64 2500, !6, i64 2504, !13, i64 2512, !6, i64 2520, !13, i64 2528, !6, i64 2536, !6, i64 2544, !6, i64 2552, !6, i64 2560, !13, i64 2568, !13, i64 2572, !13, i64 2576, !13, i64 2580, !13, i64 2584, !13, i64 2588, !13, i64 2592, !13, i64 2596, !14, i64 2600, !13, i64 2608, !13, i64 2612, !13, i64 2616, !13, i64 2620, !13, i64 2624, !6, i64 2632, !6, i64 2640, !13, i64 2648, !13, i64 2652, !13, i64 2656, !10, i64 2664, !13, i64 2672, !10, i64 2680, !10, i64 2688, !10, i64 2696, !13, i64 2704, !13, i64 2708, !13, i64 2712, !13, i64 2716, !13, i64 2720, !10, i64 2728, !10, i64 2736, !13, i64 2744, !13, i64 2748, !13, i64 2752, !13, i64 2756, !13, i64 2760, !13, i64 2764, !10, i64 2768, !10, i64 2776, !13, i64 2784, !13, i64 2788, !13, i64 2792, !13, 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, !13, i64 2872, !6, i64 2880, !6, i64 2888, !13, i64 2896, !13, i64 2900, !13, i64 2904, !6, i64 2912, !10, i64 2920, !10, i64 2928, !10, i64 2936, !10, i64 2944, !13, i64 2952, !13, i64 2956, !13, i64 2960, !13, i64 2964, !13, i64 2968, !13, i64 2972, !6, i64 2976, !6, i64 2984, !13, i64 2992}
!13 = !{!"int", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!12, !13, i64 136}
!16 = !{!12, !13, i64 2568}
!17 = !{!12, !6, i64 2480}
!18 = !{!19, !6, i64 56}
!19 = !{!"facetT", !10, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !7, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !13, i64 104, !13, i64 108, !13, i64 112, !13, i64 113, !13, i64 113, !13, i64 113, !13, i64 113, !13, i64 113, !13, i64 113, !13, i64 113, !13, i64 114, !13, i64 114, !13, i64 114, !13, i64 114, !13, i64 114, !13, i64 114, !13, i64 114, !13, i64 114, !13, i64 115, !13, i64 115, !13, i64 115, !13, i64 115, !13, i64 115, !13, i64 115, !13, i64 115, !13, i64 115}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!23, !6, i64 16}
!23 = !{!"vertexT", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 40, !13, i64 40, !13, i64 40, !13, i64 40, !13, i64 40}
!24 = !{!13, !13, i64 0}
!25 = !{!7, !7, i64 0}
!26 = !{!12, !13, i64 2712}


; 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] }
%struct.qhstatT = type { [249 x %union.intrealT], [259 x i8], [249 x ptr], [249 x i16], [249 x i8], [249 x i8], [9 x %union.intrealT], i32, i32, i32, i32, double }
%union.intrealT = type { double }

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

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

declare void @qh_initmergesets() local_unnamed_addr #1

declare void @qh_resetlists(i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @qh_all_vertexmerges(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @qh_freemergesets() local_unnamed_addr #1

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

declare i32 @qh_pointid(ptr noundef) local_unnamed_addr #1

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

declare void @qh_printlists() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @qh_buildcone_mergepinched(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  store ptr null, ptr %2, align 8, !tbaa !5
  %5 = tail call double @qh_matchnewfacets() #3
  %6 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1888), align 8, !tbaa !9
  %7 = fmul double %6, 4.000000e+00
  %8 = fcmp ogt double %5, %7
  br i1 %8, label %9, label %38

9:                                                ; preds = %3
  %10 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !14
  %11 = icmp sgt i32 %10, 3
  %12 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2568), align 8
  %13 = icmp slt i32 %12, 1000
  %or.cond = select i1 %11, i1 %13, i1 false
  br i1 %or.cond, label %14, label %15

14:                                               ; preds = %9
  tail call void @qh_printlists() #3
  br label %15

15:                                               ; preds = %14, %9
  tail call void @qh_initmergesets() #3
  %16 = call i32 @qh_getpinchedmerges(ptr noundef %0, double noundef %5, ptr noundef nonnull %4) #3
  %.not = icmp eq i32 %16, 0
  br i1 %.not, label %37, label %17

17:                                               ; preds = %15
  %18 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2480), align 8, !tbaa !15
  %.not2225 = icmp eq ptr %18, null
  br i1 %.not2225, label %.critedge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %17
  %19 = getelementptr inbounds i8, ptr %18, i64 56
  %20 = load ptr, ptr %19, align 8, !tbaa !16
  %.not2328 = icmp eq ptr %20, null
  br i1 %.not2328, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %21 = phi ptr [ %23, %.lr.ph ], [ %20, %.lr.ph.preheader ]
  %.0192629 = phi ptr [ %21, %.lr.ph ], [ %18, %.lr.ph.preheader ]
  call void @qh_delfacet(ptr noundef nonnull %.0192629) #3
  %22 = getelementptr inbounds i8, ptr %21, i64 56
  %23 = load ptr, ptr %22, align 8, !tbaa !16
  %.not23 = icmp eq ptr %23, null
  br i1 %.not23, label %.critedge, label %.lr.ph

.critedge:                                        ; preds = %.lr.ph, %.lr.ph.preheader, %17
  %24 = getelementptr inbounds i8, ptr %0, i64 16
  %25 = load ptr, ptr %24, align 8, !tbaa !18
  %26 = call i32 @qh_pointid(ptr noundef %25) #3
  call void @qh_delvertex(ptr noundef %0) #3
  call void @qh_resetlists(i32 noundef 0, i32 noundef 1) #3
  %27 = load i32, ptr %4, align 4, !tbaa !20
  %.not24 = icmp eq i32 %27, 0
  br i1 %.not24, label %35, label %28

28:                                               ; preds = %.critedge
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1464), align 8, !tbaa !21
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1464), align 8, !tbaa !21
  %31 = getelementptr inbounds i8, ptr %1, i64 112
  %32 = load i32, ptr %31, align 8
  %33 = or i32 %32, 262144
  store i32 %33, ptr %31, align 8
  %34 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2712), align 8, !tbaa !22
  call void @qh_partitioncoplanar(ptr noundef %25, ptr noundef %1, ptr noundef null, i32 noundef %34)
  br label %36

35:                                               ; preds = %.critedge
  call void @qh_all_vertexmerges(i32 noundef %26, ptr noundef %1, ptr noundef nonnull %2) #3
  br label %36

36:                                               ; preds = %35, %28
  call void @qh_freemergesets() #3
  br label %39

37:                                               ; preds = %15
  call void @qh_freemergesets() #3
  br label %38

38:                                               ; preds = %37, %3
  call void @qh_attachnewfacets() #3
  call void @qh_makenewplanes() #3
  call void @qh_update_vertexneighbors_cone() #3
  br label %39

39:                                               ; preds = %38, %36
  %.0 = phi i32 [ 1, %36 ], [ 0, %38 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  ret i32 %.0
}

declare double @qh_matchnewfacets() local_unnamed_addr #1

declare void @qh_makenewplanes() local_unnamed_addr #1

declare void @qh_update_vertexneighbors_cone() local_unnamed_addr #1

declare i32 @qh_getpinchedmerges(ptr noundef, double noundef, ptr noundef) local_unnamed_addr #1

declare void @qh_delfacet(ptr noundef) local_unnamed_addr #1

declare void @qh_delvertex(ptr noundef) local_unnamed_addr #1

declare void @qh_attachnewfacets() local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !12, i64 1888}
!10 = !{!"qhT", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !12, 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, !12, i64 64, !12, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !6, i64 104, !11, i64 112, !11, i64 116, !6, i64 120, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144, !11, i64 148, !11, i64 152, !12, i64 160, !12, i64 168, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !12, i64 192, !12, i64 200, !11, i64 208, !11, i64 212, !12, 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, !7, 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, !12, i64 448, !12, i64 456, !12, 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, !12, 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, !12, i64 592, !11, i64 600, !6, i64 608, !6, i64 616, !11, i64 624, !11, i64 628, !11, i64 632, !11, i64 636, !11, i64 640, !6, i64 648, !11, i64 656, !6, i64 664, !11, i64 672, !7, i64 676, !11, i64 932, !7, i64 936, !7, i64 1192, !11, i64 1704, !11, i64 1708, !11, i64 1712, !11, i64 1716, !11, i64 1720, !11, i64 1724, !6, i64 1728, !6, i64 1736, !6, i64 1744, !6, i64 1752, !12, i64 1760, !12, i64 1768, !12, i64 1776, !12, i64 1784, !12, i64 1792, !12, i64 1800, !12, i64 1808, !12, i64 1816, !12, i64 1824, !12, i64 1832, !12, i64 1840, !12, i64 1848, !12, i64 1856, !12, i64 1864, !6, i64 1872, !12, i64 1880, !12, i64 1888, !12, i64 1896, !12, i64 1904, !11, 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, !11, i64 2440, !11, i64 2444, !11, i64 2448, !6, i64 2456, !6, i64 2464, !6, i64 2472, !6, i64 2480, !6, i64 2488, !11, i64 2496, !11, i64 2500, !6, i64 2504, !11, i64 2512, !6, i64 2520, !11, i64 2528, !6, i64 2536, !6, i64 2544, !6, i64 2552, !6, 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, !13, i64 2600, !11, i64 2608, !11, i64 2612, !11, i64 2616, !11, i64 2620, !11, i64 2624, !6, i64 2632, !6, i64 2640, !11, i64 2648, !11, i64 2652, !11, i64 2656, !12, i64 2664, !11, i64 2672, !12, i64 2680, !12, i64 2688, !12, i64 2696, !11, i64 2704, !11, i64 2708, !11, i64 2712, !11, i64 2716, !11, i64 2720, !12, i64 2728, !12, i64 2736, !11, i64 2744, !11, i64 2748, !11, i64 2752, !11, i64 2756, !11, i64 2760, !11, i64 2764, !12, i64 2768, !12, i64 2776, !11, i64 2784, !11, i64 2788, !11, i64 2792, !11, 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, !11, i64 2872, !6, i64 2880, !6, i64 2888, !11, i64 2896, !11, i64 2900, !11, i64 2904, !6, i64 2912, !12, i64 2920, !12, i64 2928, !12, i64 2936, !12, i64 2944, !11, i64 2952, !11, i64 2956, !11, i64 2960, !11, i64 2964, !11, i64 2968, !11, i64 2972, !6, i64 2976, !6, i64 2984, !11, i64 2992}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!10, !11, i64 136}
!15 = !{!10, !6, i64 2480}
!16 = !{!17, !6, i64 56}
!17 = !{!"facetT", !12, i64 0, !12, i64 8, !12, i64 16, !6, i64 24, !7, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 113, !11, i64 113, !11, i64 113, !11, i64 113, !11, i64 113, !11, i64 113, !11, i64 113, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 115, !11, i64 115, !11, i64 115, !11, i64 115, !11, i64 115, !11, i64 115, !11, i64 115, !11, i64 115}
!18 = !{!19, !6, i64 16}
!19 = !{!"vertexT", !6, i64 0, !6, i64 8, !6, i64 16, !6, 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}
!20 = !{!11, !11, i64 0}
!21 = !{!7, !7, i64 0}
!22 = !{!10, !11, i64 2712}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass