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

; 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, ptr, i32 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.facetT = type { double, double, double, ptr, %union.anon, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32 }
%union.anon = type { double }
%struct.setT = type { i32, [1 x %union.setelemT] }
%union.setelemT = type { ptr }

@qh_qh = external global %struct.qhT, align 8
@.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, i32 noundef, ptr noundef, ...) #1

declare i32 @qh_setsize(ptr noundef) #1

declare void @qh_errexit(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() #1

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

13:                                               ; preds = %296, %289, %112, %83, %52, %1
  %14 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 165), align 8, !tbaa !11
  store ptr %14, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 164), align 8, !tbaa !15
  %16 = icmp ne ptr %14, %15
  br i1 %16, label %17, label %297

17:                                               ; preds = %13
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %25

20:                                               ; preds = %17
  %21 = load i32, ptr %7, align 4, !tbaa !9
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %7, align 4, !tbaa !9
  %23 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 178), align 8, !tbaa !16
  %24 = icmp sgt i32 %21, %23
  br i1 %24, label %25, label %47

25:                                               ; preds = %20, %17
  %26 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !17
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %33

29:                                               ; preds = %25
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.facetT, ptr %30, i32 0, i32 14
  %32 = load i32, ptr %31, align 4, !tbaa !18
  br label %34

33:                                               ; preds = %25
  br label %34

34:                                               ; preds = %33, %29
  %35 = phi i32 [ %32, %29 ], [ -1, %33 ]
  %36 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 164), align 8, !tbaa !15
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %42

38:                                               ; preds = %34
  %39 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 164), align 8, !tbaa !15
  %40 = getelementptr inbounds %struct.facetT, ptr %39, i32 0, i32 14
  %41 = load i32, ptr %40, align 4, !tbaa !18
  br label %43

42:                                               ; preds = %34
  br label %43

43:                                               ; preds = %42, %38
  %44 = phi i32 [ %41, %38 ], [ -1, %42 ]
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %26, i32 noundef 6406, ptr noundef @.str.39, i32 noundef %35, i32 noundef %44)
  call void @qh_printlists()
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 164), align 8, !tbaa !15
  call void @qh_errexit2(i32 noundef 5, ptr noundef %45, ptr noundef %46)
  br label %47

47:                                               ; preds = %43, %20
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.facetT, ptr %48, i32 0, i32 11
  %50 = load ptr, ptr %49, align 8, !tbaa !20
  %51 = icmp ne ptr %50, null
  br i1 %51, label %56, label %52

52:                                               ; preds = %47
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.facetT, ptr %53, i32 0, i32 7
  %55 = load ptr, ptr %54, align 8, !tbaa !21
  store ptr %55, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 165), align 8, !tbaa !11
  br label %13, !llvm.loop !22

56:                                               ; preds = %47
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.facetT, ptr %57, i32 0, i32 11
  %59 = load ptr, ptr %58, align 8, !tbaa !20
  %60 = getelementptr inbounds %struct.setT, ptr %59, i32 0, i32 1
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.facetT, ptr %61, i32 0, i32 11
  %63 = load ptr, ptr %62, align 8, !tbaa !20
  %64 = getelementptr inbounds %struct.setT, ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 8, !tbaa !24
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [1 x %union.setelemT], ptr %60, i64 0, i64 %66
  %68 = load i32, ptr %67, align 8, !tbaa !26
  store i32 %68, ptr %5, align 4, !tbaa !9
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %73

70:                                               ; preds = %56
  %71 = load i32, ptr %5, align 4, !tbaa !9
  %72 = add nsw i32 %71, -1
  store i32 %72, ptr %5, align 4, !tbaa !9
  br label %79

73:                                               ; preds = %56
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.facetT, ptr %74, i32 0, i32 11
  %76 = load ptr, ptr %75, align 8, !tbaa !20
  %77 = getelementptr inbounds %struct.setT, ptr %76, i32 0, i32 0
  %78 = load i32, ptr %77, align 8, !tbaa !24
  store i32 %78, ptr %5, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %73, %70
  %80 = phi i32 [ %72, %70 ], [ %78, %73 ]
  %81 = load i32, ptr %5, align 4, !tbaa !9
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %89, label %83

83:                                               ; preds = %79
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.facetT, ptr %84, i32 0, i32 11
  call void @qh_setfree(ptr noundef %85)
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.facetT, ptr %86, i32 0, i32 7
  %88 = load ptr, ptr %87, align 8, !tbaa !21
  store ptr %88, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 165), align 8, !tbaa !11
  br label %13, !llvm.loop !22

