; LLVM IR from Discngine/fpocket :: src/qhull/src/libqhull (global)

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

@qh_qh = external dso_local global %struct.qhT, align 8
@.str.7 = external hidden unnamed_addr constant [61 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 void @qh_memfree(ptr noundef, i32 noundef) #1

declare void @qh_setfree(ptr noundef) #1

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

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

13:                                               ; preds = %11, %1
  %14 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 209), align 8, !tbaa !15
  %15 = icmp ne ptr %14, null
  br i1 %15, label %16, label %18

16:                                               ; preds = %13
  %17 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 209), align 8, !tbaa !15
  call void @qh_settruncate(ptr noundef %17, i32 noundef 0)
  br label %18

18:                                               ; preds = %16, %13
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %36

21:                                               ; preds = %18
  br label %22

22:                                               ; preds = %34, %21
  %23 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 166), align 8, !tbaa !16
  store ptr %23, ptr %4, align 8, !tbaa !17
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %35

25:                                               ; preds = %22
  %26 = load ptr, ptr %4, align 8, !tbaa !17
  %27 = getelementptr inbounds %struct.vertexT, ptr %26, i32 0, i32 0
  %28 = load ptr, ptr %27, align 8, !tbaa !18
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %32

30:                                               ; preds = %25
  %31 = load ptr, ptr %4, align 8, !tbaa !17
  call void @qh_delvertex(ptr noundef %31)
  br label %34

32:                                               ; preds = %25
  %33 = load ptr, ptr %4, align 8, !tbaa !17
  call void @qh_memfree(ptr noundef %33, i32 noundef 48)
  store ptr null, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 166), align 8, !tbaa !16
  store ptr null, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 168), align 8, !tbaa !20
  br label %34

34:                                               ; preds = %32, %30
  br label %22, !llvm.loop !21

35:                                               ; preds = %22
  br label %60

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

39:                                               ; preds = %36
  %40 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 166), align 8, !tbaa !16
  store ptr %40, ptr %4, align 8, !tbaa !17
  br label %41

41:                                               ; preds = %54, %39
  %42 = load ptr, ptr %4, align 8, !tbaa !17
  %43 = icmp ne ptr %42, null
  br i1 %43, label %44, label %49

44:                                               ; preds = %41
  %45 = load ptr, ptr %4, align 8, !tbaa !17
  %46 = getelementptr inbounds %struct.vertexT, ptr %45, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !18
  %48 = icmp ne ptr %47, null
  br label %49

49:                                               ; preds = %44, %41
  %50 = phi i1 [ false, %41 ], [ %48, %44 ]
  br i1 %50, label %51, label %58

51:                                               ; preds = %49
  %52 = load ptr, ptr %4, align 8, !tbaa !17
  %53 = getelementptr inbounds %struct.vertexT, ptr %52, i32 0, i32 3
  call void @qh_setfreelong(ptr noundef %53)
  br label %54

54:                                               ; preds = %51
  %55 = load ptr, ptr %4, align 8, !tbaa !17
  %56 = getelementptr inbounds %struct.vertexT, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !18
  store ptr %57, ptr %4, align 8, !tbaa !17
  br label %41, !llvm.loop !24

58:                                               ; preds = %49
  br label %59

59:                                               ; preds = %58, %36
  br label %60

60:                                               ; preds = %59, %35
  store i32 0, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 119), align 8, !tbaa !23
  store ptr null, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 181), align 8, !tbaa !25
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %233

63:                                               ; preds = %60
  %64 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 156), align 8, !tbaa !26
  store ptr %64, ptr %3, align 8, !tbaa !17
  br label %65

65:                                               ; preds = %99, %63
  %66 = load ptr, ptr %3, align 8, !tbaa !17
  %67 = icmp ne ptr %66, null
  br i1 %67, label %68, label %73

68:                                               ; preds = %65
  %69 = load ptr, ptr %3, align 8, !tbaa !17
  %70 = getelementptr inbounds %struct.facetT, ptr %69, i32 0, i32 7
  %71 = load ptr, ptr %70, align 8, !tbaa !27
  %72 = icmp ne ptr %71, null
  br label %73

73:                                               ; preds = %68, %65
  %74 = phi i1 [ false, %65 ], [ %72, %68 ]
  br i1 %74, label %75, label %103

75:                                               ; preds = %73
  store ptr null, ptr %5, align 8, !tbaa !17
  %76 = load ptr, ptr %3, align 8, !tbaa !17
  %77 = getelementptr inbounds %struct.facetT, ptr %76, i32 0, i32 9
  %78 = load ptr, ptr %77, align 8, !tbaa !29
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %98

80:                                               ; preds = %75
  %81 = load ptr, ptr %3, align 8, !tbaa !17
  %82 = getelementptr inbounds %struct.facetT, ptr %81, i32 0, i32 9
  %83 = load ptr, ptr %82, align 8, !tbaa !29
  %84 = getelementptr inbounds %struct.setT, ptr %83, i32 0, i32 1
  %85 = getelementptr inbounds [1 x %union.setelemT], ptr %84, i64 0, i64 0
  store ptr %85, ptr %6, align 8, !tbaa !17
  br label %86

