; LLVM IR from Discngine/fpocket :: src/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, double, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, double, double, i32, double, i32, 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, i32, double, double, double, 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, i32, ptr, double, double, double, double, [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, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, ptr, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, 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.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
@.str.11 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [47 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: nounwind uwtable
define dso_local void @qh_buildhull() #1 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %6 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !5
  %7 = icmp sge i32 %6, 1
  br i1 %7, label %8, label %10

8:                                                ; preds = %0
  %9 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !13
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %9, i32 noundef 1037, ptr noundef @.str.11)
  br label %10

10:                                               ; preds = %8, %0
  %11 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 156), align 8, !tbaa !14
  store ptr %11, ptr %1, align 8, !tbaa !15
  br label %12

12:                                               ; preds = %43, %10
  %13 = load ptr, ptr %1, align 8, !tbaa !15
  %14 = icmp ne ptr %13, null
  br i1 %14, label %15, label %20

15:                                               ; preds = %12
  %16 = load ptr, ptr %1, align 8, !tbaa !15
  %17 = getelementptr inbounds %struct.facetT, ptr %16, i32 0, i32 7
  %18 = load ptr, ptr %17, align 8, !tbaa !16
  %19 = icmp ne ptr %18, null
  br label %20

20:                                               ; preds = %15, %12
  %21 = phi i1 [ false, %12 ], [ %19, %15 ]
  br i1 %21, label %22, label %47

22:                                               ; preds = %20
  %23 = load ptr, ptr %1, align 8, !tbaa !15
  %24 = getelementptr inbounds %struct.facetT, ptr %23, i32 0, i32 15
  %25 = load i32, ptr %24, align 8
  %26 = lshr i32 %25, 11
  %27 = and i32 %26, 1
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %36, label %29

29:                                               ; preds = %22
  %30 = load ptr, ptr %1, align 8, !tbaa !15
  %31 = getelementptr inbounds %struct.facetT, ptr %30, i32 0, i32 15
  %32 = load i32, ptr %31, align 8
  %33 = lshr i32 %32, 10
  %34 = and i32 %33, 1
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %42

36:                                               ; preds = %29, %22
  %37 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !13
  %38 = load ptr, ptr %1, align 8, !tbaa !15
  %39 = getelementptr inbounds %struct.facetT, ptr %38, i32 0, i32 14
  %40 = load i32, ptr %39, align 4, !tbaa !18
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %37, i32 noundef 6165, ptr noundef @.str.12, i32 noundef %40)
  %41 = load ptr, ptr %1, align 8, !tbaa !15
  call void @qh_errexit(i32 noundef 5, ptr noundef %41, ptr noundef null)
  br label %42

42:                                               ; preds = %36, %29
  br label %43

43:                                               ; preds = %42
  %44 = load ptr, ptr %1, align 8, !tbaa !15
  %45 = getelementptr inbounds %struct.facetT, ptr %44, i32 0, i32 7
  %46 = load ptr, ptr %45, align 8, !tbaa !16
  store ptr %46, ptr %1, align 8, !tbaa !15
  br label %12, !llvm.loop !19

47:                                               ; preds = %20
  %48 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 166), align 8, !tbaa !21
  store ptr %48, ptr %3, align 8, !tbaa !15
  br label %49

49:                                               ; preds = %110, %47
  %50 = load ptr, ptr %3, align 8, !tbaa !15
  %51 = icmp ne ptr %50, null
  br i1 %51, label %52, label %57

52:                                               ; preds = %49
  %53 = load ptr, ptr %3, align 8, !tbaa !15
  %54 = getelementptr inbounds %struct.vertexT, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !22
  %56 = icmp ne ptr %55, null
  br label %57

57:                                               ; preds = %52, %49
  %58 = phi i1 [ false, %49 ], [ %56, %52 ]
  br i1 %58, label %59, label %114

