; LLVM IR from Discngine/fpocket :: src/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, double, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, double, double, i32, double, i32, 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, i32, double, double, double, 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, i32, ptr, double, double, double, double, [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, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, ptr, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, 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 { [227 x %union.intrealT], [237 x i8], [227 x ptr], [227 x i16], [227 x i8], [227 x i8], [9 x %union.intrealT], i32, i32, i32, i32, double }
%union.intrealT = type { double }
%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.mergeT = type { double, ptr, ptr, i32 }
%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 }

@qh_qh = external global %struct.qhT, align 8
@qh_qhstat = external global %struct.qhstatT, align 8
@qhmem = external global %struct.qhmemT, align 8
@.str.49 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [80 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: nounwind uwtable
define dso_local i32 @qh_merge_degenredundant() #2 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  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 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  br label %13

13:                                               ; preds = %218, %88, %34, %0
  %14 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 206), align 8, !tbaa !9
  %15 = call ptr @qh_setdellast(ptr noundef %14)
  store ptr %15, ptr %2, align 8, !tbaa !14
  %16 = icmp ne ptr %15, null
  br i1 %16, label %17, label %219

17:                                               ; preds = %13
  %18 = load ptr, ptr %2, align 8, !tbaa !14
  %19 = getelementptr inbounds %struct.mergeT, ptr %18, i32 0, i32 1
  %20 = load ptr, ptr %19, align 8, !tbaa !15
  store ptr %20, ptr %4, align 8, !tbaa !14
  %21 = load ptr, ptr %2, align 8, !tbaa !14
  %22 = getelementptr inbounds %struct.mergeT, ptr %21, i32 0, i32 2
  %23 = load ptr, ptr %22, align 8, !tbaa !17
  store ptr %23, ptr %5, align 8, !tbaa !14
  %24 = load ptr, ptr %2, align 8, !tbaa !14
  %25 = getelementptr inbounds %struct.mergeT, ptr %24, i32 0, i32 3
  %26 = load i32, ptr %25, align 8, !tbaa !18
  store i32 %26, ptr %12, align 4, !tbaa !5
  %27 = load ptr, ptr %2, align 8, !tbaa !14
  call void @qh_memfree(ptr noundef %27, i32 noundef 32)
  %28 = load ptr, ptr %4, align 8, !tbaa !14
  %29 = getelementptr inbounds %struct.facetT, ptr %28, i32 0, i32 15
  %30 = load i32, ptr %29, align 8
  %31 = lshr i32 %30, 11
  %32 = and i32 %31, 1
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %35

34:                                               ; preds = %17
  br label %13, !llvm.loop !19

35:                                               ; preds = %17
  %36 = load ptr, ptr %4, align 8, !tbaa !14
  %37 = getelementptr inbounds %struct.facetT, ptr %36, i32 0, i32 15
  %38 = load i32, ptr %37, align 8
  %39 = and i32 %38, -1073741825
  %40 = or i32 %39, 0
  store i32 %40, ptr %37, align 8
  %41 = load ptr, ptr %4, align 8, !tbaa !14
  %42 = getelementptr inbounds %struct.facetT, ptr %41, i32 0, i32 15
  %43 = load i32, ptr %42, align 8
  %44 = and i32 %43, 2147483647
  %45 = or i32 %44, 0
  store i32 %45, ptr %42, align 8
  %46 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 90), align 8, !tbaa !21
  %47 = sub nsw i32 %46, 1
  %48 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 199), align 8, !tbaa !22
  %49 = icmp eq i32 %47, %48
  br i1 %49, label %50, label %52

50:                                               ; preds = %35
  %51 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 86), align 4, !tbaa !23
  store i32 %51, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !24
  store i32 %51, ptr getelementptr inbounds (%struct.qhmemT, ptr @qhmem, i32 0, i32 14), align 8, !tbaa !25
  br label %52

52:                                               ; preds = %50, %35
  %53 = load i32, ptr %12, align 4, !tbaa !5
  %54 = icmp eq i32 %53, 7
  br i1 %54, label %55, label %106

55:                                               ; preds = %52
  %56 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 138), align 8, !tbaa !22
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 138), align 8, !tbaa !22
  br label %58

58:                                               ; preds = %80, %55
  %59 = load ptr, ptr %5, align 8, !tbaa !14
  %60 = getelementptr inbounds %struct.facetT, ptr %59, i32 0, i32 15
  %61 = load i32, ptr %60, align 8
  %62 = lshr i32 %61, 11
  %63 = and i32 %62, 1
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %84

65:                                               ; preds = %58
  %66 = load ptr, ptr %5, align 8, !tbaa !14
  %67 = getelementptr inbounds %struct.facetT, ptr %66, i32 0, i32 4
  %68 = load ptr, ptr %67, align 8, !tbaa !22
  %69 = icmp ne ptr %68, null
  br i1 %69, label %80, label %70

