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

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

@qh_qh = external global %struct.qhT, align 8
@qh_qhstat = external global %struct.qhstatT, align 8
@.str.173 = external hidden unnamed_addr constant [76 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

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

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

declare i32 @qh_pointid(ptr noundef) #1

declare void @qh_appendvertex(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @qh_newvertex(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local ptr @qh_makenewfacets(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %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 i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  store ptr null, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !9
  %10 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 14), align 4, !tbaa !11
  %11 = icmp ne i32 %10, 0
  br i1 %11, label %12, label %13

12:                                               ; preds = %1
  call void @qh_checkdelridge()
  br label %13

13:                                               ; preds = %12, %1
  %14 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 164), align 8, !tbaa !15
  store ptr %14, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 166), align 8, !tbaa !16
  %15 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 176), align 8, !tbaa !17
  store ptr %15, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 177), align 8, !tbaa !18
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = call ptr @qh_newvertex(ptr noundef %16)
  store ptr %17, ptr %8, align 8, !tbaa !5
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  call void @qh_appendvertex(ptr noundef %18)
  %19 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 217), align 8, !tbaa !19
  %20 = add i32 %19, 1
  store i32 %20, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 217), align 8, !tbaa !19
  %21 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 167), align 8, !tbaa !20
  store ptr %21, ptr %3, align 8, !tbaa !5
  br label %22

22:                                               ; preds = %116, %13
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %32

25:                                               ; preds = %22
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.facetT, ptr %26, i32 0, i32 15
  %28 = load i32, ptr %27, align 8
  %29 = lshr i32 %28, 11
  %30 = and i32 %29, 1
  %31 = icmp ne i32 %30, 0
  br label %32

32:                                               ; preds = %25, %22
  %33 = phi i1 [ false, %22 ], [ %31, %25 ]
  br i1 %33, label %34, label %120

34:                                               ; preds = %32
  store ptr null, ptr %6, align 8, !tbaa !5
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.facetT, ptr %35, i32 0, i32 10
  %37 = load ptr, ptr %36, align 8, !tbaa !21
  %38 = icmp ne ptr %37, null
  br i1 %38, label %39, label %57

39:                                               ; preds = %34
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.facetT, ptr %40, i32 0, i32 10
  %42 = load ptr, ptr %41, align 8, !tbaa !21
  %43 = getelementptr inbounds %struct.setT, ptr %42, i32 0, i32 1
  %44 = getelementptr inbounds [1 x %union.setelemT], ptr %43, i64 0, i64 0
  store ptr %44, ptr %7, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %50, %39
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds ptr, ptr %46, i32 1
  store ptr %47, ptr %7, align 8, !tbaa !5
  %48 = load ptr, ptr %46, align 8, !tbaa !5
  store ptr %48, ptr %6, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %56

50:                                               ; preds = %45
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.facetT, ptr %51, i32 0, i32 15
  %53 = load i32, ptr %52, align 8
  %54 = and i32 %53, -16385
  %55 = or i32 %54, 0
  store i32 %55, ptr %52, align 8
  br label %45, !llvm.loop !23

56:                                               ; preds = %45
  br label %57

57:                                               ; preds = %56, %34
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.facetT, ptr %58, i32 0, i32 9
  %60 = load ptr, ptr %59, align 8, !tbaa !25
  %61 = icmp ne ptr %60, null
  br i1 %61, label %62, label %69

62:                                               ; preds = %57
  %63 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 217), align 8, !tbaa !19
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.facetT, ptr %64, i32 0, i32 13
  store i32 %63, ptr %65, align 8, !tbaa !26
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = call ptr @qh_makenew_nonsimplicial(ptr noundef %66, ptr noundef %67, ptr noundef %9)
  store ptr %68, ptr %5, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %62, %57
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.facetT, ptr %70, i32 0, i32 15
  %72 = load i32, ptr %71, align 8
  %73 = lshr i32 %72, 13
  %74 = and i32 %73, 1
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %80

76:                                               ; preds = %69
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = call ptr @qh_makenew_simplicial(ptr noundef %77, ptr noundef %78, ptr noundef %9)
  store ptr %79, ptr %4, align 8, !tbaa !5
  br label %80

