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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.qhT = type { i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [29 x i32], i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, i32, ptr, i32, [256 x i8], i32, [256 x i8], [512 x i8], i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, double, double, double, double, double, double, double, double, double, double, double, double, double, double, ptr, double, double, double, double, i32, [6 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, double, i32, i32, i32, i32, i32, i32, ptr, ptr, i32 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.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.54 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [78 x i8], align 1

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

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

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

declare i32 @qh_pointid(ptr noundef) #1

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

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

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

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

declare void @qh_removefacet(ptr noundef) #1

declare void @qh_appendfacet(ptr noundef) #1

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

declare ptr @qh_setlast(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @qh_partitionpoint(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  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 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %11 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 204), align 8, !tbaa !11
  %12 = icmp ne i32 %11, 0
  br i1 %12, label %13, label %18

13:                                               ; preds = %2
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 10), align 4, !tbaa !15
  %17 = call ptr @qh_findbestnew(ptr noundef %14, ptr noundef %15, ptr noundef %5, i32 noundef %16, ptr noundef %7, ptr noundef %10)
  store ptr %17, ptr %9, align 8, !tbaa !5
  br label %23

18:                                               ; preds = %2
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 10), align 4, !tbaa !15
  %22 = call ptr @qh_findbest(ptr noundef %19, ptr noundef %20, i32 noundef %21, i32 noundef 1, i32 noundef 0, ptr noundef %5, ptr noundef %7, ptr noundef %10)
  store ptr %22, ptr %9, align 8, !tbaa !5
  br label %23

23:                                               ; preds = %18, %13
  %24 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 218), align 8, !tbaa !16
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 218), align 8, !tbaa !16
  %26 = load i32, ptr %10, align 4, !tbaa !9
  %27 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 175), align 8, !tbaa !16
  %28 = add nsw i32 %27, %26
  store i32 %28, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 175), align 8, !tbaa !16
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.facetT, ptr %29, i32 0, i32 15
  %31 = load i32, ptr %30, align 8
  %32 = lshr i32 %31, 11
  %33 = and i32 %32, 1
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %47

35:                                               ; preds = %23
  %36 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !17
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = call i32 @qh_pointid(ptr noundef %37)
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.facetT, ptr %39, i32 0, i32 14
  %41 = load i32, ptr %40, align 4, !tbaa !18
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.facetT, ptr %42, i32 0, i32 14
  %44 = load i32, ptr %43, align 4, !tbaa !18
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %36, i32 noundef 6293, ptr noundef @.str.54, i32 noundef %38, i32 noundef %41, i32 noundef %44)
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  call void @qh_errexit2(i32 noundef 5, ptr noundef %45, ptr noundef %46)
  br label %47

47:                                               ; preds = %35, %23
  %48 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 150), align 8, !tbaa !20
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %50, label %80

50:                                               ; preds = %47
  %51 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 17), align 8, !tbaa !21
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %62

53:                                               ; preds = %50
  %54 = load i32, ptr %7, align 4, !tbaa !9
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %62, label %56

56:                                               ; preds = %53
  %57 = load double, ptr %5, align 8, !tbaa !22
  %58 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 35), align 8, !tbaa !23
  %59 = fneg double %58
  %60 = fcmp oge double %57, %59
  br i1 %60, label %61, label %62

61:                                               ; preds = %56
  call void @qh_joggle_restart(ptr noundef @.str.55)
  br label %62

62:                                               ; preds = %61, %56, %53, %50
  %63 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 109), align 4, !tbaa !24
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %72

65:                                               ; preds = %62
  %66 = load double, ptr %5, align 8, !tbaa !22
  %67 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 146), align 8, !tbaa !25
  %68 = fneg double %67
  %69 = fcmp oge double %66, %68
  br i1 %69, label %70, label %71

70:                                               ; preds = %65
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %70, %65
  br label %79

72:                                               ; preds = %62
  %73 = load double, ptr %5, align 8, !tbaa !22
  %74 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 35), align 8, !tbaa !23
  %75 = fneg double %74
  %76 = fcmp oge double %73, %75
  br i1 %76, label %77, label %78

