; LLVM IR from jrl-umi3218/mc_rtc :: 3rd-party/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, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, double, 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, double, double, double, i32, 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, double, ptr, double, double, double, double, i32, [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, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, double, i32, i32, i32, i32, 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 { [249 x %union.intrealT], [259 x i8], [249 x ptr], [249 x i16], [249 x i8], [249 x i8], [9 x %union.intrealT], i32, i32, i32, i32, double }
%union.intrealT = type { double }
%struct.vertexT = type { ptr, ptr, ptr, ptr, i32, i32, i8 }
%struct.setT = type { i32, [1 x %union.setelemT] }
%union.setelemT = type { ptr }
%struct.facetT = type { double, double, double, ptr, %union.anon, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32 }
%union.anon = type { double }

@qh_qh = external global %struct.qhT, align 8
@qh_qhstat = external global %struct.qhstatT, align 8
@.str.184 = external hidden unnamed_addr constant [72 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_settempfree(ptr noundef) #1

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

declare void @qh_settemppush(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local ptr @qh_neighbor_intersections(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 ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  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 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store ptr null, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.vertexT, ptr %12, i32 0, i32 3
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  %15 = icmp ne ptr %14, null
  br i1 %15, label %16, label %37

16:                                               ; preds = %1
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.vertexT, ptr %17, i32 0, i32 3
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = getelementptr inbounds %struct.setT, ptr %19, i32 0, i32 1
  %21 = getelementptr inbounds [1 x %union.setelemT], ptr %20, i64 0, i64 0
  store ptr %21, ptr %5, align 8, !tbaa !5
  br label %22

22:                                               ; preds = %35, %16
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds ptr, ptr %23, i32 1
  store ptr %24, ptr %5, align 8, !tbaa !5
  %25 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %25, ptr %4, align 8, !tbaa !5
  %26 = icmp ne ptr %25, null
  br i1 %26, label %27, label %36

27:                                               ; preds = %22
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.facetT, ptr %28, i32 0, i32 15
  %30 = load i32, ptr %29, align 8
  %31 = lshr i32 %30, 13
  %32 = and i32 %31, 1
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %35

34:                                               ; preds = %27
  store ptr null, ptr %2, align 8
  store i32 1, ptr %11, align 4
  br label %137

35:                                               ; preds = %27
  br label %22, !llvm.loop !12

36:                                               ; preds = %22
  br label %37

37:                                               ; preds = %36, %1
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.vertexT, ptr %38, i32 0, i32 3
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = getelementptr inbounds %struct.setT, ptr %40, i32 0, i32 1
  %42 = getelementptr inbounds [1 x %union.setelemT], ptr %41, i64 0, i64 0
  %43 = load ptr, ptr %42, align 8, !tbaa !14
  store ptr %43, ptr %6, align 8, !tbaa !5
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.vertexT, ptr %44, i32 0, i32 3
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct.setT, ptr %46, i32 0, i32 1
  %48 = getelementptr inbounds [1 x %union.setelemT], ptr %47, i64 0, i64 1
  %49 = load ptr, ptr %48, align 8, !tbaa !14
  store ptr %49, ptr %7, align 8, !tbaa !5
  %50 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 114), align 8, !tbaa !14
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 114), align 8, !tbaa !14
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %55, label %54

54:                                               ; preds = %37
  store ptr null, ptr %2, align 8
  store i32 1, ptr %11, align 4
  br label %137

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

58:                                               ; preds = %55
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.facetT, ptr %59, i32 0, i32 8
  %61 = load ptr, ptr %60, align 8, !tbaa !15
  %62 = call ptr @qh_setcopy(ptr noundef %61, i32 noundef 0)
  store ptr %62, ptr %8, align 8, !tbaa !5
  br label %71

63:                                               ; preds = %55
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.facetT, ptr %64, i32 0, i32 8
  %66 = load ptr, ptr %65, align 8, !tbaa !15
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.facetT, ptr %67, i32 0, i32 8
  %69 = load ptr, ptr %68, align 8, !tbaa !15
  %70 = call ptr @qh_vertexintersect_new(ptr noundef %66, ptr noundef %69)
  store ptr %70, ptr %8, align 8, !tbaa !5
  br label %71

71:                                               ; preds = %63, %58
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  call void @qh_settemppush(ptr noundef %72)
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = call ptr @qh_setdelsorted(ptr noundef %73, ptr noundef %74)
  store ptr null, ptr %4, align 8, !tbaa !5
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.vertexT, ptr %76, i32 0, i32 3
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %125

80:                                               ; preds = %71
  store i32 0, ptr %9, align 4, !tbaa !18
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.vertexT, ptr %81, i32 0, i32 3
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.setT, ptr %83, i32 0, i32 1
  %85 = getelementptr inbounds [1 x %union.setelemT], ptr %84, i64 0, i64 0
  %86 = load ptr, ptr %85, align 8, !tbaa !14
  store ptr %86, ptr %4, align 8, !tbaa !5
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.vertexT, ptr %87, i32 0, i32 3
  %89 = load ptr, ptr %88, align 8, !tbaa !9
  %90 = call i32 @qh_setsize(ptr noundef %89)
  store i32 %90, ptr %10, align 4, !tbaa !18
  br label %91

91:                                               ; preds = %114, %80
  %92 = load i32, ptr %9, align 4, !tbaa !18
  %93 = load i32, ptr %10, align 4, !tbaa !18
  %94 = icmp slt i32 %92, %93
  br i1 %94, label %95, label %124

95:                                               ; preds = %91
  %96 = load i32, ptr %9, align 4, !tbaa !18
  %97 = icmp sge i32 %96, 2
  br i1 %97, label %98, label %113

98:                                               ; preds = %95
  %99 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 114), align 8, !tbaa !14
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 114), align 8, !tbaa !14
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.facetT, ptr %101, i32 0, i32 8
  %103 = load ptr, ptr %102, align 8, !tbaa !15
  call void @qh_vertexintersect(ptr noundef %8, ptr noundef %103)
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.setT, ptr %104, i32 0, i32 1
  %106 = getelementptr inbounds [1 x %union.setelemT], ptr %105, i64 0, i64 0
  %107 = load ptr, ptr %106, align 8, !tbaa !14
  %108 = icmp ne ptr %107, null
  br i1 %108, label %112, label %109

