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

@qh_qh = external global %struct.qhT, align 8
@.str.9 = external hidden unnamed_addr constant [164 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [270 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [147 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_errexit2(i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @qh_check_dupridge(ptr noundef %0, double noundef %1, ptr noundef %2, double noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store double %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store double %3, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  store double 0x7FEFFFFFFFFFFFFF, ptr %19, align 8, !tbaa !9
  %20 = load double, ptr %6, align 8, !tbaa !9
  %21 = load double, ptr %8, align 8, !tbaa !9
  %22 = fcmp ogt double %20, %21
  br i1 %22, label %23, label %25

23:                                               ; preds = %4
  %24 = load double, ptr %8, align 8, !tbaa !9
  br label %27

25:                                               ; preds = %4
  %26 = load double, ptr %6, align 8, !tbaa !9
  br label %27

27:                                               ; preds = %25, %23
  %28 = phi double [ %24, %23 ], [ %26, %25 ]
  store double %28, ptr %15, align 8, !tbaa !9
  call void @qh_outerinner(ptr noundef null, ptr noundef %16, ptr noundef %14)
  %29 = load double, ptr %16, align 8, !tbaa !9
  %30 = load double, ptr %14, align 8, !tbaa !9
  %31 = fcmp olt double %29, %30
  br i1 %31, label %32, label %34

32:                                               ; preds = %27
  %33 = load double, ptr %14, align 8, !tbaa !9
  br label %36

34:                                               ; preds = %27
  %35 = load double, ptr %16, align 8, !tbaa !9
  br label %36

36:                                               ; preds = %34, %32
  %37 = phi double [ %33, %32 ], [ %35, %34 ]
  store double %37, ptr %17, align 8, !tbaa !9
  %38 = load double, ptr %17, align 8, !tbaa !9
  %39 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 141), align 8, !tbaa !11
  %40 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 128), align 8, !tbaa !15
  %41 = fadd double %39, %40
  %42 = fcmp olt double %38, %41
  br i1 %42, label %43, label %47

43:                                               ; preds = %36
  %44 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 141), align 8, !tbaa !11
  %45 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 128), align 8, !tbaa !15
  %46 = fadd double %44, %45
  store double %46, ptr %17, align 8, !tbaa !9
  br label %47

47:                                               ; preds = %43, %36
  %48 = load double, ptr %17, align 8, !tbaa !9
  %49 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 3), align 8, !tbaa !16
  %50 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 128), align 8, !tbaa !15
  %51 = fadd double %49, %50
  %52 = fcmp olt double %48, %51
  br i1 %52, label %53, label %57

53:                                               ; preds = %47
  %54 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 3), align 8, !tbaa !16
  %55 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 128), align 8, !tbaa !15
  %56 = fadd double %54, %55
  store double %56, ptr %17, align 8, !tbaa !9
  br label %57

57:                                               ; preds = %53, %47
  %58 = load double, ptr %15, align 8, !tbaa !9
  %59 = load double, ptr %17, align 8, !tbaa !9
  %60 = fdiv double %58, %59
  store double %60, ptr %18, align 8, !tbaa !9
  store ptr null, ptr %9, align 8, !tbaa !5
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.facetT, ptr %61, i32 0, i32 8
  %63 = load ptr, ptr %62, align 8, !tbaa !17
  %64 = icmp ne ptr %63, null
  br i1 %64, label %65, label %115

65:                                               ; preds = %57
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.facetT, ptr %66, i32 0, i32 8
  %68 = load ptr, ptr %67, align 8, !tbaa !17
  %69 = getelementptr inbounds %struct.setT, ptr %68, i32 0, i32 1
  %70 = getelementptr inbounds [1 x %union.setelemT], ptr %69, i64 0, i64 0
  store ptr %70, ptr %10, align 8, !tbaa !5
  br label %71

71:                                               ; preds = %113, %65
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = getelementptr inbounds ptr, ptr %72, i32 1
  store ptr %73, ptr %10, align 8, !tbaa !5
  %74 = load ptr, ptr %72, align 8, !tbaa !5
  store ptr %74, ptr %9, align 8, !tbaa !5
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %114

76:                                               ; preds = %71
  store ptr null, ptr %11, align 8, !tbaa !5
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.facetT, ptr %77, i32 0, i32 8
  %79 = load ptr, ptr %78, align 8, !tbaa !17
  %80 = icmp ne ptr %79, null
  br i1 %80, label %81, label %113

81:                                               ; preds = %76
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.facetT, ptr %82, i32 0, i32 8
  %84 = load ptr, ptr %83, align 8, !tbaa !17
  %85 = getelementptr inbounds %struct.setT, ptr %84, i32 0, i32 1
  %86 = getelementptr inbounds [1 x %union.setelemT], ptr %85, i64 0, i64 0
  store ptr %86, ptr %12, align 8, !tbaa !5
  br label %87