70:                                               ; preds = %65
  %71 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !27
  %72 = load ptr, ptr %4, align 8, !tbaa !14
  %73 = getelementptr inbounds %struct.facetT, ptr %72, i32 0, i32 14
  %74 = load i32, ptr %73, align 4, !tbaa !28
  %75 = load ptr, ptr %5, align 8, !tbaa !14
  %76 = getelementptr inbounds %struct.facetT, ptr %75, i32 0, i32 14
  %77 = load i32, ptr %76, align 4, !tbaa !28
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %71, i32 noundef 6097, ptr noundef @.str.49, i32 noundef %74, i32 noundef %77)
  %78 = load ptr, ptr %4, align 8, !tbaa !14
  %79 = load ptr, ptr %5, align 8, !tbaa !14
  call void @qh_errexit2(i32 noundef 5, ptr noundef %78, ptr noundef %79)
  br label %80

80:                                               ; preds = %70, %65
  %81 = load ptr, ptr %5, align 8, !tbaa !14
  %82 = getelementptr inbounds %struct.facetT, ptr %81, i32 0, i32 4
  %83 = load ptr, ptr %82, align 8, !tbaa !22
  store ptr %83, ptr %5, align 8, !tbaa !14
  br label %58, !llvm.loop !30

84:                                               ; preds = %58
  %85 = load ptr, ptr %4, align 8, !tbaa !14
  %86 = load ptr, ptr %5, align 8, !tbaa !14
  %87 = icmp eq ptr %85, %86
  br i1 %87, label %88, label %90

88:                                               ; preds = %84
  %89 = load ptr, ptr %4, align 8, !tbaa !14
  call void @qh_degen_redundant_facet(ptr noundef %89)
  br label %13, !llvm.loop !19

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

93:                                               ; preds = %90
  %94 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !27
  %95 = load ptr, ptr %4, align 8, !tbaa !14
  %96 = getelementptr inbounds %struct.facetT, ptr %95, i32 0, i32 14
  %97 = load i32, ptr %96, align 4, !tbaa !28
  %98 = load ptr, ptr %5, align 8, !tbaa !14
  %99 = getelementptr inbounds %struct.facetT, ptr %98, i32 0, i32 14
  %100 = load i32, ptr %99, align 4, !tbaa !28
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %94, i32 noundef 2025, ptr noundef @.str.50, i32 noundef %97, i32 noundef %100)
  br label %101

101:                                              ; preds = %93, %90
  %102 = load ptr, ptr %4, align 8, !tbaa !14
  %103 = load ptr, ptr %5, align 8, !tbaa !14
  call void @qh_mergefacet(ptr noundef %102, ptr noundef %103, ptr noundef null, ptr noundef null, i32 noundef 0)
  %104 = load i32, ptr %11, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %11, align 4, !tbaa !5
  br label %218

106:                                              ; preds = %52
  %107 = load ptr, ptr %4, align 8, !tbaa !14
  %108 = getelementptr inbounds %struct.facetT, ptr %107, i32 0, i32 10
  %109 = load ptr, ptr %108, align 8, !tbaa !31
  %110 = call i32 @qh_setsize(ptr noundef %109)
  store i32 %110, ptr %1, align 4, !tbaa !5
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %177, label %112

112:                                              ; preds = %106
  %113 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 47), align 8, !tbaa !22
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 47), align 8, !tbaa !22
  %115 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !24
  %116 = icmp sge i32 %115, 2
  br i1 %116, label %117, label %122

117:                                              ; preds = %112
  %118 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !27
  %119 = load ptr, ptr %4, align 8, !tbaa !14
  %120 = getelementptr inbounds %struct.facetT, ptr %119, i32 0, i32 14
  %121 = load i32, ptr %120, align 4, !tbaa !28
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %118, i32 noundef 2026, ptr noundef @.str.51, i32 noundef %121)
  br label %122

122:                                              ; preds = %117, %112
  %123 = load ptr, ptr %4, align 8, !tbaa !14
  call void @qh_willdelete(ptr noundef %123, ptr noundef null)
  store ptr null, ptr %9, align 8, !tbaa !14
  %124 = load ptr, ptr %4, align 8, !tbaa !14
  %125 = getelementptr inbounds %struct.facetT, ptr %124, i32 0, i32 8
  %126 = load ptr, ptr %125, align 8, !tbaa !32
  %127 = icmp ne ptr %126, null
  br i1 %127, label %128, label %174

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

134:                                              ; preds = %172, %128
  %135 = load ptr, ptr %10, align 8, !tbaa !14
  %136 = getelementptr inbounds ptr, ptr %135, i32 1
  store ptr %136, ptr %10, align 8, !tbaa !14
  %137 = load ptr, ptr %135, align 8, !tbaa !14
  store ptr %137, ptr %9, align 8, !tbaa !14
  %138 = icmp ne ptr %137, null
  br i1 %138, label %139, label %173