109:                                              ; preds = %98
  %110 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 112), align 8, !tbaa !14
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 112), align 8, !tbaa !14
  call void @qh_settempfree(ptr noundef %8)
  store ptr null, ptr %2, align 8
  store i32 1, ptr %11, align 4
  br label %137

112:                                              ; preds = %98
  br label %113

113:                                              ; preds = %112, %95
  br label %114

114:                                              ; preds = %113
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.vertexT, ptr %115, i32 0, i32 3
  %117 = load ptr, ptr %116, align 8, !tbaa !9
  %118 = getelementptr inbounds %struct.setT, ptr %117, i32 0, i32 1
  %119 = load i32, ptr %9, align 4, !tbaa !18
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %9, align 4, !tbaa !18
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [1 x %union.setelemT], ptr %118, i64 0, i64 %121
  %123 = load ptr, ptr %122, align 8, !tbaa !14
  store ptr %123, ptr %4, align 8, !tbaa !5
  br label %91, !llvm.loop !19

124:                                              ; preds = %91
  br label %125

125:                                              ; preds = %124, %71
  %126 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !20
  %127 = icmp sge i32 %126, 3
  br i1 %127, label %128, label %135

128:                                              ; preds = %125
  %129 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !23
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = call i32 @qh_setsize(ptr noundef %130)
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.vertexT, ptr %132, i32 0, i32 4
  %134 = load i32, ptr %133, align 8, !tbaa !24
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %129, i32 noundef 3007, ptr noundef @.str.184, i32 noundef %131, i32 noundef %134)
  br label %135

135:                                              ; preds = %128, %125
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %136, ptr %2, align 8
  store i32 1, ptr %11, align 4
  br label %137