87:                                               ; preds = %111, %81
  %88 = load ptr, ptr %12, align 8, !tbaa !5
  %89 = getelementptr inbounds ptr, ptr %88, i32 1
  store ptr %89, ptr %12, align 8, !tbaa !5
  %90 = load ptr, ptr %88, align 8, !tbaa !5
  store ptr %90, ptr %11, align 8, !tbaa !5
  %91 = icmp ne ptr %90, null
  br i1 %91, label %92, label %112

92:                                               ; preds = %87
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = icmp ugt ptr %93, %94
  br i1 %95, label %96, label %111

96:                                               ; preds = %92
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.vertexT, ptr %97, i32 0, i32 2
  %99 = load ptr, ptr %98, align 8, !tbaa !19
  %100 = load ptr, ptr %11, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.vertexT, ptr %100, i32 0, i32 2
  %102 = load ptr, ptr %101, align 8, !tbaa !19
  %103 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 104), align 8, !tbaa !21
  %104 = call double @qh_pointdist(ptr noundef %99, ptr noundef %102, i32 noundef %103)
  store double %104, ptr %13, align 8, !tbaa !9
  %105 = load double, ptr %19, align 8, !tbaa !9
  %106 = load double, ptr %13, align 8, !tbaa !9
  %107 = fcmp ogt double %105, %106
  br i1 %107, label %108, label %110

108:                                              ; preds = %96
  %109 = load double, ptr %13, align 8, !tbaa !9
  store double %109, ptr %19, align 8, !tbaa !9
  br label %110

110:                                              ; preds = %108, %96
  br label %111

111:                                              ; preds = %110, %92
  br label %87, !llvm.loop !22

112:                                              ; preds = %87
  br label %113

113:                                              ; preds = %112, %76
  br label %71, !llvm.loop !24

114:                                              ; preds = %71
  br label %115

115:                                              ; preds = %114, %57
  %116 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !25
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %131

118:                                              ; preds = %115
  %119 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !26
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.facetT, ptr %120, i32 0, i32 14
  %122 = load i32, ptr %121, align 4, !tbaa !27
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.facetT, ptr %123, i32 0, i32 14
  %125 = load i32, ptr %124, align 4, !tbaa !27
  %126 = load double, ptr %19, align 8, !tbaa !9
  %127 = load double, ptr %6, align 8, !tbaa !9
  %128 = load double, ptr %8, align 8, !tbaa !9
  %129 = load double, ptr %18, align 8, !tbaa !9
  %130 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 180), align 4, !tbaa !28
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %119, i32 noundef 16, ptr noundef @.str.9, i32 noundef %122, i32 noundef %125, double noundef %126, double noundef %127, double noundef %128, double noundef %129, i32 noundef %130)
  br label %131

131:                                              ; preds = %118, %115
  %132 = load double, ptr %18, align 8, !tbaa !9
  %133 = fcmp ogt double %132, 1.000000e+02
  br i1 %133, label %134, label %166

134:                                              ; preds = %131
  %135 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !26
  %136 = load double, ptr %18, align 8, !tbaa !9
  %137 = load double, ptr %19, align 8, !tbaa !9
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.facetT, ptr %138, i32 0, i32 14
  %140 = load i32, ptr %139, align 4, !tbaa !27
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.facetT, ptr %141, i32 0, i32 14
  %143 = load i32, ptr %142, align 4, !tbaa !27
  %144 = load double, ptr %15, align 8, !tbaa !9
  %145 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 180), align 4, !tbaa !28
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %135, i32 noundef 6271, ptr noundef @.str.10, double noundef %136, double noundef %137, i32 noundef %140, i32 noundef %143, double noundef %144, i32 noundef %145)
  %146 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 13), align 8, !tbaa !29
  %147 = icmp ne i32 %146, 0
  br i1 %147, label %148, label %150

148:                                              ; preds = %134
  %149 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !26
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %149, i32 noundef 8145, ptr noundef @.str.11)
  br label %150

150:                                              ; preds = %148, %134
  %151 = load double, ptr %19, align 8, !tbaa !9
  %152 = load double, ptr %17, align 8, !tbaa !9
  %153 = fmul double 1.000000e+02, %152
  %154 = fcmp ogt double %151, %153
  br i1 %154, label %155, label %159

155:                                              ; preds = %150
  %156 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !26
  %157 = load double, ptr %19, align 8, !tbaa !9
  %158 = load double, ptr %17, align 8, !tbaa !9
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %156, i32 noundef 8146, ptr noundef @.str.12, double noundef %157, i32 noundef 100, double noundef %158)
  br label %159

