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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.qhT = type { i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [29 x i32], i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, i32, ptr, i32, [256 x i8], i32, [256 x i8], [512 x i8], i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, double, double, double, double, double, double, double, double, double, double, double, double, double, double, ptr, double, double, double, double, i32, [6 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, [1 x %struct.__jmp_buf_tag], [40 x i8], i32, double, ptr, ptr, ptr, %struct.qhmemT, %struct.qhstatT }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.qhmemT = type { i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.qhstatT = type { [249 x %union.intrealT], [259 x i8], [249 x ptr], [249 x i16], [249 x i8], [249 x i8], [9 x %union.intrealT], i32, i32, i32, i32, double }
%union.intrealT = type { double }
%struct.facetT = type { double, double, double, ptr, %union.anon, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32 }
%union.anon = type { double }
%struct.setT = type { i32, [1 x %union.setelemT] }
%union.setelemT = type { ptr }
%struct.vertexT = type { ptr, ptr, ptr, ptr, i32, i32, i8 }

@.str.142 = external hidden unnamed_addr constant [125 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [104 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, ptr noundef, i32 noundef, ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
define dso_local void @qh_mergecycle_all(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  store i32 0, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  store i32 0, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  store i32 0, ptr %22, align 4, !tbaa !9
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.qhT, ptr %23, i32 0, i32 29
  %25 = load i32, ptr %24, align 8, !tbaa !11
  %26 = icmp sge i32 %25, 2
  br i1 %26, label %27, label %32

27:                                               ; preds = %3
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.qhT, ptr %29, i32 0, i32 158
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %28, ptr noundef %31, i32 noundef 2031, ptr noundef @.str.142)
  br label %32

32:                                               ; preds = %27, %3
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %33, ptr %7, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %287, %32
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %37, label %42

37:                                               ; preds = %34
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.facetT, ptr %38, i32 0, i32 7
  %40 = load ptr, ptr %39, align 8, !tbaa !18
  store ptr %40, ptr %13, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br label %42

42:                                               ; preds = %37, %34
  %43 = phi i1 [ false, %34 ], [ %41, %37 ]
  br i1 %43, label %44, label %289

44:                                               ; preds = %42
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.facetT, ptr %45, i32 0, i32 3
  %47 = load ptr, ptr %46, align 8, !tbaa !20
  %48 = icmp ne ptr %47, null
  br i1 %48, label %49, label %50

49:                                               ; preds = %44
  br label %287

50:                                               ; preds = %44
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.facetT, ptr %51, i32 0, i32 15
  %53 = load i32, ptr %52, align 8
  %54 = lshr i32 %53, 25
  %55 = and i32 %54, 1
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %67, label %57

57:                                               ; preds = %50
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.qhT, ptr %59, i32 0, i32 158
  %61 = load ptr, ptr %60, align 8, !tbaa !17
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.facetT, ptr %62, i32 0, i32 14
  %64 = load i32, ptr %63, align 4, !tbaa !21
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %58, ptr noundef %61, i32 noundef 6225, ptr noundef @.str.143, i32 noundef %64)
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  call void @qh_errexit(ptr noundef %65, i32 noundef 5, ptr noundef %66, ptr noundef null)
  br label %67

67:                                               ; preds = %57, %50
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.facetT, ptr %68, i32 0, i32 10
  %70 = load ptr, ptr %69, align 8, !tbaa !22
  %71 = getelementptr inbounds %struct.setT, ptr %70, i32 0, i32 1
  %72 = getelementptr inbounds [1 x %union.setelemT], ptr %71, i64 0, i64 0
  %73 = load ptr, ptr %72, align 8, !tbaa !23
  store ptr %73, ptr %10, align 8, !tbaa !5
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.facetT, ptr %74, i32 0, i32 4
  %76 = load ptr, ptr %75, align 8, !tbaa !23
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = icmp eq ptr %76, %77
  br i1 %78, label %79, label %145

79:                                               ; preds = %67
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.qhT, ptr %80, i32 0, i32 96
  %82 = load i32, ptr %81, align 8, !tbaa !24
  %83 = sub nsw i32 %82, 1
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.qhT, ptr %84, i32 0, i32 258
  %86 = getelementptr inbounds %struct.qhstatT, ptr %85, i32 0, i32 0
  %87 = getelementptr inbounds [249 x %union.intrealT], ptr %86, i64 0, i64 216
  %88 = load i32, ptr %87, align 8, !tbaa !23
  %89 = icmp eq i32 %83, %88
  br i1 %89, label %90, label %99

90:                                               ; preds = %79
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.qhT, ptr %91, i32 0, i32 92
  %93 = load i32, ptr %92, align 8, !tbaa !25
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.qhT, ptr %94, i32 0, i32 29
  store i32 %93, ptr %95, align 8, !tbaa !11
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.qhT, ptr %96, i32 0, i32 257
  %98 = getelementptr inbounds %struct.qhmemT, ptr %97, i32 0, i32 14
  store i32 %93, ptr %98, align 8, !tbaa !26
  br label %99

99:                                               ; preds = %90, %79
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.qhT, ptr %100, i32 0, i32 258
  %102 = getelementptr inbounds %struct.qhstatT, ptr %101, i32 0, i32 0
  %103 = getelementptr inbounds [249 x %union.intrealT], ptr %102, i64 0, i64 169
  %104 = load i32, ptr %103, align 8, !tbaa !23
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %103, align 8, !tbaa !23
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.facetT, ptr %106, i32 0, i32 8
  %108 = load ptr, ptr %107, align 8, !tbaa !27
  %109 = getelementptr inbounds %struct.setT, ptr %108, i32 0, i32 1
  %110 = getelementptr inbounds [1 x %union.setelemT], ptr %109, i64 0, i64 0
  %111 = load ptr, ptr %110, align 8, !tbaa !23
  store ptr %111, ptr %15, align 8, !tbaa !5
  store ptr null, ptr %16, align 8, !tbaa !5
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.facetT, ptr %112, i32 0, i32 8
  %114 = load ptr, ptr %113, align 8, !tbaa !27
  %115 = icmp ne ptr %114, null
  br i1 %115, label %116, label %139

116:                                              ; preds = %99
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.facetT, ptr %117, i32 0, i32 8
  %119 = load ptr, ptr %118, align 8, !tbaa !27
  %120 = getelementptr inbounds %struct.setT, ptr %119, i32 0, i32 1
  %121 = getelementptr inbounds [1 x %union.setelemT], ptr %120, i64 0, i64 0
  store ptr %121, ptr %17, align 8, !tbaa !5
  br label %122

122:                                              ; preds = %137, %116
  %123 = load ptr, ptr %17, align 8, !tbaa !5
  %124 = getelementptr inbounds ptr, ptr %123, i32 1
  store ptr %124, ptr %17, align 8, !tbaa !5
  %125 = load ptr, ptr %123, align 8, !tbaa !5
  store ptr %125, ptr %16, align 8, !tbaa !5
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %138

127:                                              ; preds = %122
  %128 = load ptr, ptr %16, align 8, !tbaa !5
  %129 = load ptr, ptr %15, align 8, !tbaa !5
  %130 = icmp ne ptr %128, %129
  br i1 %130, label %131, label %137

131:                                              ; preds = %127
  %132 = load ptr, ptr %16, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.vertexT, ptr %132, i32 0, i32 6
  %134 = load i8, ptr %133, align 8
  %135 = and i8 %134, -9
  %136 = or i8 %135, 8
  store i8 %136, ptr %133, align 8
  br label %137

137:                                              ; preds = %131, %127
  br label %122, !llvm.loop !28

138:                                              ; preds = %122
  br label %139

139:                                              ; preds = %138, %99
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.facetT, ptr %140, i32 0, i32 4
  store ptr null, ptr %141, align 8, !tbaa !23
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  %144 = load ptr, ptr %10, align 8, !tbaa !5
  call void @qh_mergefacet(ptr noundef %142, ptr noundef %143, ptr noundef %144, i32 noundef 13, ptr noundef null, ptr noundef null, i32 noundef 1)
  br label %284

145:                                              ; preds = %67
  %146 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %146, ptr %12, align 8, !tbaa !5
  store i32 0, ptr %20, align 4, !tbaa !9
  %147 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %147, ptr %9, align 8, !tbaa !5
  %148 = load ptr, ptr %7, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.facetT, ptr %148, i32 0, i32 4
  %150 = load ptr, ptr %149, align 8, !tbaa !23
  store ptr %150, ptr %8, align 8, !tbaa !5
  br label %151

151:                                              ; preds = %204, %145
  %152 = load ptr, ptr %8, align 8, !tbaa !5
  %153 = icmp ne ptr %152, null
  br i1 %153, label %154, label %206

154:                                              ; preds = %151
  %155 = load ptr, ptr %8, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.facetT, ptr %155, i32 0, i32 4
  %157 = load ptr, ptr %156, align 8, !tbaa !23
  store ptr %157, ptr %14, align 8, !tbaa !5
  %158 = load ptr, ptr %8, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.facetT, ptr %158, i32 0, i32 15
  %160 = load i32, ptr %159, align 8
  %161 = lshr i32 %160, 26
  %162 = and i32 %161, 1
  %163 = icmp ne i32 %162, 0
  br i1 %163, label %171, label %164

164:                                              ; preds = %154
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.facetT, ptr %165, i32 0, i32 15
  %167 = load i32, ptr %166, align 8
  %168 = lshr i32 %167, 11
  %169 = and i32 %168, 1
  %170 = icmp ne i32 %169, 0
  br i1 %170, label %171, label %174

171:                                              ; preds = %164, %154
  %172 = load ptr, ptr %4, align 8, !tbaa !5
  %173 = load ptr, ptr %8, align 8, !tbaa !5
  call void @qh_infiniteloop(ptr noundef %172, ptr noundef %173)
  br label %174

174:                                              ; preds = %171, %164
  %175 = load ptr, ptr %8, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.facetT, ptr %175, i32 0, i32 15
  %177 = load i32, ptr %176, align 8
  %178 = and i32 %177, -67108865
  %179 = or i32 %178, 67108864
  store i32 %179, ptr %176, align 8
  %180 = load ptr, ptr %8, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.facetT, ptr %180, i32 0, i32 3
  %182 = load ptr, ptr %181, align 8, !tbaa !20
  %183 = icmp ne ptr %182, null
  br i1 %183, label %184, label %192

184:                                              ; preds = %174
  %185 = load ptr, ptr %8, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.facetT, ptr %185, i32 0, i32 4
  %187 = load ptr, ptr %186, align 8, !tbaa !23
  %188 = load ptr, ptr %9, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.facetT, ptr %188, i32 0, i32 4
  store ptr %187, ptr %189, align 8, !tbaa !23
  %190 = load ptr, ptr %8, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.facetT, ptr %190, i32 0, i32 4
  store ptr null, ptr %191, align 8, !tbaa !23
  br label %196

192:                                              ; preds = %174
  %193 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %193, ptr %9, align 8, !tbaa !5
  %194 = load i32, ptr %20, align 4, !tbaa !9
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %20, align 4, !tbaa !9
  br label %196

196:                                              ; preds = %192, %184
  br label %197

197:                                              ; preds = %196
  %198 = load ptr, ptr %8, align 8, !tbaa !5
  %199 = load ptr, ptr %7, align 8, !tbaa !5
  %200 = icmp eq ptr %198, %199
  br i1 %200, label %201, label %202

201:                                              ; preds = %197
  br label %204

202:                                              ; preds = %197
  %203 = load ptr, ptr %14, align 8, !tbaa !5
  br label %204

204:                                              ; preds = %202, %201
  %205 = phi ptr [ null, %201 ], [ %203, %202 ]
  store ptr %205, ptr %8, align 8, !tbaa !5
  br label %151, !llvm.loop !30

206:                                              ; preds = %151
  br label %207

207:                                              ; preds = %219, %206
  %208 = load ptr, ptr %13, align 8, !tbaa !5
  %209 = icmp ne ptr %208, null
  br i1 %209, label %210, label %217

210:                                              ; preds = %207
  %211 = load ptr, ptr %13, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.facetT, ptr %211, i32 0, i32 15
  %213 = load i32, ptr %212, align 8
  %214 = lshr i32 %213, 26
  %215 = and i32 %214, 1
  %216 = icmp ne i32 %215, 0
  br label %217

217:                                              ; preds = %210, %207
  %218 = phi i1 [ false, %207 ], [ %216, %210 ]
  br i1 %218, label %219, label %223

219:                                              ; preds = %217
  %220 = load ptr, ptr %13, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.facetT, ptr %220, i32 0, i32 7
  %222 = load ptr, ptr %221, align 8, !tbaa !18
  store ptr %222, ptr %13, align 8, !tbaa !5
  br label %207, !llvm.loop !31

223:                                              ; preds = %217
  %224 = load ptr, ptr %10, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.facetT, ptr %224, i32 0, i32 4
  store ptr null, ptr %225, align 8, !tbaa !23
  %226 = load ptr, ptr %4, align 8, !tbaa !5
  %227 = load ptr, ptr %12, align 8, !tbaa !5
  %228 = load ptr, ptr %10, align 8, !tbaa !5
  call void @qh_mergecycle(ptr noundef %226, ptr noundef %227, ptr noundef %228)
  %229 = load ptr, ptr %10, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.facetT, ptr %229, i32 0, i32 15
  %231 = load i32, ptr %230, align 8
  %232 = and i32 %231, 511
  %233 = load i32, ptr %20, align 4, !tbaa !9
  %234 = add nsw i32 %232, %233
  store i32 %234, ptr %21, align 4, !tbaa !9
  %235 = load i32, ptr %21, align 4, !tbaa !9
  %236 = icmp sgt i32 %235, 511
  br i1 %236, label %237, label %243

237:                                              ; preds = %223
  %238 = load ptr, ptr %10, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.facetT, ptr %238, i32 0, i32 15
  %240 = load i32, ptr %239, align 8
  %241 = and i32 %240, -512
  %242 = or i32 %241, 511
  store i32 %242, ptr %239, align 8
  br label %253

243:                                              ; preds = %223
  %244 = load i32, ptr %21, align 4, !tbaa !9
  %245 = trunc i32 %244 to i16
  %246 = zext i16 %245 to i32
  %247 = load ptr, ptr %10, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.facetT, ptr %247, i32 0, i32 15
  %249 = load i32, ptr %248, align 8
  %250 = and i32 %246, 511
  %251 = and i32 %249, -512
  %252 = or i32 %251, %250
  store i32 %252, ptr %248, align 8
  br label %253

253:                                              ; preds = %243, %237
  %254 = load ptr, ptr %4, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.qhT, ptr %254, i32 0, i32 258
  %256 = getelementptr inbounds %struct.qhstatT, ptr %255, i32 0, i32 0
  %257 = getelementptr inbounds [249 x %union.intrealT], ptr %256, i64 0, i64 45
  %258 = load i32, ptr %257, align 8, !tbaa !23
  %259 = add nsw i32 %258, 1
  store i32 %259, ptr %257, align 8, !tbaa !23
  %260 = load i32, ptr %20, align 4, !tbaa !9
  %261 = load i32, ptr %19, align 4, !tbaa !9
  %262 = add nsw i32 %261, %260
  store i32 %262, ptr %19, align 4, !tbaa !9
  %263 = load i32, ptr %20, align 4, !tbaa !9
  %264 = load ptr, ptr %4, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.qhT, ptr %264, i32 0, i32 258
  %266 = getelementptr inbounds %struct.qhstatT, ptr %265, i32 0, i32 0
  %267 = getelementptr inbounds [249 x %union.intrealT], ptr %266, i64 0, i64 44
  %268 = load i32, ptr %267, align 8, !tbaa !23
  %269 = add nsw i32 %268, %263
  store i32 %269, ptr %267, align 8, !tbaa !23
  %270 = load ptr, ptr %4, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.qhT, ptr %270, i32 0, i32 258
  %272 = getelementptr inbounds %struct.qhstatT, ptr %271, i32 0, i32 0
  %273 = getelementptr inbounds [249 x %union.intrealT], ptr %272, i64 0, i64 43
  %274 = load i32, ptr %273, align 8, !tbaa !23
  %275 = load i32, ptr %20, align 4, !tbaa !9
  %276 = icmp slt i32 %274, %275
  br i1 %276, label %277, label %283

277:                                              ; preds = %253
  %278 = load i32, ptr %20, align 4, !tbaa !9
  %279 = load ptr, ptr %4, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.qhT, ptr %279, i32 0, i32 258
  %281 = getelementptr inbounds %struct.qhstatT, ptr %280, i32 0, i32 0
  %282 = getelementptr inbounds [249 x %union.intrealT], ptr %281, i64 0, i64 43
  store i32 %278, ptr %282, align 8, !tbaa !23
  br label %283

283:                                              ; preds = %277, %253
  br label %284

284:                                              ; preds = %283, %139
  %285 = load i32, ptr %18, align 4, !tbaa !9
  %286 = add nsw i32 %285, 1
  store i32 %286, ptr %18, align 4, !tbaa !9
  br label %287

287:                                              ; preds = %284, %49
  %288 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %288, ptr %7, align 8, !tbaa !5
  br label %34, !llvm.loop !32

289:                                              ; preds = %42
  %290 = load i32, ptr %18, align 4, !tbaa !9
  %291 = icmp ne i32 %290, 0
  br i1 %291, label %292, label %346

292:                                              ; preds = %289
  %293 = load ptr, ptr %4, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.qhT, ptr %293, i32 0, i32 166
  %295 = load ptr, ptr %294, align 8, !tbaa !33
  store ptr %295, ptr %11, align 8, !tbaa !5
  br label %296

296:                                              ; preds = %324, %292
  %297 = load ptr, ptr %11, align 8, !tbaa !5
  %298 = icmp ne ptr %297, null
  br i1 %298, label %299, label %304

299:                                              ; preds = %296
  %300 = load ptr, ptr %11, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.facetT, ptr %300, i32 0, i32 7
  %302 = load ptr, ptr %301, align 8, !tbaa !18
  %303 = icmp ne ptr %302, null
  br label %304

304:                                              ; preds = %299, %296
  %305 = phi i1 [ false, %296 ], [ %303, %299 ]
  br i1 %305, label %306, label %328

306:                                              ; preds = %304
  %307 = load ptr, ptr %11, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.facetT, ptr %307, i32 0, i32 15
  %309 = load i32, ptr %308, align 8
  %310 = lshr i32 %309, 24
  %311 = and i32 %310, 1
  %312 = icmp ne i32 %311, 0
  br i1 %312, label %313, label %323

313:                                              ; preds = %306
  %314 = load ptr, ptr %4, align 8, !tbaa !5
  %315 = load ptr, ptr %11, align 8, !tbaa !5
  call void @qh_test_redundant_neighbors(ptr noundef %314, ptr noundef %315)
  %316 = load ptr, ptr %4, align 8, !tbaa !5
  %317 = load ptr, ptr %11, align 8, !tbaa !5
  call void @qh_maybe_duplicateridges(ptr noundef %316, ptr noundef %317)
  %318 = load ptr, ptr %11, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.facetT, ptr %318, i32 0, i32 15
  %320 = load i32, ptr %319, align 8
  %321 = and i32 %320, -16777217
  %322 = or i32 %321, 0
  store i32 %322, ptr %319, align 8
  br label %323

323:                                              ; preds = %313, %306
  br label %324

324:                                              ; preds = %323
  %325 = load ptr, ptr %11, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.facetT, ptr %325, i32 0, i32 7
  %327 = load ptr, ptr %326, align 8, !tbaa !18
  store ptr %327, ptr %11, align 8, !tbaa !5
  br label %296, !llvm.loop !34

328:                                              ; preds = %304
  %329 = load ptr, ptr %4, align 8, !tbaa !5
  %330 = call i32 @qh_merge_degenredundant(ptr noundef %329)
  %331 = load i32, ptr %22, align 4, !tbaa !9
  %332 = add nsw i32 %331, %330
  store i32 %332, ptr %22, align 4, !tbaa !9
  %333 = load ptr, ptr %6, align 8, !tbaa !5
  store i32 1, ptr %333, align 4, !tbaa !9
  %334 = load ptr, ptr %4, align 8, !tbaa !5
  %335 = getelementptr inbounds %struct.qhT, ptr %334, i32 0, i32 29
  %336 = load i32, ptr %335, align 8, !tbaa !11
  %337 = icmp sge i32 %336, 1
  br i1 %337, label %338, label %345

338:                                              ; preds = %328
  %339 = load ptr, ptr %4, align 8, !tbaa !5
  %340 = load ptr, ptr %4, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.qhT, ptr %340, i32 0, i32 158
  %342 = load ptr, ptr %341, align 8, !tbaa !17
  %343 = load i32, ptr %18, align 4, !tbaa !9
  %344 = load i32, ptr %22, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %339, ptr noundef %342, i32 noundef 1013, ptr noundef @.str.144, i32 noundef %343, i32 noundef %344)
  br label %345

345:                                              ; preds = %338, %328
  br label %346

346:                                              ; preds = %345, %289
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  ret void
}

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

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

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

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

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

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

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

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


; 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"

@.str.142 = external hidden unnamed_addr constant [125 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [104 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @qh_mergecycle_all(ptr noundef %0, ptr noundef %1, ptr nocapture noundef writeonly %2) local_unnamed_addr #1 {
  %4 = getelementptr inbounds i8, ptr %0, i64 136
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = icmp sgt i32 %5, 1
  br i1 %6, label %7, label %10

7:                                                ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 2424
  %9 = load ptr, ptr %8, align 8, !tbaa !15
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %9, i32 noundef 2031, ptr noundef nonnull @.str.142) #2
  br label %10

10:                                               ; preds = %7, %3
  %.not138 = icmp eq ptr %1, null
  br i1 %.not138, label %.critedge.thread, label %.lr.ph143

.lr.ph143:                                        ; preds = %10
  %11 = getelementptr inbounds i8, ptr %0, i64 2424
  %12 = getelementptr inbounds i8, ptr %0, i64 3784
  %13 = getelementptr inbounds i8, ptr %0, i64 3776
  %14 = getelementptr inbounds i8, ptr %0, i64 3768
  %15 = getelementptr inbounds i8, ptr %0, i64 560
  %16 = getelementptr inbounds i8, ptr %0, i64 5152
  %17 = getelementptr inbounds i8, ptr %0, i64 536
  %18 = getelementptr inbounds i8, ptr %0, i64 3360
  %19 = getelementptr inbounds i8, ptr %0, i64 4776
  br label %20

20:                                               ; preds = %.lr.ph143, %109
  %.0141 = phi ptr [ %1, %.lr.ph143 ], [ %.2109, %109 ]
  %.0101139 = phi i32 [ 0, %.lr.ph143 ], [ %.1102, %109 ]
  %21 = getelementptr inbounds i8, ptr %.0141, i64 56
  %22 = load ptr, ptr %21, align 8, !tbaa !16
  %.not115 = icmp eq ptr %22, null
  br i1 %.not115, label %.critedge, label %23

23:                                               ; preds = %20
  %24 = getelementptr inbounds i8, ptr %.0141, i64 24
  %25 = load ptr, ptr %24, align 8, !tbaa !18
  %.not120 = icmp eq ptr %25, null
  br i1 %.not120, label %26, label %109

26:                                               ; preds = %23
  %27 = getelementptr inbounds i8, ptr %.0141, i64 112
  %28 = load i32, ptr %27, align 8
  %29 = and i32 %28, 33554432
  %.not121 = icmp eq i32 %29, 0
  br i1 %.not121, label %30, label %34

30:                                               ; preds = %26
  %31 = load ptr, ptr %11, align 8, !tbaa !15
  %32 = getelementptr inbounds i8, ptr %.0141, i64 108
  %33 = load i32, ptr %32, align 4, !tbaa !19
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, ptr noundef %31, i32 noundef 6225, ptr noundef nonnull @.str.143, i32 noundef %33) #2
  tail call void @qh_errexit(ptr noundef %0, i32 noundef 5, ptr noundef nonnull %.0141, ptr noundef null) #2
  br label %34

34:                                               ; preds = %30, %26
  %35 = getelementptr inbounds i8, ptr %.0141, i64 80
  %36 = load ptr, ptr %35, align 8, !tbaa !20
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %38 = load ptr, ptr %37, align 8, !tbaa !21
  %39 = getelementptr inbounds i8, ptr %.0141, i64 32
  %40 = load ptr, ptr %39, align 8, !tbaa !21
  %41 = icmp eq ptr %40, %.0141
  br i1 %41, label %42, label %select.unfold.preheader

select.unfold.preheader:                          ; preds = %34
  %.not122131 = icmp eq ptr %40, null
  br i1 %.not122131, label %.preheader, label %.lr.ph

42:                                               ; preds = %34
  %43 = load i32, ptr %15, align 8, !tbaa !22
  %44 = add nsw i32 %43, -1
  %45 = load i32, ptr %16, align 8, !tbaa !21
  %46 = icmp eq i32 %44, %45
  br i1 %46, label %47, label %49

47:                                               ; preds = %42
  %48 = load i32, ptr %17, align 8, !tbaa !23
  store i32 %48, ptr %4, align 8, !tbaa !5
  store i32 %48, ptr %18, align 8, !tbaa !24
  br label %49

49:                                               ; preds = %47, %42
  %50 = load i32, ptr %19, align 8, !tbaa !21
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %19, align 8, !tbaa !21
  %52 = getelementptr inbounds i8, ptr %.0141, i64 64
  %53 = load ptr, ptr %52, align 8, !tbaa !25
  %54 = getelementptr inbounds i8, ptr %53, i64 8
  %55 = load ptr, ptr %54, align 8, !tbaa !21
  %.not129136 = icmp eq ptr %55, null
  br i1 %.not129136, label %._crit_edge, label %.lr.ph137.preheader

.lr.ph137.preheader:                              ; preds = %49
  %56 = getelementptr inbounds i8, ptr %53, i64 16
  br label %.lr.ph137

.lr.ph137:                                        ; preds = %.lr.ph137.preheader, %63
  %57 = phi ptr [ %64, %63 ], [ %56, %.lr.ph137.preheader ]
  %58 = phi ptr [ %.pr, %63 ], [ %55, %.lr.ph137.preheader ]
  %.not130 = icmp eq ptr %58, %55
  br i1 %.not130, label %63, label %59

59:                                               ; preds = %.lr.ph137
  %60 = getelementptr inbounds i8, ptr %58, i64 40
  %61 = load i8, ptr %60, align 8
  %62 = or i8 %61, 8
  store i8 %62, ptr %60, align 8
  br label %63

63:                                               ; preds = %59, %.lr.ph137
  %.pr = load ptr, ptr %57, align 8, !tbaa !26
  %64 = getelementptr inbounds i8, ptr %57, i64 8
  %.not129 = icmp eq ptr %.pr, null
  br i1 %.not129, label %._crit_edge, label %.lr.ph137, !llvm.loop !27

._crit_edge:                                      ; preds = %63, %49
  %65 = getelementptr inbounds i8, ptr %38, i64 32
  store ptr null, ptr %65, align 8, !tbaa !21
  tail call void @qh_mergefacet(ptr noundef %0, ptr noundef nonnull %.0141, ptr noundef %38, i32 noundef 13, ptr noundef null, ptr noundef null, i32 noundef 1)
  br label %107

.preheader:                                       ; preds = %select.unfold, %select.unfold.preheader
  %.098.lcssa = phi i32 [ 0, %select.unfold.preheader ], [ %.1, %select.unfold ]
  br label %83

.lr.ph:                                           ; preds = %select.unfold.preheader, %select.unfold
  %.098134 = phi i32 [ %.1, %select.unfold ], [ 0, %select.unfold.preheader ]
  %.0104133 = phi ptr [ %67, %select.unfold ], [ %40, %select.unfold.preheader ]
  %.0105132 = phi ptr [ %.1106, %select.unfold ], [ %.0141, %select.unfold.preheader ]
  %66 = getelementptr inbounds i8, ptr %.0104133, i64 32
  %67 = load ptr, ptr %66, align 8, !tbaa !21
  %68 = getelementptr inbounds i8, ptr %.0104133, i64 112
  %69 = load i32, ptr %68, align 8
  %70 = and i32 %69, 67110912
  %or.cond = icmp eq i32 %70, 0
  br i1 %or.cond, label %72, label %71

71:                                               ; preds = %.lr.ph
  tail call void @qh_infiniteloop(ptr noundef %0, ptr noundef nonnull %.0104133) #2
  %.pre = load i32, ptr %68, align 8
  br label %72

72:                                               ; preds = %.lr.ph, %71
  %73 = phi i32 [ %69, %.lr.ph ], [ %.pre, %71 ]
  %74 = or i32 %73, 67108864
  store i32 %74, ptr %68, align 8
  %75 = getelementptr inbounds i8, ptr %.0104133, i64 24
  %76 = load ptr, ptr %75, align 8, !tbaa !18
  %.not127 = icmp eq ptr %76, null
  br i1 %.not127, label %80, label %77

77:                                               ; preds = %72
  %78 = load ptr, ptr %66, align 8, !tbaa !21
  %79 = getelementptr inbounds i8, ptr %.0105132, i64 32
  store ptr %78, ptr %79, align 8, !tbaa !21
  store ptr null, ptr %66, align 8, !tbaa !21
  br label %select.unfold

80:                                               ; preds = %72
  %81 = add nsw i32 %.098134, 1
  br label %select.unfold

select.unfold:                                    ; preds = %77, %80
  %.1106 = phi ptr [ %.0105132, %77 ], [ %.0104133, %80 ]
  %.1 = phi i32 [ %.098134, %77 ], [ %81, %80 ]
  %82 = icmp eq ptr %.0104133, %.0141
  %.not122156 = icmp eq ptr %67, null
  %.not122 = select i1 %82, i1 true, i1 %.not122156
  br i1 %.not122, label %.preheader, label %.lr.ph

83:                                               ; preds = %.preheader, %87
  %.0107135 = phi ptr [ %22, %.preheader ], [ %89, %87 ]
  %84 = getelementptr inbounds i8, ptr %.0107135, i64 112
  %85 = load i32, ptr %84, align 8
  %86 = and i32 %85, 67108864
  %.not124 = icmp eq i32 %86, 0
  br i1 %.not124, label %.critedge2, label %87

87:                                               ; preds = %83
  %88 = getelementptr inbounds i8, ptr %.0107135, i64 56
  %89 = load ptr, ptr %88, align 8, !tbaa !16
  %.not123 = icmp eq ptr %89, null
  br i1 %.not123, label %.critedge2, label %83, !llvm.loop !29

.critedge2:                                       ; preds = %87, %83
  %.0107.lcssa = phi ptr [ null, %87 ], [ %.0107135, %83 ]
  %90 = getelementptr inbounds i8, ptr %38, i64 32
  store ptr null, ptr %90, align 8, !tbaa !21
  tail call void @qh_mergecycle(ptr noundef %0, ptr noundef nonnull %.0141, ptr noundef %38)
  %91 = getelementptr inbounds i8, ptr %38, i64 112
  %92 = load i32, ptr %91, align 8
  %93 = and i32 %92, 511
  %94 = add nsw i32 %93, %.098.lcssa
  %95 = icmp sgt i32 %94, 511
  %96 = and i32 %94, 511
  %97 = and i32 %92, -512
  %98 = or disjoint i32 %96, %97
  %99 = or i32 %92, 511
  %storemerge = select i1 %95, i32 %99, i32 %98
  store i32 %storemerge, ptr %91, align 8
  %100 = load i32, ptr %12, align 8, !tbaa !21
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %12, align 8, !tbaa !21
  %102 = load i32, ptr %13, align 8, !tbaa !21
  %103 = add nsw i32 %102, %.098.lcssa
  store i32 %103, ptr %13, align 8, !tbaa !21
  %104 = load i32, ptr %14, align 8, !tbaa !21
  %105 = icmp slt i32 %104, %.098.lcssa
  br i1 %105, label %106, label %107

106:                                              ; preds = %.critedge2
  store i32 %.098.lcssa, ptr %14, align 8, !tbaa !21
  br label %107

107:                                              ; preds = %.critedge2, %106, %._crit_edge
  %.1108 = phi ptr [ %22, %._crit_edge ], [ %.0107.lcssa, %106 ], [ %.0107.lcssa, %.critedge2 ]
  %108 = add nsw i32 %.0101139, 1
  br label %109

109:                                              ; preds = %23, %107
  %.2109 = phi ptr [ %22, %23 ], [ %.1108, %107 ]
  %.1102 = phi i32 [ %.0101139, %23 ], [ %108, %107 ]
  %.not = icmp eq ptr %.2109, null
  br i1 %.not, label %.critedge, label %20, !llvm.loop !30

.critedge:                                        ; preds = %20, %109
  %.0101.lcssa = phi i32 [ %.0101139, %20 ], [ %.1102, %109 ]
  %.not116 = icmp eq i32 %.0101.lcssa, 0
  br i1 %.not116, label %.critedge.thread, label %110

110:                                              ; preds = %.critedge
  %111 = getelementptr inbounds i8, ptr %0, i64 2480
  %.0110147 = load ptr, ptr %111, align 8, !tbaa !26
  %.not117148 = icmp eq ptr %.0110147, null
  br i1 %.not117148, label %.critedge4, label %.lr.ph151

.lr.ph151:                                        ; preds = %110, %121
  %.0110149 = phi ptr [ %.0110, %121 ], [ %.0110147, %110 ]
  %112 = getelementptr inbounds i8, ptr %.0110149, i64 56
  %113 = load ptr, ptr %112, align 8, !tbaa !26
  %.not118 = icmp eq ptr %113, null
  br i1 %.not118, label %.critedge4, label %114

114:                                              ; preds = %.lr.ph151
  %115 = getelementptr inbounds i8, ptr %.0110149, i64 112
  %116 = load i32, ptr %115, align 8
  %117 = and i32 %116, 16777216
  %.not119 = icmp eq i32 %117, 0
  br i1 %.not119, label %121, label %118

118:                                              ; preds = %114
  tail call void @qh_test_redundant_neighbors(ptr noundef %0, ptr noundef nonnull %.0110149)
  tail call void @qh_maybe_duplicateridges(ptr noundef %0, ptr noundef nonnull %.0110149)
  %119 = load i32, ptr %115, align 8
  %120 = and i32 %119, -16777217
  store i32 %120, ptr %115, align 8
  %.0110.pre = load ptr, ptr %112, align 8, !tbaa !26
  br label %121

121:                                              ; preds = %114, %118
  %.0110 = phi ptr [ %113, %114 ], [ %.0110.pre, %118 ]
  %.not117 = icmp eq ptr %.0110, null
  br i1 %.not117, label %.critedge4, label %.lr.ph151, !llvm.loop !31

.critedge4:                                       ; preds = %.lr.ph151, %121, %110
  %122 = tail call i32 @qh_merge_degenredundant(ptr noundef %0)
  store i32 1, ptr %2, align 4, !tbaa !32
  %123 = load i32, ptr %4, align 8, !tbaa !5
  %124 = icmp sgt i32 %123, 0
  br i1 %124, label %125, label %.critedge.thread

125:                                              ; preds = %.critedge4
  %126 = getelementptr inbounds i8, ptr %0, i64 2424
  %127 = load ptr, ptr %126, align 8, !tbaa !15
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %127, i32 noundef 1013, ptr noundef nonnull @.str.144, i32 noundef %.0101.lcssa, i32 noundef %122) #2
  br label %.critedge.thread