137:                                              ; preds = %135, %109, %54, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, 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
  %138 = load ptr, ptr %2, align 8
  ret ptr %138
}

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 24}
!10 = !{!"vertexT", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 40, !11, i64 40, !11, i64 40, !11, i64 40, !11, i64 40}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !6, i64 64}
!16 = !{!"facetT", !17, i64 0, !17, i64 8, !17, 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, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 113, !11, i64 113, !11, i64 113, !11, i64 113, !11, i64 113, !11, i64 113, !11, i64 113, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 115, !11, i64 115, !11, i64 115, !11, i64 115, !11, i64 115, !11, i64 115, !11, i64 115, !11, i64 115}
!17 = !{!"double", !7, i64 0}
!18 = !{!11, !11, i64 0}
!19 = distinct !{!19, !13}
!20 = !{!21, !11, i64 136}
!21 = !{!"qhT", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !17, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !17, i64 64, !17, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !6, i64 104, !11, i64 112, !11, i64 116, !6, i64 120, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144, !11, i64 148, !11, i64 152, !17, i64 160, !17, i64 168, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !17, i64 192, !17, i64 200, !11, i64 208, !11, i64 212, !17, i64 216, !11, i64 224, !11, i64 228, !11, i64 232, !11, i64 236, !11, i64 240, !11, i64 244, !11, i64 248, !11, i64 252, !11, i64 256, !11, i64 260, !11, i64 264, !11, i64 268, !11, i64 272, !11, i64 276, !11, i64 280, !11, i64 284, !11, i64 288, !11, i64 292, !11, i64 296, !7, i64 300, !11, i64 416, !11, i64 420, !11, i64 424, !11, i64 428, !11, i64 432, !11, i64 436, !11, i64 440, !11, i64 444, !17, i64 448, !17, i64 456, !17, i64 464, !11, i64 472, !11, i64 476, !11, i64 480, !11, i64 484, !11, i64 488, !11, i64 492, !11, i64 496, !11, i64 500, !11, i64 504, !11, i64 508, !11, i64 512, !11, i64 516, !11, i64 520, !11, i64 524, !11, i64 528, !11, i64 532, !11, i64 536, !11, i64 540, !11, i64 544, !17, i64 552, !11, i64 560, !11, i64 564, !11, i64 568, !11, i64 572, !11, i64 576, !11, i64 580, !11, i64 584, !11, i64 588, !17, i64 592, !11, i64 600, !6, i64 608, !6, i64 616, !11, i64 624, !11, i64 628, !11, i64 632, !11, i64 636, !11, i64 640, !6, i64 648, !11, i64 656, !6, i64 664, !11, i64 672, !7, i64 676, !11, i64 932, !7, i64 936, !7, i64 1192, !11, i64 1704, !11, i64 1708, !11, i64 1712, !11, i64 1716, !11, i64 1720, !11, i64 1724, !6, i64 1728, !6, i64 1736, !6, i64 1744, !6, i64 1752, !17, i64 1760, !17, i64 1768, !17, i64 1776, !17, i64 1784, !17, i64 1792, !17, i64 1800, !17, i64 1808, !17, i64 1816, !17, i64 1824, !17, i64 1832, !17, i64 1840, !17, i64 1848, !17, i64 1856, !17, i64 1864, !6, i64 1872, !17, i64 1880, !17, i64 1888, !17, i64 1896, !17, i64 1904, !11, i64 1912, !7, i64 1916, !7, i64 1928, !7, i64 2128, !7, i64 2168, !7, i64 2368, !6, i64 2408, !6, i64 2416, !6, i64 2424, !6, i64 2432, !11, i64 2440, !11, i64 2444, !11, i64 2448, !6, i64 2456, !6, i64 2464, !6, i64 2472, !6, i64 2480, !6, i64 2488, !11, i64 2496, !11, i64 2500, !6, i64 2504, !11, i64 2512, !6, i64 2520, !11, i64 2528, !6, i64 2536, !6, i64 2544, !6, i64 2552, !6, i64 2560, !11, i64 2568, !11, i64 2572, !11, i64 2576, !11, i64 2580, !11, i64 2584, !11, i64 2588, !11, i64 2592, !11, i64 2596, !22, i64 2600, !11, i64 2608, !11, i64 2612, !11, i64 2616, !11, i64 2620, !11, i64 2624, !6, i64 2632, !6, i64 2640, !11, i64 2648, !11, i64 2652, !11, i64 2656, !17, i64 2664, !11, i64 2672, !17, i64 2680, !17, i64 2688, !17, i64 2696, !11, i64 2704, !11, i64 2708, !11, i64 2712, !11, i64 2716, !11, i64 2720, !17, i64 2728, !17, i64 2736, !11, i64 2744, !11, i64 2748, !11, i64 2752, !11, i64 2756, !11, i64 2760, !11, i64 2764, !17, i64 2768, !17, i64 2776, !11, i64 2784, !11, i64 2788, !11, i64 2792, !11, i64 2796, !6, i64 2800, !6, i64 2808, !6, i64 2816, !6, i64 2824, !6, i64 2832, !6, i64 2840, !6, i64 2848, !6, i64 2856, !6, i64 2864, !11, i64 2872, !6, i64 2880, !6, i64 2888, !11, i64 2896, !11, i64 2900, !11, i64 2904, !6, i64 2912, !17, i64 2920, !17, i64 2928, !17, i64 2936, !17, i64 2944, !11, i64 2952, !11, i64 2956, !11, i64 2960, !11, i64 2964, !11, i64 2968, !11, i64 2972, !6, i64 2976, !6, i64 2984, !11, i64 2992}
!22 = !{!"long", !7, i64 0}
!23 = !{!21, !6, i64 2424}
!24 = !{!10, !11, i64 32}