86:                                               ; preds = %91, %80
  %87 = load ptr, ptr %6, align 8, !tbaa !17
  %88 = getelementptr inbounds ptr, ptr %87, i32 1
  store ptr %88, ptr %6, align 8, !tbaa !17
  %89 = load ptr, ptr %87, align 8, !tbaa !17
  store ptr %89, ptr %5, align 8, !tbaa !17
  %90 = icmp ne ptr %89, null
  br i1 %90, label %91, label %97

91:                                               ; preds = %86
  %92 = load ptr, ptr %5, align 8, !tbaa !17
  %93 = getelementptr inbounds %struct.ridgeT, ptr %92, i32 0, i32 4
  %94 = load i8, ptr %93, align 4
  %95 = and i8 %94, -2
  %96 = or i8 %95, 0
  store i8 %96, ptr %93, align 4
  br label %86, !llvm.loop !30

97:                                               ; preds = %86
  br label %98

98:                                               ; preds = %97, %75
  br label %99

99:                                               ; preds = %98
  %100 = load ptr, ptr %3, align 8, !tbaa !17
  %101 = getelementptr inbounds %struct.facetT, ptr %100, i32 0, i32 7
  %102 = load ptr, ptr %101, align 8, !tbaa !27
  store ptr %102, ptr %3, align 8, !tbaa !17
  br label %65, !llvm.loop !31

103:                                              ; preds = %73
  %104 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 156), align 8, !tbaa !26
  store ptr %104, ptr %3, align 8, !tbaa !17
  br label %105

105:                                              ; preds = %169, %103
  %106 = load ptr, ptr %3, align 8, !tbaa !17
  %107 = icmp ne ptr %106, null
  br i1 %107, label %108, label %113

108:                                              ; preds = %105
  %109 = load ptr, ptr %3, align 8, !tbaa !17
  %110 = getelementptr inbounds %struct.facetT, ptr %109, i32 0, i32 7
  %111 = load ptr, ptr %110, align 8, !tbaa !27
  %112 = icmp ne ptr %111, null
  br label %113

113:                                              ; preds = %108, %105
  %114 = phi i1 [ false, %105 ], [ %112, %108 ]
  br i1 %114, label %115, label %173

115:                                              ; preds = %113
  %116 = load ptr, ptr %3, align 8, !tbaa !17
  %117 = getelementptr inbounds %struct.facetT, ptr %116, i32 0, i32 15
  %118 = load i32, ptr %117, align 8
  %119 = lshr i32 %118, 11
  %120 = and i32 %119, 1
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %122, label %168

122:                                              ; preds = %115
  store ptr null, ptr %5, align 8, !tbaa !17
  %123 = load ptr, ptr %3, align 8, !tbaa !17
  %124 = getelementptr inbounds %struct.facetT, ptr %123, i32 0, i32 9
  %125 = load ptr, ptr %124, align 8, !tbaa !29
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %167

127:                                              ; preds = %122
  %128 = load ptr, ptr %3, align 8, !tbaa !17
  %129 = getelementptr inbounds %struct.facetT, ptr %128, i32 0, i32 9
  %130 = load ptr, ptr %129, align 8, !tbaa !29
  %131 = getelementptr inbounds %struct.setT, ptr %130, i32 0, i32 1
  %132 = getelementptr inbounds [1 x %union.setelemT], ptr %131, i64 0, i64 0
  store ptr %132, ptr %6, align 8, !tbaa !17
  br label %133

133:                                              ; preds = %165, %127
  %134 = load ptr, ptr %6, align 8, !tbaa !17
  %135 = getelementptr inbounds ptr, ptr %134, i32 1
  store ptr %135, ptr %6, align 8, !tbaa !17
  %136 = load ptr, ptr %134, align 8, !tbaa !17
  store ptr %136, ptr %5, align 8, !tbaa !17
  %137 = icmp ne ptr %136, null
  br i1 %137, label %138, label %166

138:                                              ; preds = %133
  %139 = load ptr, ptr %5, align 8, !tbaa !17
  %140 = getelementptr inbounds %struct.ridgeT, ptr %139, i32 0, i32 1
  %141 = load ptr, ptr %140, align 8, !tbaa !32
  %142 = load ptr, ptr %3, align 8, !tbaa !17
  %143 = icmp eq ptr %141, %142
  br i1 %143, label %144, label %148

144:                                              ; preds = %138
  %145 = load ptr, ptr %5, align 8, !tbaa !17
  %146 = getelementptr inbounds %struct.ridgeT, ptr %145, i32 0, i32 2
  %147 = load ptr, ptr %146, align 8, !tbaa !34
  br label %152

148:                                              ; preds = %138
  %149 = load ptr, ptr %5, align 8, !tbaa !17
  %150 = getelementptr inbounds %struct.ridgeT, ptr %149, i32 0, i32 1
  %151 = load ptr, ptr %150, align 8, !tbaa !32
  br label %152

152:                                              ; preds = %148, %144
  %153 = phi ptr [ %147, %144 ], [ %151, %148 ]
  %154 = getelementptr inbounds %struct.facetT, ptr %153, i32 0, i32 15
  %155 = load i32, ptr %154, align 8
  %156 = lshr i32 %155, 11
  %157 = and i32 %156, 1
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %165, label %159

159:                                              ; preds = %152
  %160 = load ptr, ptr %5, align 8, !tbaa !17
  %161 = getelementptr inbounds %struct.ridgeT, ptr %160, i32 0, i32 4
  %162 = load i8, ptr %161, align 4
  %163 = and i8 %162, -2
  %164 = or i8 %163, 1
  store i8 %164, ptr %161, align 4
  br label %165

