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

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

@qh_qh = external global %struct.qhT, align 8
@qh_qhstat = external global %struct.qhstatT, align 8
@.str.10 = external hidden unnamed_addr constant [112 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [75 x i8], align 1

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

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

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

declare i32 @qh_pointid(ptr noundef) #2

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

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

27:                                               ; preds = %6
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.facetT, ptr %28, i32 0, i32 7
  %30 = load ptr, ptr %29, align 8, !tbaa !17
  %31 = icmp ne ptr %30, null
  br i1 %31, label %41, label %32

32:                                               ; preds = %27, %6
  %33 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 39), align 4, !tbaa !19
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %37

35:                                               ; preds = %32
  %36 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !20
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %36, i32 noundef 6001, ptr noundef @.str.10)
  call void @qh_errexit(i32 noundef 7, ptr noundef null, ptr noundef null)
  br label %40

37:                                               ; preds = %32
  %38 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !20
  %39 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 190), align 4, !tbaa !21
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %38, i32 noundef 6002, ptr noundef @.str.11, i32 noundef %39)
  call void @qh_errexit(i32 noundef 5, ptr noundef null, ptr noundef null)
  br label %40

40:                                               ; preds = %37, %35
  br label %41

41:                                               ; preds = %40, %27
  %42 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 99), align 8, !tbaa !22
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 99), align 8, !tbaa !22
  %44 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 10), align 4, !tbaa !23
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %49, label %46

46:                                               ; preds = %41
  %47 = load i32, ptr %10, align 4, !tbaa !9
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %46, %41
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %78

50:                                               ; preds = %46
  store i32 1, ptr %20, align 4, !tbaa !9
  %51 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 216), align 8, !tbaa !22
  %52 = icmp sgt i32 %51, 50
  %53 = zext i1 %52 to i64
  %54 = select i1 %52, i32 2, i32 1
  %55 = sitofp i32 %54 to double
  %56 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 39), align 4, !tbaa !19
  %57 = icmp ne i32 %56, 0
  %58 = zext i1 %57 to i64
  %59 = select i1 %57, i32 2, i32 1
  %60 = sitofp i32 %59 to double
  %61 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 6), align 8, !tbaa !24
  %62 = fmul double %60, %61
  %63 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 199), align 8, !tbaa !25
  %64 = fcmp olt double %62, %63
  br i1 %64, label %65, label %67

65:                                               ; preds = %50
  %66 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 199), align 8, !tbaa !25
  br label %75

67:                                               ; preds = %50
  %68 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 39), align 4, !tbaa !19
  %69 = icmp ne i32 %68, 0
  %70 = zext i1 %69 to i64
  %71 = select i1 %69, i32 2, i32 1
  %72 = sitofp i32 %71 to double
  %73 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 6), align 8, !tbaa !24
  %74 = fmul double %72, %73
  br label %75

75:                                               ; preds = %67, %65
  %76 = phi double [ %66, %65 ], [ %74, %67 ]
  %77 = fmul double %55, %76
  store double %77, ptr %19, align 8, !tbaa !11
  br label %78

78:                                               ; preds = %75, %49
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = icmp ne ptr %79, null
  br i1 %80, label %81, label %83

81:                                               ; preds = %78
  %82 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 1, ptr %82, align 4, !tbaa !9
  br label %83

83:                                               ; preds = %81, %78
  %84 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 0, ptr %84, align 4, !tbaa !9
  %85 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !13
  %86 = icmp sge i32 %85, 4
  br i1 %86, label %98, label %87

87:                                               ; preds = %83
  %88 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 92), align 8, !tbaa !26
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %119

90:                                               ; preds = %87
  %91 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 94), align 8, !tbaa !27
  %92 = icmp sge i32 %91, 0
  br i1 %92, label %93, label %119

93:                                               ; preds = %90
  %94 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 94), align 8, !tbaa !27
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = call i32 @qh_pointid(ptr noundef %95)
  %97 = icmp eq i32 %94, %96
  br i1 %97, label %98, label %119

