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

; 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 }
%struct.setT = type { i32, [1 x %union.setelemT] }
%union.setelemT = type { ptr }
%struct.vertexT = type { ptr, ptr, ptr, ptr, i32, i32, i8 }
%struct.ridgeT = type { ptr, ptr, ptr, i32, i8 }

@qh_qh = external global %struct.qhT, align 8
@qh_qhstat = external global %struct.qhstatT, align 8
@.str.172 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.173 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.174 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.175 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.176 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.177 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.178 = external hidden unnamed_addr constant [56 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 void @qh_errexit2(i32 noundef, ptr noundef, ptr noundef) #1

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @qh_mergesimplex(ptr noundef %0, ptr noundef %1, i32 noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %16 = load i32, ptr %6, align 4, !tbaa !9
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %18, label %63

18:                                               ; preds = %3
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.facetT, ptr %19, i32 0, i32 8
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = getelementptr inbounds %struct.setT, ptr %21, i32 0, i32 1
  %23 = getelementptr inbounds [1 x %union.setelemT], ptr %22, i64 0, i64 0
  %24 = load ptr, ptr %23, align 8, !tbaa !14
  store ptr %24, ptr %9, align 8, !tbaa !5
  %25 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !15
  %26 = icmp sge i32 %25, 4
  br i1 %26, label %27, label %38

27:                                               ; preds = %18
  %28 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !18
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.vertexT, ptr %29, i32 0, i32 4
  %31 = load i32, ptr %30, align 8, !tbaa !19
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.facetT, ptr %32, i32 0, i32 14
  %34 = load i32, ptr %33, align 4, !tbaa !21
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.facetT, ptr %35, i32 0, i32 14
  %37 = load i32, ptr %36, align 4, !tbaa !21
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %28, i32 noundef 4086, ptr noundef @.str.172, i32 noundef %31, i32 noundef %34, i32 noundef %37)
  br label %38

38:                                               ; preds = %27, %18
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.facetT, ptr %39, i32 0, i32 15
  %41 = load i32, ptr %40, align 8
  %42 = lshr i32 %41, 10
  %43 = and i32 %42, 1
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %49, label %45

45:                                               ; preds = %38
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.facetT, ptr %46, i32 0, i32 8
  %48 = load ptr, ptr %47, align 8, !tbaa !11
  call void @qh_newvertices(ptr noundef %48)
  br label %49

49:                                               ; preds = %45, %38
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.facetT, ptr %50, i32 0, i32 8
  %52 = load ptr, ptr %51, align 8, !tbaa !11
  %53 = getelementptr inbounds %struct.setT, ptr %52, i32 0, i32 1
  %54 = getelementptr inbounds [1 x %union.setelemT], ptr %53, i64 0, i64 0
  %55 = load ptr, ptr %54, align 8, !tbaa !14
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = icmp ne ptr %55, %56
  br i1 %57, label %58, label %62

58:                                               ; preds = %49
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.facetT, ptr %59, i32 0, i32 8
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  call void @qh_setaddnth(ptr noundef %60, i32 noundef 0, ptr noundef %61)
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %58, %49
  br label %221

63:                                               ; preds = %3
  %64 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 138), align 8, !tbaa !14
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 138), align 8, !tbaa !14
  store ptr null, ptr %7, align 8, !tbaa !5
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.facetT, ptr %66, i32 0, i32 8
  %68 = load ptr, ptr %67, align 8, !tbaa !11
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %88

70:                                               ; preds = %63
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.facetT, ptr %71, i32 0, i32 8
  %73 = load ptr, ptr %72, align 8, !tbaa !11
  %74 = getelementptr inbounds %struct.setT, ptr %73, i32 0, i32 1
  %75 = getelementptr inbounds [1 x %union.setelemT], ptr %74, i64 0, i64 0
  store ptr %75, ptr %8, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %81, %70
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = getelementptr inbounds ptr, ptr %77, i32 1
  store ptr %78, ptr %8, align 8, !tbaa !5
  %79 = load ptr, ptr %77, align 8, !tbaa !5
  store ptr %79, ptr %7, align 8, !tbaa !5
  %80 = icmp ne ptr %79, null
  br i1 %80, label %81, label %87

81:                                               ; preds = %76
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.vertexT, ptr %82, i32 0, i32 6
  %84 = load i8, ptr %83, align 8
  %85 = and i8 %84, -2
  %86 = or i8 %85, 0
  store i8 %86, ptr %83, align 8
  br label %76, !llvm.loop !22

87:                                               ; preds = %76
  br label %88

88:                                               ; preds = %87, %63
  store ptr null, ptr %10, align 8, !tbaa !5
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.facetT, ptr %89, i32 0, i32 9
  %91 = load ptr, ptr %90, align 8, !tbaa !24
  %92 = icmp ne ptr %91, null
  br i1 %92, label %93, label %153

93:                                               ; preds = %88
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.facetT, ptr %94, i32 0, i32 9
  %96 = load ptr, ptr %95, align 8, !tbaa !24
  %97 = getelementptr inbounds %struct.setT, ptr %96, i32 0, i32 1
  %98 = getelementptr inbounds [1 x %union.setelemT], ptr %97, i64 0, i64 0
  store ptr %98, ptr %11, align 8, !tbaa !5
  br label %99

99:                                               ; preds = %151, %93
  %100 = load ptr, ptr %11, align 8, !tbaa !5
  %101 = getelementptr inbounds ptr, ptr %100, i32 1
  store ptr %101, ptr %11, align 8, !tbaa !5
  %102 = load ptr, ptr %100, align 8, !tbaa !5
  store ptr %102, ptr %10, align 8, !tbaa !5
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %152

104:                                              ; preds = %99
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.ridgeT, ptr %105, i32 0, i32 1
  %107 = load ptr, ptr %106, align 8, !tbaa !25
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = icmp eq ptr %107, %108
  br i1 %109, label %110, label %114

110:                                              ; preds = %104
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.ridgeT, ptr %111, i32 0, i32 2
  %113 = load ptr, ptr %112, align 8, !tbaa !27
  br label %118

114:                                              ; preds = %104
  %115 = load ptr, ptr %10, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.ridgeT, ptr %115, i32 0, i32 1
  %117 = load ptr, ptr %116, align 8, !tbaa !25
  br label %118

118:                                              ; preds = %114, %110
  %119 = phi ptr [ %113, %110 ], [ %117, %114 ]
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = icmp eq ptr %119, %120
  br i1 %121, label %122, label %151

122:                                              ; preds = %118
  store ptr null, ptr %7, align 8, !tbaa !5
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.ridgeT, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !28
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %150

127:                                              ; preds = %122
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.ridgeT, ptr %128, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8, !tbaa !28
  %131 = getelementptr inbounds %struct.setT, ptr %130, i32 0, i32 1
  %132 = getelementptr inbounds [1 x %union.setelemT], ptr %131, i64 0, i64 0
  store ptr %132, ptr %8, align 8, !tbaa !5
  br label %133

133:                                              ; preds = %138, %127
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  %135 = getelementptr inbounds ptr, ptr %134, i32 1
  store ptr %135, ptr %8, align 8, !tbaa !5
  %136 = load ptr, ptr %134, align 8, !tbaa !5
  store ptr %136, ptr %7, align 8, !tbaa !5
  %137 = icmp ne ptr %136, null
  br i1 %137, label %138, label %149