80:                                               ; preds = %76, %69
  %81 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 203), align 4, !tbaa !27
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %115, label %83

83:                                               ; preds = %80
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %88

86:                                               ; preds = %83
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %87, ptr %4, align 8, !tbaa !5
  br label %88

88:                                               ; preds = %86, %83
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = icmp ne ptr %89, null
  br i1 %90, label %91, label %95

91:                                               ; preds = %88
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.facetT, ptr %93, i32 0, i32 4
  store ptr %92, ptr %94, align 8, !tbaa !28
  br label %98

95:                                               ; preds = %88
  %96 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 110), align 8, !tbaa !28
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 110), align 8, !tbaa !28
  br label %98

98:                                               ; preds = %95, %91
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.facetT, ptr %99, i32 0, i32 9
  %101 = load ptr, ptr %100, align 8, !tbaa !25
  %102 = icmp ne ptr %101, null
  br i1 %102, label %103, label %109

103:                                              ; preds = %98
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.facetT, ptr %104, i32 0, i32 9
  %106 = load ptr, ptr %105, align 8, !tbaa !25
  %107 = getelementptr inbounds %struct.setT, ptr %106, i32 0, i32 1
  %108 = getelementptr inbounds [1 x %union.setelemT], ptr %107, i64 0, i64 0
  store ptr null, ptr %108, align 8, !tbaa !28
  br label %109

109:                                              ; preds = %103, %98
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.facetT, ptr %110, i32 0, i32 10
  %112 = load ptr, ptr %111, align 8, !tbaa !21
  %113 = getelementptr inbounds %struct.setT, ptr %112, i32 0, i32 1
  %114 = getelementptr inbounds [1 x %union.setelemT], ptr %113, i64 0, i64 0
  store ptr null, ptr %114, align 8, !tbaa !28
  br label %115

115:                                              ; preds = %109, %80
  br label %116

116:                                              ; preds = %115
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.facetT, ptr %117, i32 0, i32 7
  %119 = load ptr, ptr %118, align 8, !tbaa !29
  store ptr %119, ptr %3, align 8, !tbaa !5
  br label %22, !llvm.loop !30

120:                                              ; preds = %32
  %121 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 203), align 4, !tbaa !27
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %124, label %123

123:                                              ; preds = %120
  store i32 1, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 202), align 8, !tbaa !31
  br label %124

124:                                              ; preds = %123, %120
  %125 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !32
  %126 = icmp sge i32 %125, 1
  br i1 %126, label %127, label %135

127:                                              ; preds = %124
  %128 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !33
  %129 = load i32, ptr %9, align 4, !tbaa !9
  %130 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 185), align 4, !tbaa !34
  %131 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 182), align 8, !tbaa !35
  %132 = sub i32 %131, 1
  %133 = load ptr, ptr %2, align 8, !tbaa !5
  %134 = call i32 @qh_pointid(ptr noundef %133)
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %128, i32 noundef 1032, ptr noundef @.str.173, i32 noundef %129, i32 noundef %130, i32 noundef %132, i32 noundef %134)
  br label %135

135:                                              ; preds = %127, %124
  %136 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !32
  %137 = icmp sge i32 %136, 4
  br i1 %137, label %138, label %140

138:                                              ; preds = %135
  %139 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 166), align 8, !tbaa !16
  call void @qh_printfacetlist(ptr noundef %139, ptr noundef null, i32 noundef 1)
  br label %140

140:                                              ; preds = %138, %135
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  ret ptr %141
}

declare void @qh_checkdelridge() #1

declare ptr @qh_makenew_nonsimplicial(ptr noundef, ptr noundef, ptr noundef) #1

declare ptr @qh_makenew_simplicial(ptr noundef, ptr noundef, ptr noundef) #1

