; 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.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.ridgeT = type { ptr, ptr, ptr, i32, i8 }

@qh_qh = external global %struct.qhT, align 8
@.str.71 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [59 x i8], align 1

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

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

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

declare i32 @qh_setsize(ptr noundef) #1

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

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

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

declare void @qh_setfree(ptr noundef) #1

declare ptr @qh_newridge() #1

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

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

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

18:                                               ; preds = %2
  %19 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !15
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %19, i32 noundef 4033, ptr noundef @.str.71)
  br label %20

20:                                               ; preds = %18, %2
  %21 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 201), align 8, !tbaa !16
  %22 = sub i32 %21, 1
  store i32 %22, ptr %11, align 4, !tbaa !9
  store ptr null, ptr %12, align 8, !tbaa !5
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.facetT, ptr %23, i32 0, i32 9
  %25 = load ptr, ptr %24, align 8, !tbaa !17
  %26 = icmp ne ptr %25, null
  br i1 %26, label %27, label %64

27:                                               ; preds = %20
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.facetT, ptr %28, i32 0, i32 9
  %30 = load ptr, ptr %29, align 8, !tbaa !17
  %31 = getelementptr inbounds %struct.setT, ptr %30, i32 0, i32 1
  %32 = getelementptr inbounds [1 x %union.setelemT], ptr %31, i64 0, i64 0
  store ptr %32, ptr %13, align 8, !tbaa !5
  br label %33

33:                                               ; preds = %62, %27
  %34 = load ptr, ptr %13, align 8, !tbaa !5
  %35 = getelementptr inbounds ptr, ptr %34, i32 1
  store ptr %35, ptr %13, align 8, !tbaa !5
  %36 = load ptr, ptr %34, align 8, !tbaa !5
  store ptr %36, ptr %12, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %63

38:                                               ; preds = %33
  %39 = load ptr, ptr %12, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.ridgeT, ptr %39, i32 0, i32 1
  %41 = load ptr, ptr %40, align 8, !tbaa !19
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = icmp eq ptr %41, %42
  br i1 %43, label %44, label %48

44:                                               ; preds = %38
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.ridgeT, ptr %45, i32 0, i32 2
  %47 = load ptr, ptr %46, align 8, !tbaa !21
  br label %52

48:                                               ; preds = %38
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.ridgeT, ptr %49, i32 0, i32 1
  %51 = load ptr, ptr %50, align 8, !tbaa !19
  br label %52

52:                                               ; preds = %48, %44
  %53 = phi ptr [ %47, %44 ], [ %51, %48 ]
  store ptr %53, ptr %6, align 8, !tbaa !5
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.facetT, ptr %54, i32 0, i32 13
  %56 = load i32, ptr %55, align 8, !tbaa !22
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = icmp eq i32 %56, %57
  br i1 %58, label %59, label %62

59:                                               ; preds = %52
  %60 = load ptr, ptr %13, align 8, !tbaa !5
  %61 = getelementptr inbounds ptr, ptr %60, i64 -1
  store ptr null, ptr %61, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %59, %52
  br label %33, !llvm.loop !23

63:                                               ; preds = %33
  br label %64

64:                                               ; preds = %63, %20
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.facetT, ptr %65, i32 0, i32 9
  %67 = load ptr, ptr %66, align 8, !tbaa !17
  call void @qh_setcompact(ptr noundef %67)
  %68 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !11
  %69 = icmp sge i32 %68, 4
  br i1 %69, label %70, label %72

70:                                               ; preds = %64
  %71 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !15
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %71, i32 noundef 4034, ptr noundef @.str.72)
  br label %72

72:                                               ; preds = %70, %64
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.facetT, ptr %73, i32 0, i32 4
  %75 = load ptr, ptr %74, align 8, !tbaa !25
  store ptr %75, ptr %5, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %298, %72
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %300

79:                                               ; preds = %76
  store ptr null, ptr %12, align 8, !tbaa !5
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.facetT, ptr %80, i32 0, i32 9
  %82 = load ptr, ptr %81, align 8, !tbaa !17
  %83 = icmp ne ptr %82, null
  br i1 %83, label %84, label %183

84:                                               ; preds = %79
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.facetT, ptr %85, i32 0, i32 9
  %87 = load ptr, ptr %86, align 8, !tbaa !17
  %88 = getelementptr inbounds %struct.setT, ptr %87, i32 0, i32 1
  %89 = getelementptr inbounds [1 x %union.setelemT], ptr %88, i64 0, i64 0
  store ptr %89, ptr %13, align 8, !tbaa !5
  br label %90