77:                                               ; preds = %72
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %77, %72
  br label %79

79:                                               ; preds = %78, %71
  br label %80

80:                                               ; preds = %79, %47
  %81 = load i32, ptr %7, align 4, !tbaa !9
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %83, label %196

83:                                               ; preds = %80
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.facetT, ptr %84, i32 0, i32 11
  %86 = load ptr, ptr %85, align 8, !tbaa !26
  %87 = icmp ne ptr %86, null
  br i1 %87, label %88, label %94

88:                                               ; preds = %83
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.facetT, ptr %89, i32 0, i32 11
  %91 = load ptr, ptr %90, align 8, !tbaa !26
  %92 = call ptr @qh_setlast(ptr noundef %91)
  %93 = icmp ne ptr %92, null
  br i1 %93, label %109, label %94

94:                                               ; preds = %88, %83
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.facetT, ptr %95, i32 0, i32 11
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  call void @qh_setappend(ptr noundef %96, ptr noundef %97)
  %98 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 150), align 8, !tbaa !20
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %104

100:                                              ; preds = %94
  %101 = load double, ptr %5, align 8, !tbaa !22
  %102 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 6), align 8, !tbaa !27
  %103 = fcmp ogt double %101, %102
  br i1 %103, label %104, label %105

104:                                              ; preds = %100, %94
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %104, %100
  %106 = load double, ptr %5, align 8, !tbaa !22
  %107 = load ptr, ptr %9, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.facetT, ptr %107, i32 0, i32 0
  store double %106, ptr %108, align 8, !tbaa !28
  br label %140

109:                                              ; preds = %88
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.facetT, ptr %110, i32 0, i32 0
  %112 = load double, ptr %111, align 8, !tbaa !28
  store double %112, ptr %6, align 8, !tbaa !22
  %113 = load double, ptr %6, align 8, !tbaa !22
  %114 = load double, ptr %5, align 8, !tbaa !22
  %115 = fcmp olt double %113, %114
  br i1 %115, label %116, label %135

116:                                              ; preds = %109
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.facetT, ptr %117, i32 0, i32 11
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  call void @qh_setappend(ptr noundef %118, ptr noundef %119)
  %120 = load double, ptr %5, align 8, !tbaa !22
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.facetT, ptr %121, i32 0, i32 0
  store double %120, ptr %122, align 8, !tbaa !28
  %123 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 150), align 8, !tbaa !20
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %125, label %134

125:                                              ; preds = %116
  %126 = load double, ptr %6, align 8, !tbaa !22
  %127 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 6), align 8, !tbaa !27
  %128 = fcmp olt double %126, %127
  br i1 %128, label %129, label %134

129:                                              ; preds = %125
  %130 = load double, ptr %5, align 8, !tbaa !22
  %131 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 6), align 8, !tbaa !27
  %132 = fcmp oge double %130, %131
  br i1 %132, label %133, label %134

133:                                              ; preds = %129
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %134

134:                                              ; preds = %133, %129, %125, %116
  br label %139

135:                                              ; preds = %109
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.facetT, ptr %136, i32 0, i32 11
  %138 = load ptr, ptr %3, align 8, !tbaa !5
  call void @qh_setappend2ndlast(ptr noundef %137, ptr noundef %138)
  br label %139

139:                                              ; preds = %135, %134
  br label %140

140:                                              ; preds = %139, %105
  %141 = load i32, ptr %8, align 4, !tbaa !9
  %142 = icmp ne i32 %141, 0
  br i1 %142, label %143, label %177

143:                                              ; preds = %140
  %144 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 165), align 8, !tbaa !29
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = icmp ne ptr %144, %145
  br i1 %146, label %147, label %177

147:                                              ; preds = %143
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.facetT, ptr %148, i32 0, i32 15
  %150 = load i32, ptr %149, align 8
  %151 = lshr i32 %150, 10
  %152 = and i32 %151, 1
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %154, label %164

154:                                              ; preds = %147
  %155 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 165), align 8, !tbaa !29
  %156 = getelementptr inbounds %struct.facetT, ptr %155, i32 0, i32 15
  %157 = load i32, ptr %156, align 8
  %158 = lshr i32 %157, 10
  %159 = and i32 %158, 1
  %160 = icmp ne i32 %159, 0
  br i1 %160, label %161, label %163

