; 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.vertexT = type { ptr, ptr, ptr, ptr, i32, i32, i8 }
%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
@qh_qhstat = external global %struct.qhstatT, align 8
@.str.24 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [81 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 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 i32 @qh_setsize(ptr noundef) #1

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

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

19:                                               ; preds = %3
  %20 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !14
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.vertexT, ptr %21, i32 0, i32 4
  %23 = load i32, ptr %22, align 8, !tbaa !15
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %20, i32 noundef 8063, ptr noundef @.str.24, i32 noundef %23)
  store ptr null, ptr %8, align 8, !tbaa !5
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %41

26:                                               ; preds = %19
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.setT, ptr %27, i32 0, i32 1
  %29 = getelementptr inbounds [1 x %union.setelemT], ptr %28, i64 0, i64 0
  store ptr %29, ptr %9, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %35, %26
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = getelementptr inbounds ptr, ptr %31, i32 1
  store ptr %32, ptr %9, align 8, !tbaa !5
  %33 = load ptr, ptr %31, align 8, !tbaa !5
  store ptr %33, ptr %8, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %35, label %40

35:                                               ; preds = %30
  %36 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !14
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.vertexT, ptr %37, i32 0, i32 4
  %39 = load i32, ptr %38, align 8, !tbaa !15
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %36, i32 noundef 8064, ptr noundef @.str.25, i32 noundef %39)
  br label %30, !llvm.loop !17

40:                                               ; preds = %30
  br label %41

41:                                               ; preds = %40, %19
  store ptr null, ptr %11, align 8, !tbaa !5
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = icmp ne ptr %42, null
  br i1 %43, label %44, label %59

44:                                               ; preds = %41
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.setT, ptr %45, i32 0, i32 1
  %47 = getelementptr inbounds [1 x %union.setelemT], ptr %46, i64 0, i64 0
  store ptr %47, ptr %12, align 8, !tbaa !5
  br label %48

48:                                               ; preds = %53, %44
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = getelementptr inbounds ptr, ptr %49, i32 1
  store ptr %50, ptr %12, align 8, !tbaa !5
  %51 = load ptr, ptr %49, align 8, !tbaa !5
  store ptr %51, ptr %11, align 8, !tbaa !5
  %52 = icmp ne ptr %51, null
  br i1 %52, label %53, label %58

53:                                               ; preds = %48
  %54 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !14
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.ridgeT, ptr %55, i32 0, i32 3
  %57 = load i32, ptr %56, align 8, !tbaa !19
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %54, i32 noundef 8065, ptr noundef @.str.26, i32 noundef %57)
  br label %48, !llvm.loop !21

58:                                               ; preds = %48
  br label %59

59:                                               ; preds = %58, %41
  %60 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !14
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %60, i32 noundef 8066, ptr noundef @.str.27)
  br label %61

61:                                               ; preds = %59, %3
  store ptr null, ptr %8, align 8, !tbaa !5
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = icmp ne ptr %62, null
  br i1 %63, label %64, label %77

64:                                               ; preds = %61
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.setT, ptr %65, i32 0, i32 1
  %67 = getelementptr inbounds [1 x %union.setelemT], ptr %66, i64 0, i64 0
  store ptr %67, ptr %9, align 8, !tbaa !5
  br label %68

68:                                               ; preds = %73, %64
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = getelementptr inbounds ptr, ptr %69, i32 1
  store ptr %70, ptr %9, align 8, !tbaa !5
  %71 = load ptr, ptr %69, align 8, !tbaa !5
  store ptr %71, ptr %8, align 8, !tbaa !5
  %72 = icmp ne ptr %71, null
  br i1 %72, label %73, label %76

73:                                               ; preds = %68
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.vertexT, ptr %74, i32 0, i32 5
  store i32 0, ptr %75, align 4, !tbaa !22
  br label %68, !llvm.loop !23

76:                                               ; preds = %68
  br label %77

77:                                               ; preds = %76, %61
  store ptr null, ptr %11, align 8, !tbaa !5
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %113

80:                                               ; preds = %77
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.setT, ptr %81, i32 0, i32 1
  %83 = getelementptr inbounds [1 x %union.setelemT], ptr %82, i64 0, i64 0
  store ptr %83, ptr %12, align 8, !tbaa !5
  br label %84

84:                                               ; preds = %111, %80
  %85 = load ptr, ptr %12, align 8, !tbaa !5
  %86 = getelementptr inbounds ptr, ptr %85, i32 1
  store ptr %86, ptr %12, align 8, !tbaa !5
  %87 = load ptr, ptr %85, align 8, !tbaa !5
  store ptr %87, ptr %11, align 8, !tbaa !5
  %88 = icmp ne ptr %87, null
  br i1 %88, label %89, label %112

89:                                               ; preds = %84
  store ptr null, ptr %8, align 8, !tbaa !5
  %90 = load ptr, ptr %11, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.ridgeT, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !24
  %93 = icmp ne ptr %92, null
  br i1 %93, label %94, label %111

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

