; LLVM IR from Discngine/fpocket :: src/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, 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.setT = type { i32, [1 x %union.setelemT] }
%union.setelemT = type { ptr }
%struct.vertexT = type { ptr, ptr, ptr, ptr, i32, i32, i8 }

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

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

11:                                               ; preds = %0
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %187

12:                                               ; preds = %0
  %13 = call i32 @qh_merge_degenredundant()
  %14 = icmp ne i32 %13, 0
  br i1 %14, label %15, label %16

15:                                               ; preds = %12
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %15, %12
  br label %17

17:                                               ; preds = %169, %16
  %18 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 159), align 8, !tbaa !14
  store ptr %18, ptr %5, align 8, !tbaa !15
  br label %19

19:                                               ; preds = %49, %17
  %20 = load ptr, ptr %5, align 8, !tbaa !15
  %21 = icmp ne ptr %20, null
  br i1 %21, label %22, label %27

22:                                               ; preds = %19
  %23 = load ptr, ptr %5, align 8, !tbaa !15
  %24 = getelementptr inbounds %struct.facetT, ptr %23, i32 0, i32 7
  %25 = load ptr, ptr %24, align 8, !tbaa !16
  %26 = icmp ne ptr %25, null
  br label %27

27:                                               ; preds = %22, %19
  %28 = phi i1 [ false, %19 ], [ %26, %22 ]
  br i1 %28, label %29, label %53

29:                                               ; preds = %27
  %30 = load ptr, ptr %5, 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, 29
  %34 = and i32 %33, 1
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %48

36:                                               ; preds = %29
  %37 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 36), align 8, !tbaa !18
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %45, label %39

39:                                               ; preds = %36
  %40 = load ptr, ptr %5, align 8, !tbaa !15
  %41 = getelementptr inbounds %struct.facetT, ptr %40, i32 0, i32 15
  %42 = load i32, ptr %41, align 8
  %43 = and i32 %42, -536870913
  %44 = or i32 %43, 0
  store i32 %44, ptr %41, align 8
  br label %45

45:                                               ; preds = %39, %36
  %46 = load ptr, ptr %5, align 8, !tbaa !15
  %47 = call i32 @qh_remove_extravertices(ptr noundef %46)
  br label %48

48:                                               ; preds = %45, %29
  br label %49

49:                                               ; preds = %48
  %50 = load ptr, ptr %5, align 8, !tbaa !15
  %51 = getelementptr inbounds %struct.facetT, ptr %50, i32 0, i32 7
  %52 = load ptr, ptr %51, align 8, !tbaa !16
  store ptr %52, ptr %5, align 8, !tbaa !15
  br label %19, !llvm.loop !19

53:                                               ; preds = %27
  %54 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 36), align 8, !tbaa !18
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %57, label %56

56:                                               ; preds = %53
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %187

57:                                               ; preds = %53
  %58 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 159), align 8, !tbaa !14
  store ptr %58, ptr %5, align 8, !tbaa !15
  br label %59

59:                                               ; preds = %120, %57
  %60 = load ptr, ptr %5, align 8, !tbaa !15
  %61 = icmp ne ptr %60, null
  br i1 %61, label %62, label %67

62:                                               ; preds = %59
  %63 = load ptr, ptr %5, align 8, !tbaa !15
  %64 = getelementptr inbounds %struct.facetT, ptr %63, i32 0, i32 7
  %65 = load ptr, ptr %64, align 8, !tbaa !16
  %66 = icmp ne ptr %65, null
  br label %67

67:                                               ; preds = %62, %59
  %68 = phi i1 [ false, %59 ], [ %66, %62 ]
  br i1 %68, label %69, label %124

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

76:                                               ; preds = %69
  %77 = load ptr, ptr %5, align 8, !tbaa !15
  %78 = getelementptr inbounds %struct.facetT, ptr %77, i32 0, i32 15
  %79 = load i32, ptr %78, align 8
  %80 = and i32 %79, -536870913
  %81 = or i32 %80, 0
  store i32 %81, ptr %78, align 8
  store ptr null, ptr %6, align 8, !tbaa !15
  %82 = load ptr, ptr %5, align 8, !tbaa !15
  %83 = getelementptr inbounds %struct.facetT, ptr %82, i32 0, i32 8
  %84 = load ptr, ptr %83, align 8, !tbaa !21
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %118