165:                                              ; preds = %159, %152
  br label %133, !llvm.loop !35

166:                                              ; preds = %133
  br label %167

167:                                              ; preds = %166, %122
  br label %168

168:                                              ; preds = %167, %115
  br label %169

169:                                              ; preds = %168
  %170 = load ptr, ptr %3, align 8, !tbaa !17
  %171 = getelementptr inbounds %struct.facetT, ptr %170, i32 0, i32 7
  %172 = load ptr, ptr %171, align 8, !tbaa !27
  store ptr %172, ptr %3, align 8, !tbaa !17
  br label %105, !llvm.loop !36

173:                                              ; preds = %113
  br label %174

174:                                              ; preds = %231, %173
  %175 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 156), align 8, !tbaa !26
  store ptr %175, ptr %3, align 8, !tbaa !17
  %176 = icmp ne ptr %175, null
  br i1 %176, label %177, label %232

177:                                              ; preds = %174
  store ptr null, ptr %5, align 8, !tbaa !17
  %178 = load ptr, ptr %3, align 8, !tbaa !17
  %179 = getelementptr inbounds %struct.facetT, ptr %178, i32 0, i32 9
  %180 = load ptr, ptr %179, align 8, !tbaa !29
  %181 = icmp ne ptr %180, null
  br i1 %181, label %182, label %212

182:                                              ; preds = %177
  %183 = load ptr, ptr %3, align 8, !tbaa !17
  %184 = getelementptr inbounds %struct.facetT, ptr %183, i32 0, i32 9
  %185 = load ptr, ptr %184, align 8, !tbaa !29
  %186 = getelementptr inbounds %struct.setT, ptr %185, i32 0, i32 1
  %187 = getelementptr inbounds [1 x %union.setelemT], ptr %186, i64 0, i64 0
  store ptr %187, ptr %6, align 8, !tbaa !17
  br label %188

188:                                              ; preds = %210, %182
  %189 = load ptr, ptr %6, align 8, !tbaa !17
  %190 = getelementptr inbounds ptr, ptr %189, i32 1
  store ptr %190, ptr %6, align 8, !tbaa !17
  %191 = load ptr, ptr %189, align 8, !tbaa !17
  store ptr %191, ptr %5, align 8, !tbaa !17
  %192 = icmp ne ptr %191, null
  br i1 %192, label %193, label %211

193:                                              ; preds = %188
  %194 = load ptr, ptr %5, align 8, !tbaa !17
  %195 = getelementptr inbounds %struct.ridgeT, ptr %194, i32 0, i32 4
  %196 = load i8, ptr %195, align 4
  %197 = and i8 %196, 1
  %198 = zext i8 %197 to i32
  %199 = icmp ne i32 %198, 0
  br i1 %199, label %200, label %204

200:                                              ; preds = %193
  %201 = load ptr, ptr %5, align 8, !tbaa !17
  %202 = getelementptr inbounds %struct.ridgeT, ptr %201, i32 0, i32 0
  call void @qh_setfree(ptr noundef %202)
  %203 = load ptr, ptr %5, align 8, !tbaa !17
  call void @qh_memfree(ptr noundef %203, i32 noundef 32)
  br label %210

204:                                              ; preds = %193
  %205 = load ptr, ptr %5, align 8, !tbaa !17
  %206 = getelementptr inbounds %struct.ridgeT, ptr %205, i32 0, i32 4
  %207 = load i8, ptr %206, align 4
  %208 = and i8 %207, -2
  %209 = or i8 %208, 1
  store i8 %209, ptr %206, align 4
  br label %210

210:                                              ; preds = %204, %200
  br label %188, !llvm.loop !37

211:                                              ; preds = %188
  br label %212

212:                                              ; preds = %211, %177
  %213 = load ptr, ptr %3, align 8, !tbaa !17
  %214 = getelementptr inbounds %struct.facetT, ptr %213, i32 0, i32 11
  call void @qh_setfree(ptr noundef %214)
  %215 = load ptr, ptr %3, align 8, !tbaa !17
  %216 = getelementptr inbounds %struct.facetT, ptr %215, i32 0, i32 12
  call void @qh_setfree(ptr noundef %216)
  %217 = load ptr, ptr %3, align 8, !tbaa !17
  %218 = getelementptr inbounds %struct.facetT, ptr %217, i32 0, i32 10
  call void @qh_setfree(ptr noundef %218)
  %219 = load ptr, ptr %3, align 8, !tbaa !17
  %220 = getelementptr inbounds %struct.facetT, ptr %219, i32 0, i32 9
  call void @qh_setfree(ptr noundef %220)
  %221 = load ptr, ptr %3, align 8, !tbaa !17
  %222 = getelementptr inbounds %struct.facetT, ptr %221, i32 0, i32 8
  call void @qh_setfree(ptr noundef %222)
  %223 = load ptr, ptr %3, align 8, !tbaa !17
  %224 = getelementptr inbounds %struct.facetT, ptr %223, i32 0, i32 7
  %225 = load ptr, ptr %224, align 8, !tbaa !27
  %226 = icmp ne ptr %225, null
  br i1 %226, label %227, label %229