138:                                              ; preds = %133
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.vertexT, ptr %139, i32 0, i32 6
  %141 = load i8, ptr %140, align 8
  %142 = and i8 %141, -2
  %143 = or i8 %142, 1
  store i8 %143, ptr %140, align 8
  %144 = load ptr, ptr %7, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.vertexT, ptr %144, i32 0, i32 6
  %146 = load i8, ptr %145, align 8
  %147 = and i8 %146, -9
  %148 = or i8 %147, 8
  store i8 %148, ptr %145, align 8
  br label %133, !llvm.loop !29

149:                                              ; preds = %133
  br label %150

150:                                              ; preds = %149, %122
  br label %152

151:                                              ; preds = %118
  br label %99, !llvm.loop !30

152:                                              ; preds = %150, %99
  br label %153

153:                                              ; preds = %152, %88
  store ptr null, ptr %7, align 8, !tbaa !5
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.facetT, ptr %154, i32 0, i32 8
  %156 = load ptr, ptr %155, align 8, !tbaa !11
  %157 = icmp ne ptr %156, null
  br i1 %157, label %158, label %179

158:                                              ; preds = %153
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.facetT, ptr %159, i32 0, i32 8
  %161 = load ptr, ptr %160, align 8, !tbaa !11
  %162 = getelementptr inbounds %struct.setT, ptr %161, i32 0, i32 1
  %163 = getelementptr inbounds [1 x %union.setelemT], ptr %162, i64 0, i64 0
  store ptr %163, ptr %8, align 8, !tbaa !5
  br label %164

164:                                              ; preds = %177, %158
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  %166 = getelementptr inbounds ptr, ptr %165, i32 1
  store ptr %166, ptr %8, align 8, !tbaa !5
  %167 = load ptr, ptr %165, align 8, !tbaa !5
  store ptr %167, ptr %7, align 8, !tbaa !5
  %168 = icmp ne ptr %167, null
  br i1 %168, label %169, label %178

169:                                              ; preds = %164
  %170 = load ptr, ptr %7, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.vertexT, ptr %170, i32 0, i32 6
  %172 = load i8, ptr %171, align 8
  %173 = and i8 %172, 1
  %174 = zext i8 %173 to i32
  %175 = icmp ne i32 %174, 0
  br i1 %175, label %177, label %176

176:                                              ; preds = %169
  br label %178

177:                                              ; preds = %169
  br label %164, !llvm.loop !31

178:                                              ; preds = %176, %164
  br label %179

179:                                              ; preds = %178, %153
  %180 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %180, ptr %9, align 8, !tbaa !5
  %181 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !15
  %182 = icmp sge i32 %181, 4
  br i1 %182, label %183, label %194

183:                                              ; preds = %179
  %184 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !18
  %185 = load ptr, ptr %9, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.vertexT, ptr %185, i32 0, i32 4
  %187 = load i32, ptr %186, align 8, !tbaa !19
  %188 = load ptr, ptr %4, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.facetT, ptr %188, i32 0, i32 14
  %190 = load i32, ptr %189, align 4, !tbaa !21
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.facetT, ptr %191, i32 0, i32 14
  %193 = load i32, ptr %192, align 4, !tbaa !21
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %184, i32 noundef 4039, ptr noundef @.str.173, i32 noundef %187, i32 noundef %190, i32 noundef %193)
  br label %194

194:                                              ; preds = %183, %179
  %195 = load ptr, ptr %5, align 8, !tbaa !5
  %196 = load ptr, ptr %9, align 8, !tbaa !5
  %197 = call i32 @qh_addfacetvertex(ptr noundef %195, ptr noundef %196)
  store i32 %197, ptr %12, align 4, !tbaa !9
  %198 = load ptr, ptr %5, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.facetT, ptr %198, i32 0, i32 15
  %200 = load i32, ptr %199, align 8
  %201 = lshr i32 %200, 10
  %202 = and i32 %201, 1
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %208, label %204

204:                                              ; preds = %194
  %205 = load ptr, ptr %5, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.facetT, ptr %205, i32 0, i32 8
  %207 = load ptr, ptr %206, align 8, !tbaa !11
  call void @qh_newvertices(ptr noundef %207)
  br label %220

208:                                              ; preds = %194
  %209 = load ptr, ptr %9, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.vertexT, ptr %209, i32 0, i32 6
  %211 = load i8, ptr %210, align 8
  %212 = lshr i8 %211, 4
  %213 = and i8 %212, 1
  %214 = zext i8 %213 to i32
  %215 = icmp ne i32 %214, 0
  br i1 %215, label %219, label %216

216:                                              ; preds = %208
  %217 = load ptr, ptr %9, align 8, !tbaa !5
  call void @qh_removevertex(ptr noundef %217)
  %218 = load ptr, ptr %9, align 8, !tbaa !5
  call void @qh_appendvertex(ptr noundef %218)
  br label %219

219:                                              ; preds = %216, %208
  br label %220

220:                                              ; preds = %219, %204
  br label %221

221:                                              ; preds = %220, %62
  %222 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !15
  %223 = icmp sge i32 %222, 4
  br i1 %223, label %224, label %229

224:                                              ; preds = %221
  %225 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !18
  %226 = load ptr, ptr %4, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.facetT, ptr %226, i32 0, i32 14
  %228 = load i32, ptr %227, align 4, !tbaa !21
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %225, i32 noundef 4040, ptr noundef @.str.174, i32 noundef %228)
  br label %229

229:                                              ; preds = %224, %221
  store ptr null, ptr %7, align 8, !tbaa !5
  %230 = load ptr, ptr %4, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.facetT, ptr %230, i32 0, i32 8
  %232 = load ptr, ptr %231, align 8, !tbaa !11
  %233 = icmp ne ptr %232, null
  br i1 %233, label %234, label %278

234:                                              ; preds = %229
  %235 = load ptr, ptr %4, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.facetT, ptr %235, i32 0, i32 8
  %237 = load ptr, ptr %236, align 8, !tbaa !11
  %238 = getelementptr inbounds %struct.setT, ptr %237, i32 0, i32 1
  %239 = getelementptr inbounds [1 x %union.setelemT], ptr %238, i64 0, i64 0
  store ptr %239, ptr %8, align 8, !tbaa !5
  br label %240

240:                                              ; preds = %276, %234
  %241 = load ptr, ptr %8, align 8, !tbaa !5
  %242 = getelementptr inbounds ptr, ptr %241, i32 1
  store ptr %242, ptr %8, align 8, !tbaa !5
  %243 = load ptr, ptr %241, align 8, !tbaa !5
  store ptr %243, ptr %7, align 8, !tbaa !5
  %244 = icmp ne ptr %243, null
  br i1 %244, label %245, label %277

245:                                              ; preds = %240
  %246 = load ptr, ptr %7, align 8, !tbaa !5
  %247 = load ptr, ptr %9, align 8, !tbaa !5
  %248 = icmp eq ptr %246, %247
  br i1 %248, label %249, label %258

249:                                              ; preds = %245
  %250 = load i32, ptr %12, align 4, !tbaa !9
  %251 = icmp ne i32 %250, 0
  br i1 %251, label %252, label %258