59:                                               ; preds = %57
  %60 = load ptr, ptr %3, align 8, !tbaa !15
  %61 = getelementptr inbounds %struct.vertexT, ptr %60, i32 0, i32 6
  %62 = load i8, ptr %61, align 8
  %63 = lshr i8 %62, 4
  %64 = and i8 %63, 1
  %65 = zext i8 %64 to i32
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %73

67:                                               ; preds = %59
  %68 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !13
  %69 = load ptr, ptr %3, align 8, !tbaa !15
  %70 = getelementptr inbounds %struct.vertexT, ptr %69, i32 0, i32 4
  %71 = load i32, ptr %70, align 8, !tbaa !24
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %68, i32 noundef 6166, ptr noundef @.str.13, i32 noundef %71)
  %72 = load ptr, ptr %3, align 8, !tbaa !15
  call void @qh_errprint(ptr noundef @.str.14, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef %72)
  call void @qh_errexit(i32 noundef 5, ptr noundef null, ptr noundef null)
  br label %73

73:                                               ; preds = %67, %59
  %74 = load ptr, ptr %3, align 8, !tbaa !15
  %75 = getelementptr inbounds %struct.vertexT, ptr %74, i32 0, i32 2
  %76 = load ptr, ptr %75, align 8, !tbaa !25
  %77 = call i32 @qh_pointid(ptr noundef %76)
  store i32 %77, ptr %4, align 4, !tbaa !26
  %78 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 83), align 8, !tbaa !27
  %79 = icmp sgt i32 %78, 0
  br i1 %79, label %80, label %85

80:                                               ; preds = %73
  %81 = load i32, ptr %4, align 4, !tbaa !26
  %82 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 83), align 8, !tbaa !27
  %83 = sub nsw i32 %82, 1
  %84 = icmp eq i32 %81, %83
  br i1 %84, label %102, label %85

85:                                               ; preds = %80, %73
  %86 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 83), align 8, !tbaa !27
  %87 = icmp slt i32 %86, 0
  br i1 %87, label %88, label %94

88:                                               ; preds = %85
  %89 = load i32, ptr %4, align 4, !tbaa !26
  %90 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 83), align 8, !tbaa !27
  %91 = sub nsw i32 0, %90
  %92 = sub nsw i32 %91, 1
  %93 = icmp eq i32 %89, %92
  br i1 %93, label %102, label %94

94:                                               ; preds = %88, %85
  %95 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 82), align 4, !tbaa !28
  %96 = icmp sgt i32 %95, 0
  br i1 %96, label %97, label %109

97:                                               ; preds = %94
  %98 = load i32, ptr %4, align 4, !tbaa !26
  %99 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 82), align 4, !tbaa !28
  %100 = sub nsw i32 %99, 1
  %101 = icmp eq i32 %98, %100
  br i1 %101, label %102, label %109

102:                                              ; preds = %97, %88, %80
  %103 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !5
  %104 = icmp sge i32 %103, 1
  br i1 %104, label %105, label %108

105:                                              ; preds = %102
  %106 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !13
  %107 = load i32, ptr %4, align 4, !tbaa !26
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %106, i32 noundef 1038, ptr noundef @.str.15, i32 noundef %107)
  br label %108

108:                                              ; preds = %105, %102
  store i32 1, ptr %5, align 4
  br label %148

109:                                              ; preds = %97, %94
  br label %110

110:                                              ; preds = %109
  %111 = load ptr, ptr %3, align 8, !tbaa !15
  %112 = getelementptr inbounds %struct.vertexT, ptr %111, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8, !tbaa !22
  store ptr %113, ptr %3, align 8, !tbaa !15
  br label %49, !llvm.loop !29

114:                                              ; preds = %57
  %115 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 156), align 8, !tbaa !14
  store ptr %115, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !30
  br label %116

116:                                              ; preds = %128, %114
  %117 = call ptr @qh_nextfurthest(ptr noundef %1)
  store ptr %117, ptr %2, align 8, !tbaa !15
  %118 = icmp ne ptr %117, null
  br i1 %118, label %119, label %129