98:                                               ; preds = %93, %83
  %99 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 92), align 8, !tbaa !26
  %100 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !13
  %101 = icmp sgt i32 %99, %100
  br i1 %101, label %102, label %104

102:                                              ; preds = %98
  %103 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 92), align 8, !tbaa !26
  store i32 %103, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !13
  br label %104

104:                                              ; preds = %102, %98
  %105 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !20
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = call i32 @qh_pointid(ptr noundef %106)
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.facetT, ptr %108, i32 0, i32 14
  %110 = load i32, ptr %109, align 4, !tbaa !28
  %111 = load i32, ptr %20, align 4, !tbaa !9
  %112 = load double, ptr %19, align 8, !tbaa !11
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %105, i32 noundef 8008, ptr noundef @.str.12, i32 noundef %107, i32 noundef %110, i32 noundef %111, double noundef %112)
  %113 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !20
  %114 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 190), align 4, !tbaa !21
  %115 = load i32, ptr %18, align 4, !tbaa !9
  %116 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 218), align 4, !tbaa !29
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %113, i32 noundef 8009, ptr noundef @.str.13, i32 noundef %114, i32 noundef %115, i32 noundef %116)
  %117 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !20
  %118 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 216), align 8, !tbaa !22
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %117, i32 noundef 8010, ptr noundef @.str.14, i32 noundef %118)
  br label %119

119:                                              ; preds = %104, %93, %90, %87
  store i32 0, ptr %17, align 4, !tbaa !9
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %120, ptr %15, align 8, !tbaa !5
  br label %121

121:                                              ; preds = %202, %119
  %122 = load i32, ptr %17, align 4, !tbaa !9
  %123 = icmp slt i32 %122, 2
  br i1 %123, label %124, label %206

124:                                              ; preds = %121
  %125 = load ptr, ptr %15, align 8, !tbaa !5
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %201

127:                                              ; preds = %124
  %128 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %128, ptr %15, align 8, !tbaa !5
  br label %129

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

132:                                              ; preds = %129
  %133 = load ptr, ptr %15, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.facetT, ptr %133, i32 0, i32 7
  %135 = load ptr, ptr %134, align 8, !tbaa !17
  %136 = icmp ne ptr %135, null
  br label %137

137:                                              ; preds = %132, %129
  %138 = phi i1 [ false, %129 ], [ %136, %132 ]
  br i1 %138, label %139, label %200

139:                                              ; preds = %137
  %140 = load ptr, ptr %15, align 8, !tbaa !5
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  %142 = icmp eq ptr %140, %141
  br i1 %142, label %143, label %147

143:                                              ; preds = %139
  %144 = load i32, ptr %17, align 4, !tbaa !9
  %145 = icmp ne i32 %144, 0
  br i1 %145, label %146, label %147

146:                                              ; preds = %143
  br label %200

147:                                              ; preds = %143, %139
  %148 = load i32, ptr %18, align 4, !tbaa !9
  %149 = load ptr, ptr %15, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.facetT, ptr %149, i32 0, i32 13
  store i32 %148, ptr %150, align 8, !tbaa !30
  %151 = load ptr, ptr %15, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.facetT, ptr %151, i32 0, i32 15
  %153 = load i32, ptr %152, align 8
  %154 = lshr i32 %153, 16
  %155 = and i32 %154, 1
  %156 = icmp ne i32 %155, 0
  br i1 %156, label %195, label %157

157:                                              ; preds = %147
  %158 = load ptr, ptr %7, align 8, !tbaa !5
  %159 = load ptr, ptr %15, align 8, !tbaa !5
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  call void @qh_distplane(ptr noundef %158, ptr noundef %159, ptr noundef %160)
  %161 = load ptr, ptr %12, align 8, !tbaa !5
  %162 = load i32, ptr %161, align 4, !tbaa !9
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %161, align 4, !tbaa !9
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  %165 = load double, ptr %164, align 8, !tbaa !11
  %166 = load double, ptr %13, align 8, !tbaa !11
  %167 = fcmp ogt double %165, %166
  br i1 %167, label %168, label %194