89:                                               ; preds = %79
  %90 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 150), align 8, !tbaa !27
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %117

92:                                               ; preds = %89
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.facetT, ptr %93, i32 0, i32 15
  %95 = load i32, ptr %94, align 8
  %96 = lshr i32 %95, 18
  %97 = and i32 %96, 1
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %101

99:                                               ; preds = %92
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  call void @qh_furthestout(ptr noundef %100)
  br label %101

101:                                              ; preds = %99, %92
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.facetT, ptr %102, i32 0, i32 11
  %104 = load ptr, ptr %103, align 8, !tbaa !20
  %105 = call ptr @qh_setlast(ptr noundef %104)
  store ptr %105, ptr %10, align 8, !tbaa !5
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.facetT, ptr %106, i32 0, i32 0
  %108 = load double, ptr %107, align 8, !tbaa !28
  store double %108, ptr %9, align 8, !tbaa !29
  %109 = load double, ptr %9, align 8, !tbaa !29
  %110 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 6), align 8, !tbaa !30
  %111 = fcmp olt double %109, %110
  br i1 %111, label %112, label %116

112:                                              ; preds = %101
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.facetT, ptr %113, i32 0, i32 7
  %115 = load ptr, ptr %114, align 8, !tbaa !21
  store ptr %115, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 165), align 8, !tbaa !11
  br label %13, !llvm.loop !22

116:                                              ; preds = %101
  br label %117

117:                                              ; preds = %116, %89
  %118 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 76), align 8, !tbaa !31
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %135, label %120

120:                                              ; preds = %117
  %121 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 102), align 8, !tbaa !32
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %135, label %123

123:                                              ; preds = %120
  %124 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 50), align 4, !tbaa !33
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %128

126:                                              ; preds = %123
  call void @qh_furthestnext()
  %127 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 165), align 8, !tbaa !11
  store ptr %127, ptr %4, align 8, !tbaa !5
  br label %128

128:                                              ; preds = %126, %123
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %129, ptr %130, align 8, !tbaa !5
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.facetT, ptr %131, i32 0, i32 11
  %133 = load ptr, ptr %132, align 8, !tbaa !20
  %134 = call ptr @qh_setdellast(ptr noundef %133)
  store ptr %134, ptr %2, align 8
  store i32 1, ptr %11, align 4
  br label %298

135:                                              ; preds = %120, %117
  %136 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 76), align 8, !tbaa !31
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %138, label %272

138:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  %139 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 150), align 8, !tbaa !27
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %141, label %176

141:                                              ; preds = %138
  %142 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 163), align 8, !tbaa !34
  store ptr %142, ptr %4, align 8, !tbaa !5
  br label %143

143:                                              ; preds = %171, %141
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = icmp ne ptr %144, null
  br i1 %145, label %146, label %151

146:                                              ; preds = %143
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.facetT, ptr %147, i32 0, i32 7
  %149 = load ptr, ptr %148, align 8, !tbaa !21
  %150 = icmp ne ptr %149, null
  br label %151

151:                                              ; preds = %146, %143
  %152 = phi i1 [ false, %143 ], [ %150, %146 ]
  br i1 %152, label %153, label %175

153:                                              ; preds = %151
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 165), align 8, !tbaa !11
  %156 = icmp eq ptr %154, %155
  br i1 %156, label %157, label %158

157:                                              ; preds = %153
  br label %175

158:                                              ; preds = %153
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.facetT, ptr %159, i32 0, i32 11
  %161 = load ptr, ptr %160, align 8, !tbaa !20
  %162 = icmp ne ptr %161, null
  br i1 %162, label %163, label %170

163:                                              ; preds = %158
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.facetT, ptr %164, i32 0, i32 11
  %166 = load ptr, ptr %165, align 8, !tbaa !20
  %167 = call i32 @qh_setsize(ptr noundef %166)
  %168 = load i32, ptr %12, align 4, !tbaa !9
  %169 = add nsw i32 %168, %167
  store i32 %169, ptr %12, align 4, !tbaa !9
  br label %170

170:                                              ; preds = %163, %158
  br label %171

171:                                              ; preds = %170
  %172 = load ptr, ptr %4, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.facetT, ptr %172, i32 0, i32 7
  %174 = load ptr, ptr %173, align 8, !tbaa !21
  store ptr %174, ptr %4, align 8, !tbaa !5
  br label %143, !llvm.loop !35

175:                                              ; preds = %157, %151
  br label %176

