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

; 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.vertexT = type { ptr, ptr, ptr, ptr, i32, i32, i8 }
%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.setT = type { i32, [1 x %union.setelemT] }
%union.setelemT = type { ptr }

@mergetypes = external dso_local global [14 x ptr], align 16
@qh_qh = external global %struct.qhT, align 8
@.str.182 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.237 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.238 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.239 = external hidden unnamed_addr constant [53 x i8], align 1

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

declare void @qh_fprintf(ptr noundef, i32 noundef, ptr noundef, ...) #1

declare void @qh_printlists() #1

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

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

declare void @qh_errprint(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @qh_tracemerge(ptr noundef %0, ptr noundef %1, i32 noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %9 = load i32, ptr %6, align 4, !tbaa !9
  %10 = icmp ugt i32 %9, 0
  br i1 %10, label %11, label %20

11:                                               ; preds = %3
  %12 = load i32, ptr %6, align 4, !tbaa !9
  %13 = zext i32 %12 to i64
  %14 = icmp ult i64 %13, 14
  br i1 %14, label %15, label %20

15:                                               ; preds = %11
  %16 = load i32, ptr %6, align 4, !tbaa !9
  %17 = zext i32 %16 to i64
  %18 = getelementptr inbounds [14 x ptr], ptr @mergetypes, i64 0, i64 %17
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %19, ptr %8, align 8, !tbaa !5
  br label %22

20:                                               ; preds = %11, %3
  %21 = load ptr, ptr @mergetypes, align 16, !tbaa !5
  store ptr %21, ptr %8, align 8, !tbaa !5
  br label %22

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

25:                                               ; preds = %22
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_errprint(ptr noundef @.str.237, ptr noundef %26, ptr noundef null, ptr noundef null, ptr noundef null)
  br label %27

27:                                               ; preds = %25, %22
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 170), align 8, !tbaa !15
  %30 = icmp eq ptr %28, %29
  br i1 %30, label %42, label %31

31:                                               ; preds = %27
  %32 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 174), align 8, !tbaa !16
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %77

34:                                               ; preds = %31
  %35 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 174), align 8, !tbaa !16
  %36 = getelementptr inbounds %struct.vertexT, ptr %35, i32 0, i32 6
  %37 = load i8, ptr %36, align 8
  %38 = lshr i8 %37, 4
  %39 = and i8 %38, 1
  %40 = zext i8 %39 to i32
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %77

42:                                               ; preds = %34, %27
  %43 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !17
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.facetT, ptr %44, i32 0, i32 14
  %46 = load i32, ptr %45, align 4, !tbaa !18
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.facetT, ptr %47, i32 0, i32 14
  %49 = load i32, ptr %48, align 4, !tbaa !18
  %50 = load i32, ptr %6, align 4, !tbaa !9
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 190), align 4, !tbaa !20
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %43, i32 noundef 8085, ptr noundef @.str.238, i32 noundef %46, i32 noundef %49, i32 noundef %50, ptr noundef %51, i32 noundef %52)
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 170), align 8, !tbaa !15
  %55 = icmp ne ptr %53, %54
  br i1 %55, label %56, label %76

56:                                               ; preds = %42
  %57 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 170), align 8, !tbaa !15
  %58 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 174), align 8, !tbaa !16
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %72

60:                                               ; preds = %56
  %61 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 174), align 8, !tbaa !16
  %62 = getelementptr inbounds %struct.vertexT, ptr %61, i32 0, i32 3
  %63 = load ptr, ptr %62, align 8, !tbaa !21
  %64 = icmp ne ptr %63, null
  br i1 %64, label %65, label %72

65:                                               ; preds = %60
  %66 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 174), align 8, !tbaa !16
  %67 = getelementptr inbounds %struct.vertexT, ptr %66, i32 0, i32 3
  %68 = load ptr, ptr %67, align 8, !tbaa !21
  %69 = getelementptr inbounds %struct.setT, ptr %68, i32 0, i32 1
  %70 = getelementptr inbounds [1 x %union.setelemT], ptr %69, i64 0, i64 0
  %71 = load ptr, ptr %70, align 8, !tbaa !23
  br label %73

72:                                               ; preds = %60, %56
  br label %73

73:                                               ; preds = %72, %65
  %74 = phi ptr [ %71, %65 ], [ null, %72 ]
  %75 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 174), align 8, !tbaa !16
  call void @qh_errprint(ptr noundef @.str.182, ptr noundef %57, ptr noundef %74, ptr noundef null, ptr noundef %75)
  br label %76

76:                                               ; preds = %73, %42
  br label %77

77:                                               ; preds = %76, %34, %31
  %78 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 174), align 8, !tbaa !16
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %94

80:                                               ; preds = %77
  %81 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 174), align 8, !tbaa !16
  %82 = getelementptr inbounds %struct.vertexT, ptr %81, i32 0, i32 6
  %83 = load i8, ptr %82, align 8
  %84 = lshr i8 %83, 2
  %85 = and i8 %84, 1
  %86 = zext i8 %85 to i32
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %91