139:                                              ; preds = %134
  %140 = load ptr, ptr %9, align 8, !tbaa !14
  %141 = getelementptr inbounds %struct.vertexT, ptr %140, i32 0, i32 3
  %142 = load ptr, ptr %141, align 8, !tbaa !33
  %143 = load ptr, ptr %4, align 8, !tbaa !14
  %144 = call ptr @qh_setdel(ptr noundef %142, ptr noundef %143)
  %145 = load ptr, ptr %9, align 8, !tbaa !14
  %146 = getelementptr inbounds %struct.vertexT, ptr %145, i32 0, i32 3
  %147 = load ptr, ptr %146, align 8, !tbaa !33
  %148 = getelementptr inbounds %struct.setT, ptr %147, i32 0, i32 1
  %149 = getelementptr inbounds [1 x %union.setelemT], ptr %148, i64 0, i64 0
  %150 = load ptr, ptr %149, align 8, !tbaa !22
  %151 = icmp ne ptr %150, null
  br i1 %151, label %172, label %152

152:                                              ; preds = %139
  %153 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 46), align 8, !tbaa !22
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 46), align 8, !tbaa !22
  %155 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !24
  %156 = icmp sge i32 %155, 2
  br i1 %156, label %157, label %165

157:                                              ; preds = %152
  %158 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !27
  %159 = load ptr, ptr %9, align 8, !tbaa !14
  %160 = getelementptr inbounds %struct.vertexT, ptr %159, i32 0, i32 4
  %161 = load i32, ptr %160, align 8, !tbaa !35
  %162 = load ptr, ptr %4, align 8, !tbaa !14
  %163 = getelementptr inbounds %struct.facetT, ptr %162, i32 0, i32 14
  %164 = load i32, ptr %163, align 4, !tbaa !28
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %158, i32 noundef 2027, ptr noundef @.str.52, i32 noundef %161, i32 noundef %164)
  br label %165

165:                                              ; preds = %157, %152
  %166 = load ptr, ptr %9, align 8, !tbaa !14
  %167 = getelementptr inbounds %struct.vertexT, ptr %166, i32 0, i32 6
  %168 = load i8, ptr %167, align 8
  %169 = and i8 %168, -9
  %170 = or i8 %169, 8
  store i8 %170, ptr %167, align 8
  %171 = load ptr, ptr %9, align 8, !tbaa !14
  call void @qh_setappend(ptr noundef getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 209), ptr noundef %171)
  br label %172

172:                                              ; preds = %165, %139
  br label %134, !llvm.loop !36

173:                                              ; preds = %134
  br label %174

174:                                              ; preds = %173, %122
  %175 = load i32, ptr %11, align 4, !tbaa !5
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %11, align 4, !tbaa !5
  br label %217

177:                                              ; preds = %106
  %178 = load i32, ptr %1, align 4, !tbaa !5
  %179 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 104), align 8, !tbaa !37
  %180 = icmp slt i32 %178, %179
  br i1 %180, label %181, label %216

181:                                              ; preds = %177
  %182 = load ptr, ptr %4, align 8, !tbaa !14
  %183 = call ptr @qh_findbestneighbor(ptr noundef %182, ptr noundef %6, ptr noundef %7, ptr noundef %8)
  store ptr %183, ptr %3, align 8, !tbaa !14
  %184 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !24
  %185 = icmp sge i32 %184, 2
  br i1 %185, label %186, label %196

186:                                              ; preds = %181
  %187 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !27
  %188 = load ptr, ptr %4, align 8, !tbaa !14
  %189 = getelementptr inbounds %struct.facetT, ptr %188, i32 0, i32 14
  %190 = load i32, ptr %189, align 4, !tbaa !28
  %191 = load i32, ptr %1, align 4, !tbaa !5
  %192 = load ptr, ptr %3, align 8, !tbaa !14
  %193 = getelementptr inbounds %struct.facetT, ptr %192, i32 0, i32 14
  %194 = load i32, ptr %193, align 4, !tbaa !28
  %195 = load double, ptr %6, align 8, !tbaa !38
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %187, i32 noundef 2028, ptr noundef @.str.53, i32 noundef %190, i32 noundef %191, i32 noundef %194, double noundef %195)
  br label %196

196:                                              ; preds = %186, %181
  %197 = load ptr, ptr %4, align 8, !tbaa !14
  %198 = load ptr, ptr %3, align 8, !tbaa !14
  call void @qh_mergefacet(ptr noundef %197, ptr noundef %198, ptr noundef %7, ptr noundef %8, i32 noundef 0)
  %199 = load i32, ptr %11, align 4, !tbaa !5
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %11, align 4, !tbaa !5
  %201 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 61), align 4, !tbaa !39
  %202 = icmp ne i32 %201, 0
  br i1 %202, label %203, label %215

