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

; 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.facetT = type { double, double, double, ptr, %union.anon, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32 }
%union.anon = type { double }
%struct.setT = type { i32, [1 x %union.setelemT] }
%union.setelemT = type { ptr }

@qh_qh = external global %struct.qhT, align 8
@qh_qhstat = external global %struct.qhstatT, align 8
@.str.105 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [213 x i8], align 1
@.str.107 = external hidden unnamed_addr constant [277 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.112 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.113 = external hidden unnamed_addr constant [2 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

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

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

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

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

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

declare void @qh_precision(ptr noundef) #1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @qh_initialhull(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 i32, align 4
  %11 = alloca double, align 8
  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
  store double 0x7FEFFFFFFFFFFFFF, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  call void @qh_createsimplex(ptr noundef %12)
  call void @qh_resetlists(i32 noundef 0, i32 noundef 1)
  %13 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 156), align 8, !tbaa !11
  store ptr %13, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !15
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = call ptr @qh_getcenter(ptr noundef %14)
  store ptr %15, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 152), align 8, !tbaa !16
  %16 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 156), align 8, !tbaa !11
  store ptr %16, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  call void @qh_setfacetplane(ptr noundef %17)
  %18 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 158), align 8, !tbaa !17
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 158), align 8, !tbaa !17
  %20 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 152), align 8, !tbaa !16
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  call void @qh_distplane(ptr noundef %20, ptr noundef %21, ptr noundef %7)
  %22 = load double, ptr %7, align 8, !tbaa !9
  %23 = fcmp ogt double %22, 0.000000e+00
  br i1 %23, label %24, label %53

24:                                               ; preds = %1
  %25 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 156), align 8, !tbaa !11
  store ptr %25, ptr %3, align 8, !tbaa !5
  br label %26

26:                                               ; preds = %48, %24
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %34

29:                                               ; preds = %26
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.facetT, ptr %30, i32 0, i32 7
  %32 = load ptr, ptr %31, align 8, !tbaa !18
  %33 = icmp ne ptr %32, null
  br label %34

34:                                               ; preds = %29, %26
  %35 = phi i1 [ false, %26 ], [ %33, %29 ]
  br i1 %35, label %36, label %52

36:                                               ; preds = %34
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.facetT, ptr %37, i32 0, i32 15
  %39 = load i32, ptr %38, align 8
  %40 = lshr i32 %39, 12
  %41 = and i32 %40, 1
  %42 = xor i32 %41, 1
  %43 = load i32, ptr %38, align 8
  %44 = and i32 %42, 1
  %45 = shl i32 %44, 12
  %46 = and i32 %43, -4097
  %47 = or i32 %46, %45
  store i32 %47, ptr %38, align 8
  br label %48

48:                                               ; preds = %36
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.facetT, ptr %49, i32 0, i32 7
  %51 = load ptr, ptr %50, align 8, !tbaa !18
  store ptr %51, ptr %3, align 8, !tbaa !5
  br label %26, !llvm.loop !20

52:                                               ; preds = %34
  br label %53

53:                                               ; preds = %52, %1
  %54 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 156), align 8, !tbaa !11
  store ptr %54, ptr %3, align 8, !tbaa !5
  br label %55

55:                                               ; preds = %67, %53
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = icmp ne ptr %56, null
  br i1 %57, label %58, label %63

58:                                               ; preds = %55
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.facetT, ptr %59, i32 0, i32 7
  %61 = load ptr, ptr %60, align 8, !tbaa !18
  %62 = icmp ne ptr %61, null
  br label %63

63:                                               ; preds = %58, %55
  %64 = phi i1 [ false, %55 ], [ %62, %58 ]
  br i1 %64, label %65, label %71

65:                                               ; preds = %63
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  call void @qh_setfacetplane(ptr noundef %66)
  br label %67

67:                                               ; preds = %65
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.facetT, ptr %68, i32 0, i32 7
  %70 = load ptr, ptr %69, align 8, !tbaa !18
  store ptr %70, ptr %3, align 8, !tbaa !5
  br label %55, !llvm.loop !22

71:                                               ; preds = %63
  %72 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 156), align 8, !tbaa !11
  store ptr %72, ptr %3, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %129, %71
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %81

76:                                               ; preds = %73
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.facetT, ptr %77, i32 0, i32 7
  %79 = load ptr, ptr %78, align 8, !tbaa !18
  %80 = icmp ne ptr %79, null
  br label %81

