; LLVM IR from jrl-umi3218/mc_rtc :: 3rd-party/qhull/src/libqhull_r (libqhull_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.60 = external hidden unnamed_addr constant [113 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [117 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [115 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_partitionvisible(ptr noundef %0, i32 noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %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 i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  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 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, 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
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.qhT, ptr %16, i32 0, i32 29
  %18 = load i32, ptr %17, align 8, !tbaa !11
  %19 = icmp sge i32 %18, 3
  br i1 %19, label %20, label %35

20:                                               ; preds = %3
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.qhT, ptr %22, i32 0, i32 158
  %24 = load ptr, ptr %23, align 8, !tbaa !17
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.qhT, ptr %25, i32 0, i32 167
  %27 = load ptr, ptr %26, align 8, !tbaa !18
  %28 = getelementptr inbounds %struct.facetT, ptr %27, i32 0, i32 14
  %29 = load i32, ptr %28, align 4, !tbaa !19
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.qhT, ptr %30, i32 0, i32 166
  %32 = load ptr, ptr %31, align 8, !tbaa !21
  %33 = getelementptr inbounds %struct.facetT, ptr %32, i32 0, i32 14
  %34 = load i32, ptr %33, align 4, !tbaa !19
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %21, ptr noundef %24, i32 noundef 3042, ptr noundef @.str.60, i32 noundef %29, i32 noundef %34)
  br label %35

35:                                               ; preds = %20, %3
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.qhT, ptr %36, i32 0, i32 49
  %38 = load i32, ptr %37, align 8, !tbaa !22
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %55

40:                                               ; preds = %35
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.qhT, ptr %41, i32 0, i32 6
  %43 = load double, ptr %42, align 8, !tbaa !23
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.qhT, ptr %44, i32 0, i32 200
  %46 = load double, ptr %45, align 8, !tbaa !24
  %47 = fcmp olt double %43, %46
  br i1 %47, label %48, label %54

48:                                               ; preds = %40
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.qhT, ptr %49, i32 0, i32 200
  %51 = load double, ptr %50, align 8, !tbaa !24
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.qhT, ptr %52, i32 0, i32 6
  store double %51, ptr %53, align 8, !tbaa !23
  br label %54

54:                                               ; preds = %48, %40
  br label %55

55:                                               ; preds = %54, %35
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  store i32 0, ptr %56, align 4, !tbaa !9
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.qhT, ptr %57, i32 0, i32 167
  %59 = load ptr, ptr %58, align 8, !tbaa !18
  store ptr %59, ptr %7, align 8, !tbaa !5
  br label %60

60:                                               ; preds = %205, %55
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = icmp ne ptr %61, null
  br i1 %62, label %63, label %70

63:                                               ; preds = %60
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.facetT, ptr %64, i32 0, i32 15
  %66 = load i32, ptr %65, align 8
  %67 = lshr i32 %66, 11
  %68 = and i32 %67, 1
  %69 = icmp ne i32 %68, 0
  br label %70

70:                                               ; preds = %63, %60
  %71 = phi i1 [ false, %60 ], [ %69, %63 ]
  br i1 %71, label %72, label %209

72:                                               ; preds = %70
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.facetT, ptr %73, i32 0, i32 11
  %75 = load ptr, ptr %74, align 8, !tbaa !25
  %76 = icmp ne ptr %75, null
  br i1 %76, label %83, label %77

77:                                               ; preds = %72
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.facetT, ptr %78, i32 0, i32 12
  %80 = load ptr, ptr %79, align 8, !tbaa !26
  %81 = icmp ne ptr %80, null
  br i1 %81, label %83, label %82

82:                                               ; preds = %77
  br label %205

83:                                               ; preds = %77, %72
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = call ptr @qh_getreplacement(ptr noundef %84, ptr noundef %85)
  store ptr %86, ptr %8, align 8, !tbaa !5
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = icmp ne ptr %87, null
  br i1 %88, label %93, label %89

89:                                               ; preds = %83
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.qhT, ptr %90, i32 0, i32 166
  %92 = load ptr, ptr %91, align 8, !tbaa !21
  store ptr %92, ptr %8, align 8, !tbaa !5
  br label %93

93:                                               ; preds = %89, %83
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.facetT, ptr %94, i32 0, i32 7
  %96 = load ptr, ptr %95, align 8, !tbaa !27
  %97 = icmp ne ptr %96, null
  br i1 %97, label %104, label %98

98:                                               ; preds = %93
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.qhT, ptr %100, i32 0, i32 158
  %102 = load ptr, ptr %101, align 8, !tbaa !17
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %99, ptr noundef %102, i32 noundef 6170, ptr noundef @.str.61)
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  call void @qh_errexit(ptr noundef %103, i32 noundef 7, ptr noundef null, ptr noundef null)
  br label %104

104:                                              ; preds = %98, %93
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.facetT, ptr %105, i32 0, i32 11
  %107 = load ptr, ptr %106, align 8, !tbaa !25
  %108 = icmp ne ptr %107, null
  br i1 %108, label %109, label %145

109:                                              ; preds = %104
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.facetT, ptr %111, i32 0, i32 11
  %113 = load ptr, ptr %112, align 8, !tbaa !25
  %114 = call i32 @qh_setsize(ptr noundef %110, ptr noundef %113)
  store i32 %114, ptr %13, align 4, !tbaa !9
  %115 = load i32, ptr %13, align 4, !tbaa !9
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = load i32, ptr %116, align 4, !tbaa !9
  %118 = add nsw i32 %117, %115
  store i32 %118, ptr %116, align 4, !tbaa !9
  %119 = load i32, ptr %13, align 4, !tbaa !9
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.qhT, ptr %120, i32 0, i32 180
  %122 = load i32, ptr %121, align 8, !tbaa !28
  %123 = sub nsw i32 %122, %119
  store i32 %123, ptr %121, align 8, !tbaa !28
  store ptr null, ptr %9, align 8, !tbaa !5
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.facetT, ptr %124, i32 0, i32 11
  %126 = load ptr, ptr %125, align 8, !tbaa !25
  %127 = icmp ne ptr %126, null
  br i1 %127, label %128, label %144

128:                                              ; preds = %109
  %129 = load ptr, ptr %7, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.facetT, ptr %129, i32 0, i32 11
  %131 = load ptr, ptr %130, align 8, !tbaa !25
  %132 = getelementptr inbounds %struct.setT, ptr %131, i32 0, i32 1
  %133 = getelementptr inbounds [1 x %union.setelemT], ptr %132, i64 0, i64 0
  store ptr %133, ptr %10, align 8, !tbaa !5
  br label %134

134:                                              ; preds = %139, %128
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  %136 = getelementptr inbounds ptr, ptr %135, i32 1
  store ptr %136, ptr %10, align 8, !tbaa !5
  %137 = load ptr, ptr %135, align 8, !tbaa !5
  store ptr %137, ptr %9, align 8, !tbaa !5
  %138 = icmp ne ptr %137, null
  br i1 %138, label %139, label %143

139:                                              ; preds = %134
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  call void @qh_partitionpoint(ptr noundef %140, ptr noundef %141, ptr noundef %142)
  br label %134, !llvm.loop !29

143:                                              ; preds = %134
  br label %144

144:                                              ; preds = %143, %109
  br label %145

145:                                              ; preds = %144, %104
  %146 = load ptr, ptr %7, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.facetT, ptr %146, i32 0, i32 12
  %148 = load ptr, ptr %147, align 8, !tbaa !26
  %149 = icmp ne ptr %148, null
  br i1 %149, label %150, label %204

150:                                              ; preds = %145
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.qhT, ptr %151, i32 0, i32 31
  %153 = load i32, ptr %152, align 8, !tbaa !31
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.qhT, ptr %154, i32 0, i32 32
  %156 = load i32, ptr %155, align 4, !tbaa !32
  %157 = add i32 %153, %156
  %158 = load ptr, ptr %4, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.qhT, ptr %158, i32 0, i32 109
  %160 = load i32, ptr %159, align 4, !tbaa !33
  %161 = add i32 %157, %160
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %163, label %204

163:                                              ; preds = %150
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = load ptr, ptr %7, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.facetT, ptr %165, i32 0, i32 12
  %167 = load ptr, ptr %166, align 8, !tbaa !26
  %168 = call i32 @qh_setsize(ptr noundef %164, ptr noundef %167)
  store i32 %168, ptr %13, align 4, !tbaa !9
  %169 = load i32, ptr %13, align 4, !tbaa !9
  %170 = load i32, ptr %12, align 4, !tbaa !9
  %171 = add nsw i32 %170, %169
  store i32 %171, ptr %12, align 4, !tbaa !9
  store ptr null, ptr %9, align 8, !tbaa !5
  %172 = load ptr, ptr %7, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.facetT, ptr %172, i32 0, i32 12
  %174 = load ptr, ptr %173, align 8, !tbaa !26
  %175 = icmp ne ptr %174, null
  br i1 %175, label %176, label %203

176:                                              ; preds = %163
  %177 = load ptr, ptr %7, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.facetT, ptr %177, i32 0, i32 12
  %179 = load ptr, ptr %178, align 8, !tbaa !26
  %180 = getelementptr inbounds %struct.setT, ptr %179, i32 0, i32 1
  %181 = getelementptr inbounds [1 x %union.setelemT], ptr %180, i64 0, i64 0
  store ptr %181, ptr %10, align 8, !tbaa !5
  br label %182

182:                                              ; preds = %201, %176
  %183 = load ptr, ptr %10, align 8, !tbaa !5
  %184 = getelementptr inbounds ptr, ptr %183, i32 1
  store ptr %184, ptr %10, align 8, !tbaa !5
  %185 = load ptr, ptr %183, align 8, !tbaa !5
  store ptr %185, ptr %9, align 8, !tbaa !5
  %186 = icmp ne ptr %185, null
  br i1 %186, label %187, label %202

187:                                              ; preds = %182
  %188 = load i32, ptr %5, align 4, !tbaa !9
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %194

190:                                              ; preds = %187
  %191 = load ptr, ptr %4, align 8, !tbaa !5
  %192 = load ptr, ptr %9, align 8, !tbaa !5
  %193 = load ptr, ptr %8, align 8, !tbaa !5
  call void @qh_partitionpoint(ptr noundef %191, ptr noundef %192, ptr noundef %193)
  br label %201

194:                                              ; preds = %187
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = load ptr, ptr %9, align 8, !tbaa !5
  %197 = load ptr, ptr %8, align 8, !tbaa !5
  %198 = load ptr, ptr %4, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.qhT, ptr %198, i32 0, i32 204
  %200 = load i32, ptr %199, align 8, !tbaa !34
  call void @qh_partitioncoplanar(ptr noundef %195, ptr noundef %196, ptr noundef %197, ptr noundef null, i32 noundef %200)
  br label %201

201:                                              ; preds = %194, %190
  br label %182, !llvm.loop !35

202:                                              ; preds = %182
  br label %203

203:                                              ; preds = %202, %163
  br label %204

204:                                              ; preds = %203, %150, %145
  br label %205

205:                                              ; preds = %204, %82
  %206 = load ptr, ptr %7, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.facetT, ptr %206, i32 0, i32 7
  %208 = load ptr, ptr %207, align 8, !tbaa !27
  store ptr %208, ptr %7, align 8, !tbaa !5
  br label %60, !llvm.loop !36

209:                                              ; preds = %70
  %210 = load ptr, ptr %4, align 8, !tbaa !5
  %211 = load ptr, ptr %4, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.qhT, ptr %211, i32 0, i32 226
  %213 = load ptr, ptr %212, align 8, !tbaa !37
  %214 = call i32 @qh_setsize(ptr noundef %210, ptr noundef %213)
  store i32 %214, ptr %11, align 4, !tbaa !9
  %215 = load i32, ptr %11, align 4, !tbaa !9
  %216 = icmp sgt i32 %215, 0
  br i1 %216, label %217, label %316

217:                                              ; preds = %209
  %218 = load ptr, ptr %4, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.qhT, ptr %218, i32 0, i32 29
  %220 = load i32, ptr %219, align 8, !tbaa !11
  %221 = icmp sge i32 %220, 3
  br i1 %221, label %222, label %237

222:                                              ; preds = %217
  %223 = load ptr, ptr %4, align 8, !tbaa !5
  %224 = load ptr, ptr %4, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.qhT, ptr %224, i32 0, i32 158
  %226 = load ptr, ptr %225, align 8, !tbaa !17
  %227 = load i32, ptr %11, align 4, !tbaa !9
  %228 = load i32, ptr %5, align 4, !tbaa !9
  %229 = icmp ne i32 %228, 0
  %230 = xor i1 %229, true
  %231 = zext i1 %230 to i32
  %232 = load ptr, ptr %4, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.qhT, ptr %232, i32 0, i32 166
  %234 = load ptr, ptr %233, align 8, !tbaa !21
  %235 = getelementptr inbounds %struct.facetT, ptr %234, i32 0, i32 14
  %236 = load i32, ptr %235, align 4, !tbaa !19
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %223, ptr noundef %226, i32 noundef 3049, ptr noundef @.str.62, i32 noundef %227, i32 noundef %231, i32 noundef %236)
  br label %237

237:                                              ; preds = %222, %217
  store ptr null, ptr %14, align 8, !tbaa !5
  %238 = load ptr, ptr %4, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.qhT, ptr %238, i32 0, i32 226
  %240 = load ptr, ptr %239, align 8, !tbaa !37
  %241 = icmp ne ptr %240, null
  br i1 %241, label %242, label %315

242:                                              ; preds = %237
  %243 = load ptr, ptr %4, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.qhT, ptr %243, i32 0, i32 226
  %245 = load ptr, ptr %244, align 8, !tbaa !37
  %246 = getelementptr inbounds %struct.setT, ptr %245, i32 0, i32 1
  %247 = getelementptr inbounds [1 x %union.setelemT], ptr %246, i64 0, i64 0
  store ptr %247, ptr %15, align 8, !tbaa !5
  br label %248

248:                                              ; preds = %313, %242
  %249 = load ptr, ptr %15, align 8, !tbaa !5
  %250 = getelementptr inbounds ptr, ptr %249, i32 1
  store ptr %250, ptr %15, align 8, !tbaa !5
  %251 = load ptr, ptr %249, align 8, !tbaa !5
  store ptr %251, ptr %14, align 8, !tbaa !5
  %252 = icmp ne ptr %251, null
  br i1 %252, label %253, label %314

253:                                              ; preds = %248
  %254 = load ptr, ptr %14, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.vertexT, ptr %254, i32 0, i32 2
  %256 = load ptr, ptr %255, align 8, !tbaa !38
  %257 = icmp ne ptr %256, null
  br i1 %257, label %258, label %313

258:                                              ; preds = %253
  %259 = load ptr, ptr %14, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.vertexT, ptr %259, i32 0, i32 6
  %261 = load i8, ptr %260, align 8
  %262 = lshr i8 %261, 5
  %263 = and i8 %262, 1
  %264 = zext i8 %263 to i32
  %265 = icmp ne i32 %264, 0
  br i1 %265, label %313, label %266

266:                                              ; preds = %258
  %267 = load ptr, ptr %4, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.qhT, ptr %267, i32 0, i32 166
  %269 = load ptr, ptr %268, align 8, !tbaa !21
  %270 = icmp ne ptr %269, null
  br i1 %270, label %271, label %279

271:                                              ; preds = %266
  %272 = load ptr, ptr %4, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.qhT, ptr %272, i32 0, i32 166
  %274 = load ptr, ptr %273, align 8, !tbaa !21
  %275 = load ptr, ptr %4, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.qhT, ptr %275, i32 0, i32 164
  %277 = load ptr, ptr %276, align 8, !tbaa !40
  %278 = icmp eq ptr %274, %277
  br i1 %278, label %279, label %288

279:                                              ; preds = %271, %266
  %280 = load ptr, ptr %4, align 8, !tbaa !5
  %281 = load ptr, ptr %4, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.qhT, ptr %281, i32 0, i32 158
  %283 = load ptr, ptr %282, align 8, !tbaa !17
  %284 = load ptr, ptr %14, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.vertexT, ptr %284, i32 0, i32 4
  %286 = load i32, ptr %285, align 8, !tbaa !41
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %280, ptr noundef %283, i32 noundef 6284, ptr noundef @.str.63, i32 noundef %286)
  %287 = load ptr, ptr %4, align 8, !tbaa !5
  call void @qh_errexit(ptr noundef %287, i32 noundef 5, ptr noundef null, ptr noundef null)
  br label %288

288:                                              ; preds = %279, %271
  %289 = load i32, ptr %5, align 4, !tbaa !9
  %290 = icmp ne i32 %289, 0
  br i1 %290, label %291, label %299

291:                                              ; preds = %288
  %292 = load ptr, ptr %4, align 8, !tbaa !5
  %293 = load ptr, ptr %14, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.vertexT, ptr %293, i32 0, i32 2
  %295 = load ptr, ptr %294, align 8, !tbaa !38
  %296 = load ptr, ptr %4, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.qhT, ptr %296, i32 0, i32 166
  %298 = load ptr, ptr %297, align 8, !tbaa !21
  call void @qh_partitionpoint(ptr noundef %292, ptr noundef %295, ptr noundef %298)
  br label %307

299:                                              ; preds = %288
  %300 = load ptr, ptr %4, align 8, !tbaa !5
  %301 = load ptr, ptr %14, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.vertexT, ptr %301, i32 0, i32 2
  %303 = load ptr, ptr %302, align 8, !tbaa !38
  %304 = load ptr, ptr %4, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.qhT, ptr %304, i32 0, i32 166
  %306 = load ptr, ptr %305, align 8, !tbaa !21
  call void @qh_partitioncoplanar(ptr noundef %300, ptr noundef %303, ptr noundef %306, ptr noundef null, i32 noundef 1)
  br label %307

307:                                              ; preds = %299, %291
  %308 = load ptr, ptr %14, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.vertexT, ptr %308, i32 0, i32 6
  %310 = load i8, ptr %309, align 8
  %311 = and i8 %310, -33
  %312 = or i8 %311, 32
  store i8 %312, ptr %309, align 8
  br label %313

313:                                              ; preds = %307, %258, %253
  br label %248, !llvm.loop !42

314:                                              ; preds = %248
  br label %315

315:                                              ; preds = %314, %237
  br label %316

316:                                              ; preds = %315, %209
  %317 = load ptr, ptr %4, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.qhT, ptr %317, i32 0, i32 29
  %319 = load i32, ptr %318, align 8, !tbaa !11
  %320 = icmp sge i32 %319, 1
  br i1 %320, label %321, label %330

321:                                              ; preds = %316
  %322 = load ptr, ptr %4, align 8, !tbaa !5
  %323 = load ptr, ptr %4, align 8, !tbaa !5
  %324 = getelementptr inbounds %struct.qhT, ptr %323, i32 0, i32 158
  %325 = load ptr, ptr %324, align 8, !tbaa !17
  %326 = load ptr, ptr %6, align 8, !tbaa !5
  %327 = load i32, ptr %326, align 4, !tbaa !9
  %328 = load i32, ptr %12, align 4, !tbaa !9
  %329 = load i32, ptr %11, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %322, ptr noundef %325, i32 noundef 1043, ptr noundef @.str.64, i32 noundef %327, i32 noundef %328, i32 noundef %329)
  br label %330

