; LLVM IR from Discngine/fpocket :: src/qhull/src/libqhull (merge)

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

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

@qh_qh = external global %struct.qhT, align 8
@qh_qhstat = external global %struct.qhstatT, align 8
@qhmem = external global %struct.qhmemT, align 8
@.str.37 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [123 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [82 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

declare ptr @qh_settemp(i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @qh_forcedmerges(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, 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
  store i32 0, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 0, ptr %15, align 4, !tbaa !9
  %16 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 90), align 8, !tbaa !11
  %17 = sub nsw i32 %16, 1
  %18 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 199), align 8, !tbaa !15
  %19 = icmp eq i32 %17, %18
  br i1 %19, label %20, label %22

20:                                               ; preds = %1
  %21 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 86), align 4, !tbaa !16
  store i32 %21, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !17
  store i32 %21, ptr getelementptr inbounds (%struct.qhmemT, ptr @qhmem, i32 0, i32 14), align 8, !tbaa !18
  br label %22

22:                                               ; preds = %20, %1
  %23 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !17
  %24 = icmp sge i32 %23, 4
  br i1 %24, label %25, label %27

25:                                               ; preds = %22
  %26 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !20
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %26, i32 noundef 4025, ptr noundef @.str.37)
  br label %27

27:                                               ; preds = %25, %22
  %28 = call ptr @qh_settemppop()
  store ptr %28, ptr %13, align 8, !tbaa !5
  %29 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 155), align 8, !tbaa !21
  %30 = call ptr @qh_settemp(i32 noundef %29)
  store ptr %30, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 205), align 8, !tbaa !22
  %31 = load ptr, ptr %13, align 8, !tbaa !5
  call void @qh_settemppush(ptr noundef %31)
  store ptr null, ptr %5, align 8, !tbaa !5
  %32 = load ptr, ptr %13, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %172

34:                                               ; preds = %27
  %35 = load ptr, ptr %13, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.setT, ptr %35, i32 0, i32 1
  %37 = getelementptr inbounds [1 x %union.setelemT], ptr %36, i64 0, i64 0
  store ptr %37, ptr %6, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %170, %90, %48, %34
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds ptr, ptr %39, i32 1
  store ptr %40, ptr %6, align 8, !tbaa !5
  %41 = load ptr, ptr %39, align 8, !tbaa !5
  store ptr %41, ptr %5, align 8, !tbaa !5
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %171

43:                                               ; preds = %38
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.mergeT, ptr %44, i32 0, i32 3
  %46 = load i32, ptr %45, align 8, !tbaa !23
  %47 = icmp ne i32 %46, 5
  br i1 %47, label %48, label %49

48:                                               ; preds = %43
  br label %38, !llvm.loop !25

49:                                               ; preds = %43
  %50 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 90), align 8, !tbaa !11
  %51 = sub nsw i32 %50, 1
  %52 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 199), align 8, !tbaa !15
  %53 = icmp eq i32 %51, %52
  br i1 %53, label %54, label %56

54:                                               ; preds = %49
  %55 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 86), align 4, !tbaa !16
  store i32 %55, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !17
  store i32 %55, ptr getelementptr inbounds (%struct.qhmemT, ptr @qhmem, i32 0, i32 14), align 8, !tbaa !18
  br label %56

56:                                               ; preds = %54, %49
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.mergeT, ptr %57, i32 0, i32 1
  %59 = load ptr, ptr %58, align 8, !tbaa !27
  store ptr %59, ptr %3, align 8, !tbaa !5
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.mergeT, ptr %60, i32 0, i32 2
  %62 = load ptr, ptr %61, align 8, !tbaa !28
  store ptr %62, ptr %4, align 8, !tbaa !5
  br label %63

63:                                               ; preds = %70, %56
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.facetT, ptr %64, i32 0, i32 15
  %66 = load i32, ptr %65, align 8
  %67 = lshr i32 %66, 11
  %68 = and i32 %67, 1
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %74

70:                                               ; preds = %63
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.facetT, ptr %71, i32 0, i32 4
  %73 = load ptr, ptr %72, align 8, !tbaa !15
  store ptr %73, ptr %3, align 8, !tbaa !5
  br label %63, !llvm.loop !29