168:                                              ; preds = %157
  %169 = load ptr, ptr %15, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.facetT, ptr %169, i32 0, i32 15
  %171 = load i32, ptr %170, align 8
  %172 = lshr i32 %171, 17
  %173 = and i32 %172, 1
  %174 = icmp ne i32 %173, 0
  br i1 %174, label %175, label %180

175:                                              ; preds = %168
  %176 = load ptr, ptr %9, align 8, !tbaa !5
  %177 = load double, ptr %176, align 8, !tbaa !11
  %178 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 6), align 8, !tbaa !24
  %179 = fcmp oge double %177, %178
  br i1 %179, label %180, label %193

180:                                              ; preds = %175, %168
  %181 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %181, ptr %14, align 8, !tbaa !5
  %182 = load i32, ptr %20, align 4, !tbaa !9
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %184, label %190

184:                                              ; preds = %180
  %185 = load ptr, ptr %9, align 8, !tbaa !5
  %186 = load double, ptr %185, align 8, !tbaa !11
  %187 = load double, ptr %19, align 8, !tbaa !11
  %188 = fcmp oge double %186, %187
  br i1 %188, label %189, label %190

189:                                              ; preds = %184
  br label %237

190:                                              ; preds = %184, %180
  %191 = load ptr, ptr %9, align 8, !tbaa !5
  %192 = load double, ptr %191, align 8, !tbaa !11
  store double %192, ptr %13, align 8, !tbaa !11
  br label %193

193:                                              ; preds = %190, %175
  br label %194

194:                                              ; preds = %193, %157
  br label %195

195:                                              ; preds = %194, %147
  br label %196

196:                                              ; preds = %195
  %197 = load ptr, ptr %15, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.facetT, ptr %197, i32 0, i32 7
  %199 = load ptr, ptr %198, align 8, !tbaa !17
  store ptr %199, ptr %15, align 8, !tbaa !5
  br label %129, !llvm.loop !31

200:                                              ; preds = %146, %137
  br label %201

201:                                              ; preds = %200, %124
  br label %202

202:                                              ; preds = %201
  %203 = load i32, ptr %17, align 4, !tbaa !9
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %17, align 4, !tbaa !9
  %205 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 166), align 8, !tbaa !33
  store ptr %205, ptr %15, align 8, !tbaa !5
  br label %121, !llvm.loop !34

206:                                              ; preds = %121
  %207 = load i32, ptr %21, align 4, !tbaa !9
  %208 = icmp ne i32 %207, 0
  br i1 %208, label %212, label %209

209:                                              ; preds = %206
  %210 = load ptr, ptr %14, align 8, !tbaa !5
  %211 = icmp ne ptr %210, null
  br i1 %211, label %224, label %212

212:                                              ; preds = %209, %206
  %213 = load ptr, ptr %7, align 8, !tbaa !5
  %214 = load ptr, ptr %14, align 8, !tbaa !5
  %215 = icmp ne ptr %214, null
  br i1 %215, label %216, label %218

216:                                              ; preds = %212
  %217 = load ptr, ptr %14, align 8, !tbaa !5
  br label %220

218:                                              ; preds = %212
  %219 = load ptr, ptr %8, align 8, !tbaa !5
  br label %220

220:                                              ; preds = %218, %216
  %221 = phi ptr [ %217, %216 ], [ %219, %218 ]
  %222 = load ptr, ptr %12, align 8, !tbaa !5
  %223 = call ptr @qh_findbesthorizon(i32 noundef 0, ptr noundef %213, ptr noundef %221, i32 noundef 0, ptr noundef %13, ptr noundef %222)
  store ptr %223, ptr %14, align 8, !tbaa !5
  br label %224