176:                                              ; preds = %175, %138
  %177 = call i32 @qh_rand()
  %178 = sitofp i32 %177 to double
  store double %178, ptr %8, align 8, !tbaa !29
  %179 = load double, ptr %8, align 8, !tbaa !29
  %180 = fdiv double %179, 0x41DFFFFFFFC00000
  store double %180, ptr %8, align 8, !tbaa !29
  %181 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 180), align 8, !tbaa !36
  %182 = load i32, ptr %12, align 4, !tbaa !9
  %183 = sub nsw i32 %181, %182
  %184 = sitofp i32 %183 to double
  %185 = load double, ptr %8, align 8, !tbaa !29
  %186 = fmul double %184, %185
  %187 = call double @llvm.floor.f64(double %186)
  store double %187, ptr %8, align 8, !tbaa !29
  %188 = load double, ptr %8, align 8, !tbaa !29
  %189 = fptosi double %188 to i32
  store i32 %189, ptr %6, align 4, !tbaa !9
  %190 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 165), align 8, !tbaa !11
  %191 = icmp ne ptr %190, null
  br i1 %191, label %192, label %263

192:                                              ; preds = %176
  %193 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 165), align 8, !tbaa !11
  store ptr %193, ptr %4, align 8, !tbaa !5
  br label %194

194:                                              ; preds = %258, %192
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = icmp ne ptr %195, null
  br i1 %196, label %197, label %202

197:                                              ; preds = %194
  %198 = load ptr, ptr %4, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.facetT, ptr %198, i32 0, i32 7
  %200 = load ptr, ptr %199, align 8, !tbaa !21
  %201 = icmp ne ptr %200, null
  br label %202

202:                                              ; preds = %197, %194
  %203 = phi i1 [ false, %194 ], [ %201, %197 ]
  br i1 %203, label %204, label %262

204:                                              ; preds = %202
  %205 = load ptr, ptr %4, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.facetT, ptr %205, i32 0, i32 11
  %207 = load ptr, ptr %206, align 8, !tbaa !20
  %208 = icmp ne ptr %207, null
  br i1 %208, label %209, label %257

209:                                              ; preds = %204
  %210 = load ptr, ptr %4, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.facetT, ptr %210, i32 0, i32 11
  %212 = load ptr, ptr %211, align 8, !tbaa !20
  %213 = getelementptr inbounds %struct.setT, ptr %212, i32 0, i32 1
  %214 = load ptr, ptr %4, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.facetT, ptr %214, i32 0, i32 11
  %216 = load ptr, ptr %215, align 8, !tbaa !20
  %217 = getelementptr inbounds %struct.setT, ptr %216, i32 0, i32 0
  %218 = load i32, ptr %217, align 8, !tbaa !24
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [1 x %union.setelemT], ptr %213, i64 0, i64 %219
  %221 = load i32, ptr %220, align 8, !tbaa !26
  store i32 %221, ptr %5, align 4, !tbaa !9
  %222 = icmp ne i32 %221, 0
  br i1 %222, label %223, label %226

223:                                              ; preds = %209
  %224 = load i32, ptr %5, align 4, !tbaa !9
  %225 = add nsw i32 %224, -1
  store i32 %225, ptr %5, align 4, !tbaa !9
  br label %232

226:                                              ; preds = %209
  %227 = load ptr, ptr %4, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.facetT, ptr %227, i32 0, i32 11
  %229 = load ptr, ptr %228, align 8, !tbaa !20
  %230 = getelementptr inbounds %struct.setT, ptr %229, i32 0, i32 0
  %231 = load i32, ptr %230, align 8, !tbaa !24
  store i32 %231, ptr %5, align 4, !tbaa !9
  br label %232

232:                                              ; preds = %226, %223
  %233 = phi i32 [ %225, %223 ], [ %231, %226 ]
  %234 = load i32, ptr %5, align 4, !tbaa !9
  %235 = icmp ne i32 %234, 0
  br i1 %235, label %239, label %236

236:                                              ; preds = %232
  %237 = load ptr, ptr %4, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.facetT, ptr %237, i32 0, i32 11
  call void @qh_setfree(ptr noundef %238)
  br label %256

239:                                              ; preds = %232
  %240 = load i32, ptr %5, align 4, !tbaa !9
  %241 = load i32, ptr %6, align 4, !tbaa !9
  %242 = icmp sgt i32 %240, %241
  br i1 %242, label %243, label %251