74:                                               ; preds = %63
  br label %75

75:                                               ; preds = %82, %74
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.facetT, ptr %76, i32 0, i32 15
  %78 = load i32, ptr %77, align 8
  %79 = lshr i32 %78, 11
  %80 = and i32 %79, 1
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %86

82:                                               ; preds = %75
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.facetT, ptr %83, i32 0, i32 4
  %85 = load ptr, ptr %84, align 8, !tbaa !15
  store ptr %85, ptr %4, align 8, !tbaa !5
  br label %75, !llvm.loop !30

86:                                               ; preds = %75
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = icmp eq ptr %87, %88
  br i1 %89, label %90, label %91

90:                                               ; preds = %86
  br label %38, !llvm.loop !25

91:                                               ; preds = %86
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.facetT, ptr %92, i32 0, i32 10
  %94 = load ptr, ptr %93, align 8, !tbaa !31
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = call i32 @qh_setin(ptr noundef %94, ptr noundef %95)
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %118, label %98

98:                                               ; preds = %91
  %99 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !20
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.mergeT, ptr %100, i32 0, i32 1
  %102 = load ptr, ptr %101, align 8, !tbaa !27
  %103 = getelementptr inbounds %struct.facetT, ptr %102, i32 0, i32 14
  %104 = load i32, ptr %103, align 4, !tbaa !33
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.mergeT, ptr %105, i32 0, i32 2
  %107 = load ptr, ptr %106, align 8, !tbaa !28
  %108 = getelementptr inbounds %struct.facetT, ptr %107, i32 0, i32 14
  %109 = load i32, ptr %108, align 4, !tbaa !33
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.facetT, ptr %110, i32 0, i32 14
  %112 = load i32, ptr %111, align 4, !tbaa !33
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.facetT, ptr %113, i32 0, i32 14
  %115 = load i32, ptr %114, align 4, !tbaa !33
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %99, i32 noundef 6096, ptr noundef @.str.38, i32 noundef %104, i32 noundef %109, i32 noundef %112, i32 noundef %115)
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  call void @qh_errexit2(i32 noundef 5, ptr noundef %116, ptr noundef %117)
  br label %118

118:                                              ; preds = %98, %91
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = call double @qh_getdistance(ptr noundef %119, ptr noundef %120, ptr noundef %9, ptr noundef %11)
  store double %121, ptr %7, align 8, !tbaa !34
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = call double @qh_getdistance(ptr noundef %122, ptr noundef %123, ptr noundef %10, ptr noundef %12)
  store double %124, ptr %8, align 8, !tbaa !34
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = load double, ptr %7, align 8, !tbaa !34
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = load double, ptr %8, align 8, !tbaa !34
  call void @qh_check_dupridge(ptr noundef %125, double noundef %126, ptr noundef %127, double noundef %128)
  %129 = load double, ptr %7, align 8, !tbaa !34
  %130 = load double, ptr %8, align 8, !tbaa !34
  %131 = fcmp olt double %129, %130
  br i1 %131, label %132, label %135

132:                                              ; preds = %118
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  call void @qh_mergefacet(ptr noundef %133, ptr noundef %134, ptr noundef %9, ptr noundef %11, i32 noundef 0)
  br label %140

135:                                              ; preds = %118
  %136 = load ptr, ptr %4, align 8, !tbaa !5
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  call void @qh_mergefacet(ptr noundef %136, ptr noundef %137, ptr noundef %10, ptr noundef %12, i32 noundef 0)
  %138 = load double, ptr %8, align 8, !tbaa !34
  store double %138, ptr %7, align 8, !tbaa !34
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %139, ptr %3, align 8, !tbaa !5
  br label %140

140:                                              ; preds = %135, %132
  %141 = load ptr, ptr %3, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.facetT, ptr %141, i32 0, i32 15
  %143 = load i32, ptr %142, align 8
  %144 = lshr i32 %143, 16
  %145 = and i32 %144, 1
  %146 = icmp ne i32 %145, 0
  br i1 %146, label %147, label %152

147:                                              ; preds = %140
  %148 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 121), align 8, !tbaa !15
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 121), align 8, !tbaa !15
  %150 = load i32, ptr %15, align 4, !tbaa !9
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %15, align 4, !tbaa !9
  br label %155

