; LLVM IR from jrl-umi3218/mc_rtc :: 3rd-party/qhull/src/libqhull_r (poly2_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 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [162 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [133 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [47 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 i32 @qh_setsize(ptr noundef, ptr noundef) #1

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

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

24:                                               ; preds = %1
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.qhT, ptr %26, i32 0, i32 158
  %28 = load ptr, ptr %27, align 8, !tbaa !18
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.qhT, ptr %29, i32 0, i32 163
  %31 = load ptr, ptr %30, align 8, !tbaa !19
  %32 = getelementptr inbounds %struct.facetT, ptr %31, i32 0, i32 14
  %33 = load i32, ptr %32, align 4, !tbaa !20
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %25, ptr noundef %28, i32 noundef 1020, ptr noundef @.str, i32 noundef %33)
  br label %34

34:                                               ; preds = %24, %1
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = call double @qh_maxouter(ptr noundef %35)
  store double %36, ptr %11, align 8, !tbaa !11
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.qhT, ptr %37, i32 0, i32 134
  %39 = load double, ptr %38, align 8, !tbaa !22
  %40 = load double, ptr %11, align 8, !tbaa !11
  %41 = fadd double %40, %39
  store double %41, ptr %11, align 8, !tbaa !11
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.qhT, ptr %42, i32 0, i32 29
  %44 = load i32, ptr %43, align 8, !tbaa !13
  %45 = icmp sge i32 %44, 1
  br i1 %45, label %46, label %52

46:                                               ; preds = %34
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = load ptr, ptr %2, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.qhT, ptr %48, i32 0, i32 158
  %50 = load ptr, ptr %49, align 8, !tbaa !18
  %51 = load double, ptr %11, align 8, !tbaa !11
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %47, ptr noundef %50, i32 noundef 1021, ptr noundef @.str.1, double noundef %51)
  br label %52

52:                                               ; preds = %46, %34
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = call ptr @qh_pointfacet(ptr noundef %53)
  store ptr %54, ptr %19, align 8, !tbaa !5
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.qhT, ptr %55, i32 0, i32 63
  %57 = load i32, ptr %56, align 8, !tbaa !23
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %74

59:                                               ; preds = %52
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = load ptr, ptr %2, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.qhT, ptr %61, i32 0, i32 158
  %63 = load ptr, ptr %62, align 8, !tbaa !18
  %64 = load ptr, ptr %2, align 8, !tbaa !5
  %65 = load ptr, ptr %19, align 8, !tbaa !5
  %66 = call i32 @qh_setsize(ptr noundef %64, ptr noundef %65)
  %67 = load double, ptr %11, align 8, !tbaa !11
  %68 = load ptr, ptr %2, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.qhT, ptr %68, i32 0, i32 48
  %70 = load i32, ptr %69, align 4, !tbaa !24
  %71 = icmp ne i32 %70, 0
  %72 = zext i1 %71 to i64
  %73 = select i1 %71, ptr @.str.3, ptr @.str.4
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %60, ptr noundef %63, i32 noundef 8091, ptr noundef @.str.2, i32 noundef %66, double noundef %67, ptr noundef %73)
  br label %74

74:                                               ; preds = %59, %52
  store ptr null, ptr %5, align 8, !tbaa !5
  %75 = load ptr, ptr %19, align 8, !tbaa !5
  %76 = icmp ne ptr %75, null
  br i1 %76, label %77, label %194

77:                                               ; preds = %74
  store i32 0, ptr %15, align 4, !tbaa !9
  %78 = load ptr, ptr %19, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.setT, ptr %78, i32 0, i32 1
  %80 = getelementptr inbounds [1 x %union.setelemT], ptr %79, i64 0, i64 0
  %81 = load ptr, ptr %80, align 8, !tbaa !25
  store ptr %81, ptr %5, align 8, !tbaa !5
  %82 = load ptr, ptr %2, align 8, !tbaa !5
  %83 = load ptr, ptr %19, align 8, !tbaa !5
  %84 = call i32 @qh_setsize(ptr noundef %82, ptr noundef %83)
  store i32 %84, ptr %16, align 4, !tbaa !9
  br label %85

85:                                               ; preds = %185, %77
  %86 = load i32, ptr %15, align 4, !tbaa !9
  %87 = load i32, ptr %16, align 4, !tbaa !9
  %88 = icmp slt i32 %86, %87
  br i1 %88, label %89, label %193

89:                                               ; preds = %85
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = icmp ne ptr %90, null
  br i1 %91, label %92, label %93

92:                                               ; preds = %89
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %97

93:                                               ; preds = %89
  store i32 1, ptr %4, align 4, !tbaa !9
  %94 = load ptr, ptr %2, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.qhT, ptr %94, i32 0, i32 163
  %96 = load ptr, ptr %95, align 8, !tbaa !19
  store ptr %96, ptr %5, align 8, !tbaa !5
  br label %97

97:                                               ; preds = %93, %92
  %98 = load ptr, ptr %2, align 8, !tbaa !5
  %99 = load i32, ptr %15, align 4, !tbaa !9
  %100 = call ptr @qh_point(ptr noundef %98, i32 noundef %99)
  store ptr %100, ptr %13, align 8, !tbaa !5
  %101 = load ptr, ptr %13, align 8, !tbaa !5
  %102 = load ptr, ptr %2, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.qhT, ptr %102, i32 0, i32 23
  %104 = load ptr, ptr %103, align 8, !tbaa !26
  %105 = icmp eq ptr %101, %104
  br i1 %105, label %106, label %107

106:                                              ; preds = %97
  br label %185

107:                                              ; preds = %97
  %108 = load ptr, ptr %2, align 8, !tbaa !5
  %109 = load ptr, ptr %13, align 8, !tbaa !5
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_distplane(ptr noundef %108, ptr noundef %109, ptr noundef %110, ptr noundef %10)
  %111 = load i32, ptr %14, align 4, !tbaa !9
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %14, align 4, !tbaa !9
  %113 = load ptr, ptr %2, align 8, !tbaa !5
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = call ptr @qh_findbesthorizon(ptr noundef %113, i32 noundef 0, ptr noundef %114, ptr noundef %115, i32 noundef 1, ptr noundef %10, ptr noundef %14)
  store ptr %116, ptr %6, align 8, !tbaa !5
  %117 = load double, ptr %12, align 8, !tbaa !11
  %118 = load double, ptr %10, align 8, !tbaa !11
  %119 = fcmp olt double %117, %118
  br i1 %119, label %120, label %122

120:                                              ; preds = %107
  %121 = load double, ptr %10, align 8, !tbaa !11
  store double %121, ptr %12, align 8, !tbaa !11
  br label %122

122:                                              ; preds = %120, %107
  %123 = load double, ptr %10, align 8, !tbaa !11
  %124 = load double, ptr %11, align 8, !tbaa !11
  %125 = fcmp ogt double %123, %124
  br i1 %125, label %126, label %170

126:                                              ; preds = %122
  %127 = load ptr, ptr %2, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.qhT, ptr %127, i32 0, i32 48
  %129 = load i32, ptr %128, align 4, !tbaa !24
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %151

131:                                              ; preds = %126
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.facetT, ptr %132, i32 0, i32 15
  %134 = load i32, ptr %133, align 8
  %135 = lshr i32 %134, 19
  %136 = and i32 %135, 1
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %151, label %138

138:                                              ; preds = %131
  %139 = load ptr, ptr %2, align 8, !tbaa !5
  %140 = load ptr, ptr %13, align 8, !tbaa !5
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = call ptr @qh_findgooddist(ptr noundef %139, ptr noundef %140, ptr noundef %141, ptr noundef %10, ptr noundef %9)
  store ptr %142, ptr %6, align 8, !tbaa !5
  %143 = icmp ne ptr %142, null
  br i1 %143, label %144, label %148

144:                                              ; preds = %138
  %145 = load double, ptr %10, align 8, !tbaa !11
  %146 = load double, ptr %11, align 8, !tbaa !11
  %147 = fcmp ogt double %145, %146
  br i1 %147, label %151, label %148

148:                                              ; preds = %144, %138
  %149 = load i32, ptr %17, align 4, !tbaa !9
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %17, align 4, !tbaa !9
  br label %169

151:                                              ; preds = %144, %131, %126
  store i32 1, ptr %3, align 4, !tbaa !9
  %152 = load ptr, ptr %2, align 8, !tbaa !5
  %153 = load ptr, ptr %2, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.qhT, ptr %153, i32 0, i32 158
  %155 = load ptr, ptr %154, align 8, !tbaa !18
  %156 = load i32, ptr %15, align 4, !tbaa !9
  %157 = load ptr, ptr %6, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.facetT, ptr %157, i32 0, i32 14
  %159 = load i32, ptr %158, align 4, !tbaa !20
  %160 = load double, ptr %10, align 8, !tbaa !11
  %161 = load double, ptr %11, align 8, !tbaa !11
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %152, ptr noundef %155, i32 noundef 6109, ptr noundef @.str.5, i32 noundef %156, i32 noundef %159, double noundef %160, double noundef %161)
  %162 = load ptr, ptr %7, align 8, !tbaa !5
  %163 = load ptr, ptr %6, align 8, !tbaa !5
  %164 = icmp ne ptr %162, %163
  br i1 %164, label %165, label %168