100:                                              ; preds = %105, %94
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = getelementptr inbounds ptr, ptr %101, i32 1
  store ptr %102, ptr %9, align 8, !tbaa !5
  %103 = load ptr, ptr %101, align 8, !tbaa !5
  store ptr %103, ptr %8, align 8, !tbaa !5
  %104 = icmp ne ptr %103, null
  br i1 %104, label %105, label %110

105:                                              ; preds = %100
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.vertexT, ptr %106, i32 0, i32 5
  %108 = load i32, ptr %107, align 4, !tbaa !22
  %109 = add i32 %108, 1
  store i32 %109, ptr %107, align 4, !tbaa !22
  br label %100, !llvm.loop !25

110:                                              ; preds = %100
  br label %111

111:                                              ; preds = %110, %89
  br label %84, !llvm.loop !26

112:                                              ; preds = %84
  br label %113

113:                                              ; preds = %112, %77
  store ptr null, ptr %8, align 8, !tbaa !5
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = icmp ne ptr %114, null
  br i1 %115, label %116, label %146

116:                                              ; preds = %113
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.setT, ptr %117, i32 0, i32 1
  %119 = getelementptr inbounds [1 x %union.setelemT], ptr %118, i64 0, i64 0
  store ptr %119, ptr %9, align 8, !tbaa !5
  br label %120

120:                                              ; preds = %144, %116
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds ptr, ptr %121, i32 1
  store ptr %122, ptr %9, align 8, !tbaa !5
  %123 = load ptr, ptr %121, align 8, !tbaa !5
  store ptr %123, ptr %8, align 8, !tbaa !5
  %124 = icmp ne ptr %123, null
  br i1 %124, label %125, label %145

125:                                              ; preds = %120
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.vertexT, ptr %126, i32 0, i32 5
  %128 = load i32, ptr %127, align 4, !tbaa !22
  %129 = icmp ne i32 %128, 0
  br i1 %129, label %144, label %130

130:                                              ; preds = %125
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.setT, ptr %133, i32 0, i32 1
  %135 = getelementptr inbounds [1 x %union.setelemT], ptr %134, i64 0, i64 1
  %136 = ptrtoint ptr %132 to i64
  %137 = ptrtoint ptr %135 to i64
  %138 = sub i64 %136, %137
  %139 = sdiv exact i64 %138, 8
  %140 = trunc i64 %139 to i32
  %141 = call ptr @qh_setdelnth(ptr noundef %131, i32 noundef %140)
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = getelementptr inbounds ptr, ptr %142, i32 -1
  store ptr %143, ptr %9, align 8, !tbaa !5
  br label %144

144:                                              ; preds = %130, %125
  br label %120, !llvm.loop !27

145:                                              ; preds = %120
  br label %146

146:                                              ; preds = %145, %113
  %147 = load ptr, ptr %7, align 8, !tbaa !5
  %148 = call i32 @qh_setsize(ptr noundef %147)
  %149 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 202), align 4, !tbaa !28
  %150 = add i32 %149, %148
  store i32 %150, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 202), align 4, !tbaa !28
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = call i32 @qh_setsize(ptr noundef %151)
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %163, label %154

154:                                              ; preds = %146
  %155 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !9
  %156 = icmp sge i32 %155, 4
  br i1 %156, label %157, label %162

157:                                              ; preds = %154
  %158 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !14
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.vertexT, ptr %159, i32 0, i32 4
  %161 = load i32, ptr %160, align 8, !tbaa !15
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %158, i32 noundef 4023, ptr noundef @.str.28, i32 noundef %161)
  br label %162

162:                                              ; preds = %157, %154
  store ptr null, ptr %4, align 8
  store i32 1, ptr %16, align 4
  br label %285

163:                                              ; preds = %146
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.setT, ptr %164, i32 0, i32 1
  %166 = getelementptr inbounds [1 x %union.setelemT], ptr %165, i64 0, i64 0
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = call i32 @qh_setsize(ptr noundef %167)
  %169 = sext i32 %168 to i64
  call void @qsort(ptr noundef %166, i64 noundef %169, i64 noundef 8, ptr noundef @qh_comparevisit)
  %170 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 61), align 4, !tbaa !29
  %171 = icmp ne i32 %170, 0
  br i1 %171, label %172, label %186

172:                                              ; preds = %163
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  %174 = call i32 @qh_setsize(ptr noundef %173)
  store i32 %174, ptr %13, align 4, !tbaa !30
  %175 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 105), align 8, !tbaa !31
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 105), align 8, !tbaa !31
  %177 = load i32, ptr %13, align 4, !tbaa !30
  %178 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 109), align 8, !tbaa !31
  %179 = add nsw i32 %178, %177
  store i32 %179, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 109), align 8, !tbaa !31
  %180 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 107), align 8, !tbaa !31
  %181 = load i32, ptr %13, align 4, !tbaa !30
  %182 = icmp slt i32 %180, %181
  br i1 %182, label %183, label %185

183:                                              ; preds = %172
  %184 = load i32, ptr %13, align 4, !tbaa !30
  store i32 %184, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 107), align 8, !tbaa !31
  br label %185