152:                                              ; preds = %140
  %153 = load i32, ptr %14, align 4, !tbaa !9
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %14, align 4, !tbaa !9
  br label %155

155:                                              ; preds = %152, %147
  %156 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 61), align 4, !tbaa !35
  %157 = icmp ne i32 %156, 0
  br i1 %157, label %158, label %170

158:                                              ; preds = %155
  %159 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 75), align 8, !tbaa !15
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 75), align 8, !tbaa !15
  %161 = load double, ptr %7, align 8, !tbaa !34
  %162 = load double, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 77), align 8, !tbaa !15
  %163 = fadd double %162, %161
  store double %163, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 77), align 8, !tbaa !15
  %164 = load double, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 76), align 8, !tbaa !15
  %165 = load double, ptr %7, align 8, !tbaa !34
  %166 = fcmp olt double %164, %165
  br i1 %166, label %167, label %169

167:                                              ; preds = %158
  %168 = load double, ptr %7, align 8, !tbaa !34
  store double %168, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 76), align 8, !tbaa !15
  br label %169

169:                                              ; preds = %167, %158
  br label %170

170:                                              ; preds = %169, %155
  br label %38, !llvm.loop !25

171:                                              ; preds = %38
  br label %172

172:                                              ; preds = %171, %27
  store ptr null, ptr %5, align 8, !tbaa !5
  %173 = load ptr, ptr %13, align 8, !tbaa !5
  %174 = icmp ne ptr %173, null
  br i1 %174, label %175, label %195

175:                                              ; preds = %172
  %176 = load ptr, ptr %13, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.setT, ptr %176, i32 0, i32 1
  %178 = getelementptr inbounds [1 x %union.setelemT], ptr %177, i64 0, i64 0
  store ptr %178, ptr %6, align 8, !tbaa !5
  br label %179

179:                                              ; preds = %193, %175
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = getelementptr inbounds ptr, ptr %180, i32 1
  store ptr %181, ptr %6, align 8, !tbaa !5
  %182 = load ptr, ptr %180, align 8, !tbaa !5
  store ptr %182, ptr %5, align 8, !tbaa !5
  %183 = icmp ne ptr %182, null
  br i1 %183, label %184, label %194

184:                                              ; preds = %179
  %185 = load ptr, ptr %5, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.mergeT, ptr %185, i32 0, i32 3
  %187 = load i32, ptr %186, align 8, !tbaa !23
  %188 = icmp eq i32 %187, 5
  br i1 %188, label %189, label %191

189:                                              ; preds = %184
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_memfree(ptr noundef %190, i32 noundef 32)
  br label %193

191:                                              ; preds = %184
  %192 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_setappend(ptr noundef getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 205), ptr noundef %192)
  br label %193

193:                                              ; preds = %191, %189
  br label %179, !llvm.loop !36

194:                                              ; preds = %179
  br label %195

195:                                              ; preds = %194, %172
  call void @qh_settempfree(ptr noundef %13)
  %196 = load i32, ptr %14, align 4, !tbaa !9
  %197 = icmp ne i32 %196, 0
  br i1 %197, label %198, label %200

198:                                              ; preds = %195
  %199 = load ptr, ptr %2, align 8, !tbaa !5
  store i32 1, ptr %199, align 4, !tbaa !9
  br label %200

200:                                              ; preds = %198, %195
  %201 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !17
  %202 = icmp sge i32 %201, 1
  br i1 %202, label %203, label %207

203:                                              ; preds = %200
  %204 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !20
  %205 = load i32, ptr %14, align 4, !tbaa !9
  %206 = load i32, ptr %15, align 4, !tbaa !9
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %204, i32 noundef 1011, ptr noundef @.str.39, i32 noundef %205, i32 noundef %206)
  br label %207

207:                                              ; preds = %203, %200
  call void @llvm.lifetime.end.p0(i64 4, 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 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  ret void
}

declare void @qh_settempfree(ptr noundef) #1

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

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

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

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

