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

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

%struct.qhT = type { i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, double, double, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [29 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, i32, ptr, i32, [256 x i8], i32, [256 x i8], [512 x i8], i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, double, double, double, double, double, double, double, double, double, double, double, double, double, i32, ptr, double, double, double, double, [6 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, ptr, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, i32, i32, ptr, ptr, i32 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.qhstatT = type { [227 x %union.intrealT], [237 x i8], [227 x ptr], [227 x i16], [227 x i8], [227 x i8], [9 x %union.intrealT], i32, i32, i32, i32, double }
%union.intrealT = type { double }
%struct.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 }
%struct.ridgeT = type { ptr, ptr, ptr, i32, i8 }

@qh_qh = external global %struct.qhT, align 8
@qh_qhstat = external global %struct.qhstatT, align 8
@.str.102 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [76 x i8], align 1

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

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

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

declare i32 @qh_setsize(ptr noundef) #1

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

declare ptr @qh_setdel(ptr noundef, ptr noundef) #1

declare ptr @qh_setdelsorted(ptr noundef, ptr noundef) #1

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

10:                                               ; preds = %1
  %11 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !15
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.facetT, ptr %12, i32 0, i32 14
  %14 = load i32, ptr %13, align 4, !tbaa !16
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %11, i32 noundef 4043, ptr noundef @.str.102, i32 noundef %14)
  br label %15

15:                                               ; preds = %10, %1
  store ptr null, ptr %5, align 8, !tbaa !5
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.facetT, ptr %16, i32 0, i32 8
  %18 = load ptr, ptr %17, align 8, !tbaa !18
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %38

20:                                               ; preds = %15
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.facetT, ptr %21, i32 0, i32 8
  %23 = load ptr, ptr %22, align 8, !tbaa !18
  %24 = getelementptr inbounds %struct.setT, ptr %23, i32 0, i32 1
  %25 = getelementptr inbounds [1 x %union.setelemT], ptr %24, i64 0, i64 0
  store ptr %25, ptr %6, align 8, !tbaa !5
  br label %26

26:                                               ; preds = %31, %20
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds ptr, ptr %27, i32 1
  store ptr %28, ptr %6, align 8, !tbaa !5
  %29 = load ptr, ptr %27, align 8, !tbaa !5
  store ptr %29, ptr %5, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %31, label %37

31:                                               ; preds = %26
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.vertexT, ptr %32, i32 0, i32 6
  %34 = load i8, ptr %33, align 8
  %35 = and i8 %34, -2
  %36 = or i8 %35, 0
  store i8 %36, ptr %33, align 8
  br label %26, !llvm.loop !19

37:                                               ; preds = %26
  br label %38

38:                                               ; preds = %37, %15
  store ptr null, ptr %3, align 8, !tbaa !5
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.facetT, ptr %39, i32 0, i32 9
  %41 = load ptr, ptr %40, align 8, !tbaa !21
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %79

43:                                               ; preds = %38
  %44 = load ptr, ptr %2, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.facetT, ptr %44, i32 0, i32 9
  %46 = load ptr, ptr %45, align 8, !tbaa !21
  %47 = getelementptr inbounds %struct.setT, ptr %46, i32 0, i32 1
  %48 = getelementptr inbounds [1 x %union.setelemT], ptr %47, i64 0, i64 0
  store ptr %48, ptr %4, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %77, %43
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds ptr, ptr %50, i32 1
  store ptr %51, ptr %4, align 8, !tbaa !5
  %52 = load ptr, ptr %50, align 8, !tbaa !5
  store ptr %52, ptr %3, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %54, label %78

54:                                               ; preds = %49
  store ptr null, ptr %5, align 8, !tbaa !5
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.ridgeT, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !22
  %58 = icmp ne ptr %57, null
  br i1 %58, label %59, label %77

59:                                               ; preds = %54
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.ridgeT, ptr %60, i32 0, i32 0
  %62 = load ptr, ptr %61, align 8, !tbaa !22
  %63 = getelementptr inbounds %struct.setT, ptr %62, i32 0, i32 1
  %64 = getelementptr inbounds [1 x %union.setelemT], ptr %63, i64 0, i64 0
  store ptr %64, ptr %6, align 8, !tbaa !5
  br label %65

65:                                               ; preds = %70, %59
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds ptr, ptr %66, i32 1
  store ptr %67, ptr %6, align 8, !tbaa !5
  %68 = load ptr, ptr %66, align 8, !tbaa !5
  store ptr %68, ptr %5, align 8, !tbaa !5
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %76

70:                                               ; preds = %65
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.vertexT, ptr %71, i32 0, i32 6
  %73 = load i8, ptr %72, align 8
  %74 = and i8 %73, -2
  %75 = or i8 %74, 1
  store i8 %75, ptr %72, align 8
  br label %65, !llvm.loop !24

76:                                               ; preds = %65
  br label %77

77:                                               ; preds = %76, %54
  br label %49, !llvm.loop !25

78:                                               ; preds = %49
  br label %79

79:                                               ; preds = %78, %38
  store ptr null, ptr %5, align 8, !tbaa !5
  %80 = load ptr, ptr %2, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.facetT, ptr %80, i32 0, i32 8
  %82 = load ptr, ptr %81, align 8, !tbaa !18
  %83 = icmp ne ptr %82, null
  br i1 %83, label %84, label %154

84:                                               ; preds = %79
  %85 = load ptr, ptr %2, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.facetT, ptr %85, i32 0, i32 8
  %87 = load ptr, ptr %86, align 8, !tbaa !18
  %88 = getelementptr inbounds %struct.setT, ptr %87, i32 0, i32 1
  %89 = getelementptr inbounds [1 x %union.setelemT], ptr %88, i64 0, i64 0
  store ptr %89, ptr %6, align 8, !tbaa !5
  br label %90

90:                                               ; preds = %152, %84
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds ptr, ptr %91, i32 1
  store ptr %92, ptr %6, align 8, !tbaa !5
  %93 = load ptr, ptr %91, align 8, !tbaa !5
  store ptr %93, ptr %5, align 8, !tbaa !5
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %153

95:                                               ; preds = %90
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.vertexT, ptr %96, i32 0, i32 6
  %98 = load i8, ptr %97, align 8
  %99 = and i8 %98, 1
  %100 = zext i8 %99 to i32
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %152, label %102

102:                                              ; preds = %95
  store i32 1, ptr %7, align 4, !tbaa !9
  %103 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 175), align 8, !tbaa !26
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 175), align 8, !tbaa !26
  %105 = load ptr, ptr %2, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.facetT, ptr %105, i32 0, i32 8
  %107 = load ptr, ptr %106, align 8, !tbaa !18
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = call ptr @qh_setdelsorted(ptr noundef %107, ptr noundef %108)
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.vertexT, ptr %110, i32 0, i32 3
  %112 = load ptr, ptr %111, align 8, !tbaa !27
  %113 = load ptr, ptr %2, align 8, !tbaa !5
  %114 = call ptr @qh_setdel(ptr noundef %112, ptr noundef %113)
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.vertexT, ptr %115, i32 0, i32 3
  %117 = load ptr, ptr %116, align 8, !tbaa !27
  %118 = call i32 @qh_setsize(ptr noundef %117)
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %137, label %120