90:                                               ; preds = %181, %133, %84
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  %92 = getelementptr inbounds ptr, ptr %91, i32 1
  store ptr %92, ptr %13, align 8, !tbaa !5
  %93 = load ptr, ptr %91, align 8, !tbaa !5
  store ptr %93, ptr %12, align 8, !tbaa !5
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %182

95:                                               ; preds = %90
  %96 = load ptr, ptr %12, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.ridgeT, ptr %96, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !19
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = icmp eq ptr %98, %99
  br i1 %100, label %101, label %108

101:                                              ; preds = %95
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = load ptr, ptr %12, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.ridgeT, ptr %103, i32 0, i32 1
  store ptr %102, ptr %104, align 8, !tbaa !19
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.ridgeT, ptr %105, i32 0, i32 2
  %107 = load ptr, ptr %106, align 8, !tbaa !21
  store ptr %107, ptr %6, align 8, !tbaa !5
  br label %147

108:                                              ; preds = %95
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.ridgeT, ptr %109, i32 0, i32 2
  %111 = load ptr, ptr %110, align 8, !tbaa !21
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = icmp eq ptr %111, %112
  br i1 %113, label %114, label %121

114:                                              ; preds = %108
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = load ptr, ptr %12, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ridgeT, ptr %116, i32 0, i32 2
  store ptr %115, ptr %117, align 8, !tbaa !21
  %118 = load ptr, ptr %12, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.ridgeT, ptr %118, i32 0, i32 1
  %120 = load ptr, ptr %119, align 8, !tbaa !19
  store ptr %120, ptr %6, align 8, !tbaa !5
  br label %146

121:                                              ; preds = %108
  %122 = load ptr, ptr %12, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.ridgeT, ptr %122, i32 0, i32 1
  %124 = load ptr, ptr %123, align 8, !tbaa !19
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = icmp eq ptr %124, %125
  br i1 %126, label %133, label %127

127:                                              ; preds = %121
  %128 = load ptr, ptr %12, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.ridgeT, ptr %128, i32 0, i32 2
  %130 = load ptr, ptr %129, align 8, !tbaa !21
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  %132 = icmp eq ptr %130, %131
  br i1 %132, label %133, label %139

133:                                              ; preds = %127, %121
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.facetT, ptr %134, i32 0, i32 9
  %136 = load ptr, ptr %12, align 8, !tbaa !5
  call void @qh_setappend(ptr noundef %135, ptr noundef %136)
  %137 = load i32, ptr %7, align 4, !tbaa !9
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %7, align 4, !tbaa !9
  br label %90, !llvm.loop !26

139:                                              ; preds = %127
  %140 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !15
  %141 = load ptr, ptr %12, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.ridgeT, ptr %141, i32 0, i32 3
  %143 = load i32, ptr %142, align 8, !tbaa !27
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %140, i32 noundef 6098, ptr noundef @.str.73, i32 noundef %143)
  %144 = load ptr, ptr %12, align 8, !tbaa !5
  call void @qh_errexit(i32 noundef 5, ptr noundef null, ptr noundef %144)
  br label %145

145:                                              ; preds = %139
  br label %146

146:                                              ; preds = %145, %114
  br label %147

147:                                              ; preds = %146, %101
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = icmp eq ptr %148, %149
  br i1 %150, label %151, label %157

151:                                              ; preds = %147
  %152 = load ptr, ptr %12, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.ridgeT, ptr %152, i32 0, i32 0
  call void @qh_setfree(ptr noundef %153)
  store ptr null, ptr %15, align 8, !tbaa !5
  %154 = load ptr, ptr %12, align 8, !tbaa !5
  call void @qh_memfree(ptr noundef %154, i32 noundef 32)
  %155 = load i32, ptr %7, align 4, !tbaa !9
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %7, align 4, !tbaa !9
  br label %181

157:                                              ; preds = %147
  %158 = load ptr, ptr %6, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.facetT, ptr %158, i32 0, i32 13
  %160 = load i32, ptr %159, align 8, !tbaa !22
  %161 = load i32, ptr %11, align 4, !tbaa !9
  %162 = icmp eq i32 %160, %161
  br i1 %162, label %163, label %174