declare double @qh_getdistance(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare ptr @qh_settemppop() #1

declare void @qh_settemppush(ptr noundef) #1

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

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

declare void @qh_check_dupridge(ptr noundef, double noundef, ptr noundef, double 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 552}
!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 = !{!7, !7, i64 0}
!16 = !{!12, !10, i64 532}
!17 = !{!12, !10, i64 128}
!18 = !{!19, !10, i64 88}
!19 = !{!"qhmemT", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144}
!20 = !{!12, !6, i64 2408}
!21 = !{!12, !10, i64 2432}
!22 = !{!12, !6, i64 2728}
!23 = !{!24, !10, i64 24}
!24 = !{!"mergeT", !13, i64 0, !6, i64 8, !6, i64 16, !10, i64 24}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!24, !6, i64 8}
!28 = !{!24, !6, i64 16}
!29 = distinct !{!29, !26}
!30 = distinct !{!30, !26}
!31 = !{!32, !6, i64 80}
!32 = !{!"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}
!33 = !{!32, !10, i64 108}
!34 = !{!13, !13, i64 0}
!35 = !{!12, !10, i64 420}
!36 = distinct !{!36, !26}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@qh_qh = external global %struct.qhT, align 8
@qh_qhstat = external local_unnamed_addr global %struct.qhstatT, align 8
@qhmem = external local_unnamed_addr global %struct.qhmemT, align 8
@.str.37 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [123 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [82 x i8], align 1

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

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

declare ptr @qh_settemp(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @qh_forcedmerges(ptr nocapture noundef writeonly %0) local_unnamed_addr #2 {
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  %7 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 552), align 8, !tbaa !5
  %8 = add nsw i32 %7, -1
  %9 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1592), align 8, !tbaa !13
  %10 = icmp eq i32 %8, %9
  br i1 %10, label %11, label %thread-pre-split

11:                                               ; preds = %1
  %12 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 532), align 4, !tbaa !14
  store i32 %12, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !15
  store i32 %12, ptr getelementptr inbounds (i8, ptr @qhmem, i64 88), align 8, !tbaa !16
  br label %13

thread-pre-split:                                 ; preds = %1
  %.pr = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !15
  br label %13

13:                                               ; preds = %thread-pre-split, %11
  %14 = phi i32 [ %.pr, %thread-pre-split ], [ %12, %11 ]
  %15 = icmp sgt i32 %14, 3
  br i1 %15, label %16, label %18

16:                                               ; preds = %13
  %17 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !18
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %17, i32 noundef 4025, ptr noundef nonnull @.str.37) #3
  br label %18

18:                                               ; preds = %16, %13
  %19 = tail call ptr @qh_settemppop() #3
  store ptr %19, ptr %6, align 8, !tbaa !19
  %20 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2432), align 8, !tbaa !20
  %21 = tail call ptr @qh_settemp(i32 noundef %20) #3
  store ptr %21, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2728), align 8, !tbaa !21
  tail call void @qh_settemppush(ptr noundef %19) #3
  %.not = icmp eq ptr %19, null
  br i1 %.not, label %.thread79, label %22

.thread79:                                        ; preds = %18
  call void @qh_settempfree(ptr noundef nonnull %6) #3
  br label %135

22:                                               ; preds = %18
  %23 = getelementptr inbounds i8, ptr %19, i64 8
  %24 = load ptr, ptr %23, align 8, !tbaa !19
  %.not6291104 = icmp eq ptr %24, null
  br i1 %.not6291104, label %.outer._crit_edge, label %.lr.ph92.preheader

.lr.ph92.preheader:                               ; preds = %22
  %25 = getelementptr inbounds i8, ptr %19, i64 16
  br label %.lr.ph92

.lr.ph92:                                         ; preds = %.lr.ph92.preheader, %.outer
  %26 = phi ptr [ %124, %.outer ], [ %24, %.lr.ph92.preheader ]
  %27 = phi ptr [ %123, %.outer ], [ %25, %.lr.ph92.preheader ]
  %.0.ph106 = phi i32 [ %.1, %.outer ], [ 0, %.lr.ph92.preheader ]
  %.047.ph105 = phi i32 [ %.148, %.outer ], [ 0, %.lr.ph92.preheader ]
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 552), align 8
  %29 = add nsw i32 %28, -1
  %30 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1592), align 8
  %31 = icmp eq i32 %29, %30
  %32 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 532), align 4
  %.fr = freeze i1 %31
  br i1 %.fr, label %.lr.ph92.split.us, label %.lr.ph92.split