227:                                              ; preds = %212
  %228 = load ptr, ptr %3, align 8, !tbaa !17
  call void @qh_delfacet(ptr noundef %228)
  br label %231

229:                                              ; preds = %212
  %230 = load ptr, ptr %3, align 8, !tbaa !17
  call void @qh_memfree(ptr noundef %230, i32 noundef 120)
  store ptr null, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 156), align 8, !tbaa !26
  store ptr null, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 159), align 8, !tbaa !38
  store ptr null, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 160), align 8, !tbaa !39
  br label %231

231:                                              ; preds = %229, %227
  br label %174, !llvm.loop !40

232:                                              ; preds = %174
  br label %269

233:                                              ; preds = %60
  %234 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 156), align 8, !tbaa !26
  store ptr %234, ptr %3, align 8, !tbaa !17
  br label %235

235:                                              ; preds = %264, %233
  %236 = load ptr, ptr %3, align 8, !tbaa !17
  %237 = icmp ne ptr %236, null
  br i1 %237, label %238, label %243

238:                                              ; preds = %235
  %239 = load ptr, ptr %3, align 8, !tbaa !17
  %240 = getelementptr inbounds %struct.facetT, ptr %239, i32 0, i32 7
  %241 = load ptr, ptr %240, align 8, !tbaa !27
  %242 = icmp ne ptr %241, null
  br label %243

243:                                              ; preds = %238, %235
  %244 = phi i1 [ false, %235 ], [ %242, %238 ]
  br i1 %244, label %245, label %268

245:                                              ; preds = %243
  %246 = load ptr, ptr %3, align 8, !tbaa !17
  %247 = getelementptr inbounds %struct.facetT, ptr %246, i32 0, i32 11
  call void @qh_setfreelong(ptr noundef %247)
  %248 = load ptr, ptr %3, align 8, !tbaa !17
  %249 = getelementptr inbounds %struct.facetT, ptr %248, i32 0, i32 12
  call void @qh_setfreelong(ptr noundef %249)
  %250 = load ptr, ptr %3, align 8, !tbaa !17
  %251 = getelementptr inbounds %struct.facetT, ptr %250, i32 0, i32 15
  %252 = load i32, ptr %251, align 8
  %253 = lshr i32 %252, 13
  %254 = and i32 %253, 1
  %255 = icmp ne i32 %254, 0
  br i1 %255, label %263, label %256

256:                                              ; preds = %245
  %257 = load ptr, ptr %3, align 8, !tbaa !17
  %258 = getelementptr inbounds %struct.facetT, ptr %257, i32 0, i32 10
  call void @qh_setfreelong(ptr noundef %258)
  %259 = load ptr, ptr %3, align 8, !tbaa !17
  %260 = getelementptr inbounds %struct.facetT, ptr %259, i32 0, i32 9
  call void @qh_setfreelong(ptr noundef %260)
  %261 = load ptr, ptr %3, align 8, !tbaa !17
  %262 = getelementptr inbounds %struct.facetT, ptr %261, i32 0, i32 8
  call void @qh_setfreelong(ptr noundef %262)
  br label %263

263:                                              ; preds = %256, %245
  br label %264

264:                                              ; preds = %263
  %265 = load ptr, ptr %3, align 8, !tbaa !17
  %266 = getelementptr inbounds %struct.facetT, ptr %265, i32 0, i32 7
  %267 = load ptr, ptr %266, align 8, !tbaa !27
  store ptr %267, ptr %3, align 8, !tbaa !17
  br label %235, !llvm.loop !41

268:                                              ; preds = %243
  br label %269

269:                                              ; preds = %268, %232
  call void @qh_setfree(ptr noundef getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 207))
  %270 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 152), align 8, !tbaa !42
  %271 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 153), align 8, !tbaa !43
  call void @qh_memfree(ptr noundef %270, i32 noundef %271)
  store ptr null, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 152), align 8, !tbaa !42
  store ptr null, ptr %7, align 8, !tbaa !17
  %272 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 205), align 8, !tbaa !44
  %273 = icmp ne ptr %272, null
  br i1 %273, label %274, label %286

274:                                              ; preds = %269
  %275 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 205), align 8, !tbaa !44
  %276 = getelementptr inbounds %struct.setT, ptr %275, i32 0, i32 1
  %277 = getelementptr inbounds [1 x %union.setelemT], ptr %276, i64 0, i64 0
  store ptr %277, ptr %8, align 8, !tbaa !17
  br label %278

278:                                              ; preds = %283, %274
  %279 = load ptr, ptr %8, align 8, !tbaa !17
  %280 = getelementptr inbounds ptr, ptr %279, i32 1
  store ptr %280, ptr %8, align 8, !tbaa !17
  %281 = load ptr, ptr %279, align 8, !tbaa !17
  store ptr %281, ptr %7, align 8, !tbaa !17
  %282 = icmp ne ptr %281, null
  br i1 %282, label %283, label %285

283:                                              ; preds = %278
  %284 = load ptr, ptr %7, align 8, !tbaa !17
  call void @qh_memfree(ptr noundef %284, i32 noundef 32)
  br label %278, !llvm.loop !45

285:                                              ; preds = %278
  br label %286

286:                                              ; preds = %285, %269
  store ptr null, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 205), align 8, !tbaa !44
  store ptr null, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 206), align 8, !tbaa !46
  call void @qh_settempfree_all()
  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 void
}

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

