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

@.str.39 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [110 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

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

declare void @qh_printlists(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local ptr @qh_nextfurthest(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  br label %15

15:                                               ; preds = %367, %356, %141, %104, %71, %2
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.qhT, ptr %16, i32 0, i32 165
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  store ptr %18, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.qhT, ptr %19, i32 0, i32 164
  %21 = load ptr, ptr %20, align 8, !tbaa !17
  %22 = icmp ne ptr %18, %21
  br i1 %22, label %23, label %368

23:                                               ; preds = %15
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %33

26:                                               ; preds = %23
  %27 = load i32, ptr %9, align 4, !tbaa !9
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %9, align 4, !tbaa !9
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.qhT, ptr %29, i32 0, i32 178
  %31 = load i32, ptr %30, align 8, !tbaa !18
  %32 = icmp sgt i32 %27, %31
  br i1 %32, label %33, label %66

33:                                               ; preds = %26, %23
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.qhT, ptr %35, i32 0, i32 158
  %37 = load ptr, ptr %36, align 8, !tbaa !19
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = icmp ne ptr %38, null
  br i1 %39, label %40, label %44

40:                                               ; preds = %33
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.facetT, ptr %41, i32 0, i32 14
  %43 = load i32, ptr %42, align 4, !tbaa !20
  br label %45

44:                                               ; preds = %33
  br label %45

45:                                               ; preds = %44, %40
  %46 = phi i32 [ %43, %40 ], [ -1, %44 ]
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.qhT, ptr %47, i32 0, i32 164
  %49 = load ptr, ptr %48, align 8, !tbaa !17
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %57

51:                                               ; preds = %45
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.qhT, ptr %52, i32 0, i32 164
  %54 = load ptr, ptr %53, align 8, !tbaa !17
  %55 = getelementptr inbounds %struct.facetT, ptr %54, i32 0, i32 14
  %56 = load i32, ptr %55, align 4, !tbaa !20
  br label %58

57:                                               ; preds = %45
  br label %58

58:                                               ; preds = %57, %51
  %59 = phi i32 [ %56, %51 ], [ -1, %57 ]
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %34, ptr noundef %37, i32 noundef 6406, ptr noundef @.str.39, i32 noundef %46, i32 noundef %59)
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  call void @qh_printlists(ptr noundef %60)
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.qhT, ptr %63, i32 0, i32 164
  %65 = load ptr, ptr %64, align 8, !tbaa !17
  call void @qh_errexit2(ptr noundef %61, i32 noundef 5, ptr noundef %62, ptr noundef %65)
  br label %66

66:                                               ; preds = %58, %26
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.facetT, ptr %67, i32 0, i32 11
  %69 = load ptr, ptr %68, align 8, !tbaa !22
  %70 = icmp ne ptr %69, null
  br i1 %70, label %77, label %71

71:                                               ; preds = %66
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.facetT, ptr %72, i32 0, i32 7
  %74 = load ptr, ptr %73, align 8, !tbaa !23
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.qhT, ptr %75, i32 0, i32 165
  store ptr %74, ptr %76, align 8, !tbaa !11
  br label %15, !llvm.loop !24

77:                                               ; preds = %66
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.facetT, ptr %78, i32 0, i32 11
  %80 = load ptr, ptr %79, align 8, !tbaa !22
  %81 = getelementptr inbounds %struct.setT, ptr %80, i32 0, i32 1
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.facetT, ptr %82, i32 0, i32 11
  %84 = load ptr, ptr %83, align 8, !tbaa !22
  %85 = getelementptr inbounds %struct.setT, ptr %84, i32 0, i32 0
  %86 = load i32, ptr %85, align 8, !tbaa !26
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [1 x %union.setelemT], ptr %81, i64 0, i64 %87
  %89 = load i32, ptr %88, align 8, !tbaa !28
  store i32 %89, ptr %7, align 4, !tbaa !9
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %94

91:                                               ; preds = %77
  %92 = load i32, ptr %7, align 4, !tbaa !9
  %93 = add nsw i32 %92, -1
  store i32 %93, ptr %7, align 4, !tbaa !9
  br label %100

94:                                               ; preds = %77
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.facetT, ptr %95, i32 0, i32 11
  %97 = load ptr, ptr %96, align 8, !tbaa !22
  %98 = getelementptr inbounds %struct.setT, ptr %97, i32 0, i32 0
  %99 = load i32, ptr %98, align 8, !tbaa !26
  store i32 %99, ptr %7, align 4, !tbaa !9
  br label %100

100:                                              ; preds = %94, %91
  %101 = phi i32 [ %93, %91 ], [ %99, %94 ]
  %102 = load i32, ptr %7, align 4, !tbaa !9
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %113, label %104

104:                                              ; preds = %100
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.facetT, ptr %106, i32 0, i32 11
  call void @qh_setfree(ptr noundef %105, ptr noundef %107)
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.facetT, ptr %108, i32 0, i32 7
  %110 = load ptr, ptr %109, align 8, !tbaa !23
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.qhT, ptr %111, i32 0, i32 165
  store ptr %110, ptr %112, align 8, !tbaa !11
  br label %15, !llvm.loop !24

113:                                              ; preds = %100
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.qhT, ptr %114, i32 0, i32 150
  %116 = load i32, ptr %115, align 8, !tbaa !29
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %148

118:                                              ; preds = %113
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.facetT, ptr %119, i32 0, i32 15
  %121 = load i32, ptr %120, align 8
  %122 = lshr i32 %121, 18
  %123 = and i32 %122, 1
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %125, label %128

125:                                              ; preds = %118
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_furthestout(ptr noundef %126, ptr noundef %127)
  br label %128

128:                                              ; preds = %125, %118
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.facetT, ptr %129, i32 0, i32 11
  %131 = load ptr, ptr %130, align 8, !tbaa !22
  %132 = call ptr @qh_setlast(ptr noundef %131)
  store ptr %132, ptr %12, align 8, !tbaa !5
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.facetT, ptr %133, i32 0, i32 0
  %135 = load double, ptr %134, align 8, !tbaa !30
  store double %135, ptr %11, align 8, !tbaa !31
  %136 = load double, ptr %11, align 8, !tbaa !31
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.qhT, ptr %137, i32 0, i32 6
  %139 = load double, ptr %138, align 8, !tbaa !32
  %140 = fcmp olt double %136, %139
  br i1 %140, label %141, label %147

141:                                              ; preds = %128
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.facetT, ptr %142, i32 0, i32 7
  %144 = load ptr, ptr %143, align 8, !tbaa !23
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.qhT, ptr %145, i32 0, i32 165
  store ptr %144, ptr %146, align 8, !tbaa !11
  br label %15, !llvm.loop !24

147:                                              ; preds = %128
  br label %148

148:                                              ; preds = %147, %113
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.qhT, ptr %149, i32 0, i32 76
  %151 = load i32, ptr %150, align 8, !tbaa !33
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %175, label %153

153:                                              ; preds = %148
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.qhT, ptr %154, i32 0, i32 102
  %156 = load i32, ptr %155, align 8, !tbaa !34
  %157 = icmp ne i32 %156, 0
  br i1 %157, label %175, label %158

158:                                              ; preds = %153
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.qhT, ptr %159, i32 0, i32 50
  %161 = load i32, ptr %160, align 4, !tbaa !35
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %163, label %168

163:                                              ; preds = %158
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  call void @qh_furthestnext(ptr noundef %164)
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.qhT, ptr %165, i32 0, i32 165
  %167 = load ptr, ptr %166, align 8, !tbaa !11
  store ptr %167, ptr %6, align 8, !tbaa !5
  br label %168

168:                                              ; preds = %163, %158
  %169 = load ptr, ptr %6, align 8, !tbaa !5
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %169, ptr %170, align 8, !tbaa !5
  %171 = load ptr, ptr %6, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.facetT, ptr %171, i32 0, i32 11
  %173 = load ptr, ptr %172, align 8, !tbaa !22
  %174 = call ptr @qh_setdellast(ptr noundef %173)
  store ptr %174, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %369

175:                                              ; preds = %153, %148
  %176 = load ptr, ptr %4, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.qhT, ptr %176, i32 0, i32 76
  %178 = load i32, ptr %177, align 8, !tbaa !33
  %179 = icmp ne i32 %178, 0
  br i1 %179, label %180, label %336

180:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !9
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.qhT, ptr %181, i32 0, i32 150
  %183 = load i32, ptr %182, align 8, !tbaa !29
  %184 = icmp ne i32 %183, 0
  br i1 %184, label %185, label %225

185:                                              ; preds = %180
  %186 = load ptr, ptr %4, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.qhT, ptr %186, i32 0, i32 163
  %188 = load ptr, ptr %187, align 8, !tbaa !36
  store ptr %188, ptr %6, align 8, !tbaa !5
  br label %189

189:                                              ; preds = %220, %185
  %190 = load ptr, ptr %6, align 8, !tbaa !5
  %191 = icmp ne ptr %190, null
  br i1 %191, label %192, label %197

192:                                              ; preds = %189
  %193 = load ptr, ptr %6, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.facetT, ptr %193, i32 0, i32 7
  %195 = load ptr, ptr %194, align 8, !tbaa !23
  %196 = icmp ne ptr %195, null
  br label %197

197:                                              ; preds = %192, %189
  %198 = phi i1 [ false, %189 ], [ %196, %192 ]
  br i1 %198, label %199, label %224

199:                                              ; preds = %197
  %200 = load ptr, ptr %6, align 8, !tbaa !5
  %201 = load ptr, ptr %4, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.qhT, ptr %201, i32 0, i32 165
  %203 = load ptr, ptr %202, align 8, !tbaa !11
  %204 = icmp eq ptr %200, %203
  br i1 %204, label %205, label %206

205:                                              ; preds = %199
  br label %224

206:                                              ; preds = %199
  %207 = load ptr, ptr %6, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.facetT, ptr %207, i32 0, i32 11
  %209 = load ptr, ptr %208, align 8, !tbaa !22
  %210 = icmp ne ptr %209, null
  br i1 %210, label %211, label %219

211:                                              ; preds = %206
  %212 = load ptr, ptr %4, align 8, !tbaa !5
  %213 = load ptr, ptr %6, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.facetT, ptr %213, i32 0, i32 11
  %215 = load ptr, ptr %214, align 8, !tbaa !22
  %216 = call i32 @qh_setsize(ptr noundef %212, ptr noundef %215)
  %217 = load i32, ptr %14, align 4, !tbaa !9
  %218 = add nsw i32 %217, %216
  store i32 %218, ptr %14, align 4, !tbaa !9
  br label %219

219:                                              ; preds = %211, %206
  br label %220

220:                                              ; preds = %219
  %221 = load ptr, ptr %6, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.facetT, ptr %221, i32 0, i32 7
  %223 = load ptr, ptr %222, align 8, !tbaa !23
  store ptr %223, ptr %6, align 8, !tbaa !5
  br label %189, !llvm.loop !37

224:                                              ; preds = %205, %197
  br label %225

225:                                              ; preds = %224, %180
  %226 = load ptr, ptr %4, align 8, !tbaa !5
  %227 = call i32 @qh_rand(ptr noundef %226)
  %228 = sitofp i32 %227 to double
  store double %228, ptr %10, align 8, !tbaa !31
  %229 = load double, ptr %10, align 8, !tbaa !31
  %230 = fdiv double %229, 0x41DFFFFFFFC00000
  store double %230, ptr %10, align 8, !tbaa !31
  %231 = load ptr, ptr %4, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.qhT, ptr %231, i32 0, i32 180
  %233 = load i32, ptr %232, align 8, !tbaa !38
  %234 = load i32, ptr %14, align 4, !tbaa !9
  %235 = sub nsw i32 %233, %234
  %236 = sitofp i32 %235 to double
  %237 = load double, ptr %10, align 8, !tbaa !31
  %238 = fmul double %236, %237
  %239 = call double @llvm.floor.f64(double %238)
  store double %239, ptr %10, align 8, !tbaa !31
  %240 = load double, ptr %10, align 8, !tbaa !31
  %241 = fptosi double %240 to i32
  store i32 %241, ptr %8, align 4, !tbaa !9
  %242 = load ptr, ptr %4, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.qhT, ptr %242, i32 0, i32 165
  %244 = load ptr, ptr %243, align 8, !tbaa !11
  %245 = icmp ne ptr %244, null
  br i1 %245, label %246, label %321

246:                                              ; preds = %225
  %247 = load ptr, ptr %4, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.qhT, ptr %247, i32 0, i32 165
  %249 = load ptr, ptr %248, align 8, !tbaa !11
  store ptr %249, ptr %6, align 8, !tbaa !5
  br label %250

250:                                              ; preds = %316, %246
  %251 = load ptr, ptr %6, align 8, !tbaa !5
  %252 = icmp ne ptr %251, null
  br i1 %252, label %253, label %258

253:                                              ; preds = %250
  %254 = load ptr, ptr %6, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.facetT, ptr %254, i32 0, i32 7
  %256 = load ptr, ptr %255, align 8, !tbaa !23
  %257 = icmp ne ptr %256, null
  br label %258

258:                                              ; preds = %253, %250
  %259 = phi i1 [ false, %250 ], [ %257, %253 ]
  br i1 %259, label %260, label %320

260:                                              ; preds = %258
  %261 = load ptr, ptr %6, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.facetT, ptr %261, i32 0, i32 11
  %263 = load ptr, ptr %262, align 8, !tbaa !22
  %264 = icmp ne ptr %263, null
  br i1 %264, label %265, label %315

265:                                              ; preds = %260
  %266 = load ptr, ptr %6, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.facetT, ptr %266, i32 0, i32 11
  %268 = load ptr, ptr %267, align 8, !tbaa !22
  %269 = getelementptr inbounds %struct.setT, ptr %268, i32 0, i32 1
  %270 = load ptr, ptr %6, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.facetT, ptr %270, i32 0, i32 11
  %272 = load ptr, ptr %271, align 8, !tbaa !22
  %273 = getelementptr inbounds %struct.setT, ptr %272, i32 0, i32 0
  %274 = load i32, ptr %273, align 8, !tbaa !26
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds [1 x %union.setelemT], ptr %269, i64 0, i64 %275
  %277 = load i32, ptr %276, align 8, !tbaa !28
  store i32 %277, ptr %7, align 4, !tbaa !9
  %278 = icmp ne i32 %277, 0
  br i1 %278, label %279, label %282

279:                                              ; preds = %265
  %280 = load i32, ptr %7, align 4, !tbaa !9
  %281 = add nsw i32 %280, -1
  store i32 %281, ptr %7, align 4, !tbaa !9
  br label %288

282:                                              ; preds = %265
  %283 = load ptr, ptr %6, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.facetT, ptr %283, i32 0, i32 11
  %285 = load ptr, ptr %284, align 8, !tbaa !22
  %286 = getelementptr inbounds %struct.setT, ptr %285, i32 0, i32 0
  %287 = load i32, ptr %286, align 8, !tbaa !26
  store i32 %287, ptr %7, align 4, !tbaa !9
  br label %288

288:                                              ; preds = %282, %279
  %289 = phi i32 [ %281, %279 ], [ %287, %282 ]
  %290 = load i32, ptr %7, align 4, !tbaa !9
  %291 = icmp ne i32 %290, 0
  br i1 %291, label %296, label %292

292:                                              ; preds = %288
  %293 = load ptr, ptr %4, align 8, !tbaa !5
  %294 = load ptr, ptr %6, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.facetT, ptr %294, i32 0, i32 11
  call void @qh_setfree(ptr noundef %293, ptr noundef %295)
  br label %314

296:                                              ; preds = %288
  %297 = load i32, ptr %7, align 4, !tbaa !9
  %298 = load i32, ptr %8, align 4, !tbaa !9
  %299 = icmp sgt i32 %297, %298
  br i1 %299, label %300, label %309

300:                                              ; preds = %296
  %301 = load ptr, ptr %6, align 8, !tbaa !5
  %302 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %301, ptr %302, align 8, !tbaa !5
  %303 = load ptr, ptr %4, align 8, !tbaa !5
  %304 = load ptr, ptr %6, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.facetT, ptr %304, i32 0, i32 11
  %306 = load ptr, ptr %305, align 8, !tbaa !22
  %307 = load i32, ptr %8, align 4, !tbaa !9
  %308 = call ptr @qh_setdelnth(ptr noundef %303, ptr noundef %306, i32 noundef %307)
  store ptr %308, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %333

309:                                              ; preds = %296
  %310 = load i32, ptr %7, align 4, !tbaa !9
  %311 = load i32, ptr %8, align 4, !tbaa !9
  %312 = sub nsw i32 %311, %310
  store i32 %312, ptr %8, align 4, !tbaa !9
  br label %313

313:                                              ; preds = %309
  br label %314

314:                                              ; preds = %313, %292
  br label %315

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

316:                                              ; preds = %315
  %317 = load ptr, ptr %6, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.facetT, ptr %317, i32 0, i32 7
  %319 = load ptr, ptr %318, align 8, !tbaa !23
  store ptr %319, ptr %6, align 8, !tbaa !5
  br label %250, !llvm.loop !39

320:                                              ; preds = %258
  br label %321

321:                                              ; preds = %320, %225
  %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 !19
  %326 = load ptr, ptr %4, align 8, !tbaa !5
  %327 = getelementptr inbounds %struct.qhT, ptr %326, i32 0, i32 180
  %328 = load i32, ptr %327, align 8, !tbaa !38
  %329 = load i32, ptr %8, align 4, !tbaa !9
  %330 = add nsw i32 %329, 1
  %331 = load double, ptr %10, align 8, !tbaa !31
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %322, ptr noundef %325, i32 noundef 6169, ptr noundef @.str.40, i32 noundef %328, i32 noundef %330, double noundef %331)
  %332 = load ptr, ptr %4, align 8, !tbaa !5
  call void @qh_errexit(ptr noundef %332, i32 noundef 5, ptr noundef null, ptr noundef null)
  store i32 0, ptr %13, align 4
  br label %333

333:                                              ; preds = %321, %300
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  %334 = load i32, ptr %13, align 4
  switch i32 %334, label %369 [
    i32 0, label %335
  ]

335:                                              ; preds = %333
  br label %367

336:                                              ; preds = %175
  %337 = load ptr, ptr %4, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.qhT, ptr %337, i32 0, i32 164
  %339 = load ptr, ptr %338, align 8, !tbaa !17
  %340 = getelementptr inbounds %struct.facetT, ptr %339, i32 0, i32 6
  %341 = load ptr, ptr %340, align 8, !tbaa !40
  store ptr %341, ptr %6, align 8, !tbaa !5
  %342 = load ptr, ptr %6, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.facetT, ptr %342, i32 0, i32 11
  %344 = load ptr, ptr %343, align 8, !tbaa !22
  %345 = call ptr @qh_setdellast(ptr noundef %344)
  store ptr %345, ptr %12, align 8, !tbaa !5
  %346 = icmp ne ptr %345, null
  br i1 %346, label %363, label %347

347:                                              ; preds = %336
  %348 = load ptr, ptr %6, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.facetT, ptr %348, i32 0, i32 11
  %350 = load ptr, ptr %349, align 8, !tbaa !22
  %351 = icmp ne ptr %350, null
  br i1 %351, label %352, label %356

352:                                              ; preds = %347
  %353 = load ptr, ptr %4, align 8, !tbaa !5
  %354 = load ptr, ptr %6, align 8, !tbaa !5
  %355 = getelementptr inbounds %struct.facetT, ptr %354, i32 0, i32 11
  call void @qh_setfree(ptr noundef %353, ptr noundef %355)
  br label %356

356:                                              ; preds = %352, %347
  %357 = load ptr, ptr %4, align 8, !tbaa !5
  %358 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_removefacet(ptr noundef %357, ptr noundef %358)
  %359 = load ptr, ptr %4, align 8, !tbaa !5
  %360 = load ptr, ptr %6, align 8, !tbaa !5
  %361 = load ptr, ptr %4, align 8, !tbaa !5
  %362 = getelementptr inbounds %struct.qhT, ptr %361, i32 0, i32 163
  call void @qh_prependfacet(ptr noundef %359, ptr noundef %360, ptr noundef %362)
  br label %15, !llvm.loop !24

363:                                              ; preds = %336
  %364 = load ptr, ptr %6, align 8, !tbaa !5
  %365 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %364, ptr %365, align 8, !tbaa !5
  %366 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %366, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %369

367:                                              ; preds = %335
  br label %15, !llvm.loop !24

368:                                              ; preds = %15
  store ptr null, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %369

369:                                              ; preds = %368, %363, %333, %168
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %370 = load ptr, ptr %3, align 8
  ret ptr %370
}

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

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

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

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