.lr.ph92.split.us:                                ; preds = %.lr.ph92, %.backedge.us
  %33 = phi ptr [ %56, %.backedge.us ], [ %26, %.lr.ph92 ]
  %34 = phi ptr [ %55, %.backedge.us ], [ %27, %.lr.ph92 ]
  %35 = getelementptr inbounds i8, ptr %33, i64 24
  %36 = load i32, ptr %35, align 8, !tbaa !22
  %.not66.us = icmp eq i32 %36, 5
  br i1 %.not66.us, label %37, label %.backedge.us

37:                                               ; preds = %.lr.ph92.split.us
  store i32 %32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !15
  store i32 %32, ptr getelementptr inbounds (i8, ptr @qhmem, i64 88), align 8, !tbaa !16
  %38 = getelementptr inbounds i8, ptr %33, i64 8
  %39 = getelementptr inbounds i8, ptr %33, i64 16
  %40 = load ptr, ptr %39, align 8, !tbaa !24
  br label %41

41:                                               ; preds = %41, %37
  %.050.in.us = phi ptr [ %38, %37 ], [ %45, %41 ]
  %.050.us = load ptr, ptr %.050.in.us, align 8, !tbaa !13
  %42 = getelementptr inbounds i8, ptr %.050.us, i64 112
  %43 = load i32, ptr %42, align 8
  %44 = and i32 %43, 2048
  %.not67.us = icmp eq i32 %44, 0
  %45 = getelementptr inbounds i8, ptr %.050.us, i64 32
  br i1 %.not67.us, label %.preheader85.us, label %41, !llvm.loop !25

.lr.ph.us:                                        ; preds = %.preheader85.us, %.lr.ph.us
  %.05590.us = phi ptr [ %47, %.lr.ph.us ], [ %40, %.preheader85.us ]
  %46 = getelementptr inbounds i8, ptr %.05590.us, i64 32
  %47 = load ptr, ptr %46, align 8, !tbaa !13
  %48 = getelementptr inbounds i8, ptr %47, i64 112
  %49 = load i32, ptr %48, align 8
  %50 = and i32 %49, 2048
  %.not68.us = icmp eq i32 %50, 0
  br i1 %.not68.us, label %._crit_edge.us, label %.lr.ph.us, !llvm.loop !27

._crit_edge.us:                                   ; preds = %.lr.ph.us, %.preheader85.us
  %.055.lcssa.us = phi ptr [ %40, %.preheader85.us ], [ %47, %.lr.ph.us ]
  %51 = icmp eq ptr %.050.us, %.055.lcssa.us
  br i1 %51, label %.backedge.us, label %.split.us

.preheader85.us:                                  ; preds = %41
  %52 = getelementptr inbounds i8, ptr %40, i64 112
  %53 = load i32, ptr %52, align 8
  %54 = and i32 %53, 2048
  %.not6889.us = icmp eq i32 %54, 0
  br i1 %.not6889.us, label %._crit_edge.us, label %.lr.ph.us

.backedge.us:                                     ; preds = %._crit_edge.us, %.lr.ph92.split.us
  %55 = getelementptr inbounds i8, ptr %34, i64 8
  %56 = load ptr, ptr %34, align 8, !tbaa !19
  %.not62.us = icmp eq ptr %56, null
  br i1 %.not62.us, label %.outer._crit_edge, label %.lr.ph92.split.us, !llvm.loop !28

.lr.ph92.split:                                   ; preds = %.lr.ph92, %.backedge
  %57 = phi ptr [ %62, %.backedge ], [ %26, %.lr.ph92 ]
  %58 = phi ptr [ %61, %.backedge ], [ %27, %.lr.ph92 ]
  %59 = getelementptr inbounds i8, ptr %57, i64 24
  %60 = load i32, ptr %59, align 8, !tbaa !22
  %.not66 = icmp eq i32 %60, 5
  br i1 %.not66, label %63, label %.backedge