203:                                              ; preds = %196
  %204 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 43), align 8, !tbaa !22
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 43), align 8, !tbaa !22
  %206 = load double, ptr %6, align 8, !tbaa !38
  %207 = load double, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 45), align 8, !tbaa !22
  %208 = fadd double %207, %206
  store double %208, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 45), align 8, !tbaa !22
  %209 = load double, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 44), align 8, !tbaa !22
  %210 = load double, ptr %6, align 8, !tbaa !38
  %211 = fcmp olt double %209, %210
  br i1 %211, label %212, label %214

212:                                              ; preds = %203
  %213 = load double, ptr %6, align 8, !tbaa !38
  store double %213, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 44), align 8, !tbaa !22
  br label %214

214:                                              ; preds = %212, %203
  br label %215

215:                                              ; preds = %214, %196
  br label %216

216:                                              ; preds = %215, %177
  br label %217

217:                                              ; preds = %216, %174
  br label %218

218:                                              ; preds = %217, %101
  br label %13, !llvm.loop !19

219:                                              ; preds = %13
  %220 = load i32, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  ret i32 %220
}

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

declare i32 @qh_setsize(ptr noundef) #1

declare ptr @qh_setdellast(ptr noundef) #1

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @qh_willdelete(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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !12, i64 2736}
!10 = !{!"qhT", !6, i64 0, !6, i64 4, !6, i64 8, !11, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !11, i64 56, !11, i64 64, !6, i64 72, !6, i64 76, !6, i64 80, !6, i64 84, !6, i64 88, !12, i64 96, !6, i64 104, !6, i64 108, !12, i64 112, !6, i64 120, !6, i64 124, !6, i64 128, !6, i64 132, !6, i64 136, !6, i64 140, !6, i64 144, !11, i64 152, !11, i64 160, !6, i64 168, !6, i64 172, !6, i64 176, !11, i64 184, !11, i64 192, !6, i64 200, !11, i64 208, !6, i64 216, !6, i64 220, !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, !7, i64 296, !6, i64 412, !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, !11, i64 544, !6, i64 552, !6, i64 556, !6, i64 560, !6, i64 564, !6, i64 568, !6, i64 572, !6, i64 576, !6, i64 580, !11, i64 584, !6, i64 592, !12, i64 600, !12, i64 608, !6, i64 616, !6, i64 620, !6, i64 624, !6, i64 628, !6, i64 632, !12, i64 640, !6, i64 648, !12, i64 656, !6, i64 664, !7, i64 668, !6, i64 924, !7, i64 928, !7, i64 1184, !6, i64 1696, !6, i64 1700, !6, i64 1704, !6, i64 1708, !6, i64 1712, !6, i64 1716, !12, i64 1720, !12, i64 1728, !12, i64 1736, !12, i64 1744, !11, 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, !6, i64 1856, !12, i64 1864, !11, i64 1872, !11, i64 1880, !11, i64 1888, !11, i64 1896, !7, i64 1904, !7, i64 1912, !7, i64 2112, !7, i64 2152, !7, i64 2352, !12, i64 2392, !12, i64 2400, !12, i64 2408, !12, i64 2416, !6, i64 2424, !6, i64 2428, !6, i64 2432, !12, i64 2440, !12, i64 2448, !12, i64 2456, !12, i64 2464, !12, i64 2472, !6, i64 2480, !6, i64 2484, !12, i64 2488, !6, i64 2496, !12, i64 2504, !12, i64 2512, !12, i64 2520, !12, i64 2528, !6, i64 2536, !6, i64 2540, !6, i64 2544, !6, i64 2548, !6, i64 2552, !6, i64 2556, !6, i64 2560, !13, i64 2568, !6, i64 2576, !6, i64 2580, !6, i64 2584, !6, i64 2588, !12, i64 2592, !6, i64 2600, !6, i64 2604, !11, i64 2608, !6, i64 2616, !11, i64 2624, !11, i64 2632, !11, i64 2640, !6, i64 2648, !6, i64 2652, !6, i64 2656, !6, i64 2660, !11, i64 2664, !11, i64 2672, !6, i64 2680, !6, i64 2684, !6, i64 2688, !6, i64 2692, !11, i64 2696, !11, i64 2704, !6, i64 2712, !6, i64 2716, !6, i64 2720, !6, i64 2724, !12, i64 2728, !12, i64 2736, !12, i64 2744, !12, i64 2752, !12, i64 2760, !12, i64 2768, !12, i64 2776, !12, i64 2784, !6, i64 2792, !12, i64 2800, !12, i64 2808, !6, i64 2816, !6, i64 2820, !6, i64 2824, !12, i64 2832, !11, i64 2840, !11, i64 2848, !11, i64 2856, !6, i64 2864, !6, i64 2868, !12, i64 2872, !12, i64 2880, !6, i64 2888}
!11 = !{!"double", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!16, !12, i64 8}
!16 = !{!"mergeT", !11, i64 0, !12, i64 8, !12, i64 16, !6, i64 24}
!17 = !{!16, !12, i64 16}
!18 = !{!16, !6, i64 24}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!10, !6, i64 552}
!22 = !{!7, !7, i64 0}
!23 = !{!10, !6, i64 532}
!24 = !{!10, !6, i64 128}
!25 = !{!26, !6, i64 88}
!26 = !{!"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}
!27 = !{!10, !12, i64 2408}
!28 = !{!29, !6, i64 108}
!29 = !{!"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}
!30 = distinct !{!30, !20}
!31 = !{!29, !12, i64 80}
!32 = !{!29, !12, i64 64}
!33 = !{!34, !12, i64 24}
!34 = !{!"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}
!35 = !{!34, !6, i64 32}
!36 = distinct !{!36, !20}
!37 = !{!10, !6, i64 624}
!38 = !{!11, !11, i64 0}
!39 = !{!10, !6, i64 420}


; 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, double, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, double, double, i32, double, i32, 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, i32, double, double, double, 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, i32, ptr, double, double, double, double, [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, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, ptr, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, 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 { [227 x %union.intrealT], [237 x i8], [227 x ptr], [227 x i16], [227 x i8], [227 x i8], [9 x %union.intrealT], i32, i32, i32, i32, double }
%union.intrealT = type { double }
%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 }

@qh_qh = external global %struct.qhT, align 8
@qh_qhstat = external local_unnamed_addr global %struct.qhstatT, align 8
@qhmem = external local_unnamed_addr global %struct.qhmemT, align 8
@.str.49 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [80 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @qh_merge_degenredundant() local_unnamed_addr #2 {
  %1 = alloca double, align 8
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %4 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2736), align 8, !tbaa !5
  %5 = tail call ptr @qh_setdellast(ptr noundef %4) #3
  %.not6574 = icmp eq ptr %5, null
  br i1 %.not6574, label %.outer._crit_edge, label %.lr.ph66

.lr.ph66:                                         ; preds = %0, %.outer
  %6 = phi ptr [ %133, %.outer ], [ %5, %0 ]
  %.045.ph75 = phi i32 [ %.1, %.outer ], [ 0, %0 ]
  br label %7

7:                                                ; preds = %.lr.ph66, %.backedge
  %8 = phi ptr [ %6, %.lr.ph66 ], [ %51, %.backedge ]
  %9 = getelementptr inbounds i8, ptr %8, i64 8
  %10 = load ptr, ptr %9, align 8, !tbaa !13
  %11 = getelementptr inbounds i8, ptr %8, i64 16
  %12 = load ptr, ptr %11, align 8, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %8, i64 24
  %14 = load i32, ptr %13, align 8, !tbaa !16
  call void @qh_memfree(ptr noundef nonnull %8, i32 noundef 32) #3
  %15 = getelementptr inbounds i8, ptr %10, i64 112
  %16 = load i32, ptr %15, align 8
  %17 = and i32 %16, 2048
  %.not54 = icmp eq i32 %17, 0
  br i1 %.not54, label %18, label %.backedge

18:                                               ; preds = %7
  %19 = and i32 %16, 1073739775
  store i32 %19, ptr %15, align 8
  %20 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 552), align 8, !tbaa !17
  %21 = add nsw i32 %20, -1
  %22 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1592), align 8, !tbaa !18
  %23 = icmp eq i32 %21, %22
  br i1 %23, label %24, label %26

24:                                               ; preds = %18
  %25 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 532), align 4, !tbaa !19
  store i32 %25, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !20
  store i32 %25, ptr getelementptr inbounds (i8, ptr @qhmem, i64 88), align 8, !tbaa !21
  br label %26