159:                                              ; preds = %155, %150
  %160 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 41), align 4, !tbaa !30
  %161 = icmp ne i32 %160, 0
  br i1 %161, label %165, label %162

162:                                              ; preds = %159
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = load ptr, ptr %7, align 8, !tbaa !5
  call void @qh_errexit2(i32 noundef 5, ptr noundef %163, ptr noundef %164)
  br label %165

165:                                              ; preds = %162, %159
  br label %166

166:                                              ; preds = %165, %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret void
}

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

declare double @qh_pointdist(ptr noundef, ptr noundef, i32 noundef) #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 1880}
!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, !10, i64 1776}
!16 = !{!12, !10, i64 16}
!17 = !{!18, !6, i64 64}
!18 = !{!"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}
!19 = !{!20, !6, i64 16}
!20 = !{!"vertexT", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 40, !13, i64 40, !13, i64 40, !13, i64 40}
!21 = !{!12, !13, i64 624}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = !{!12, !13, i64 128}
!26 = !{!12, !6, i64 2408}
!27 = !{!18, !13, i64 108}
!28 = !{!12, !13, i64 2588}
!29 = !{!12, !13, i64 72}
!30 = !{!12, !13, i64 228}


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

@qh_qh = external local_unnamed_addr global %struct.qhT, align 8
@.str.9 = external hidden unnamed_addr constant [164 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [270 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [147 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_errexit2(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @qh_check_dupridge(ptr noundef %0, double noundef %1, ptr noundef %2, double noundef %3) local_unnamed_addr #2 {
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  %7 = fcmp ogt double %1, %3
  %8 = select i1 %7, double %3, double %1
  call void @qh_outerinner(ptr noundef null, ptr noundef nonnull %6, ptr noundef nonnull %5) #3
  %9 = load double, ptr %6, align 8
  %10 = load double, ptr %5, align 8
  %11 = fcmp olt double %9, %10
  %12 = select i1 %11, double %10, double %9
  %13 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1880), align 8, !tbaa !5
  %14 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1776), align 8, !tbaa !13
  %15 = fadd double %13, %14
  %16 = fcmp olt double %12, %15
  %.039 = select i1 %16, double %15, double %12
  %17 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 16), align 8, !tbaa !14
  %18 = fadd double %14, %17
  %19 = fcmp olt double %.039, %18
  %.140 = select i1 %19, double %18, double %.039
  %20 = fdiv double %8, %.140
  %21 = getelementptr inbounds i8, ptr %0, i64 64
  %22 = load ptr, ptr %21, align 8, !tbaa !15
  %.not = icmp eq ptr %22, null
  br i1 %.not, label %.loopexit60, label %.preheader59

.preheader59:                                     ; preds = %4
  %.04165 = getelementptr inbounds i8, ptr %22, i64 8
  %23 = load ptr, ptr %.04165, align 8, !tbaa !17
  %.not5266 = icmp eq ptr %23, null
  br i1 %.not5266, label %.loopexit60, label %.lr.ph69.split

.lr.ph69.split:                                   ; preds = %.preheader59, %.loopexit
  %24 = phi ptr [ %41, %.loopexit ], [ %23, %.preheader59 ]
  %.04168 = phi ptr [ %.041, %.loopexit ], [ %.04165, %.preheader59 ]
  %.067 = phi double [ %.3, %.loopexit ], [ 0x7FEFFFFFFFFFFFFF, %.preheader59 ]
  %25 = load ptr, ptr %21, align 8, !tbaa !15
  %.not56 = icmp eq ptr %25, null
  br i1 %.not56, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %.lr.ph69.split
  %.04261 = getelementptr inbounds i8, ptr %25, i64 8
  %26 = load ptr, ptr %.04261, align 8, !tbaa !17
  %.not5862 = icmp eq ptr %26, null
  br i1 %.not5862, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %27 = getelementptr inbounds i8, ptr %24, i64 16
  br label %28

28:                                               ; preds = %.lr.ph, %39
  %29 = phi ptr [ %26, %.lr.ph ], [ %40, %39 ]
  %.04264 = phi ptr [ %.04261, %.lr.ph ], [ %.042, %39 ]
  %.163 = phi double [ %.067, %.lr.ph ], [ %.2, %39 ]
  %30 = icmp ugt ptr %24, %29
  br i1 %30, label %31, label %39

31:                                               ; preds = %28
  %32 = load ptr, ptr %27, align 8, !tbaa !18
  %33 = getelementptr inbounds i8, ptr %29, i64 16
  %34 = load ptr, ptr %33, align 8, !tbaa !18
  %35 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 624), align 8, !tbaa !20
  %36 = call double @qh_pointdist(ptr noundef %32, ptr noundef %34, i32 noundef %35) #3
  %37 = fcmp ogt double %.163, %36
  br i1 %37, label %38, label %39

38:                                               ; preds = %31
  br label %39

39:                                               ; preds = %31, %38, %28
  %.2 = phi double [ %36, %38 ], [ %.163, %31 ], [ %.163, %28 ]
  %.042 = getelementptr inbounds i8, ptr %.04264, i64 8
  %40 = load ptr, ptr %.042, align 8, !tbaa !17
  %.not58 = icmp eq ptr %40, null
  br i1 %.not58, label %.loopexit, label %28, !llvm.loop !21

.loopexit:                                        ; preds = %39, %.preheader, %.lr.ph69.split
  %.3 = phi double [ %.067, %.lr.ph69.split ], [ %.067, %.preheader ], [ %.2, %39 ]
  %.041 = getelementptr inbounds i8, ptr %.04168, i64 8
  %41 = load ptr, ptr %.041, align 8, !tbaa !17
  %.not52 = icmp eq ptr %41, null
  br i1 %.not52, label %.loopexit60, label %.lr.ph69.split, !llvm.loop !23

.loopexit60:                                      ; preds = %.loopexit, %.preheader59, %4
  %.4 = phi double [ 0x7FEFFFFFFFFFFFFF, %4 ], [ 0x7FEFFFFFFFFFFFFF, %.preheader59 ], [ %.3, %.loopexit ]
  %42 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !25
  %.not53 = icmp eq i32 %42, 0
  br i1 %.not53, label %50, label %43

43:                                               ; preds = %.loopexit60
  %44 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !26
  %45 = getelementptr inbounds i8, ptr %0, i64 108
  %46 = load i32, ptr %45, align 4, !tbaa !27
  %47 = getelementptr inbounds i8, ptr %2, i64 108
  %48 = load i32, ptr %47, align 4, !tbaa !27
  %49 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2588), align 4, !tbaa !28
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %44, i32 noundef 16, ptr noundef nonnull @.str.9, i32 noundef %46, i32 noundef %48, double noundef %.4, double noundef %1, double noundef %3, double noundef %20, i32 noundef %49) #3
  br label %50