.backedge:                                        ; preds = %.lr.ph92.split, %._crit_edge
  %61 = getelementptr inbounds i8, ptr %58, i64 8
  %62 = load ptr, ptr %58, align 8, !tbaa !19
  %.not62 = icmp eq ptr %62, null
  br i1 %.not62, label %.outer._crit_edge, label %.lr.ph92.split, !llvm.loop !28

63:                                               ; preds = %.lr.ph92.split
  %64 = getelementptr inbounds i8, ptr %57, i64 8
  %65 = getelementptr inbounds i8, ptr %57, i64 16
  %66 = load ptr, ptr %65, align 8, !tbaa !24
  br label %67

67:                                               ; preds = %67, %63
  %.050.in = phi ptr [ %64, %63 ], [ %71, %67 ]
  %.050 = load ptr, ptr %.050.in, align 8, !tbaa !13
  %68 = getelementptr inbounds i8, ptr %.050, i64 112
  %69 = load i32, ptr %68, align 8
  %70 = and i32 %69, 2048
  %.not67 = icmp eq i32 %70, 0
  %71 = getelementptr inbounds i8, ptr %.050, i64 32
  br i1 %.not67, label %.preheader85, label %67, !llvm.loop !25

.preheader85:                                     ; preds = %67
  %72 = getelementptr inbounds i8, ptr %66, i64 112
  %73 = load i32, ptr %72, align 8
  %74 = and i32 %73, 2048
  %.not6889 = icmp eq i32 %74, 0
  br i1 %.not6889, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader85, %.lr.ph
  %.05590 = phi ptr [ %76, %.lr.ph ], [ %66, %.preheader85 ]
  %75 = getelementptr inbounds i8, ptr %.05590, i64 32
  %76 = load ptr, ptr %75, align 8, !tbaa !13
  %77 = getelementptr inbounds i8, ptr %76, i64 112
  %78 = load i32, ptr %77, align 8
  %79 = and i32 %78, 2048
  %.not68 = icmp eq i32 %79, 0
  br i1 %.not68, label %._crit_edge, label %.lr.ph, !llvm.loop !27

._crit_edge:                                      ; preds = %.lr.ph, %.preheader85
  %.055.lcssa = phi ptr [ %66, %.preheader85 ], [ %76, %.lr.ph ]
  %80 = icmp eq ptr %.050, %.055.lcssa
  br i1 %80, label %.backedge, label %.split.us

.split.us:                                        ; preds = %._crit_edge, %._crit_edge.us
  %.us-phi = phi ptr [ %33, %._crit_edge.us ], [ %57, %._crit_edge ]
  %.us-phi98 = phi ptr [ %38, %._crit_edge.us ], [ %64, %._crit_edge ]
  %.us-phi99 = phi ptr [ %34, %._crit_edge.us ], [ %58, %._crit_edge ]
  %.us-phi100 = phi ptr [ %.055.lcssa.us, %._crit_edge.us ], [ %.055.lcssa, %._crit_edge ]
  %.us-phi101 = phi ptr [ %.050.us, %._crit_edge.us ], [ %.050, %._crit_edge ]
  %81 = getelementptr inbounds i8, ptr %.us-phi100, i64 80
  %82 = load ptr, ptr %81, align 8, !tbaa !29
  %83 = call i32 @qh_setin(ptr noundef %82, ptr noundef %.us-phi101) #3
  %.not69 = icmp eq i32 %83, 0
  br i1 %.not69, label %84, label %97

84:                                               ; preds = %.split.us
  %85 = getelementptr inbounds i8, ptr %.us-phi, i64 16
  %86 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !18
  %87 = load ptr, ptr %.us-phi98, align 8, !tbaa !31
  %88 = getelementptr inbounds i8, ptr %87, i64 108
  %89 = load i32, ptr %88, align 4, !tbaa !32
  %90 = load ptr, ptr %85, align 8, !tbaa !24
  %91 = getelementptr inbounds i8, ptr %90, i64 108
  %92 = load i32, ptr %91, align 4, !tbaa !32
  %93 = getelementptr inbounds i8, ptr %.us-phi101, i64 108
  %94 = load i32, ptr %93, align 4, !tbaa !32
  %95 = getelementptr inbounds i8, ptr %.us-phi100, i64 108
  %96 = load i32, ptr %95, align 4, !tbaa !32
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %86, i32 noundef 6096, ptr noundef nonnull @.str.38, i32 noundef %89, i32 noundef %92, i32 noundef %94, i32 noundef %96) #3
  call void @qh_errexit2(i32 noundef 5, ptr noundef %.us-phi101, ptr noundef nonnull %.us-phi100) #3
  br label %97