81:                                               ; preds = %76, %73
  %82 = phi i1 [ false, %73 ], [ %80, %76 ]
  br i1 %82, label %83, label %133

83:                                               ; preds = %81
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = call i32 @qh_checkflipped(ptr noundef %84, ptr noundef null, i32 noundef 1)
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %128, label %87

87:                                               ; preds = %83
  %88 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !23
  %89 = icmp sge i32 %88, 1
  br i1 %89, label %90, label %92

90:                                               ; preds = %87
  %91 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !24
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %91, i32 noundef 1031, ptr noundef @.str.105)
  br label %92

92:                                               ; preds = %90, %87
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.facetT, ptr %93, i32 0, i32 15
  %95 = load i32, ptr %94, align 8
  %96 = and i32 %95, -65537
  %97 = or i32 %96, 0
  store i32 %97, ptr %94, align 8
  %98 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 156), align 8, !tbaa !11
  store ptr %98, ptr %3, align 8, !tbaa !5
  br label %99

99:                                               ; preds = %123, %92
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %107

102:                                              ; preds = %99
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.facetT, ptr %103, i32 0, i32 7
  %105 = load ptr, ptr %104, align 8, !tbaa !18
  %106 = icmp ne ptr %105, null
  br label %107

107:                                              ; preds = %102, %99
  %108 = phi i1 [ false, %99 ], [ %106, %102 ]
  br i1 %108, label %109, label %127

109:                                              ; preds = %107
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.facetT, ptr %110, i32 0, i32 15
  %112 = load i32, ptr %111, align 8
  %113 = lshr i32 %112, 12
  %114 = and i32 %113, 1
  %115 = xor i32 %114, 1
  %116 = load i32, ptr %111, align 8
  %117 = and i32 %115, 1
  %118 = shl i32 %117, 12
  %119 = and i32 %116, -4097
  %120 = or i32 %119, %118
  store i32 %120, ptr %111, align 8
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = call i32 @qh_orientoutside(ptr noundef %121)
  br label %123

123:                                              ; preds = %109
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.facetT, ptr %124, i32 0, i32 7
  %126 = load ptr, ptr %125, align 8, !tbaa !18
  store ptr %126, ptr %3, align 8, !tbaa !5
  br label %99, !llvm.loop !25

127:                                              ; preds = %107
  br label %133

128:                                              ; preds = %83
  br label %129

129:                                              ; preds = %128
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.facetT, ptr %130, i32 0, i32 7
  %132 = load ptr, ptr %131, align 8, !tbaa !18
  store ptr %132, ptr %3, align 8, !tbaa !5
  br label %73, !llvm.loop !26

133:                                              ; preds = %127, %81
  %134 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 156), align 8, !tbaa !11
  store ptr %134, ptr %3, align 8, !tbaa !5
  br label %135

135:                                              ; preds = %200, %133
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = icmp ne ptr %136, null
  br i1 %137, label %138, label %143

138:                                              ; preds = %135
  %139 = load ptr, ptr %3, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.facetT, ptr %139, i32 0, i32 7
  %141 = load ptr, ptr %140, align 8, !tbaa !18
  %142 = icmp ne ptr %141, null
  br label %143

143:                                              ; preds = %138, %135
  %144 = phi i1 [ false, %135 ], [ %142, %138 ]
  br i1 %144, label %145, label %204

145:                                              ; preds = %143
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = call i32 @qh_checkflipped(ptr noundef %146, ptr noundef null, i32 noundef 0)
  %148 = icmp ne i32 %147, 0
  br i1 %148, label %168, label %149

149:                                              ; preds = %145
  %150 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 13), align 8, !tbaa !27
  %151 = icmp ne i32 %150, 0
  br i1 %151, label %152, label %163

152:                                              ; preds = %149
  %153 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 5), align 4, !tbaa !28
  %154 = icmp ne i32 %153, 0
  br i1 %154, label %163, label %155

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

158:                                              ; preds = %155
  %159 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !24
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %159, i32 noundef 6240, ptr noundef @.str.106)
  br label %162

160:                                              ; preds = %155
  %161 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !24
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %161, i32 noundef 6239, ptr noundef @.str.107)
  br label %162

162:                                              ; preds = %160, %158
  call void @qh_errexit(i32 noundef 1, ptr noundef null, ptr noundef null)
  br label %163