declare void @qh_printfacetlist(ptr noundef, ptr noundef, i32 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 60}
!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 2464}
!16 = !{!12, !6, i64 2480}
!17 = !{!12, !6, i64 2552}
!18 = !{!12, !6, i64 2560}
!19 = !{!12, !10, i64 2784}
!20 = !{!12, !6, i64 2488}
!21 = !{!22, !6, i64 80}
!22 = !{!"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}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!22, !6, i64 72}
!26 = !{!22, !10, i64 104}
!27 = !{!12, !10, i64 2708}
!28 = !{!7, !7, i64 0}
!29 = !{!22, !6, i64 56}
!30 = distinct !{!30, !24}
!31 = !{!12, !10, i64 2704}
!32 = !{!12, !10, i64 136}
!33 = !{!12, !6, i64 2424}
!34 = !{!12, !10, i64 2596}
!35 = !{!12, !10, i64 2584}


; 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
@.str.173 = external hidden unnamed_addr constant [76 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

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

declare i32 @qh_pointid(ptr noundef) local_unnamed_addr #1

declare void @qh_appendvertex(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @qh_newvertex(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @qh_makenewfacets(ptr noundef %0) local_unnamed_addr #2 {
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #3
  store i32 0, ptr %2, align 4, !tbaa !5
  %3 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 60), align 4, !tbaa !9
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %5, label %4

4:                                                ; preds = %1
  tail call void @qh_checkdelridge() #3
  br label %5

5:                                                ; preds = %4, %1
  %6 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2464), align 8, !tbaa !14
  store ptr %6, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2480), align 8, !tbaa !15
  %7 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2552), align 8, !tbaa !16
  store ptr %7, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2560), align 8, !tbaa !17
  %8 = tail call ptr @qh_newvertex(ptr noundef %0)
  tail call void @qh_appendvertex(ptr noundef %8) #3
  %9 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2784), align 8, !tbaa !18
  %10 = add i32 %9, 1
  store i32 %10, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2784), align 8, !tbaa !18
  %.047 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2488), align 8, !tbaa !19
  %.not3348 = icmp eq ptr %.047, null
  br i1 %.not3348, label %.critedge, label %.lr.ph52

.lr.ph52:                                         ; preds = %5, %49
  %.051 = phi ptr [ %.0, %49 ], [ %.047, %5 ]
  %.02750 = phi ptr [ %.1, %49 ], [ null, %5 ]
  %.02849 = phi ptr [ %.3, %49 ], [ null, %5 ]
  %11 = getelementptr inbounds i8, ptr %.051, i64 112
  %12 = load i32, ptr %11, align 8
  %13 = and i32 %12, 2048
  %.not34 = icmp eq i32 %13, 0
  br i1 %.not34, label %.critedge, label %14

14:                                               ; preds = %.lr.ph52
  %15 = getelementptr inbounds i8, ptr %.051, i64 80
  %16 = load ptr, ptr %15, align 8, !tbaa !20
  %.not36 = icmp eq ptr %16, null
  br i1 %.not36, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %14
  %.02644 = getelementptr inbounds i8, ptr %16, i64 8
  %17 = load ptr, ptr %.02644, align 8, !tbaa !19
  %.not3745 = icmp eq ptr %17, null
  br i1 %.not3745, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %18 = phi ptr [ %22, %.lr.ph ], [ %17, %.preheader ]
  %.02646 = phi ptr [ %.026, %.lr.ph ], [ %.02644, %.preheader ]
  %19 = getelementptr inbounds i8, ptr %18, i64 112
  %20 = load i32, ptr %19, align 8
  %21 = and i32 %20, -16385
  store i32 %21, ptr %19, align 8
  %.026 = getelementptr inbounds i8, ptr %.02646, i64 8
  %22 = load ptr, ptr %.026, align 8, !tbaa !19
  %.not37 = icmp eq ptr %22, null
  br i1 %.not37, label %.loopexit, label %.lr.ph, !llvm.loop !22

.loopexit:                                        ; preds = %.lr.ph, %.preheader, %14
  %23 = getelementptr inbounds i8, ptr %.051, i64 72
  %24 = load ptr, ptr %23, align 8, !tbaa !24
  %.not38 = icmp eq ptr %24, null
  br i1 %.not38, label %29, label %25

25:                                               ; preds = %.loopexit
  %26 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2784), align 8, !tbaa !18
  %27 = getelementptr inbounds i8, ptr %.051, i64 104
  store i32 %26, ptr %27, align 8, !tbaa !25
  %28 = call ptr @qh_makenew_nonsimplicial(ptr noundef nonnull %.051, ptr noundef %8, ptr noundef nonnull %2) #3
  br label %29