119:                                              ; preds = %116
  %120 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 171), align 8, !tbaa !31
  %121 = add nsw i32 %120, -1
  store i32 %121, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 171), align 8, !tbaa !31
  %122 = load ptr, ptr %2, align 8, !tbaa !15
  %123 = load ptr, ptr %1, align 8, !tbaa !15
  %124 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 43), align 4, !tbaa !32
  %125 = call i32 @qh_addpoint(ptr noundef %122, ptr noundef %123, i32 noundef %124)
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %128, label %127

127:                                              ; preds = %119
  br label %129

128:                                              ; preds = %119
  br label %116, !llvm.loop !33

129:                                              ; preds = %127, %116
  %130 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 138), align 8, !tbaa !34
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %133

132:                                              ; preds = %129
  call void @qh_outcoplanar()
  br label %133

133:                                              ; preds = %132, %129
  %134 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 171), align 8, !tbaa !31
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %136, label %142

136:                                              ; preds = %133
  %137 = load ptr, ptr %2, align 8, !tbaa !15
  %138 = icmp ne ptr %137, null
  br i1 %138, label %142, label %139

139:                                              ; preds = %136
  %140 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !13
  %141 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 171), align 8, !tbaa !31
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %140, i32 noundef 6167, ptr noundef @.str.16, i32 noundef %141)
  call void @qh_errexit(i32 noundef 5, ptr noundef null, ptr noundef null)
  br label %142

142:                                              ; preds = %139, %136, %133
  %143 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !5
  %144 = icmp sge i32 %143, 1
  br i1 %144, label %145, label %147

145:                                              ; preds = %142
  %146 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !13
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %146, i32 noundef 1039, ptr noundef @.str.17)
  br label %147

147:                                              ; preds = %145, %142
  store i32 0, ptr %5, align 4
  br label %148

148:                                              ; preds = %147, %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #3
  %149 = load i32, ptr %5, align 4
  switch i32 %149, label %151 [
    i32 0, label %150
    i32 1, label %150
  ]

150:                                              ; preds = %148, %148
  ret void

151:                                              ; preds = %148
  unreachable
}

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @qh_addpoint(ptr noundef, ptr noundef, i32 noundef) #1