243:                                              ; preds = %239
  %244 = load ptr, ptr %4, align 8, !tbaa !5
  %245 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %244, ptr %245, align 8, !tbaa !5
  %246 = load ptr, ptr %4, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.facetT, ptr %246, i32 0, i32 11
  %248 = load ptr, ptr %247, align 8, !tbaa !20
  %249 = load i32, ptr %6, align 4, !tbaa !9
  %250 = call ptr @qh_setdelnth(ptr noundef %248, i32 noundef %249)
  store ptr %250, ptr %2, align 8
  store i32 1, ptr %11, align 4
  br label %269

251:                                              ; preds = %239
  %252 = load i32, ptr %5, align 4, !tbaa !9
  %253 = load i32, ptr %6, align 4, !tbaa !9
  %254 = sub nsw i32 %253, %252
  store i32 %254, ptr %6, align 4, !tbaa !9
  br label %255

255:                                              ; preds = %251
  br label %256

256:                                              ; preds = %255, %236
  br label %257

257:                                              ; preds = %256, %204
  br label %258

258:                                              ; preds = %257
  %259 = load ptr, ptr %4, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.facetT, ptr %259, i32 0, i32 7
  %261 = load ptr, ptr %260, align 8, !tbaa !21
  store ptr %261, ptr %4, align 8, !tbaa !5
  br label %194, !llvm.loop !37

262:                                              ; preds = %202
  br label %263

263:                                              ; preds = %262, %176
  %264 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !17
  %265 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 180), align 8, !tbaa !36
  %266 = load i32, ptr %6, align 4, !tbaa !9
  %267 = add nsw i32 %266, 1
  %268 = load double, ptr %8, align 8, !tbaa !29
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %264, i32 noundef 6169, ptr noundef @.str.40, i32 noundef %265, i32 noundef %267, double noundef %268)
  call void @qh_errexit(i32 noundef 5, ptr noundef null, ptr noundef null)
  store i32 0, ptr %11, align 4
  br label %269

269:                                              ; preds = %263, %243
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  %270 = load i32, ptr %11, align 4
  switch i32 %270, label %298 [
    i32 0, label %271
  ]

271:                                              ; preds = %269
  br label %296

272:                                              ; preds = %135
  %273 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 164), align 8, !tbaa !15
  %274 = getelementptr inbounds %struct.facetT, ptr %273, i32 0, i32 6
  %275 = load ptr, ptr %274, align 8, !tbaa !38
  store ptr %275, ptr %4, align 8, !tbaa !5
  %276 = load ptr, ptr %4, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.facetT, ptr %276, i32 0, i32 11
  %278 = load ptr, ptr %277, align 8, !tbaa !20
  %279 = call ptr @qh_setdellast(ptr noundef %278)
  store ptr %279, ptr %10, align 8, !tbaa !5
  %280 = icmp ne ptr %279, null
  br i1 %280, label %292, label %281

281:                                              ; preds = %272
  %282 = load ptr, ptr %4, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.facetT, ptr %282, i32 0, i32 11
  %284 = load ptr, ptr %283, align 8, !tbaa !20
  %285 = icmp ne ptr %284, null
  br i1 %285, label %286, label %289

286:                                              ; preds = %281
  %287 = load ptr, ptr %4, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.facetT, ptr %287, i32 0, i32 11
  call void @qh_setfree(ptr noundef %288)
  br label %289

289:                                              ; preds = %286, %281
  %290 = load ptr, ptr %4, align 8, !tbaa !5
  call void @qh_removefacet(ptr noundef %290)
  %291 = load ptr, ptr %4, align 8, !tbaa !5
  call void @qh_prependfacet(ptr noundef %291, ptr noundef getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 163))
  br label %13, !llvm.loop !22

292:                                              ; preds = %272
  %293 = load ptr, ptr %4, align 8, !tbaa !5
  %294 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %293, ptr %294, align 8, !tbaa !5
  %295 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %295, ptr %2, align 8
  store i32 1, ptr %11, align 4
  br label %298

296:                                              ; preds = %271
  br label %13, !llvm.loop !22

297:                                              ; preds = %13
  store ptr null, ptr %2, align 8
  store i32 1, ptr %11, align 4
  br label %298

298:                                              ; preds = %297, %292, %269, %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  %299 = load ptr, ptr %2, align 8
  ret ptr %299
}

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

declare void @qh_removefacet(ptr noundef) #1

declare void @qh_setfree(ptr noundef) #1

declare void @qh_furthestout(ptr noundef) #1

declare ptr @qh_setlast(ptr noundef) #1

declare void @qh_furthestnext() #1

declare ptr @qh_setdellast(ptr noundef) #1