97:                                               ; preds = %84, %.split.us
  %98 = call double @qh_getdistance(ptr noundef %.us-phi101, ptr noundef nonnull %.us-phi100, ptr noundef nonnull %2, ptr noundef nonnull %4) #3
  %99 = call double @qh_getdistance(ptr noundef nonnull %.us-phi100, ptr noundef %.us-phi101, ptr noundef nonnull %3, ptr noundef nonnull %5) #3
  call void @qh_check_dupridge(ptr noundef %.us-phi101, double noundef %98, ptr noundef nonnull %.us-phi100, double noundef %99) #3
  %100 = fcmp olt double %98, %99
  br i1 %100, label %101, label %102

101:                                              ; preds = %97
  call void @qh_mergefacet(ptr noundef %.us-phi101, ptr noundef nonnull %.us-phi100, ptr noundef nonnull %2, ptr noundef nonnull %4, i32 noundef 0)
  br label %103

102:                                              ; preds = %97
  call void @qh_mergefacet(ptr noundef nonnull %.us-phi100, ptr noundef %.us-phi101, ptr noundef nonnull %3, ptr noundef nonnull %5, i32 noundef 0)
  br label %103

103:                                              ; preds = %102, %101
  %.052 = phi double [ %98, %101 ], [ %99, %102 ]
  %.151 = phi ptr [ %.us-phi101, %101 ], [ %.us-phi100, %102 ]
  %104 = getelementptr inbounds i8, ptr %.151, i64 112
  %105 = load i32, ptr %104, align 8
  %106 = and i32 %105, 65536
  %.not70 = icmp eq i32 %106, 0
  br i1 %.not70, label %111, label %107

107:                                              ; preds = %103
  %108 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 968), align 8, !tbaa !13
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 968), align 8, !tbaa !13
  %110 = add nsw i32 %.0.ph106, 1
  br label %113

111:                                              ; preds = %103
  %112 = add nsw i32 %.047.ph105, 1
  br label %113

113:                                              ; preds = %111, %107
  %.148 = phi i32 [ %.047.ph105, %107 ], [ %112, %111 ]
  %.1 = phi i32 [ %110, %107 ], [ %.0.ph106, %111 ]
  %114 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 420), align 4, !tbaa !33
  %.not71 = icmp eq i32 %114, 0
  br i1 %.not71, label %.outer, label %115

115:                                              ; preds = %113
  %116 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 600), align 8, !tbaa !13
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 600), align 8, !tbaa !13
  %118 = load double, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 616), align 8, !tbaa !13
  %119 = fadd double %.052, %118
  store double %119, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 616), align 8, !tbaa !13
  %120 = load double, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 608), align 8, !tbaa !13
  %121 = fcmp olt double %120, %.052
  br i1 %121, label %122, label %.outer

122:                                              ; preds = %115
  store double %.052, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 608), align 8, !tbaa !13
  br label %.outer

.outer:                                           ; preds = %115, %122, %113
  %123 = getelementptr inbounds i8, ptr %.us-phi99, i64 8
  %124 = load ptr, ptr %.us-phi99, align 8, !tbaa !19
  %.not6291 = icmp eq ptr %124, null
  br i1 %.not6291, label %.outer._crit_edge, label %.lr.ph92, !llvm.loop !28