163:                                              ; preds = %162, %152, %149
  call void @qh_precision(ptr noundef @.str.108)
  %164 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !24
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.facetT, ptr %165, i32 0, i32 14
  %167 = load i32, ptr %166, align 4, !tbaa !30
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %164, i32 noundef 6154, ptr noundef @.str.109, i32 noundef %167)
  call void @qh_errexit(i32 noundef 2, ptr noundef null, ptr noundef null)
  br label %168

168:                                              ; preds = %163, %145
  store ptr null, ptr %5, align 8, !tbaa !5
  %169 = load ptr, ptr %3, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.facetT, ptr %169, i32 0, i32 10
  %171 = load ptr, ptr %170, align 8, !tbaa !31
  %172 = icmp ne ptr %171, null
  br i1 %172, label %173, label %199

173:                                              ; preds = %168
  %174 = load ptr, ptr %3, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.facetT, ptr %174, i32 0, i32 10
  %176 = load ptr, ptr %175, align 8, !tbaa !31
  %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 = %197, %173
  %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 %198

184:                                              ; preds = %179
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.facetT, ptr %185, i32 0, i32 3
  %187 = load ptr, ptr %186, align 8, !tbaa !32
  %188 = load ptr, ptr %5, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.facetT, ptr %188, i32 0, i32 3
  %190 = load ptr, ptr %189, align 8, !tbaa !32
  %191 = call double @qh_getangle(ptr noundef %187, ptr noundef %190)
  store double %191, ptr %8, align 8, !tbaa !9
  %192 = load double, ptr %9, align 8, !tbaa !9
  %193 = load double, ptr %8, align 8, !tbaa !9
  %194 = fcmp ogt double %192, %193
  br i1 %194, label %195, label %197

195:                                              ; preds = %184
  %196 = load double, ptr %8, align 8, !tbaa !9
  store double %196, ptr %9, align 8, !tbaa !9
  br label %197

197:                                              ; preds = %195, %184
  br label %179, !llvm.loop !33

198:                                              ; preds = %179
  br label %199

199:                                              ; preds = %198, %168
  br label %200

200:                                              ; preds = %199
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.facetT, ptr %201, i32 0, i32 7
  %203 = load ptr, ptr %202, align 8, !tbaa !18
  store ptr %203, ptr %3, align 8, !tbaa !5
  br label %135, !llvm.loop !34

204:                                              ; preds = %143
  %205 = load double, ptr %9, align 8, !tbaa !9
  %206 = fcmp olt double %205, 0xBFEFFFFFFAA19C47
  br i1 %206, label %207, label %225

207:                                              ; preds = %204
  %208 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 38), align 8, !tbaa !35
  %209 = icmp ne i32 %208, 0
  br i1 %209, label %225, label %210

210:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %211 = load double, ptr %9, align 8, !tbaa !9
  %212 = fadd double 1.000000e+00, %211
  store double %212, ptr %11, align 8, !tbaa !9
  store i32 1, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 138), align 8, !tbaa !36
  call void @qh_option(ptr noundef @.str.110, ptr noundef null, ptr noundef %11)
  %213 = load double, ptr %9, align 8, !tbaa !9
  %214 = fcmp olt double %213, 0xBFEFFFFFFFFFFFF7
  br i1 %214, label %215, label %224

215:                                              ; preds = %210
  %216 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 74), align 4, !tbaa !37
  %217 = icmp ne i32 %216, 0
  br i1 %217, label %224, label %218

218:                                              ; preds = %215
  %219 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 57), align 4, !tbaa !38
  %220 = icmp ne i32 %219, 0
  br i1 %220, label %221, label %224

221:                                              ; preds = %218
  %222 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !24
  %223 = load double, ptr %9, align 8, !tbaa !9
  call void @qh_printhelp_narrowhull(ptr noundef %222, double noundef %223)
  br label %224

224:                                              ; preds = %221, %218, %215, %210
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %225

225:                                              ; preds = %224, %207, %204
  %226 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 104), align 8, !tbaa !39
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 174), align 8, !tbaa !17
  %228 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 156), align 8, !tbaa !11
  call void @qh_checkpolygon(ptr noundef %228)
  %229 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 156), align 8, !tbaa !11
  call void @qh_checkconvex(ptr noundef %229, i32 noundef 1)
  %230 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !23
  %231 = icmp sge i32 %230, 1
  br i1 %231, label %232, label %250