declare ptr @qh_setlast(ptr noundef) #1

declare void @qh_furthestnext(ptr noundef) #1

declare ptr @qh_setdellast(ptr noundef) #1

declare i32 @qh_rand(ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.floor.f64(double) #3

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

declare void @qh_prependfacet(ptr noundef, 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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, !6, i64 2472}
!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 2464}
!18 = !{!12, !10, i64 2568}
!19 = !{!12, !6, i64 2424}
!20 = !{!21, !10, i64 108}
!21 = !{!"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}
!22 = !{!21, !6, i64 88}
!23 = !{!21, !6, i64 56}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!27, !10, i64 0}
!27 = !{!"setT", !10, i64 0, !7, i64 8}
!28 = !{!7, !7, i64 0}
!29 = !{!12, !10, i64 1912}
!30 = !{!21, !13, i64 0}
!31 = !{!13, !13, i64 0}
!32 = !{!12, !13, i64 24}
!33 = !{!12, !10, i64 472}
!34 = !{!12, !10, i64 584}
!35 = !{!12, !10, i64 244}
!36 = !{!12, !6, i64 2456}
!37 = distinct !{!37, !25}
!38 = !{!12, !10, i64 2576}
!39 = distinct !{!39, !25}
!40 = !{!21, !6, i64 48}


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

