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

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

%struct.qhT = type { i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [29 x i32], i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, i32, ptr, i32, [256 x i8], i32, [256 x i8], [512 x i8], i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, double, double, double, double, double, double, double, double, double, double, double, double, double, double, ptr, double, double, double, double, i32, [6 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, [1 x %struct.__jmp_buf_tag], [40 x i8], i32, double, ptr, ptr, ptr, %struct.qhmemT, %struct.qhstatT }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.qhmemT = type { i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.qhstatT = type { [249 x %union.intrealT], [259 x i8], [249 x ptr], [249 x i16], [249 x i8], [249 x i8], [9 x %union.intrealT], i32, i32, i32, i32, double }
%union.intrealT = type { double }
%struct.facetT = type { double, double, double, ptr, %union.anon, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32 }
%union.anon = type { double }
%struct.vertexT = type { ptr, ptr, ptr, ptr, i32, i32, i8 }

@.str.8 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [150 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [64 x i8], align 1

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

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

declare void @qh_initmergesets(ptr noundef) #1

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

declare void @qh_deletevisible(ptr noundef) #1

declare void @qh_resetlists(ptr noundef, i32 noundef, i32 noundef) #1

declare void @qh_all_vertexmerges(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

declare void @qh_freemergesets(ptr noundef) #1

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

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

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

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

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

28:                                               ; preds = %4
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.qhT, ptr %30, i32 0, i32 225
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  call void @qh_setappend(ptr noundef %29, ptr noundef %31, ptr noundef %32)
  br label %33

33:                                               ; preds = %28, %4
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %42, label %36

36:                                               ; preds = %33
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.qhT, ptr %38, i32 0, i32 158
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %37, ptr noundef %40, i32 noundef 6213, ptr noundef @.str.8)
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_errexit(ptr noundef %41, i32 noundef 5, ptr noundef null, ptr noundef null)
  br label %42

42:                                               ; preds = %36, %33
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_detmaxoutside(ptr noundef %43)
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %79

46:                                               ; preds = %42
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = call ptr @qh_findbest(ptr noundef %47, ptr noundef %48, ptr noundef %49, i32 noundef 0, i32 noundef 0, i32 noundef 0, ptr noundef %10, ptr noundef %15, ptr noundef %16)
  store ptr %50, ptr %8, align 8, !tbaa !5
  %51 = load i32, ptr %16, align 4, !tbaa !9
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.qhT, ptr %52, i32 0, i32 258
  %54 = getelementptr inbounds %struct.qhstatT, ptr %53, i32 0, i32 0
  %55 = getelementptr inbounds [249 x %union.intrealT], ptr %54, i64 0, i64 175
  %56 = load i32, ptr %55, align 8, !tbaa !18
  %57 = add nsw i32 %56, %51
  store i32 %57, ptr %55, align 8, !tbaa !18
  %58 = load i32, ptr %15, align 4, !tbaa !9
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %78, label %60

60:                                               ; preds = %46
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.qhT, ptr %61, i32 0, i32 258
  %63 = getelementptr inbounds %struct.qhstatT, ptr %62, i32 0, i32 0
  %64 = getelementptr inbounds [249 x %union.intrealT], ptr %63, i64 0, i64 160
  %65 = load i32, ptr %64, align 8, !tbaa !18
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %64, align 8, !tbaa !18
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.facetT, ptr %67, i32 0, i32 15
  %69 = load i32, ptr %68, align 8
  %70 = and i32 %69, -262145
  %71 = or i32 %70, 262144
  store i32 %71, ptr %68, align 8
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.qhT, ptr %75, i32 0, i32 204
  %77 = load i32, ptr %76, align 8, !tbaa !19
  call void @qh_partitioncoplanar(ptr noundef %72, ptr noundef %73, ptr noundef %74, ptr noundef %10, i32 noundef %77)
  store i32 1, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %513

78:                                               ; preds = %46
  br label %79

79:                                               ; preds = %78, %42
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  call void @qh_buildtracing(ptr noundef %80, ptr noundef %81, ptr noundef %82)
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.qhT, ptr %83, i32 0, i32 89
  %85 = load i32, ptr %84, align 4, !tbaa !20
  %86 = icmp slt i32 %85, 0
  br i1 %86, label %87, label %103

87:                                               ; preds = %79
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.qhT, ptr %88, i32 0, i32 190
  %90 = load i32, ptr %89, align 4, !tbaa !21
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.qhT, ptr %91, i32 0, i32 89
  %93 = load i32, ptr %92, align 4, !tbaa !20
  %94 = sub nsw i32 0, %93
  %95 = sub nsw i32 %94, 1
  %96 = icmp eq i32 %90, %95
  br i1 %96, label %97, label %103

97:                                               ; preds = %87
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.facetT, ptr %98, i32 0, i32 15
  %100 = load i32, ptr %99, align 8
  %101 = and i32 %100, -262145
  %102 = or i32 %101, 262144
  store i32 %102, ptr %99, align 8
  store i32 0, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %513

103:                                              ; preds = %87, %79
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  call void @qh_findhorizon(ptr noundef %104, ptr noundef %105, ptr noundef %106, ptr noundef %18, ptr noundef %19)
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.qhT, ptr %107, i32 0, i32 48
  %109 = load i32, ptr %108, align 4, !tbaa !22
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %134

111:                                              ; preds = %103
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.qhT, ptr %112, i32 0, i32 192
  %114 = load ptr, ptr %113, align 8, !tbaa !23
  %115 = icmp ne ptr %114, null
  br i1 %115, label %134, label %116

116:                                              ; preds = %111
  %117 = load i32, ptr %18, align 4, !tbaa !9
  %118 = load i32, ptr %19, align 4, !tbaa !9
  %119 = add nsw i32 %117, %118
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %134, label %121

121:                                              ; preds = %116
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.qhT, ptr %122, i32 0, i32 258
  %124 = getelementptr inbounds %struct.qhstatT, ptr %123, i32 0, i32 0
  %125 = getelementptr inbounds [249 x %union.intrealT], ptr %124, i64 0, i64 158
  %126 = load i32, ptr %125, align 8, !tbaa !18
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %125, align 8, !tbaa !18
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.facetT, ptr %128, i32 0, i32 15
  %130 = load i32, ptr %129, align 8
  %131 = and i32 %130, -262145
  %132 = or i32 %131, 262144
  store i32 %132, ptr %129, align 8
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_resetlists(ptr noundef %133, i32 noundef 0, i32 noundef 1)
  store i32 1, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %513

134:                                              ; preds = %116, %111, %103
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = load i32, ptr %19, align 4, !tbaa !9
  %139 = call ptr @qh_buildcone(ptr noundef %135, ptr noundef %136, ptr noundef %137, i32 noundef %138, ptr noundef %12)
  store ptr %139, ptr %14, align 8, !tbaa !5
  %140 = load ptr, ptr %14, align 8, !tbaa !5
  %141 = icmp ne ptr %140, null
  br i1 %141, label %187, label %142

142:                                              ; preds = %134
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.qhT, ptr %143, i32 0, i32 48
  %145 = load i32, ptr %144, align 4, !tbaa !22
  %146 = icmp ne i32 %145, 0
  br i1 %146, label %147, label %148

147:                                              ; preds = %142
  store i32 1, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %513

148:                                              ; preds = %142
  %149 = load ptr, ptr %12, align 8, !tbaa !5
  %150 = icmp ne ptr %149, null
  br i1 %150, label %151, label %184

151:                                              ; preds = %148
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.qhT, ptr %152, i32 0, i32 213
  %154 = load i32, ptr %153, align 8, !tbaa !24
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %153, align 8, !tbaa !24
  %156 = load ptr, ptr %6, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.qhT, ptr %156, i32 0, i32 179
  %158 = load i32, ptr %157, align 4, !tbaa !25
  %159 = icmp sge i32 %154, %158
  br i1 %159, label %160, label %179

160:                                              ; preds = %151
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.qhT, ptr %162, i32 0, i32 158
  %164 = load ptr, ptr %163, align 8, !tbaa !17
  %165 = load ptr, ptr %6, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.qhT, ptr %165, i32 0, i32 213
  %167 = load i32, ptr %166, align 8, !tbaa !24
  %168 = load ptr, ptr %6, align 8, !tbaa !5
  %169 = load ptr, ptr %7, align 8, !tbaa !5
  %170 = call i32 @qh_pointid(ptr noundef %168, ptr noundef %169)
  %171 = load ptr, ptr %8, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.facetT, ptr %171, i32 0, i32 14
  %173 = load i32, ptr %172, align 4, !tbaa !26
  %174 = load ptr, ptr %6, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.qhT, ptr %174, i32 0, i32 179
  %176 = load i32, ptr %175, align 4, !tbaa !25
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %161, ptr noundef %164, i32 noundef 6296, ptr noundef @.str.9, i32 noundef %167, i32 noundef %170, i32 noundef %173, i32 noundef %176)
  %177 = load ptr, ptr %6, align 8, !tbaa !5
  %178 = load ptr, ptr %8, align 8, !tbaa !5
  call void @qh_errexit(ptr noundef %177, i32 noundef 5, ptr noundef %178, ptr noundef null)
  br label %179

179:                                              ; preds = %160, %151
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = load ptr, ptr %7, align 8, !tbaa !5
  %182 = load ptr, ptr %12, align 8, !tbaa !5
  %183 = call i32 @qh_addpoint(ptr noundef %180, ptr noundef %181, ptr noundef %182, i32 noundef 1)
  store i32 %183, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %513

184:                                              ; preds = %148
  %185 = load ptr, ptr %6, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.qhT, ptr %185, i32 0, i32 213
  store i32 0, ptr %186, align 8, !tbaa !24
  store i32 1, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %513

187:                                              ; preds = %134
  %188 = load ptr, ptr %6, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.qhT, ptr %188, i32 0, i32 213
  %190 = load i32, ptr %189, align 8, !tbaa !24
  %191 = icmp ne i32 %190, 0
  br i1 %191, label %192, label %228

192:                                              ; preds = %187
  %193 = load ptr, ptr %6, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.qhT, ptr %193, i32 0, i32 258
  %195 = getelementptr inbounds %struct.qhstatT, ptr %194, i32 0, i32 0
  %196 = getelementptr inbounds [249 x %union.intrealT], ptr %195, i64 0, i64 196
  %197 = load i32, ptr %196, align 8, !tbaa !18
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %196, align 8, !tbaa !18
  %199 = load ptr, ptr %6, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.qhT, ptr %199, i32 0, i32 213
  %201 = load i32, ptr %200, align 8, !tbaa !24
  %202 = load ptr, ptr %6, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.qhT, ptr %202, i32 0, i32 258
  %204 = getelementptr inbounds %struct.qhstatT, ptr %203, i32 0, i32 0
  %205 = getelementptr inbounds [249 x %union.intrealT], ptr %204, i64 0, i64 198
  %206 = load i32, ptr %205, align 8, !tbaa !18
  %207 = add nsw i32 %206, %201
  store i32 %207, ptr %205, align 8, !tbaa !18
  %208 = load ptr, ptr %6, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.qhT, ptr %208, i32 0, i32 258
  %210 = getelementptr inbounds %struct.qhstatT, ptr %209, i32 0, i32 0
  %211 = getelementptr inbounds [249 x %union.intrealT], ptr %210, i64 0, i64 197
  %212 = load i32, ptr %211, align 8, !tbaa !18
  %213 = load ptr, ptr %6, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.qhT, ptr %213, i32 0, i32 213
  %215 = load i32, ptr %214, align 8, !tbaa !24
  %216 = icmp slt i32 %212, %215
  br i1 %216, label %217, label %225

217:                                              ; preds = %192
  %218 = load ptr, ptr %6, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.qhT, ptr %218, i32 0, i32 213
  %220 = load i32, ptr %219, align 8, !tbaa !24
  %221 = load ptr, ptr %6, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.qhT, ptr %221, i32 0, i32 258
  %223 = getelementptr inbounds %struct.qhstatT, ptr %222, i32 0, i32 0
  %224 = getelementptr inbounds [249 x %union.intrealT], ptr %223, i64 0, i64 197
  store i32 %220, ptr %224, align 8, !tbaa !18
  br label %225

225:                                              ; preds = %217, %192
  %226 = load ptr, ptr %6, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.qhT, ptr %226, i32 0, i32 213
  store i32 0, ptr %227, align 8, !tbaa !24
  br label %228

228:                                              ; preds = %225, %187
  %229 = load ptr, ptr %6, align 8, !tbaa !5
  %230 = load ptr, ptr %14, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.vertexT, ptr %230, i32 0, i32 2
  %232 = load ptr, ptr %231, align 8, !tbaa !28
  %233 = call i32 @qh_pointid(ptr noundef %229, ptr noundef %232)
  store i32 %233, ptr %20, align 4, !tbaa !9
  %234 = load ptr, ptr %6, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.qhT, ptr %234, i32 0, i32 258
  %236 = getelementptr inbounds %struct.qhstatT, ptr %235, i32 0, i32 0
  %237 = getelementptr inbounds [249 x %union.intrealT], ptr %236, i64 0, i64 187
  %238 = load i32, ptr %237, align 8, !tbaa !18
  %239 = add nsw i32 %238, 1
  store i32 %239, ptr %237, align 8, !tbaa !18
  %240 = load ptr, ptr %6, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.qhT, ptr %240, i32 0, i32 88
  %242 = load i32, ptr %241, align 8, !tbaa !30
  %243 = icmp ne i32 %242, 0
  br i1 %243, label %244, label %259

244:                                              ; preds = %228
  %245 = load ptr, ptr %6, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.qhT, ptr %245, i32 0, i32 190
  %247 = load i32, ptr %246, align 4, !tbaa !21
  %248 = load ptr, ptr %6, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.qhT, ptr %248, i32 0, i32 88
  %250 = load i32, ptr %249, align 8, !tbaa !30
  %251 = sub nsw i32 %250, 1
  %252 = icmp eq i32 %247, %251
  br i1 %252, label %253, label %259

253:                                              ; preds = %244
  %254 = load ptr, ptr %8, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.facetT, ptr %254, i32 0, i32 15
  %256 = load i32, ptr %255, align 8
  %257 = and i32 %256, -262145
  %258 = or i32 %257, 262144
  store i32 %258, ptr %255, align 8
  store i32 0, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %513

259:                                              ; preds = %244, %228
  %260 = load ptr, ptr %6, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.qhT, ptr %260, i32 0, i32 204
  store i32 0, ptr %261, align 8, !tbaa !19
  %262 = load ptr, ptr %6, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.qhT, ptr %262, i32 0, i32 52
  %264 = load i32, ptr %263, align 4, !tbaa !31
  %265 = icmp ne i32 %264, 0
  br i1 %265, label %271, label %266

266:                                              ; preds = %259
  %267 = load ptr, ptr %6, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.qhT, ptr %267, i32 0, i32 37
  %269 = load i32, ptr %268, align 4, !tbaa !32
  %270 = icmp ne i32 %269, 0
  br i1 %270, label %271, label %321

271:                                              ; preds = %266, %259
  %272 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_initmergesets(ptr noundef %272)
  %273 = load ptr, ptr %6, align 8, !tbaa !5
  %274 = load i32, ptr %20, align 4, !tbaa !9
  %275 = load ptr, ptr %6, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.qhT, ptr %275, i32 0, i32 40
  %277 = load double, ptr %276, align 8, !tbaa !33
  %278 = load ptr, ptr %6, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.qhT, ptr %278, i32 0, i32 15
  %280 = load double, ptr %279, align 8, !tbaa !34
  call void @qh_premerge(ptr noundef %273, i32 noundef %274, double noundef %277, double noundef %280)
  %281 = load ptr, ptr %6, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.qhT, ptr %281, i32 0, i32 258
  %283 = getelementptr inbounds %struct.qhstatT, ptr %282, i32 0, i32 0
  %284 = getelementptr inbounds [249 x %union.intrealT], ptr %283, i64 0, i64 216
  %285 = load i32, ptr %284, align 8, !tbaa !18
  %286 = icmp sgt i32 %285, 50
  br i1 %286, label %287, label %290

287:                                              ; preds = %271
  %288 = load ptr, ptr %6, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.qhT, ptr %288, i32 0, i32 204
  store i32 1, ptr %289, align 8, !tbaa !19
  br label %320

290:                                              ; preds = %271
  %291 = load ptr, ptr %6, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.qhT, ptr %291, i32 0, i32 166
  %293 = load ptr, ptr %292, align 8, !tbaa !35
  store ptr %293, ptr %13, align 8, !tbaa !5
  br label %294

294:                                              ; preds = %315, %290
  %295 = load ptr, ptr %13, align 8, !tbaa !5
  %296 = icmp ne ptr %295, null
  br i1 %296, label %297, label %302

297:                                              ; preds = %294
  %298 = load ptr, ptr %13, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.facetT, ptr %298, i32 0, i32 7
  %300 = load ptr, ptr %299, align 8, !tbaa !36
  %301 = icmp ne ptr %300, null
  br label %302

302:                                              ; preds = %297, %294
  %303 = phi i1 [ false, %294 ], [ %301, %297 ]
  br i1 %303, label %304, label %319

304:                                              ; preds = %302
  %305 = load ptr, ptr %13, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.facetT, ptr %305, i32 0, i32 15
  %307 = load i32, ptr %306, align 8
  %308 = lshr i32 %307, 13
  %309 = and i32 %308, 1
  %310 = icmp ne i32 %309, 0
  br i1 %310, label %314, label %311

311:                                              ; preds = %304
  %312 = load ptr, ptr %6, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.qhT, ptr %312, i32 0, i32 204
  store i32 1, ptr %313, align 8, !tbaa !19
  br label %319

314:                                              ; preds = %304
  br label %315

315:                                              ; preds = %314
  %316 = load ptr, ptr %13, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.facetT, ptr %316, i32 0, i32 7
  %318 = load ptr, ptr %317, align 8, !tbaa !36
  store ptr %318, ptr %13, align 8, !tbaa !5
  br label %294, !llvm.loop !37

319:                                              ; preds = %311, %302
  br label %320

320:                                              ; preds = %319, %287
  br label %330

321:                                              ; preds = %266
  %322 = load ptr, ptr %6, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.qhT, ptr %322, i32 0, i32 10
  %324 = load i32, ptr %323, align 4, !tbaa !39
  %325 = icmp ne i32 %324, 0
  br i1 %325, label %326, label %329

326:                                              ; preds = %321
  %327 = load ptr, ptr %6, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct.qhT, ptr %327, i32 0, i32 204
  store i32 1, ptr %328, align 8, !tbaa !19
  br label %329

329:                                              ; preds = %326, %321
  br label %330

330:                                              ; preds = %329, %320
  %331 = load ptr, ptr %6, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.qhT, ptr %331, i32 0, i32 29
  %333 = load i32, ptr %332, align 8, !tbaa !40
  %334 = icmp sge i32 %333, 4
  br i1 %334, label %335, label %340

335:                                              ; preds = %330
  %336 = load ptr, ptr %6, align 8, !tbaa !5
  %337 = load ptr, ptr %6, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.qhT, ptr %337, i32 0, i32 167
  %339 = load ptr, ptr %338, align 8, !tbaa !41
  call void @qh_checkpolygon(ptr noundef %336, ptr noundef %339)
  br label %340

340:                                              ; preds = %335, %330
  %341 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_partitionvisible(ptr noundef %341, i32 noundef 0, ptr noundef %17)
  %342 = load ptr, ptr %6, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.qhT, ptr %342, i32 0, i32 204
  store i32 0, ptr %343, align 8, !tbaa !19
  %344 = load ptr, ptr %6, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct.qhT, ptr %344, i32 0, i32 205
  store i32 0, ptr %345, align 4, !tbaa !42
  %346 = load ptr, ptr %6, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.qhT, ptr %346, i32 0, i32 258
  %348 = getelementptr inbounds %struct.qhstatT, ptr %347, i32 0, i32 0
  %349 = getelementptr inbounds [249 x %union.intrealT], ptr %348, i64 0, i64 179
  %350 = load i32, ptr %349, align 8, !tbaa !18
  %351 = add nsw i32 %350, 1
  store i32 %351, ptr %349, align 8, !tbaa !18
  %352 = load i32, ptr %17, align 4, !tbaa !9
  %353 = sitofp i32 %352 to double
  %354 = load ptr, ptr %6, align 8, !tbaa !5
  %355 = getelementptr inbounds %struct.qhT, ptr %354, i32 0, i32 110
  %356 = load i32, ptr %355, align 8, !tbaa !43
  %357 = sitofp i32 %356 to double
  %358 = load ptr, ptr %6, align 8, !tbaa !5
  %359 = getelementptr inbounds %struct.qhT, ptr %358, i32 0, i32 112
  %360 = load i32, ptr %359, align 8, !tbaa !44
  %361 = load ptr, ptr %6, align 8, !tbaa !5
  %362 = getelementptr inbounds %struct.qhT, ptr %361, i32 0, i32 179
  %363 = load i32, ptr %362, align 4, !tbaa !25
  %364 = sub nsw i32 %360, %363
  %365 = sitofp i32 %364 to double
  %366 = fmul double %357, %365
  %367 = load ptr, ptr %6, align 8, !tbaa !5
  %368 = getelementptr inbounds %struct.qhT, ptr %367, i32 0, i32 179
  %369 = load i32, ptr %368, align 4, !tbaa !25
  %370 = sitofp i32 %369 to double
  %371 = fdiv double %366, %370
  %372 = fsub double %353, %371
  store double %372, ptr %11, align 8, !tbaa !45
  %373 = load double, ptr %11, align 8, !tbaa !45
  %374 = load ptr, ptr %6, align 8, !tbaa !5
  %375 = getelementptr inbounds %struct.qhT, ptr %374, i32 0, i32 258
  %376 = getelementptr inbounds %struct.qhstatT, ptr %375, i32 0, i32 0
  %377 = getelementptr inbounds [249 x %union.intrealT], ptr %376, i64 0, i64 180
  %378 = load double, ptr %377, align 8, !tbaa !18
  %379 = fadd double %378, %373
  store double %379, ptr %377, align 8, !tbaa !18
  %380 = load double, ptr %11, align 8, !tbaa !45
  %381 = load double, ptr %11, align 8, !tbaa !45
  %382 = load ptr, ptr %6, align 8, !tbaa !5
  %383 = getelementptr inbounds %struct.qhT, ptr %382, i32 0, i32 258
  %384 = getelementptr inbounds %struct.qhstatT, ptr %383, i32 0, i32 0
  %385 = getelementptr inbounds [249 x %union.intrealT], ptr %384, i64 0, i64 181
  %386 = load double, ptr %385, align 8, !tbaa !18
  %387 = call double @llvm.fmuladd.f64(double %380, double %381, double %386)
  store double %387, ptr %385, align 8, !tbaa !18
  %388 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_deletevisible(ptr noundef %388)
  %389 = load ptr, ptr %6, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct.qhT, ptr %389, i32 0, i32 258
  %391 = getelementptr inbounds %struct.qhstatT, ptr %390, i32 0, i32 0
  %392 = getelementptr inbounds [249 x %union.intrealT], ptr %391, i64 0, i64 120
  %393 = load i32, ptr %392, align 8, !tbaa !18
  %394 = load ptr, ptr %6, align 8, !tbaa !5
  %395 = getelementptr inbounds %struct.qhT, ptr %394, i32 0, i32 179
  %396 = load i32, ptr %395, align 4, !tbaa !25
  %397 = icmp slt i32 %393, %396
  br i1 %397, label %398, label %406

398:                                              ; preds = %340
  %399 = load ptr, ptr %6, align 8, !tbaa !5
  %400 = getelementptr inbounds %struct.qhT, ptr %399, i32 0, i32 179
  %401 = load i32, ptr %400, align 4, !tbaa !25
  %402 = load ptr, ptr %6, align 8, !tbaa !5
  %403 = getelementptr inbounds %struct.qhT, ptr %402, i32 0, i32 258
  %404 = getelementptr inbounds %struct.qhstatT, ptr %403, i32 0, i32 0
  %405 = getelementptr inbounds [249 x %union.intrealT], ptr %404, i64 0, i64 120
  store i32 %401, ptr %405, align 8, !tbaa !18
  br label %406

406:                                              ; preds = %398, %340
  %407 = load ptr, ptr %6, align 8, !tbaa !5
  %408 = getelementptr inbounds %struct.qhT, ptr %407, i32 0, i32 202
  store i32 0, ptr %408, align 8, !tbaa !46
  %409 = load ptr, ptr %6, align 8, !tbaa !5
  %410 = getelementptr inbounds %struct.qhT, ptr %409, i32 0, i32 29
  %411 = load i32, ptr %410, align 8, !tbaa !40
  %412 = icmp sge i32 %411, 4
  br i1 %412, label %413, label %429

413:                                              ; preds = %406
  %414 = load ptr, ptr %6, align 8, !tbaa !5
  %415 = getelementptr inbounds %struct.qhT, ptr %414, i32 0, i32 178
  %416 = load i32, ptr %415, align 8, !tbaa !47
  %417 = icmp slt i32 %416, 200
  br i1 %417, label %418, label %420

418:                                              ; preds = %413
  %419 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_printlists(ptr noundef %419)
  br label %420

420:                                              ; preds = %418, %413
  %421 = load ptr, ptr %6, align 8, !tbaa !5
  %422 = load ptr, ptr %6, align 8, !tbaa !5
  %423 = getelementptr inbounds %struct.qhT, ptr %422, i32 0, i32 166
  %424 = load ptr, ptr %423, align 8, !tbaa !35
  call void @qh_printfacetlist(ptr noundef %421, ptr noundef %424, ptr noundef null, i32 noundef 1)
  %425 = load ptr, ptr %6, align 8, !tbaa !5
  %426 = load ptr, ptr %6, align 8, !tbaa !5
  %427 = getelementptr inbounds %struct.qhT, ptr %426, i32 0, i32 163
  %428 = load ptr, ptr %427, align 8, !tbaa !48
  call void @qh_checkpolygon(ptr noundef %425, ptr noundef %428)
  br label %451

429:                                              ; preds = %406
  %430 = load ptr, ptr %6, align 8, !tbaa !5
  %431 = getelementptr inbounds %struct.qhT, ptr %430, i32 0, i32 14
  %432 = load i32, ptr %431, align 4, !tbaa !49
  %433 = icmp ne i32 %432, 0
  br i1 %433, label %434, label %450

434:                                              ; preds = %429
  %435 = load ptr, ptr %6, align 8, !tbaa !5
  %436 = getelementptr inbounds %struct.qhT, ptr %435, i32 0, i32 178
  %437 = load i32, ptr %436, align 8, !tbaa !47
  %438 = icmp slt i32 %437, 1000
  br i1 %438, label %439, label %444

439:                                              ; preds = %434
  %440 = load ptr, ptr %6, align 8, !tbaa !5
  %441 = load ptr, ptr %6, align 8, !tbaa !5
  %442 = getelementptr inbounds %struct.qhT, ptr %441, i32 0, i32 163
  %443 = load ptr, ptr %442, align 8, !tbaa !48
  call void @qh_checkpolygon(ptr noundef %440, ptr noundef %443)
  br label %449

444:                                              ; preds = %434
  %445 = load ptr, ptr %6, align 8, !tbaa !5
  %446 = load ptr, ptr %6, align 8, !tbaa !5
  %447 = getelementptr inbounds %struct.qhT, ptr %446, i32 0, i32 166
  %448 = load ptr, ptr %447, align 8, !tbaa !35
  call void @qh_checkpolygon(ptr noundef %445, ptr noundef %448)
  br label %449

449:                                              ; preds = %444, %439
  br label %450

450:                                              ; preds = %449, %429
  br label %451

451:                                              ; preds = %450, %420
  %452 = load ptr, ptr %6, align 8, !tbaa !5
  %453 = getelementptr inbounds %struct.qhT, ptr %452, i32 0, i32 89
  %454 = load i32, ptr %453, align 4, !tbaa !20
  %455 = icmp sgt i32 %454, 0
  br i1 %455, label %456, label %473

456:                                              ; preds = %451
  %457 = load ptr, ptr %6, align 8, !tbaa !5
  %458 = getelementptr inbounds %struct.qhT, ptr %457, i32 0, i32 190
  %459 = load i32, ptr %458, align 4, !tbaa !21
  %460 = load ptr, ptr %6, align 8, !tbaa !5
  %461 = getelementptr inbounds %struct.qhT, ptr %460, i32 0, i32 89
  %462 = load i32, ptr %461, align 4, !tbaa !20
  %463 = sub nsw i32 %462, 1
  %464 = icmp eq i32 %459, %463
  br i1 %464, label %465, label %473

465:                                              ; preds = %456
  %466 = load ptr, ptr %6, align 8, !tbaa !5
  %467 = load ptr, ptr %6, align 8, !tbaa !5
  %468 = getelementptr inbounds %struct.qhT, ptr %467, i32 0, i32 223
  %469 = load ptr, ptr %468, align 8, !tbaa !50
  %470 = call i32 @qh_setsize(ptr noundef %466, ptr noundef %469)
  %471 = icmp sgt i32 %470, 0
  br i1 %471, label %472, label %473

472:                                              ; preds = %465
  store i32 0, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %513

473:                                              ; preds = %465, %456, %451
  %474 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_resetlists(ptr noundef %474, i32 noundef 1, i32 noundef 1)
  %475 = load ptr, ptr %6, align 8, !tbaa !5
  %476 = getelementptr inbounds %struct.qhT, ptr %475, i32 0, i32 221
  %477 = load ptr, ptr %476, align 8, !tbaa !51
  %478 = icmp ne ptr %477, null
  br i1 %478, label %479, label %483

479:                                              ; preds = %473
  %480 = load ptr, ptr %6, align 8, !tbaa !5
  %481 = load i32, ptr %20, align 4, !tbaa !9
  call void @qh_all_vertexmerges(ptr noundef %480, i32 noundef %481, ptr noundef null, ptr noundef null)
  %482 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_freemergesets(ptr noundef %482)
  br label %483

483:                                              ; preds = %479, %473
  %484 = load ptr, ptr %6, align 8, !tbaa !5
  %485 = getelementptr inbounds %struct.qhT, ptr %484, i32 0, i32 89
  %486 = load i32, ptr %485, align 4, !tbaa !20
  %487 = icmp sgt i32 %486, 0
  br i1 %487, label %488, label %498

488:                                              ; preds = %483
  %489 = load ptr, ptr %6, align 8, !tbaa !5
  %490 = getelementptr inbounds %struct.qhT, ptr %489, i32 0, i32 190
  %491 = load i32, ptr %490, align 4, !tbaa !21
  %492 = load ptr, ptr %6, align 8, !tbaa !5
  %493 = getelementptr inbounds %struct.qhT, ptr %492, i32 0, i32 89
  %494 = load i32, ptr %493, align 4, !tbaa !20
  %495 = sub nsw i32 %494, 1
  %496 = icmp eq i32 %491, %495
  br i1 %496, label %497, label %498

497:                                              ; preds = %488
  store i32 0, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %513

498:                                              ; preds = %488, %483
  %499 = load ptr, ptr %6, align 8, !tbaa !5
  %500 = getelementptr inbounds %struct.qhT, ptr %499, i32 0, i32 29
  %501 = load i32, ptr %500, align 8, !tbaa !40
  %502 = icmp sge i32 %501, 2
  br i1 %502, label %503, label %512

503:                                              ; preds = %498
  %504 = load ptr, ptr %6, align 8, !tbaa !5
  %505 = load ptr, ptr %6, align 8, !tbaa !5
  %506 = getelementptr inbounds %struct.qhT, ptr %505, i32 0, i32 158
  %507 = load ptr, ptr %506, align 8, !tbaa !17
  %508 = load ptr, ptr %6, align 8, !tbaa !5
  %509 = load ptr, ptr %7, align 8, !tbaa !5
  %510 = call i32 @qh_pointid(ptr noundef %508, ptr noundef %509)
  %511 = load double, ptr %11, align 8, !tbaa !45
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %504, ptr noundef %507, i32 noundef 2056, ptr noundef @.str.10, i32 noundef %510, double noundef %511)
  br label %512

512:                                              ; preds = %503, %498
  store i32 1, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %513

513:                                              ; preds = %512, %497, %472, %253, %184, %179, %147, %121, %97, %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %514 = load i32, ptr %5, align 4
  ret i32 %514
}

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

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