330:                                              ; preds = %321, %316
  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 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, 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
}

declare i32 @qh_setsize(ptr noundef, ptr noundef) #1

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

; 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 void @qh_partitioncoplanar(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 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 = !{!12, !6, i64 2488}
!19 = !{!20, !10, i64 108}
!20 = !{!"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}
!21 = !{!12, !6, i64 2480}
!22 = !{!12, !10, i64 240}
!23 = !{!12, !13, i64 24}
!24 = !{!12, !13, i64 2688}
!25 = !{!20, !6, i64 88}
!26 = !{!20, !6, i64 96}
!27 = !{!20, !6, i64 56}
!28 = !{!12, !10, i64 2576}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!12, !10, i64 144}
!32 = !{!12, !10, i64 148}
!33 = !{!12, !10, i64 628}
!34 = !{!12, !10, i64 2712}
!35 = distinct !{!35, !30}
!36 = distinct !{!36, !30}
!37 = !{!12, !6, i64 2840}
!38 = !{!39, !6, i64 16}
!39 = !{!"vertexT", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 40, !10, i64 40, !10, i64 40, !10, i64 40, !10, i64 40}
!40 = !{!12, !6, i64 2464}
!41 = !{!39, !10, i64 32}
!42 = distinct !{!42, !30}


; 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.60 = external hidden unnamed_addr constant [113 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [117 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [115 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_partitionvisible(ptr noundef %0, i32 noundef %1, ptr nocapture noundef %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, 2
  br i1 %6, label %7, label %18

7:                                                ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 2424
  %9 = load ptr, ptr %8, align 8, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %0, i64 2488
  %11 = load ptr, ptr %10, align 8, !tbaa !16
  %12 = getelementptr inbounds i8, ptr %11, i64 108
  %13 = load i32, ptr %12, align 4, !tbaa !17
  %14 = getelementptr inbounds i8, ptr %0, i64 2480
  %15 = load ptr, ptr %14, align 8, !tbaa !19
  %16 = getelementptr inbounds i8, ptr %15, i64 108
  %17 = load i32, ptr %16, align 4, !tbaa !17
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %9, i32 noundef 3042, ptr noundef nonnull @.str.60, i32 noundef %13, i32 noundef %17) #2
  br label %18

18:                                               ; preds = %7, %3
  %19 = getelementptr inbounds i8, ptr %0, i64 240
  %20 = load i32, ptr %19, align 8, !tbaa !20
  %.not = icmp eq i32 %20, 0
  br i1 %.not, label %28, label %21

21:                                               ; preds = %18
  %22 = getelementptr inbounds i8, ptr %0, i64 24
  %23 = load double, ptr %22, align 8, !tbaa !21
  %24 = getelementptr inbounds i8, ptr %0, i64 2688
  %25 = load double, ptr %24, align 8, !tbaa !22
  %26 = fcmp olt double %23, %25
  br i1 %26, label %27, label %28

27:                                               ; preds = %21
  store double %25, ptr %22, align 8, !tbaa !21
  br label %28

28:                                               ; preds = %21, %27, %18
  store i32 0, ptr %2, align 4, !tbaa !23
  %29 = getelementptr inbounds i8, ptr %0, i64 2488
  %.092142 = load ptr, ptr %29, align 8, !tbaa !24
  %.not108143 = icmp eq ptr %.092142, null
  br i1 %.not108143, label %.critedge, label %.lr.ph146

.lr.ph146:                                        ; preds = %28
  %30 = getelementptr inbounds i8, ptr %0, i64 2480
  %31 = getelementptr inbounds i8, ptr %0, i64 2424
  %32 = getelementptr inbounds i8, ptr %0, i64 2576
  %33 = getelementptr inbounds i8, ptr %0, i64 144
  %34 = getelementptr inbounds i8, ptr %0, i64 148
  %35 = getelementptr inbounds i8, ptr %0, i64 628
  %.not130 = icmp eq i32 %1, 0
  %36 = getelementptr inbounds i8, ptr %0, i64 2712
  br label %37

37:                                               ; preds = %.lr.ph146, %.loopexit132
  %.092145 = phi ptr [ %.092142, %.lr.ph146 ], [ %.092, %.loopexit132 ]
  %.091144 = phi i32 [ 0, %.lr.ph146 ], [ %.1, %.loopexit132 ]
  %38 = getelementptr inbounds i8, ptr %.092145, i64 112
  %39 = load i32, ptr %38, align 8
  %40 = and i32 %39, 2048
  %.not109 = icmp eq i32 %40, 0
  br i1 %.not109, label %.critedge, label %41

41:                                               ; preds = %37
  %42 = getelementptr inbounds i8, ptr %.092145, i64 88
  %43 = load ptr, ptr %42, align 8, !tbaa !25
  %.not117 = icmp eq ptr %43, null
  br i1 %.not117, label %44, label %47

44:                                               ; preds = %41
  %45 = getelementptr inbounds i8, ptr %.092145, i64 96
  %46 = load ptr, ptr %45, align 8, !tbaa !26
  %.not118 = icmp eq ptr %46, null
  br i1 %.not118, label %.loopexit132, label %47

47:                                               ; preds = %44, %41
  %48 = tail call ptr @qh_getreplacement(ptr noundef %0, ptr noundef nonnull %.092145) #2
  %.not119 = icmp eq ptr %48, null
  br i1 %.not119, label %49, label %51

49:                                               ; preds = %47
  %50 = load ptr, ptr %30, align 8, !tbaa !19
  br label %51

51:                                               ; preds = %49, %47
  %.095 = phi ptr [ %48, %47 ], [ %50, %49 ]
  %52 = getelementptr inbounds i8, ptr %.095, i64 56
  %53 = load ptr, ptr %52, align 8, !tbaa !27
  %.not120 = icmp eq ptr %53, null
  br i1 %.not120, label %54, label %56

54:                                               ; preds = %51
  %55 = load ptr, ptr %31, align 8, !tbaa !15
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, ptr noundef %55, i32 noundef 6170, ptr noundef nonnull @.str.61) #2
  tail call void @qh_errexit(ptr noundef %0, i32 noundef 7, ptr noundef null, ptr noundef null) #2
  br label %56

56:                                               ; preds = %54, %51
  %57 = load ptr, ptr %42, align 8, !tbaa !25
  %.not121 = icmp eq ptr %57, null
  br i1 %.not121, label %.loopexit134, label %58

58:                                               ; preds = %56
  %59 = tail call i32 @qh_setsize(ptr noundef %0, ptr noundef nonnull %57) #2
  %60 = load i32, ptr %2, align 4, !tbaa !23
  %61 = add nsw i32 %60, %59
  store i32 %61, ptr %2, align 4, !tbaa !23
  %62 = load i32, ptr %32, align 8, !tbaa !28
  %63 = sub nsw i32 %62, %59
  store i32 %63, ptr %32, align 8, !tbaa !28
  %64 = load ptr, ptr %42, align 8, !tbaa !25
  %.not122 = icmp eq ptr %64, null
  br i1 %.not122, label %.loopexit134, label %.preheader133

.preheader133:                                    ; preds = %58
  %.093135 = getelementptr inbounds i8, ptr %64, i64 8
  %65 = load ptr, ptr %.093135, align 8, !tbaa !24
  %.not124136 = icmp eq ptr %65, null
  br i1 %.not124136, label %.loopexit134, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader133, %.lr.ph
  %66 = phi ptr [ %67, %.lr.ph ], [ %65, %.preheader133 ]
  %.093137 = phi ptr [ %.093, %.lr.ph ], [ %.093135, %.preheader133 ]
  tail call void @qh_partitionpoint(ptr noundef %0, ptr noundef nonnull %66, ptr noundef %.095)
  %.093 = getelementptr inbounds i8, ptr %.093137, i64 8
  %67 = load ptr, ptr %.093, align 8, !tbaa !24
  %.not124 = icmp eq ptr %67, null
  br i1 %.not124, label %.loopexit134, label %.lr.ph, !llvm.loop !29

.loopexit134:                                     ; preds = %.lr.ph, %.preheader133, %58, %56
  %68 = getelementptr inbounds i8, ptr %.092145, i64 96
  %69 = load ptr, ptr %68, align 8, !tbaa !26
  %.not125 = icmp eq ptr %69, null
  br i1 %.not125, label %.loopexit132, label %70

70:                                               ; preds = %.loopexit134
  %71 = load i32, ptr %33, align 8, !tbaa !31
  %72 = load i32, ptr %34, align 4, !tbaa !32
  %73 = add i32 %72, %71
  %74 = load i32, ptr %35, align 4, !tbaa !33
  %75 = sub i32 0, %74
  %.not126 = icmp eq i32 %73, %75
  br i1 %.not126, label %.loopexit132, label %76

76:                                               ; preds = %70
  %77 = tail call i32 @qh_setsize(ptr noundef nonnull %0, ptr noundef nonnull %69) #2
  %78 = add nsw i32 %77, %.091144
  %79 = load ptr, ptr %68, align 8, !tbaa !26
  %.not127 = icmp eq ptr %79, null
  br i1 %.not127, label %.loopexit132, label %.preheader131

.preheader131:                                    ; preds = %76
  %.194138 = getelementptr inbounds i8, ptr %79, i64 8
  %80 = load ptr, ptr %.194138, align 8, !tbaa !24
  %.not129139 = icmp eq ptr %80, null
  br i1 %.not129139, label %.loopexit132, label %.lr.ph141

.lr.ph141:                                        ; preds = %.preheader131
  br i1 %.not130, label %.lr.ph141.split.us, label %.lr.ph141.split

.lr.ph141.split.us:                               ; preds = %.lr.ph141, %.lr.ph141.split.us
  %81 = phi ptr [ %83, %.lr.ph141.split.us ], [ %80, %.lr.ph141 ]
  %.194140.us = phi ptr [ %.194.us, %.lr.ph141.split.us ], [ %.194138, %.lr.ph141 ]
  %82 = load i32, ptr %36, align 8, !tbaa !34
  tail call void @qh_partitioncoplanar(ptr noundef nonnull %0, ptr noundef nonnull %81, ptr noundef %.095, ptr noundef null, i32 noundef %82)
  %.194.us = getelementptr inbounds i8, ptr %.194140.us, i64 8
  %83 = load ptr, ptr %.194.us, align 8, !tbaa !24
  %.not129.us = icmp eq ptr %83, null
  br i1 %.not129.us, label %.loopexit132, label %.lr.ph141.split.us, !llvm.loop !35

.lr.ph141.split:                                  ; preds = %.lr.ph141, %.lr.ph141.split
  %84 = phi ptr [ %85, %.lr.ph141.split ], [ %80, %.lr.ph141 ]
  %.194140 = phi ptr [ %.194, %.lr.ph141.split ], [ %.194138, %.lr.ph141 ]
  tail call void @qh_partitionpoint(ptr noundef %0, ptr noundef nonnull %84, ptr noundef %.095)
  %.194 = getelementptr inbounds i8, ptr %.194140, i64 8
  %85 = load ptr, ptr %.194, align 8, !tbaa !24
  %.not129 = icmp eq ptr %85, null
  br i1 %.not129, label %.loopexit132, label %.lr.ph141.split, !llvm.loop !35

.loopexit132:                                     ; preds = %.lr.ph141.split, %.lr.ph141.split.us, %.preheader131, %.loopexit134, %70, %76, %44
  %.1 = phi i32 [ %78, %76 ], [ %.091144, %70 ], [ %.091144, %.loopexit134 ], [ %.091144, %44 ], [ %78, %.preheader131 ], [ %78, %.lr.ph141.split.us ], [ %78, %.lr.ph141.split ]
  %86 = getelementptr inbounds i8, ptr %.092145, i64 56
  %.092 = load ptr, ptr %86, align 8, !tbaa !24
  %.not108 = icmp eq ptr %.092, null
  br i1 %.not108, label %.critedge, label %37, !llvm.loop !36

.critedge:                                        ; preds = %37, %.loopexit132, %28
  %.091.lcssa = phi i32 [ 0, %28 ], [ %.1, %.loopexit132 ], [ %.091144, %37 ]
  %87 = getelementptr inbounds i8, ptr %0, i64 2840
  %88 = load ptr, ptr %87, align 8, !tbaa !37
  %89 = tail call i32 @qh_setsize(ptr noundef %0, ptr noundef %88) #2
  %90 = icmp sgt i32 %89, 0
  br i1 %90, label %91, label %.loopexit

91:                                               ; preds = %.critedge
  %92 = load i32, ptr %4, align 8, !tbaa !5
  %93 = icmp sgt i32 %92, 2
  br i1 %93, label %94, label %102

94:                                               ; preds = %91
  %95 = getelementptr inbounds i8, ptr %0, i64 2424
  %96 = load ptr, ptr %95, align 8, !tbaa !15
  %.not110 = icmp eq i32 %1, 0
  %97 = zext i1 %.not110 to i32
  %98 = getelementptr inbounds i8, ptr %0, i64 2480
  %99 = load ptr, ptr %98, align 8, !tbaa !19
  %100 = getelementptr inbounds i8, ptr %99, i64 108
  %101 = load i32, ptr %100, align 4, !tbaa !17
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %96, i32 noundef 3049, ptr noundef nonnull @.str.62, i32 noundef %89, i32 noundef %97, i32 noundef %101) #2
  br label %102

102:                                              ; preds = %94, %91
  %103 = load ptr, ptr %87, align 8, !tbaa !37
  %.not111 = icmp eq ptr %103, null
  br i1 %.not111, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %102
  %.0149 = getelementptr inbounds i8, ptr %103, i64 8
  %104 = load ptr, ptr %.0149, align 8, !tbaa !24
  %.not112150 = icmp eq ptr %104, null
  br i1 %.not112150, label %.loopexit, label %.lr.ph152

.lr.ph152:                                        ; preds = %.preheader
  %105 = getelementptr inbounds i8, ptr %0, i64 2480
  %106 = getelementptr inbounds i8, ptr %0, i64 2464
  %107 = getelementptr inbounds i8, ptr %0, i64 2424
  %.not116 = icmp eq i32 %1, 0
  br i1 %.not116, label %.lr.ph152.split.us, label %.lr.ph152.split

.lr.ph152.split.us:                               ; preds = %.lr.ph152, %129
  %108 = phi ptr [ %130, %129 ], [ %104, %.lr.ph152 ]
  %.0151.us = phi ptr [ %.0.us, %129 ], [ %.0149, %.lr.ph152 ]
  %109 = getelementptr inbounds i8, ptr %108, i64 16
  %110 = load ptr, ptr %109, align 8, !tbaa !38
  %.not113.us = icmp eq ptr %110, null
  br i1 %.not113.us, label %129, label %111

111:                                              ; preds = %.lr.ph152.split.us
  %112 = getelementptr inbounds i8, ptr %108, i64 40
  %113 = load i8, ptr %112, align 8
  %114 = and i8 %113, 32
  %.not114.us = icmp eq i8 %114, 0
  br i1 %.not114.us, label %115, label %129

115:                                              ; preds = %111
  %116 = load ptr, ptr %105, align 8, !tbaa !19
  %.not115.us = icmp eq ptr %116, null
  br i1 %.not115.us, label %120, label %117

117:                                              ; preds = %115
  %118 = load ptr, ptr %106, align 8, !tbaa !40
  %119 = icmp eq ptr %116, %118
  br i1 %119, label %120, label %124

120:                                              ; preds = %117, %115
  %121 = load ptr, ptr %107, align 8, !tbaa !15
  %122 = getelementptr inbounds i8, ptr %108, i64 32
  %123 = load i32, ptr %122, align 8, !tbaa !41
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %121, i32 noundef 6284, ptr noundef nonnull @.str.63, i32 noundef %123) #2
  tail call void @qh_errexit(ptr noundef nonnull %0, i32 noundef 5, ptr noundef null, ptr noundef null) #2
  %.pre156 = load ptr, ptr %109, align 8, !tbaa !38
  %.pre157 = load ptr, ptr %105, align 8, !tbaa !19
  br label %124

124:                                              ; preds = %120, %117
  %125 = phi ptr [ %.pre157, %120 ], [ %116, %117 ]
  %126 = phi ptr [ %.pre156, %120 ], [ %110, %117 ]
  tail call void @qh_partitioncoplanar(ptr noundef nonnull %0, ptr noundef %126, ptr noundef %125, ptr noundef null, i32 noundef 1)
  %127 = load i8, ptr %112, align 8
  %128 = or i8 %127, 32
  store i8 %128, ptr %112, align 8
  br label %129

129:                                              ; preds = %124, %111, %.lr.ph152.split.us
  %.0.us = getelementptr inbounds i8, ptr %.0151.us, i64 8
  %130 = load ptr, ptr %.0.us, align 8, !tbaa !24
  %.not112.us = icmp eq ptr %130, null
  br i1 %.not112.us, label %.loopexit, label %.lr.ph152.split.us, !llvm.loop !42

.lr.ph152.split:                                  ; preds = %.lr.ph152, %152
  %131 = phi ptr [ %153, %152 ], [ %104, %.lr.ph152 ]
  %.0151 = phi ptr [ %.0, %152 ], [ %.0149, %.lr.ph152 ]
  %132 = getelementptr inbounds i8, ptr %131, i64 16
  %133 = load ptr, ptr %132, align 8, !tbaa !38
  %.not113 = icmp eq ptr %133, null
  br i1 %.not113, label %152, label %134

134:                                              ; preds = %.lr.ph152.split
  %135 = getelementptr inbounds i8, ptr %131, i64 40
  %136 = load i8, ptr %135, align 8
  %137 = and i8 %136, 32
  %.not114 = icmp eq i8 %137, 0
  br i1 %.not114, label %138, label %152

138:                                              ; preds = %134
  %139 = load ptr, ptr %105, align 8, !tbaa !19
  %.not115 = icmp eq ptr %139, null
  br i1 %.not115, label %143, label %140

140:                                              ; preds = %138
  %141 = load ptr, ptr %106, align 8, !tbaa !40
  %142 = icmp eq ptr %139, %141
  br i1 %142, label %143, label %147

143:                                              ; preds = %140, %138
  %144 = load ptr, ptr %107, align 8, !tbaa !15
  %145 = getelementptr inbounds i8, ptr %131, i64 32
  %146 = load i32, ptr %145, align 8, !tbaa !41
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %144, i32 noundef 6284, ptr noundef nonnull @.str.63, i32 noundef %146) #2
  tail call void @qh_errexit(ptr noundef nonnull %0, i32 noundef 5, ptr noundef null, ptr noundef null) #2
  %.pre = load ptr, ptr %132, align 8, !tbaa !38
  %.pre155 = load ptr, ptr %105, align 8, !tbaa !19
  br label %147