88:                                               ; preds = %80
  %89 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !17
  %90 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 190), align 4, !tbaa !20
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %89, i32 noundef 8086, ptr noundef @.str.239, i32 noundef %90)
  br label %93

91:                                               ; preds = %80
  %92 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 174), align 8, !tbaa !16
  call void @qh_checkvertex(ptr noundef %92, i32 noundef 1, ptr noundef %7)
  br label %93

93:                                               ; preds = %91, %88
  br label %94

94:                                               ; preds = %93, %77
  %95 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 170), align 8, !tbaa !15
  %96 = icmp ne ptr %95, null
  br i1 %96, label %97, label %111

97:                                               ; preds = %94
  %98 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 170), align 8, !tbaa !15
  %99 = getelementptr inbounds %struct.facetT, ptr %98, i32 0, i32 3
  %100 = load ptr, ptr %99, align 8, !tbaa !24
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %111

102:                                              ; preds = %97
  %103 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 170), align 8, !tbaa !15
  %104 = getelementptr inbounds %struct.facetT, ptr %103, i32 0, i32 15
  %105 = load i32, ptr %104, align 8
  %106 = lshr i32 %105, 11
  %107 = and i32 %106, 1
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %111, label %109

109:                                              ; preds = %102
  %110 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 170), align 8, !tbaa !15
  call void @qh_checkfacet(ptr noundef %110, i32 noundef 1, ptr noundef %7)
  br label %111

111:                                              ; preds = %109, %102, %97, %94
  %112 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 14), align 4, !tbaa !25
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %117, label %114

114:                                              ; preds = %111
  %115 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !11
  %116 = icmp sge i32 %115, 4
  br i1 %116, label %117, label %126

117:                                              ; preds = %114, %111
  %118 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !11
  %119 = icmp sge i32 %118, 4
  br i1 %119, label %120, label %124

120:                                              ; preds = %117
  %121 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 178), align 8, !tbaa !26
  %122 = icmp slt i32 %121, 500
  br i1 %122, label %123, label %124

123:                                              ; preds = %120
  call void @qh_printlists()
  br label %124

124:                                              ; preds = %123, %120, %117
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_checkfacet(ptr noundef %125, i32 noundef 1, ptr noundef %7)
  br label %126

126:                                              ; preds = %124, %114
  %127 = load i32, ptr %7, align 4, !tbaa !9
  %128 = icmp ne i32 %127, 0
  br i1 %128, label %129, label %130

129:                                              ; preds = %126
  call void @qh_errexit(i32 noundef 5, ptr noundef null, ptr noundef null)
  br label %130

130:                                              ; preds = %129, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret void
}

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

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


; 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] }

@mergetypes = external dso_local local_unnamed_addr global [14 x ptr], align 16
@qh_qh = external local_unnamed_addr global %struct.qhT, align 8
@.str.182 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.237 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.238 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.239 = external hidden unnamed_addr constant [53 x i8], align 1

; 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_fprintf(ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #1

declare void @qh_printlists() 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 void @qh_errexit(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @qh_errprint(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @qh_tracemerge(ptr nocapture noundef readonly %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  store i32 0, ptr %4, align 4, !tbaa !5
  %5 = add i32 %2, -1
  %or.cond = icmp ult i32 %5, 13
  %6 = zext nneg i32 %2 to i64
  %7 = getelementptr inbounds [14 x ptr], ptr @mergetypes, i64 0, i64 %6
  %.0.in = select i1 %or.cond, ptr %7, ptr @mergetypes
  %.0 = load ptr, ptr %.0.in, align 8, !tbaa !9
  %8 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !11
  %9 = icmp sgt i32 %8, 3
  br i1 %9, label %10, label %11

10:                                               ; preds = %3
  tail call void @qh_errprint(ptr noundef nonnull @.str.237, ptr noundef %1, ptr noundef null, ptr noundef null, ptr noundef null) #3
  br label %11

11:                                               ; preds = %10, %3
  %12 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2504), align 8, !tbaa !15
  %13 = icmp eq ptr %12, %1
  br i1 %13, label %20, label %14

14:                                               ; preds = %11
  %15 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2536), align 8, !tbaa !16
  %.not = icmp eq ptr %15, null
  br i1 %.not, label %.thread, label %16

16:                                               ; preds = %14
  %17 = getelementptr inbounds i8, ptr %15, i64 40
  %18 = load i8, ptr %17, align 8
  %19 = and i8 %18, 16
  %.not23 = icmp eq i8 %19, 0
  br i1 %.not23, label %.thread37, label %20

20:                                               ; preds = %16, %11
  %21 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !17
  %22 = getelementptr inbounds i8, ptr %0, i64 108
  %23 = load i32, ptr %22, align 4, !tbaa !18
  %24 = getelementptr inbounds i8, ptr %1, i64 108
  %25 = load i32, ptr %24, align 4, !tbaa !18
  %26 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2620), align 4, !tbaa !20
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %21, i32 noundef 8085, ptr noundef nonnull @.str.238, i32 noundef %23, i32 noundef %25, i32 noundef %2, ptr noundef %.0, i32 noundef %26) #3
  %27 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2504), align 8, !tbaa !15
  %.not24 = icmp eq ptr %27, %1
  %.pr.pre35 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2536), align 8, !tbaa !16
  br i1 %.not24, label %37, label %28