50:                                               ; preds = %43, %.loopexit60
  %51 = fcmp ogt double %20, 1.000000e+02
  br i1 %51, label %52, label %70

52:                                               ; preds = %50
  %53 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !26
  %54 = getelementptr inbounds i8, ptr %0, i64 108
  %55 = load i32, ptr %54, align 4, !tbaa !27
  %56 = getelementptr inbounds i8, ptr %2, i64 108
  %57 = load i32, ptr %56, align 4, !tbaa !27
  %58 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2588), align 4, !tbaa !28
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %53, i32 noundef 6271, ptr noundef nonnull @.str.10, double noundef %20, double noundef %.4, i32 noundef %55, i32 noundef %57, double noundef %8, i32 noundef %58) #3
  %59 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 72), align 8, !tbaa !29
  %.not54 = icmp eq i32 %59, 0
  br i1 %.not54, label %62, label %60

60:                                               ; preds = %52
  %61 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !26
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %61, i32 noundef 8145, ptr noundef nonnull @.str.11) #3
  br label %62

62:                                               ; preds = %60, %52
  %63 = fmul double %.140, 1.000000e+02
  %64 = fcmp ogt double %.4, %63
  br i1 %64, label %65, label %67

65:                                               ; preds = %62
  %66 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !26
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %66, i32 noundef 8146, ptr noundef nonnull @.str.12, double noundef %.4, i32 noundef 100, double noundef %.140) #3
  br label %67

67:                                               ; preds = %65, %62
  %68 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 228), align 4, !tbaa !30
  %.not55 = icmp eq i32 %68, 0
  br i1 %.not55, label %69, label %70

69:                                               ; preds = %67
  call void @qh_errexit2(i32 noundef 5, ptr noundef nonnull %0, ptr noundef nonnull %2) #3
  br label %70

70:                                               ; preds = %67, %69, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  ret void
}

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

declare double @qh_pointdist(ptr noundef, ptr noundef, i32 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, !10, i64 1880}
!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, !10, i64 1776}
!14 = !{!6, !10, i64 16}
!15 = !{!16, !11, i64 64}
!16 = !{!"facetT", !10, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !8, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 114, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115, !7, i64 115}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !11, i64 16}
!19 = !{!"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}
!20 = !{!6, !7, i64 624}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22, !24}
!24 = !{!"llvm.loop.unswitch.partial.disable"}
!25 = !{!6, !7, i64 128}
!26 = !{!6, !11, i64 2408}
!27 = !{!16, !7, i64 108}
!28 = !{!6, !7, i64 2588}
!29 = !{!6, !7, i64 72}
!30 = !{!6, !7, i64 228}


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