232:                                              ; preds = %225
  %233 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !24
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %233, i32 noundef 8105, ptr noundef @.str.111)
  store i32 0, ptr %10, align 4, !tbaa !40
  br label %234

234:                                              ; preds = %245, %232
  %235 = load i32, ptr %10, align 4, !tbaa !40
  %236 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 104), align 8, !tbaa !39
  %237 = icmp slt i32 %235, %236
  br i1 %237, label %238, label %248

238:                                              ; preds = %234
  %239 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !24
  %240 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 152), align 8, !tbaa !16
  %241 = load i32, ptr %10, align 4, !tbaa !40
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds double, ptr %240, i64 %242
  %244 = load double, ptr %243, align 8, !tbaa !9
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %239, i32 noundef 8106, ptr noundef @.str.112, double noundef %244)
  br label %245

245:                                              ; preds = %238
  %246 = load i32, ptr %10, align 4, !tbaa !40
  %247 = add nsw i32 %246, 1
  store i32 %247, ptr %10, align 4, !tbaa !40
  br label %234, !llvm.loop !41

248:                                              ; preds = %234
  %249 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !24
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %249, i32 noundef 8107, ptr noundef @.str.113)
  br label %250

250:                                              ; preds = %248, %225
  call void @llvm.lifetime.end.p0(i64 4, 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
}

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

declare ptr @qh_getcenter(ptr noundef) #1

declare void @qh_setfacetplane(ptr noundef) #1

declare i32 @qh_orientoutside(ptr noundef) #1

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

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

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


; 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 local_unnamed_addr global %struct.qhT, align 8
@qh_qhstat = external local_unnamed_addr global %struct.qhstatT, align 8
@.str.105 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [213 x i8], align 1
@.str.107 = external hidden unnamed_addr constant [277 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.112 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.113 = external hidden unnamed_addr constant [2 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

; 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_fprintf(ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #1

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

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

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

declare void @qh_precision(ptr noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @qh_initialhull(ptr noundef %0) local_unnamed_addr #2 {
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  tail call void @qh_createsimplex(ptr noundef %0)
  tail call void @qh_resetlists(i32 noundef 0, i32 noundef 1)
  %4 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2440), align 8, !tbaa !5
  store ptr %4, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2456), align 8, !tbaa !13
  %5 = tail call ptr @qh_getcenter(ptr noundef %0) #3
  store ptr %5, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2416), align 8, !tbaa !14
  %6 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2440), align 8, !tbaa !5
  tail call void @qh_setfacetplane(ptr noundef %6) #3
  %7 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1264), align 8, !tbaa !15
  %8 = add nsw i32 %7, 1
  store i32 %8, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1264), align 8, !tbaa !15
  %9 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2416), align 8, !tbaa !14
  call void @qh_distplane(ptr noundef %9, ptr noundef %6, ptr noundef nonnull %2) #3
  %10 = load double, ptr %2, align 8, !tbaa !16
  %11 = fcmp ule double %10, 0.000000e+00
  %.05785 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2440), align 8
  %.not86 = icmp eq ptr %.05785, null
  %or.cond114 = select i1 %11, i1 true, i1 %.not86
  br i1 %or.cond114, label %.critedge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %1
  %12 = getelementptr inbounds i8, ptr %.05785, i64 56
  %13 = load ptr, ptr %12, align 8, !tbaa !17
  %.not65127 = icmp eq ptr %13, null
  br i1 %.not65127, label %.critedge.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %14 = phi ptr [ %19, %.lr.ph ], [ %13, %.lr.ph.preheader ]
  %.05787128 = phi ptr [ %14, %.lr.ph ], [ %.05785, %.lr.ph.preheader ]
  %15 = getelementptr inbounds i8, ptr %.05787128, i64 112
  %16 = load i32, ptr %15, align 8
  %17 = xor i32 %16, 4096
  store i32 %17, ptr %15, align 8
  %18 = getelementptr inbounds i8, ptr %14, i64 56
  %19 = load ptr, ptr %18, align 8, !tbaa !17
  %.not65 = icmp eq ptr %19, null
  br i1 %.not65, label %.critedge.loopexit, label %.lr.ph