.outer._crit_edge:                                ; preds = %.outer, %.backedge, %.backedge.us, %22
  %.047.ph.lcssa = phi i32 [ 0, %22 ], [ %.047.ph105, %.backedge.us ], [ %.047.ph105, %.backedge ], [ %.148, %.outer ]
  %.0.ph.lcssa = phi i32 [ 0, %22 ], [ %.0.ph106, %.backedge.us ], [ %.0.ph106, %.backedge ], [ %.1, %.outer ]
  %.pr73 = load ptr, ptr %6, align 8, !tbaa !19
  %.not63 = icmp eq ptr %.pr73, null
  br i1 %.not63, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %.outer._crit_edge
  %.154109 = getelementptr inbounds i8, ptr %.pr73, i64 8
  %125 = load ptr, ptr %.154109, align 8, !tbaa !19
  %.not64110 = icmp eq ptr %125, null
  br i1 %.not64110, label %.loopexit, label %.lr.ph112

.lr.ph112:                                        ; preds = %.preheader, %132
  %126 = phi ptr [ %133, %132 ], [ %125, %.preheader ]
  %.154111 = phi ptr [ %.154, %132 ], [ %.154109, %.preheader ]
  %127 = getelementptr inbounds i8, ptr %126, i64 24
  %128 = load i32, ptr %127, align 8, !tbaa !22
  %129 = icmp eq i32 %128, 5
  br i1 %129, label %130, label %131

130:                                              ; preds = %.lr.ph112
  call void @qh_memfree(ptr noundef nonnull %126, i32 noundef 32) #3
  br label %132

131:                                              ; preds = %.lr.ph112
  call void @qh_setappend(ptr noundef nonnull getelementptr inbounds (i8, ptr @qh_qh, i64 2728), ptr noundef nonnull %126) #3
  br label %132

132:                                              ; preds = %131, %130
  %.154 = getelementptr inbounds i8, ptr %.154111, i64 8
  %133 = load ptr, ptr %.154, align 8, !tbaa !19
  %.not64 = icmp eq ptr %133, null
  br i1 %.not64, label %.loopexit, label %.lr.ph112, !llvm.loop !34

.loopexit:                                        ; preds = %132, %.preheader, %.outer._crit_edge
  call void @qh_settempfree(ptr noundef nonnull %6) #3
  %.not65 = icmp eq i32 %.047.ph.lcssa, 0
  br i1 %.not65, label %135, label %134

134:                                              ; preds = %.loopexit
  store i32 1, ptr %0, align 4, !tbaa !35
  br label %135

135:                                              ; preds = %.thread79, %134, %.loopexit
  %.2497784 = phi i32 [ 0, %.thread79 ], [ %.047.ph.lcssa, %134 ], [ 0, %.loopexit ]
  %.27883 = phi i32 [ 0, %.thread79 ], [ %.0.ph.lcssa, %134 ], [ %.0.ph.lcssa, %.loopexit ]
  %136 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !15
  %137 = icmp sgt i32 %136, 0
  br i1 %137, label %138, label %140

138:                                              ; preds = %135
  %139 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !18
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %139, i32 noundef 1011, ptr noundef nonnull @.str.39, i32 noundef %.2497784, i32 noundef %.27883) #3
  br label %140

140:                                              ; preds = %138, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  ret void
}

declare void @qh_settempfree(ptr noundef) local_unnamed_addr #1

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

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

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

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

declare double @qh_getdistance(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @qh_settemppop() local_unnamed_addr #1

declare void @qh_settemppush(ptr noundef) local_unnamed_addr #1

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 552}
!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 = !{!8, !8, i64 0}
!14 = !{!6, !7, i64 532}
!15 = !{!6, !7, i64 128}
!16 = !{!17, !7, i64 88}
!17 = !{!"qhmemT", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !7, i64 64, !11, i64 72, !11, i64 80, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144}
!18 = !{!6, !11, i64 2408}
!19 = !{!11, !11, i64 0}
!20 = !{!6, !7, i64 2432}
!21 = !{!6, !11, i64 2728}
!22 = !{!23, !7, i64 24}
!23 = !{!"mergeT", !10, i64 0, !11, i64 8, !11, i64 16, !7, i64 24}
!24 = !{!23, !11, i64 16}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}
!28 = distinct !{!28, !26}
!29 = !{!30, !11, i64 80}
!30 = !{!"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}
!31 = !{!23, !11, i64 8}
!32 = !{!30, !7, i64 108}
!33 = !{!6, !7, i64 420}
!34 = distinct !{!34, !26}
!35 = !{!7, !7, i64 0}


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