224:                                              ; preds = %220, %209
  %225 = load double, ptr %13, align 8, !tbaa !11
  %226 = load ptr, ptr %9, align 8, !tbaa !5
  store double %225, ptr %226, align 8, !tbaa !11
  %227 = load ptr, ptr %11, align 8, !tbaa !5
  %228 = icmp ne ptr %227, null
  br i1 %228, label %229, label %236

229:                                              ; preds = %224
  %230 = load ptr, ptr %9, align 8, !tbaa !5
  %231 = load double, ptr %230, align 8, !tbaa !11
  %232 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 6), align 8, !tbaa !24
  %233 = fcmp olt double %231, %232
  br i1 %233, label %234, label %236

234:                                              ; preds = %229
  %235 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 0, ptr %235, align 4, !tbaa !9
  br label %236

236:                                              ; preds = %234, %229, %224
  br label %237

237:                                              ; preds = %236, %189
  %238 = load ptr, ptr %12, align 8, !tbaa !5
  %239 = load i32, ptr %238, align 4, !tbaa !9
  %240 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 101), align 8, !tbaa !22
  %241 = add nsw i32 %240, %239
  store i32 %241, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 101), align 8, !tbaa !22
  %242 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 100), align 8, !tbaa !22
  %243 = load ptr, ptr %12, align 8, !tbaa !5
  %244 = load i32, ptr %243, align 4, !tbaa !9
  %245 = icmp slt i32 %242, %244
  br i1 %245, label %246, label %249

246:                                              ; preds = %237
  %247 = load ptr, ptr %12, align 8, !tbaa !5
  %248 = load i32, ptr %247, align 4, !tbaa !9
  store i32 %248, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 100), align 8, !tbaa !22
  br label %249

249:                                              ; preds = %246, %237
  %250 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !13
  %251 = icmp sge i32 %250, 4
  br i1 %251, label %252, label %271

252:                                              ; preds = %249
  %253 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !20
  %254 = load ptr, ptr %14, align 8, !tbaa !5
  %255 = icmp ne ptr %254, null
  br i1 %255, label %256, label %260

256:                                              ; preds = %252
  %257 = load ptr, ptr %14, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.facetT, ptr %257, i32 0, i32 14
  %259 = load i32, ptr %258, align 4, !tbaa !28
  br label %261

260:                                              ; preds = %252
  br label %261

261:                                              ; preds = %260, %256
  %262 = phi i32 [ %259, %256 ], [ -1, %260 ]
  %263 = load ptr, ptr %9, align 8, !tbaa !5
  %264 = load double, ptr %263, align 8, !tbaa !11
  %265 = load ptr, ptr %7, align 8, !tbaa !5
  %266 = call i32 @qh_pointid(ptr noundef %265)
  %267 = load ptr, ptr %8, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.facetT, ptr %267, i32 0, i32 14
  %269 = load i32, ptr %268, align 4, !tbaa !28
  %270 = load i32, ptr %10, align 4, !tbaa !9
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %253, i32 noundef 4004, ptr noundef @.str.15, i32 noundef %262, double noundef %264, i32 noundef %266, i32 noundef %269, i32 noundef %270)
  br label %271

271:                                              ; preds = %261, %249
  %272 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %272, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !13
  %273 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 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 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  ret ptr %273
}

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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, !6, i64 2984, !10, i64 2992}
!15 = !{!"long", !7, i64 0}
!16 = !{!14, !10, i64 2784}
!17 = !{!18, !6, i64 56}
!18 = !{!"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}
!19 = !{!14, !10, i64 188}
!20 = !{!14, !6, i64 2424}
!21 = !{!14, !10, i64 2620}
!22 = !{!7, !7, i64 0}
!23 = !{!14, !10, i64 44}
!24 = !{!14, !12, i64 24}
!25 = !{!14, !12, i64 2680}
!26 = !{!14, !10, i64 536}
!27 = !{!14, !10, i64 544}
!28 = !{!18, !10, i64 108}
!29 = !{!14, !10, i64 2788}
!30 = !{!18, !10, i64 104}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!14, !6, i64 2480}
!34 = distinct !{!34, !32}


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