252:                                              ; preds = %249
  %253 = load ptr, ptr %7, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.vertexT, ptr %253, i32 0, i32 3
  %255 = load ptr, ptr %254, align 8, !tbaa !32
  %256 = load ptr, ptr %4, align 8, !tbaa !5
  %257 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_setreplace(ptr noundef %255, ptr noundef %256, ptr noundef %257)
  br label %276

258:                                              ; preds = %249, %245
  %259 = load ptr, ptr %7, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.vertexT, ptr %259, i32 0, i32 3
  %261 = load ptr, ptr %260, align 8, !tbaa !32
  %262 = load ptr, ptr %4, align 8, !tbaa !5
  %263 = call ptr @qh_setdel(ptr noundef %261, ptr noundef %262)
  %264 = load ptr, ptr %7, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.vertexT, ptr %264, i32 0, i32 3
  %266 = load ptr, ptr %265, align 8, !tbaa !32
  %267 = getelementptr inbounds %struct.setT, ptr %266, i32 0, i32 1
  %268 = getelementptr inbounds [1 x %union.setelemT], ptr %267, i64 0, i64 1
  %269 = load ptr, ptr %268, align 8, !tbaa !14
  %270 = icmp ne ptr %269, null
  br i1 %270, label %275, label %271

271:                                              ; preds = %258
  %272 = load ptr, ptr %7, align 8, !tbaa !5
  %273 = load ptr, ptr %4, align 8, !tbaa !5
  %274 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_mergevertex_del(ptr noundef %272, ptr noundef %273, ptr noundef %274)
  br label %275

275:                                              ; preds = %271, %258
  br label %276

276:                                              ; preds = %275, %252
  br label %240, !llvm.loop !33

277:                                              ; preds = %240
  br label %278

278:                                              ; preds = %277, %229
  %279 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !15
  %280 = icmp sge i32 %279, 4
  br i1 %280, label %281, label %289

281:                                              ; preds = %278
  %282 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !18
  %283 = load ptr, ptr %4, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.facetT, ptr %283, i32 0, i32 14
  %285 = load i32, ptr %284, align 4, !tbaa !21
  %286 = load ptr, ptr %5, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.facetT, ptr %286, i32 0, i32 14
  %288 = load i32, ptr %287, align 4, !tbaa !21
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %282, i32 noundef 4041, ptr noundef @.str.175, i32 noundef %285, i32 noundef %288)
  br label %289

289:                                              ; preds = %281, %278
  %290 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 217), align 8, !tbaa !34
  %291 = add i32 %290, 1
  store i32 %291, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 217), align 8, !tbaa !34
  store ptr null, ptr %13, align 8, !tbaa !5
  %292 = load ptr, ptr %5, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.facetT, ptr %292, i32 0, i32 10
  %294 = load ptr, ptr %293, align 8, !tbaa !35
  %295 = icmp ne ptr %294, null
  br i1 %295, label %296, label %312

296:                                              ; preds = %289
  %297 = load ptr, ptr %5, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.facetT, ptr %297, i32 0, i32 10
  %299 = load ptr, ptr %298, align 8, !tbaa !35
  %300 = getelementptr inbounds %struct.setT, ptr %299, i32 0, i32 1
  %301 = getelementptr inbounds [1 x %union.setelemT], ptr %300, i64 0, i64 0
  store ptr %301, ptr %14, align 8, !tbaa !5
  br label %302

302:                                              ; preds = %307, %296
  %303 = load ptr, ptr %14, align 8, !tbaa !5
  %304 = getelementptr inbounds ptr, ptr %303, i32 1
  store ptr %304, ptr %14, align 8, !tbaa !5
  %305 = load ptr, ptr %303, align 8, !tbaa !5
  store ptr %305, ptr %13, align 8, !tbaa !5
  %306 = icmp ne ptr %305, null
  br i1 %306, label %307, label %311

307:                                              ; preds = %302
  %308 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 217), align 8, !tbaa !34
  %309 = load ptr, ptr %13, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.facetT, ptr %309, i32 0, i32 13
  store i32 %308, ptr %310, align 8, !tbaa !36
  br label %302, !llvm.loop !37

311:                                              ; preds = %302
  br label %312

312:                                              ; preds = %311, %289
  store ptr null, ptr %10, align 8, !tbaa !5
  %313 = load ptr, ptr %4, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct.facetT, ptr %313, i32 0, i32 9
  %315 = load ptr, ptr %314, align 8, !tbaa !24
  %316 = icmp ne ptr %315, null
  br i1 %316, label %317, label %500

317:                                              ; preds = %312
  %318 = load ptr, ptr %4, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.facetT, ptr %318, i32 0, i32 9
  %320 = load ptr, ptr %319, align 8, !tbaa !24
  %321 = getelementptr inbounds %struct.setT, ptr %320, i32 0, i32 1
  %322 = getelementptr inbounds [1 x %union.setelemT], ptr %321, i64 0, i64 0
  store ptr %322, ptr %11, align 8, !tbaa !5
  br label %323

323:                                              ; preds = %498, %317
  %324 = load ptr, ptr %11, align 8, !tbaa !5
  %325 = getelementptr inbounds ptr, ptr %324, i32 1
  store ptr %325, ptr %11, align 8, !tbaa !5
  %326 = load ptr, ptr %324, align 8, !tbaa !5
  store ptr %326, ptr %10, align 8, !tbaa !5
  %327 = icmp ne ptr %326, null
  br i1 %327, label %328, label %499

328:                                              ; preds = %323
  %329 = load ptr, ptr %10, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct.ridgeT, ptr %329, i32 0, i32 1
  %331 = load ptr, ptr %330, align 8, !tbaa !25
  %332 = load ptr, ptr %4, align 8, !tbaa !5
  %333 = icmp eq ptr %331, %332
  br i1 %333, label %334, label %338

334:                                              ; preds = %328
  %335 = load ptr, ptr %10, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.ridgeT, ptr %335, i32 0, i32 2
  %337 = load ptr, ptr %336, align 8, !tbaa !27
  br label %342

338:                                              ; preds = %328
  %339 = load ptr, ptr %10, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.ridgeT, ptr %339, i32 0, i32 1
  %341 = load ptr, ptr %340, align 8, !tbaa !25
  br label %342

342:                                              ; preds = %338, %334
  %343 = phi ptr [ %337, %334 ], [ %341, %338 ]
  store ptr %343, ptr %15, align 8, !tbaa !5
  %344 = load ptr, ptr %15, align 8, !tbaa !5
  %345 = load ptr, ptr %5, align 8, !tbaa !5
  %346 = icmp eq ptr %344, %345
  br i1 %346, label %347, label %356

347:                                              ; preds = %342
  %348 = load ptr, ptr %10, align 8, !tbaa !5
  call void @qh_delridge_merge(ptr noundef %348)
  %349 = load ptr, ptr %11, align 8, !tbaa !5
  %350 = getelementptr inbounds ptr, ptr %349, i32 -1
  store ptr %350, ptr %11, align 8, !tbaa !5
  %351 = load ptr, ptr %5, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.facetT, ptr %351, i32 0, i32 10
  %353 = load ptr, ptr %352, align 8, !tbaa !35
  %354 = load ptr, ptr %4, align 8, !tbaa !5
  %355 = call ptr @qh_setdel(ptr noundef %353, ptr noundef %354)
  br label %498