29:                                               ; preds = %25, %.loopexit
  %.1 = phi ptr [ %28, %25 ], [ %.02750, %.loopexit ]
  %30 = load i32, ptr %11, align 8
  %31 = and i32 %30, 8192
  %.not39 = icmp eq i32 %31, 0
  br i1 %.not39, label %34, label %32

32:                                               ; preds = %29
  %33 = call ptr @qh_makenew_simplicial(ptr noundef nonnull %.051, ptr noundef %8, ptr noundef nonnull %2) #3
  br label %34

34:                                               ; preds = %32, %29
  %.129 = phi ptr [ %33, %32 ], [ %.02849, %29 ]
  %35 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2708), align 4, !tbaa !26
  %.not40 = icmp eq i32 %35, 0
  br i1 %.not40, label %36, label %49

36:                                               ; preds = %34
  %.not41 = icmp eq ptr %.1, null
  %spec.select = select i1 %.not41, ptr %.129, ptr %.1
  %.not42 = icmp eq ptr %spec.select, null
  br i1 %.not42, label %39, label %37

37:                                               ; preds = %36
  %38 = getelementptr inbounds i8, ptr %.051, i64 32
  store ptr %spec.select, ptr %38, align 8, !tbaa !27
  br label %42

39:                                               ; preds = %36
  %40 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 880), align 8, !tbaa !27
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 880), align 8, !tbaa !27
  br label %42

42:                                               ; preds = %39, %37
  %43 = load ptr, ptr %23, align 8, !tbaa !24
  %.not43 = icmp eq ptr %43, null
  br i1 %.not43, label %46, label %44

44:                                               ; preds = %42
  %45 = getelementptr inbounds i8, ptr %43, i64 8
  store ptr null, ptr %45, align 8, !tbaa !27
  br label %46

46:                                               ; preds = %44, %42
  %47 = load ptr, ptr %15, align 8, !tbaa !20
  %48 = getelementptr inbounds i8, ptr %47, i64 8
  store ptr null, ptr %48, align 8, !tbaa !27
  br label %49

49:                                               ; preds = %34, %46
  %.3 = phi ptr [ %.129, %34 ], [ %spec.select, %46 ]
  %50 = getelementptr inbounds i8, ptr %.051, i64 56
  %.0 = load ptr, ptr %50, align 8, !tbaa !19
  %.not33 = icmp eq ptr %.0, null
  br i1 %.not33, label %.critedge, label %.lr.ph52, !llvm.loop !28

.critedge:                                        ; preds = %.lr.ph52, %49, %5
  %51 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2708), align 4, !tbaa !26
  %.not35 = icmp eq i32 %51, 0
  br i1 %.not35, label %52, label %53

52:                                               ; preds = %.critedge
  store i32 1, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2704), align 8, !tbaa !29
  br label %53

53:                                               ; preds = %52, %.critedge
  %54 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !30
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %56, label %.thread

56:                                               ; preds = %53
  %57 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !31
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2596), align 4, !tbaa !32
  %60 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2584), align 8, !tbaa !33
  %61 = add i32 %60, -1
  %62 = call i32 @qh_pointid(ptr noundef %0) #3
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %57, i32 noundef 1032, ptr noundef nonnull @.str.173, i32 noundef %58, i32 noundef %59, i32 noundef %61, i32 noundef %62) #3
  %.pr = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !30
  %63 = icmp sgt i32 %.pr, 3
  br i1 %63, label %64, label %.thread

64:                                               ; preds = %56
  %65 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2480), align 8, !tbaa !15
  call void @qh_printfacetlist(ptr noundef %65, ptr noundef null, i32 noundef 1) #3
  br label %.thread

.thread:                                          ; preds = %53, %64, %56
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #3
  ret ptr %8
}

declare void @qh_checkdelridge() local_unnamed_addr #1