declare i32 @qh_rand() #1

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

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

declare void @qh_prependfacet(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, !6, i64 2984, !10, i64 2992}
!13 = !{!"double", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!12, !6, i64 2464}
!16 = !{!12, !10, i64 2568}
!17 = !{!12, !6, i64 2424}
!18 = !{!19, !10, i64 108}
!19 = !{!"facetT", !13, i64 0, !13, i64 8, !13, i64 16, !6, i64 24, !7, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 113, !10, i64 113, !10, i64 113, !10, i64 113, !10, i64 113, !10, i64 113, !10, i64 113, !10, i64 114, !10, i64 114, !10, i64 114, !10, i64 114, !10, i64 114, !10, i64 114, !10, i64 114, !10, i64 114, !10, i64 115, !10, i64 115, !10, i64 115, !10, i64 115, !10, i64 115, !10, i64 115, !10, i64 115, !10, i64 115}
!20 = !{!19, !6, i64 88}
!21 = !{!19, !6, i64 56}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !10, i64 0}
!25 = !{!"setT", !10, i64 0, !7, i64 8}
!26 = !{!7, !7, i64 0}
!27 = !{!12, !10, i64 1912}
!28 = !{!19, !13, i64 0}
!29 = !{!13, !13, i64 0}
!30 = !{!12, !13, i64 24}
!31 = !{!12, !10, i64 472}
!32 = !{!12, !10, i64 584}
!33 = !{!12, !10, i64 244}
!34 = !{!12, !6, i64 2456}
!35 = distinct !{!35, !23}
!36 = !{!12, !10, i64 2576}
!37 = distinct !{!37, !23}
!38 = !{!19, !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"

%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, ptr, i32 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%union.setelemT = type { ptr }

@qh_qh = external global %struct.qhT, align 8
@.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, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

declare i32 @qh_setsize(ptr noundef) local_unnamed_addr #0

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

declare void @qh_printlists() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local ptr @qh_nextfurthest(ptr nocapture noundef writeonly %0) local_unnamed_addr #1 {
  %.pr136 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2472), align 8
  %2 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2464), align 8, !tbaa !5
  %.not125137 = icmp eq ptr %.pr136, %2
  br i1 %.not125137, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %1, %.lr.ph.backedge
  %3 = phi ptr [ %.be, %.lr.ph.backedge ], [ %2, %1 ]
  %.070126 = phi i32 [ %.272, %.lr.ph.backedge ], [ 0, %1 ]
  %4 = phi ptr [ %.be180, %.lr.ph.backedge ], [ %.pr136, %1 ]
  %.not90 = icmp eq ptr %4, null
  br i1 %.not90, label %.thread, label %5

5:                                                ; preds = %.lr.ph
  %6 = add nsw i32 %.070126, 1
  %7 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2568), align 8, !tbaa !13
  %8 = icmp sgt i32 %.070126, %7
  br i1 %8, label %9, label %20

9:                                                ; preds = %5
  %10 = getelementptr inbounds i8, ptr %4, i64 108
  %11 = load i32, ptr %10, align 4, !tbaa !14
  br label %.thread

.thread:                                          ; preds = %.lr.ph, %9
  %.171113 = phi i32 [ %6, %9 ], [ %.070126, %.lr.ph ]
  %12 = phi i32 [ %11, %9 ], [ -1, %.lr.ph ]
  %13 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !16
  %.not91 = icmp eq ptr %3, null
  br i1 %.not91, label %17, label %14

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

17:                                               ; preds = %.thread, %14
  %18 = phi i32 [ %16, %14 ], [ -1, %.thread ]
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %13, i32 noundef 6406, ptr noundef nonnull @.str.39, i32 noundef %12, i32 noundef %18) #3
  tail call void @qh_printlists() #3
  %19 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2464), align 8, !tbaa !5
  tail call void @qh_errexit2(i32 noundef 5, ptr noundef %4, ptr noundef %19)
  br label %20

20:                                               ; preds = %17, %5
  %.272 = phi i32 [ %.171113, %17 ], [ %6, %5 ]
  %21 = getelementptr inbounds i8, ptr %4, i64 88
  %22 = load ptr, ptr %21, align 8, !tbaa !17
  %.not92 = icmp eq ptr %22, null
  br i1 %.not92, label %.backedge, label %26

.backedge:                                        ; preds = %20, %41, %33
  %23 = getelementptr inbounds i8, ptr %4, i64 56
  %24 = load ptr, ptr %23, align 8, !tbaa !18
  store ptr %24, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2472), align 8, !tbaa !19
  %25 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2464), align 8, !tbaa !5
  %.not = icmp eq ptr %24, %25
  br i1 %.not, label %.loopexit, label %.lr.ph.backedge