163:                                              ; preds = %157
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.facetT, ptr %164, i32 0, i32 9
  %166 = load ptr, ptr %165, align 8, !tbaa !17
  %167 = load ptr, ptr %12, align 8, !tbaa !5
  %168 = call ptr @qh_setdel(ptr noundef %166, ptr noundef %167)
  %169 = load ptr, ptr %12, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.ridgeT, ptr %169, i32 0, i32 0
  call void @qh_setfree(ptr noundef %170)
  store ptr null, ptr %15, align 8, !tbaa !5
  %171 = load ptr, ptr %12, align 8, !tbaa !5
  call void @qh_memfree(ptr noundef %171, i32 noundef 32)
  %172 = load i32, ptr %7, align 4, !tbaa !9
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %7, align 4, !tbaa !9
  br label %180

174:                                              ; preds = %157
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.facetT, ptr %175, i32 0, i32 9
  %177 = load ptr, ptr %12, align 8, !tbaa !5
  call void @qh_setappend(ptr noundef %176, ptr noundef %177)
  %178 = load i32, ptr %7, align 4, !tbaa !9
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %7, align 4, !tbaa !9
  br label %180

180:                                              ; preds = %174, %163
  br label %181

181:                                              ; preds = %180, %151
  br label %90, !llvm.loop !26

182:                                              ; preds = %90
  br label %183

183:                                              ; preds = %182, %79
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.facetT, ptr %184, i32 0, i32 9
  %186 = load ptr, ptr %185, align 8, !tbaa !17
  %187 = icmp ne ptr %186, null
  br i1 %187, label %188, label %192

188:                                              ; preds = %183
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.facetT, ptr %189, i32 0, i32 9
  %191 = load ptr, ptr %190, align 8, !tbaa !17
  call void @qh_settruncate(ptr noundef %191, i32 noundef 0)
  br label %192

192:                                              ; preds = %188, %183
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.facetT, ptr %193, i32 0, i32 15
  %195 = load i32, ptr %194, align 8
  %196 = lshr i32 %195, 13
  %197 = and i32 %196, 1
  %198 = icmp ne i32 %197, 0
  br i1 %198, label %200, label %199

199:                                              ; preds = %192
  br label %289

200:                                              ; preds = %192
  store ptr null, ptr %6, align 8, !tbaa !5
  %201 = load ptr, ptr %5, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.facetT, ptr %201, i32 0, i32 10
  %203 = load ptr, ptr %202, align 8, !tbaa !28
  %204 = icmp ne ptr %203, null
  br i1 %204, label %205, label %288

205:                                              ; preds = %200
  store i32 0, ptr %9, align 4, !tbaa !9
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.facetT, ptr %206, i32 0, i32 10
  %208 = load ptr, ptr %207, align 8, !tbaa !28
  %209 = getelementptr inbounds %struct.setT, ptr %208, i32 0, i32 1
  %210 = getelementptr inbounds [1 x %union.setelemT], ptr %209, i64 0, i64 0
  %211 = load ptr, ptr %210, align 8, !tbaa !25
  store ptr %211, ptr %6, align 8, !tbaa !5
  %212 = load ptr, ptr %5, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.facetT, ptr %212, i32 0, i32 10
  %214 = load ptr, ptr %213, align 8, !tbaa !28
  %215 = call i32 @qh_setsize(ptr noundef %214)
  store i32 %215, ptr %10, align 4, !tbaa !9
  br label %216

216:                                              ; preds = %277, %205
  %217 = load i32, ptr %9, align 4, !tbaa !9
  %218 = load i32, ptr %10, align 4, !tbaa !9
  %219 = icmp slt i32 %217, %218
  br i1 %219, label %220, label %287

220:                                              ; preds = %216
  %221 = load ptr, ptr %6, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.facetT, ptr %221, i32 0, i32 13
  %223 = load i32, ptr %222, align 8, !tbaa !22
  %224 = load i32, ptr %11, align 4, !tbaa !9
  %225 = icmp ne i32 %223, %224
  br i1 %225, label %226, label %276

226:                                              ; preds = %220
  %227 = load ptr, ptr %6, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.facetT, ptr %227, i32 0, i32 15
  %229 = load i32, ptr %228, align 8
  %230 = lshr i32 %229, 13
  %231 = and i32 %230, 1
  %232 = icmp ne i32 %231, 0
  br i1 %232, label %233, label %276