28:                                               ; preds = %20
  %.not25 = icmp eq ptr %.pr.pre35, null
  br i1 %.not25, label %35, label %29

29:                                               ; preds = %28
  %30 = getelementptr inbounds i8, ptr %.pr.pre35, i64 24
  %31 = load ptr, ptr %30, align 8, !tbaa !21
  %.not26 = icmp eq ptr %31, null
  br i1 %.not26, label %35, label %32

32:                                               ; preds = %29
  %33 = getelementptr inbounds i8, ptr %31, i64 8
  %34 = load ptr, ptr %33, align 8, !tbaa !23
  br label %35

35:                                               ; preds = %28, %29, %32
  %36 = phi ptr [ %34, %32 ], [ null, %29 ], [ null, %28 ]
  tail call void @qh_errprint(ptr noundef nonnull @.str.182, ptr noundef %27, ptr noundef %36, ptr noundef null, ptr noundef %.pr.pre35) #3
  %.pr.pre = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2536), align 8, !tbaa !16
  br label %37

37:                                               ; preds = %20, %35
  %.pr = phi ptr [ %.pr.pre35, %20 ], [ %.pr.pre, %35 ]
  %.not27 = icmp eq ptr %.pr, null
  br i1 %.not27, label %.threadthread-pre-split, label %.thread37

.thread37:                                        ; preds = %16, %37
  %.pr40 = phi ptr [ %.pr, %37 ], [ %15, %16 ]
  %38 = getelementptr inbounds i8, ptr %.pr40, i64 40
  %39 = load i8, ptr %38, align 8
  %40 = and i8 %39, 4
  %.not28 = icmp eq i8 %40, 0
  br i1 %.not28, label %44, label %41

41:                                               ; preds = %.thread37
  %42 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !17
  %43 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2620), align 4, !tbaa !20
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %42, i32 noundef 8086, ptr noundef nonnull @.str.239, i32 noundef %43) #3
  br label %.threadthread-pre-split

44:                                               ; preds = %.thread37
  call void @qh_checkvertex(ptr noundef nonnull %.pr40, i32 noundef 1, ptr noundef nonnull %4) #3
  br label %.threadthread-pre-split

.threadthread-pre-split:                          ; preds = %37, %44, %41
  %.pr34 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2504), align 8, !tbaa !15
  br label %.thread

.thread:                                          ; preds = %.threadthread-pre-split, %14
  %45 = phi ptr [ %.pr34, %.threadthread-pre-split ], [ %12, %14 ]
  %.not29 = icmp eq ptr %45, null
  br i1 %.not29, label %54, label %46

46:                                               ; preds = %.thread
  %47 = getelementptr inbounds i8, ptr %45, i64 24
  %48 = load ptr, ptr %47, align 8, !tbaa !24
  %.not30 = icmp eq ptr %48, null
  br i1 %.not30, label %54, label %49

49:                                               ; preds = %46
  %50 = getelementptr inbounds i8, ptr %45, i64 112
  %51 = load i32, ptr %50, align 8
  %52 = and i32 %51, 2048
  %.not31 = icmp eq i32 %52, 0
  br i1 %.not31, label %53, label %54

53:                                               ; preds = %49
  call void @qh_checkfacet(ptr noundef nonnull %45, i32 noundef 1, ptr noundef nonnull %4) #3
  br label %54

54:                                               ; preds = %53, %49, %46, %.thread
  %55 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 60), align 4, !tbaa !25
  %56 = icmp ne i32 %55, 0
  %57 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8
  %58 = icmp sgt i32 %57, 3
  %or.cond4 = select i1 %56, i1 true, i1 %58
  br i1 %or.cond4, label %59, label %64

59:                                               ; preds = %54
  %60 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2568), align 8
  %61 = icmp slt i32 %60, 500
  %or.cond6 = select i1 %58, i1 %61, i1 false
  br i1 %or.cond6, label %62, label %63

62:                                               ; preds = %59
  call void @qh_printlists() #3
  br label %63

63:                                               ; preds = %62, %59
  call void @qh_checkfacet(ptr noundef %1, i32 noundef 1, ptr noundef nonnull %4) #3
  br label %64

64:                                               ; preds = %54, %63
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %.not32 = icmp eq i32 %65, 0
  br i1 %.not32, label %67, label %66

66:                                               ; preds = %64
  call void @qh_errexit(i32 noundef 5, ptr noundef null, ptr noundef null) #3
  br label %67

67:                                               ; preds = %66, %64
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  ret void
}

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

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


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