%union.setelemT = type { ptr }

@.str.39 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [110 x i8], align 1

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

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

declare void @qh_printlists(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local ptr @qh_nextfurthest(ptr noundef %0, ptr nocapture noundef writeonly %1) local_unnamed_addr #1 {
  %3 = getelementptr inbounds i8, ptr %0, i64 2472
  %4 = getelementptr inbounds i8, ptr %0, i64 2464
  %5 = load ptr, ptr %3, align 8, !tbaa !5
  %6 = load ptr, ptr %4, align 8, !tbaa !15
  %.not183 = icmp eq ptr %5, %6
  br i1 %.not183, label %.loopexit160, label %.lr.ph185

.lr.ph185:                                        ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 2568
  %.in = getelementptr inbounds i8, ptr %0, i64 2424
  %8 = getelementptr inbounds i8, ptr %0, i64 1912
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = getelementptr inbounds i8, ptr %0, i64 472
  %11 = getelementptr inbounds i8, ptr %0, i64 2456
  %12 = getelementptr inbounds i8, ptr %0, i64 2576
  %13 = getelementptr inbounds i8, ptr %0, i64 584
  br label %14

14:                                               ; preds = %.lr.ph185, %.backedge
  %15 = phi ptr [ %6, %.lr.ph185 ], [ %39, %.backedge ]
  %16 = phi ptr [ %5, %.lr.ph185 ], [ %38, %.backedge ]
  %.0111184 = phi i32 [ 0, %.lr.ph185 ], [ %.2113, %.backedge ]
  %.not131 = icmp eq ptr %16, null
  br i1 %.not131, label %.thread, label %17

17:                                               ; preds = %14
  %18 = add nsw i32 %.0111184, 1
  %19 = load i32, ptr %7, align 8, !tbaa !16
  %20 = icmp sgt i32 %.0111184, %19
  br i1 %20, label %21, label %32

21:                                               ; preds = %17
  %22 = getelementptr inbounds i8, ptr %16, i64 108
  %23 = load i32, ptr %22, align 4, !tbaa !17
  br label %.thread

.thread:                                          ; preds = %14, %21
  %.1112155 = phi i32 [ %18, %21 ], [ %.0111184, %14 ]
  %24 = phi i32 [ %23, %21 ], [ -1, %14 ]
  %25 = load ptr, ptr %.in, align 8, !tbaa !19
  %.not132 = icmp eq ptr %15, null
  br i1 %.not132, label %29, label %26

26:                                               ; preds = %.thread
  %27 = getelementptr inbounds i8, ptr %15, i64 108
  %28 = load i32, ptr %27, align 4, !tbaa !17
  br label %29

29:                                               ; preds = %.thread, %26
  %30 = phi i32 [ %28, %26 ], [ -1, %.thread ]
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %25, i32 noundef 6406, ptr noundef nonnull @.str.39, i32 noundef %24, i32 noundef %30) #3
  tail call void @qh_printlists(ptr noundef nonnull %0) #3
  %31 = load ptr, ptr %4, align 8, !tbaa !15
  tail call void @qh_errexit2(ptr noundef nonnull %0, i32 noundef 5, ptr noundef %16, ptr noundef %31)
  br label %32