declare void @qh_delvertex(ptr noundef) #1

declare void @qh_setfreelong(ptr noundef) #1

declare void @qh_delfacet(ptr noundef) #1

declare void @qh_settempfree_all() #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 128}
!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 2408}
!15 = !{!10, !12, i64 2760}
!16 = !{!10, !12, i64 2512}
!17 = !{!12, !12, i64 0}
!18 = !{!19, !12, i64 0}
!19 = !{!"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}
!20 = !{!10, !12, i64 2528}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!10, !6, i64 1712}
!24 = distinct !{!24, !22}
!25 = !{!10, !12, i64 2592}
!26 = !{!10, !12, i64 2440}
!27 = !{!28, !12, i64 56}
!28 = !{!"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}
!29 = !{!28, !12, i64 72}
!30 = distinct !{!30, !22}
!31 = distinct !{!31, !22}
!32 = !{!33, !12, i64 8}
!33 = !{!"ridgeT", !12, i64 0, !12, i64 8, !12, i64 16, !6, i64 24, !6, i64 28, !6, i64 28, !6, i64 28}
!34 = !{!33, !12, i64 16}
!35 = distinct !{!35, !22}
!36 = distinct !{!36, !22}
!37 = distinct !{!37, !22}
!38 = !{!10, !12, i64 2464}
!39 = !{!10, !12, i64 2472}
!40 = distinct !{!40, !22}
!41 = distinct !{!41, !22}
!42 = !{!10, !12, i64 2416}
!43 = !{!10, !6, i64 2424}
!44 = !{!10, !12, i64 2728}
!45 = distinct !{!45, !22}
!46 = !{!10, !12, i64 2736}


; 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 dso_local global %struct.qhT, align 8
@.str.7 = external hidden unnamed_addr constant [61 x i8], align 1

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

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

declare void @qh_setfree(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @qh_freebuild(i32 noundef %0) local_unnamed_addr #1 {
  %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 = %1
  %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 1005, ptr noundef nonnull @.str.7) #3
  br label %6

6:                                                ; preds = %4, %1
  %7 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2760), align 8, !tbaa !14
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %9, label %8

8:                                                ; preds = %6
  tail call void @qh_settruncate(ptr noundef nonnull %7, i32 noundef 0) #3
  br label %9

9:                                                ; preds = %8, %6
  %.not76 = icmp eq i32 %0, 0
  br i1 %.not76, label %14, label %.preheader115

.preheader115:                                    ; preds = %9
  %10 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2512), align 8, !tbaa !15
  %.not80117 = icmp eq ptr %10, null
  br i1 %.not80117, label %.critedge.thread164, label %.lr.ph

.critedge.thread164:                              ; preds = %.preheader115
  store i32 0, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1712), align 8, !tbaa !16
  store ptr null, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2592), align 8, !tbaa !17
  br label %.preheader113

.lr.ph:                                           ; preds = %.preheader115, %13
  %11 = phi ptr [ %.pre, %13 ], [ %10, %.preheader115 ]
  %12 = load ptr, ptr %11, align 8, !tbaa !18
  %.not104 = icmp eq ptr %12, null
  br i1 %.not104, label %.thread, label %13

.thread:                                          ; preds = %.lr.ph
  tail call void @qh_memfree(ptr noundef nonnull %11, i32 noundef 48) #3
  store ptr null, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2512), align 8, !tbaa !15
  store ptr null, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2528), align 8, !tbaa !20
  br label %.critedge

13:                                               ; preds = %.lr.ph
  tail call void @qh_delvertex(ptr noundef nonnull %11) #3
  %.pre = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2512), align 8, !tbaa !15
  %.not80 = icmp eq ptr %.pre, null
  br i1 %.not80, label %.critedge, label %.lr.ph, !llvm.loop !21

14:                                               ; preds = %9
  %15 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1712), align 8, !tbaa !16
  %.not77 = icmp eq i32 %15, 0
  %.060118 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2512), align 8
  %.not78119 = icmp eq ptr %.060118, null
  %or.cond = select i1 %.not77, i1 true, i1 %.not78119
  br i1 %or.cond, label %.critedge.thread, label %.lr.ph121

.critedge.thread:                                 ; preds = %14
  store i32 0, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1712), align 8, !tbaa !16
  store ptr null, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2592), align 8, !tbaa !17
  br label %.preheader105

.lr.ph121:                                        ; preds = %14, %17
  %.060120 = phi ptr [ %.060, %17 ], [ %.060118, %14 ]
  %16 = load ptr, ptr %.060120, align 8, !tbaa !18
  %.not79 = icmp eq ptr %16, null
  br i1 %.not79, label %.critedge, label %17

17:                                               ; preds = %.lr.ph121
  %18 = getelementptr inbounds i8, ptr %.060120, i64 24
  tail call void @qh_setfreelong(ptr noundef nonnull %18) #3
  %.060 = load ptr, ptr %.060120, align 8, !tbaa !23
  %.not78 = icmp eq ptr %.060, null
  br i1 %.not78, label %.critedge, label %.lr.ph121, !llvm.loop !24

.critedge:                                        ; preds = %13, %.lr.ph121, %17, %.thread
  store i32 0, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1712), align 8, !tbaa !16
  store ptr null, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2592), align 8, !tbaa !17
  br i1 %.not76, label %.preheader105, label %.preheader113