.critedge.loopexit:                               ; preds = %.lr.ph, %.lr.ph.preheader
  %.15889.pre = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2440), align 8, !tbaa !17
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %1
  %.15889 = phi ptr [ %.15889.pre, %.critedge.loopexit ], [ %.05785, %1 ]
  %.not6690 = icmp eq ptr %.15889, null
  br i1 %.not6690, label %.critedge2.preheader, label %.lr.ph92

.lr.ph92:                                         ; preds = %.critedge, %22
  %.15891 = phi ptr [ %.158, %22 ], [ %.15889, %.critedge ]
  %20 = getelementptr inbounds i8, ptr %.15891, i64 56
  %21 = load ptr, ptr %20, align 8, !tbaa !18
  %.not67 = icmp eq ptr %21, null
  br i1 %.not67, label %.critedge2.preheader, label %22

22:                                               ; preds = %.lr.ph92
  call void @qh_setfacetplane(ptr noundef nonnull %.15891) #3
  %.158 = load ptr, ptr %20, align 8, !tbaa !17
  %.not66 = icmp eq ptr %.158, null
  br i1 %.not66, label %.critedge2.preheader, label %.lr.ph92, !llvm.loop !20

.critedge2.preheader:                             ; preds = %.lr.ph92, %22, %.critedge
  br label %.critedge2

.critedge2:                                       ; preds = %.critedge2.preheader, %26
  %.259.in = phi ptr [ %24, %26 ], [ getelementptr inbounds (i8, ptr @qh_qh, i64 2440), %.critedge2.preheader ]
  %.259 = load ptr, ptr %.259.in, align 8, !tbaa !17
  %.not68 = icmp eq ptr %.259, null
  br i1 %.not68, label %.critedge6, label %23

23:                                               ; preds = %.critedge2
  %24 = getelementptr inbounds i8, ptr %.259, i64 56
  %25 = load ptr, ptr %24, align 8, !tbaa !18
  %.not69 = icmp eq ptr %25, null
  br i1 %.not69, label %.critedge6, label %26

26:                                               ; preds = %23
  %27 = call i32 @qh_checkflipped(ptr noundef nonnull %.259, ptr noundef null, i32 noundef 1) #3
  %.not70 = icmp eq i32 %27, 0
  br i1 %.not70, label %28, label %.critedge2, !llvm.loop !22

28:                                               ; preds = %26
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !23
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %31, label %33

31:                                               ; preds = %28
  %32 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !24
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %32, i32 noundef 1031, ptr noundef nonnull @.str.105) #3
  br label %33

33:                                               ; preds = %31, %28
  %34 = getelementptr inbounds i8, ptr %.259, i64 112
  %35 = load i32, ptr %34, align 8
  %36 = and i32 %35, -65537
  store i32 %36, ptr %34, align 8
  %.36094 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2440), align 8, !tbaa !17
  %.not7195 = icmp eq ptr %.36094, null
  br i1 %.not7195, label %.critedge8.thread, label %.lr.ph97

.lr.ph97:                                         ; preds = %33, %39
  %.36096 = phi ptr [ %.360, %39 ], [ %.36094, %33 ]
  %37 = getelementptr inbounds i8, ptr %.36096, i64 56
  %38 = load ptr, ptr %37, align 8, !tbaa !18
  %.not72 = icmp eq ptr %38, null
  br i1 %.not72, label %.critedge6, label %39

39:                                               ; preds = %.lr.ph97
  %40 = getelementptr inbounds i8, ptr %.36096, i64 112
  %41 = load i32, ptr %40, align 8
  %42 = xor i32 %41, 4096
  store i32 %42, ptr %40, align 8
  %43 = call i32 @qh_orientoutside(ptr noundef nonnull %.36096) #3
  %.360 = load ptr, ptr %37, align 8, !tbaa !17
  %.not71 = icmp eq ptr %.360, null
  br i1 %.not71, label %.critedge6, label %.lr.ph97, !llvm.loop !25

.critedge6:                                       ; preds = %.critedge2, %23, %39, %.lr.ph97
  %.4104.pr = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2440), align 8, !tbaa !17
  %.not73105 = icmp eq ptr %.4104.pr, null
  br i1 %.not73105, label %.critedge8.thread, label %.lr.ph108