declare i32 @qh_pointid(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @qh_nextfurthest(ptr noundef) #1

declare void @qh_outcoplanar() #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 128}
!6 = !{!"qhT", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !10, i64 56, !10, i64 64, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !7, i64 88, !11, i64 96, !7, i64 104, !7, i64 108, !11, i64 112, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144, !10, i64 152, !10, i64 160, !7, i64 168, !7, i64 172, !7, i64 176, !10, i64 184, !10, i64 192, !7, i64 200, !10, i64 208, !7, i64 216, !7, i64 220, !7, i64 224, !7, i64 228, !7, i64 232, !7, i64 236, !7, i64 240, !7, i64 244, !7, i64 248, !7, i64 252, !7, i64 256, !7, i64 260, !7, i64 264, !7, i64 268, !7, i64 272, !7, i64 276, !7, i64 280, !7, i64 284, !7, i64 288, !7, i64 292, !8, i64 296, !7, i64 412, !7, i64 416, !7, i64 420, !7, i64 424, !7, i64 428, !7, i64 432, !7, i64 436, !7, i64 440, !7, i64 444, !10, i64 448, !10, i64 456, !10, i64 464, !7, i64 472, !7, i64 476, !7, i64 480, !7, i64 484, !7, i64 488, !7, i64 492, !7, i64 496, !7, i64 500, !7, i64 504, !7, i64 508, !7, i64 512, !7, i64 516, !7, i64 520, !7, i64 524, !7, i64 528, !7, i64 532, !7, i64 536, !7, i64 540, !10, i64 544, !7, i64 552, !7, i64 556, !7, i64 560, !7, i64 564, !7, i64 568, !7, i64 572, !7, i64 576, !7, i64 580, !10, i64 584, !7, i64 592, !11, i64 600, !11, i64 608, !7, i64 616, !7, i64 620, !7, i64 624, !7, i64 628, !7, i64 632, !11, i64 640, !7, i64 648, !11, i64 656, !7, i64 664, !8, i64 668, !7, i64 924, !8, i64 928, !8, i64 1184, !7, i64 1696, !7, i64 1700, !7, i64 1704, !7, i64 1708, !7, i64 1712, !7, i64 1716, !11, i64 1720, !11, i64 1728, !11, i64 1736, !11, i64 1744, !10, 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, !7, i64 1856, !11, i64 1864, !10, i64 1872, !10, i64 1880, !10, i64 1888, !10, i64 1896, !8, i64 1904, !8, i64 1912, !8, i64 2112, !8, i64 2152, !8, i64 2352, !11, i64 2392, !11, i64 2400, !11, i64 2408, !11, i64 2416, !7, i64 2424, !7, i64 2428, !7, i64 2432, !11, i64 2440, !11, i64 2448, !11, i64 2456, !11, i64 2464, !11, i64 2472, !7, i64 2480, !7, i64 2484, !11, i64 2488, !7, i64 2496, !11, i64 2504, !11, i64 2512, !11, i64 2520, !11, i64 2528, !7, i64 2536, !7, i64 2540, !7, i64 2544, !7, i64 2548, !7, i64 2552, !7, i64 2556, !7, i64 2560, !12, i64 2568, !7, i64 2576, !7, i64 2580, !7, i64 2584, !7, i64 2588, !11, i64 2592, !7, i64 2600, !7, i64 2604, !10, i64 2608, !7, i64 2616, !10, i64 2624, !10, i64 2632, !10, i64 2640, !7, i64 2648, !7, i64 2652, !7, i64 2656, !7, i64 2660, !10, i64 2664, !10, i64 2672, !7, i64 2680, !7, i64 2684, !7, i64 2688, !7, i64 2692, !10, i64 2696, !10, i64 2704, !7, i64 2712, !7, i64 2716, !7, i64 2720, !7, i64 2724, !11, i64 2728, !11, i64 2736, !11, i64 2744, !11, i64 2752, !11, i64 2760, !11, i64 2768, !11, i64 2776, !11, i64 2784, !7, i64 2792, !11, i64 2800, !11, i64 2808, !7, i64 2816, !7, i64 2820, !7, i64 2824, !11, i64 2832, !10, i64 2840, !10, i64 2848, !10, i64 2856, !7, i64 2864, !7, i64 2868, !11, i64 2872, !11, i64 2880, !7, i64 2888}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!6, !11, i64 2408}
!14 = !{!6, !11, i64 2440}
!15 = !{!11, !11, i64 0}
!16 = !{!17, !11, i64 56}
!17 = !{!"facetT", !10, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !8, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115}
!18 = !{!17, !7, i64 108}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!6, !11, i64 2512}
!22 = !{!23, !11, i64 0}
!23 = !{!"vertexT", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 40, !7, i64 40, !7, i64 40, !7, i64 40}
!24 = !{!23, !7, i64 32}
!25 = !{!23, !11, i64 16}
!26 = !{!7, !7, i64 0}
!27 = !{!6, !7, i64 520}
!28 = !{!6, !7, i64 516}
!29 = distinct !{!29, !20}
!30 = !{!6, !11, i64 2456}
!31 = !{!6, !7, i64 2544}
!32 = !{!6, !7, i64 236}
!33 = distinct !{!33, !20}
!34 = !{!6, !7, i64 1856}


; 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, double, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, double, double, i32, double, i32, 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, i32, double, double, double, 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, i32, ptr, double, double, double, double, [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, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, ptr, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, i32, i32, ptr, ptr, i32 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }

@qh_qh = external local_unnamed_addr global %struct.qhT, align 8
@.str.11 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [47 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: nounwind uwtable
define dso_local void @qh_buildhull() local_unnamed_addr #1 {
  %1 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #3
  %2 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !5
  %3 = icmp sgt i32 %2, 0
  br i1 %3, label %4, label %6

4:                                                ; preds = %0
  %5 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %5, i32 noundef 1037, ptr noundef nonnull @.str.11) #3
  br label %6