86:                                               ; preds = %76
  %87 = load ptr, ptr %5, align 8, !tbaa !15
  %88 = getelementptr inbounds %struct.facetT, ptr %87, i32 0, i32 8
  %89 = load ptr, ptr %88, align 8, !tbaa !21
  %90 = getelementptr inbounds %struct.setT, ptr %89, i32 0, i32 1
  %91 = getelementptr inbounds [1 x %union.setelemT], ptr %90, i64 0, i64 0
  store ptr %91, ptr %7, align 8, !tbaa !15
  br label %92

92:                                               ; preds = %116, %86
  %93 = load ptr, ptr %7, align 8, !tbaa !15
  %94 = getelementptr inbounds ptr, ptr %93, i32 1
  store ptr %94, ptr %7, align 8, !tbaa !15
  %95 = load ptr, ptr %93, align 8, !tbaa !15
  store ptr %95, ptr %6, align 8, !tbaa !15
  %96 = icmp ne ptr %95, null
  br i1 %96, label %97, label %117

97:                                               ; preds = %92
  %98 = load ptr, ptr %6, align 8, !tbaa !15
  %99 = getelementptr inbounds %struct.vertexT, ptr %98, i32 0, i32 6
  %100 = load i8, ptr %99, align 8
  %101 = lshr i8 %100, 2
  %102 = and i8 %101, 1
  %103 = zext i8 %102 to i32
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %116

105:                                              ; preds = %97
  %106 = load ptr, ptr %6, align 8, !tbaa !15
  %107 = load ptr, ptr %5, align 8, !tbaa !15
  %108 = call ptr @qh_rename_sharedvertex(ptr noundef %106, ptr noundef %107)
  %109 = icmp ne ptr %108, null
  br i1 %109, label %110, label %115

110:                                              ; preds = %105
  %111 = load i32, ptr %2, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %2, align 4, !tbaa !5
  %113 = load ptr, ptr %7, align 8, !tbaa !15
  %114 = getelementptr inbounds ptr, ptr %113, i32 -1
  store ptr %114, ptr %7, align 8, !tbaa !15
  br label %115

115:                                              ; preds = %110, %105
  br label %116

116:                                              ; preds = %115, %97
  br label %92, !llvm.loop !22

117:                                              ; preds = %92
  br label %118

118:                                              ; preds = %117, %76
  br label %119

119:                                              ; preds = %118, %69
  br label %120

120:                                              ; preds = %119
  %121 = load ptr, ptr %5, align 8, !tbaa !15
  %122 = getelementptr inbounds %struct.facetT, ptr %121, i32 0, i32 7
  %123 = load ptr, ptr %122, align 8, !tbaa !16
  store ptr %123, ptr %5, align 8, !tbaa !15
  br label %59, !llvm.loop !23

124:                                              ; preds = %67
  %125 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 168), align 8, !tbaa !24
  store ptr %125, ptr %6, align 8, !tbaa !15
  br label %126

126:                                              ; preds = %173, %124
  %127 = load ptr, ptr %6, align 8, !tbaa !15
  %128 = icmp ne ptr %127, null
  br i1 %128, label %129, label %134

129:                                              ; preds = %126
  %130 = load ptr, ptr %6, align 8, !tbaa !15
  %131 = getelementptr inbounds %struct.vertexT, ptr %130, i32 0, i32 0
  %132 = load ptr, ptr %131, align 8, !tbaa !25
  %133 = icmp ne ptr %132, null
  br label %134

134:                                              ; preds = %129, %126
  %135 = phi i1 [ false, %126 ], [ %133, %129 ]
  br i1 %135, label %136, label %177

136:                                              ; preds = %134
  %137 = load ptr, ptr %6, align 8, !tbaa !15
  %138 = getelementptr inbounds %struct.vertexT, ptr %137, i32 0, i32 6
  %139 = load i8, ptr %138, align 8
  %140 = lshr i8 %139, 2
  %141 = and i8 %140, 1
  %142 = zext i8 %141 to i32
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %172

144:                                              ; preds = %136
  %145 = load ptr, ptr %6, align 8, !tbaa !15
  %146 = getelementptr inbounds %struct.vertexT, ptr %145, i32 0, i32 6
  %147 = load i8, ptr %146, align 8
  %148 = lshr i8 %147, 3
  %149 = and i8 %148, 1
  %150 = zext i8 %149 to i32
  %151 = icmp ne i32 %150, 0
  br i1 %151, label %172, label %152