356:                                              ; preds = %342
  %357 = load ptr, ptr %15, align 8, !tbaa !5
  %358 = getelementptr inbounds %struct.facetT, ptr %357, i32 0, i32 15
  %359 = load i32, ptr %358, align 8
  %360 = lshr i32 %359, 21
  %361 = and i32 %360, 1
  %362 = icmp ne i32 %361, 0
  br i1 %362, label %363, label %386

363:                                              ; preds = %356
  %364 = load ptr, ptr %15, align 8, !tbaa !5
  %365 = getelementptr inbounds %struct.facetT, ptr %364, i32 0, i32 10
  %366 = load ptr, ptr %365, align 8, !tbaa !35
  %367 = load ptr, ptr %4, align 8, !tbaa !5
  %368 = call i32 @qh_setin(ptr noundef %366, ptr noundef %367)
  %369 = icmp ne i32 %368, 0
  br i1 %369, label %386, label %370

370:                                              ; preds = %363
  %371 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !18
  %372 = load ptr, ptr %4, align 8, !tbaa !5
  %373 = getelementptr inbounds %struct.facetT, ptr %372, i32 0, i32 14
  %374 = load i32, ptr %373, align 4, !tbaa !21
  %375 = load ptr, ptr %15, align 8, !tbaa !5
  %376 = getelementptr inbounds %struct.facetT, ptr %375, i32 0, i32 14
  %377 = load i32, ptr %376, align 4, !tbaa !21
  %378 = load ptr, ptr %4, align 8, !tbaa !5
  %379 = getelementptr inbounds %struct.facetT, ptr %378, i32 0, i32 14
  %380 = load i32, ptr %379, align 4, !tbaa !21
  %381 = load ptr, ptr %5, align 8, !tbaa !5
  %382 = getelementptr inbounds %struct.facetT, ptr %381, i32 0, i32 14
  %383 = load i32, ptr %382, align 4, !tbaa !21
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %371, i32 noundef 6356, ptr noundef @.str.176, i32 noundef %374, i32 noundef %377, i32 noundef %380, i32 noundef %383)
  %384 = load ptr, ptr %4, align 8, !tbaa !5
  %385 = load ptr, ptr %15, align 8, !tbaa !5
  call void @qh_errexit2(i32 noundef 5, ptr noundef %384, ptr noundef %385)
  br label %497

386:                                              ; preds = %363, %356
  %387 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !15
  %388 = icmp sge i32 %387, 4
  br i1 %388, label %389, label %415

389:                                              ; preds = %386
  %390 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !18
  %391 = load ptr, ptr %10, align 8, !tbaa !5
  %392 = getelementptr inbounds %struct.ridgeT, ptr %391, i32 0, i32 3
  %393 = load i32, ptr %392, align 8, !tbaa !38
  %394 = load ptr, ptr %15, align 8, !tbaa !5
  %395 = getelementptr inbounds %struct.facetT, ptr %394, i32 0, i32 14
  %396 = load i32, ptr %395, align 4, !tbaa !21
  %397 = load ptr, ptr %5, align 8, !tbaa !5
  %398 = getelementptr inbounds %struct.facetT, ptr %397, i32 0, i32 14
  %399 = load i32, ptr %398, align 4, !tbaa !21
  %400 = load ptr, ptr %15, align 8, !tbaa !5
  %401 = getelementptr inbounds %struct.facetT, ptr %400, i32 0, i32 13
  %402 = load i32, ptr %401, align 8, !tbaa !36
  %403 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 217), align 8, !tbaa !34
  %404 = icmp ne i32 %402, %403
  %405 = zext i1 %404 to i32
  %406 = load ptr, ptr %15, align 8, !tbaa !5
  %407 = getelementptr inbounds %struct.facetT, ptr %406, i32 0, i32 10
  %408 = load ptr, ptr %407, align 8, !tbaa !35
  %409 = getelementptr inbounds %struct.setT, ptr %408, i32 0, i32 1
  %410 = getelementptr inbounds [1 x %union.setelemT], ptr %409, i64 0, i64 0
  %411 = load ptr, ptr %410, align 8, !tbaa !14
  %412 = load ptr, ptr %4, align 8, !tbaa !5
  %413 = icmp eq ptr %411, %412
  %414 = zext i1 %413 to i32
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %390, i32 noundef 4059, ptr noundef @.str.177, i32 noundef %393, i32 noundef %396, i32 noundef %399, i32 noundef %405, i32 noundef %414)
  br label %415

415:                                              ; preds = %389, %386
  %416 = load ptr, ptr %5, align 8, !tbaa !5
  %417 = getelementptr inbounds %struct.facetT, ptr %416, i32 0, i32 9
  %418 = load ptr, ptr %10, align 8, !tbaa !5
  call void @qh_setappend(ptr noundef %417, ptr noundef %418)
  %419 = load ptr, ptr %15, align 8, !tbaa !5
  %420 = getelementptr inbounds %struct.facetT, ptr %419, i32 0, i32 13
  %421 = load i32, ptr %420, align 8, !tbaa !36
  %422 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 217), align 8, !tbaa !34
  %423 = icmp ne i32 %421, %422
  br i1 %423, label %424, label %436

424:                                              ; preds = %415
  %425 = load ptr, ptr %5, align 8, !tbaa !5
  %426 = getelementptr inbounds %struct.facetT, ptr %425, i32 0, i32 10
  %427 = load ptr, ptr %15, align 8, !tbaa !5
  call void @qh_setappend(ptr noundef %426, ptr noundef %427)
  %428 = load ptr, ptr %15, align 8, !tbaa !5
  %429 = getelementptr inbounds %struct.facetT, ptr %428, i32 0, i32 10
  %430 = load ptr, ptr %429, align 8, !tbaa !35
  %431 = load ptr, ptr %4, align 8, !tbaa !5
  %432 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_setreplace(ptr noundef %430, ptr noundef %431, ptr noundef %432)
  %433 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 217), align 8, !tbaa !34
  %434 = load ptr, ptr %15, align 8, !tbaa !5
  %435 = getelementptr inbounds %struct.facetT, ptr %434, i32 0, i32 13
  store i32 %433, ptr %435, align 8, !tbaa !36
  br label %472

436:                                              ; preds = %415
  %437 = load ptr, ptr %15, align 8, !tbaa !5
  %438 = getelementptr inbounds %struct.facetT, ptr %437, i32 0, i32 15
  %439 = load i32, ptr %438, align 8
  %440 = lshr i32 %439, 13
  %441 = and i32 %440, 1
  %442 = icmp ne i32 %441, 0
  br i1 %442, label %443, label %445

443:                                              ; preds = %436
  %444 = load ptr, ptr %15, align 8, !tbaa !5
  call void @qh_makeridges(ptr noundef %444)
  br label %445

445:                                              ; preds = %443, %436
  %446 = load ptr, ptr %15, align 8, !tbaa !5
  %447 = getelementptr inbounds %struct.facetT, ptr %446, i32 0, i32 10
  %448 = load ptr, ptr %447, align 8, !tbaa !35
  %449 = getelementptr inbounds %struct.setT, ptr %448, i32 0, i32 1
  %450 = getelementptr inbounds [1 x %union.setelemT], ptr %449, i64 0, i64 0
  %451 = load ptr, ptr %450, align 8, !tbaa !14
  %452 = load ptr, ptr %4, align 8, !tbaa !5
  %453 = icmp eq ptr %451, %452
  br i1 %453, label %454, label %465