.preheader113:                                    ; preds = %.critedge.thread164, %.critedge
  %.061127 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2440), align 8, !tbaa !23
  %.not84128 = icmp eq ptr %.061127, null
  br i1 %.not84128, label %.critedge6, label %.lr.ph130

.preheader105:                                    ; preds = %.critedge.thread, %.critedge
  %.263147 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2440), align 8, !tbaa !23
  %.not81148 = icmp eq ptr %.263147, null
  br i1 %.not81148, label %.critedge6, label %.lr.ph150

.lr.ph130:                                        ; preds = %.preheader113, %.loopexit112
  %.061129 = phi ptr [ %.061, %.loopexit112 ], [ %.061127, %.preheader113 ]
  %19 = getelementptr inbounds i8, ptr %.061129, i64 56
  %20 = load ptr, ptr %19, align 8, !tbaa !23
  %.not85 = icmp eq ptr %20, null
  br i1 %.not85, label %.critedge2, label %21

21:                                               ; preds = %.lr.ph130
  %22 = getelementptr inbounds i8, ptr %.061129, i64 72
  %23 = load ptr, ptr %22, align 8, !tbaa !25
  %.not101 = icmp eq ptr %23, null
  br i1 %.not101, label %.loopexit112, label %.preheader111

.preheader111:                                    ; preds = %21
  %.059123 = getelementptr inbounds i8, ptr %23, i64 8
  %24 = load ptr, ptr %.059123, align 8, !tbaa !23
  %.not103124 = icmp eq ptr %24, null
  br i1 %.not103124, label %.loopexit112, label %.lr.ph126

.lr.ph126:                                        ; preds = %.preheader111, %.lr.ph126
  %25 = phi ptr [ %29, %.lr.ph126 ], [ %24, %.preheader111 ]
  %.059125 = phi ptr [ %.059, %.lr.ph126 ], [ %.059123, %.preheader111 ]
  %26 = getelementptr inbounds i8, ptr %25, i64 28
  %27 = load i8, ptr %26, align 4
  %28 = and i8 %27, -2
  store i8 %28, ptr %26, align 4
  %.059 = getelementptr inbounds i8, ptr %.059125, i64 8
  %29 = load ptr, ptr %.059, align 8, !tbaa !23
  %.not103 = icmp eq ptr %29, null
  br i1 %.not103, label %.loopexit112.loopexit, label %.lr.ph126, !llvm.loop !27

.loopexit112.loopexit:                            ; preds = %.lr.ph126
  %.061.pre = load ptr, ptr %19, align 8, !tbaa !23
  br label %.loopexit112

.loopexit112:                                     ; preds = %.loopexit112.loopexit, %.preheader111, %21
  %.061 = phi ptr [ %.061.pre, %.loopexit112.loopexit ], [ %20, %.preheader111 ], [ %20, %21 ]
  %.not84 = icmp eq ptr %.061, null
  br i1 %.not84, label %.critedge2, label %.lr.ph130, !llvm.loop !28

.critedge2:                                       ; preds = %.lr.ph130, %.loopexit112
  %.162136.pre = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2440), align 8, !tbaa !23
  %.not86137 = icmp eq ptr %.162136.pre, null
  br i1 %.not86137, label %.critedge6, label %.lr.ph139

.lr.ph139:                                        ; preds = %.critedge2, %.loopexit110
  %.162138 = phi ptr [ %.162, %.loopexit110 ], [ %.162136.pre, %.critedge2 ]
  %30 = getelementptr inbounds i8, ptr %.162138, i64 56
  %31 = load ptr, ptr %30, align 8, !tbaa !23
  %.not87 = icmp eq ptr %31, null
  br i1 %.not87, label %.critedge4, label %32

32:                                               ; preds = %.lr.ph139
  %33 = getelementptr inbounds i8, ptr %.162138, i64 112
  %34 = load i32, ptr %33, align 8
  %35 = and i32 %34, 2048
  %.not96 = icmp eq i32 %35, 0
  br i1 %.not96, label %.loopexit110, label %36

36:                                               ; preds = %32
  %37 = getelementptr inbounds i8, ptr %.162138, i64 72
  %38 = load ptr, ptr %37, align 8, !tbaa !25
  %.not97 = icmp eq ptr %38, null
  br i1 %.not97, label %.loopexit110, label %.preheader109

.preheader109:                                    ; preds = %36
  %.1132 = getelementptr inbounds i8, ptr %38, i64 8
  %39 = load ptr, ptr %.1132, align 8, !tbaa !23
  %.not99133 = icmp eq ptr %39, null
  br i1 %.not99133, label %.loopexit110, label %.lr.ph135

.lr.ph135:                                        ; preds = %.preheader109, %56
  %40 = phi ptr [ %57, %56 ], [ %39, %.preheader109 ]
  %.1134 = phi ptr [ %.1, %56 ], [ %.1132, %.preheader109 ]
  %41 = getelementptr inbounds i8, ptr %40, i64 8
  %42 = load ptr, ptr %41, align 8, !tbaa !29
  %43 = icmp eq ptr %42, %.162138
  br i1 %43, label %44, label %47

44:                                               ; preds = %.lr.ph135
  %45 = getelementptr inbounds i8, ptr %40, i64 16
  %46 = load ptr, ptr %45, align 8, !tbaa !31
  br label %47