32:                                               ; preds = %29, %17
  %.2113 = phi i32 [ %.1112155, %29 ], [ %18, %17 ]
  %33 = getelementptr inbounds i8, ptr %16, i64 88
  %34 = load ptr, ptr %33, align 8, !tbaa !20
  %.not133 = icmp eq ptr %34, null
  br i1 %.not133, label %35, label %40

35:                                               ; preds = %32
  %36 = getelementptr inbounds i8, ptr %16, i64 56
  %37 = load ptr, ptr %36, align 8, !tbaa !21
  store ptr %37, ptr %3, align 8, !tbaa !5
  br label %.backedge

.backedge:                                        ; preds = %35, %47, %63, %138, %.loopexit
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = load ptr, ptr %4, align 8, !tbaa !15
  %.not = icmp eq ptr %38, %39
  br i1 %.not, label %.loopexit160, label %14, !llvm.loop !22

40:                                               ; preds = %32
  %41 = getelementptr inbounds i8, ptr %34, i64 8
  %42 = load i32, ptr %34, align 8, !tbaa !24
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [1 x %union.setelemT], ptr %41, i64 0, i64 %43
  %45 = load i32, ptr %44, align 8, !tbaa !26
  %.not134 = icmp eq i32 %45, 0
  %46 = add nsw i32 %45, -1
  %.0117 = select i1 %.not134, i32 %42, i32 %46
  %.not135 = icmp eq i32 %.0117, 0
  br i1 %.not135, label %47, label %50