152:                                              ; preds = %144
  %153 = load ptr, ptr %6, align 8, !tbaa !15
  %154 = getelementptr inbounds %struct.vertexT, ptr %153, i32 0, i32 6
  %155 = load i8, ptr %154, align 8
  %156 = and i8 %155, -5
  %157 = or i8 %156, 0
  store i8 %157, ptr %154, align 8
  %158 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 104), align 8, !tbaa !9
  %159 = icmp sge i32 %158, 4
  br i1 %159, label %160, label %171

160:                                              ; preds = %152
  %161 = load ptr, ptr %6, align 8, !tbaa !15
  %162 = call ptr @qh_redundant_vertex(ptr noundef %161)
  %163 = icmp ne ptr %162, null
  br i1 %163, label %164, label %171

164:                                              ; preds = %160
  %165 = load i32, ptr %3, align 4, !tbaa !5
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %3, align 4, !tbaa !5
  %167 = call i32 @qh_merge_degenredundant()
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %170

169:                                              ; preds = %164
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %17

170:                                              ; preds = %164
  br label %171

171:                                              ; preds = %170, %160, %152
  br label %172

172:                                              ; preds = %171, %144, %136
  br label %173

173:                                              ; preds = %172
  %174 = load ptr, ptr %6, align 8, !tbaa !15
  %175 = getelementptr inbounds %struct.vertexT, ptr %174, i32 0, i32 0
  %176 = load ptr, ptr %175, align 8, !tbaa !25
  store ptr %176, ptr %6, align 8, !tbaa !15
  br label %126, !llvm.loop !27

177:                                              ; preds = %134
  %178 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !28
  %179 = icmp sge i32 %178, 1
  br i1 %179, label %180, label %185

180:                                              ; preds = %177
  %181 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !29
  %182 = load i32, ptr %2, align 4, !tbaa !5
  %183 = load i32, ptr %3, align 4, !tbaa !5
  %184 = load i32, ptr %4, align 4, !tbaa !5
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %181, i32 noundef 1014, ptr noundef @.str.100, i32 noundef %182, i32 noundef %183, i32 noundef %184)
  br label %185

185:                                              ; preds = %180, %177
  %186 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %186, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %187