185:                                              ; preds = %183, %172
  br label %186

186:                                              ; preds = %185, %163
  %187 = load ptr, ptr %7, align 8, !tbaa !5
  %188 = call i32 @qh_setsize(ptr noundef %187)
  %189 = call i32 @qh_newhashtable(i32 noundef %188)
  store i32 %189, ptr %14, align 4, !tbaa !30
  store ptr null, ptr %11, align 8, !tbaa !5
  %190 = load ptr, ptr %7, align 8, !tbaa !5
  %191 = icmp ne ptr %190, null
  br i1 %191, label %192, label %207

192:                                              ; preds = %186
  %193 = load ptr, ptr %7, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.setT, ptr %193, i32 0, i32 1
  %195 = getelementptr inbounds [1 x %union.setelemT], ptr %194, i64 0, i64 0
  store ptr %195, ptr %12, align 8, !tbaa !5
  br label %196

196:                                              ; preds = %201, %192
  %197 = load ptr, ptr %12, align 8, !tbaa !5
  %198 = getelementptr inbounds ptr, ptr %197, i32 1
  store ptr %198, ptr %12, align 8, !tbaa !5
  %199 = load ptr, ptr %197, align 8, !tbaa !5
  store ptr %199, ptr %11, align 8, !tbaa !5
  %200 = icmp ne ptr %199, null
  br i1 %200, label %201, label %206

201:                                              ; preds = %196
  %202 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 207), align 8, !tbaa !32
  %203 = load i32, ptr %14, align 4, !tbaa !30
  %204 = load ptr, ptr %11, align 8, !tbaa !5
  %205 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_hashridge(ptr noundef %202, i32 noundef %203, ptr noundef %204, ptr noundef %205)
  br label %196, !llvm.loop !33

206:                                              ; preds = %196
  br label %207

207:                                              ; preds = %206, %186
  store ptr null, ptr %8, align 8, !tbaa !5
  %208 = load ptr, ptr %6, align 8, !tbaa !5
  %209 = icmp ne ptr %208, null
  br i1 %209, label %210, label %252

210:                                              ; preds = %207
  %211 = load ptr, ptr %6, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.setT, ptr %211, i32 0, i32 1
  %213 = getelementptr inbounds [1 x %union.setelemT], ptr %212, i64 0, i64 0
  store ptr %213, ptr %9, align 8, !tbaa !5
  br label %214

214:                                              ; preds = %250, %210
  %215 = load ptr, ptr %9, align 8, !tbaa !5
  %216 = getelementptr inbounds ptr, ptr %215, i32 1
  store ptr %216, ptr %9, align 8, !tbaa !5
  %217 = load ptr, ptr %215, align 8, !tbaa !5
  store ptr %217, ptr %8, align 8, !tbaa !5
  %218 = icmp ne ptr %217, null
  br i1 %218, label %219, label %251

219:                                              ; preds = %214
  %220 = load ptr, ptr %8, align 8, !tbaa !5
  %221 = call ptr @qh_vertexridges(ptr noundef %220)
  store ptr %221, ptr %10, align 8, !tbaa !5
  store ptr null, ptr %11, align 8, !tbaa !5
  %222 = load ptr, ptr %10, align 8, !tbaa !5
  %223 = icmp ne ptr %222, null
  br i1 %223, label %224, label %246

224:                                              ; preds = %219
  %225 = load ptr, ptr %10, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.setT, ptr %225, i32 0, i32 1
  %227 = getelementptr inbounds [1 x %union.setelemT], ptr %226, i64 0, i64 0
  store ptr %227, ptr %12, align 8, !tbaa !5
  br label %228

228:                                              ; preds = %244, %224
  %229 = load ptr, ptr %12, align 8, !tbaa !5
  %230 = getelementptr inbounds ptr, ptr %229, i32 1
  store ptr %230, ptr %12, align 8, !tbaa !5
  %231 = load ptr, ptr %229, align 8, !tbaa !5
  store ptr %231, ptr %11, align 8, !tbaa !5
  %232 = icmp ne ptr %231, null
  br i1 %232, label %233, label %245

233:                                              ; preds = %228
  %234 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 207), align 8, !tbaa !32
  %235 = load i32, ptr %14, align 4, !tbaa !30
  %236 = load ptr, ptr %11, align 8, !tbaa !5
  %237 = load ptr, ptr %8, align 8, !tbaa !5
  %238 = load ptr, ptr %5, align 8, !tbaa !5
  %239 = call ptr @qh_hashridge_find(ptr noundef %234, i32 noundef %235, ptr noundef %236, ptr noundef %237, ptr noundef %238, ptr noundef %15)
  %240 = icmp ne ptr %239, null
  br i1 %240, label %241, label %244

241:                                              ; preds = %233
  %242 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 78), align 8, !tbaa !31
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 78), align 8, !tbaa !31
  br label %245

244:                                              ; preds = %233
  br label %228, !llvm.loop !34

245:                                              ; preds = %241, %228
  br label %246