; 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, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, double, 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, double, double, double, i32, 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, double, ptr, double, double, double, double, i32, [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, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, double, i32, i32, i32, i32, 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 { [249 x %union.intrealT], [259 x i8], [249 x ptr], [249 x i16], [249 x i8], [249 x i8], [9 x %union.intrealT], i32, i32, i32, i32, double }
%union.intrealT = type { double }
%union.setelemT = type { ptr }

@qh_qh = external local_unnamed_addr global %struct.qhT, align 8
@qh_qhstat = external local_unnamed_addr global %struct.qhstatT, align 8
@.str.184 = external hidden unnamed_addr constant [72 x i8], align 1

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

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

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

declare i32 @qh_setsize(ptr noundef) local_unnamed_addr #1

declare void @qh_settempfree(ptr noundef) local_unnamed_addr #1

declare ptr @qh_vertexintersect_new(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @qh_settemppush(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local ptr @qh_neighbor_intersections(ptr noundef %0) local_unnamed_addr #2 {
  %2 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  %3 = getelementptr inbounds i8, ptr %0, i64 24
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %.loopexit36, label %.preheader

.preheader:                                       ; preds = %1, %6
  %.pn = phi ptr [ %.024, %6 ], [ %4, %1 ]
  %.024 = getelementptr inbounds i8, ptr %.pn, i64 8
  %5 = load ptr, ptr %.024, align 8, !tbaa !11
  %.not30 = icmp eq ptr %5, null
  br i1 %.not30, label %.loopexit36, label %6

6:                                                ; preds = %.preheader
  %7 = getelementptr inbounds i8, ptr %5, i64 112
  %8 = load i32, ptr %7, align 8
  %9 = and i32 %8, 8192
  %.not35 = icmp eq i32 %9, 0
  br i1 %.not35, label %.preheader, label %.loopexit37, !llvm.loop !12

.loopexit36:                                      ; preds = %.preheader, %1
  %10 = getelementptr inbounds i8, ptr %4, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %4, i64 16
  %13 = load ptr, ptr %12, align 8, !tbaa !14
  %14 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 912), align 8, !tbaa !14
  %15 = add nsw i32 %14, 1
  store i32 %15, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 912), align 8, !tbaa !14
  %.not31 = icmp eq ptr %11, null
  br i1 %.not31, label %.loopexit37, label %16

16:                                               ; preds = %.loopexit36
  %.not32 = icmp eq ptr %13, null
  %17 = getelementptr inbounds i8, ptr %11, i64 64
  %18 = load ptr, ptr %17, align 8, !tbaa !15
  br i1 %.not32, label %19, label %21

19:                                               ; preds = %16
  %20 = tail call ptr @qh_setcopy(ptr noundef %18, i32 noundef 0) #3
  br label %25

21:                                               ; preds = %16
  %22 = getelementptr inbounds i8, ptr %13, i64 64
  %23 = load ptr, ptr %22, align 8, !tbaa !15
  %24 = tail call ptr @qh_vertexintersect_new(ptr noundef %18, ptr noundef %23) #3
  br label %25

25:                                               ; preds = %21, %19
  %storemerge = phi ptr [ %20, %19 ], [ %24, %21 ]
  store ptr %storemerge, ptr %2, align 8, !tbaa !11
  tail call void @qh_settemppush(ptr noundef %storemerge) #3
  %26 = tail call ptr @qh_setdelsorted(ptr noundef %storemerge, ptr noundef %0) #3
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %.not33 = icmp eq ptr %27, null
  br i1 %.not33, label %.loopexit, label %28

28:                                               ; preds = %25
  %29 = tail call i32 @qh_setsize(ptr noundef nonnull %27) #3
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %31, label %.loopexit

31:                                               ; preds = %28
  %wide.trip.count = zext nneg i32 %29 to i64
  %switch = icmp ult i32 %29, 3
  br i1 %switch, label %.loopexit, label %.lr.ph.peel.next41.preheader

.lr.ph.peel.next41.preheader:                     ; preds = %31
  %.pre = load ptr, ptr %3, align 8, !tbaa !5
  %.phi.trans.insert53 = getelementptr inbounds i8, ptr %.pre, i64 24
  br label %.lr.ph.peel.next41

.lr.ph.peel.next41:                               ; preds = %.lr.ph.peel.next41.preheader, %._crit_edge55
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge55 ], [ 2, %.lr.ph.peel.next41.preheader ]
  %.02338.in = phi ptr [ %41, %._crit_edge55 ], [ %.phi.trans.insert53, %.lr.ph.peel.next41.preheader ]
  %.02338 = load ptr, ptr %.02338.in, align 8, !tbaa !14
  %32 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 912), align 8, !tbaa !14
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 912), align 8, !tbaa !14
  %34 = getelementptr inbounds i8, ptr %.02338, i64 64
  %35 = load ptr, ptr %34, align 8, !tbaa !15
  call void @qh_vertexintersect(ptr noundef nonnull %2, ptr noundef %35) #3
  %36 = load ptr, ptr %2, align 8, !tbaa !11
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %38 = load ptr, ptr %37, align 8, !tbaa !14
  %.not34 = icmp eq ptr %38, null
  br i1 %.not34, label %.loopexit47, label %._crit_edge55