233:                                              ; preds = %226
  %234 = call ptr @qh_newridge()
  store ptr %234, ptr %12, align 8, !tbaa !5
  %235 = load ptr, ptr %5, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.facetT, ptr %235, i32 0, i32 8
  %237 = load ptr, ptr %236, align 8, !tbaa !29
  %238 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 104), align 8, !tbaa !30
  %239 = load i32, ptr %9, align 4, !tbaa !9
  %240 = call ptr @qh_setnew_delnthsorted(ptr noundef %237, i32 noundef %238, i32 noundef %239, i32 noundef 0)
  %241 = load ptr, ptr %12, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.ridgeT, ptr %241, i32 0, i32 0
  store ptr %240, ptr %242, align 8, !tbaa !31
  %243 = load ptr, ptr %5, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.facetT, ptr %243, i32 0, i32 15
  %245 = load i32, ptr %244, align 8
  %246 = lshr i32 %245, 12
  %247 = and i32 %246, 1
  %248 = load i32, ptr %9, align 4, !tbaa !9
  %249 = and i32 %248, 1
  %250 = xor i32 %247, %249
  store i32 %250, ptr %14, align 4, !tbaa !9
  %251 = load i32, ptr %14, align 4, !tbaa !9
  %252 = icmp ne i32 %251, 0
  br i1 %252, label %253, label %260

253:                                              ; preds = %233
  %254 = load ptr, ptr %4, align 8, !tbaa !5
  %255 = load ptr, ptr %12, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.ridgeT, ptr %255, i32 0, i32 1
  store ptr %254, ptr %256, align 8, !tbaa !19
  %257 = load ptr, ptr %6, align 8, !tbaa !5
  %258 = load ptr, ptr %12, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.ridgeT, ptr %258, i32 0, i32 2
  store ptr %257, ptr %259, align 8, !tbaa !21
  br label %267

260:                                              ; preds = %233
  %261 = load ptr, ptr %6, align 8, !tbaa !5
  %262 = load ptr, ptr %12, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.ridgeT, ptr %262, i32 0, i32 1
  store ptr %261, ptr %263, align 8, !tbaa !19
  %264 = load ptr, ptr %4, align 8, !tbaa !5
  %265 = load ptr, ptr %12, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.ridgeT, ptr %265, i32 0, i32 2
  store ptr %264, ptr %266, align 8, !tbaa !21
  br label %267

267:                                              ; preds = %260, %253
  %268 = load ptr, ptr %4, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.facetT, ptr %268, i32 0, i32 9
  %270 = load ptr, ptr %12, align 8, !tbaa !5
  call void @qh_setappend(ptr noundef %269, ptr noundef %270)
  %271 = load ptr, ptr %6, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.facetT, ptr %271, i32 0, i32 9
  %273 = load ptr, ptr %12, align 8, !tbaa !5
  call void @qh_setappend(ptr noundef %272, ptr noundef %273)
  %274 = load i32, ptr %8, align 4, !tbaa !9
  %275 = add nsw i32 %274, 1
  store i32 %275, ptr %8, align 4, !tbaa !9
  br label %276

276:                                              ; preds = %267, %226, %220
  br label %277

277:                                              ; preds = %276
  %278 = load ptr, ptr %5, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.facetT, ptr %278, i32 0, i32 10
  %280 = load ptr, ptr %279, align 8, !tbaa !28
  %281 = getelementptr inbounds %struct.setT, ptr %280, i32 0, i32 1
  %282 = load i32, ptr %9, align 4, !tbaa !9
  %283 = add nsw i32 %282, 1
  store i32 %283, ptr %9, align 4, !tbaa !9
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [1 x %union.setelemT], ptr %281, i64 0, i64 %284
  %286 = load ptr, ptr %285, align 8, !tbaa !25
  store ptr %286, ptr %6, align 8, !tbaa !5
  br label %216, !llvm.loop !32

287:                                              ; preds = %216
  br label %288

288:                                              ; preds = %287, %200
  br label %289

289:                                              ; preds = %288, %199
  %290 = load ptr, ptr %5, align 8, !tbaa !5
  %291 = load ptr, ptr %3, align 8, !tbaa !5
  %292 = icmp eq ptr %290, %291
  br i1 %292, label %293, label %294

293:                                              ; preds = %289
  br label %298

294:                                              ; preds = %289
  %295 = load ptr, ptr %5, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.facetT, ptr %295, i32 0, i32 4
  %297 = load ptr, ptr %296, align 8, !tbaa !25
  br label %298

298:                                              ; preds = %294, %293
  %299 = phi ptr [ null, %293 ], [ %297, %294 ]
  store ptr %299, ptr %5, align 8, !tbaa !5
  br label %76, !llvm.loop !33