47:                                               ; preds = %.lr.ph135, %44
  %48 = phi ptr [ %46, %44 ], [ %42, %.lr.ph135 ]
  %49 = getelementptr inbounds i8, ptr %48, i64 112
  %50 = load i32, ptr %49, align 8
  %51 = and i32 %50, 2048
  %.not100 = icmp eq i32 %51, 0
  br i1 %.not100, label %52, label %56

52:                                               ; preds = %47
  %53 = getelementptr inbounds i8, ptr %40, i64 28
  %54 = load i8, ptr %53, align 4
  %55 = or i8 %54, 1
  store i8 %55, ptr %53, align 4
  br label %56

56:                                               ; preds = %52, %47
  %.1 = getelementptr inbounds i8, ptr %.1134, i64 8
  %57 = load ptr, ptr %.1, align 8, !tbaa !23
  %.not99 = icmp eq ptr %57, null
  br i1 %.not99, label %.loopexit110.loopexit, label %.lr.ph135, !llvm.loop !32

.loopexit110.loopexit:                            ; preds = %56
  %.162.pre = load ptr, ptr %30, align 8, !tbaa !23
  br label %.loopexit110

.loopexit110:                                     ; preds = %.loopexit110.loopexit, %.preheader109, %32, %36
  %.162 = phi ptr [ %.162.pre, %.loopexit110.loopexit ], [ %31, %.preheader109 ], [ %31, %32 ], [ %31, %36 ]
  %.not86 = icmp eq ptr %.162, null
  br i1 %.not86, label %.critedge4, label %.lr.ph139, !llvm.loop !33

.critedge4:                                       ; preds = %.lr.ph139, %.loopexit110
  %.pre161 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2440), align 8, !tbaa !34
  %.not88145 = icmp eq ptr %.pre161, null
  br i1 %.not88145, label %.critedge6, label %.lr.ph146

.lr.ph146:                                        ; preds = %.critedge4, %77
  %58 = phi ptr [ %.pre162, %77 ], [ %.pre161, %.critedge4 ]
  %59 = getelementptr inbounds i8, ptr %58, i64 72
  %60 = load ptr, ptr %59, align 8, !tbaa !25
  %.not91 = icmp eq ptr %60, null
  br i1 %.not91, label %.loopexit107, label %.preheader106

.preheader106:                                    ; preds = %.lr.ph146
  %.2141 = getelementptr inbounds i8, ptr %60, i64 8
  %61 = load ptr, ptr %.2141, align 8, !tbaa !23
  %.not93142 = icmp eq ptr %61, null
  br i1 %.not93142, label %.loopexit107, label %.lr.ph144

.lr.ph144:                                        ; preds = %.preheader106, %69
  %62 = phi ptr [ %70, %69 ], [ %61, %.preheader106 ]
  %.2143 = phi ptr [ %.2, %69 ], [ %.2141, %.preheader106 ]
  %63 = getelementptr inbounds i8, ptr %62, i64 28
  %64 = load i8, ptr %63, align 4
  %65 = and i8 %64, 1
  %.not95 = icmp eq i8 %65, 0
  br i1 %.not95, label %67, label %66

66:                                               ; preds = %.lr.ph144
  tail call void @qh_setfree(ptr noundef nonnull %62) #3
  tail call void @qh_memfree(ptr noundef nonnull %62, i32 noundef 32) #3
  br label %69

67:                                               ; preds = %.lr.ph144
  %68 = or disjoint i8 %64, 1
  store i8 %68, ptr %63, align 4
  br label %69

69:                                               ; preds = %67, %66
  %.2 = getelementptr inbounds i8, ptr %.2143, i64 8
  %70 = load ptr, ptr %.2, align 8, !tbaa !23
  %.not93 = icmp eq ptr %70, null
  br i1 %.not93, label %.loopexit107, label %.lr.ph144, !llvm.loop !35

.loopexit107:                                     ; preds = %69, %.preheader106, %.lr.ph146
  %71 = getelementptr inbounds i8, ptr %58, i64 88
  tail call void @qh_setfree(ptr noundef nonnull %71) #3
  %72 = getelementptr inbounds i8, ptr %58, i64 96
  tail call void @qh_setfree(ptr noundef nonnull %72) #3
  %73 = getelementptr inbounds i8, ptr %58, i64 80
  tail call void @qh_setfree(ptr noundef nonnull %73) #3
  tail call void @qh_setfree(ptr noundef nonnull %59) #3
  %74 = getelementptr inbounds i8, ptr %58, i64 64
  tail call void @qh_setfree(ptr noundef nonnull %74) #3
  %75 = getelementptr inbounds i8, ptr %58, i64 56
  %76 = load ptr, ptr %75, align 8, !tbaa !36
  %.not94 = icmp eq ptr %76, null
  br i1 %.not94, label %.thread168, label %77

.thread168:                                       ; preds = %.loopexit107
  tail call void @qh_memfree(ptr noundef nonnull %58, i32 noundef 120) #3
  store ptr null, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2440), align 8, !tbaa !34
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @qh_qh, i64 2464), i8 0, i64 16, i1 false)
  br label %.critedge6

77:                                               ; preds = %.loopexit107
  tail call void @qh_delfacet(ptr noundef nonnull %58) #3
  %.pre162 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2440), align 8, !tbaa !34
  %.not88 = icmp eq ptr %.pre162, null
  br i1 %.not88, label %.critedge6, label %.lr.ph146, !llvm.loop !37