.lr.ph.backedge:                                  ; preds = %.backedge, %thread-pre-split.backedge
  %.be = phi ptr [ %25, %.backedge ], [ %121, %thread-pre-split.backedge ]
  %.be180 = phi ptr [ %24, %.backedge ], [ %.pr, %thread-pre-split.backedge ]
  br label %.lr.ph, !llvm.loop !20

26:                                               ; preds = %20
  %27 = getelementptr inbounds i8, ptr %22, i64 8
  %28 = load i32, ptr %22, align 8, !tbaa !22
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [1 x %union.setelemT], ptr %27, i64 0, i64 %29
  %31 = load i32, ptr %30, align 8, !tbaa !24
  %.not93 = icmp eq i32 %31, 0
  %32 = add nsw i32 %31, -1
  %.076 = select i1 %.not93, i32 %28, i32 %32
  %.not94 = icmp eq i32 %.076, 0
  br i1 %.not94, label %33, label %34

33:                                               ; preds = %26
  tail call void @qh_setfree(ptr noundef nonnull %21) #3
  br label %.backedge

34:                                               ; preds = %26
  %35 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1912), align 8, !tbaa !25
  %.not95 = icmp eq i32 %35, 0
  br i1 %.not95, label %47, label %36

36:                                               ; preds = %34
  %37 = getelementptr inbounds i8, ptr %4, i64 112
  %38 = load i32, ptr %37, align 8
  %39 = and i32 %38, 262144
  %.not96 = icmp eq i32 %39, 0
  br i1 %.not96, label %41, label %40

40:                                               ; preds = %36
  tail call void @qh_furthestout(ptr noundef nonnull %4) #3
  %.pre = load ptr, ptr %21, align 8, !tbaa !17
  br label %41

41:                                               ; preds = %40, %36
  %42 = phi ptr [ %.pre, %40 ], [ %22, %36 ]
  %43 = tail call ptr @qh_setlast(ptr noundef %42) #3
  %44 = load double, ptr %4, align 8, !tbaa !26
  %45 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 24), align 8, !tbaa !27
  %46 = fcmp olt double %44, %45
  br i1 %46, label %.backedge, label %47

47:                                               ; preds = %41, %34
  %48 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 472), align 8, !tbaa !28
  %49 = icmp ne i32 %48, 0
  %50 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 584), align 8
  %51 = icmp ne i32 %50, 0
  %or.cond = select i1 %49, i1 true, i1 %51
  br i1 %or.cond, label %60, label %52

52:                                               ; preds = %47
  %53 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 244), align 4, !tbaa !29
  %.not97 = icmp eq i32 %53, 0
  br i1 %.not97, label %56, label %54

54:                                               ; preds = %52
  tail call void @qh_furthestnext() #3
  %55 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2472), align 8, !tbaa !19
  br label %56

56:                                               ; preds = %54, %52
  %.078 = phi ptr [ %55, %54 ], [ %4, %52 ]
  store ptr %.078, ptr %0, align 8, !tbaa !30
  %57 = getelementptr inbounds i8, ptr %.078, i64 88
  %58 = load ptr, ptr %57, align 8, !tbaa !17
  %59 = tail call ptr @qh_setdellast(ptr noundef %58) #3
  br label %.loopexit

60:                                               ; preds = %47
  br i1 %49, label %61, label %110

61:                                               ; preds = %60
  %62 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1912), align 8, !tbaa !25
  %.not100 = icmp eq i32 %62, 0
  %.179127 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2456), align 8
  %.not101128 = icmp eq ptr %.179127, null
  %or.cond140 = select i1 %.not100, i1 true, i1 %.not101128
  br i1 %or.cond140, label %.critedge, label %.lr.ph131.preheader

.lr.ph131.preheader:                              ; preds = %61
  %.pre153 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2472), align 8
  br label %.lr.ph131

.lr.ph131:                                        ; preds = %.lr.ph131.preheader, %73
  %63 = phi ptr [ %74, %73 ], [ %.pre153, %.lr.ph131.preheader ]
  %.179130 = phi ptr [ %.179, %73 ], [ %.179127, %.lr.ph131.preheader ]
  %.0129 = phi i32 [ %.1, %73 ], [ 0, %.lr.ph131.preheader ]
  %64 = getelementptr inbounds i8, ptr %.179130, i64 56
  %65 = load ptr, ptr %64, align 8, !tbaa !30
  %.not102 = icmp eq ptr %65, null
  %66 = icmp eq ptr %.179130, %63
  %or.cond111 = select i1 %.not102, i1 true, i1 %66
  br i1 %or.cond111, label %.critedge, label %67