300:                                              ; preds = %76
  %301 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !11
  %302 = icmp sge i32 %301, 2
  br i1 %302, label %303, label %307

303:                                              ; preds = %300
  %304 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !15
  %305 = load i32, ptr %7, align 4, !tbaa !9
  %306 = load i32, ptr %8, align 4, !tbaa !9
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %304, i32 noundef 2033, ptr noundef @.str.74, i32 noundef %305, i32 noundef %306)
  br label %307

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

declare void @qh_setcompact(ptr noundef) #1

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

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

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

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


; 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] }
%union.setelemT = type { ptr }

@qh_qh = external local_unnamed_addr global %struct.qhT, align 8
@.str.71 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [59 x i8], align 1

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

declare i32 @qh_setsize(ptr noundef) local_unnamed_addr #0

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

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

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

declare void @qh_setfree(ptr noundef) local_unnamed_addr #0

declare ptr @qh_newridge() local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local void @qh_mergecycle_ridges(ptr noundef readonly %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !5
  %4 = icmp sgt i32 %3, 3
  br i1 %4, label %5, label %7

5:                                                ; preds = %2
  %6 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %6, i32 noundef 4033, ptr noundef nonnull @.str.71) #2
  br label %7

7:                                                ; preds = %5, %2
  %8 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2712), align 8, !tbaa !14
  %9 = add i32 %8, -1
  %10 = getelementptr inbounds i8, ptr %1, i64 72
  %11 = load ptr, ptr %10, align 8, !tbaa !15
  %.not = icmp eq ptr %11, null
  br i1 %.not, label %.loopexit123, label %.preheader

.preheader:                                       ; preds = %7
  %.086143 = getelementptr inbounds i8, ptr %11, i64 8
  %12 = load ptr, ptr %.086143, align 8, !tbaa !17
  %.not108144 = icmp eq ptr %12, null
  br i1 %.not108144, label %.loopexit123, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %26
  %13 = phi ptr [ %27, %26 ], [ %12, %.preheader ]
  %.086145 = phi ptr [ %.086, %26 ], [ %.086143, %.preheader ]
  %14 = getelementptr inbounds i8, ptr %13, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !18
  %16 = icmp eq ptr %15, %1
  br i1 %16, label %17, label %20

17:                                               ; preds = %.lr.ph
  %18 = getelementptr inbounds i8, ptr %13, i64 16
  %19 = load ptr, ptr %18, align 8, !tbaa !20
  br label %20

20:                                               ; preds = %.lr.ph, %17
  %21 = phi ptr [ %19, %17 ], [ %15, %.lr.ph ]
  %22 = getelementptr inbounds i8, ptr %21, i64 104
  %23 = load i32, ptr %22, align 8, !tbaa !21
  %24 = icmp eq i32 %23, %9
  br i1 %24, label %25, label %26

25:                                               ; preds = %20
  store ptr null, ptr %.086145, align 8, !tbaa !17
  br label %26

26:                                               ; preds = %25, %20
  %.086 = getelementptr inbounds i8, ptr %.086145, i64 8
  %27 = load ptr, ptr %.086, align 8, !tbaa !17
  %.not108 = icmp eq ptr %27, null
  br i1 %.not108, label %.loopexit123.loopexit, label %.lr.ph, !llvm.loop !22

.loopexit123.loopexit:                            ; preds = %26
  %.pre = load ptr, ptr %10, align 8, !tbaa !15
  br label %.loopexit123

.loopexit123:                                     ; preds = %.loopexit123.loopexit, %.preheader, %7
  %28 = phi ptr [ null, %7 ], [ %11, %.preheader ], [ %.pre, %.loopexit123.loopexit ]
  %.188 = phi ptr [ null, %7 ], [ null, %.preheader ], [ %21, %.loopexit123.loopexit ]
  tail call void @qh_setcompact(ptr noundef %28) #2
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !5
  %30 = icmp sgt i32 %29, 3
  br i1 %30, label %31, label %33

31:                                               ; preds = %.loopexit123
  %32 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %32, i32 noundef 4034, ptr noundef nonnull @.str.72) #2
  br label %33

33:                                               ; preds = %31, %.loopexit123
  %34 = getelementptr inbounds i8, ptr %0, i64 32
  %35 = load ptr, ptr %34, align 8, !tbaa !24
  %.not109166 = icmp eq ptr %35, null
  br i1 %.not109166, label %._crit_edge174, label %.lr.ph173