.lr.ph150:                                        ; preds = %.preheader105, %90
  %.263149 = phi ptr [ %.263, %90 ], [ %.263147, %.preheader105 ]
  %78 = getelementptr inbounds i8, ptr %.263149, i64 56
  %79 = load ptr, ptr %78, align 8, !tbaa !36
  %.not82 = icmp eq ptr %79, null
  br i1 %.not82, label %.critedge6, label %80

80:                                               ; preds = %.lr.ph150
  %81 = getelementptr inbounds i8, ptr %.263149, i64 88
  tail call void @qh_setfreelong(ptr noundef nonnull %81) #3
  %82 = getelementptr inbounds i8, ptr %.263149, i64 96
  tail call void @qh_setfreelong(ptr noundef nonnull %82) #3
  %83 = getelementptr inbounds i8, ptr %.263149, i64 112
  %84 = load i32, ptr %83, align 8
  %85 = and i32 %84, 8192
  %.not83 = icmp eq i32 %85, 0
  br i1 %.not83, label %86, label %90

86:                                               ; preds = %80
  %87 = getelementptr inbounds i8, ptr %.263149, i64 80
  tail call void @qh_setfreelong(ptr noundef nonnull %87) #3
  %88 = getelementptr inbounds i8, ptr %.263149, i64 72
  tail call void @qh_setfreelong(ptr noundef nonnull %88) #3
  %89 = getelementptr inbounds i8, ptr %.263149, i64 64
  tail call void @qh_setfreelong(ptr noundef nonnull %89) #3
  br label %90

90:                                               ; preds = %80, %86
  %.263 = load ptr, ptr %78, align 8, !tbaa !23
  %.not81 = icmp eq ptr %.263, null
  br i1 %.not81, label %.critedge6, label %.lr.ph150, !llvm.loop !38

.critedge6:                                       ; preds = %77, %90, %.lr.ph150, %.preheader113, %.critedge2, %.thread168, %.critedge4, %.preheader105
  tail call void @qh_setfree(ptr noundef nonnull getelementptr inbounds (i8, ptr @qh_qh, i64 2744)) #3
  %91 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2416), align 8, !tbaa !39
  %92 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !40
  tail call void @qh_memfree(ptr noundef %91, i32 noundef %92) #3
  store ptr null, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2416), align 8, !tbaa !39
  %93 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2728), align 8, !tbaa !41
  %.not89 = icmp eq ptr %93, null
  br i1 %.not89, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %.critedge6
  %.0152 = getelementptr inbounds i8, ptr %93, i64 8
  %94 = load ptr, ptr %.0152, align 8, !tbaa !23
  %.not90153 = icmp eq ptr %94, null
  br i1 %.not90153, label %.loopexit, label %.lr.ph155

.lr.ph155:                                        ; preds = %.preheader, %.lr.ph155
  %95 = phi ptr [ %96, %.lr.ph155 ], [ %94, %.preheader ]
  %.0154 = phi ptr [ %.0, %.lr.ph155 ], [ %.0152, %.preheader ]
  tail call void @qh_memfree(ptr noundef nonnull %95, i32 noundef 32) #3
  %.0 = getelementptr inbounds i8, ptr %.0154, i64 8
  %96 = load ptr, ptr %.0, align 8, !tbaa !23
  %.not90 = icmp eq ptr %96, null
  br i1 %.not90, label %.loopexit, label %.lr.ph155, !llvm.loop !42

.loopexit:                                        ; preds = %.lr.ph155, %.preheader, %.critedge6
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @qh_qh, i64 2728), i8 0, i64 16, i1 false)
  tail call void @qh_settempfree_all() #3
  ret void
}

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

declare void @qh_delvertex(ptr noundef) local_unnamed_addr #0

declare void @qh_setfreelong(ptr noundef) local_unnamed_addr #0

declare void @qh_delfacet(ptr noundef) local_unnamed_addr #0

declare void @qh_settempfree_all() local_unnamed_addr #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 2760}
!15 = !{!6, !11, i64 2512}
!16 = !{!6, !7, i64 1712}
!17 = !{!6, !11, i64 2592}
!18 = !{!19, !11, i64 0}
!19 = !{!"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}
!20 = !{!6, !11, i64 2528}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!11, !11, i64 0}
!24 = distinct !{!24, !22}
!25 = !{!26, !11, i64 72}
!26 = !{!"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}
!27 = distinct !{!27, !22}
!28 = distinct !{!28, !22}
!29 = !{!30, !11, i64 8}
!30 = !{!"ridgeT", !11, i64 0, !11, i64 8, !11, i64 16, !7, i64 24, !7, i64 28, !7, i64 28, !7, i64 28}
!31 = !{!30, !11, i64 16}
!32 = distinct !{!32, !22}
!33 = distinct !{!33, !22}
!34 = !{!6, !11, i64 2440}
!35 = distinct !{!35, !22}
!36 = !{!26, !11, i64 56}
!37 = distinct !{!37, !22}
!38 = distinct !{!38, !22}
!39 = !{!6, !11, i64 2416}
!40 = !{!6, !7, i64 2424}
!41 = !{!6, !11, i64 2728}
!42 = distinct !{!42, !22}


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