120:                                              ; preds = %102
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.vertexT, ptr %121, i32 0, i32 6
  %123 = load i8, ptr %122, align 8
  %124 = and i8 %123, -9
  %125 = or i8 %124, 8
  store i8 %125, ptr %122, align 8
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_setappend(ptr noundef getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 209), ptr noundef %126)
  %127 = load i32, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 176), align 8, !tbaa !26
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr getelementptr inbounds ([227 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 176), align 8, !tbaa !26
  %129 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !11
  %130 = icmp sge i32 %129, 2
  br i1 %130, label %131, label %136

131:                                              ; preds = %120
  %132 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !15
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.vertexT, ptr %133, i32 0, i32 4
  %135 = load i32, ptr %134, align 8, !tbaa !29
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %132, i32 noundef 2036, ptr noundef @.str.103, i32 noundef %135)
  br label %136

136:                                              ; preds = %131, %120
  br label %149

137:                                              ; preds = %102
  %138 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 24), align 8, !tbaa !11
  %139 = icmp sge i32 %138, 3
  br i1 %139, label %140, label %148

140:                                              ; preds = %137
  %141 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 151), align 8, !tbaa !15
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.vertexT, ptr %142, i32 0, i32 4
  %144 = load i32, ptr %143, align 8, !tbaa !29
  %145 = load ptr, ptr %2, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.facetT, ptr %145, i32 0, i32 14
  %147 = load i32, ptr %146, align 4, !tbaa !16
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %141, i32 noundef 3009, ptr noundef @.str.104, i32 noundef %144, i32 noundef %147)
  br label %148

148:                                              ; preds = %140, %137
  br label %149

149:                                              ; preds = %148, %136
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  %151 = getelementptr inbounds ptr, ptr %150, i32 -1
  store ptr %151, ptr %6, align 8, !tbaa !5
  br label %152

152:                                              ; preds = %149, %95
  br label %90, !llvm.loop !30

153:                                              ; preds = %90
  br label %154