.lr.ph108:                                        ; preds = %.critedge6, %.loopexit
  %.4107 = phi ptr [ %.4, %.loopexit ], [ %.4104.pr, %.critedge6 ]
  %.056106 = phi double [ %.3, %.loopexit ], [ 0x7FEFFFFFFFFFFFFF, %.critedge6 ]
  %44 = getelementptr inbounds i8, ptr %.4107, i64 56
  %45 = load ptr, ptr %44, align 8, !tbaa !18
  %.not74 = icmp eq ptr %45, null
  br i1 %.not74, label %.critedge8, label %46

46:                                               ; preds = %.lr.ph108
  %47 = call i32 @qh_checkflipped(ptr noundef nonnull %.4107, ptr noundef null, i32 noundef 0) #3
  %.not78 = icmp eq i32 %47, 0
  br i1 %.not78, label %48, label %63

48:                                               ; preds = %46
  %49 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 72), align 8, !tbaa !26
  %50 = icmp eq i32 %49, 0
  %51 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 28), align 4
  %52 = icmp ne i32 %51, 0
  %or.cond = select i1 %50, i1 true, i1 %52
  br i1 %or.cond, label %59, label %53

53:                                               ; preds = %48
  %54 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 564), align 4, !tbaa !27
  %.not79 = icmp eq i32 %54, 0
  %55 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !24
  br i1 %.not79, label %57, label %56

56:                                               ; preds = %53
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %55, i32 noundef 6240, ptr noundef nonnull @.str.106) #3
  br label %58

57:                                               ; preds = %53
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %55, i32 noundef 6239, ptr noundef nonnull @.str.107) #3
  br label %58

58:                                               ; preds = %57, %56
  call void @qh_errexit(i32 noundef 1, ptr noundef null, ptr noundef null) #3
  br label %59

59:                                               ; preds = %58, %48
  call void @qh_precision(ptr noundef nonnull @.str.108) #3
  %60 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !24
  %61 = getelementptr inbounds i8, ptr %.4107, i64 108
  %62 = load i32, ptr %61, align 4, !tbaa !28
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %60, i32 noundef 6154, ptr noundef nonnull @.str.109, i32 noundef %62) #3
  call void @qh_errexit(i32 noundef 2, ptr noundef null, ptr noundef null) #3
  br label %63

63:                                               ; preds = %59, %46
  %64 = getelementptr inbounds i8, ptr %.4107, i64 80
  %65 = load ptr, ptr %64, align 8, !tbaa !29
  %.not80 = icmp eq ptr %65, null
  br i1 %.not80, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %63
  %.06199 = getelementptr inbounds i8, ptr %65, i64 8
  %66 = load ptr, ptr %.06199, align 8, !tbaa !17
  %.not81100 = icmp eq ptr %66, null
  br i1 %.not81100, label %.loopexit, label %.lr.ph103

.lr.ph103:                                        ; preds = %.preheader
  %67 = getelementptr inbounds i8, ptr %.4107, i64 24
  br label %68

68:                                               ; preds = %.lr.ph103, %68
  %69 = phi ptr [ %66, %.lr.ph103 ], [ %75, %68 ]
  %.061102 = phi ptr [ %.06199, %.lr.ph103 ], [ %.061, %68 ]
  %.1101 = phi double [ %.056106, %.lr.ph103 ], [ %.2, %68 ]
  %70 = load ptr, ptr %67, align 8, !tbaa !30
  %71 = getelementptr inbounds i8, ptr %69, i64 24
  %72 = load ptr, ptr %71, align 8, !tbaa !30
  %73 = call double @qh_getangle(ptr noundef %70, ptr noundef %72) #3
  %74 = fcmp ogt double %.1101, %73
  %.2 = select i1 %74, double %73, double %.1101
  %.061 = getelementptr inbounds i8, ptr %.061102, i64 8
  %75 = load ptr, ptr %.061, align 8, !tbaa !17
  %.not81 = icmp eq ptr %75, null
  br i1 %.not81, label %.loopexit, label %68, !llvm.loop !31

.loopexit:                                        ; preds = %68, %.preheader, %63
  %.3 = phi double [ %.056106, %63 ], [ %.056106, %.preheader ], [ %.2, %68 ]
  %.4 = load ptr, ptr %44, align 8, !tbaa !17
  %.not73 = icmp eq ptr %.4, null
  br i1 %.not73, label %.critedge8, label %.lr.ph108, !llvm.loop !32