165:                                              ; preds = %151
  %166 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %166, ptr %8, align 8, !tbaa !5
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %167, ptr %7, align 8, !tbaa !5
  br label %168

168:                                              ; preds = %165, %151
  br label %169

169:                                              ; preds = %168, %148
  br label %184

170:                                              ; preds = %122
  %171 = load i32, ptr %4, align 4, !tbaa !9
  %172 = icmp ne i32 %171, 0
  br i1 %172, label %173, label %183

173:                                              ; preds = %170
  %174 = load double, ptr %10, align 8, !tbaa !11
  %175 = load ptr, ptr %2, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.qhT, ptr %175, i32 0, i32 35
  %177 = load double, ptr %176, align 8, !tbaa !27
  %178 = fneg double %177
  %179 = fcmp olt double %174, %178
  br i1 %179, label %180, label %183

180:                                              ; preds = %173
  %181 = load i32, ptr %18, align 4, !tbaa !9
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %18, align 4, !tbaa !9
  br label %183

183:                                              ; preds = %180, %173, %170
  br label %184

184:                                              ; preds = %183, %169
  br label %185

185:                                              ; preds = %184, %106
  %186 = load ptr, ptr %19, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.setT, ptr %186, i32 0, i32 1
  %188 = load i32, ptr %15, align 4, !tbaa !9
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %15, align 4, !tbaa !9
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [1 x %union.setelemT], ptr %187, i64 0, i64 %190
  %192 = load ptr, ptr %191, align 8, !tbaa !25
  store ptr %192, ptr %5, align 8, !tbaa !5
  br label %85, !llvm.loop !28