454:                                              ; preds = %445
  %455 = load ptr, ptr %15, align 8, !tbaa !5
  %456 = getelementptr inbounds %struct.facetT, ptr %455, i32 0, i32 10
  %457 = load ptr, ptr %456, align 8, !tbaa !35
  %458 = load ptr, ptr %5, align 8, !tbaa !5
  %459 = call ptr @qh_setdel(ptr noundef %457, ptr noundef %458)
  %460 = load ptr, ptr %15, align 8, !tbaa !5
  %461 = getelementptr inbounds %struct.facetT, ptr %460, i32 0, i32 10
  %462 = load ptr, ptr %461, align 8, !tbaa !35
  %463 = load ptr, ptr %4, align 8, !tbaa !5
  %464 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_setreplace(ptr noundef %462, ptr noundef %463, ptr noundef %464)
  br label %471

465:                                              ; preds = %445
  %466 = load ptr, ptr %15, align 8, !tbaa !5
  %467 = getelementptr inbounds %struct.facetT, ptr %466, i32 0, i32 10
  %468 = load ptr, ptr %467, align 8, !tbaa !35
  %469 = load ptr, ptr %4, align 8, !tbaa !5
  %470 = call ptr @qh_setdel(ptr noundef %468, ptr noundef %469)
  br label %471

471:                                              ; preds = %465, %454
  br label %472

472:                                              ; preds = %471, %424
  %473 = load ptr, ptr %10, align 8, !tbaa !5
  %474 = getelementptr inbounds %struct.ridgeT, ptr %473, i32 0, i32 1
  %475 = load ptr, ptr %474, align 8, !tbaa !25
  %476 = load ptr, ptr %4, align 8, !tbaa !5
  %477 = icmp eq ptr %475, %476
  br i1 %477, label %478, label %487

478:                                              ; preds = %472
  %479 = load ptr, ptr %5, align 8, !tbaa !5
  %480 = load ptr, ptr %10, align 8, !tbaa !5
  %481 = getelementptr inbounds %struct.ridgeT, ptr %480, i32 0, i32 1
  store ptr %479, ptr %481, align 8, !tbaa !25
  %482 = load ptr, ptr %10, align 8, !tbaa !5
  %483 = getelementptr inbounds %struct.ridgeT, ptr %482, i32 0, i32 4
  %484 = load i8, ptr %483, align 4
  %485 = and i8 %484, -33
  %486 = or i8 %485, 0
  store i8 %486, ptr %483, align 4
  br label %496

487:                                              ; preds = %472
  %488 = load ptr, ptr %5, align 8, !tbaa !5
  %489 = load ptr, ptr %10, align 8, !tbaa !5
  %490 = getelementptr inbounds %struct.ridgeT, ptr %489, i32 0, i32 2
  store ptr %488, ptr %490, align 8, !tbaa !27
  %491 = load ptr, ptr %10, align 8, !tbaa !5
  %492 = getelementptr inbounds %struct.ridgeT, ptr %491, i32 0, i32 4
  %493 = load i8, ptr %492, align 4
  %494 = and i8 %493, -65
  %495 = or i8 %494, 0
  store i8 %495, ptr %492, align 4
  br label %496

496:                                              ; preds = %487, %478
  br label %497

497:                                              ; preds = %496, %370
  br label %498

498:                                              ; preds = %497, %347
  br label %323, !llvm.loop !39

499:                                              ; preds = %323
  br label %500

500:                                              ; preds = %499, %312
  %501 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !15
  %502 = icmp sge i32 %501, 3
  br i1 %502, label %503, label %514

503:                                              ; preds = %500
  %504 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !18
  %505 = load ptr, ptr %4, align 8, !tbaa !5
  %506 = getelementptr inbounds %struct.facetT, ptr %505, i32 0, i32 14
  %507 = load i32, ptr %506, align 4, !tbaa !21
  %508 = load ptr, ptr %9, align 8, !tbaa !5
  %509 = getelementptr inbounds %struct.vertexT, ptr %508, i32 0, i32 4
  %510 = load i32, ptr %509, align 8, !tbaa !19
  %511 = load ptr, ptr %5, align 8, !tbaa !5
  %512 = getelementptr inbounds %struct.facetT, ptr %511, i32 0, i32 14
  %513 = load i32, ptr %512, align 4, !tbaa !21
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %504, i32 noundef 3006, ptr noundef @.str.178, i32 noundef %507, i32 noundef %510, i32 noundef %513)
  br label %514

514:                                              ; preds = %503, %500
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  ret void
}

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

declare void @qh_removevertex(ptr noundef) #1