187:                                              ; preds = %185, %56, %11
  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 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  %188 = load i32, ptr %1, align 4
  ret i32 %188
}

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

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

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

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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 624}
!10 = !{!"qhT", !6, i64 0, !6, i64 4, !6, i64 8, !11, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !11, i64 56, !11, i64 64, !6, i64 72, !6, i64 76, !6, i64 80, !6, i64 84, !6, i64 88, !12, i64 96, !6, i64 104, !6, i64 108, !12, i64 112, !6, i64 120, !6, i64 124, !6, i64 128, !6, i64 132, !6, i64 136, !6, i64 140, !6, i64 144, !11, i64 152, !11, i64 160, !6, i64 168, !6, i64 172, !6, i64 176, !11, i64 184, !11, i64 192, !6, i64 200, !11, i64 208, !6, i64 216, !6, i64 220, !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, !7, i64 296, !6, i64 412, !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, !11, i64 544, !6, i64 552, !6, i64 556, !6, i64 560, !6, i64 564, !6, i64 568, !6, i64 572, !6, i64 576, !6, i64 580, !11, i64 584, !6, i64 592, !12, i64 600, !12, i64 608, !6, i64 616, !6, i64 620, !6, i64 624, !6, i64 628, !6, i64 632, !12, i64 640, !6, i64 648, !12, i64 656, !6, i64 664, !7, i64 668, !6, i64 924, !7, i64 928, !7, i64 1184, !6, i64 1696, !6, i64 1700, !6, i64 1704, !6, i64 1708, !6, i64 1712, !6, i64 1716, !12, i64 1720, !12, i64 1728, !12, i64 1736, !12, i64 1744, !11, 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, !6, i64 1856, !12, i64 1864, !11, i64 1872, !11, i64 1880, !11, i64 1888, !11, i64 1896, !7, i64 1904, !7, i64 1912, !7, i64 2112, !7, i64 2152, !7, i64 2352, !12, i64 2392, !12, i64 2400, !12, i64 2408, !12, i64 2416, !6, i64 2424, !6, i64 2428, !6, i64 2432, !12, i64 2440, !12, i64 2448, !12, i64 2456, !12, i64 2464, !12, i64 2472, !6, i64 2480, !6, i64 2484, !12, i64 2488, !6, i64 2496, !12, i64 2504, !12, i64 2512, !12, i64 2520, !12, i64 2528, !6, i64 2536, !6, i64 2540, !6, i64 2544, !6, i64 2548, !6, i64 2552, !6, i64 2556, !6, i64 2560, !13, i64 2568, !6, i64 2576, !6, i64 2580, !6, i64 2584, !6, i64 2588, !12, i64 2592, !6, i64 2600, !6, i64 2604, !11, i64 2608, !6, i64 2616, !11, i64 2624, !11, i64 2632, !11, i64 2640, !6, i64 2648, !6, i64 2652, !6, i64 2656, !6, i64 2660, !11, i64 2664, !11, i64 2672, !6, i64 2680, !6, i64 2684, !6, i64 2688, !6, i64 2692, !11, i64 2696, !11, i64 2704, !6, i64 2712, !6, i64 2716, !6, i64 2720, !6, i64 2724, !12, i64 2728, !12, i64 2736, !12, i64 2744, !12, i64 2752, !12, i64 2760, !12, i64 2768, !12, i64 2776, !12, i64 2784, !6, i64 2792, !12, i64 2800, !12, i64 2808, !6, i64 2816, !6, i64 2820, !6, i64 2824, !12, i64 2832, !11, i64 2840, !11, i64 2848, !11, i64 2856, !6, i64 2864, !6, i64 2868, !12, i64 2872, !12, i64 2880, !6, i64 2888}
!11 = !{!"double", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!10, !12, i64 2464}
!15 = !{!12, !12, i64 0}
!16 = !{!17, !12, i64 56}
!17 = !{!"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}
!18 = !{!10, !6, i64 200}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!17, !12, i64 64}
!22 = distinct !{!22, !20}
!23 = distinct !{!23, !20}
!24 = !{!10, !12, i64 2528}
!25 = !{!26, !12, i64 0}
!26 = !{!"vertexT", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 40, !6, i64 40, !6, i64 40, !6, i64 40}
!27 = distinct !{!27, !20}
!28 = !{!10, !6, i64 128}
!29 = !{!10, !12, i64 2408}


; 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.100 = external hidden unnamed_addr constant [84 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @qh_merge_degenredundant() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @qh_reducevertices() local_unnamed_addr #1 {
  %1 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 624), align 8, !tbaa !5
  %2 = icmp eq i32 %1, 2
  br i1 %2, label %.loopexit69, label %3

3:                                                ; preds = %0
  %4 = tail call i32 @qh_merge_degenredundant()
  %.not = icmp ne i32 %4, 0
  %spec.select = zext i1 %.not to i32
  br label %.loopexit68

.loopexit68:                                      ; preds = %55, %3
  %.042 = phi i32 [ 0, %3 ], [ %.143.lcssa, %55 ]
  %.040 = phi i32 [ 0, %3 ], [ %56, %55 ]
  %.139 = phi i32 [ %spec.select, %3 ], [ 1, %55 ]
  %.03672 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2464), align 8, !tbaa !13
  %.not4873 = icmp eq ptr %.03672, null
  br i1 %.not4873, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %.loopexit68, %17
  %.03674 = phi ptr [ %.036, %17 ], [ %.03672, %.loopexit68 ]
  %5 = getelementptr inbounds i8, ptr %.03674, i64 56
  %6 = load ptr, ptr %5, align 8, !tbaa !13
  %.not49 = icmp eq ptr %6, null
  br i1 %.not49, label %.critedge, label %7

7:                                                ; preds = %.lr.ph
  %8 = getelementptr inbounds i8, ptr %.03674, i64 112
  %9 = load i32, ptr %8, align 8
  %10 = and i32 %9, 536870912
  %.not64 = icmp eq i32 %10, 0
  br i1 %.not64, label %17, label %11

11:                                               ; preds = %7
  %12 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 200), align 8, !tbaa !14
  %.not65 = icmp eq i32 %12, 0
  br i1 %.not65, label %13, label %15

13:                                               ; preds = %11
  %14 = and i32 %9, -536870913
  store i32 %14, ptr %8, align 8
  br label %15