@qh_qh = external local_unnamed_addr global %struct.qhT, align 8
@qh_qhstat = external local_unnamed_addr global %struct.qhstatT, align 8
@.str.10 = external hidden unnamed_addr constant [112 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [75 x i8], align 1

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

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

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

declare i32 @qh_pointid(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local ptr @qh_findbestnew(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef writeonly %4, ptr noundef %5) local_unnamed_addr #0 {
  %7 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  store double 0xFFDFFFFFFFFFFFFF, ptr %7, align 8, !tbaa !5
  %8 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !9
  %9 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2784), align 8, !tbaa !14
  %10 = add i32 %9, 1
  store i32 %10, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2784), align 8, !tbaa !14
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %14, label %11

11:                                               ; preds = %6
  %12 = getelementptr inbounds i8, ptr %1, i64 56
  %13 = load ptr, ptr %12, align 8, !tbaa !15
  %.not80 = icmp eq ptr %13, null
  br i1 %.not80, label %14, label %20

14:                                               ; preds = %11, %6
  %15 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 188), align 4, !tbaa !17
  %.not81 = icmp eq i32 %15, 0
  %16 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !18
  br i1 %.not81, label %18, label %17

17:                                               ; preds = %14
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %16, i32 noundef 6001, ptr noundef nonnull @.str.10) #3
  br label %.sink.split

18:                                               ; preds = %14
  %19 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2620), align 4, !tbaa !19
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %16, i32 noundef 6002, ptr noundef nonnull @.str.11, i32 noundef %19) #3
  br label %.sink.split

.sink.split:                                      ; preds = %18, %17
  %.sink = phi i32 [ 7, %17 ], [ 5, %18 ]
  tail call void @qh_errexit(i32 noundef %.sink, ptr noundef null, ptr noundef null) #3
  br label %20

20:                                               ; preds = %.sink.split, %11
  %21 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 792), align 8, !tbaa !20
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 792), align 8, !tbaa !20
  %23 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 44), align 4, !tbaa !21
  %24 = or i32 %23, %3
  %or.cond.not.not = icmp ne i32 %24, 0
  br i1 %or.cond.not.not, label %38, label %25

25:                                               ; preds = %20
  %26 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1728), align 8, !tbaa !20
  %27 = icmp sgt i32 %26, 50
  %28 = select i1 %27, i32 2, i32 1
  %29 = uitofp nneg i32 %28 to double
  %30 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 188), align 4, !tbaa !17
  %.not82 = icmp eq i32 %30, 0
  %31 = select i1 %.not82, i32 1, i32 2
  %32 = uitofp nneg i32 %31 to double
  %33 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 24), align 8, !tbaa !22
  %34 = fmul double %33, %32
  %35 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2680), align 8, !tbaa !23
  %36 = fcmp olt double %34, %35
  %. = select i1 %36, double %35, double %34
  %37 = fmul double %., %29
  br label %38

38:                                               ; preds = %20, %25
  %.067 = phi double [ %37, %25 ], [ 0.000000e+00, %20 ]
  %.066 = phi i32 [ 1, %25 ], [ 0, %20 ]
  %.not83 = icmp ne ptr %4, null
  br i1 %.not83, label %39, label %40

39:                                               ; preds = %38
  store i32 1, ptr %4, align 4, !tbaa !24
  br label %40

40:                                               ; preds = %39, %38
  store i32 0, ptr %5, align 4, !tbaa !24
  %41 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !9
  %42 = icmp sgt i32 %41, 3
  br i1 %42, label %51, label %43