declare void @qh_appendvertex(ptr noundef) #1

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

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, !6, i64 64}
!12 = !{!"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}
!13 = !{!"double", !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !10, i64 136}
!16 = !{!"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, !17, 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}
!17 = !{!"long", !7, i64 0}
!18 = !{!16, !6, i64 2424}
!19 = !{!20, !10, i64 32}
!20 = !{!"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}
!21 = !{!12, !10, i64 108}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!12, !6, i64 72}
!25 = !{!26, !6, i64 8}
!26 = !{!"ridgeT", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 28, !10, i64 28, !10, i64 28, !10, i64 28, !10, i64 28, !10, i64 28}
!27 = !{!26, !6, i64 16}
!28 = !{!26, !6, i64 0}
!29 = distinct !{!29, !23}
!30 = distinct !{!30, !23}
!31 = distinct !{!31, !23}
!32 = !{!20, !6, i64 24}
!33 = distinct !{!33, !23}
!34 = !{!16, !10, i64 2784}
!35 = !{!12, !6, i64 80}
!36 = !{!12, !10, i64 104}
!37 = distinct !{!37, !23}
!38 = !{!26, !10, i64 24}
!39 = distinct !{!39, !23}


; 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.172 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.173 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.174 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.175 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.176 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.177 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.178 = external hidden unnamed_addr constant [56 x i8], align 1

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

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

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

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

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

declare ptr @qh_setdel(ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @qh_setin(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

declare void @qh_setreplace(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @qh_mergesimplex(ptr noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #1 {
  %.not = icmp eq i32 %2, 0
  br i1 %.not, label %32, label %4

4:                                                ; preds = %3
  %5 = getelementptr inbounds i8, ptr %0, i64 64
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 8
  %8 = load ptr, ptr %7, align 8, !tbaa !12
  %9 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !13
  %10 = icmp sgt i32 %9, 3
  br i1 %10, label %11, label %19

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

19:                                               ; preds = %11, %4
  %20 = getelementptr inbounds i8, ptr %1, i64 112
  %21 = load i32, ptr %20, align 8
  %22 = and i32 %21, 1024
  %.not168 = icmp eq i32 %22, 0
  br i1 %.not168, label %23, label %26

23:                                               ; preds = %19
  %24 = getelementptr inbounds i8, ptr %1, i64 64
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  tail call void @qh_newvertices(ptr noundef %25)
  br label %26

26:                                               ; preds = %23, %19
  %27 = getelementptr inbounds i8, ptr %1, i64 64
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %28, i64 8
  %30 = load ptr, ptr %29, align 8, !tbaa !12
  %.not169 = icmp eq ptr %30, %8
  br i1 %.not169, label %93, label %31

31:                                               ; preds = %26
  tail call void @qh_setaddnth(ptr noundef nonnull %27, i32 noundef 0, ptr noundef %8) #2
  br label %93

32:                                               ; preds = %3
  %33 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1104), align 8, !tbaa !12
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1104), align 8, !tbaa !12
  %35 = getelementptr inbounds i8, ptr %0, i64 64
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %.not154 = icmp eq ptr %36, null
  br i1 %.not154, label %.loopexit193, label %.preheader192

.preheader192:                                    ; preds = %32
  %.0128195 = getelementptr inbounds i8, ptr %36, i64 8
  %37 = load ptr, ptr %.0128195, align 8, !tbaa !20
  %.not155196 = icmp eq ptr %37, null
  br i1 %.not155196, label %.loopexit193, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader192, %.lr.ph
  %38 = phi ptr [ %42, %.lr.ph ], [ %37, %.preheader192 ]
  %.0128197 = phi ptr [ %.0128, %.lr.ph ], [ %.0128195, %.preheader192 ]
  %39 = getelementptr inbounds i8, ptr %38, i64 40
  %40 = load i8, ptr %39, align 8
  %41 = and i8 %40, -2
  store i8 %41, ptr %39, align 8
  %.0128 = getelementptr inbounds i8, ptr %.0128197, i64 8
  %42 = load ptr, ptr %.0128, align 8, !tbaa !20
  %.not155 = icmp eq ptr %42, null
  br i1 %.not155, label %.loopexit193, label %.lr.ph, !llvm.loop !21

.loopexit193:                                     ; preds = %.lr.ph, %.preheader192, %32
  %43 = getelementptr inbounds i8, ptr %0, i64 72
  %44 = load ptr, ptr %43, align 8, !tbaa !23
  %.not156 = icmp eq ptr %44, null
  br i1 %.not156, label %.loopexit189, label %.preheader190

.preheader190:                                    ; preds = %.loopexit193, %53
  %.pn157 = phi ptr [ %.0126, %53 ], [ %44, %.loopexit193 ]
  %.0126 = getelementptr inbounds i8, ptr %.pn157, i64 8
  %45 = load ptr, ptr %.0126, align 8, !tbaa !20
  %.not158 = icmp eq ptr %45, null
  br i1 %.not158, label %.loopexit189, label %46

46:                                               ; preds = %.preheader190
  %47 = getelementptr inbounds i8, ptr %45, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !24
  %49 = icmp eq ptr %48, %0
  br i1 %49, label %50, label %53

50:                                               ; preds = %46
  %51 = getelementptr inbounds i8, ptr %45, i64 16
  %52 = load ptr, ptr %51, align 8, !tbaa !26
  br label %53

53:                                               ; preds = %46, %50
  %54 = phi ptr [ %52, %50 ], [ %48, %46 ]
  %55 = icmp eq ptr %54, %1
  br i1 %55, label %56, label %.preheader190, !llvm.loop !27

56:                                               ; preds = %53
  %57 = load ptr, ptr %45, align 8, !tbaa !28
  %.not159 = icmp eq ptr %57, null
  br i1 %.not159, label %.loopexit189, label %.preheader188

.preheader188:                                    ; preds = %56
  %.1129198 = getelementptr inbounds i8, ptr %57, i64 8
  %58 = load ptr, ptr %.1129198, align 8, !tbaa !20
  %.not161199 = icmp eq ptr %58, null
  br i1 %.not161199, label %.loopexit189, label %.lr.ph201

.lr.ph201:                                        ; preds = %.preheader188, %.lr.ph201
  %59 = phi ptr [ %63, %.lr.ph201 ], [ %58, %.preheader188 ]
  %.1129200 = phi ptr [ %.1129, %.lr.ph201 ], [ %.1129198, %.preheader188 ]
  %60 = getelementptr inbounds i8, ptr %59, i64 40
  %61 = load i8, ptr %60, align 8
  %62 = or i8 %61, 9
  store i8 %62, ptr %60, align 8
  %.1129 = getelementptr inbounds i8, ptr %.1129200, i64 8
  %63 = load ptr, ptr %.1129, align 8, !tbaa !20
  %.not161 = icmp eq ptr %63, null
  br i1 %.not161, label %.loopexit189, label %.lr.ph201, !llvm.loop !29

.loopexit189:                                     ; preds = %.preheader190, %.lr.ph201, %.preheader188, %56, %.loopexit193
  %64 = load ptr, ptr %35, align 8, !tbaa !5
  %.not162 = icmp eq ptr %64, null
  br i1 %.not162, label %.loopexit187, label %.preheader186

.preheader186:                                    ; preds = %.loopexit189, %66
  %.pn163 = phi ptr [ %.2130, %66 ], [ %64, %.loopexit189 ]
  %.2130 = getelementptr inbounds i8, ptr %.pn163, i64 8
  %65 = load ptr, ptr %.2130, align 8, !tbaa !20
  %.not164 = icmp eq ptr %65, null
  br i1 %.not164, label %.loopexit187, label %66

66:                                               ; preds = %.preheader186
  %67 = getelementptr inbounds i8, ptr %65, i64 40
  %68 = load i8, ptr %67, align 8
  %69 = and i8 %68, 1
  %.not165 = icmp eq i8 %69, 0
  br i1 %.not165, label %.loopexit187, label %.preheader186, !llvm.loop !30

.loopexit187:                                     ; preds = %.preheader186, %66, %.loopexit189
  %.0 = phi ptr [ null, %.loopexit189 ], [ null, %.preheader186 ], [ %65, %66 ]
  %70 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !13
  %71 = icmp sgt i32 %70, 3
  br i1 %71, label %72, label %80

72:                                               ; preds = %.loopexit187
  %73 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !16
  %74 = getelementptr inbounds i8, ptr %.0, i64 32
  %75 = load i32, ptr %74, align 8, !tbaa !17
  %76 = getelementptr inbounds i8, ptr %0, i64 108
  %77 = load i32, ptr %76, align 4, !tbaa !19
  %78 = getelementptr inbounds i8, ptr %1, i64 108
  %79 = load i32, ptr %78, align 4, !tbaa !19
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %73, i32 noundef 4039, ptr noundef nonnull @.str.173, i32 noundef %75, i32 noundef %77, i32 noundef %79) #2
  br label %80

80:                                               ; preds = %72, %.loopexit187
  %81 = tail call i32 @qh_addfacetvertex(ptr noundef %1, ptr noundef %.0) #2
  %82 = getelementptr inbounds i8, ptr %1, i64 112
  %83 = load i32, ptr %82, align 8
  %84 = and i32 %83, 1024
  %.not166 = icmp eq i32 %84, 0
  br i1 %.not166, label %85, label %88

85:                                               ; preds = %80
  %86 = getelementptr inbounds i8, ptr %1, i64 64
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  tail call void @qh_newvertices(ptr noundef %87)
  br label %93

88:                                               ; preds = %80
  %89 = getelementptr inbounds i8, ptr %.0, i64 40
  %90 = load i8, ptr %89, align 8
  %91 = and i8 %90, 16
  %.not167 = icmp eq i8 %91, 0
  br i1 %.not167, label %92, label %93

92:                                               ; preds = %88
  tail call void @qh_removevertex(ptr noundef nonnull %.0) #2
  tail call void @qh_appendvertex(ptr noundef nonnull %.0) #2
  br label %93

93:                                               ; preds = %85, %92, %88, %26, %31
  %.0127 = phi ptr [ %8, %31 ], [ %8, %26 ], [ %.0, %88 ], [ %.0, %92 ], [ %.0, %85 ]
  %.0125 = phi i32 [ 1, %31 ], [ 0, %26 ], [ %81, %88 ], [ %81, %92 ], [ %81, %85 ]
  %94 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !13
  %95 = icmp sgt i32 %94, 3
  br i1 %95, label %96, label %100

96:                                               ; preds = %93
  %97 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !16
  %98 = getelementptr inbounds i8, ptr %0, i64 108
  %99 = load i32, ptr %98, align 4, !tbaa !19
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %97, i32 noundef 4040, ptr noundef nonnull @.str.174, i32 noundef %99) #2
  br label %100

100:                                              ; preds = %96, %93
  %101 = getelementptr inbounds i8, ptr %0, i64 64
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  %.not170 = icmp eq ptr %102, null
  br i1 %.not170, label %.loopexit185, label %.preheader184

.preheader184:                                    ; preds = %100
  %.3202 = getelementptr inbounds i8, ptr %102, i64 8
  %103 = load ptr, ptr %.3202, align 8, !tbaa !20
  %.not172203 = icmp eq ptr %103, null
  br i1 %.not172203, label %.loopexit185, label %.lr.ph205

.lr.ph205:                                        ; preds = %.preheader184
  %104 = icmp ne i32 %.0125, 0
  br label %105

105:                                              ; preds = %.lr.ph205, %117
  %106 = phi ptr [ %103, %.lr.ph205 ], [ %118, %117 ]
  %.3204 = phi ptr [ %.3202, %.lr.ph205 ], [ %.3, %117 ]
  %107 = icmp eq ptr %106, %.0127
  %or.cond = select i1 %107, i1 %104, i1 false
  %108 = getelementptr inbounds i8, ptr %106, i64 24
  %109 = load ptr, ptr %108, align 8, !tbaa !31
  br i1 %or.cond, label %110, label %111

110:                                              ; preds = %105
  tail call void @qh_setreplace(ptr noundef %109, ptr noundef %0, ptr noundef %1) #2
  br label %117

111:                                              ; preds = %105
  %112 = tail call ptr @qh_setdel(ptr noundef %109, ptr noundef %0) #2
  %113 = load ptr, ptr %108, align 8, !tbaa !31
  %114 = getelementptr inbounds i8, ptr %113, i64 16
  %115 = load ptr, ptr %114, align 8, !tbaa !12
  %.not182 = icmp eq ptr %115, null
  br i1 %.not182, label %116, label %117

116:                                              ; preds = %111
  tail call void @qh_mergevertex_del(ptr noundef nonnull %106, ptr noundef %0, ptr noundef %1)
  br label %117

117:                                              ; preds = %111, %116, %110
  %.3 = getelementptr inbounds i8, ptr %.3204, i64 8
  %118 = load ptr, ptr %.3, align 8, !tbaa !20
  %.not172 = icmp eq ptr %118, null
  br i1 %.not172, label %.loopexit185, label %105, !llvm.loop !32

.loopexit185:                                     ; preds = %117, %.preheader184, %100
  %119 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !13
  %120 = icmp sgt i32 %119, 3
  br i1 %120, label %121, label %127

121:                                              ; preds = %.loopexit185
  %122 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !16
  %123 = getelementptr inbounds i8, ptr %0, i64 108
  %124 = load i32, ptr %123, align 4, !tbaa !19
  %125 = getelementptr inbounds i8, ptr %1, i64 108
  %126 = load i32, ptr %125, align 4, !tbaa !19
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %122, i32 noundef 4041, ptr noundef nonnull @.str.175, i32 noundef %124, i32 noundef %126) #2
  br label %127

127:                                              ; preds = %121, %.loopexit185
  %128 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2784), align 8, !tbaa !33
  %129 = add i32 %128, 1
  store i32 %129, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2784), align 8, !tbaa !33
  %130 = getelementptr inbounds i8, ptr %1, i64 80
  %131 = load ptr, ptr %130, align 8, !tbaa !34
  %.not173 = icmp eq ptr %131, null
  br i1 %.not173, label %.loopexit183, label %.preheader