246:                                              ; preds = %245, %219
  call void @qh_settempfree(ptr noundef %10)
  %247 = load ptr, ptr %11, align 8, !tbaa !5
  %248 = icmp ne ptr %247, null
  br i1 %248, label %250, label %249

249:                                              ; preds = %246
  br label %251

250:                                              ; preds = %246
  br label %214, !llvm.loop !35

251:                                              ; preds = %249, %214
  br label %252

252:                                              ; preds = %251, %207
  %253 = load ptr, ptr %8, align 8, !tbaa !5
  %254 = icmp ne ptr %253, null
  br i1 %254, label %255, label %271

255:                                              ; preds = %252
  %256 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !9
  %257 = icmp sge i32 %256, 2
  br i1 %257, label %258, label %270

258:                                              ; preds = %255
  %259 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !14
  %260 = load ptr, ptr %8, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.vertexT, ptr %260, i32 0, i32 4
  %262 = load i32, ptr %261, align 8, !tbaa !15
  %263 = load ptr, ptr %5, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.vertexT, ptr %263, i32 0, i32 4
  %265 = load i32, ptr %264, align 8, !tbaa !15
  %266 = load ptr, ptr %6, align 8, !tbaa !5
  %267 = call i32 @qh_setsize(ptr noundef %266)
  %268 = load ptr, ptr %7, align 8, !tbaa !5
  %269 = call i32 @qh_setsize(ptr noundef %268)
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %259, i32 noundef 2020, ptr noundef @.str.29, i32 noundef %262, i32 noundef %265, i32 noundef %267, i32 noundef %269)
  br label %270

270:                                              ; preds = %258, %255
  br label %283

271:                                              ; preds = %252
  %272 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 88), align 8, !tbaa !31
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 88), align 8, !tbaa !31
  %274 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !9
  %275 = icmp ne i32 %274, 0
  br i1 %275, label %276, label %282

276:                                              ; preds = %271
  %277 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !14
  %278 = load ptr, ptr %5, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.vertexT, ptr %278, i32 0, i32 4
  %280 = load i32, ptr %279, align 8, !tbaa !15
  %281 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 180), align 4, !tbaa !36
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %277, i32 noundef 14, ptr noundef @.str.30, i32 noundef %280, i32 noundef %281)
  br label %282

282:                                              ; preds = %276, %271
  br label %283

283:                                              ; preds = %282, %270
  call void @qh_setfree(ptr noundef getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 207))
  %284 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %284, ptr %4, align 8
  store i32 1, ptr %16, align 4
  br label %285

285:                                              ; preds = %283, %162
  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 4, 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
  %286 = load ptr, ptr %4, align 8
  ret ptr %286
}

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

declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

declare i32 @qh_newhashtable(i32 noundef) #1

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

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

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