47:                                               ; preds = %40
  tail call void @qh_setfree(ptr noundef nonnull %0, ptr noundef nonnull %33) #3
  %48 = getelementptr inbounds i8, ptr %16, i64 56
  %49 = load ptr, ptr %48, align 8, !tbaa !21
  store ptr %49, ptr %3, align 8, !tbaa !5
  br label %.backedge

50:                                               ; preds = %40
  %51 = load i32, ptr %8, align 8, !tbaa !27
  %.not136 = icmp eq i32 %51, 0
  br i1 %.not136, label %66, label %52

52:                                               ; preds = %50
  %53 = getelementptr inbounds i8, ptr %16, i64 112
  %54 = load i32, ptr %53, align 8
  %55 = and i32 %54, 262144
  %.not137 = icmp eq i32 %55, 0
  br i1 %.not137, label %57, label %56

56:                                               ; preds = %52
  tail call void @qh_furthestout(ptr noundef nonnull %0, ptr noundef nonnull %16) #3
  %.pre = load ptr, ptr %33, align 8, !tbaa !20
  br label %57

57:                                               ; preds = %56, %52
  %58 = phi ptr [ %.pre, %56 ], [ %34, %52 ]
  %59 = tail call ptr @qh_setlast(ptr noundef %58) #3
  %60 = load double, ptr %16, align 8, !tbaa !28
  %61 = load double, ptr %9, align 8, !tbaa !29
  %62 = fcmp olt double %60, %61
  br i1 %62, label %63, label %66