161:                                              ; preds = %154
  %162 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 166), align 8, !tbaa !30
  store ptr %162, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 165), align 8, !tbaa !29
  br label %163

163:                                              ; preds = %161, %154
  br label %176

164:                                              ; preds = %147
  %165 = load ptr, ptr %9, align 8, !tbaa !5
  call void @qh_removefacet(ptr noundef %165)
  %166 = load ptr, ptr %9, align 8, !tbaa !5
  call void @qh_appendfacet(ptr noundef %166)
  %167 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 166), align 8, !tbaa !30
  %168 = icmp ne ptr %167, null
  br i1 %168, label %169, label %175

169:                                              ; preds = %164
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.facetT, ptr %170, i32 0, i32 15
  %172 = load i32, ptr %171, align 8
  %173 = and i32 %172, -1025
  %174 = or i32 %173, 1024
  store i32 %174, ptr %171, align 8
  br label %175

175:                                              ; preds = %169, %164
  br label %176

176:                                              ; preds = %175, %163
  br label %177

177:                                              ; preds = %176, %143, %140
  %178 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 180), align 8, !tbaa !31
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 180), align 8, !tbaa !31
  %180 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !32
  %181 = icmp sge i32 %180, 4
  br i1 %181, label %182, label %195

182:                                              ; preds = %177
  %183 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !17
  %184 = load ptr, ptr %3, align 8, !tbaa !5
  %185 = call i32 @qh_pointid(ptr noundef %184)
  %186 = load ptr, ptr %9, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.facetT, ptr %186, i32 0, i32 14
  %188 = load i32, ptr %187, align 4, !tbaa !18
  %189 = load ptr, ptr %9, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.facetT, ptr %189, i32 0, i32 15
  %191 = load i32, ptr %190, align 8
  %192 = lshr i32 %191, 10
  %193 = and i32 %192, 1
  %194 = load i32, ptr %8, align 4, !tbaa !9
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %183, i32 noundef 4065, ptr noundef @.str.56, i32 noundef %185, i32 noundef %188, i32 noundef %193, i32 noundef %194)
  br label %195

195:                                              ; preds = %182, %177
  br label %272

196:                                              ; preds = %80
  %197 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 17), align 8, !tbaa !21
  %198 = icmp ne i32 %197, 0
  br i1 %198, label %204, label %199

199:                                              ; preds = %196
  %200 = load double, ptr %5, align 8, !tbaa !22
  %201 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 35), align 8, !tbaa !23
  %202 = fneg double %201
  %203 = fcmp oge double %200, %202
  br i1 %203, label %204, label %235

204:                                              ; preds = %199, %196
  %205 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 17), align 8, !tbaa !21
  %206 = icmp ne i32 %205, 0
  br i1 %206, label %207, label %208

207:                                              ; preds = %204
  call void @qh_joggle_restart(ptr noundef @.str.57)
  br label %208

208:                                              ; preds = %207, %204
  %209 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 40), align 8, !tbaa !16
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 40), align 8, !tbaa !16
  %211 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 31), align 8, !tbaa !33
  %212 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 109), align 4, !tbaa !24
  %213 = add i32 %211, %212
  %214 = icmp ne i32 %213, 0
  br i1 %214, label %219, label %215

215:                                              ; preds = %208
  %216 = load double, ptr %5, align 8, !tbaa !22
  %217 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 199), align 8, !tbaa !34
  %218 = fcmp ogt double %216, %217
  br i1 %218, label %219, label %223

219:                                              ; preds = %215, %208
  %220 = load ptr, ptr %3, align 8, !tbaa !5
  %221 = load ptr, ptr %9, align 8, !tbaa !5
  %222 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 204), align 8, !tbaa !11
  call void @qh_partitioncoplanar(ptr noundef %220, ptr noundef %221, ptr noundef %5, i32 noundef %222)
  br label %234

223:                                              ; preds = %215
  %224 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !32
  %225 = icmp sge i32 %224, 4
  br i1 %225, label %226, label %233