declare void @qh_setfree(ptr 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, !11, i64 128}
!10 = !{!"qhT", !11, i64 0, !11, i64 4, !11, i64 8, !12, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !12, i64 56, !12, i64 64, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !6, i64 96, !11, i64 104, !11, i64 108, !6, i64 112, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144, !12, i64 152, !12, i64 160, !11, i64 168, !11, i64 172, !11, i64 176, !12, i64 184, !12, i64 192, !11, i64 200, !12, i64 208, !11, i64 216, !11, i64 220, !11, i64 224, !11, i64 228, !11, i64 232, !11, i64 236, !11, i64 240, !11, i64 244, !11, i64 248, !11, i64 252, !11, i64 256, !11, i64 260, !11, i64 264, !11, i64 268, !11, i64 272, !11, i64 276, !11, i64 280, !11, i64 284, !11, i64 288, !11, i64 292, !7, i64 296, !11, i64 412, !11, i64 416, !11, i64 420, !11, i64 424, !11, i64 428, !11, i64 432, !11, i64 436, !11, i64 440, !11, i64 444, !12, i64 448, !12, i64 456, !12, i64 464, !11, i64 472, !11, i64 476, !11, i64 480, !11, i64 484, !11, i64 488, !11, i64 492, !11, i64 496, !11, i64 500, !11, i64 504, !11, i64 508, !11, i64 512, !11, i64 516, !11, i64 520, !11, i64 524, !11, i64 528, !11, i64 532, !11, i64 536, !11, i64 540, !12, i64 544, !11, i64 552, !11, i64 556, !11, i64 560, !11, i64 564, !11, i64 568, !11, i64 572, !11, i64 576, !11, i64 580, !12, i64 584, !11, i64 592, !6, i64 600, !6, i64 608, !11, i64 616, !11, i64 620, !11, i64 624, !11, i64 628, !11, i64 632, !6, i64 640, !11, i64 648, !6, i64 656, !11, i64 664, !7, i64 668, !11, i64 924, !7, i64 928, !7, i64 1184, !11, i64 1696, !11, i64 1700, !11, i64 1704, !11, i64 1708, !11, i64 1712, !11, i64 1716, !6, i64 1720, !6, i64 1728, !6, i64 1736, !6, i64 1744, !12, i64 1752, !12, i64 1760, !12, i64 1768, !12, i64 1776, !12, i64 1784, !12, i64 1792, !12, i64 1800, !12, i64 1808, !12, i64 1816, !12, i64 1824, !12, i64 1832, !12, i64 1840, !12, i64 1848, !11, i64 1856, !6, i64 1864, !12, i64 1872, !12, i64 1880, !12, i64 1888, !12, 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, !11, i64 2424, !11, i64 2428, !11, i64 2432, !6, i64 2440, !6, i64 2448, !6, i64 2456, !6, i64 2464, !6, i64 2472, !11, i64 2480, !11, i64 2484, !6, i64 2488, !11, i64 2496, !6, i64 2504, !6, i64 2512, !6, i64 2520, !6, i64 2528, !11, i64 2536, !11, i64 2540, !11, i64 2544, !11, i64 2548, !11, i64 2552, !11, i64 2556, !11, i64 2560, !13, i64 2568, !11, i64 2576, !11, i64 2580, !11, i64 2584, !11, i64 2588, !6, i64 2592, !11, i64 2600, !11, i64 2604, !12, i64 2608, !11, i64 2616, !12, i64 2624, !12, i64 2632, !12, i64 2640, !11, i64 2648, !11, i64 2652, !11, i64 2656, !11, i64 2660, !12, i64 2664, !12, i64 2672, !11, i64 2680, !11, i64 2684, !11, i64 2688, !11, i64 2692, !12, i64 2696, !12, i64 2704, !11, i64 2712, !11, i64 2716, !11, i64 2720, !11, 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, !11, i64 2792, !6, i64 2800, !6, i64 2808, !11, i64 2816, !11, i64 2820, !11, i64 2824, !6, i64 2832, !12, i64 2840, !12, i64 2848, !12, i64 2856, !11, i64 2864, !11, i64 2868, !6, i64 2872, !6, i64 2880, !11, i64 2888}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!10, !6, i64 2408}
!15 = !{!16, !11, i64 32}
!16 = !{!"vertexT", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 40, !11, i64 40, !11, i64 40, !11, i64 40}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !11, i64 24}
!20 = !{!"ridgeT", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !11, i64 28, !11, i64 28, !11, i64 28}
!21 = distinct !{!21, !18}
!22 = !{!16, !11, i64 36}
!23 = distinct !{!23, !18}
!24 = !{!20, !6, i64 0}
!25 = distinct !{!25, !18}
!26 = distinct !{!26, !18}
!27 = distinct !{!27, !18}
!28 = !{!10, !11, i64 2716}
!29 = !{!10, !11, i64 420}
!30 = !{!11, !11, i64 0}
!31 = !{!7, !7, i64 0}
!32 = !{!10, !6, i64 2744}
!33 = distinct !{!33, !18}
!34 = distinct !{!34, !18}
!35 = distinct !{!35, !18}
!36 = !{!10, !11, i64 2588}


; 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 }

@qh_qh = external global %struct.qhT, align 8
@qh_qhstat = external local_unnamed_addr global %struct.qhstatT, align 8
@.str.24 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [81 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 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 i32 @qh_setsize(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @qh_find_newvertex(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %6 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !5
  %7 = icmp sgt i32 %6, 3
  br i1 %7, label %8, label %25

8:                                                ; preds = %3
  %9 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  %11 = load i32, ptr %10, align 8, !tbaa !14
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %9, i32 noundef 8063, ptr noundef nonnull @.str.24, i32 noundef %11) #4
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %.loopexit133, label %.preheader132

.preheader132:                                    ; preds = %8
  %.064136 = getelementptr inbounds i8, ptr %1, i64 8
  %12 = load ptr, ptr %.064136, align 8, !tbaa !16
  %.not88137 = icmp eq ptr %12, null
  br i1 %.not88137, label %.loopexit133, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader132, %.lr.ph
  %13 = phi ptr [ %17, %.lr.ph ], [ %12, %.preheader132 ]
  %.064138 = phi ptr [ %.064, %.lr.ph ], [ %.064136, %.preheader132 ]
  %14 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  %15 = getelementptr inbounds i8, ptr %13, i64 32
  %16 = load i32, ptr %15, align 8, !tbaa !14
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %14, i32 noundef 8064, ptr noundef nonnull @.str.25, i32 noundef %16) #4
  %.064 = getelementptr inbounds i8, ptr %.064138, i64 8
  %17 = load ptr, ptr %.064, align 8, !tbaa !16
  %.not88 = icmp eq ptr %17, null
  br i1 %.not88, label %.loopexit133, label %.lr.ph, !llvm.loop !17

.loopexit133:                                     ; preds = %.lr.ph, %.preheader132, %8
  %.not89 = icmp eq ptr %2, null
  br i1 %.not89, label %.loopexit131, label %.preheader130

.preheader130:                                    ; preds = %.loopexit133
  %.062139 = getelementptr inbounds i8, ptr %2, i64 8
  %18 = load ptr, ptr %.062139, align 8, !tbaa !16
  %.not91140 = icmp eq ptr %18, null
  br i1 %.not91140, label %.loopexit131, label %.lr.ph142

.lr.ph142:                                        ; preds = %.preheader130, %.lr.ph142
  %19 = phi ptr [ %23, %.lr.ph142 ], [ %18, %.preheader130 ]
  %.062141 = phi ptr [ %.062, %.lr.ph142 ], [ %.062139, %.preheader130 ]
  %20 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  %21 = getelementptr inbounds i8, ptr %19, i64 24
  %22 = load i32, ptr %21, align 8, !tbaa !19
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %20, i32 noundef 8065, ptr noundef nonnull @.str.26, i32 noundef %22) #4
  %.062 = getelementptr inbounds i8, ptr %.062141, i64 8
  %23 = load ptr, ptr %.062, align 8, !tbaa !16
  %.not91 = icmp eq ptr %23, null
  br i1 %.not91, label %.loopexit131, label %.lr.ph142, !llvm.loop !21