.preheader:                                       ; preds = %127
  %.0124206 = getelementptr inbounds i8, ptr %131, i64 8
  %132 = load ptr, ptr %.0124206, align 8, !tbaa !20
  %.not175207 = icmp eq ptr %132, null
  br i1 %.not175207, label %.loopexit183, label %.lr.ph209

.lr.ph209:                                        ; preds = %.preheader, %.lr.ph209
  %133 = phi ptr [ %135, %.lr.ph209 ], [ %132, %.preheader ]
  %.0124208 = phi ptr [ %.0124, %.lr.ph209 ], [ %.0124206, %.preheader ]
  %134 = getelementptr inbounds i8, ptr %133, i64 104
  store i32 %129, ptr %134, align 8, !tbaa !35
  %.0124 = getelementptr inbounds i8, ptr %.0124208, i64 8
  %135 = load ptr, ptr %.0124, align 8, !tbaa !20
  %.not175 = icmp eq ptr %135, null
  br i1 %.not175, label %.loopexit183, label %.lr.ph209, !llvm.loop !36

.loopexit183:                                     ; preds = %.lr.ph209, %.preheader, %127
  %136 = getelementptr inbounds i8, ptr %0, i64 72
  %137 = load ptr, ptr %136, align 8, !tbaa !23
  %.not176 = icmp eq ptr %137, null
  br i1 %.not176, label %.loopexit, label %138

138:                                              ; preds = %.loopexit183
  %139 = getelementptr inbounds i8, ptr %137, i64 8
  %140 = load ptr, ptr %139, align 8, !tbaa !20
  %.not177210 = icmp eq ptr %140, null
  br i1 %.not177210, label %.loopexit, label %.lr.ph212

.lr.ph212:                                        ; preds = %138
  %141 = getelementptr inbounds i8, ptr %137, i64 16
  %142 = getelementptr inbounds i8, ptr %0, i64 108
  %143 = getelementptr inbounds i8, ptr %1, i64 108
  %144 = getelementptr inbounds i8, ptr %1, i64 72
  br label %145

145:                                              ; preds = %.lr.ph212, %230
  %146 = phi ptr [ %140, %.lr.ph212 ], [ %232, %230 ]
  %147 = phi ptr [ %141, %.lr.ph212 ], [ %231, %230 ]
  %.1211 = phi ptr [ %139, %.lr.ph212 ], [ %.2, %230 ]
  %148 = getelementptr inbounds i8, ptr %146, i64 8
  %149 = load ptr, ptr %148, align 8, !tbaa !24
  %150 = icmp eq ptr %149, %0
  br i1 %150, label %151, label %154

151:                                              ; preds = %145
  %152 = getelementptr inbounds i8, ptr %146, i64 16
  %153 = load ptr, ptr %152, align 8, !tbaa !26
  br label %154

154:                                              ; preds = %145, %151
  %155 = phi ptr [ %153, %151 ], [ %149, %145 ]
  %156 = icmp eq ptr %155, %1
  br i1 %156, label %157, label %160

157:                                              ; preds = %154
  tail call void @qh_delridge_merge(ptr noundef nonnull %146)
  %158 = load ptr, ptr %130, align 8, !tbaa !34
  %159 = tail call ptr @qh_setdel(ptr noundef %158, ptr noundef %0) #2
  br label %230