154:                                              ; preds = %153, %79
  %155 = load i32, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  ret i32 %155
}

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

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

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


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

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

@qh_qh = external global %struct.qhT, align 8
@qh_qhstat = external local_unnamed_addr global %struct.qhstatT, align 8
@.str.102 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [76 x i8], align 1

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

declare i32 @qh_setsize(ptr noundef) local_unnamed_addr #0

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

declare ptr @qh_setdel(ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @qh_setdelsorted(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @qh_remove_extravertices(ptr noundef %0) local_unnamed_addr #1 {
  %2 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !5
  %3 = icmp sgt i32 %2, 3
  br i1 %3, label %4, label %8

4:                                                ; preds = %1
  %5 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  %6 = getelementptr inbounds i8, ptr %0, i64 108
  %7 = load i32, ptr %6, align 4, !tbaa !14
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %5, i32 noundef 4043, ptr noundef nonnull @.str.102, i32 noundef %7) #2
  br label %8

8:                                                ; preds = %4, %1
  %9 = getelementptr inbounds i8, ptr %0, i64 64
  %10 = load ptr, ptr %9, align 8, !tbaa !16
  %.not = icmp eq ptr %10, null
  br i1 %.not, label %.loopexit54, label %.preheader53

.preheader53:                                     ; preds = %8
  %.02755 = getelementptr inbounds i8, ptr %10, i64 8
  %11 = load ptr, ptr %.02755, align 8, !tbaa !17
  %.not3956 = icmp eq ptr %11, null
  br i1 %.not3956, label %.loopexit54, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader53, %.lr.ph
  %12 = phi ptr [ %16, %.lr.ph ], [ %11, %.preheader53 ]
  %.02757 = phi ptr [ %.027, %.lr.ph ], [ %.02755, %.preheader53 ]
  %13 = getelementptr inbounds i8, ptr %12, i64 40
  %14 = load i8, ptr %13, align 8
  %15 = and i8 %14, -2
  store i8 %15, ptr %13, align 8
  %.027 = getelementptr inbounds i8, ptr %.02757, i64 8
  %16 = load ptr, ptr %.027, align 8, !tbaa !17
  %.not39 = icmp eq ptr %16, null
  br i1 %.not39, label %.loopexit54, label %.lr.ph, !llvm.loop !18

.loopexit54:                                      ; preds = %.lr.ph, %.preheader53, %8
  %17 = getelementptr inbounds i8, ptr %0, i64 72
  %18 = load ptr, ptr %17, align 8, !tbaa !20
  %.not40 = icmp eq ptr %18, null
  br i1 %.not40, label %.loopexit52, label %.preheader51

.preheader51:                                     ; preds = %.loopexit54
  %.03062 = getelementptr inbounds i8, ptr %18, i64 8
  %19 = load ptr, ptr %.03062, align 8, !tbaa !17
  %.not4263 = icmp eq ptr %19, null
  br i1 %.not4263, label %.loopexit52, label %.lr.ph65

.lr.ph65:                                         ; preds = %.preheader51, %.loopexit50
  %20 = phi ptr [ %28, %.loopexit50 ], [ %19, %.preheader51 ]
  %.03064 = phi ptr [ %.030, %.loopexit50 ], [ %.03062, %.preheader51 ]
  %21 = load ptr, ptr %20, align 8, !tbaa !21
  %.not47 = icmp eq ptr %21, null
  br i1 %.not47, label %.loopexit50, label %.preheader

.preheader:                                       ; preds = %.lr.ph65
  %.12858 = getelementptr inbounds i8, ptr %21, i64 8
  %22 = load ptr, ptr %.12858, align 8, !tbaa !17
  %.not4959 = icmp eq ptr %22, null
  br i1 %.not4959, label %.loopexit50, label %.lr.ph61

.lr.ph61:                                         ; preds = %.preheader, %.lr.ph61
  %23 = phi ptr [ %27, %.lr.ph61 ], [ %22, %.preheader ]
  %.12860 = phi ptr [ %.128, %.lr.ph61 ], [ %.12858, %.preheader ]
  %24 = getelementptr inbounds i8, ptr %23, i64 40
  %25 = load i8, ptr %24, align 8
  %26 = or i8 %25, 1
  store i8 %26, ptr %24, align 8
  %.128 = getelementptr inbounds i8, ptr %.12860, i64 8
  %27 = load ptr, ptr %.128, align 8, !tbaa !17
  %.not49 = icmp eq ptr %27, null
  br i1 %.not49, label %.loopexit50, label %.lr.ph61, !llvm.loop !23

.loopexit50:                                      ; preds = %.lr.ph61, %.preheader, %.lr.ph65
  %.030 = getelementptr inbounds i8, ptr %.03064, i64 8
  %28 = load ptr, ptr %.030, align 8, !tbaa !17
  %.not42 = icmp eq ptr %28, null
  br i1 %.not42, label %.loopexit52, label %.lr.ph65, !llvm.loop !24

.loopexit52:                                      ; preds = %.loopexit50, %.preheader51, %.loopexit54
  %29 = load ptr, ptr %9, align 8, !tbaa !16
  %.not43 = icmp eq ptr %29, null
  br i1 %.not43, label %.loopexit, label %30

30:                                               ; preds = %.loopexit52
  %31 = getelementptr inbounds i8, ptr %29, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !17
  %.not4466 = icmp eq ptr %32, null
  br i1 %.not4466, label %.loopexit, label %.lr.ph69

.lr.ph69:                                         ; preds = %30
  %33 = getelementptr inbounds i8, ptr %0, i64 108
  br label %34

34:                                               ; preds = %.lr.ph69, %69
  %35 = phi ptr [ %32, %.lr.ph69 ], [ %70, %69 ]
  %.068 = phi i32 [ 0, %.lr.ph69 ], [ %.1, %69 ]
  %.22967 = phi ptr [ %31, %.lr.ph69 ], [ %.3, %69 ]
  %36 = getelementptr inbounds i8, ptr %.22967, i64 8
  %37 = getelementptr inbounds i8, ptr %35, i64 40
  %38 = load i8, ptr %37, align 8
  %39 = and i8 %38, 1
  %.not45 = icmp eq i8 %39, 0
  br i1 %.not45, label %40, label %69

40:                                               ; preds = %34
  %41 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1400), align 8, !tbaa !25
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1400), align 8, !tbaa !25
  %43 = load ptr, ptr %9, align 8, !tbaa !16
  %44 = tail call ptr @qh_setdelsorted(ptr noundef %43, ptr noundef nonnull %35) #2
  %45 = getelementptr inbounds i8, ptr %35, i64 24
  %46 = load ptr, ptr %45, align 8, !tbaa !26
  %47 = tail call ptr @qh_setdel(ptr noundef %46, ptr noundef %0) #2
  %48 = load ptr, ptr %45, align 8, !tbaa !26
  %49 = tail call i32 @qh_setsize(ptr noundef %48) #2
  %.not46 = icmp eq i32 %49, 0
  br i1 %.not46, label %50, label %61