26:                                               ; preds = %24, %18
  %27 = icmp eq i32 %14, 7
  br i1 %27, label %28, label %63

28:                                               ; preds = %26
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1104), align 8, !tbaa !18
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1104), align 8, !tbaa !18
  %31 = getelementptr inbounds i8, ptr %12, i64 112
  %32 = load i32, ptr %31, align 8
  %33 = and i32 %32, 2048
  %.not6063 = icmp eq i32 %33, 0
  br i1 %.not6063, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %28
  %34 = getelementptr inbounds i8, ptr %10, i64 108
  br label %35

35:                                               ; preds = %.lr.ph, %43
  %.064 = phi ptr [ %12, %.lr.ph ], [ %44, %43 ]
  %36 = getelementptr inbounds i8, ptr %.064, i64 32
  %37 = load ptr, ptr %36, align 8, !tbaa !18
  %.not61 = icmp eq ptr %37, null
  br i1 %.not61, label %38, label %43

38:                                               ; preds = %35
  %39 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !23
  %40 = load i32, ptr %34, align 4, !tbaa !24
  %41 = getelementptr inbounds i8, ptr %.064, i64 108
  %42 = load i32, ptr %41, align 4, !tbaa !24
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %39, i32 noundef 6097, ptr noundef nonnull @.str.49, i32 noundef %40, i32 noundef %42) #3
  call void @qh_errexit2(i32 noundef 5, ptr noundef %10, ptr noundef nonnull %.064) #3
  %.pre = load ptr, ptr %36, align 8, !tbaa !18
  br label %43