63:                                               ; preds = %57
  %64 = getelementptr inbounds i8, ptr %16, i64 56
  %65 = load ptr, ptr %64, align 8, !tbaa !21
  store ptr %65, ptr %3, align 8, !tbaa !5
  br label %.backedge

66:                                               ; preds = %57, %50
  %67 = load i32, ptr %10, align 8, !tbaa !30
  %.not138 = icmp eq i32 %67, 0
  br i1 %.not138, label %68, label %79

68:                                               ; preds = %66
  %69 = load i32, ptr %13, align 8, !tbaa !31
  %.not139 = icmp eq i32 %69, 0
  br i1 %.not139, label %70, label %128

70:                                               ; preds = %68
  %71 = getelementptr inbounds i8, ptr %0, i64 244
  %72 = load i32, ptr %71, align 4, !tbaa !32
  %.not140 = icmp eq i32 %72, 0
  br i1 %.not140, label %75, label %73

73:                                               ; preds = %70
  tail call void @qh_furthestnext(ptr noundef nonnull %0) #3
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  br label %75

75:                                               ; preds = %73, %70
  %.0119 = phi ptr [ %74, %73 ], [ %16, %70 ]
  store ptr %.0119, ptr %1, align 8, !tbaa !33
  %76 = getelementptr inbounds i8, ptr %.0119, i64 88
  %77 = load ptr, ptr %76, align 8, !tbaa !20
  %78 = tail call ptr @qh_setdellast(ptr noundef %77) #3
  br label %.loopexit160