50:                                               ; preds = %40
  %51 = load i8, ptr %37, align 8
  %52 = or i8 %51, 8
  store i8 %52, ptr %37, align 8
  tail call void @qh_setappend(ptr noundef nonnull getelementptr inbounds (i8, ptr @qh_qh, i64 2760), ptr noundef nonnull %35) #2
  %53 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1408), align 8, !tbaa !25
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 1408), align 8, !tbaa !25
  %55 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !5
  %56 = icmp sgt i32 %55, 1
  br i1 %56, label %57, label %69

57:                                               ; preds = %50
  %58 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  %59 = getelementptr inbounds i8, ptr %35, i64 32
  %60 = load i32, ptr %59, align 8, !tbaa !28
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %58, i32 noundef 2036, ptr noundef nonnull @.str.103, i32 noundef %60) #2
  br label %69

61:                                               ; preds = %40
  %62 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 128), align 8, !tbaa !5
  %63 = icmp sgt i32 %62, 2
  br i1 %63, label %64, label %69

64:                                               ; preds = %61
  %65 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2408), align 8, !tbaa !13
  %66 = getelementptr inbounds i8, ptr %35, i64 32
  %67 = load i32, ptr %66, align 8, !tbaa !28
  %68 = load i32, ptr %33, align 4, !tbaa !14
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %65, i32 noundef 3009, ptr noundef nonnull @.str.104, i32 noundef %67, i32 noundef %68) #2
  br label %69

69:                                               ; preds = %57, %50, %64, %61, %34
  %.3 = phi ptr [ %36, %34 ], [ %.22967, %61 ], [ %.22967, %64 ], [ %.22967, %50 ], [ %.22967, %57 ]
  %.1 = phi i32 [ %.068, %34 ], [ 1, %61 ], [ 1, %64 ], [ 1, %50 ], [ 1, %57 ]
  %70 = load ptr, ptr %.3, align 8, !tbaa !17
  %.not44 = icmp eq ptr %70, null
  br i1 %.not44, label %.loopexit, label %34, !llvm.loop !29

.loopexit:                                        ; preds = %69, %30, %.loopexit52
  %.2 = phi i32 [ 0, %.loopexit52 ], [ 0, %30 ], [ %.1, %69 ]
  ret i32 %.2
}

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

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

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


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