43:                                               ; preds = %40
  %44 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 536), align 8, !tbaa !25
  %45 = icmp ne i32 %44, 0
  %46 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 544), align 8
  %47 = icmp sgt i32 %46, -1
  %or.cond3 = select i1 %45, i1 %47, i1 false
  br i1 %or.cond3, label %48, label %65

48:                                               ; preds = %43
  %49 = tail call i32 @qh_pointid(ptr noundef %0) #3
  %50 = icmp eq i32 %46, %49
  br i1 %50, label %._crit_edge, label %65

._crit_edge:                                      ; preds = %48
  %.pre = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !9
  br label %51

51:                                               ; preds = %._crit_edge, %40
  %52 = phi i32 [ %.pre, %._crit_edge ], [ %41, %40 ]
  %53 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 536), align 8, !tbaa !25
  %54 = icmp sgt i32 %53, %52
  br i1 %54, label %55, label %.thread

55:                                               ; preds = %51
  store i32 %53, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !9
  br label %.thread

.thread:                                          ; preds = %51, %55
  %56 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !18
  %57 = tail call i32 @qh_pointid(ptr noundef %0) #3
  %58 = getelementptr inbounds i8, ptr %1, i64 108
  %59 = load i32, ptr %58, align 4, !tbaa !26
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %56, i32 noundef 8008, ptr noundef nonnull @.str.12, i32 noundef %57, i32 noundef %59, i32 noundef %.066, double noundef %.067) #3
  %60 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !18
  %61 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2620), align 4, !tbaa !19
  %62 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2788), align 4, !tbaa !27
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %60, i32 noundef 8009, ptr noundef nonnull @.str.13, i32 noundef %61, i32 noundef %10, i32 noundef %62) #3
  %63 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !18
  %64 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1728), align 8, !tbaa !20
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %63, i32 noundef 8010, ptr noundef nonnull @.str.14, i32 noundef %64) #3
  br label %.preheader.split.us.preheader

65:                                               ; preds = %48, %43
  br i1 %.not, label %.critedge, label %.preheader.split.us.preheader

.preheader.split.us.preheader:                    ; preds = %65, %.thread
  br label %.preheader.split.us

.preheader.split.us:                              ; preds = %.preheader.split.us.preheader, %86
  %.1101.us = phi ptr [ %.2.us, %86 ], [ null, %.preheader.split.us.preheader ]
  %.169100.us = phi ptr [ %88, %86 ], [ %1, %.preheader.split.us.preheader ]
  %66 = phi double [ %87, %86 ], [ 0xFFDFFFFFFFFFFFFF, %.preheader.split.us.preheader ]
  %67 = getelementptr inbounds i8, ptr %.169100.us, i64 56
  %68 = load ptr, ptr %67, align 8, !tbaa !15
  %.not87.us = icmp eq ptr %68, null
  br i1 %.not87.us, label %.critedge, label %69

69:                                               ; preds = %.preheader.split.us
  %70 = getelementptr inbounds i8, ptr %.169100.us, i64 104
  store i32 %10, ptr %70, align 8, !tbaa !28
  %71 = getelementptr inbounds i8, ptr %.169100.us, i64 112
  %72 = load i32, ptr %71, align 8
  %73 = and i32 %72, 65536
  %.not88.us = icmp eq i32 %73, 0
  br i1 %.not88.us, label %74, label %86

74:                                               ; preds = %69
  tail call void @qh_distplane(ptr noundef %0, ptr noundef nonnull %.169100.us, ptr noundef %2)
  %75 = load i32, ptr %5, align 4, !tbaa !24
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %5, align 4, !tbaa !24
  %77 = load double, ptr %2, align 8, !tbaa !5
  %78 = fcmp ogt double %77, %66
  br i1 %78, label %79, label %86

79:                                               ; preds = %74
  %80 = load i32, ptr %71, align 8
  %81 = and i32 %80, 131072
  %.not89.us = icmp ne i32 %81, 0
  %82 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 24), align 8
  %83 = fcmp ult double %77, %82
  %or.cond.us = select i1 %.not89.us, i1 %83, i1 false
  br i1 %or.cond.us, label %86, label %84