.lr.ph173:                                        ; preds = %33, %125
  %.0170 = phi ptr [ %127, %125 ], [ %35, %33 ]
  %.2169 = phi ptr [ %.7, %125 ], [ %.188, %33 ]
  %.089168 = phi i32 [ %.392121, %125 ], [ 0, %33 ]
  %.094167 = phi i32 [ %.397, %125 ], [ 0, %33 ]
  %36 = getelementptr inbounds i8, ptr %.0170, i64 72
  %37 = load ptr, ptr %36, align 8, !tbaa !15
  %.not110 = icmp eq ptr %37, null
  br i1 %.not110, label %.thread, label %38

38:                                               ; preds = %.lr.ph173
  %39 = getelementptr inbounds i8, ptr %37, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  %.not111147154 = icmp eq ptr %40, null
  br i1 %.not111147154, label %.outer._crit_edge, label %.lr.ph149.preheader

.lr.ph149.preheader:                              ; preds = %38
  %41 = getelementptr inbounds i8, ptr %37, i64 16
  br label %.lr.ph149

.lr.ph149:                                        ; preds = %.lr.ph149.preheader, %.outer
  %42 = phi ptr [ %84, %.outer ], [ %40, %.lr.ph149.preheader ]
  %43 = phi ptr [ %83, %.outer ], [ %41, %.lr.ph149.preheader ]
  %.3.ph156 = phi ptr [ %.4, %.outer ], [ %.2169, %.lr.ph149.preheader ]
  %.190.ph155 = phi i32 [ %.291, %.outer ], [ %.089168, %.lr.ph149.preheader ]
  br label %44

44:                                               ; preds = %.lr.ph149, %63
  %45 = phi ptr [ %42, %.lr.ph149 ], [ %66, %63 ]
  %46 = phi ptr [ %43, %.lr.ph149 ], [ %65, %63 ]
  %.190148 = phi i32 [ %.190.ph155, %.lr.ph149 ], [ %64, %63 ]
  %47 = getelementptr inbounds i8, ptr %45, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !18
  %49 = icmp eq ptr %48, %.0170
  br i1 %49, label %50, label %54

50:                                               ; preds = %44
  %51 = getelementptr inbounds i8, ptr %45, i64 8
  store ptr %1, ptr %51, align 8, !tbaa !18
  %52 = getelementptr inbounds i8, ptr %45, i64 16
  %53 = load ptr, ptr %52, align 8, !tbaa !20
  br label %71

54:                                               ; preds = %44
  %55 = getelementptr inbounds i8, ptr %45, i64 16
  %56 = load ptr, ptr %55, align 8, !tbaa !20
  %57 = icmp eq ptr %56, %.0170
  br i1 %57, label %58, label %60

58:                                               ; preds = %54
  %59 = getelementptr inbounds i8, ptr %45, i64 16
  store ptr %1, ptr %59, align 8, !tbaa !20
  br label %71

60:                                               ; preds = %54
  %61 = icmp eq ptr %48, %1
  %62 = icmp eq ptr %56, %1
  %or.cond = or i1 %61, %62
  br i1 %or.cond, label %63, label %67

63:                                               ; preds = %60
  tail call void @qh_setappend(ptr noundef nonnull %10, ptr noundef nonnull %45) #2
  %64 = add nsw i32 %.190148, 1
  %65 = getelementptr inbounds i8, ptr %46, i64 8
  %66 = load ptr, ptr %46, align 8, !tbaa !17
  %.not111 = icmp eq ptr %66, null
  br i1 %.not111, label %.outer._crit_edge, label %44, !llvm.loop !25

67:                                               ; preds = %60
  %68 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  %69 = getelementptr inbounds i8, ptr %45, i64 24
  %70 = load i32, ptr %69, align 8, !tbaa !26
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %68, i32 noundef 6098, ptr noundef nonnull @.str.73, i32 noundef %70) #2
  tail call void @qh_errexit(i32 noundef 5, ptr noundef null, ptr noundef nonnull %45) #2
  br label %71

71:                                               ; preds = %58, %67, %50
  %.4 = phi ptr [ %53, %50 ], [ %48, %58 ], [ %.3.ph156, %67 ]
  %72 = icmp eq ptr %.4, %1
  br i1 %72, label %73, label %74

73:                                               ; preds = %71
  tail call void @qh_setfree(ptr noundef nonnull %45) #2
  tail call void @qh_memfree(ptr noundef nonnull %45, i32 noundef 32) #2
  br label %.outer