226:                                              ; preds = %223
  %227 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !17
  %228 = load ptr, ptr %3, align 8, !tbaa !5
  %229 = call i32 @qh_pointid(ptr noundef %228)
  %230 = load ptr, ptr %9, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.facetT, ptr %230, i32 0, i32 14
  %232 = load i32, ptr %231, align 4, !tbaa !18
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %227, i32 noundef 4066, ptr noundef @.str.58, i32 noundef %229, i32 noundef %232)
  br label %233

233:                                              ; preds = %226, %223
  br label %234

234:                                              ; preds = %233, %219
  br label %271

235:                                              ; preds = %199
  %236 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 109), align 4, !tbaa !24
  %237 = icmp ne i32 %236, 0
  br i1 %237, label %238, label %249

238:                                              ; preds = %235
  %239 = load double, ptr %5, align 8, !tbaa !22
  %240 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 146), align 8, !tbaa !25
  %241 = fneg double %240
  %242 = fcmp oge double %239, %241
  br i1 %242, label %243, label %249

243:                                              ; preds = %238
  %244 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 177), align 8, !tbaa !16
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 177), align 8, !tbaa !16
  %246 = load ptr, ptr %3, align 8, !tbaa !5
  %247 = load ptr, ptr %9, align 8, !tbaa !5
  %248 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 204), align 8, !tbaa !11
  call void @qh_partitioncoplanar(ptr noundef %246, ptr noundef %247, ptr noundef %5, i32 noundef %248)
  br label %270

249:                                              ; preds = %238, %235
  %250 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 174), align 8, !tbaa !16
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 174), align 8, !tbaa !16
  %252 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !32
  %253 = icmp sge i32 %252, 4
  br i1 %253, label %254, label %262

254:                                              ; preds = %249
  %255 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !17
  %256 = load ptr, ptr %3, align 8, !tbaa !5
  %257 = call i32 @qh_pointid(ptr noundef %256)
  %258 = load ptr, ptr %9, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.facetT, ptr %258, i32 0, i32 14
  %260 = load i32, ptr %259, align 4, !tbaa !18
  %261 = load double, ptr %5, align 8, !tbaa !22
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %255, i32 noundef 4067, ptr noundef @.str.59, i32 noundef %257, i32 noundef %260, double noundef %261)
  br label %262

262:                                              ; preds = %254, %249
  %263 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 32), align 4, !tbaa !35
  %264 = icmp ne i32 %263, 0
  br i1 %264, label %265, label %269

265:                                              ; preds = %262
  %266 = load ptr, ptr %3, align 8, !tbaa !5
  %267 = load ptr, ptr %9, align 8, !tbaa !5
  %268 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 204), align 8, !tbaa !11
  call void @qh_partitioncoplanar(ptr noundef %266, ptr noundef %267, ptr noundef %5, i32 noundef %268)
  br label %269

269:                                              ; preds = %265, %262
  br label %270

270:                                              ; preds = %269, %243
  br label %271

271:                                              ; preds = %270, %234
  br label %272

272:                                              ; preds = %271, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, 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
  ret void
}

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

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

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

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

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


; 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.54 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [78 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 void @qh_fprintf(ptr noundef, i32 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

declare i32 @qh_pointid(ptr noundef) local_unnamed_addr #1

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

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

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

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

declare void @qh_removefacet(ptr noundef) local_unnamed_addr #1

declare void @qh_appendfacet(ptr noundef) local_unnamed_addr #1

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

declare ptr @qh_setlast(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @qh_partitionpoint(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca double, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %6 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2712), align 8, !tbaa !5
  %.not = icmp eq i32 %6, 0
  %7 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 44), align 4, !tbaa !13
  br i1 %.not, label %10, label %8

8:                                                ; preds = %2
  %9 = call ptr @qh_findbestnew(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %3, i32 noundef %7, ptr noundef nonnull %4, ptr noundef nonnull %5) #3
  br label %12

10:                                               ; preds = %2
  %11 = call ptr @qh_findbest(ptr noundef %0, ptr noundef %1, i32 noundef %7, i32 noundef 1, i32 noundef 0, ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %5) #3
  br label %12

12:                                               ; preds = %10, %8
  %.0 = phi ptr [ %9, %8 ], [ %11, %10 ]
  %13 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1744), align 8, !tbaa !14
  %14 = add nsw i32 %13, 1
  store i32 %14, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1744), align 8, !tbaa !14
  %15 = load i32, ptr %5, align 4, !tbaa !15
  %16 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1400), align 8, !tbaa !14
  %17 = add nsw i32 %16, %15
  store i32 %17, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1400), align 8, !tbaa !14
  %18 = getelementptr inbounds i8, ptr %.0, i64 112
  %19 = load i32, ptr %18, align 8
  %20 = and i32 %19, 2048
  %.not49 = icmp eq i32 %20, 0
  br i1 %.not49, label %28, label %21