43:                                               ; preds = %38, %35
  %44 = phi ptr [ %.pre, %38 ], [ %37, %35 ]
  %45 = getelementptr inbounds i8, ptr %44, i64 112
  %46 = load i32, ptr %45, align 8
  %47 = and i32 %46, 2048
  %.not60 = icmp eq i32 %47, 0
  br i1 %.not60, label %._crit_edge, label %35, !llvm.loop !26

._crit_edge:                                      ; preds = %43, %28
  %.0.lcssa = phi ptr [ %12, %28 ], [ %44, %43 ]
  %48 = icmp eq ptr %10, %.0.lcssa
  br i1 %48, label %49, label %52

49:                                               ; preds = %._crit_edge
  call void @qh_degen_redundant_facet(ptr noundef %10)
  br label %.backedge

.backedge:                                        ; preds = %49, %7
  %50 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2736), align 8, !tbaa !5
  %51 = call ptr @qh_setdellast(ptr noundef %50) #3
  %.not = icmp eq ptr %51, null
  br i1 %.not, label %.outer._crit_edge, label %7, !llvm.loop !28

52:                                               ; preds = %._crit_edge
  %53 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !20
  %54 = icmp sgt i32 %53, 1
  br i1 %54, label %55, label %61

55:                                               ; preds = %52
  %56 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !23
  %57 = getelementptr inbounds i8, ptr %10, i64 108
  %58 = load i32, ptr %57, align 4, !tbaa !24
  %59 = getelementptr inbounds i8, ptr %.0.lcssa, i64 108
  %60 = load i32, ptr %59, align 4, !tbaa !24
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %56, i32 noundef 2025, ptr noundef nonnull @.str.50, i32 noundef %58, i32 noundef %60) #3
  br label %61

61:                                               ; preds = %55, %52
  call void @qh_mergefacet(ptr noundef %10, ptr noundef nonnull %.0.lcssa, ptr noundef null, ptr noundef null, i32 noundef 0)
  %62 = add nsw i32 %.045.ph75, 1
  br label %.outer

63:                                               ; preds = %26
  %64 = getelementptr inbounds i8, ptr %10, i64 80
  %65 = load ptr, ptr %64, align 8, !tbaa !29
  %66 = call i32 @qh_setsize(ptr noundef %65) #3
  %.not55 = icmp eq i32 %66, 0
  br i1 %.not55, label %67, label %106

67:                                               ; preds = %63
  %68 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 376), align 8, !tbaa !18
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 376), align 8, !tbaa !18
  %70 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !20
  %71 = icmp sgt i32 %70, 1
  br i1 %71, label %72, label %76

72:                                               ; preds = %67
  %73 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !23
  %74 = getelementptr inbounds i8, ptr %10, i64 108
  %75 = load i32, ptr %74, align 4, !tbaa !24
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %73, i32 noundef 2026, ptr noundef nonnull @.str.51, i32 noundef %75) #3
  br label %76

76:                                               ; preds = %72, %67
  call void @qh_willdelete(ptr noundef nonnull %10, ptr noundef null)
  %77 = getelementptr inbounds i8, ptr %10, i64 64
  %78 = load ptr, ptr %77, align 8, !tbaa !30
  %.not56 = icmp eq ptr %78, null
  br i1 %.not56, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %76
  %.04670 = getelementptr inbounds i8, ptr %78, i64 8
  %79 = load ptr, ptr %.04670, align 8, !tbaa !31
  %.not5771 = icmp eq ptr %79, null
  br i1 %.not5771, label %.loopexit, label %.lr.ph73

.lr.ph73:                                         ; preds = %.preheader
  %80 = getelementptr inbounds i8, ptr %10, i64 108
  br label %81

81:                                               ; preds = %.lr.ph73, %103
  %82 = phi ptr [ %79, %.lr.ph73 ], [ %104, %103 ]
  %.04672 = phi ptr [ %.04670, %.lr.ph73 ], [ %.046, %103 ]
  %83 = getelementptr inbounds i8, ptr %82, i64 24
  %84 = load ptr, ptr %83, align 8, !tbaa !32
  %85 = call ptr @qh_setdel(ptr noundef %84, ptr noundef %10) #3
  %86 = load ptr, ptr %83, align 8, !tbaa !32
  %87 = getelementptr inbounds i8, ptr %86, i64 8
  %88 = load ptr, ptr %87, align 8, !tbaa !18
  %.not58 = icmp eq ptr %88, null
  br i1 %.not58, label %89, label %103

89:                                               ; preds = %81
  %90 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 368), align 8, !tbaa !18
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 368), align 8, !tbaa !18
  %92 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !20
  %93 = icmp sgt i32 %92, 1
  br i1 %93, label %94, label %99