6:                                                ; preds = %4, %0
  %storemerge37 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2440), align 8, !tbaa !14
  %.not38 = icmp eq ptr %storemerge37, null
  br i1 %.not38, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %6, %17
  %storemerge39 = phi ptr [ %storemerge, %17 ], [ %storemerge37, %6 ]
  %7 = getelementptr inbounds i8, ptr %storemerge39, i64 56
  %8 = load ptr, ptr %7, align 8, !tbaa !14
  %.not21 = icmp eq ptr %8, null
  br i1 %.not21, label %.critedge, label %9

9:                                                ; preds = %.lr.ph
  %10 = getelementptr inbounds i8, ptr %storemerge39, i64 112
  %11 = load i32, ptr %10, align 8
  %12 = and i32 %11, 3072
  %or.cond29 = icmp eq i32 %12, 0
  br i1 %or.cond29, label %17, label %13

13:                                               ; preds = %9
  %14 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  %15 = getelementptr inbounds i8, ptr %storemerge39, i64 108
  %16 = load i32, ptr %15, align 4, !tbaa !15
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %14, i32 noundef 6165, ptr noundef nonnull @.str.12, i32 noundef %16) #3
  tail call void @qh_errexit(i32 noundef 5, ptr noundef nonnull %storemerge39, ptr noundef null) #3
  %storemerge.pre = load ptr, ptr %7, align 8, !tbaa !14
  br label %17

17:                                               ; preds = %9, %13
  %storemerge = phi ptr [ %8, %9 ], [ %storemerge.pre, %13 ]
  %.not = icmp eq ptr %storemerge, null
  br i1 %.not, label %.critedge, label %.lr.ph, !llvm.loop !17

.critedge:                                        ; preds = %.lr.ph, %17, %6
  %storemerge.lcssa = phi ptr [ null, %6 ], [ null, %17 ], [ %storemerge39, %.lr.ph ]
  store ptr %storemerge.lcssa, ptr %1, align 8, !tbaa !14
  br label %18

18:                                               ; preds = %41, %.critedge
  %.0.in = phi ptr [ getelementptr inbounds (i8, ptr @qh_qh, i64 2512), %.critedge ], [ %.0, %41 ]
  %.0 = load ptr, ptr %.0.in, align 8, !tbaa !14
  %.not22 = icmp eq ptr %.0, null
  br i1 %.not22, label %.critedge2, label %19

19:                                               ; preds = %18
  %20 = load ptr, ptr %.0, align 8, !tbaa !19
  %.not23 = icmp eq ptr %20, null
  br i1 %.not23, label %.critedge2, label %21

21:                                               ; preds = %19
  %22 = getelementptr inbounds i8, ptr %.0, i64 40
  %23 = load i8, ptr %22, align 8
  %24 = and i8 %23, 16
  %.not26 = icmp eq i8 %24, 0
  br i1 %.not26, label %29, label %25

25:                                               ; preds = %21
  %26 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  %27 = getelementptr inbounds i8, ptr %.0, i64 32
  %28 = load i32, ptr %27, align 8, !tbaa !21
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %26, i32 noundef 6166, ptr noundef nonnull @.str.13, i32 noundef %28) #3
  tail call void @qh_errprint(ptr noundef nonnull @.str.14, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef nonnull %.0) #3
  tail call void @qh_errexit(i32 noundef 5, ptr noundef null, ptr noundef null) #3
  br label %29

29:                                               ; preds = %25, %21
  %30 = getelementptr inbounds i8, ptr %.0, i64 16
  %31 = load ptr, ptr %30, align 8, !tbaa !22
  %32 = tail call i32 @qh_pointid(ptr noundef %31) #3
  %33 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 520), align 8, !tbaa !23
  %34 = icmp sgt i32 %33, 0
  %35 = add nsw i32 %33, -1
  %36 = icmp eq i32 %32, %35
  %or.cond31 = select i1 %34, i1 %36, i1 false
  br i1 %or.cond31, label %46, label %37