.loopexit131:                                     ; preds = %.lr.ph142, %.preheader130, %.loopexit133
  %24 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %24, i32 noundef 8066, ptr noundef nonnull @.str.27) #4
  br label %25

25:                                               ; preds = %.loopexit131, %3
  %.not92 = icmp eq ptr %1, null
  br i1 %.not92, label %.loopexit129, label %.preheader128

.preheader128:                                    ; preds = %25
  %.165143 = getelementptr inbounds i8, ptr %1, i64 8
  %26 = load ptr, ptr %.165143, align 8, !tbaa !16
  %.not94144 = icmp eq ptr %26, null
  br i1 %.not94144, label %.loopexit129, label %.lr.ph146

.lr.ph146:                                        ; preds = %.preheader128, %.lr.ph146
  %27 = phi ptr [ %29, %.lr.ph146 ], [ %26, %.preheader128 ]
  %.165145 = phi ptr [ %.165, %.lr.ph146 ], [ %.165143, %.preheader128 ]
  %28 = getelementptr inbounds i8, ptr %27, i64 36
  store i32 0, ptr %28, align 4, !tbaa !22
  %.165 = getelementptr inbounds i8, ptr %.165145, i64 8
  %29 = load ptr, ptr %.165, align 8, !tbaa !16
  %.not94 = icmp eq ptr %29, null
  br i1 %.not94, label %.loopexit129, label %.lr.ph146, !llvm.loop !23

.loopexit129:                                     ; preds = %.lr.ph146, %.preheader128, %25
  %.not95 = icmp eq ptr %2, null
  br i1 %.not95, label %.loopexit127, label %.preheader126

.preheader126:                                    ; preds = %.loopexit129
  %.1151 = getelementptr inbounds i8, ptr %2, i64 8
  %30 = load ptr, ptr %.1151, align 8, !tbaa !16
  %.not97152 = icmp eq ptr %30, null
  br i1 %.not97152, label %.loopexit127, label %.lr.ph154

.lr.ph154:                                        ; preds = %.preheader126, %.loopexit125
  %31 = phi ptr [ %39, %.loopexit125 ], [ %30, %.preheader126 ]
  %.1153 = phi ptr [ %.1, %.loopexit125 ], [ %.1151, %.preheader126 ]
  %32 = load ptr, ptr %31, align 8, !tbaa !24
  %.not112 = icmp eq ptr %32, null
  br i1 %.not112, label %.loopexit125, label %.preheader124

.preheader124:                                    ; preds = %.lr.ph154
  %.266147 = getelementptr inbounds i8, ptr %32, i64 8
  %33 = load ptr, ptr %.266147, align 8, !tbaa !16
  %.not114148 = icmp eq ptr %33, null
  br i1 %.not114148, label %.loopexit125, label %.lr.ph150

.lr.ph150:                                        ; preds = %.preheader124, %.lr.ph150
  %34 = phi ptr [ %38, %.lr.ph150 ], [ %33, %.preheader124 ]
  %.266149 = phi ptr [ %.266, %.lr.ph150 ], [ %.266147, %.preheader124 ]
  %35 = getelementptr inbounds i8, ptr %34, i64 36
  %36 = load i32, ptr %35, align 4, !tbaa !22
  %37 = add i32 %36, 1
  store i32 %37, ptr %35, align 4, !tbaa !22
  %.266 = getelementptr inbounds i8, ptr %.266149, i64 8
  %38 = load ptr, ptr %.266, align 8, !tbaa !16
  %.not114 = icmp eq ptr %38, null
  br i1 %.not114, label %.loopexit125, label %.lr.ph150, !llvm.loop !25

.loopexit125:                                     ; preds = %.lr.ph150, %.preheader124, %.lr.ph154
  %.1 = getelementptr inbounds i8, ptr %.1153, i64 8
  %39 = load ptr, ptr %.1, align 8, !tbaa !16
  %.not97 = icmp eq ptr %39, null
  br i1 %.not97, label %.loopexit127, label %.lr.ph154, !llvm.loop !26

.loopexit127:                                     ; preds = %.loopexit125, %.preheader126, %.loopexit129
  br i1 %.not92, label %.loopexit123, label %40