94:                                               ; preds = %89
  %95 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !23
  %96 = getelementptr inbounds i8, ptr %82, i64 32
  %97 = load i32, ptr %96, align 8, !tbaa !34
  %98 = load i32, ptr %80, align 4, !tbaa !24
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %95, i32 noundef 2027, ptr noundef nonnull @.str.52, i32 noundef %97, i32 noundef %98) #3
  br label %99

99:                                               ; preds = %94, %89
  %100 = getelementptr inbounds i8, ptr %82, i64 40
  %101 = load i8, ptr %100, align 8
  %102 = or i8 %101, 8
  store i8 %102, ptr %100, align 8
  call void @qh_setappend(ptr noundef nonnull getelementptr inbounds (i8, ptr @qh_qh, i64 2760), ptr noundef nonnull %82) #3
  br label %103

103:                                              ; preds = %99, %81
  %.046 = getelementptr inbounds i8, ptr %.04672, i64 8
  %104 = load ptr, ptr %.046, align 8, !tbaa !31
  %.not57 = icmp eq ptr %104, null
  br i1 %.not57, label %.loopexit, label %81, !llvm.loop !35

.loopexit:                                        ; preds = %103, %.preheader, %76
  %105 = add nsw i32 %.045.ph75, 1
  br label %.outer

106:                                              ; preds = %63
  %107 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 624), align 8, !tbaa !36
  %108 = icmp slt i32 %66, %107
  br i1 %108, label %109, label %.outer

109:                                              ; preds = %106
  %110 = call ptr @qh_findbestneighbor(ptr noundef nonnull %10, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %111 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !20
  %112 = icmp sgt i32 %111, 1
  br i1 %112, label %113, label %120

113:                                              ; preds = %109
  %114 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !23
  %115 = getelementptr inbounds i8, ptr %10, i64 108
  %116 = load i32, ptr %115, align 4, !tbaa !24
  %117 = getelementptr inbounds i8, ptr %110, i64 108
  %118 = load i32, ptr %117, align 4, !tbaa !24
  %119 = load double, ptr %1, align 8, !tbaa !37
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %114, i32 noundef 2028, ptr noundef nonnull @.str.53, i32 noundef %116, i32 noundef %66, i32 noundef %118, double noundef %119) #3
  br label %120

120:                                              ; preds = %113, %109
  call void @qh_mergefacet(ptr noundef nonnull %10, ptr noundef %110, ptr noundef nonnull %2, ptr noundef nonnull %3, i32 noundef 0)
  %121 = add nsw i32 %.045.ph75, 1
  %122 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 420), align 4, !tbaa !38
  %.not59 = icmp eq i32 %122, 0
  br i1 %.not59, label %.outer, label %123

123:                                              ; preds = %120
  %124 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 344), align 8, !tbaa !18
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 344), align 8, !tbaa !18
  %126 = load double, ptr %1, align 8, !tbaa !37
  %127 = load double, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 360), align 8, !tbaa !18
  %128 = fadd double %126, %127
  store double %128, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 360), align 8, !tbaa !18
  %129 = load double, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 352), align 8, !tbaa !18
  %130 = fcmp olt double %129, %126
  br i1 %130, label %131, label %.outer

131:                                              ; preds = %123
  store double %126, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 352), align 8, !tbaa !18
  br label %.outer

.outer:                                           ; preds = %.loopexit, %120, %131, %123, %106, %61
  %.1 = phi i32 [ %62, %61 ], [ %121, %131 ], [ %121, %123 ], [ %121, %120 ], [ %.045.ph75, %106 ], [ %105, %.loopexit ]
  %132 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2736), align 8, !tbaa !5
  %133 = call ptr @qh_setdellast(ptr noundef %132) #3
  %.not65 = icmp eq ptr %133, null
  br i1 %.not65, label %.outer._crit_edge, label %.lr.ph66, !llvm.loop !28

.outer._crit_edge:                                ; preds = %.outer, %.backedge, %0
  %.045.ph.lcssa = phi i32 [ 0, %0 ], [ %.045.ph75, %.backedge ], [ %.1, %.outer ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #3
  ret i32 %.045.ph.lcssa
}

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

declare i32 @qh_setsize(ptr noundef) local_unnamed_addr #1