147:                                              ; preds = %143, %140
  %148 = phi ptr [ %.pre155, %143 ], [ %139, %140 ]
  %149 = phi ptr [ %.pre, %143 ], [ %133, %140 ]
  tail call void @qh_partitionpoint(ptr noundef nonnull %0, ptr noundef %149, ptr noundef %148)
  %150 = load i8, ptr %135, align 8
  %151 = or i8 %150, 32
  store i8 %151, ptr %135, align 8
  br label %152

152:                                              ; preds = %147, %134, %.lr.ph152.split
  %.0 = getelementptr inbounds i8, ptr %.0151, i64 8
  %153 = load ptr, ptr %.0, align 8, !tbaa !24
  %.not112 = icmp eq ptr %153, null
  br i1 %.not112, label %.loopexit, label %.lr.ph152.split, !llvm.loop !42

.loopexit:                                        ; preds = %152, %129, %.preheader, %102, %.critedge
  %154 = load i32, ptr %4, align 8, !tbaa !5
  %155 = icmp sgt i32 %154, 0
  br i1 %155, label %156, label %160

156:                                              ; preds = %.loopexit
  %157 = getelementptr inbounds i8, ptr %0, i64 2424
  %158 = load ptr, ptr %157, align 8, !tbaa !15
  %159 = load i32, ptr %2, align 4, !tbaa !23
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %158, i32 noundef 1043, ptr noundef nonnull @.str.64, i32 noundef %159, i32 noundef %.091.lcssa, i32 noundef %89) #2
  br label %160