160:                                              ; preds = %154
  %161 = getelementptr inbounds i8, ptr %155, i64 112
  %162 = load i32, ptr %161, align 8
  %163 = and i32 %162, 2097152
  %.not178 = icmp eq i32 %163, 0
  br i1 %.not178, label %174, label %164

164:                                              ; preds = %160
  %165 = getelementptr inbounds i8, ptr %155, i64 80
  %166 = load ptr, ptr %165, align 8, !tbaa !34
  %167 = tail call i32 @qh_setin(ptr noundef %166, ptr noundef %0) #2
  %.not179 = icmp eq i32 %167, 0
  br i1 %.not179, label %168, label %174

168:                                              ; preds = %164
  %169 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !16
  %170 = load i32, ptr %142, align 4, !tbaa !19
  %171 = getelementptr inbounds i8, ptr %155, i64 108
  %172 = load i32, ptr %171, align 4, !tbaa !19
  %173 = load i32, ptr %143, align 4, !tbaa !19
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %169, i32 noundef 6356, ptr noundef nonnull @.str.176, i32 noundef %170, i32 noundef %172, i32 noundef %170, i32 noundef %173) #2
  tail call void @qh_errexit2(i32 noundef 5, ptr noundef %0, ptr noundef nonnull %155) #2
  br label %230

174:                                              ; preds = %164, %160
  %175 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !13
  %176 = icmp sgt i32 %175, 3
  br i1 %176, label %177, label %195

177:                                              ; preds = %174
  %178 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !16
  %179 = getelementptr inbounds i8, ptr %146, i64 24
  %180 = load i32, ptr %179, align 8, !tbaa !37
  %181 = getelementptr inbounds i8, ptr %155, i64 108
  %182 = load i32, ptr %181, align 4, !tbaa !19
  %183 = load i32, ptr %143, align 4, !tbaa !19
  %184 = getelementptr inbounds i8, ptr %155, i64 104
  %185 = load i32, ptr %184, align 8, !tbaa !35
  %186 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2784), align 8, !tbaa !33
  %187 = icmp ne i32 %185, %186
  %188 = zext i1 %187 to i32
  %189 = getelementptr inbounds i8, ptr %155, i64 80
  %190 = load ptr, ptr %189, align 8, !tbaa !34
  %191 = getelementptr inbounds i8, ptr %190, i64 8
  %192 = load ptr, ptr %191, align 8, !tbaa !12
  %193 = icmp eq ptr %192, %0
  %194 = zext i1 %193 to i32
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %178, i32 noundef 4059, ptr noundef nonnull @.str.177, i32 noundef %180, i32 noundef %182, i32 noundef %183, i32 noundef %188, i32 noundef %194) #2
  br label %195

195:                                              ; preds = %177, %174
  tail call void @qh_setappend(ptr noundef nonnull %144, ptr noundef nonnull %146) #2
  %196 = getelementptr inbounds i8, ptr %155, i64 104
  %197 = load i32, ptr %196, align 8, !tbaa !35
  %198 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2784), align 8, !tbaa !33
  %.not180 = icmp eq i32 %197, %198
  br i1 %.not180, label %203, label %199

199:                                              ; preds = %195
  tail call void @qh_setappend(ptr noundef nonnull %130, ptr noundef nonnull %155) #2
  %200 = getelementptr inbounds i8, ptr %155, i64 80
  %201 = load ptr, ptr %200, align 8, !tbaa !34
  tail call void @qh_setreplace(ptr noundef %201, ptr noundef %0, ptr noundef %1) #2
  %202 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2784), align 8, !tbaa !33
  store i32 %202, ptr %196, align 8, !tbaa !35
  br label %218

203:                                              ; preds = %195
  %204 = load i32, ptr %161, align 8
  %205 = and i32 %204, 8192
  %.not181 = icmp eq i32 %205, 0
  br i1 %.not181, label %207, label %206

206:                                              ; preds = %203
  tail call void @qh_makeridges(ptr noundef nonnull %155)
  br label %207

207:                                              ; preds = %206, %203
  %208 = getelementptr inbounds i8, ptr %155, i64 80
  %209 = load ptr, ptr %208, align 8, !tbaa !34
  %210 = getelementptr inbounds i8, ptr %209, i64 8
  %211 = load ptr, ptr %210, align 8, !tbaa !12
  %212 = icmp eq ptr %211, %0
  br i1 %212, label %213, label %216

213:                                              ; preds = %207
  %214 = tail call ptr @qh_setdel(ptr noundef nonnull %209, ptr noundef %1) #2
  %215 = load ptr, ptr %208, align 8, !tbaa !34
  tail call void @qh_setreplace(ptr noundef %215, ptr noundef %0, ptr noundef %1) #2
  br label %218

216:                                              ; preds = %207
  %217 = tail call ptr @qh_setdel(ptr noundef nonnull %209, ptr noundef %0) #2
  br label %218

218:                                              ; preds = %213, %216, %199
  %219 = load ptr, ptr %148, align 8, !tbaa !24
  %220 = icmp eq ptr %219, %0
  br i1 %220, label %221, label %225

221:                                              ; preds = %218
  store ptr %1, ptr %148, align 8, !tbaa !24
  %222 = getelementptr inbounds i8, ptr %146, i64 28
  %223 = load i8, ptr %222, align 4
  %224 = and i8 %223, -33
  store i8 %224, ptr %222, align 4
  br label %230

225:                                              ; preds = %218
  %226 = getelementptr inbounds i8, ptr %146, i64 16
  store ptr %1, ptr %226, align 8, !tbaa !26
  %227 = getelementptr inbounds i8, ptr %146, i64 28
  %228 = load i8, ptr %227, align 4
  %229 = and i8 %228, -65
  store i8 %229, ptr %227, align 4
  br label %230

230:                                              ; preds = %168, %225, %221, %157
  %.2 = phi ptr [ %.1211, %157 ], [ %147, %221 ], [ %147, %225 ], [ %147, %168 ]
  %231 = getelementptr inbounds i8, ptr %.2, i64 8
  %232 = load ptr, ptr %.2, align 8, !tbaa !20
  %.not177 = icmp eq ptr %232, null
  br i1 %.not177, label %.loopexit, label %145, !llvm.loop !38

.loopexit:                                        ; preds = %230, %138, %.loopexit183
  %233 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !13
  %234 = icmp sgt i32 %233, 2
  br i1 %234, label %235, label %243

235:                                              ; preds = %.loopexit
  %236 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !16
  %237 = getelementptr inbounds i8, ptr %0, i64 108
  %238 = load i32, ptr %237, align 4, !tbaa !19
  %239 = getelementptr inbounds i8, ptr %.0127, i64 32
  %240 = load i32, ptr %239, align 8, !tbaa !17
  %241 = getelementptr inbounds i8, ptr %1, i64 108
  %242 = load i32, ptr %241, align 4, !tbaa !19
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %236, i32 noundef 3006, ptr noundef nonnull @.str.178, i32 noundef %238, i32 noundef %240, i32 noundef %242) #2
  br label %243

243:                                              ; preds = %235, %.loopexit
  ret void
}

declare i32 @qh_addfacetvertex(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @qh_removevertex(ptr noundef) local_unnamed_addr #0

declare void @qh_appendvertex(ptr noundef) local_unnamed_addr #0

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

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


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