declare ptr @qh_makenew_nonsimplicial(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @qh_makenew_simplicial(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @qh_printfacetlist(ptr noundef, ptr noundef, i32 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, !6, i64 60}
!10 = !{!"qhT", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !11, 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, !11, i64 64, !11, i64 72, !6, i64 80, !6, i64 84, !6, i64 88, !6, i64 92, !6, i64 96, !6, i64 100, !12, i64 104, !6, i64 112, !6, i64 116, !12, i64 120, !6, i64 128, !6, i64 132, !6, i64 136, !6, i64 140, !6, i64 144, !6, i64 148, !6, i64 152, !11, i64 160, !11, i64 168, !6, i64 176, !6, i64 180, !6, i64 184, !6, i64 188, !11, i64 192, !11, i64 200, !6, i64 208, !6, i64 212, !11, 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, !11, i64 448, !11, i64 456, !11, 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, !11, 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, !11, i64 592, !6, i64 600, !12, i64 608, !12, i64 616, !6, i64 624, !6, i64 628, !6, i64 632, !6, i64 636, !6, i64 640, !12, i64 648, !6, i64 656, !12, 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, !12, i64 1728, !12, i64 1736, !12, i64 1744, !12, i64 1752, !11, i64 1760, !11, i64 1768, !11, i64 1776, !11, i64 1784, !11, i64 1792, !11, i64 1800, !11, i64 1808, !11, i64 1816, !11, i64 1824, !11, i64 1832, !11, i64 1840, !11, i64 1848, !11, i64 1856, !11, i64 1864, !12, i64 1872, !11, i64 1880, !11, i64 1888, !11, i64 1896, !11, i64 1904, !6, i64 1912, !7, i64 1916, !7, i64 1928, !7, i64 2128, !7, i64 2168, !7, i64 2368, !12, i64 2408, !12, i64 2416, !12, i64 2424, !12, i64 2432, !6, i64 2440, !6, i64 2444, !6, i64 2448, !12, i64 2456, !12, i64 2464, !12, i64 2472, !12, i64 2480, !12, i64 2488, !6, i64 2496, !6, i64 2500, !12, i64 2504, !6, i64 2512, !12, i64 2520, !6, i64 2528, !12, i64 2536, !12, i64 2544, !12, i64 2552, !12, 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, !13, i64 2600, !6, i64 2608, !6, i64 2612, !6, i64 2616, !6, i64 2620, !6, i64 2624, !12, i64 2632, !12, i64 2640, !6, i64 2648, !6, i64 2652, !6, i64 2656, !11, i64 2664, !6, i64 2672, !11, i64 2680, !11, i64 2688, !11, i64 2696, !6, i64 2704, !6, i64 2708, !6, i64 2712, !6, i64 2716, !6, i64 2720, !11, i64 2728, !11, i64 2736, !6, i64 2744, !6, i64 2748, !6, i64 2752, !6, i64 2756, !6, i64 2760, !6, i64 2764, !11, i64 2768, !11, i64 2776, !6, i64 2784, !6, i64 2788, !6, i64 2792, !6, i64 2796, !12, i64 2800, !12, i64 2808, !12, i64 2816, !12, i64 2824, !12, i64 2832, !12, i64 2840, !12, i64 2848, !12, i64 2856, !12, i64 2864, !6, i64 2872, !12, i64 2880, !12, i64 2888, !6, i64 2896, !6, i64 2900, !6, i64 2904, !12, i64 2912, !11, i64 2920, !11, i64 2928, !11, i64 2936, !11, i64 2944, !6, i64 2952, !6, i64 2956, !6, i64 2960, !6, i64 2964, !6, i64 2968, !6, i64 2972, !12, i64 2976, !12, i64 2984, !6, i64 2992}
!11 = !{!"double", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!10, !12, i64 2464}
!15 = !{!10, !12, i64 2480}
!16 = !{!10, !12, i64 2552}
!17 = !{!10, !12, i64 2560}
!18 = !{!10, !6, i64 2784}
!19 = !{!12, !12, i64 0}
!20 = !{!21, !12, i64 80}
!21 = !{!"facetT", !11, i64 0, !11, i64 8, !11, i64 16, !12, i64 24, !7, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, 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}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!21, !12, i64 72}
!25 = !{!21, !6, i64 104}
!26 = !{!10, !6, i64 2708}
!27 = !{!7, !7, i64 0}
!28 = distinct !{!28, !23}
!29 = !{!10, !6, i64 2704}
!30 = !{!10, !6, i64 136}
!31 = !{!10, !12, i64 2424}
!32 = !{!10, !6, i64 2596}
!33 = !{!10, !6, i64 2584}


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