37:                                               ; preds = %29
  %38 = icmp slt i32 %33, 0
  %39 = xor i32 %33, %32
  %40 = icmp eq i32 %39, -1
  %or.cond33 = select i1 %38, i1 %40, i1 false
  br i1 %or.cond33, label %46, label %41

41:                                               ; preds = %37
  %42 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 516), align 4, !tbaa !24
  %43 = icmp sgt i32 %42, 0
  %44 = add nsw i32 %42, -1
  %45 = icmp eq i32 %32, %44
  %or.cond35 = select i1 %43, i1 %45, i1 false
  br i1 %or.cond35, label %46, label %18, !llvm.loop !25

46:                                               ; preds = %41, %37, %29
  %47 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !5
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %49, label %73

49:                                               ; preds = %46
  %50 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %50, i32 noundef 1038, ptr noundef nonnull @.str.15, i32 noundef %32) #3
  br label %73

.critedge2:                                       ; preds = %18, %19
  %51 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2440), align 8, !tbaa !26
  store ptr %51, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2456), align 8, !tbaa !27
  br label %52

52:                                               ; preds = %54, %.critedge2
  %53 = call ptr @qh_nextfurthest(ptr noundef nonnull %1)
  %.not44 = icmp ne ptr %53, null
  br i1 %.not44, label %54, label %60

54:                                               ; preds = %52
  %55 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2544), align 8, !tbaa !28
  %56 = add nsw i32 %55, -1
  store i32 %56, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2544), align 8, !tbaa !28
  %57 = load ptr, ptr %1, align 8, !tbaa !14
  %58 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 236), align 4, !tbaa !29
  %59 = call i32 @qh_addpoint(ptr noundef nonnull %53, ptr noundef %57, i32 noundef %58)
  %.not24 = icmp eq i32 %59, 0
  br i1 %.not24, label %60, label %52, !llvm.loop !30

60:                                               ; preds = %54, %52
  %61 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1856), align 8, !tbaa !31
  %.not25 = icmp eq i32 %61, 0
  br i1 %.not25, label %63, label %62

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

63:                                               ; preds = %62, %60
  %64 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2544), align 8, !tbaa !28
  %65 = icmp eq i32 %64, 0
  %or.cond = or i1 %.not44, %65
  br i1 %or.cond, label %68, label %66

66:                                               ; preds = %63
  %67 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %67, i32 noundef 6167, ptr noundef nonnull @.str.16, i32 noundef %64) #3
  call void @qh_errexit(i32 noundef 5, ptr noundef null, ptr noundef null) #3
  br label %68

68:                                               ; preds = %66, %63
  %69 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !5
  %70 = icmp sgt i32 %69, 0
  br i1 %70, label %71, label %73

71:                                               ; preds = %68
  %72 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %72, i32 noundef 1039, ptr noundef nonnull @.str.17) #3
  br label %73

73:                                               ; preds = %68, %71, %46, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #3
  ret void
}

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