74:                                               ; preds = %71
  %75 = getelementptr inbounds i8, ptr %.4, i64 104
  %76 = load i32, ptr %75, align 8, !tbaa !21
  %77 = icmp eq i32 %76, %9
  br i1 %77, label %78, label %82

78:                                               ; preds = %74
  %79 = getelementptr inbounds i8, ptr %.4, i64 72
  %80 = load ptr, ptr %79, align 8, !tbaa !15
  %81 = tail call ptr @qh_setdel(ptr noundef %80, ptr noundef nonnull %45) #2
  tail call void @qh_setfree(ptr noundef nonnull %45) #2
  tail call void @qh_memfree(ptr noundef nonnull %45, i32 noundef 32) #2
  br label %.outer

82:                                               ; preds = %74
  tail call void @qh_setappend(ptr noundef nonnull %10, ptr noundef nonnull %45) #2
  br label %.outer

.outer:                                           ; preds = %78, %82, %73
  %.291 = add nsw i32 %.190148, 1
  %83 = getelementptr inbounds i8, ptr %46, i64 8
  %84 = load ptr, ptr %46, align 8, !tbaa !17
  %.not111147 = icmp eq ptr %84, null
  br i1 %.not111147, label %.outer._crit_edge, label %.lr.ph149, !llvm.loop !25

.outer._crit_edge:                                ; preds = %.outer, %63, %38
  %.3.ph.lcssa = phi ptr [ %.2169, %38 ], [ %.3.ph156, %63 ], [ %.4, %.outer ]
  %.190.lcssa = phi i32 [ %.089168, %38 ], [ %64, %63 ], [ %.291, %.outer ]
  %.pr = load ptr, ptr %36, align 8, !tbaa !15
  %.not112 = icmp eq ptr %.pr, null
  br i1 %.not112, label %.thread, label %85

85:                                               ; preds = %.outer._crit_edge
  tail call void @qh_settruncate(ptr noundef nonnull %.pr, i32 noundef 0) #2
  br label %.thread

.thread:                                          ; preds = %.lr.ph173, %85, %.outer._crit_edge
  %.5122 = phi ptr [ %.3.ph.lcssa, %85 ], [ %.3.ph.lcssa, %.outer._crit_edge ], [ %.2169, %.lr.ph173 ]
  %.392121 = phi i32 [ %.190.lcssa, %85 ], [ %.190.lcssa, %.outer._crit_edge ], [ %.089168, %.lr.ph173 ]
  %86 = getelementptr inbounds i8, ptr %.0170, i64 112
  %87 = load i32, ptr %86, align 8
  %88 = and i32 %87, 8192
  %.not113 = icmp eq i32 %88, 0
  br i1 %.not113, label %.loopexit, label %89

89:                                               ; preds = %.thread
  %90 = getelementptr inbounds i8, ptr %.0170, i64 80
  %91 = load ptr, ptr %90, align 8, !tbaa !27
  %.not114 = icmp eq ptr %91, null
  br i1 %.not114, label %.loopexit, label %92

92:                                               ; preds = %89
  %93 = getelementptr inbounds i8, ptr %91, i64 8
  %94 = load ptr, ptr %93, align 8, !tbaa !24
  %95 = tail call i32 @qh_setsize(ptr noundef nonnull %91) #2
  %96 = icmp sgt i32 %95, 0
  br i1 %96, label %.lr.ph163, label %.loopexit

.lr.ph163:                                        ; preds = %92
  %97 = getelementptr inbounds i8, ptr %.0170, i64 64
  %wide.trip.count = zext nneg i32 %95 to i64
  br label %98

98:                                               ; preds = %.lr.ph163, %119
  %indvars.iv = phi i64 [ 0, %.lr.ph163 ], [ %indvars.iv.next, %119 ]
  %.6161 = phi ptr [ %94, %.lr.ph163 ], [ %123, %119 ]
  %.195159 = phi i32 [ %.094167, %.lr.ph163 ], [ %.296, %119 ]
  %99 = getelementptr inbounds i8, ptr %.6161, i64 104
  %100 = load i32, ptr %99, align 8, !tbaa !21
  %.not115 = icmp eq i32 %100, %9
  br i1 %.not115, label %119, label %101

101:                                              ; preds = %98
  %102 = getelementptr inbounds i8, ptr %.6161, i64 112
  %103 = load i32, ptr %102, align 8
  %104 = and i32 %103, 8192
  %.not116 = icmp eq i32 %104, 0
  br i1 %.not116, label %119, label %105