.critedge.thread:                                 ; preds = %10, %.critedge4, %125, %.critedge
  ret void
}

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

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

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

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

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

declare void @qh_infiniteloop(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @qh_test_redundant_neighbors(ptr noundef, 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 136}
!6 = !{!"qhT", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !10, i64 64, !10, i64 72, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !11, i64 104, !7, i64 112, !7, i64 116, !11, i64 120, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144, !7, i64 148, !7, i64 152, !10, i64 160, !10, i64 168, !7, i64 176, !7, i64 180, !7, i64 184, !7, i64 188, !10, i64 192, !10, i64 200, !7, i64 208, !7, i64 212, !10, i64 216, !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, !7, i64 296, !8, i64 300, !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, !7, i64 544, !10, i64 552, !7, i64 560, !7, i64 564, !7, i64 568, !7, i64 572, !7, i64 576, !7, i64 580, !7, i64 584, !7, i64 588, !10, i64 592, !7, i64 600, !11, i64 608, !11, i64 616, !7, i64 624, !7, i64 628, !7, i64 632, !7, i64 636, !7, i64 640, !11, i64 648, !7, i64 656, !11, i64 664, !7, i64 672, !8, i64 676, !7, i64 932, !8, i64 936, !8, i64 1192, !7, i64 1704, !7, i64 1708, !7, i64 1712, !7, i64 1716, !7, i64 1720, !7, i64 1724, !11, i64 1728, !11, i64 1736, !11, i64 1744, !11, 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, !10, i64 1856, !10, i64 1864, !11, i64 1872, !10, i64 1880, !10, i64 1888, !10, i64 1896, !10, i64 1904, !7, i64 1912, !8, i64 1916, !8, i64 1928, !8, i64 2128, !8, i64 2168, !8, i64 2368, !11, i64 2408, !11, i64 2416, !11, i64 2424, !11, i64 2432, !7, i64 2440, !7, i64 2444, !7, i64 2448, !11, i64 2456, !11, i64 2464, !11, i64 2472, !11, i64 2480, !11, i64 2488, !7, i64 2496, !7, i64 2500, !11, i64 2504, !7, i64 2512, !11, i64 2520, !7, i64 2528, !11, i64 2536, !11, i64 2544, !11, i64 2552, !11, i64 2560, !7, i64 2568, !7, i64 2572, !7, i64 2576, !7, i64 2580, !7, i64 2584, !7, i64 2588, !7, i64 2592, !7, i64 2596, !12, i64 2600, !7, i64 2608, !7, i64 2612, !7, i64 2616, !7, i64 2620, !7, i64 2624, !11, i64 2632, !11, i64 2640, !7, i64 2648, !7, i64 2652, !7, i64 2656, !10, i64 2664, !7, i64 2672, !10, i64 2680, !10, i64 2688, !10, i64 2696, !7, i64 2704, !7, i64 2708, !7, i64 2712, !7, i64 2716, !7, i64 2720, !10, i64 2728, !10, i64 2736, !7, i64 2744, !7, i64 2748, !7, i64 2752, !7, i64 2756, !7, i64 2760, !7, i64 2764, !10, i64 2768, !10, i64 2776, !7, i64 2784, !7, i64 2788, !7, i64 2792, !7, i64 2796, !11, i64 2800, !11, i64 2808, !11, i64 2816, !11, i64 2824, !11, i64 2832, !11, i64 2840, !11, i64 2848, !11, i64 2856, !11, i64 2864, !7, i64 2872, !11, i64 2880, !11, i64 2888, !7, i64 2896, !7, i64 2900, !7, i64 2904, !11, i64 2912, !10, i64 2920, !10, i64 2928, !10, i64 2936, !10, i64 2944, !7, i64 2952, !7, i64 2956, !7, i64 2960, !7, i64 2964, !7, i64 2968, !7, i64 2972, !11, i64 2976, !7, i64 2984, !7, i64 2988, !8, i64 2992, !8, i64 3192, !7, i64 3232, !10, i64 3240, !11, i64 3248, !11, i64 3256, !11, i64 3264, !13, i64 3272, !14, i64 3424}
!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 = !{!"qhmemT", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !7, i64 64, !11, i64 72, !11, i64 80, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144}
!14 = !{!"qhstatT", !8, i64 0, !8, i64 1992, !8, i64 2256, !8, i64 4248, !8, i64 4746, !8, i64 4995, !8, i64 5248, !7, i64 5320, !7, i64 5324, !7, i64 5328, !7, i64 5332, !10, i64 5336}
!15 = !{!6, !11, i64 2424}
!16 = !{!17, !11, i64 56}
!17 = !{!"facetT", !10, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !8, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115}
!18 = !{!17, !11, i64 24}
!19 = !{!17, !7, i64 108}
!20 = !{!17, !11, i64 80}
!21 = !{!8, !8, i64 0}
!22 = !{!6, !7, i64 560}
!23 = !{!6, !7, i64 536}
!24 = !{!6, !7, i64 3360}
!25 = !{!17, !11, i64 64}
!26 = !{!11, !11, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}
!30 = distinct !{!30, !28}
!31 = distinct !{!31, !28}
!32 = !{!7, !7, i64 0}


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