.loopexit47:                                      ; preds = %.lr.ph.peel.next41
  %.pre58 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 896), align 8, !tbaa !14
  %39 = add nsw i32 %.pre58, 1
  store i32 %39, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 896), align 8, !tbaa !14
  call void @qh_settempfree(ptr noundef nonnull %2) #3
  br label %.loopexit37

._crit_edge55:                                    ; preds = %.lr.ph.peel.next41
  %.pre56 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %.pre56, i64 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %41 = getelementptr inbounds [1 x %union.setelemT], ptr %40, i64 0, i64 %indvars.iv.next
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph.peel.next41, !llvm.loop !18

.loopexit:                                        ; preds = %._crit_edge55, %31, %28, %25
  %42 = phi ptr [ %storemerge, %28 ], [ %storemerge, %25 ], [ %storemerge, %31 ], [ %36, %._crit_edge55 ]
  %43 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !20
  %44 = icmp sgt i32 %43, 2
  br i1 %44, label %45, label %.loopexit37

45:                                               ; preds = %.loopexit
  %46 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !23
  %47 = call i32 @qh_setsize(ptr noundef %42) #3
  %48 = getelementptr inbounds i8, ptr %0, i64 32
  %49 = load i32, ptr %48, align 8, !tbaa !24
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %46, i32 noundef 3007, ptr noundef nonnull @.str.184, i32 noundef %47, i32 noundef %49) #3
  %.pre59 = load ptr, ptr %2, align 8, !tbaa !11
  br label %.loopexit37