21:                                               ; preds = %12
  %22 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !16
  %23 = call i32 @qh_pointid(ptr noundef %0) #3
  %24 = getelementptr inbounds i8, ptr %1, i64 108
  %25 = load i32, ptr %24, align 4, !tbaa !17
  %26 = getelementptr inbounds i8, ptr %.0, i64 108
  %27 = load i32, ptr %26, align 4, !tbaa !17
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %22, i32 noundef 6293, ptr noundef nonnull @.str.54, i32 noundef %23, i32 noundef %25, i32 noundef %27) #3
  call void @qh_errexit2(i32 noundef 5, ptr noundef %1, ptr noundef nonnull %.0)
  br label %28

28:                                               ; preds = %21, %12
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1912), align 8, !tbaa !19
  %.not50 = icmp eq i32 %29, 0
  br i1 %.not50, label %54, label %30

30:                                               ; preds = %28
  %31 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 80), align 8, !tbaa !20
  %32 = icmp eq i32 %31, 0
  %33 = load i32, ptr %4, align 4
  %34 = icmp ne i32 %33, 0
  %or.cond = select i1 %32, i1 true, i1 %34
  br i1 %or.cond, label %41, label %35

35:                                               ; preds = %30
  %36 = load double, ptr %3, align 8, !tbaa !21
  %37 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 168), align 8, !tbaa !22
  %38 = fneg double %37
  %39 = fcmp ult double %36, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %35
  call void @qh_joggle_restart(ptr noundef nonnull @.str.55)
  br label %41

41:                                               ; preds = %40, %35, %30
  %42 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 628), align 4, !tbaa !23
  %.not51 = icmp eq i32 %42, 0
  %43 = load double, ptr %3, align 8, !tbaa !21
  br i1 %.not51, label %49, label %44

44:                                               ; preds = %41
  %45 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1880), align 8, !tbaa !24
  %46 = fneg double %45
  %47 = fcmp ult double %43, %46
  br i1 %47, label %54, label %48

48:                                               ; preds = %44
  store i32 1, ptr %4, align 4, !tbaa !15
  br label %.thread

49:                                               ; preds = %41
  %50 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 168), align 8, !tbaa !22
  %51 = fneg double %50
  %52 = fcmp ult double %43, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  store i32 1, ptr %4, align 4, !tbaa !15
  br label %.thread

54:                                               ; preds = %44, %49, %28
  %.pr = load i32, ptr %4, align 4, !tbaa !15
  %.not52 = icmp eq i32 %.pr, 0
  br i1 %.not52, label %102, label %.thread

.thread:                                          ; preds = %53, %48, %54
  %55 = getelementptr inbounds i8, ptr %.0, i64 88
  %56 = load ptr, ptr %55, align 8, !tbaa !25
  %.not58 = icmp eq ptr %56, null
  br i1 %.not58, label %59, label %57

57:                                               ; preds = %.thread
  %58 = call ptr @qh_setlast(ptr noundef nonnull %56) #3
  %.not59 = icmp eq ptr %58, null
  br i1 %.not59, label %59, label %63