declare void @qh_errexit(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @qh_addpoint(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @qh_pointid(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @qh_nextfurthest(ptr noundef) local_unnamed_addr #1

declare void @qh_outcoplanar() local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 128}
!6 = !{!"qhT", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !10, i64 56, !10, i64 64, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !7, i64 88, !11, i64 96, !7, i64 104, !7, i64 108, !11, i64 112, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144, !10, i64 152, !10, i64 160, !7, i64 168, !7, i64 172, !7, i64 176, !10, i64 184, !10, i64 192, !7, i64 200, !10, i64 208, !7, i64 216, !7, i64 220, !7, i64 224, !7, i64 228, !7, i64 232, !7, i64 236, !7, i64 240, !7, i64 244, !7, i64 248, !7, i64 252, !7, i64 256, !7, i64 260, !7, i64 264, !7, i64 268, !7, i64 272, !7, i64 276, !7, i64 280, !7, i64 284, !7, i64 288, !7, i64 292, !8, i64 296, !7, i64 412, !7, i64 416, !7, i64 420, !7, i64 424, !7, i64 428, !7, i64 432, !7, i64 436, !7, i64 440, !7, i64 444, !10, i64 448, !10, i64 456, !10, i64 464, !7, i64 472, !7, i64 476, !7, i64 480, !7, i64 484, !7, i64 488, !7, i64 492, !7, i64 496, !7, i64 500, !7, i64 504, !7, i64 508, !7, i64 512, !7, i64 516, !7, i64 520, !7, i64 524, !7, i64 528, !7, i64 532, !7, i64 536, !7, i64 540, !10, i64 544, !7, i64 552, !7, i64 556, !7, i64 560, !7, i64 564, !7, i64 568, !7, i64 572, !7, i64 576, !7, i64 580, !10, i64 584, !7, i64 592, !11, i64 600, !11, i64 608, !7, i64 616, !7, i64 620, !7, i64 624, !7, i64 628, !7, i64 632, !11, i64 640, !7, i64 648, !11, i64 656, !7, i64 664, !8, i64 668, !7, i64 924, !8, i64 928, !8, i64 1184, !7, i64 1696, !7, i64 1700, !7, i64 1704, !7, i64 1708, !7, i64 1712, !7, i64 1716, !11, i64 1720, !11, i64 1728, !11, i64 1736, !11, i64 1744, !10, 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, !7, i64 1856, !11, i64 1864, !10, i64 1872, !10, i64 1880, !10, i64 1888, !10, i64 1896, !8, i64 1904, !8, i64 1912, !8, i64 2112, !8, i64 2152, !8, i64 2352, !11, i64 2392, !11, i64 2400, !11, i64 2408, !11, i64 2416, !7, i64 2424, !7, i64 2428, !7, i64 2432, !11, i64 2440, !11, i64 2448, !11, i64 2456, !11, i64 2464, !11, i64 2472, !7, i64 2480, !7, i64 2484, !11, i64 2488, !7, i64 2496, !11, i64 2504, !11, i64 2512, !11, i64 2520, !11, i64 2528, !7, i64 2536, !7, i64 2540, !7, i64 2544, !7, i64 2548, !7, i64 2552, !7, i64 2556, !7, i64 2560, !12, i64 2568, !7, i64 2576, !7, i64 2580, !7, i64 2584, !7, i64 2588, !11, i64 2592, !7, i64 2600, !7, i64 2604, !10, i64 2608, !7, i64 2616, !10, i64 2624, !10, i64 2632, !10, i64 2640, !7, i64 2648, !7, i64 2652, !7, i64 2656, !7, i64 2660, !10, i64 2664, !10, i64 2672, !7, i64 2680, !7, i64 2684, !7, i64 2688, !7, i64 2692, !10, i64 2696, !10, i64 2704, !7, i64 2712, !7, i64 2716, !7, i64 2720, !7, i64 2724, !11, i64 2728, !11, i64 2736, !11, i64 2744, !11, i64 2752, !11, i64 2760, !11, i64 2768, !11, i64 2776, !11, i64 2784, !7, i64 2792, !11, i64 2800, !11, i64 2808, !7, i64 2816, !7, i64 2820, !7, i64 2824, !11, i64 2832, !10, i64 2840, !10, i64 2848, !10, i64 2856, !7, i64 2864, !7, i64 2868, !11, i64 2872, !11, i64 2880, !7, i64 2888}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!6, !11, i64 2408}
!14 = !{!11, !11, i64 0}
!15 = !{!16, !7, i64 108}
!16 = !{!"facetT", !10, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !8, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !11, i64 0}
!20 = !{!"vertexT", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 40, !7, i64 40, !7, i64 40, !7, i64 40}
!21 = !{!20, !7, i64 32}
!22 = !{!20, !11, i64 16}
!23 = !{!6, !7, i64 520}
!24 = !{!6, !7, i64 516}
!25 = distinct !{!25, !18}
!26 = !{!6, !11, i64 2440}
!27 = !{!6, !11, i64 2456}
!28 = !{!6, !7, i64 2544}
!29 = !{!6, !7, i64 236}
!30 = distinct !{!30, !18}
!31 = !{!6, !7, i64 1856}


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