105:                                              ; preds = %101
  %106 = tail call ptr @qh_newridge() #2
  %107 = load ptr, ptr %97, align 8, !tbaa !28
  %108 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 624), align 8, !tbaa !29
  %109 = trunc nuw nsw i64 %indvars.iv to i32
  %110 = tail call ptr @qh_setnew_delnthsorted(ptr noundef %107, i32 noundef %108, i32 noundef %109, i32 noundef 0) #2
  store ptr %110, ptr %106, align 8, !tbaa !30
  %111 = load i32, ptr %86, align 8
  %112 = lshr i32 %111, 12
  %113 = xor i32 %112, %109
  %114 = and i32 %113, 1
  %.not117 = icmp eq i32 %114, 0
  %spec.select = select i1 %.not117, ptr %.6161, ptr %1
  %spec.select227 = select i1 %.not117, ptr %1, ptr %.6161
  %115 = getelementptr inbounds i8, ptr %106, i64 8
  store ptr %spec.select, ptr %115, align 8
  %116 = getelementptr inbounds i8, ptr %106, i64 16
  store ptr %spec.select227, ptr %116, align 8
  tail call void @qh_setappend(ptr noundef nonnull %10, ptr noundef nonnull %106) #2
  %117 = getelementptr inbounds i8, ptr %.6161, i64 72
  tail call void @qh_setappend(ptr noundef nonnull %117, ptr noundef nonnull %106) #2
  %118 = add nsw i32 %.195159, 1
  br label %119

119:                                              ; preds = %98, %101, %105
  %.296 = phi i32 [ %118, %105 ], [ %.195159, %101 ], [ %.195159, %98 ]
  %120 = load ptr, ptr %90, align 8, !tbaa !27
  %121 = getelementptr inbounds i8, ptr %120, i64 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %122 = getelementptr inbounds [1 x %union.setelemT], ptr %121, i64 0, i64 %indvars.iv.next
  %123 = load ptr, ptr %122, align 8, !tbaa !24
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %98, !llvm.loop !31

.loopexit:                                        ; preds = %119, %92, %89, %.thread
  %.397 = phi i32 [ %.094167, %89 ], [ %.094167, %.thread ], [ %.094167, %92 ], [ %.296, %119 ]
  %.7 = phi ptr [ null, %89 ], [ %.5122, %.thread ], [ %94, %92 ], [ %123, %119 ]
  %124 = icmp eq ptr %.0170, %0
  br i1 %124, label %._crit_edge174, label %125

125:                                              ; preds = %.loopexit
  %126 = getelementptr inbounds i8, ptr %.0170, i64 32
  %127 = load ptr, ptr %126, align 8, !tbaa !24
  %.not109 = icmp eq ptr %127, null
  br i1 %.not109, label %._crit_edge174, label %.lr.ph173, !llvm.loop !32

._crit_edge174:                                   ; preds = %.loopexit, %125, %33
  %.094.lcssa = phi i32 [ 0, %33 ], [ %.397, %125 ], [ %.397, %.loopexit ]
  %.089.lcssa = phi i32 [ 0, %33 ], [ %.392121, %125 ], [ %.392121, %.loopexit ]
  %128 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !5
  %129 = icmp sgt i32 %128, 1
  br i1 %129, label %130, label %132

130:                                              ; preds = %._crit_edge174
  %131 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %131, i32 noundef 2033, ptr noundef nonnull @.str.74, i32 noundef %.089.lcssa, i32 noundef %.094.lcssa) #2
  br label %132

132:                                              ; preds = %130, %._crit_edge174
  ret void
}

declare void @qh_setcompact(ptr noundef) local_unnamed_addr #0

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

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, !7, i64 128}
!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 = !{!6, !11, i64 2408}
!14 = !{!6, !7, i64 2712}
!15 = !{!16, !11, i64 72}
!16 = !{!"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}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !11, i64 8}
!19 = !{!"ridgeT", !11, i64 0, !11, i64 8, !11, i64 16, !7, i64 24, !7, i64 28, !7, i64 28, !7, i64 28}
!20 = !{!19, !11, i64 16}
!21 = !{!16, !7, i64 104}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!8, !8, i64 0}
!25 = distinct !{!25, !23}
!26 = !{!19, !7, i64 24}
!27 = !{!16, !11, i64 80}
!28 = !{!16, !11, i64 64}
!29 = !{!6, !7, i64 624}
!30 = !{!19, !11, i64 0}
!31 = distinct !{!31, !23}
!32 = distinct !{!32, !23}


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