59:                                               ; preds = %57, %.thread
  call void @qh_setappend(ptr noundef nonnull %55, ptr noundef %0) #3
  %60 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1912), align 8, !tbaa !19
  %.not60 = icmp eq i32 %60, 0
  %.pre = load double, ptr %3, align 8, !tbaa !21
  %61 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 24), align 8
  %62 = fcmp ogt double %.pre, %61
  %or.cond86 = select i1 %.not60, i1 true, i1 %62
  store double %.pre, ptr %.0, align 8, !tbaa !26
  br i1 %or.cond86, label %.thread75, label %.thread71

63:                                               ; preds = %57
  %64 = load double, ptr %.0, align 8, !tbaa !26
  %65 = load double, ptr %3, align 8, !tbaa !21
  %66 = fcmp olt double %64, %65
  br i1 %66, label %67, label %74

67:                                               ; preds = %63
  call void @qh_setappend(ptr noundef nonnull %55, ptr noundef %0) #3
  %68 = load double, ptr %3, align 8
  store double %68, ptr %.0, align 8, !tbaa !26
  %69 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1912), align 8, !tbaa !19
  %.not61 = icmp eq i32 %69, 0
  br i1 %.not61, label %.thread71, label %70

70:                                               ; preds = %67
  %71 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 24), align 8, !tbaa !27
  %72 = fcmp uge double %64, %71
  %73 = fcmp ult double %68, %71
  %or.cond68 = select i1 %72, i1 true, i1 %73
  br i1 %or.cond68, label %.thread71, label %.thread75

74:                                               ; preds = %63
  call void @qh_setappend2ndlast(ptr noundef nonnull %55, ptr noundef %0) #3
  br label %.thread71

.thread75:                                        ; preds = %59, %70
  %75 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2472), align 8, !tbaa !28
  %.not63 = icmp eq ptr %75, %.0
  br i1 %.not63, label %.thread71, label %76

76:                                               ; preds = %.thread75
  %77 = load i32, ptr %18, align 8
  %78 = and i32 %77, 1024
  %.not64 = icmp eq i32 %78, 0
  br i1 %.not64, label %85, label %79

79:                                               ; preds = %76
  %80 = getelementptr inbounds i8, ptr %75, i64 112
  %81 = load i32, ptr %80, align 8
  %82 = and i32 %81, 1024
  %.not66 = icmp eq i32 %82, 0
  br i1 %.not66, label %.thread71, label %83

83:                                               ; preds = %79
  %84 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2480), align 8, !tbaa !29
  store ptr %84, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2472), align 8, !tbaa !28
  br label %.thread71

85:                                               ; preds = %76
  call void @qh_removefacet(ptr noundef nonnull %.0) #3
  call void @qh_appendfacet(ptr noundef nonnull %.0) #3
  %86 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2480), align 8, !tbaa !29
  %.not65 = icmp eq ptr %86, null
  br i1 %.not65, label %.thread71, label %87

87:                                               ; preds = %85
  %88 = load i32, ptr %18, align 8
  %89 = or i32 %88, 1024
  store i32 %89, ptr %18, align 8
  br label %.thread71

.thread71:                                        ; preds = %59, %70, %74, %67, %83, %79, %87, %85, %.thread75
  %.174 = phi i32 [ 1, %83 ], [ 1, %79 ], [ 1, %87 ], [ 1, %85 ], [ 1, %.thread75 ], [ 0, %67 ], [ 0, %74 ], [ 0, %70 ], [ 0, %59 ]
  %90 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2576), align 8, !tbaa !30
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2576), align 8, !tbaa !30
  %92 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !31
  %93 = icmp sgt i32 %92, 3
  br i1 %93, label %94, label %153

94:                                               ; preds = %.thread71
  %95 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !16
  %96 = call i32 @qh_pointid(ptr noundef %0) #3
  %97 = getelementptr inbounds i8, ptr %.0, i64 108
  %98 = load i32, ptr %97, align 4, !tbaa !17
  %99 = load i32, ptr %18, align 8
  %100 = lshr i32 %99, 10
  %101 = and i32 %100, 1
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %95, i32 noundef 4065, ptr noundef nonnull @.str.56, i32 noundef %96, i32 noundef %98, i32 noundef %101, i32 noundef %.174) #3
  br label %153

102:                                              ; preds = %54
  %103 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 80), align 8, !tbaa !20
  %.not53 = icmp eq i32 %103, 0
  br i1 %.not53, label %104, label %109