declare void @qh_detmaxoutside(ptr noundef) #1

declare ptr @qh_findbest(ptr noundef, 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, ptr noundef, i32 noundef) #2

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

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

declare void @qh_premerge(ptr noundef, i32 noundef, double noundef, double noundef) #1

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

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

declare void @qh_printlists(ptr noundef) #1

declare void @qh_printfacetlist(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

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

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

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


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

@.str.8 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [150 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [64 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, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #1

declare void @qh_initmergesets(ptr noundef) local_unnamed_addr #1

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

declare void @qh_deletevisible(ptr noundef) local_unnamed_addr #1

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

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

declare void @qh_freemergesets(ptr noundef) local_unnamed_addr #1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @qh_addpoint(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = alloca double, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  %12 = getelementptr inbounds i8, ptr %0, i64 2672
  store i32 0, ptr %12, align 8, !tbaa !9
  %13 = tail call i32 @qh_pointid(ptr noundef %0, ptr noundef %1) #4
  %14 = icmp eq i32 %13, -1
  br i1 %14, label %15, label %17

15:                                               ; preds = %4
  %16 = getelementptr inbounds i8, ptr %0, i64 2832
  tail call void @qh_setappend(ptr noundef nonnull %0, ptr noundef nonnull %16, ptr noundef %1) #4
  br label %17

17:                                               ; preds = %15, %4
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %18, label %21

18:                                               ; preds = %17
  %19 = getelementptr inbounds i8, ptr %0, i64 2424
  %20 = load ptr, ptr %19, align 8, !tbaa !16
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %20, i32 noundef 6213, ptr noundef nonnull @.str.8) #4
  tail call void @qh_errexit(ptr noundef nonnull %0, i32 noundef 5, ptr noundef null, ptr noundef null) #4
  br label %21

21:                                               ; preds = %18, %17
  tail call void @qh_detmaxoutside(ptr noundef nonnull %0) #4
  %.not154 = icmp eq i32 %3, 0
  br i1 %.not154, label %38, label %22

22:                                               ; preds = %21
  %23 = call ptr @qh_findbest(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, i32 noundef 0, i32 noundef 0, i32 noundef 0, ptr noundef nonnull %5, ptr noundef nonnull %7, ptr noundef nonnull %8) #4
  %24 = load i32, ptr %8, align 4, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %0, i64 4824
  %26 = load i32, ptr %25, align 8, !tbaa !17
  %27 = add nsw i32 %26, %24
  store i32 %27, ptr %25, align 8, !tbaa !17
  %28 = load i32, ptr %7, align 4, !tbaa !5
  %.not155 = icmp eq i32 %28, 0
  br i1 %.not155, label %29, label %38

29:                                               ; preds = %22
  %30 = getelementptr inbounds i8, ptr %0, i64 4704
  %31 = load i32, ptr %30, align 8, !tbaa !17
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %30, align 8, !tbaa !17
  %33 = getelementptr inbounds i8, ptr %23, i64 112
  %34 = load i32, ptr %33, align 8
  %35 = or i32 %34, 262144
  store i32 %35, ptr %33, align 8
  %36 = getelementptr inbounds i8, ptr %0, i64 2712
  %37 = load i32, ptr %36, align 8, !tbaa !18
  call void @qh_partitioncoplanar(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %23, ptr noundef nonnull %5, i32 noundef %37)
  br label %243

38:                                               ; preds = %22, %21
  %.0144 = phi ptr [ %23, %22 ], [ %2, %21 ]
  call void @qh_buildtracing(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %.0144)
  %39 = getelementptr inbounds i8, ptr %0, i64 524
  %40 = load i32, ptr %39, align 4, !tbaa !19
  %41 = icmp slt i32 %40, 0
  br i1 %41, label %42, label %51

42:                                               ; preds = %38
  %43 = getelementptr inbounds i8, ptr %0, i64 2620
  %44 = load i32, ptr %43, align 4, !tbaa !20
  %45 = xor i32 %44, %40
  %46 = icmp eq i32 %45, -1
  br i1 %46, label %47, label %51

47:                                               ; preds = %42
  %48 = getelementptr inbounds i8, ptr %.0144, i64 112
  %49 = load i32, ptr %48, align 8
  %50 = or i32 %49, 262144
  store i32 %50, ptr %48, align 8
  br label %243

51:                                               ; preds = %42, %38
  call void @qh_findhorizon(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %.0144, ptr noundef nonnull %10, ptr noundef nonnull %11)
  %52 = getelementptr inbounds i8, ptr %0, i64 236
  %53 = load i32, ptr %52, align 4, !tbaa !21
  %.not156 = icmp eq i32 %53, 0
  br i1 %.not156, label %._crit_edge, label %54

._crit_edge:                                      ; preds = %51
  %.pre = load i32, ptr %11, align 4, !tbaa !5
  br label %67

54:                                               ; preds = %51
  %55 = getelementptr inbounds i8, ptr %0, i64 2632
  %56 = load ptr, ptr %55, align 8, !tbaa !22
  %.not157 = icmp eq ptr %56, null
  %.pre173 = load i32, ptr %11, align 4, !tbaa !5
  br i1 %.not157, label %57, label %67

57:                                               ; preds = %54
  %58 = load i32, ptr %10, align 4, !tbaa !5
  %59 = sub i32 0, %.pre173
  %.not158 = icmp eq i32 %58, %59
  br i1 %.not158, label %60, label %67

60:                                               ; preds = %57
  %61 = getelementptr inbounds i8, ptr %0, i64 4688
  %62 = load i32, ptr %61, align 8, !tbaa !17
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %61, align 8, !tbaa !17
  %64 = getelementptr inbounds i8, ptr %.0144, i64 112
  %65 = load i32, ptr %64, align 8
  %66 = or i32 %65, 262144
  store i32 %66, ptr %64, align 8
  call void @qh_resetlists(ptr noundef nonnull %0, i32 noundef 0, i32 noundef 1) #4
  br label %243

67:                                               ; preds = %._crit_edge, %57, %54
  %68 = phi i32 [ %.pre, %._crit_edge ], [ %.pre173, %57 ], [ %.pre173, %54 ]
  %69 = call ptr @qh_buildcone(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %.0144, i32 noundef %68, ptr noundef nonnull %6)
  %.not159 = icmp eq ptr %69, null
  br i1 %.not159, label %70, label %91

70:                                               ; preds = %67
  %71 = load i32, ptr %52, align 4, !tbaa !21
  %.not160 = icmp eq i32 %71, 0
  br i1 %.not160, label %72, label %243

72:                                               ; preds = %70
  %73 = load ptr, ptr %6, align 8, !tbaa !23
  %.not161 = icmp eq ptr %73, null
  %74 = getelementptr inbounds i8, ptr %0, i64 2760
  br i1 %.not161, label %90, label %75

75:                                               ; preds = %72
  %76 = load i32, ptr %74, align 8, !tbaa !24
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %74, align 8, !tbaa !24
  %78 = getelementptr inbounds i8, ptr %0, i64 2572
  %79 = load i32, ptr %78, align 4, !tbaa !25
  %.not162 = icmp slt i32 %76, %79
  br i1 %.not162, label %87, label %80

80:                                               ; preds = %75
  %81 = getelementptr inbounds i8, ptr %0, i64 2424
  %82 = load ptr, ptr %81, align 8, !tbaa !16
  %83 = call i32 @qh_pointid(ptr noundef nonnull %0, ptr noundef %1) #4
  %84 = getelementptr inbounds i8, ptr %.0144, i64 108
  %85 = load i32, ptr %84, align 4, !tbaa !26
  %86 = load i32, ptr %78, align 4, !tbaa !25
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %82, i32 noundef 6296, ptr noundef nonnull @.str.9, i32 noundef %77, i32 noundef %83, i32 noundef %85, i32 noundef %86) #4
  call void @qh_errexit(ptr noundef nonnull %0, i32 noundef 5, ptr noundef %.0144, ptr noundef null) #4
  %.pre174 = load ptr, ptr %6, align 8, !tbaa !23
  br label %87

87:                                               ; preds = %80, %75
  %88 = phi ptr [ %.pre174, %80 ], [ %73, %75 ]
  %89 = call i32 @qh_addpoint(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %88, i32 noundef 1)
  br label %243

90:                                               ; preds = %72
  store i32 0, ptr %74, align 8, !tbaa !24
  br label %243

91:                                               ; preds = %67
  %92 = getelementptr inbounds i8, ptr %0, i64 2760
  %93 = load i32, ptr %92, align 8, !tbaa !24
  %.not163 = icmp eq i32 %93, 0
  br i1 %.not163, label %106, label %94

94:                                               ; preds = %91
  %95 = getelementptr inbounds i8, ptr %0, i64 4992
  %96 = load i32, ptr %95, align 8, !tbaa !17
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %95, align 8, !tbaa !17
  %98 = getelementptr inbounds i8, ptr %0, i64 5008
  %99 = load i32, ptr %98, align 8, !tbaa !17
  %100 = add nsw i32 %99, %93
  store i32 %100, ptr %98, align 8, !tbaa !17
  %101 = getelementptr inbounds i8, ptr %0, i64 5000
  %102 = load i32, ptr %101, align 8, !tbaa !17
  %103 = icmp slt i32 %102, %93
  br i1 %103, label %104, label %105

104:                                              ; preds = %94
  store i32 %93, ptr %101, align 8, !tbaa !17
  br label %105

105:                                              ; preds = %104, %94
  store i32 0, ptr %92, align 8, !tbaa !24
  br label %106

106:                                              ; preds = %105, %91
  %107 = getelementptr inbounds i8, ptr %69, i64 16
  %108 = load ptr, ptr %107, align 8, !tbaa !28
  %109 = call i32 @qh_pointid(ptr noundef nonnull %0, ptr noundef %108) #4
  %110 = getelementptr inbounds i8, ptr %0, i64 4920
  %111 = load i32, ptr %110, align 8, !tbaa !17
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %110, align 8, !tbaa !17
  %113 = getelementptr inbounds i8, ptr %0, i64 520
  %114 = load i32, ptr %113, align 8, !tbaa !30
  %.not164 = icmp eq i32 %114, 0
  br i1 %.not164, label %124, label %115

115:                                              ; preds = %106
  %116 = getelementptr inbounds i8, ptr %0, i64 2620
  %117 = load i32, ptr %116, align 4, !tbaa !20
  %118 = add nsw i32 %114, -1
  %119 = icmp eq i32 %117, %118
  br i1 %119, label %120, label %124

120:                                              ; preds = %115
  %121 = getelementptr inbounds i8, ptr %.0144, i64 112
  %122 = load i32, ptr %121, align 8
  %123 = or i32 %122, 262144
  store i32 %123, ptr %121, align 8
  br label %243

124:                                              ; preds = %115, %106
  %125 = getelementptr inbounds i8, ptr %0, i64 2712
  store i32 0, ptr %125, align 8, !tbaa !18
  %126 = getelementptr inbounds i8, ptr %0, i64 252
  %127 = load i32, ptr %126, align 4, !tbaa !31
  %.not165 = icmp eq i32 %127, 0
  br i1 %.not165, label %128, label %131

128:                                              ; preds = %124
  %129 = getelementptr inbounds i8, ptr %0, i64 180
  %130 = load i32, ptr %129, align 4, !tbaa !32
  %.not166 = icmp eq i32 %130, 0
  br i1 %.not166, label %150, label %131

131:                                              ; preds = %128, %124
  call void @qh_initmergesets(ptr noundef nonnull %0) #4
  %132 = getelementptr inbounds i8, ptr %0, i64 192
  %133 = load double, ptr %132, align 8, !tbaa !33
  %134 = getelementptr inbounds i8, ptr %0, i64 64
  %135 = load double, ptr %134, align 8, !tbaa !34
  call void @qh_premerge(ptr noundef nonnull %0, i32 noundef %109, double noundef %133, double noundef %135) #4
  %136 = getelementptr inbounds i8, ptr %0, i64 5152
  %137 = load i32, ptr %136, align 8, !tbaa !17
  %138 = icmp sgt i32 %137, 50
  br i1 %138, label %.critedge.sink.split, label %139

139:                                              ; preds = %131
  %140 = getelementptr inbounds i8, ptr %0, i64 2480
  %141 = load ptr, ptr %140, align 8, !tbaa !35
  br label %142

142:                                              ; preds = %146, %139
  %.0145 = phi ptr [ %141, %139 ], [ %145, %146 ]
  %.not168 = icmp eq ptr %.0145, null
  br i1 %.not168, label %.critedge, label %143

143:                                              ; preds = %142
  %144 = getelementptr inbounds i8, ptr %.0145, i64 56
  %145 = load ptr, ptr %144, align 8, !tbaa !36
  %.not169 = icmp eq ptr %145, null
  br i1 %.not169, label %.critedge, label %146

146:                                              ; preds = %143
  %147 = getelementptr inbounds i8, ptr %.0145, i64 112
  %148 = load i32, ptr %147, align 8
  %149 = and i32 %148, 8192
  %.not170 = icmp eq i32 %149, 0
  br i1 %.not170, label %.critedge.sink.split, label %142, !llvm.loop !37

150:                                              ; preds = %128
  %151 = getelementptr inbounds i8, ptr %0, i64 44
  %152 = load i32, ptr %151, align 4, !tbaa !39
  %.not167 = icmp eq i32 %152, 0
  br i1 %.not167, label %.critedge, label %.critedge.sink.split

.critedge.sink.split:                             ; preds = %146, %150, %131
  store i32 1, ptr %125, align 8, !tbaa !18
  br label %.critedge

.critedge:                                        ; preds = %142, %143, %.critedge.sink.split, %150
  %153 = getelementptr inbounds i8, ptr %0, i64 136
  %154 = load i32, ptr %153, align 8, !tbaa !40
  %155 = icmp sgt i32 %154, 3
  br i1 %155, label %156, label %159

156:                                              ; preds = %.critedge
  %157 = getelementptr inbounds i8, ptr %0, i64 2488
  %158 = load ptr, ptr %157, align 8, !tbaa !41
  call void @qh_checkpolygon(ptr noundef nonnull %0, ptr noundef %158) #4
  br label %159

159:                                              ; preds = %156, %.critedge
  call void @qh_partitionvisible(ptr noundef nonnull %0, i32 noundef 0, ptr noundef nonnull %9)
  store i32 0, ptr %125, align 8, !tbaa !18
  %160 = getelementptr inbounds i8, ptr %0, i64 2716
  store i32 0, ptr %160, align 4, !tbaa !42
  %161 = getelementptr inbounds i8, ptr %0, i64 4856
  %162 = load i32, ptr %161, align 8, !tbaa !17
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %161, align 8, !tbaa !17
  %164 = load i32, ptr %9, align 4, !tbaa !5
  %165 = sitofp i32 %164 to double
  %166 = getelementptr inbounds i8, ptr %0, i64 632
  %167 = load i32, ptr %166, align 8, !tbaa !43
  %168 = sitofp i32 %167 to double
  %169 = getelementptr inbounds i8, ptr %0, i64 640
  %170 = load i32, ptr %169, align 8, !tbaa !44
  %171 = getelementptr inbounds i8, ptr %0, i64 2572
  %172 = load i32, ptr %171, align 4, !tbaa !25
  %173 = sub nsw i32 %170, %172
  %174 = sitofp i32 %173 to double
  %175 = fmul double %168, %174
  %176 = sitofp i32 %172 to double
  %177 = fdiv double %175, %176
  %178 = fsub double %165, %177
  %179 = getelementptr inbounds i8, ptr %0, i64 4864
  %180 = load double, ptr %179, align 8, !tbaa !17
  %181 = fadd double %180, %178
  store double %181, ptr %179, align 8, !tbaa !17
  %182 = getelementptr inbounds i8, ptr %0, i64 4872
  %183 = load double, ptr %182, align 8, !tbaa !17
  %184 = call double @llvm.fmuladd.f64(double %178, double %178, double %183)
  store double %184, ptr %182, align 8, !tbaa !17
  call void @qh_deletevisible(ptr noundef nonnull %0) #4
  %185 = getelementptr inbounds i8, ptr %0, i64 4384
  %186 = load i32, ptr %185, align 8, !tbaa !17
  %187 = load i32, ptr %171, align 4, !tbaa !25
  %188 = icmp slt i32 %186, %187
  br i1 %188, label %189, label %190

189:                                              ; preds = %159
  store i32 %187, ptr %185, align 8, !tbaa !17
  br label %190

190:                                              ; preds = %189, %159
  %191 = getelementptr inbounds i8, ptr %0, i64 2704
  store i32 0, ptr %191, align 8, !tbaa !45
  %192 = load i32, ptr %153, align 8, !tbaa !40
  %193 = icmp sgt i32 %192, 3
  br i1 %193, label %194, label %202

194:                                              ; preds = %190
  %195 = getelementptr inbounds i8, ptr %0, i64 2568
  %196 = load i32, ptr %195, align 8, !tbaa !46
  %197 = icmp slt i32 %196, 200
  br i1 %197, label %198, label %199

198:                                              ; preds = %194
  call void @qh_printlists(ptr noundef nonnull %0) #4
  br label %199

199:                                              ; preds = %198, %194
  %200 = getelementptr inbounds i8, ptr %0, i64 2480
  %201 = load ptr, ptr %200, align 8, !tbaa !35
  call void @qh_printfacetlist(ptr noundef nonnull %0, ptr noundef %201, ptr noundef null, i32 noundef 1) #4
  br label %.sink.split

202:                                              ; preds = %190
  %203 = getelementptr inbounds i8, ptr %0, i64 60
  %204 = load i32, ptr %203, align 4, !tbaa !47
  %.not171 = icmp eq i32 %204, 0
  br i1 %.not171, label %211, label %205

205:                                              ; preds = %202
  %206 = getelementptr inbounds i8, ptr %0, i64 2568
  %207 = load i32, ptr %206, align 8, !tbaa !46
  %208 = icmp slt i32 %207, 1000
  %. = select i1 %208, i64 2456, i64 2480
  br label %.sink.split

.sink.split:                                      ; preds = %205, %199
  %.sink = phi i64 [ 2456, %199 ], [ %., %205 ]
  %209 = getelementptr inbounds i8, ptr %0, i64 %.sink
  %210 = load ptr, ptr %209, align 8, !tbaa !23
  call void @qh_checkpolygon(ptr noundef nonnull %0, ptr noundef %210) #4
  br label %211

211:                                              ; preds = %.sink.split, %202
  %212 = load i32, ptr %39, align 4, !tbaa !19
  %213 = icmp sgt i32 %212, 0
  br i1 %213, label %214, label %224

214:                                              ; preds = %211
  %215 = getelementptr inbounds i8, ptr %0, i64 2620
  %216 = load i32, ptr %215, align 4, !tbaa !20
  %217 = add nsw i32 %212, -1
  %218 = icmp eq i32 %216, %217
  br i1 %218, label %219, label %224

219:                                              ; preds = %214
  %220 = getelementptr inbounds i8, ptr %0, i64 2816
  %221 = load ptr, ptr %220, align 8, !tbaa !48
  %222 = call i32 @qh_setsize(ptr noundef nonnull %0, ptr noundef %221) #4
  %223 = icmp sgt i32 %222, 0
  br i1 %223, label %243, label %224

224:                                              ; preds = %219, %214, %211
  call void @qh_resetlists(ptr noundef nonnull %0, i32 noundef 1, i32 noundef 1) #4
  %225 = getelementptr inbounds i8, ptr %0, i64 2800
  %226 = load ptr, ptr %225, align 8, !tbaa !49
  %.not172 = icmp eq ptr %226, null
  br i1 %.not172, label %228, label %227

227:                                              ; preds = %224
  call void @qh_all_vertexmerges(ptr noundef nonnull %0, i32 noundef %109, ptr noundef null, ptr noundef null) #4
  call void @qh_freemergesets(ptr noundef nonnull %0) #4
  br label %228

228:                                              ; preds = %227, %224
  %229 = load i32, ptr %39, align 4, !tbaa !19
  %230 = icmp sgt i32 %229, 0
  br i1 %230, label %231, label %236

231:                                              ; preds = %228
  %232 = getelementptr inbounds i8, ptr %0, i64 2620
  %233 = load i32, ptr %232, align 4, !tbaa !20
  %234 = add nsw i32 %229, -1
  %235 = icmp eq i32 %233, %234
  br i1 %235, label %243, label %236

236:                                              ; preds = %231, %228
  %237 = load i32, ptr %153, align 8, !tbaa !40
  %238 = icmp sgt i32 %237, 1
  br i1 %238, label %239, label %243

239:                                              ; preds = %236
  %240 = getelementptr inbounds i8, ptr %0, i64 2424
  %241 = load ptr, ptr %240, align 8, !tbaa !16
  %242 = call i32 @qh_pointid(ptr noundef nonnull %0, ptr noundef %1) #4
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %241, i32 noundef 2056, ptr noundef nonnull @.str.10, i32 noundef %242, double noundef %178) #4
  br label %243

243:                                              ; preds = %236, %239, %231, %219, %70, %120, %90, %87, %60, %47, %29
  %.0 = phi i32 [ 0, %47 ], [ 0, %120 ], [ %89, %87 ], [ 1, %90 ], [ 1, %60 ], [ 1, %29 ], [ 1, %70 ], [ 0, %219 ], [ 0, %231 ], [ 1, %239 ], [ 1, %236 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  ret i32 %.0
}

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

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

declare void @qh_detmaxoutside(ptr noundef) local_unnamed_addr #1

declare ptr @qh_findbest(ptr noundef, 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, ptr noundef, i32 noundef) local_unnamed_addr #2

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

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

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

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

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

declare void @qh_printlists(ptr noundef) local_unnamed_addr #1

declare void @qh_printfacetlist(ptr noundef, ptr noundef, ptr noundef, i32 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass