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

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

%struct.qhT = type { i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [29 x i32], i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, i32, ptr, i32, [256 x i8], i32, [256 x i8], [512 x i8], i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, double, double, double, double, double, double, double, double, double, double, double, double, double, double, ptr, double, double, double, double, i32, [6 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, double, i32, i32, i32, i32, i32, i32, ptr, ptr, i32 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.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.150 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.153 = 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_errexit(i32 noundef, ptr noundef, ptr noundef) #1

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

declare ptr @qh_setdel(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

; 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 29), 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 158), align 8, !tbaa !15
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %19, i32 noundef 4033, ptr noundef @.str.150)
  br label %20

20:                                               ; preds = %18, %2
  %21 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 217), 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 29), 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 158), align 8, !tbaa !15
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %71, i32 noundef 4034, ptr noundef @.str.151)
  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 = %326, %72
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %328

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 %195

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 = %193, %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 %194

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 158), 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.152, 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 %163

151:                                              ; preds = %147
  %152 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 172), align 8, !tbaa !28
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  %154 = icmp eq ptr %152, %153
  br i1 %154, label %155, label %156

155:                                              ; preds = %151
  store ptr null, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 172), align 8, !tbaa !28
  br label %156

156:                                              ; preds = %155, %151
  %157 = load ptr, ptr %12, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.ridgeT, ptr %157, i32 0, i32 0
  call void @qh_setfree(ptr noundef %158)
  %159 = load ptr, ptr %15, align 8, !tbaa !5
  %160 = load ptr, ptr %12, align 8, !tbaa !5
  call void @qh_memfree(ptr noundef %160, i32 noundef 32)
  %161 = load i32, ptr %7, align 4, !tbaa !9
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %7, align 4, !tbaa !9
  br label %193

163:                                              ; preds = %147
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.facetT, ptr %164, i32 0, i32 13
  %166 = load i32, ptr %165, align 8, !tbaa !22
  %167 = load i32, ptr %11, align 4, !tbaa !9
  %168 = icmp eq i32 %166, %167
  br i1 %168, label %169, label %186

169:                                              ; preds = %163
  %170 = load ptr, ptr %6, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.facetT, ptr %170, i32 0, i32 9
  %172 = load ptr, ptr %171, align 8, !tbaa !17
  %173 = load ptr, ptr %12, align 8, !tbaa !5
  %174 = call ptr @qh_setdel(ptr noundef %172, ptr noundef %173)
  %175 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 172), align 8, !tbaa !28
  %176 = load ptr, ptr %12, align 8, !tbaa !5
  %177 = icmp eq ptr %175, %176
  br i1 %177, label %178, label %179

178:                                              ; preds = %169
  store ptr null, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 172), align 8, !tbaa !28
  br label %179

179:                                              ; preds = %178, %169
  %180 = load ptr, ptr %12, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.ridgeT, ptr %180, i32 0, i32 0
  call void @qh_setfree(ptr noundef %181)
  %182 = load ptr, ptr %15, align 8, !tbaa !5
  %183 = load ptr, ptr %12, align 8, !tbaa !5
  call void @qh_memfree(ptr noundef %183, i32 noundef 32)
  %184 = load i32, ptr %7, align 4, !tbaa !9
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %7, align 4, !tbaa !9
  br label %192

186:                                              ; preds = %163
  %187 = load ptr, ptr %4, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.facetT, ptr %187, i32 0, i32 9
  %189 = load ptr, ptr %12, align 8, !tbaa !5
  call void @qh_setappend(ptr noundef %188, ptr noundef %189)
  %190 = load i32, ptr %7, align 4, !tbaa !9
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %7, align 4, !tbaa !9
  br label %192

192:                                              ; preds = %186, %179
  br label %193

193:                                              ; preds = %192, %156
  br label %90, !llvm.loop !26

194:                                              ; preds = %90
  br label %195

195:                                              ; preds = %194, %79
  %196 = load ptr, ptr %5, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.facetT, ptr %196, i32 0, i32 9
  %198 = load ptr, ptr %197, align 8, !tbaa !17
  %199 = icmp ne ptr %198, null
  br i1 %199, label %200, label %204

200:                                              ; preds = %195
  %201 = load ptr, ptr %5, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.facetT, ptr %201, i32 0, i32 9
  %203 = load ptr, ptr %202, align 8, !tbaa !17
  call void @qh_settruncate(ptr noundef %203, i32 noundef 0)
  br label %204

204:                                              ; preds = %200, %195
  %205 = load ptr, ptr %5, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.facetT, ptr %205, i32 0, i32 15
  %207 = load i32, ptr %206, align 8
  %208 = lshr i32 %207, 13
  %209 = and i32 %208, 1
  %210 = icmp ne i32 %209, 0
  br i1 %210, label %212, label %211

211:                                              ; preds = %204
  br label %317

212:                                              ; preds = %204
  store ptr null, ptr %6, align 8, !tbaa !5
  %213 = load ptr, ptr %5, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.facetT, ptr %213, i32 0, i32 10
  %215 = load ptr, ptr %214, align 8, !tbaa !29
  %216 = icmp ne ptr %215, null
  br i1 %216, label %217, label %316

217:                                              ; preds = %212
  store i32 0, ptr %9, align 4, !tbaa !9
  %218 = load ptr, ptr %5, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.facetT, ptr %218, i32 0, i32 10
  %220 = load ptr, ptr %219, align 8, !tbaa !29
  %221 = getelementptr inbounds %struct.setT, ptr %220, i32 0, i32 1
  %222 = getelementptr inbounds [1 x %union.setelemT], ptr %221, i64 0, i64 0
  %223 = load ptr, ptr %222, align 8, !tbaa !25
  store ptr %223, ptr %6, align 8, !tbaa !5
  %224 = load ptr, ptr %5, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.facetT, ptr %224, i32 0, i32 10
  %226 = load ptr, ptr %225, align 8, !tbaa !29
  %227 = call i32 @qh_setsize(ptr noundef %226)
  store i32 %227, ptr %10, align 4, !tbaa !9
  br label %228

228:                                              ; preds = %305, %217
  %229 = load i32, ptr %9, align 4, !tbaa !9
  %230 = load i32, ptr %10, align 4, !tbaa !9
  %231 = icmp slt i32 %229, %230
  br i1 %231, label %232, label %315

232:                                              ; preds = %228
  %233 = load ptr, ptr %6, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.facetT, ptr %233, i32 0, i32 13
  %235 = load i32, ptr %234, align 8, !tbaa !22
  %236 = load i32, ptr %11, align 4, !tbaa !9
  %237 = icmp ne i32 %235, %236
  br i1 %237, label %238, label %304

238:                                              ; preds = %232
  %239 = load ptr, ptr %6, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.facetT, ptr %239, i32 0, i32 15
  %241 = load i32, ptr %240, align 8
  %242 = lshr i32 %241, 13
  %243 = and i32 %242, 1
  %244 = icmp ne i32 %243, 0
  br i1 %244, label %245, label %304

245:                                              ; preds = %238
  %246 = call ptr @qh_newridge()
  store ptr %246, ptr %12, align 8, !tbaa !5
  %247 = load ptr, ptr %5, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.facetT, ptr %247, i32 0, i32 8
  %249 = load ptr, ptr %248, align 8, !tbaa !30
  %250 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 110), align 8, !tbaa !31
  %251 = load i32, ptr %9, align 4, !tbaa !9
  %252 = call ptr @qh_setnew_delnthsorted(ptr noundef %249, i32 noundef %250, i32 noundef %251, i32 noundef 0)
  %253 = load ptr, ptr %12, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.ridgeT, ptr %253, i32 0, i32 0
  store ptr %252, ptr %254, align 8, !tbaa !32
  %255 = load ptr, ptr %5, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.facetT, ptr %255, i32 0, i32 15
  %257 = load i32, ptr %256, align 8
  %258 = lshr i32 %257, 12
  %259 = and i32 %258, 1
  %260 = load i32, ptr %9, align 4, !tbaa !9
  %261 = and i32 %260, 1
  %262 = xor i32 %259, %261
  store i32 %262, ptr %14, align 4, !tbaa !9
  %263 = load i32, ptr %14, align 4, !tbaa !9
  %264 = icmp ne i32 %263, 0
  br i1 %264, label %265, label %277

265:                                              ; preds = %245
  %266 = load ptr, ptr %4, align 8, !tbaa !5
  %267 = load ptr, ptr %12, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.ridgeT, ptr %267, i32 0, i32 1
  store ptr %266, ptr %268, align 8, !tbaa !19
  %269 = load ptr, ptr %6, align 8, !tbaa !5
  %270 = load ptr, ptr %12, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.ridgeT, ptr %270, i32 0, i32 2
  store ptr %269, ptr %271, align 8, !tbaa !21
  %272 = load ptr, ptr %12, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.ridgeT, ptr %272, i32 0, i32 4
  %274 = load i8, ptr %273, align 4
  %275 = and i8 %274, -65
  %276 = or i8 %275, 64
  store i8 %276, ptr %273, align 4
  br label %289

277:                                              ; preds = %245
  %278 = load ptr, ptr %6, align 8, !tbaa !5
  %279 = load ptr, ptr %12, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.ridgeT, ptr %279, i32 0, i32 1
  store ptr %278, ptr %280, align 8, !tbaa !19
  %281 = load ptr, ptr %4, align 8, !tbaa !5
  %282 = load ptr, ptr %12, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.ridgeT, ptr %282, i32 0, i32 2
  store ptr %281, ptr %283, align 8, !tbaa !21
  %284 = load ptr, ptr %12, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.ridgeT, ptr %284, i32 0, i32 4
  %286 = load i8, ptr %285, align 4
  %287 = and i8 %286, -33
  %288 = or i8 %287, 32
  store i8 %288, ptr %285, align 4
  br label %289

289:                                              ; preds = %277, %265
  %290 = load ptr, ptr %4, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.facetT, ptr %290, i32 0, i32 9
  %292 = load ptr, ptr %12, align 8, !tbaa !5
  call void @qh_setappend(ptr noundef %291, ptr noundef %292)
  %293 = load ptr, ptr %6, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.facetT, ptr %293, i32 0, i32 9
  %295 = load ptr, ptr %12, align 8, !tbaa !5
  call void @qh_setappend(ptr noundef %294, ptr noundef %295)
  %296 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 183), align 4, !tbaa !33
  %297 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 171), align 8, !tbaa !34
  %298 = icmp eq i32 %296, %297
  br i1 %298, label %299, label %301

299:                                              ; preds = %289
  %300 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %300, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 172), align 8, !tbaa !28
  br label %301

301:                                              ; preds = %299, %289
  %302 = load i32, ptr %8, align 4, !tbaa !9
  %303 = add nsw i32 %302, 1
  store i32 %303, ptr %8, align 4, !tbaa !9
  br label %304

304:                                              ; preds = %301, %238, %232
  br label %305

305:                                              ; preds = %304
  %306 = load ptr, ptr %5, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct.facetT, ptr %306, i32 0, i32 10
  %308 = load ptr, ptr %307, align 8, !tbaa !29
  %309 = getelementptr inbounds %struct.setT, ptr %308, i32 0, i32 1
  %310 = load i32, ptr %9, align 4, !tbaa !9
  %311 = add nsw i32 %310, 1
  store i32 %311, ptr %9, align 4, !tbaa !9
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds [1 x %union.setelemT], ptr %309, i64 0, i64 %312
  %314 = load ptr, ptr %313, align 8, !tbaa !25
  store ptr %314, ptr %6, align 8, !tbaa !5
  br label %228, !llvm.loop !35

315:                                              ; preds = %228
  br label %316

316:                                              ; preds = %315, %212
  br label %317

317:                                              ; preds = %316, %211
  %318 = load ptr, ptr %5, align 8, !tbaa !5
  %319 = load ptr, ptr %3, align 8, !tbaa !5
  %320 = icmp eq ptr %318, %319
  br i1 %320, label %321, label %322

321:                                              ; preds = %317
  br label %326

322:                                              ; preds = %317
  %323 = load ptr, ptr %5, align 8, !tbaa !5
  %324 = getelementptr inbounds %struct.facetT, ptr %323, i32 0, i32 4
  %325 = load ptr, ptr %324, align 8, !tbaa !25
  br label %326

326:                                              ; preds = %322, %321
  %327 = phi ptr [ null, %321 ], [ %325, %322 ]
  store ptr %327, ptr %5, align 8, !tbaa !5
  br label %76, !llvm.loop !36

328:                                              ; preds = %76
  %329 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !11
  %330 = icmp sge i32 %329, 2
  br i1 %330, label %331, label %335

331:                                              ; preds = %328
  %332 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !15
  %333 = load i32, ptr %7, align 4, !tbaa !9
  %334 = load i32, ptr %8, align 4, !tbaa !9
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %332, i32 noundef 2033, ptr noundef @.str.153, i32 noundef %333, i32 noundef %334)
  br label %335

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

@qh_qh = external local_unnamed_addr global %struct.qhT, align 8
@.str.150 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.153 = 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_errexit(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

declare ptr @qh_setdel(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

; 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 136), 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 2424), align 8, !tbaa !13
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %6, i32 noundef 4033, ptr noundef nonnull @.str.150) #2
  br label %7

7:                                                ; preds = %5, %2
  %8 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2784), 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 %.loopexit130, label %.preheader

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

.lr.ph:                                           ; preds = %.preheader, %26
  %13 = phi ptr [ %27, %26 ], [ %12, %.preheader ]
  %.093152 = phi ptr [ %.093, %26 ], [ %.093150, %.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 %.093152, align 8, !tbaa !17
  br label %26

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

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

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

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

33:                                               ; preds = %31, %.loopexit130
  %34 = getelementptr inbounds i8, ptr %0, i64 32
  %35 = load ptr, ptr %34, align 8, !tbaa !24
  %.not116173 = icmp eq ptr %35, null
  br i1 %.not116173, label %._crit_edge181, label %.lr.ph180

.lr.ph180:                                        ; preds = %33, %141
  %.0177 = phi ptr [ %143, %141 ], [ %35, %33 ]
  %.2176 = phi ptr [ %.7, %141 ], [ %.195, %33 ]
  %.096175 = phi i32 [ %.399128, %141 ], [ 0, %33 ]
  %.0101174 = phi i32 [ %.3104, %141 ], [ 0, %33 ]
  %36 = getelementptr inbounds i8, ptr %.0177, i64 72
  %37 = load ptr, ptr %36, align 8, !tbaa !15
  %.not117 = icmp eq ptr %37, null
  br i1 %.not117, label %.thread, label %38

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

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

.lr.ph156:                                        ; preds = %.lr.ph156.preheader, %.outer
  %42 = phi ptr [ %92, %.outer ], [ %40, %.lr.ph156.preheader ]
  %43 = phi ptr [ %91, %.outer ], [ %41, %.lr.ph156.preheader ]
  %.3.ph163 = phi ptr [ %.4, %.outer ], [ %.2176, %.lr.ph156.preheader ]
  %.197.ph162 = phi i32 [ %.298, %.outer ], [ %.096175, %.lr.ph156.preheader ]
  br label %44

44:                                               ; preds = %.lr.ph156, %63
  %45 = phi ptr [ %42, %.lr.ph156 ], [ %66, %63 ]
  %46 = phi ptr [ %43, %.lr.ph156 ], [ %65, %63 ]
  %.197155 = phi i32 [ %.197.ph162, %.lr.ph156 ], [ %64, %63 ]
  %47 = getelementptr inbounds i8, ptr %45, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !18
  %49 = icmp eq ptr %48, %.0177
  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, %.0177
  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 %.197155, 1
  %65 = getelementptr inbounds i8, ptr %46, i64 8
  %66 = load ptr, ptr %46, align 8, !tbaa !17
  %.not118 = icmp eq ptr %66, null
  br i1 %.not118, label %.outer._crit_edge, label %44, !llvm.loop !25

67:                                               ; preds = %60
  %68 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), 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.152, 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.ph163, %67 ]
  %72 = icmp eq ptr %.4, %1
  br i1 %72, label %73, label %78

73:                                               ; preds = %71
  %74 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2520), align 8, !tbaa !27
  %75 = icmp eq ptr %74, %45
  br i1 %75, label %76, label %77

76:                                               ; preds = %73
  store ptr null, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2520), align 8, !tbaa !27
  br label %77

77:                                               ; preds = %76, %73
  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

78:                                               ; preds = %71
  %79 = getelementptr inbounds i8, ptr %.4, i64 104
  %80 = load i32, ptr %79, align 8, !tbaa !21
  %81 = icmp eq i32 %80, %9
  br i1 %81, label %82, label %90

82:                                               ; preds = %78
  %83 = getelementptr inbounds i8, ptr %.4, i64 72
  %84 = load ptr, ptr %83, align 8, !tbaa !15
  %85 = tail call ptr @qh_setdel(ptr noundef %84, ptr noundef nonnull %45) #2
  %86 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2520), align 8, !tbaa !27
  %87 = icmp eq ptr %86, %45
  br i1 %87, label %88, label %89

88:                                               ; preds = %82
  store ptr null, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2520), align 8, !tbaa !27
  br label %89

89:                                               ; preds = %88, %82
  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

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

.outer:                                           ; preds = %89, %90, %77
  %.298 = add nsw i32 %.197155, 1
  %91 = getelementptr inbounds i8, ptr %46, i64 8
  %92 = load ptr, ptr %46, align 8, !tbaa !17
  %.not118154 = icmp eq ptr %92, null
  br i1 %.not118154, label %.outer._crit_edge, label %.lr.ph156, !llvm.loop !25

.outer._crit_edge:                                ; preds = %.outer, %63, %38
  %.3.ph.lcssa = phi ptr [ %.2176, %38 ], [ %.3.ph163, %63 ], [ %.4, %.outer ]
  %.197.lcssa = phi i32 [ %.096175, %38 ], [ %64, %63 ], [ %.298, %.outer ]
  %.pr = load ptr, ptr %36, align 8, !tbaa !15
  %.not119 = icmp eq ptr %.pr, null
  br i1 %.not119, label %.thread, label %93

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

.thread:                                          ; preds = %.lr.ph180, %93, %.outer._crit_edge
  %.5129 = phi ptr [ %.3.ph.lcssa, %93 ], [ %.3.ph.lcssa, %.outer._crit_edge ], [ %.2176, %.lr.ph180 ]
  %.399128 = phi i32 [ %.197.lcssa, %93 ], [ %.197.lcssa, %.outer._crit_edge ], [ %.096175, %.lr.ph180 ]
  %94 = getelementptr inbounds i8, ptr %.0177, i64 112
  %95 = load i32, ptr %94, align 8
  %96 = and i32 %95, 8192
  %.not120 = icmp eq i32 %96, 0
  br i1 %.not120, label %.loopexit, label %97

97:                                               ; preds = %.thread
  %98 = getelementptr inbounds i8, ptr %.0177, i64 80
  %99 = load ptr, ptr %98, align 8, !tbaa !28
  %.not121 = icmp eq ptr %99, null
  br i1 %.not121, label %.loopexit, label %100

100:                                              ; preds = %97
  %101 = getelementptr inbounds i8, ptr %99, i64 8
  %102 = load ptr, ptr %101, align 8, !tbaa !24
  %103 = tail call i32 @qh_setsize(ptr noundef nonnull %99) #2
  %104 = icmp sgt i32 %103, 0
  br i1 %104, label %.lr.ph170, label %.loopexit

.lr.ph170:                                        ; preds = %100
  %105 = getelementptr inbounds i8, ptr %.0177, i64 64
  %wide.trip.count = zext nneg i32 %103 to i64
  br label %106

106:                                              ; preds = %.lr.ph170, %135
  %indvars.iv = phi i64 [ 0, %.lr.ph170 ], [ %indvars.iv.next, %135 ]
  %.6168 = phi ptr [ %102, %.lr.ph170 ], [ %139, %135 ]
  %.1102166 = phi i32 [ %.0101174, %.lr.ph170 ], [ %.2103, %135 ]
  %107 = getelementptr inbounds i8, ptr %.6168, i64 104
  %108 = load i32, ptr %107, align 8, !tbaa !21
  %.not122 = icmp eq i32 %108, %9
  br i1 %.not122, label %135, label %109

109:                                              ; preds = %106
  %110 = getelementptr inbounds i8, ptr %.6168, i64 112
  %111 = load i32, ptr %110, align 8
  %112 = and i32 %111, 8192
  %.not123 = icmp eq i32 %112, 0
  br i1 %.not123, label %135, label %113