84:                                               ; preds = %79
  %85 = fcmp ult double %77, %.067
  %or.cond95.us = select i1 %or.cond.not.not, i1 true, i1 %85
  br i1 %or.cond95.us, label %86, label %.loopexit

86:                                               ; preds = %84, %79, %74, %69
  %87 = phi double [ %66, %69 ], [ %66, %74 ], [ %66, %79 ], [ %77, %84 ]
  %.2.us = phi ptr [ %.1101.us, %69 ], [ %.1101.us, %74 ], [ %.1101.us, %79 ], [ %.169100.us, %84 ]
  %88 = load ptr, ptr %67, align 8, !tbaa !15
  %.not86.us = icmp eq ptr %88, null
  br i1 %.not86.us, label %.critedge, label %.preheader.split.us, !llvm.loop !29

.critedge:                                        ; preds = %86, %.preheader.split.us, %65
  %.us-phi106 = phi double [ 0xFFDFFFFFFFFFFFFF, %65 ], [ %66, %.preheader.split.us ], [ %87, %86 ]
  %.3 = phi ptr [ null, %65 ], [ %.1101.us, %.preheader.split.us ], [ %.2.us, %86 ]
  %89 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2480), align 8, !tbaa !31
  %.not85.1 = icmp eq ptr %89, null
  br i1 %.not85.1, label %.critedge.1, label %.preheader.split.1

.preheader.split.1:                               ; preds = %.critedge, %111
  %.1101.1 = phi ptr [ %.2.1, %111 ], [ %.3, %.critedge ]
  %.169100.1 = phi ptr [ %113, %111 ], [ %89, %.critedge ]
  %90 = phi double [ %112, %111 ], [ %.us-phi106, %.critedge ]
  %91 = getelementptr inbounds i8, ptr %.169100.1, i64 56
  %92 = load ptr, ptr %91, align 8, !tbaa !15
  %.not87.1 = icmp eq ptr %92, null
  %93 = icmp eq ptr %.169100.1, %1
  %or.cond114.1 = or i1 %.not87.1, %93
  br i1 %or.cond114.1, label %.critedge.1, label %94

94:                                               ; preds = %.preheader.split.1
  %95 = getelementptr inbounds i8, ptr %.169100.1, i64 104
  store i32 %10, ptr %95, align 8, !tbaa !28
  %96 = getelementptr inbounds i8, ptr %.169100.1, i64 112
  %97 = load i32, ptr %96, align 8
  %98 = and i32 %97, 65536
  %.not88.1 = icmp eq i32 %98, 0
  br i1 %.not88.1, label %99, label %111

99:                                               ; preds = %94
  tail call void @qh_distplane(ptr noundef %0, ptr noundef nonnull %.169100.1, ptr noundef %2)
  %100 = load i32, ptr %5, align 4, !tbaa !24
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %5, align 4, !tbaa !24
  %102 = load double, ptr %2, align 8, !tbaa !5
  %103 = fcmp ogt double %102, %90
  br i1 %103, label %104, label %111

104:                                              ; preds = %99
  %105 = load i32, ptr %96, align 8
  %106 = and i32 %105, 131072
  %.not89.1 = icmp ne i32 %106, 0
  %107 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 24), align 8
  %108 = fcmp ult double %102, %107
  %or.cond.1 = select i1 %.not89.1, i1 %108, i1 false
  br i1 %or.cond.1, label %111, label %109

109:                                              ; preds = %104
  %110 = fcmp ult double %102, %.067
  %or.cond95.1 = select i1 %or.cond.not.not, i1 true, i1 %110
  br i1 %or.cond95.1, label %111, label %.loopexit