67:                                               ; preds = %.lr.ph131
  %68 = getelementptr inbounds i8, ptr %.179130, i64 88
  %69 = load ptr, ptr %68, align 8, !tbaa !17
  %.not103 = icmp eq ptr %69, null
  br i1 %.not103, label %73, label %70

70:                                               ; preds = %67
  %71 = tail call i32 @qh_setsize(ptr noundef nonnull %69) #3
  %72 = add nsw i32 %71, %.0129
  %.pre152 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2472), align 8
  %.179.pre = load ptr, ptr %64, align 8, !tbaa !30
  br label %73

73:                                               ; preds = %67, %70
  %.179 = phi ptr [ %.179.pre, %70 ], [ %65, %67 ]
  %74 = phi ptr [ %.pre152, %70 ], [ %63, %67 ]
  %.1 = phi i32 [ %72, %70 ], [ %.0129, %67 ]
  %.not101 = icmp eq ptr %.179, null
  br i1 %.not101, label %.critedge, label %.lr.ph131, !llvm.loop !31

.critedge:                                        ; preds = %73, %.lr.ph131, %61
  %.2 = phi i32 [ 0, %61 ], [ %.1, %73 ], [ %.0129, %.lr.ph131 ]
  %75 = tail call i32 @qh_rand() #3
  %76 = sitofp i32 %75 to double
  %77 = fdiv double %76, 0x41DFFFFFFFC00000
  %78 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2576), align 8, !tbaa !32
  %79 = sub nsw i32 %78, %.2
  %80 = sitofp i32 %79 to double
  %81 = fmul double %77, %80
  %82 = tail call double @llvm.floor.f64(double %81)
  %83 = fptosi double %82 to i32
  %84 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2472), align 8, !tbaa !19
  %.not104 = icmp eq ptr %84, null
  br i1 %.not104, label %.thread114, label %.preheader

.preheader:                                       ; preds = %.critedge, %102
  %.073135 = phi i32 [ %.174, %102 ], [ %83, %.critedge ]
  %.280134 = phi ptr [ %103, %102 ], [ %84, %.critedge ]
  %85 = getelementptr inbounds i8, ptr %.280134, i64 56
  %86 = load ptr, ptr %85, align 8, !tbaa !18
  %.not106 = icmp eq ptr %86, null
  br i1 %.not106, label %.thread114.loopexit, label %87

87:                                               ; preds = %.preheader
  %88 = getelementptr inbounds i8, ptr %.280134, i64 88
  %89 = load ptr, ptr %88, align 8, !tbaa !17
  %.not107 = icmp eq ptr %89, null
  br i1 %.not107, label %102, label %90

90:                                               ; preds = %87
  %91 = getelementptr inbounds i8, ptr %89, i64 8
  %92 = load i32, ptr %89, align 8, !tbaa !22
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [1 x %union.setelemT], ptr %91, i64 0, i64 %93
  %95 = load i32, ptr %94, align 8, !tbaa !24
  %.not108 = icmp eq i32 %95, 0
  %96 = add nsw i32 %95, -1
  %.177 = select i1 %.not108, i32 %92, i32 %96
  %.not109 = icmp eq i32 %.177, 0
  br i1 %.not109, label %97, label %98

97:                                               ; preds = %90
  tail call void @qh_setfree(ptr noundef nonnull %88) #3
  %.pre155 = load ptr, ptr %85, align 8, !tbaa !18
  br label %102

98:                                               ; preds = %90
  %99 = icmp sgt i32 %.177, %.073135
  br i1 %99, label %107, label %100

100:                                              ; preds = %98
  %101 = sub nsw i32 %.073135, %.177
  br label %102

102:                                              ; preds = %87, %100, %97
  %103 = phi ptr [ %86, %100 ], [ %.pre155, %97 ], [ %86, %87 ]
  %.174 = phi i32 [ %101, %100 ], [ %.073135, %97 ], [ %.073135, %87 ]
  %.not105 = icmp eq ptr %103, null
  br i1 %.not105, label %.thread114.loopexit, label %.preheader, !llvm.loop !33

.thread114.loopexit:                              ; preds = %.preheader, %102
  %.275.ph = phi i32 [ %.174, %102 ], [ %.073135, %.preheader ]
  %.pre156 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2576), align 8, !tbaa !32
  br label %.thread114