40:                                               ; preds = %.loopexit127
  %41 = getelementptr inbounds i8, ptr %1, i64 8
  %42 = load ptr, ptr %41, align 8, !tbaa !16
  %.not98155 = icmp eq ptr %42, null
  br i1 %.not98155, label %.loopexit123, label %.lr.ph157

.lr.ph157:                                        ; preds = %40
  %43 = getelementptr inbounds i8, ptr %1, i64 16
  %44 = ptrtoint ptr %43 to i64
  br label %45

45:                                               ; preds = %.lr.ph157, %56
  %46 = phi ptr [ %42, %.lr.ph157 ], [ %58, %56 ]
  %47 = phi ptr [ %43, %.lr.ph157 ], [ %57, %56 ]
  %.367156 = phi ptr [ %41, %.lr.ph157 ], [ %.4, %56 ]
  %48 = getelementptr inbounds i8, ptr %46, i64 36
  %49 = load i32, ptr %48, align 4, !tbaa !22
  %.not111 = icmp eq i32 %49, 0
  br i1 %.not111, label %50, label %56

50:                                               ; preds = %45
  %51 = ptrtoint ptr %47 to i64
  %52 = sub i64 %51, %44
  %53 = lshr exact i64 %52, 3
  %54 = trunc i64 %53 to i32
  %55 = tail call ptr @qh_setdelnth(ptr noundef nonnull %1, i32 noundef %54) #4
  br label %56

56:                                               ; preds = %50, %45
  %.4 = phi ptr [ %47, %45 ], [ %.367156, %50 ]
  %57 = getelementptr inbounds i8, ptr %.4, i64 8
  %58 = load ptr, ptr %.4, align 8, !tbaa !16
  %.not98 = icmp eq ptr %58, null
  br i1 %.not98, label %.loopexit123, label %45, !llvm.loop !27

.loopexit123:                                     ; preds = %56, %40, %.loopexit127
  %59 = tail call i32 @qh_setsize(ptr noundef %2) #4
  %60 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2716), align 4, !tbaa !28
  %61 = add i32 %60, %59
  store i32 %61, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2716), align 4, !tbaa !28
  %62 = tail call i32 @qh_setsize(ptr noundef %1) #4
  %.not99 = icmp eq i32 %62, 0
  br i1 %.not99, label %63, label %70

63:                                               ; preds = %.loopexit123
  %64 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !5
  %65 = icmp sgt i32 %64, 3
  br i1 %65, label %66, label %123

66:                                               ; preds = %63
  %67 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  %68 = getelementptr inbounds i8, ptr %0, i64 32
  %69 = load i32, ptr %68, align 8, !tbaa !14
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %67, i32 noundef 4023, ptr noundef nonnull @.str.28, i32 noundef %69) #4
  br label %123

70:                                               ; preds = %.loopexit123
  %71 = getelementptr inbounds i8, ptr %1, i64 8
  %72 = tail call i32 @qh_setsize(ptr noundef %1) #4
  %73 = sext i32 %72 to i64
  tail call void @qsort(ptr noundef nonnull %71, i64 noundef %73, i64 noundef 8, ptr noundef nonnull @qh_comparevisit) #4
  %74 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 420), align 4, !tbaa !29
  %.not100 = icmp eq i32 %74, 0
  br i1 %.not100, label %84, label %75

75:                                               ; preds = %70
  %76 = tail call i32 @qh_setsize(ptr noundef %1) #4
  %77 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 840), align 8, !tbaa !30
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 840), align 8, !tbaa !30
  %79 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 872), align 8, !tbaa !30
  %80 = add nsw i32 %79, %76
  store i32 %80, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 872), align 8, !tbaa !30
  %81 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 856), align 8, !tbaa !30
  %82 = icmp slt i32 %81, %76
  br i1 %82, label %83, label %84

83:                                               ; preds = %75
  store i32 %76, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 856), align 8, !tbaa !30
  br label %84

84:                                               ; preds = %75, %83, %70
  %85 = tail call i32 @qh_setsize(ptr noundef %2) #4
  %86 = tail call i32 @qh_newhashtable(i32 noundef %85) #4
  br i1 %.not95, label %.loopexit, label %.preheader122

.preheader122:                                    ; preds = %84
  %.2158 = getelementptr inbounds i8, ptr %2, i64 8
  %87 = load ptr, ptr %.2158, align 8, !tbaa !16
  %.not102159 = icmp eq ptr %87, null
  br i1 %.not102159, label %.loopexit, label %.lr.ph161

.lr.ph161:                                        ; preds = %.preheader122, %.lr.ph161
  %88 = phi ptr [ %90, %.lr.ph161 ], [ %87, %.preheader122 ]
  %.2160 = phi ptr [ %.2, %.lr.ph161 ], [ %.2158, %.preheader122 ]
  %89 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2744), align 8, !tbaa !31
  tail call void @qh_hashridge(ptr noundef %89, i32 noundef %86, ptr noundef nonnull %88, ptr noundef %0)
  %.2 = getelementptr inbounds i8, ptr %.2160, i64 8
  %90 = load ptr, ptr %.2, align 8, !tbaa !16
  %.not102 = icmp eq ptr %90, null
  br i1 %.not102, label %.loopexit, label %.lr.ph161, !llvm.loop !32