79:                                               ; preds = %66
  %80 = load i32, ptr %8, align 8, !tbaa !27
  %.not144 = icmp eq i32 %80, 0
  br i1 %.not144, label %.critedge, label %81

81:                                               ; preds = %79
  %.1120173 = load ptr, ptr %11, align 8, !tbaa !33
  %.not145174 = icmp eq ptr %.1120173, null
  br i1 %.not145174, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %81, %93
  %.1120176 = phi ptr [ %.1120, %93 ], [ %.1120173, %81 ]
  %.0175 = phi i32 [ %.1, %93 ], [ 0, %81 ]
  %82 = getelementptr inbounds i8, ptr %.1120176, i64 56
  %83 = load ptr, ptr %82, align 8, !tbaa !33
  %.not146 = icmp eq ptr %83, null
  br i1 %.not146, label %.critedge, label %84

84:                                               ; preds = %.lr.ph
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = icmp eq ptr %.1120176, %85
  br i1 %86, label %.critedge, label %87

87:                                               ; preds = %84
  %88 = getelementptr inbounds i8, ptr %.1120176, i64 88
  %89 = load ptr, ptr %88, align 8, !tbaa !20
  %.not147 = icmp eq ptr %89, null
  br i1 %.not147, label %93, label %90

90:                                               ; preds = %87
  %91 = tail call i32 @qh_setsize(ptr noundef nonnull %0, ptr noundef nonnull %89) #3
  %92 = add nsw i32 %91, %.0175
  %.1120.pre = load ptr, ptr %82, align 8, !tbaa !33
  br label %93

93:                                               ; preds = %87, %90
  %.1120 = phi ptr [ %.1120.pre, %90 ], [ %83, %87 ]
  %.1 = phi i32 [ %92, %90 ], [ %.0175, %87 ]
  %.not145 = icmp eq ptr %.1120, null
  br i1 %.not145, label %.critedge, label %.lr.ph, !llvm.loop !34

.critedge:                                        ; preds = %93, %84, %.lr.ph, %81, %79
  %.2 = phi i32 [ 0, %79 ], [ 0, %81 ], [ %.1, %93 ], [ %.0175, %84 ], [ %.0175, %.lr.ph ]
  %94 = tail call i32 @qh_rand(ptr noundef nonnull %0) #3
  %95 = sitofp i32 %94 to double
  %96 = fdiv double %95, 0x41DFFFFFFFC00000
  %97 = load i32, ptr %12, align 8, !tbaa !35
  %98 = sub nsw i32 %97, %.2
  %99 = sitofp i32 %98 to double
  %100 = fmul double %96, %99
  %101 = tail call double @llvm.floor.f64(double %100)
  %102 = fptosi double %101 to i32
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %.not148 = icmp eq ptr %103, null
  br i1 %.not148, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %.critedge, %123
  %.0114182 = phi i32 [ %.1115, %123 ], [ %102, %.critedge ]
  %.2121181 = phi ptr [ %124, %123 ], [ %103, %.critedge ]
  %104 = getelementptr inbounds i8, ptr %.2121181, i64 56
  %105 = load ptr, ptr %104, align 8, !tbaa !21
  %.not150 = icmp eq ptr %105, null
  br i1 %.not150, label %.loopexit.loopexit, label %106

106:                                              ; preds = %.preheader
  %107 = getelementptr inbounds i8, ptr %.2121181, i64 88
  %108 = load ptr, ptr %107, align 8, !tbaa !20
  %.not151 = icmp eq ptr %108, null
  br i1 %.not151, label %123, label %109

109:                                              ; preds = %106
  %110 = getelementptr inbounds i8, ptr %108, i64 8
  %111 = load i32, ptr %108, align 8, !tbaa !24
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [1 x %union.setelemT], ptr %110, i64 0, i64 %112
  %114 = load i32, ptr %113, align 8, !tbaa !26
  %.not152 = icmp eq i32 %114, 0
  %115 = add nsw i32 %114, -1
  %.1118 = select i1 %.not152, i32 %111, i32 %115
  %.not153 = icmp eq i32 %.1118, 0
  br i1 %.not153, label %116, label %117