193:                                              ; preds = %85
  br label %194

194:                                              ; preds = %193, %74
  %195 = load ptr, ptr %2, align 8, !tbaa !5
  call void @qh_settempfree(ptr noundef %195, ptr noundef %19)
  %196 = load i32, ptr %18, align 4, !tbaa !9
  %197 = icmp ne i32 %196, 0
  br i1 %197, label %198, label %214

198:                                              ; preds = %194
  %199 = load ptr, ptr %2, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.qhT, ptr %199, i32 0, i32 17
  %201 = load i32, ptr %200, align 8, !tbaa !30
  %202 = icmp ne i32 %201, 0
  br i1 %202, label %214, label %203

203:                                              ; preds = %198
  %204 = load ptr, ptr %2, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.qhT, ptr %204, i32 0, i32 63
  %206 = load i32, ptr %205, align 8, !tbaa !23
  %207 = icmp ne i32 %206, 0
  br i1 %207, label %208, label %214

208:                                              ; preds = %203
  %209 = load ptr, ptr %2, align 8, !tbaa !5
  %210 = load ptr, ptr %2, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.qhT, ptr %210, i32 0, i32 158
  %212 = load ptr, ptr %211, align 8, !tbaa !18
  %213 = load i32, ptr %18, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %209, ptr noundef %212, i32 noundef 8092, ptr noundef @.str.6, i32 noundef %213)
  br label %214

214:                                              ; preds = %208, %203, %198, %194
  %215 = load double, ptr %12, align 8, !tbaa !11
  %216 = load ptr, ptr %2, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.qhT, ptr %216, i32 0, i32 148
  %218 = load double, ptr %217, align 8, !tbaa !31
  %219 = fcmp ogt double %215, %218
  br i1 %219, label %220, label %232