.loopexit37:                                      ; preds = %6, %.loopexit, %45, %.loopexit36, %.loopexit47
  %.0 = phi ptr [ null, %.loopexit47 ], [ null, %.loopexit36 ], [ %.pre59, %45 ], [ %42, %.loopexit ], [ null, %6 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  ret ptr %.0
}

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 24}
!6 = !{!"vertexT", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 40, !10, i64 40, !10, i64 40, !10, i64 40, !10, i64 40}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!8, !8, i64 0}
!15 = !{!16, !7, i64 64}
!16 = !{!"facetT", !17, i64 0, !17, i64 8, !17, i64 16, !7, i64 24, !8, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, 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}
!17 = !{!"double", !8, i64 0}
!18 = distinct !{!18, !13, !19}
!19 = !{!"llvm.loop.peeled.count", i32 2}
!20 = !{!21, !10, i64 136}
!21 = !{!"qhT", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !17, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !17, i64 64, !17, i64 72, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !7, i64 104, !10, i64 112, !10, i64 116, !7, i64 120, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !17, i64 160, !17, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !17, i64 192, !17, i64 200, !10, i64 208, !10, i64 212, !17, i64 216, !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, !10, i64 296, !8, i64 300, !10, i64 416, !10, i64 420, !10, i64 424, !10, i64 428, !10, i64 432, !10, i64 436, !10, i64 440, !10, i64 444, !17, i64 448, !17, i64 456, !17, 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, !10, i64 544, !17, i64 552, !10, i64 560, !10, i64 564, !10, i64 568, !10, i64 572, !10, i64 576, !10, i64 580, !10, i64 584, !10, i64 588, !17, i64 592, !10, i64 600, !7, i64 608, !7, i64 616, !10, i64 624, !10, i64 628, !10, i64 632, !10, i64 636, !10, i64 640, !7, i64 648, !10, i64 656, !7, i64 664, !10, i64 672, !8, i64 676, !10, i64 932, !8, i64 936, !8, i64 1192, !10, i64 1704, !10, i64 1708, !10, i64 1712, !10, i64 1716, !10, i64 1720, !10, i64 1724, !7, i64 1728, !7, i64 1736, !7, i64 1744, !7, i64 1752, !17, i64 1760, !17, i64 1768, !17, i64 1776, !17, i64 1784, !17, i64 1792, !17, i64 1800, !17, i64 1808, !17, i64 1816, !17, i64 1824, !17, i64 1832, !17, i64 1840, !17, i64 1848, !17, i64 1856, !17, i64 1864, !7, i64 1872, !17, i64 1880, !17, i64 1888, !17, i64 1896, !17, i64 1904, !10, i64 1912, !8, i64 1916, !8, i64 1928, !8, i64 2128, !8, i64 2168, !8, i64 2368, !7, i64 2408, !7, i64 2416, !7, i64 2424, !7, i64 2432, !10, i64 2440, !10, i64 2444, !10, i64 2448, !7, i64 2456, !7, i64 2464, !7, i64 2472, !7, i64 2480, !7, i64 2488, !10, i64 2496, !10, i64 2500, !7, i64 2504, !10, i64 2512, !7, i64 2520, !10, i64 2528, !7, i64 2536, !7, i64 2544, !7, i64 2552, !7, i64 2560, !10, i64 2568, !10, i64 2572, !10, i64 2576, !10, i64 2580, !10, i64 2584, !10, i64 2588, !10, i64 2592, !10, i64 2596, !22, i64 2600, !10, i64 2608, !10, i64 2612, !10, i64 2616, !10, i64 2620, !10, i64 2624, !7, i64 2632, !7, i64 2640, !10, i64 2648, !10, i64 2652, !10, i64 2656, !17, i64 2664, !10, i64 2672, !17, i64 2680, !17, i64 2688, !17, i64 2696, !10, i64 2704, !10, i64 2708, !10, i64 2712, !10, i64 2716, !10, i64 2720, !17, i64 2728, !17, i64 2736, !10, i64 2744, !10, i64 2748, !10, i64 2752, !10, i64 2756, !10, i64 2760, !10, i64 2764, !17, i64 2768, !17, i64 2776, !10, i64 2784, !10, i64 2788, !10, i64 2792, !10, i64 2796, !7, i64 2800, !7, i64 2808, !7, i64 2816, !7, i64 2824, !7, i64 2832, !7, i64 2840, !7, i64 2848, !7, i64 2856, !7, i64 2864, !10, i64 2872, !7, i64 2880, !7, i64 2888, !10, i64 2896, !10, i64 2900, !10, i64 2904, !7, i64 2912, !17, i64 2920, !17, i64 2928, !17, i64 2936, !17, i64 2944, !10, i64 2952, !10, i64 2956, !10, i64 2960, !10, i64 2964, !10, i64 2968, !10, i64 2972, !7, i64 2976, !7, i64 2984, !10, i64 2992}
!22 = !{!"long", !8, i64 0}
!23 = !{!21, !7, i64 2424}
!24 = !{!6, !10, i64 32}


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