116:                                              ; preds = %109
  tail call void @qh_setfree(ptr noundef %0, ptr noundef nonnull %107) #3
  %.pre195 = load ptr, ptr %104, align 8, !tbaa !21
  br label %123

117:                                              ; preds = %109
  %118 = icmp sgt i32 %.1118, %.0114182
  br i1 %118, label %.thread157, label %121

.thread157:                                       ; preds = %117
  store ptr %.2121181, ptr %1, align 8, !tbaa !33
  %119 = load ptr, ptr %107, align 8, !tbaa !20
  %120 = tail call ptr @qh_setdelnth(ptr noundef %0, ptr noundef %119, i32 noundef %.0114182) #3
  br label %.loopexit160

121:                                              ; preds = %117
  %122 = sub nsw i32 %.0114182, %.1118
  br label %123

123:                                              ; preds = %106, %121, %116
  %124 = phi ptr [ %105, %121 ], [ %.pre195, %116 ], [ %105, %106 ]
  %.1115 = phi i32 [ %122, %121 ], [ %.0114182, %116 ], [ %.0114182, %106 ]
  %.not149 = icmp eq ptr %124, null
  br i1 %.not149, label %.loopexit.loopexit, label %.preheader, !llvm.loop !36

.loopexit.loopexit:                               ; preds = %.preheader, %123
  %.2116.ph = phi i32 [ %.1115, %123 ], [ %.0114182, %.preheader ]
  %.pre196 = load i32, ptr %12, align 8, !tbaa !35
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.critedge
  %125 = phi i32 [ %97, %.critedge ], [ %.pre196, %.loopexit.loopexit ]
  %.2116 = phi i32 [ %102, %.critedge ], [ %.2116.ph, %.loopexit.loopexit ]
  %126 = load ptr, ptr %.in, align 8, !tbaa !19
  %127 = add nsw i32 %.2116, 1
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %126, i32 noundef 6169, ptr noundef nonnull @.str.40, i32 noundef %125, i32 noundef %127, double noundef %101) #3
  tail call void @qh_errexit(ptr noundef nonnull %0, i32 noundef 5, ptr noundef null, ptr noundef null) #3
  br label %.backedge

128:                                              ; preds = %68
  %129 = load ptr, ptr %4, align 8, !tbaa !15
  %130 = getelementptr inbounds i8, ptr %129, i64 48
  %131 = load ptr, ptr %130, align 8, !tbaa !37
  %132 = getelementptr inbounds i8, ptr %131, i64 88
  %133 = load ptr, ptr %132, align 8, !tbaa !20
  %134 = tail call ptr @qh_setdellast(ptr noundef %133) #3
  %.not142 = icmp eq ptr %134, null
  br i1 %.not142, label %135, label %139

135:                                              ; preds = %128
  %136 = load ptr, ptr %132, align 8, !tbaa !20
  %.not143 = icmp eq ptr %136, null
  br i1 %.not143, label %138, label %137

137:                                              ; preds = %135
  tail call void @qh_setfree(ptr noundef nonnull %0, ptr noundef nonnull %132) #3
  br label %138

138:                                              ; preds = %137, %135
  tail call void @qh_removefacet(ptr noundef nonnull %0, ptr noundef nonnull %131) #3
  tail call void @qh_prependfacet(ptr noundef nonnull %0, ptr noundef nonnull %131, ptr noundef nonnull %11) #3
  br label %.backedge

139:                                              ; preds = %128
  store ptr %131, ptr %1, align 8, !tbaa !33
  br label %.loopexit160

.loopexit160:                                     ; preds = %.backedge, %2, %.thread157, %139, %75
  %.2110 = phi ptr [ %134, %139 ], [ %78, %75 ], [ %120, %.thread157 ], [ null, %2 ], [ null, %.backedge ]
  ret ptr %.2110
}

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

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

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

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

declare ptr @qh_setlast(ptr noundef) local_unnamed_addr #0

declare void @qh_furthestnext(ptr noundef) local_unnamed_addr #0

declare ptr @qh_setdellast(ptr noundef) local_unnamed_addr #0

declare i32 @qh_rand(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.floor.f64(double) #2

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

declare void @qh_prependfacet(ptr noundef, 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !11, i64 2472}
!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 2464}
!16 = !{!6, !7, i64 2568}
!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 2424}
!20 = !{!18, !11, i64 88}
!21 = !{!18, !11, i64 56}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !7, i64 0}
!25 = !{!"setT", !7, i64 0, !8, i64 8}
!26 = !{!8, !8, i64 0}
!27 = !{!6, !7, i64 1912}
!28 = !{!18, !10, i64 0}
!29 = !{!6, !10, i64 24}
!30 = !{!6, !7, i64 472}
!31 = !{!6, !7, i64 584}
!32 = !{!6, !7, i64 244}
!33 = !{!11, !11, i64 0}
!34 = distinct !{!34, !23}
!35 = !{!6, !7, i64 2576}
!36 = distinct !{!36, !23}
!37 = !{!18, !11, i64 48}


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