220:                                              ; preds = %214
  %221 = load ptr, ptr %2, align 8, !tbaa !5
  %222 = load ptr, ptr %2, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.qhT, ptr %222, i32 0, i32 158
  %224 = load ptr, ptr %223, align 8, !tbaa !18
  %225 = load double, ptr %12, align 8, !tbaa !11
  %226 = load ptr, ptr %2, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.qhT, ptr %226, i32 0, i32 148
  %228 = load double, ptr %227, align 8, !tbaa !31
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %221, ptr noundef %224, i32 noundef 6110, ptr noundef @.str.7, double noundef %225, double noundef %228)
  %229 = load ptr, ptr %2, align 8, !tbaa !5
  %230 = load ptr, ptr %7, align 8, !tbaa !5
  %231 = load ptr, ptr %8, align 8, !tbaa !5
  call void @qh_errexit2(ptr noundef %229, i32 noundef 3, ptr noundef %230, ptr noundef %231)
  br label %245

232:                                              ; preds = %214
  %233 = load i32, ptr %3, align 4, !tbaa !9
  %234 = icmp ne i32 %233, 0
  br i1 %234, label %235, label %244

235:                                              ; preds = %232
  %236 = load ptr, ptr %2, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.qhT, ptr %236, i32 0, i32 148
  %238 = load double, ptr %237, align 8, !tbaa !31
  %239 = fcmp ogt double %238, 0x7FDFFFFFFFFFFFFF
  br i1 %239, label %240, label %244

240:                                              ; preds = %235
  %241 = load ptr, ptr %2, align 8, !tbaa !5
  %242 = load ptr, ptr %7, align 8, !tbaa !5
  %243 = load ptr, ptr %8, align 8, !tbaa !5
  call void @qh_errexit2(ptr noundef %241, i32 noundef 3, ptr noundef %242, ptr noundef %243)
  br label %244

244:                                              ; preds = %240, %235, %232
  br label %245

245:                                              ; preds = %244, %220
  %246 = load ptr, ptr %2, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.qhT, ptr %246, i32 0, i32 29
  %248 = load i32, ptr %247, align 8, !tbaa !13
  %249 = icmp ne i32 %248, 0
  br i1 %249, label %250, label %256

250:                                              ; preds = %245
  %251 = load ptr, ptr %2, align 8, !tbaa !5
  %252 = load ptr, ptr %2, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.qhT, ptr %252, i32 0, i32 158
  %254 = load ptr, ptr %253, align 8, !tbaa !18
  %255 = load double, ptr %12, align 8, !tbaa !11
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %251, ptr noundef %254, i32 noundef 20, ptr noundef @.str.8, double noundef %255)
  br label %256

256:                                              ; preds = %250, %245
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  ret void
}

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

declare double @qh_maxouter(ptr noundef) #1

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

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

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

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

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

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