.thread114:                                       ; preds = %.thread114.loopexit, %.critedge
  %104 = phi i32 [ %78, %.critedge ], [ %.pre156, %.thread114.loopexit ]
  %.275 = phi i32 [ %83, %.critedge ], [ %.275.ph, %.thread114.loopexit ]
  %105 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !16
  %106 = add nsw i32 %.275, 1
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %105, i32 noundef 6169, ptr noundef nonnull @.str.40, i32 noundef %104, i32 noundef %106, double noundef %82) #3
  tail call void @qh_errexit(i32 noundef 5, ptr noundef null, ptr noundef null) #3
  br label %thread-pre-split.backedge

107:                                              ; preds = %98
  store ptr %.280134, ptr %0, align 8, !tbaa !30
  %108 = load ptr, ptr %88, align 8, !tbaa !17
  %109 = tail call ptr @qh_setdelnth(ptr noundef %108, i32 noundef %.073135) #3
  br label %.loopexit, !llvm.loop !20

110:                                              ; preds = %60
  %111 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2464), align 8, !tbaa !5
  %112 = getelementptr inbounds i8, ptr %111, i64 48
  %113 = load ptr, ptr %112, align 8, !tbaa !34
  %114 = getelementptr inbounds i8, ptr %113, i64 88
  %115 = load ptr, ptr %114, align 8, !tbaa !17
  %116 = tail call ptr @qh_setdellast(ptr noundef %115) #3
  %.not98 = icmp eq ptr %116, null
  br i1 %.not98, label %117, label %122

117:                                              ; preds = %110
  %118 = load ptr, ptr %114, align 8, !tbaa !17
  %.not99 = icmp eq ptr %118, null
  br i1 %.not99, label %120, label %119

119:                                              ; preds = %117
  tail call void @qh_setfree(ptr noundef nonnull %114) #3
  br label %120

120:                                              ; preds = %119, %117
  tail call void @qh_removefacet(ptr noundef nonnull %113) #3
  tail call void @qh_prependfacet(ptr noundef nonnull %113, ptr noundef nonnull getelementptr inbounds (i8, ptr @qh_qh, i64 2456)) #3
  br label %thread-pre-split.backedge

thread-pre-split.backedge:                        ; preds = %120, %.thread114
  %.pr = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2472), align 8
  %121 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2464), align 8, !tbaa !5
  %.not125 = icmp eq ptr %.pr, %121
  br i1 %.not125, label %.loopexit, label %.lr.ph.backedge

122:                                              ; preds = %110
  store ptr %113, ptr %0, align 8, !tbaa !30
  br label %.loopexit

.loopexit:                                        ; preds = %thread-pre-split.backedge, %.backedge, %1, %107, %122, %56
  %.269 = phi ptr [ %109, %107 ], [ %116, %122 ], [ %59, %56 ], [ null, %1 ], [ null, %.backedge ], [ null, %thread-pre-split.backedge ]
  ret ptr %.269
}

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

declare void @qh_removefacet(ptr noundef) local_unnamed_addr #0

declare void @qh_setfree(ptr noundef) local_unnamed_addr #0

declare void @qh_furthestout(ptr noundef) local_unnamed_addr #0

declare ptr @qh_setlast(ptr noundef) local_unnamed_addr #0

declare void @qh_furthestnext() local_unnamed_addr #0

declare ptr @qh_setdellast(ptr noundef) local_unnamed_addr #0

declare i32 @qh_rand() 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, i32 noundef) local_unnamed_addr #0

declare void @qh_prependfacet(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 2464}
!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, !11, i64 2984, !7, i64 2992}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!6, !7, i64 2568}
!14 = !{!15, !7, i64 108}
!15 = !{!"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}
!16 = !{!6, !11, i64 2424}
!17 = !{!15, !11, i64 88}
!18 = !{!15, !11, i64 56}
!19 = !{!6, !11, i64 2472}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!23, !7, i64 0}
!23 = !{!"setT", !7, i64 0, !8, i64 8}
!24 = !{!8, !8, i64 0}
!25 = !{!6, !7, i64 1912}
!26 = !{!15, !10, i64 0}
!27 = !{!6, !10, i64 24}
!28 = !{!6, !7, i64 472}
!29 = !{!6, !7, i64 244}
!30 = !{!11, !11, i64 0}
!31 = distinct !{!31, !21}
!32 = !{!6, !7, i64 2576}
!33 = distinct !{!33, !21}
!34 = !{!15, !11, i64 48}


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