.critedge8:                                       ; preds = %.lr.ph108, %.loopexit
  %.056.lcssa = phi double [ %.056106, %.lr.ph108 ], [ %.3, %.loopexit ]
  %76 = fcmp uge double %.056.lcssa, 0xBFEFFFFFFAA19C47
  %77 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 216), align 8
  %78 = icmp ne i32 %77, 0
  %or.cond11 = select i1 %76, i1 true, i1 %78
  br i1 %or.cond11, label %.critedge8.thread, label %79

79:                                               ; preds = %.critedge8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %80 = fadd double %.056.lcssa, 1.000000e+00
  store double %80, ptr %3, align 8, !tbaa !16
  store i32 1, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1856), align 8, !tbaa !33
  call void @qh_option(ptr noundef nonnull @.str.110, ptr noundef null, ptr noundef nonnull %3) #3
  %81 = fcmp olt double %.056.lcssa, 0xBFEFFFFFFFFFFFF7
  %82 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 484), align 4
  %83 = icmp eq i32 %82, 0
  %or.cond13.not77 = select i1 %81, i1 %83, i1 false
  %84 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 292), align 4
  %85 = icmp ne i32 %84, 0
  %or.cond15 = select i1 %or.cond13.not77, i1 %85, i1 false
  br i1 %or.cond15, label %86, label %88

86:                                               ; preds = %79
  %87 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !24
  call void @qh_printhelp_narrowhull(ptr noundef %87, double noundef %.056.lcssa) #3
  br label %88

88:                                               ; preds = %86, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  br label %.critedge8.thread

.critedge8.thread:                                ; preds = %33, %.critedge6, %88, %.critedge8
  %89 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 624), align 8, !tbaa !34
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1392), align 8, !tbaa !15
  %91 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2440), align 8, !tbaa !5
  call void @qh_checkpolygon(ptr noundef %91)
  %92 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2440), align 8, !tbaa !5
  call void @qh_checkconvex(ptr noundef %92, i32 noundef 1)
  %93 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !23
  %94 = icmp sgt i32 %93, 0
  br i1 %94, label %95, label %107

95:                                               ; preds = %.critedge8.thread
  %96 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !24
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %96, i32 noundef 8105, ptr noundef nonnull @.str.111) #3
  %97 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 624), align 8, !tbaa !34
  %98 = icmp sgt i32 %97, 0
  br i1 %98, label %.lr.ph113, label %._crit_edge

.lr.ph113:                                        ; preds = %95, %.lr.ph113
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph113 ], [ 0, %95 ]
  %99 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !24
  %100 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2416), align 8, !tbaa !14
  %101 = getelementptr inbounds double, ptr %100, i64 %indvars.iv
  %102 = load double, ptr %101, align 8, !tbaa !16
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %99, i32 noundef 8106, ptr noundef nonnull @.str.112, double noundef %102) #3
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %103 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 624), align 8, !tbaa !34
  %104 = sext i32 %103 to i64
  %105 = icmp slt i64 %indvars.iv.next, %104
  br i1 %105, label %.lr.ph113, label %._crit_edge, !llvm.loop !35

._crit_edge:                                      ; preds = %.lr.ph113, %95
  %106 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !24
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %106, i32 noundef 8107, ptr noundef nonnull @.str.113) #3
  br label %107

107:                                              ; preds = %._crit_edge, %.critedge8.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  ret void
}

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

declare ptr @qh_getcenter(ptr noundef) local_unnamed_addr #1

declare void @qh_setfacetplane(ptr noundef) local_unnamed_addr #1

declare i32 @qh_orientoutside(ptr noundef) local_unnamed_addr #1

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

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

declare void @qh_printhelp_narrowhull(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, !11, i64 2440}
!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 2456}
!14 = !{!6, !11, i64 2416}
!15 = !{!8, !8, i64 0}
!16 = !{!10, !10, i64 0}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !11, i64 56}
!19 = !{!"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}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = !{!6, !7, i64 128}
!24 = !{!6, !11, i64 2408}
!25 = distinct !{!25, !21}
!26 = !{!6, !7, i64 72}
!27 = !{!6, !7, i64 564}
!28 = !{!19, !7, i64 108}
!29 = !{!19, !11, i64 80}
!30 = !{!19, !11, i64 24}
!31 = distinct !{!31, !21}
!32 = distinct !{!32, !21}
!33 = !{!6, !7, i64 1856}
!34 = !{!6, !7, i64 624}
!35 = distinct !{!35, !21}


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