declare void @qh_errexit2(ptr noundef, i32 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 = { 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, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 136}
!14 = !{!"qhT", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !12, 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, !12, i64 64, !12, 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, !12, i64 160, !12, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !12, i64 192, !12, i64 200, !10, i64 208, !10, i64 212, !12, 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, !12, i64 448, !12, i64 456, !12, 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, !12, 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, !12, 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, !12, i64 1760, !12, i64 1768, !12, i64 1776, !12, i64 1784, !12, i64 1792, !12, i64 1800, !12, i64 1808, !12, i64 1816, !12, i64 1824, !12, i64 1832, !12, i64 1840, !12, i64 1848, !12, i64 1856, !12, i64 1864, !6, i64 1872, !12, i64 1880, !12, i64 1888, !12, i64 1896, !12, 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, !15, 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, !12, i64 2664, !10, i64 2672, !12, i64 2680, !12, i64 2688, !12, i64 2696, !10, i64 2704, !10, i64 2708, !10, i64 2712, !10, i64 2716, !10, i64 2720, !12, i64 2728, !12, i64 2736, !10, i64 2744, !10, i64 2748, !10, i64 2752, !10, i64 2756, !10, i64 2760, !10, i64 2764, !12, i64 2768, !12, 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, !12, i64 2920, !12, i64 2928, !12, i64 2936, !12, 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, !12, i64 3240, !6, i64 3248, !6, i64 3256, !6, i64 3264, !16, i64 3272, !17, i64 3424}
!15 = !{!"long", !7, i64 0}
!16 = !{!"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}
!17 = !{!"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, !12, i64 5336}
!18 = !{!14, !6, i64 2424}
!19 = !{!14, !6, i64 2456}
!20 = !{!21, !10, i64 108}
!21 = !{!"facetT", !12, i64 0, !12, i64 8, !12, 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 = !{!14, !12, i64 1784}
!23 = !{!14, !10, i64 296}
!24 = !{!14, !10, i64 236}
!25 = !{!7, !7, i64 0}
!26 = !{!14, !6, i64 104}
!27 = !{!14, !12, i64 168}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!14, !10, i64 80}
!31 = !{!14, !12, i64 1896}


; 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 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [162 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [133 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [47 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @qh_check_bestdist(ptr noundef %0) local_unnamed_addr #2 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %6 = getelementptr inbounds i8, ptr %0, i64 136
  %7 = load i32, ptr %6, align 8, !tbaa !9
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %9, label %16

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

16:                                               ; preds = %9, %1
  %17 = tail call double @qh_maxouter(ptr noundef nonnull %0) #3
  %18 = getelementptr inbounds i8, ptr %0, i64 1784
  %19 = load double, ptr %18, align 8, !tbaa !20
  %20 = fadd double %17, %19
  %21 = load i32, ptr %6, align 8, !tbaa !9
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %23, label %26

23:                                               ; preds = %16
  %24 = getelementptr inbounds i8, ptr %0, i64 2424
  %25 = load ptr, ptr %24, align 8, !tbaa !16
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %25, i32 noundef 1021, ptr noundef nonnull @.str.1, double noundef %20) #3
  br label %26

26:                                               ; preds = %23, %16
  %27 = tail call ptr @qh_pointfacet(ptr noundef nonnull %0)
  store ptr %27, ptr %5, align 8, !tbaa !21
  %28 = getelementptr inbounds i8, ptr %0, i64 296
  %29 = load i32, ptr %28, align 8, !tbaa !22
  %.not = icmp eq i32 %29, 0
  br i1 %.not, label %37, label %30

30:                                               ; preds = %26
  %31 = getelementptr inbounds i8, ptr %0, i64 2424
  %32 = load ptr, ptr %31, align 8, !tbaa !16
  %33 = tail call i32 @qh_setsize(ptr noundef nonnull %0, ptr noundef %27) #3
  %34 = getelementptr inbounds i8, ptr %0, i64 236
  %35 = load i32, ptr %34, align 4, !tbaa !23
  %.not106 = icmp eq i32 %35, 0
  %36 = select i1 %.not106, ptr @.str.4, ptr @.str.3
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %32, i32 noundef 8091, ptr noundef nonnull @.str.2, i32 noundef %33, double noundef %20, ptr noundef nonnull %36) #3
  br label %37

37:                                               ; preds = %30, %26
  %.not107 = icmp eq ptr %27, null
  br i1 %.not107, label %.thread, label %38

.thread:                                          ; preds = %37
  call void @qh_settempfree(ptr noundef nonnull %0, ptr noundef nonnull %5) #3
  br label %98

38:                                               ; preds = %37
  %39 = getelementptr inbounds i8, ptr %27, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !24
  %41 = tail call i32 @qh_setsize(ptr noundef nonnull %0, ptr noundef nonnull %27) #3
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %38
  call void @qh_settempfree(ptr noundef nonnull %0, ptr noundef nonnull %5) #3
  br label %98

.lr.ph:                                           ; preds = %38
  %43 = getelementptr inbounds i8, ptr %0, i64 2456
  %44 = getelementptr inbounds i8, ptr %0, i64 104
  %45 = getelementptr inbounds i8, ptr %0, i64 168
  %46 = getelementptr inbounds i8, ptr %0, i64 236
  %47 = getelementptr inbounds i8, ptr %0, i64 2424
  %wide.trip.count = zext nneg i32 %41 to i64
  br label %48

48:                                               ; preds = %.lr.ph, %85
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %85 ]
  %.0139 = phi i32 [ 0, %.lr.ph ], [ %.1, %85 ]
  %.081137 = phi i32 [ 0, %.lr.ph ], [ %.182, %85 ]
  %.086135 = phi double [ 0xFFEFFFFFFFFFFFFF, %.lr.ph ], [ %.288, %85 ]
  %.089134 = phi ptr [ null, %.lr.ph ], [ %.190, %85 ]
  %.092133 = phi ptr [ null, %.lr.ph ], [ %.193, %85 ]
  %.096132 = phi ptr [ %40, %.lr.ph ], [ %89, %85 ]
  %.not113.not = icmp eq ptr %.096132, null
  br i1 %.not113.not, label %49, label %51

49:                                               ; preds = %48
  %50 = load ptr, ptr %43, align 8, !tbaa !17
  br label %51

51:                                               ; preds = %48, %49
  %.197 = phi ptr [ %50, %49 ], [ %.096132, %48 ]
  %52 = trunc nuw nsw i64 %indvars.iv to i32
  %53 = call ptr @qh_point(ptr noundef nonnull %0, i32 noundef %52)
  %54 = load ptr, ptr %44, align 8, !tbaa !25
  %55 = icmp eq ptr %53, %54
  br i1 %55, label %85, label %56

56:                                               ; preds = %51
  call void @qh_distplane(ptr noundef nonnull %0, ptr noundef %53, ptr noundef %.197, ptr noundef nonnull %3) #3
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %4, align 4, !tbaa !5
  %59 = call ptr @qh_findbesthorizon(ptr noundef nonnull %0, i32 noundef 0, ptr noundef %53, ptr noundef %.197, i32 noundef 1, ptr noundef nonnull %3, ptr noundef nonnull %4) #3
  %60 = load double, ptr %3, align 8, !tbaa !26
  %61 = fcmp olt double %.086135, %60
  %.187 = select i1 %61, double %60, double %.086135
  %62 = fcmp ogt double %60, %20
  br i1 %62, label %63, label %78

63:                                               ; preds = %56
  %64 = load i32, ptr %46, align 4, !tbaa !23
  %.not115 = icmp eq i32 %64, 0
  br i1 %.not115, label %73, label %65

65:                                               ; preds = %63
  %66 = getelementptr inbounds i8, ptr %59, i64 112
  %67 = load i32, ptr %66, align 8
  %68 = and i32 %67, 524288
  %.not116 = icmp eq i32 %68, 0
  br i1 %.not116, label %69, label %73

69:                                               ; preds = %65
  %70 = call ptr @qh_findgooddist(ptr noundef nonnull %0, ptr noundef %53, ptr noundef nonnull %59, ptr noundef nonnull %3, ptr noundef nonnull %2) #3
  %.not117 = icmp ne ptr %70, null
  %71 = load double, ptr %3, align 8
  %72 = fcmp ogt double %71, %20
  %or.cond = select i1 %.not117, i1 %72, i1 false
  br i1 %or.cond, label %73, label %85

73:                                               ; preds = %69, %65, %63
  %74 = phi double [ %60, %65 ], [ %60, %63 ], [ %71, %69 ]
  %.095 = phi ptr [ %59, %65 ], [ %59, %63 ], [ %70, %69 ]
  %75 = load ptr, ptr %47, align 8, !tbaa !16
  %76 = getelementptr inbounds i8, ptr %.095, i64 108
  %77 = load i32, ptr %76, align 4, !tbaa !18
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %75, i32 noundef 6109, ptr noundef nonnull @.str.5, i32 noundef %52, i32 noundef %77, double noundef %74, double noundef %20) #3
  %.not118 = icmp eq ptr %.092133, %.095
  %spec.select120 = select i1 %.not118, ptr %.089134, ptr %.092133
  br label %85

78:                                               ; preds = %56
  br i1 %.not113.not, label %79, label %85

79:                                               ; preds = %78
  %80 = load double, ptr %45, align 8, !tbaa !27
  %81 = fneg double %80
  %82 = fcmp olt double %60, %81
  br i1 %82, label %83, label %85

83:                                               ; preds = %79
  %84 = add nsw i32 %.0139, 1
  br label %85

85:                                               ; preds = %69, %73, %83, %79, %78, %51
  %.193 = phi ptr [ %.092133, %51 ], [ %.092133, %83 ], [ %.092133, %79 ], [ %.092133, %78 ], [ %.095, %73 ], [ %.092133, %69 ]
  %.190 = phi ptr [ %.089134, %51 ], [ %.089134, %83 ], [ %.089134, %79 ], [ %.089134, %78 ], [ %spec.select120, %73 ], [ %.089134, %69 ]
  %.288 = phi double [ %.086135, %51 ], [ %.187, %83 ], [ %.187, %79 ], [ %.187, %78 ], [ %.187, %73 ], [ %.187, %69 ]
  %.182 = phi i32 [ %.081137, %51 ], [ %.081137, %83 ], [ %.081137, %79 ], [ %.081137, %78 ], [ 1, %73 ], [ %.081137, %69 ]
  %.1 = phi i32 [ %.0139, %51 ], [ %84, %83 ], [ %.0139, %79 ], [ %.0139, %78 ], [ %.0139, %73 ], [ %.0139, %69 ]
  %86 = load ptr, ptr %5, align 8, !tbaa !21
  %87 = getelementptr inbounds i8, ptr %86, i64 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %88 = getelementptr inbounds [1 x %union.setelemT], ptr %87, i64 0, i64 %indvars.iv.next
  %89 = load ptr, ptr %88, align 8, !tbaa !24
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %48, !llvm.loop !28

._crit_edge:                                      ; preds = %85
  call void @qh_settempfree(ptr noundef nonnull %0, ptr noundef nonnull %5) #3
  %.not108 = icmp eq i32 %.1, 0
  br i1 %.not108, label %98, label %90

90:                                               ; preds = %._crit_edge
  %91 = getelementptr inbounds i8, ptr %0, i64 80
  %92 = load i32, ptr %91, align 8, !tbaa !30
  %.not109 = icmp eq i32 %92, 0
  br i1 %.not109, label %93, label %98

93:                                               ; preds = %90
  %94 = load i32, ptr %28, align 8, !tbaa !22
  %.not110 = icmp eq i32 %94, 0
  br i1 %.not110, label %98, label %95

95:                                               ; preds = %93
  %96 = getelementptr inbounds i8, ptr %0, i64 2424
  %97 = load ptr, ptr %96, align 8, !tbaa !16
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %97, i32 noundef 8092, ptr noundef nonnull @.str.6, i32 noundef %.1) #3
  br label %98

98:                                               ; preds = %._crit_edge.thread, %.thread, %95, %93, %90, %._crit_edge
  %.283131 = phi i32 [ 0, %.thread ], [ %.182, %95 ], [ %.182, %93 ], [ %.182, %90 ], [ %.182, %._crit_edge ], [ 0, %._crit_edge.thread ]
  %.3130 = phi double [ 0xFFEFFFFFFFFFFFFF, %.thread ], [ %.288, %95 ], [ %.288, %93 ], [ %.288, %90 ], [ %.288, %._crit_edge ], [ 0xFFEFFFFFFFFFFFFF, %._crit_edge.thread ]
  %.291129 = phi ptr [ null, %.thread ], [ %.190, %95 ], [ %.190, %93 ], [ %.190, %90 ], [ %.190, %._crit_edge ], [ null, %._crit_edge.thread ]
  %.294128 = phi ptr [ null, %.thread ], [ %.193, %95 ], [ %.193, %93 ], [ %.193, %90 ], [ %.193, %._crit_edge ], [ null, %._crit_edge.thread ]
  %99 = getelementptr inbounds i8, ptr %0, i64 1896
  %100 = load double, ptr %99, align 8, !tbaa !31
  %101 = fcmp ogt double %.3130, %100
  br i1 %101, label %102, label %105

102:                                              ; preds = %98
  %103 = getelementptr inbounds i8, ptr %0, i64 2424
  %104 = load ptr, ptr %103, align 8, !tbaa !16
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %104, i32 noundef 6110, ptr noundef nonnull @.str.7, double noundef %.3130, double noundef %100) #3
  br label %.sink.split