15:                                               ; preds = %13, %11
  %16 = tail call i32 @qh_remove_extravertices(ptr noundef nonnull %.03674)
  %.036.pre = load ptr, ptr %5, align 8, !tbaa !13
  br label %17

17:                                               ; preds = %7, %15
  %.036 = phi ptr [ %6, %7 ], [ %.036.pre, %15 ]
  %.not48 = icmp eq ptr %.036, null
  br i1 %.not48, label %.critedge, label %.lr.ph, !llvm.loop !15

.critedge:                                        ; preds = %.lr.ph, %17, %.loopexit68
  %18 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 200), align 8, !tbaa !14
  %.not50 = icmp eq i32 %18, 0
  br i1 %.not50, label %.loopexit69, label %.preheader

.preheader:                                       ; preds = %.critedge
  %.13780 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2464), align 8, !tbaa !13
  %.not5181 = icmp eq ptr %.13780, null
  br i1 %.not5181, label %.critedge2, label %.lr.ph84

.lr.ph84:                                         ; preds = %.preheader, %.loopexit
  %.13783 = phi ptr [ %.137, %.loopexit ], [ %.13780, %.preheader ]
  %.14382 = phi i32 [ %.4, %.loopexit ], [ %.042, %.preheader ]
  %19 = getelementptr inbounds i8, ptr %.13783, i64 56
  %20 = load ptr, ptr %19, align 8, !tbaa !13
  %.not52 = icmp eq ptr %20, null
  br i1 %.not52, label %.critedge2, label %21

21:                                               ; preds = %.lr.ph84
  %22 = getelementptr inbounds i8, ptr %.13783, i64 112
  %23 = load i32, ptr %22, align 8
  %24 = and i32 %23, 536870912
  %.not59 = icmp eq i32 %24, 0
  br i1 %.not59, label %.loopexit, label %25

25:                                               ; preds = %21
  %26 = and i32 %23, -536870913
  store i32 %26, ptr %22, align 8
  %27 = getelementptr inbounds i8, ptr %.13783, i64 64
  %28 = load ptr, ptr %27, align 8, !tbaa !17
  %.not60 = icmp eq ptr %28, null
  br i1 %.not60, label %.loopexit, label %29

29:                                               ; preds = %25
  %30 = getelementptr inbounds i8, ptr %28, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !13
  %.not6176 = icmp eq ptr %31, null
  br i1 %.not6176, label %.loopexit, label %.lr.ph79.preheader

.lr.ph79.preheader:                               ; preds = %29
  %32 = getelementptr inbounds i8, ptr %28, i64 16
  br label %.lr.ph79

.lr.ph79:                                         ; preds = %.lr.ph79.preheader, %41
  %33 = phi ptr [ %43, %41 ], [ %31, %.lr.ph79.preheader ]
  %34 = phi ptr [ %42, %41 ], [ %32, %.lr.ph79.preheader ]
  %.078 = phi ptr [ %.1, %41 ], [ %30, %.lr.ph79.preheader ]
  %.24477 = phi i32 [ %.3, %41 ], [ %.14382, %.lr.ph79.preheader ]
  %35 = getelementptr inbounds i8, ptr %33, i64 40
  %36 = load i8, ptr %35, align 8
  %37 = and i8 %36, 4
  %.not62 = icmp eq i8 %37, 0
  br i1 %.not62, label %41, label %38

38:                                               ; preds = %.lr.ph79
  %39 = tail call ptr @qh_rename_sharedvertex(ptr noundef nonnull %33, ptr noundef nonnull %.13783)
  %.not63 = icmp ne ptr %39, null
  %40 = zext i1 %.not63 to i32
  %spec.select66 = add nsw i32 %.24477, %40
  %spec.select67 = select i1 %.not63, ptr %.078, ptr %34
  br label %41

41:                                               ; preds = %38, %.lr.ph79
  %.3 = phi i32 [ %.24477, %.lr.ph79 ], [ %spec.select66, %38 ]
  %.1 = phi ptr [ %34, %.lr.ph79 ], [ %spec.select67, %38 ]
  %42 = getelementptr inbounds i8, ptr %.1, i64 8
  %43 = load ptr, ptr %.1, align 8, !tbaa !13
  %.not61 = icmp eq ptr %43, null
  br i1 %.not61, label %.loopexit.loopexit, label %.lr.ph79, !llvm.loop !19