declare ptr @qh_setdellast(ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 2736}
!6 = !{!"qhT", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !10, i64 56, !10, i64 64, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !7, i64 88, !11, i64 96, !7, i64 104, !7, i64 108, !11, i64 112, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144, !10, i64 152, !10, i64 160, !7, i64 168, !7, i64 172, !7, i64 176, !10, i64 184, !10, i64 192, !7, i64 200, !10, i64 208, !7, i64 216, !7, i64 220, !7, i64 224, !7, i64 228, !7, i64 232, !7, i64 236, !7, i64 240, !7, i64 244, !7, i64 248, !7, i64 252, !7, i64 256, !7, i64 260, !7, i64 264, !7, i64 268, !7, i64 272, !7, i64 276, !7, i64 280, !7, i64 284, !7, i64 288, !7, i64 292, !8, i64 296, !7, i64 412, !7, i64 416, !7, i64 420, !7, i64 424, !7, i64 428, !7, i64 432, !7, i64 436, !7, i64 440, !7, i64 444, !10, i64 448, !10, i64 456, !10, i64 464, !7, i64 472, !7, i64 476, !7, i64 480, !7, i64 484, !7, i64 488, !7, i64 492, !7, i64 496, !7, i64 500, !7, i64 504, !7, i64 508, !7, i64 512, !7, i64 516, !7, i64 520, !7, i64 524, !7, i64 528, !7, i64 532, !7, i64 536, !7, i64 540, !10, i64 544, !7, i64 552, !7, i64 556, !7, i64 560, !7, i64 564, !7, i64 568, !7, i64 572, !7, i64 576, !7, i64 580, !10, i64 584, !7, i64 592, !11, i64 600, !11, i64 608, !7, i64 616, !7, i64 620, !7, i64 624, !7, i64 628, !7, i64 632, !11, i64 640, !7, i64 648, !11, i64 656, !7, i64 664, !8, i64 668, !7, i64 924, !8, i64 928, !8, i64 1184, !7, i64 1696, !7, i64 1700, !7, i64 1704, !7, i64 1708, !7, i64 1712, !7, i64 1716, !11, i64 1720, !11, i64 1728, !11, i64 1736, !11, i64 1744, !10, i64 1752, !10, i64 1760, !10, i64 1768, !10, i64 1776, !10, i64 1784, !10, i64 1792, !10, i64 1800, !10, i64 1808, !10, i64 1816, !10, i64 1824, !10, i64 1832, !10, i64 1840, !10, i64 1848, !7, i64 1856, !11, i64 1864, !10, i64 1872, !10, i64 1880, !10, i64 1888, !10, i64 1896, !8, i64 1904, !8, i64 1912, !8, i64 2112, !8, i64 2152, !8, i64 2352, !11, i64 2392, !11, i64 2400, !11, i64 2408, !11, i64 2416, !7, i64 2424, !7, i64 2428, !7, i64 2432, !11, i64 2440, !11, i64 2448, !11, i64 2456, !11, i64 2464, !11, i64 2472, !7, i64 2480, !7, i64 2484, !11, i64 2488, !7, i64 2496, !11, i64 2504, !11, i64 2512, !11, i64 2520, !11, i64 2528, !7, i64 2536, !7, i64 2540, !7, i64 2544, !7, i64 2548, !7, i64 2552, !7, i64 2556, !7, i64 2560, !12, i64 2568, !7, i64 2576, !7, i64 2580, !7, i64 2584, !7, i64 2588, !11, i64 2592, !7, i64 2600, !7, i64 2604, !10, i64 2608, !7, i64 2616, !10, i64 2624, !10, i64 2632, !10, i64 2640, !7, i64 2648, !7, i64 2652, !7, i64 2656, !7, i64 2660, !10, i64 2664, !10, i64 2672, !7, i64 2680, !7, i64 2684, !7, i64 2688, !7, i64 2692, !10, i64 2696, !10, i64 2704, !7, i64 2712, !7, i64 2716, !7, i64 2720, !7, i64 2724, !11, i64 2728, !11, i64 2736, !11, i64 2744, !11, i64 2752, !11, i64 2760, !11, i64 2768, !11, i64 2776, !11, i64 2784, !7, i64 2792, !11, i64 2800, !11, i64 2808, !7, i64 2816, !7, i64 2820, !7, i64 2824, !11, i64 2832, !10, i64 2840, !10, i64 2848, !10, i64 2856, !7, i64 2864, !7, i64 2868, !11, i64 2872, !11, i64 2880, !7, i64 2888}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!14, !11, i64 8}
!14 = !{!"mergeT", !10, i64 0, !11, i64 8, !11, i64 16, !7, i64 24}
!15 = !{!14, !11, i64 16}
!16 = !{!14, !7, i64 24}
!17 = !{!6, !7, i64 552}
!18 = !{!8, !8, i64 0}
!19 = !{!6, !7, i64 532}
!20 = !{!6, !7, i64 128}
!21 = !{!22, !7, i64 88}
!22 = !{!"qhmemT", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !7, i64 64, !11, i64 72, !11, i64 80, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144}
!23 = !{!6, !11, i64 2408}
!24 = !{!25, !7, i64 108}
!25 = !{!"facetT", !10, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !8, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = !{!25, !11, i64 80}
!30 = !{!25, !11, i64 64}
!31 = !{!11, !11, i64 0}
!32 = !{!33, !11, i64 24}
!33 = !{!"vertexT", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 40, !7, i64 40, !7, i64 40, !7, i64 40}
!34 = !{!33, !7, i64 32}
!35 = distinct !{!35, !27}
!36 = !{!6, !7, i64 624}
!37 = !{!10, !10, i64 0}
!38 = !{!6, !7, i64 420}


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