160:                                              ; preds = %156, %.loopexit
  ret void
}

declare i32 @qh_setsize(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

declare ptr @qh_getreplacement(ptr noundef, ptr noundef) local_unnamed_addr #0

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 = !{!6, !11, i64 2488}
!17 = !{!18, !7, i64 108}
!18 = !{!"facetT", !10, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !8, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115}
!19 = !{!6, !11, i64 2480}
!20 = !{!6, !7, i64 240}
!21 = !{!6, !10, i64 24}
!22 = !{!6, !10, i64 2688}
!23 = !{!7, !7, i64 0}
!24 = !{!11, !11, i64 0}
!25 = !{!18, !11, i64 88}
!26 = !{!18, !11, i64 96}
!27 = !{!18, !11, i64 56}
!28 = !{!6, !7, i64 2576}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!6, !7, i64 144}
!32 = !{!6, !7, i64 148}
!33 = !{!6, !7, i64 628}
!34 = !{!6, !7, i64 2712}
!35 = distinct !{!35, !30}
!36 = distinct !{!36, !30}
!37 = !{!6, !11, i64 2840}
!38 = !{!39, !11, i64 16}
!39 = !{!"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, !7, i64 40}
!40 = !{!6, !11, i64 2464}
!41 = !{!39, !7, i64 32}
!42 = distinct !{!42, !30}


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