105:                                              ; preds = %98
  %.not111 = icmp ne i32 %.283131, 0
  %106 = fcmp ogt double %100, 0x7FDFFFFFFFFFFFFF
  %or.cond121 = and i1 %.not111, %106
  br i1 %or.cond121, label %.sink.split, label %107

.sink.split:                                      ; preds = %105, %102
  call void @qh_errexit2(ptr noundef nonnull %0, i32 noundef 3, ptr noundef %.294128, ptr noundef %.291129) #3
  br label %107

107:                                              ; preds = %.sink.split, %105
  %108 = load i32, ptr %6, align 8, !tbaa !9
  %.not112 = icmp eq i32 %108, 0
  br i1 %.not112, label %112, label %109

109:                                              ; preds = %107
  %110 = getelementptr inbounds i8, ptr %0, i64 2424
  %111 = load ptr, ptr %110, align 8, !tbaa !16
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %111, i32 noundef 20, ptr noundef nonnull @.str.8, double noundef %.3130) #3
  br label %112

112:                                              ; preds = %109, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  ret void
}

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

declare double @qh_maxouter(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @qh_pointfacet(ptr noundef) local_unnamed_addr #2

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

declare void @qh_distplane(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @qh_findbesthorizon(ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @qh_findgooddist(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @qh_settempfree(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @qh_errexit2(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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


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