113:                                              ; preds = %109
  %114 = tail call ptr @qh_newridge() #2
  %115 = load ptr, ptr %105, align 8, !tbaa !29
  %116 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 632), align 8, !tbaa !30
  %117 = trunc nuw nsw i64 %indvars.iv to i32
  %118 = tail call ptr @qh_setnew_delnthsorted(ptr noundef %115, i32 noundef %116, i32 noundef %117, i32 noundef 0) #2
  store ptr %118, ptr %114, align 8, !tbaa !31
  %119 = load i32, ptr %94, align 8
  %120 = lshr i32 %119, 12
  %121 = xor i32 %120, %117
  %122 = and i32 %121, 1
  %.not124 = icmp eq i32 %122, 0
  %123 = getelementptr inbounds i8, ptr %114, i64 8
  %124 = getelementptr inbounds i8, ptr %114, i64 16
  %125 = getelementptr inbounds i8, ptr %114, i64 28
  %.6168. = select i1 %.not124, ptr %.6168, ptr %1
  %..6168 = select i1 %.not124, ptr %1, ptr %.6168
  %. = select i1 %.not124, i8 32, i8 64
  store ptr %.6168., ptr %123, align 8, !tbaa !18
  store ptr %..6168, ptr %124, align 8, !tbaa !20
  %126 = load i8, ptr %125, align 4
  %127 = or i8 %126, %.
  store i8 %127, ptr %125, align 4
  tail call void @qh_setappend(ptr noundef nonnull %10, ptr noundef nonnull %114) #2
  %128 = getelementptr inbounds i8, ptr %.6168, i64 72
  tail call void @qh_setappend(ptr noundef nonnull %128, ptr noundef nonnull %114) #2
  %129 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2588), align 4, !tbaa !32
  %130 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2512), align 8, !tbaa !33
  %131 = icmp eq i32 %129, %130
  br i1 %131, label %132, label %133

132:                                              ; preds = %113
  store ptr %114, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2520), align 8, !tbaa !27
  br label %133

133:                                              ; preds = %132, %113
  %134 = add nsw i32 %.1102166, 1
  br label %135

135:                                              ; preds = %106, %109, %133
  %.2103 = phi i32 [ %134, %133 ], [ %.1102166, %109 ], [ %.1102166, %106 ]
  %136 = load ptr, ptr %98, align 8, !tbaa !28
  %137 = getelementptr inbounds i8, ptr %136, i64 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %138 = getelementptr inbounds [1 x %union.setelemT], ptr %137, i64 0, i64 %indvars.iv.next
  %139 = load ptr, ptr %138, align 8, !tbaa !24
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %106, !llvm.loop !34

.loopexit:                                        ; preds = %135, %100, %97, %.thread
  %.3104 = phi i32 [ %.0101174, %97 ], [ %.0101174, %.thread ], [ %.0101174, %100 ], [ %.2103, %135 ]
  %.7 = phi ptr [ null, %97 ], [ %.5129, %.thread ], [ %102, %100 ], [ %139, %135 ]
  %140 = icmp eq ptr %.0177, %0
  br i1 %140, label %._crit_edge181, label %141

141:                                              ; preds = %.loopexit
  %142 = getelementptr inbounds i8, ptr %.0177, i64 32
  %143 = load ptr, ptr %142, align 8, !tbaa !24
  %.not116 = icmp eq ptr %143, null
  br i1 %.not116, label %._crit_edge181, label %.lr.ph180, !llvm.loop !35

._crit_edge181:                                   ; preds = %.loopexit, %141, %33
  %.0101.lcssa = phi i32 [ 0, %33 ], [ %.3104, %141 ], [ %.3104, %.loopexit ]
  %.096.lcssa = phi i32 [ 0, %33 ], [ %.399128, %141 ], [ %.399128, %.loopexit ]
  %144 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !5
  %145 = icmp sgt i32 %144, 1
  br i1 %145, label %146, label %148

146:                                              ; preds = %._crit_edge181
  %147 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !13
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %147, i32 noundef 2033, ptr noundef nonnull @.str.153, i32 noundef %.096.lcssa, i32 noundef %.0101.lcssa) #2
  br label %148

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


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