.loopexit:                                        ; preds = %.lr.ph161, %.preheader122, %84
  br i1 %.not92, label %.thread, label %.preheader121

.preheader121:                                    ; preds = %.loopexit
  %91 = load ptr, ptr %71, align 8, !tbaa !16
  %.not103162 = icmp eq ptr %91, null
  br i1 %.not103162, label %.thread, label %.lr.ph163.preheader

.lr.ph163.preheader:                              ; preds = %.preheader121
  %92 = getelementptr inbounds i8, ptr %1, i64 16
  br label %.lr.ph163

.lr.ph163:                                        ; preds = %.lr.ph163.preheader, %.critedge
  %93 = phi ptr [ %103, %.critedge ], [ %91, %.lr.ph163.preheader ]
  %94 = phi ptr [ %102, %.critedge ], [ %92, %.lr.ph163.preheader ]
  %95 = call ptr @qh_vertexridges(ptr noundef nonnull %93)
  store ptr %95, ptr %4, align 8, !tbaa !16
  %.not104 = icmp eq ptr %95, null
  br i1 %.not104, label %.thread119, label %.preheader

.preheader:                                       ; preds = %.lr.ph163, %97
  %.pn105 = phi ptr [ %.3, %97 ], [ %95, %.lr.ph163 ]
  %.3 = getelementptr inbounds i8, ptr %.pn105, i64 8
  %96 = load ptr, ptr %.3, align 8, !tbaa !16
  %.not106 = icmp eq ptr %96, null
  br i1 %.not106, label %.thread119, label %97

97:                                               ; preds = %.preheader
  %98 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2744), align 8, !tbaa !31
  %99 = call ptr @qh_hashridge_find(ptr noundef %98, i32 noundef %86, ptr noundef nonnull %96, ptr noundef nonnull %93, ptr noundef %0, ptr noundef nonnull %5)
  %.not107 = icmp eq ptr %99, null
  br i1 %.not107, label %.preheader, label %.critedge, !llvm.loop !33

.critedge:                                        ; preds = %97
  %100 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 624), align 8, !tbaa !30
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 624), align 8, !tbaa !30
  call void @qh_settempfree(ptr noundef nonnull %4) #4
  %102 = getelementptr inbounds i8, ptr %94, i64 8
  %103 = load ptr, ptr %94, align 8, !tbaa !16
  %.not103 = icmp eq ptr %103, null
  br i1 %.not103, label %.thread, label %.lr.ph163

.thread119:                                       ; preds = %.lr.ph163, %.preheader
  call void @qh_settempfree(ptr noundef nonnull %4) #4
  %104 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !5
  %105 = icmp sgt i32 %104, 1
  br i1 %105, label %106, label %122

106:                                              ; preds = %.thread119
  %107 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  %108 = getelementptr inbounds i8, ptr %93, i64 32
  %109 = load i32, ptr %108, align 8, !tbaa !14
  %110 = getelementptr inbounds i8, ptr %0, i64 32
  %111 = load i32, ptr %110, align 8, !tbaa !14
  %112 = call i32 @qh_setsize(ptr noundef nonnull %1) #4
  %113 = call i32 @qh_setsize(ptr noundef %2) #4
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %107, i32 noundef 2020, ptr noundef nonnull @.str.29, i32 noundef %109, i32 noundef %111, i32 noundef %112, i32 noundef %113) #4
  br label %122

.thread:                                          ; preds = %.critedge, %.preheader121, %.loopexit
  %114 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 704), align 8, !tbaa !30
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 704), align 8, !tbaa !30
  %116 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !5
  %.not110 = icmp eq i32 %116, 0
  br i1 %.not110, label %122, label %117

117:                                              ; preds = %.thread
  %118 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  %119 = getelementptr inbounds i8, ptr %0, i64 32
  %120 = load i32, ptr %119, align 8, !tbaa !14
  %121 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2588), align 4, !tbaa !34
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %118, i32 noundef 14, ptr noundef nonnull @.str.30, i32 noundef %120, i32 noundef %121) #4
  br label %122

122:                                              ; preds = %.thread, %117, %.thread119, %106
  %.061117 = phi ptr [ null, %.thread ], [ null, %117 ], [ %93, %.thread119 ], [ %93, %106 ]
  call void @qh_setfree(ptr noundef nonnull getelementptr inbounds (i8, ptr @qh_qh, i64 2744)) #4
  br label %123

123:                                              ; preds = %63, %66, %122
  %.0 = phi ptr [ %.061117, %122 ], [ null, %66 ], [ null, %63 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  ret ptr %.0
}

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

; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3

declare i32 @qh_newhashtable(i32 noundef) local_unnamed_addr #1

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

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

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

declare void @qh_setfree(ptr 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 = { nofree "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 #4 = { nounwind }

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

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


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