.loopexit.loopexit:                               ; preds = %41
  %.137.pre = load ptr, ptr %19, align 8, !tbaa !13
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %29, %21, %25
  %.137 = phi ptr [ %20, %25 ], [ %20, %21 ], [ %20, %29 ], [ %.137.pre, %.loopexit.loopexit ]
  %.4 = phi i32 [ %.14382, %25 ], [ %.14382, %21 ], [ %.14382, %29 ], [ %.3, %.loopexit.loopexit ]
  %.not51 = icmp eq ptr %.137, null
  br i1 %.not51, label %.critedge2, label %.lr.ph84, !llvm.loop !20

.critedge2:                                       ; preds = %.lr.ph84, %.loopexit, %.preheader
  %.143.lcssa = phi i32 [ %.042, %.preheader ], [ %.4, %.loopexit ], [ %.14382, %.lr.ph84 ]
  %.03588 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2528), align 8, !tbaa !13
  %.not5389 = icmp eq ptr %.03588, null
  br i1 %.not5389, label %.critedge4, label %.lr.ph92

.lr.ph92:                                         ; preds = %.critedge2, %58
  %.03591 = phi ptr [ %.035, %58 ], [ %.03588, %.critedge2 ]
  %.14190 = phi i32 [ %.2, %58 ], [ %.040, %.critedge2 ]
  %44 = load ptr, ptr %.03591, align 8, !tbaa !21
  %.not54 = icmp eq ptr %44, null
  br i1 %.not54, label %.critedge4, label %45

45:                                               ; preds = %.lr.ph92
  %46 = getelementptr inbounds i8, ptr %.03591, i64 40
  %47 = load i8, ptr %46, align 8
  %48 = and i8 %47, 12
  %or.cond = icmp eq i8 %48, 4
  br i1 %or.cond, label %49, label %58

49:                                               ; preds = %45
  %50 = and i8 %47, -13
  store i8 %50, ptr %46, align 8
  %51 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 624), align 8, !tbaa !5
  %52 = icmp sgt i32 %51, 3
  br i1 %52, label %53, label %58

53:                                               ; preds = %49
  %54 = tail call ptr @qh_redundant_vertex(ptr noundef nonnull %.03591)
  %.not57 = icmp eq ptr %54, null
  br i1 %.not57, label %58, label %55

55:                                               ; preds = %53
  %56 = add nsw i32 %.14190, 1
  %57 = tail call i32 @qh_merge_degenredundant()
  %.not58 = icmp eq i32 %57, 0
  br i1 %.not58, label %58, label %.loopexit68

58:                                               ; preds = %45, %55, %53, %49
  %.2 = phi i32 [ %56, %55 ], [ %.14190, %53 ], [ %.14190, %49 ], [ %.14190, %45 ]
  %.035 = load ptr, ptr %.03591, align 8, !tbaa !13
  %.not53 = icmp eq ptr %.035, null
  br i1 %.not53, label %.critedge4, label %.lr.ph92, !llvm.loop !23

.critedge4:                                       ; preds = %.critedge2, %.lr.ph92, %58
  %.141.lcssa = phi i32 [ %.2, %58 ], [ %.14190, %.lr.ph92 ], [ %.040, %.critedge2 ]
  %59 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !24
  %60 = icmp sgt i32 %59, 0
  br i1 %60, label %61, label %.loopexit69

61:                                               ; preds = %.critedge4
  %62 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !25
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %62, i32 noundef 1014, ptr noundef nonnull @.str.100, i32 noundef %.143.lcssa, i32 noundef %.141.lcssa, i32 noundef %.139) #2
  br label %.loopexit69

.loopexit69:                                      ; preds = %.critedge, %.critedge4, %61, %0
  %.045 = phi i32 [ 0, %0 ], [ %.139, %61 ], [ %.139, %.critedge4 ], [ 0, %.critedge ]
  ret i32 %.045
}

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

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

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

attributes #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 #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 = { 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 624}
!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 = !{!11, !11, i64 0}
!14 = !{!6, !7, i64 200}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !11, i64 64}
!18 = !{!"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}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}
!21 = !{!22, !11, i64 0}
!22 = !{!"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}
!23 = distinct !{!23, !16}
!24 = !{!6, !7, i64 128}
!25 = !{!6, !11, i64 2408}


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