111:                                              ; preds = %109, %104, %99, %94
  %112 = phi double [ %90, %94 ], [ %90, %99 ], [ %90, %104 ], [ %102, %109 ]
  %.2.1 = phi ptr [ %.1101.1, %94 ], [ %.1101.1, %99 ], [ %.1101.1, %104 ], [ %.169100.1, %109 ]
  %113 = load ptr, ptr %91, align 8, !tbaa !15
  %.not86.1 = icmp eq ptr %113, null
  br i1 %.not86.1, label %.critedge.1, label %.preheader.split.1, !llvm.loop !29

.critedge.1:                                      ; preds = %.preheader.split.1, %111, %.critedge
  %.us-phi106.1 = phi double [ %.us-phi106, %.critedge ], [ %90, %.preheader.split.1 ], [ %112, %111 ]
  %.3.1 = phi ptr [ %.3, %.critedge ], [ %.1101.1, %.preheader.split.1 ], [ %.2.1, %111 ]
  store double %.us-phi106.1, ptr %7, align 8, !tbaa !5
  %.not84 = icmp eq ptr %.3.1, null
  %114 = select i1 %.not84, ptr %1, ptr %.3.1
  %115 = call ptr @qh_findbesthorizon(i32 noundef 0, ptr noundef %0, ptr noundef %114, i32 noundef 0, ptr noundef nonnull %7, ptr noundef nonnull %5)
  %116 = load double, ptr %7, align 8, !tbaa !5
  store double %116, ptr %2, align 8, !tbaa !5
  %117 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 24), align 8
  %118 = fcmp olt double %116, %117
  %or.cond94 = select i1 %.not83, i1 %118, i1 false
  br i1 %or.cond94, label %119, label %120

119:                                              ; preds = %.critedge.1
  store i32 0, ptr %4, align 4, !tbaa !24
  br label %120

.loopexit:                                        ; preds = %84, %109
  %.us-phi103 = phi double [ %90, %109 ], [ %66, %84 ]
  %.us-phi104 = phi ptr [ %.169100.1, %109 ], [ %.169100.us, %84 ]
  store double %.us-phi103, ptr %7, align 8, !tbaa !5
  br label %120

120:                                              ; preds = %.loopexit, %.critedge.1, %119
  %.5 = phi ptr [ %115, %119 ], [ %115, %.critedge.1 ], [ %.us-phi104, %.loopexit ]
  %121 = load i32, ptr %5, align 4, !tbaa !24
  %122 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 808), align 8, !tbaa !20
  %123 = add nsw i32 %122, %121
  store i32 %123, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 808), align 8, !tbaa !20
  %124 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 800), align 8, !tbaa !20
  %125 = load i32, ptr %5, align 4, !tbaa !24
  %126 = icmp slt i32 %124, %125
  br i1 %126, label %127, label %128

127:                                              ; preds = %120
  store i32 %125, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 800), align 8, !tbaa !20
  br label %128

128:                                              ; preds = %127, %120
  %129 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !9
  %130 = icmp sgt i32 %129, 3
  br i1 %130, label %131, label %142

131:                                              ; preds = %128
  %132 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !18
  %.not91 = icmp eq ptr %.5, null
  br i1 %.not91, label %136, label %133

133:                                              ; preds = %131
  %134 = getelementptr inbounds i8, ptr %.5, i64 108
  %135 = load i32, ptr %134, align 4, !tbaa !26
  br label %136

136:                                              ; preds = %131, %133
  %137 = phi i32 [ %135, %133 ], [ -1, %131 ]
  %138 = load double, ptr %2, align 8, !tbaa !5
  %139 = call i32 @qh_pointid(ptr noundef %0) #3
  %140 = getelementptr inbounds i8, ptr %1, i64 108
  %141 = load i32, ptr %140, align 4, !tbaa !26
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %132, i32 noundef 4004, ptr noundef nonnull @.str.15, i32 noundef %137, double noundef %138, i32 noundef %139, i32 noundef %141, i32 noundef %3) #3
  br label %142

142:                                              ; preds = %136, %128
  store i32 %8, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  ret ptr %.5
}

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

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

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


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