104:                                              ; preds = %102
  %105 = load double, ptr %3, align 8, !tbaa !21
  %106 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 168), align 8, !tbaa !22
  %107 = fneg double %106
  %108 = fcmp ult double %105, %107
  %.pre84 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 628), align 4, !tbaa !23
  br i1 %108, label %129, label %.thread82

109:                                              ; preds = %102
  call void @qh_joggle_restart(ptr noundef nonnull @.str.57)
  %.pre83 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 628), align 4, !tbaa !23
  br label %.thread82

.thread82:                                        ; preds = %104, %109
  %110 = phi i32 [ %.pre84, %104 ], [ %.pre83, %109 ]
  %111 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 320), align 8, !tbaa !14
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 320), align 8, !tbaa !14
  %113 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 144), align 8, !tbaa !32
  %114 = sub i32 0, %110
  %.not57 = icmp eq i32 %113, %114
  br i1 %.not57, label %115, label %119

115:                                              ; preds = %.thread82
  %116 = load double, ptr %3, align 8, !tbaa !21
  %117 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2680), align 8, !tbaa !33
  %118 = fcmp ogt double %116, %117
  br i1 %118, label %119, label %121

119:                                              ; preds = %115, %.thread82
  %120 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2712), align 8, !tbaa !5
  call void @qh_partitioncoplanar(ptr noundef %0, ptr noundef nonnull %.0, ptr noundef nonnull %3, i32 noundef %120)
  br label %153

121:                                              ; preds = %115
  %122 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !31
  %123 = icmp sgt i32 %122, 3
  br i1 %123, label %124, label %153

124:                                              ; preds = %121
  %125 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !16
  %126 = call i32 @qh_pointid(ptr noundef %0) #3
  %127 = getelementptr inbounds i8, ptr %.0, i64 108
  %128 = load i32, ptr %127, align 4, !tbaa !17
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %125, i32 noundef 4066, ptr noundef nonnull @.str.58, i32 noundef %126, i32 noundef %128) #3
  br label %153

129:                                              ; preds = %104
  %.not54 = icmp eq i32 %.pre84, 0
  br i1 %.not54, label %138, label %130

130:                                              ; preds = %129
  %131 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1880), align 8, !tbaa !24
  %132 = fneg double %131
  %133 = fcmp ult double %105, %132
  br i1 %133, label %138, label %134

134:                                              ; preds = %130
  %135 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1416), align 8, !tbaa !14
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1416), align 8, !tbaa !14
  %137 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2712), align 8, !tbaa !5
  call void @qh_partitioncoplanar(ptr noundef %0, ptr noundef nonnull %.0, ptr noundef nonnull %3, i32 noundef %137)
  br label %153

138:                                              ; preds = %130, %129
  %139 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1392), align 8, !tbaa !14
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1392), align 8, !tbaa !14
  %141 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !31
  %142 = icmp sgt i32 %141, 3
  br i1 %142, label %143, label %149

143:                                              ; preds = %138
  %144 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !16
  %145 = call i32 @qh_pointid(ptr noundef %0) #3
  %146 = getelementptr inbounds i8, ptr %.0, i64 108
  %147 = load i32, ptr %146, align 4, !tbaa !17
  %148 = load double, ptr %3, align 8, !tbaa !21
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %144, i32 noundef 4067, ptr noundef nonnull @.str.59, i32 noundef %145, i32 noundef %147, double noundef %148) #3
  br label %149

149:                                              ; preds = %143, %138
  %150 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 148), align 4, !tbaa !34
  %.not55 = icmp eq i32 %150, 0
  br i1 %.not55, label %153, label %151

151:                                              ; preds = %149
  %152 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2712), align 8, !tbaa !5
  call void @qh_partitioncoplanar(ptr noundef %0, ptr noundef nonnull %.0, ptr noundef nonnull %3, i32 noundef %152)
  br label %153

153:                                              ; preds = %121, %124, %119, %149, %151, %134, %.thread71, %94
  call void @llvm.lifetime.end.p0(i64 4, 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
  ret void
}

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass