; LLVM IR from jrl-umi3218/mc_rtc :: 3rd-party/qhull/src/libqhull_r (merge_r)

; 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.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 }
%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, i32, i32, [1 x %struct.__jmp_buf_tag], [40 x i8], i32, double, ptr, ptr, ptr, %struct.qhmemT, %struct.qhstatT }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.qhmemT = type { i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%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 }

@.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, 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, ptr noundef) #1

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

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

declare void @qh_settemppush(ptr noundef, 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, ptr noundef %1) #2 {
  %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 ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store ptr null, ptr %6, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.vertexT, ptr %14, i32 0, i32 3
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = icmp ne ptr %16, null
  br i1 %17, label %18, label %39

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

24:                                               ; preds = %37, %18
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = getelementptr inbounds ptr, ptr %25, i32 1
  store ptr %26, ptr %7, align 8, !tbaa !5
  %27 = load ptr, ptr %25, align 8, !tbaa !5
  store ptr %27, ptr %6, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %38

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

36:                                               ; preds = %29
  store ptr null, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %163

37:                                               ; preds = %29
  br label %24, !llvm.loop !12

38:                                               ; preds = %24
  br label %39

39:                                               ; preds = %38, %2
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.vertexT, ptr %40, i32 0, i32 3
  %42 = load ptr, ptr %41, align 8, !tbaa !9
  %43 = getelementptr inbounds %struct.setT, ptr %42, i32 0, i32 1
  %44 = getelementptr inbounds [1 x %union.setelemT], ptr %43, i64 0, i64 0
  %45 = load ptr, ptr %44, align 8, !tbaa !14
  store ptr %45, ptr %8, align 8, !tbaa !5
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.vertexT, ptr %46, i32 0, i32 3
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  %49 = getelementptr inbounds %struct.setT, ptr %48, i32 0, i32 1
  %50 = getelementptr inbounds [1 x %union.setelemT], ptr %49, i64 0, i64 1
  %51 = load ptr, ptr %50, align 8, !tbaa !14
  store ptr %51, ptr %9, align 8, !tbaa !5
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.qhT, ptr %52, i32 0, i32 258
  %54 = getelementptr inbounds %struct.qhstatT, ptr %53, i32 0, i32 0
  %55 = getelementptr inbounds [249 x %union.intrealT], ptr %54, i64 0, i64 114
  %56 = load i32, ptr %55, align 8, !tbaa !14
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %55, align 8, !tbaa !14
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = icmp ne ptr %58, null
  br i1 %59, label %61, label %60

60:                                               ; preds = %39
  store ptr null, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %163

61:                                               ; preds = %39
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = icmp ne ptr %62, null
  br i1 %63, label %70, label %64

64:                                               ; preds = %61
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.facetT, ptr %66, i32 0, i32 8
  %68 = load ptr, ptr %67, align 8, !tbaa !15
  %69 = call ptr @qh_setcopy(ptr noundef %65, ptr noundef %68, i32 noundef 0)
  store ptr %69, ptr %10, align 8, !tbaa !5
  br label %79

70:                                               ; preds = %61
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.facetT, ptr %72, i32 0, i32 8
  %74 = load ptr, ptr %73, align 8, !tbaa !15
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.facetT, ptr %75, i32 0, i32 8
  %77 = load ptr, ptr %76, align 8, !tbaa !15
  %78 = call ptr @qh_vertexintersect_new(ptr noundef %71, ptr noundef %74, ptr noundef %77)
  store ptr %78, ptr %10, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %70, %64
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  call void @qh_settemppush(ptr noundef %80, ptr noundef %81)
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = call ptr @qh_setdelsorted(ptr noundef %82, ptr noundef %83)
  store ptr null, ptr %6, align 8, !tbaa !5
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.vertexT, ptr %85, i32 0, i32 3
  %87 = load ptr, ptr %86, align 8, !tbaa !9
  %88 = icmp ne ptr %87, null
  br i1 %88, label %89, label %145

89:                                               ; preds = %79
  store i32 0, ptr %11, align 4, !tbaa !18
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.vertexT, ptr %90, i32 0, i32 3
  %92 = load ptr, ptr %91, align 8, !tbaa !9
  %93 = getelementptr inbounds %struct.setT, ptr %92, i32 0, i32 1
  %94 = getelementptr inbounds [1 x %union.setelemT], ptr %93, i64 0, i64 0
  %95 = load ptr, ptr %94, align 8, !tbaa !14
  store ptr %95, ptr %6, align 8, !tbaa !5
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.vertexT, ptr %97, i32 0, i32 3
  %99 = load ptr, ptr %98, align 8, !tbaa !9
  %100 = call i32 @qh_setsize(ptr noundef %96, ptr noundef %99)
  store i32 %100, ptr %12, align 4, !tbaa !18
  br label %101

101:                                              ; preds = %134, %89
  %102 = load i32, ptr %11, align 4, !tbaa !18
  %103 = load i32, ptr %12, align 4, !tbaa !18
  %104 = icmp slt i32 %102, %103
  br i1 %104, label %105, label %144

105:                                              ; preds = %101
  %106 = load i32, ptr %11, align 4, !tbaa !18
  %107 = icmp sge i32 %106, 2
  br i1 %107, label %108, label %133

108:                                              ; preds = %105
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.qhT, ptr %109, i32 0, i32 258
  %111 = getelementptr inbounds %struct.qhstatT, ptr %110, i32 0, i32 0
  %112 = getelementptr inbounds [249 x %union.intrealT], ptr %111, i64 0, i64 114
  %113 = load i32, ptr %112, align 8, !tbaa !14
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %112, align 8, !tbaa !14
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.facetT, ptr %116, i32 0, i32 8
  %118 = load ptr, ptr %117, align 8, !tbaa !15
  call void @qh_vertexintersect(ptr noundef %115, ptr noundef %10, ptr noundef %118)
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.setT, ptr %119, i32 0, i32 1
  %121 = getelementptr inbounds [1 x %union.setelemT], ptr %120, i64 0, i64 0
  %122 = load ptr, ptr %121, align 8, !tbaa !14
  %123 = icmp ne ptr %122, null
  br i1 %123, label %132, label %124

124:                                              ; preds = %108
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.qhT, ptr %125, i32 0, i32 258
  %127 = getelementptr inbounds %struct.qhstatT, ptr %126, i32 0, i32 0
  %128 = getelementptr inbounds [249 x %union.intrealT], ptr %127, i64 0, i64 112
  %129 = load i32, ptr %128, align 8, !tbaa !14
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %128, align 8, !tbaa !14
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  call void @qh_settempfree(ptr noundef %131, ptr noundef %10)
  store ptr null, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %163

132:                                              ; preds = %108
  br label %133

133:                                              ; preds = %132, %105
  br label %134

134:                                              ; preds = %133
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.vertexT, ptr %135, i32 0, i32 3
  %137 = load ptr, ptr %136, align 8, !tbaa !9
  %138 = getelementptr inbounds %struct.setT, ptr %137, i32 0, i32 1
  %139 = load i32, ptr %11, align 4, !tbaa !18
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %11, align 4, !tbaa !18
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [1 x %union.setelemT], ptr %138, i64 0, i64 %141
  %143 = load ptr, ptr %142, align 8, !tbaa !14
  store ptr %143, ptr %6, align 8, !tbaa !5
  br label %101, !llvm.loop !19

144:                                              ; preds = %101
  br label %145

145:                                              ; preds = %144, %79
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.qhT, ptr %146, i32 0, i32 29
  %148 = load i32, ptr %147, align 8, !tbaa !20
  %149 = icmp sge i32 %148, 3
  br i1 %149, label %150, label %161

150:                                              ; preds = %145
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.qhT, ptr %152, i32 0, i32 158
  %154 = load ptr, ptr %153, align 8, !tbaa !25
  %155 = load ptr, ptr %4, align 8, !tbaa !5
  %156 = load ptr, ptr %10, align 8, !tbaa !5
  %157 = call i32 @qh_setsize(ptr noundef %155, ptr noundef %156)
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.vertexT, ptr %158, i32 0, i32 4
  %160 = load i32, ptr %159, align 8, !tbaa !26
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %151, ptr noundef %154, i32 noundef 3007, ptr noundef @.str.184, i32 noundef %157, i32 noundef %160)
  br label %161

161:                                              ; preds = %150, %145
  %162 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %162, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %163

163:                                              ; preds = %161, %124, %60, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %164 = load ptr, ptr %3, align 8
  ret ptr %164
}

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

declare void @qh_vertexintersect(ptr noundef, 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, !11, i64 2984, !11, i64 2988, !7, i64 2992, !7, i64 3192, !11, i64 3232, !17, i64 3240, !6, i64 3248, !6, i64 3256, !6, i64 3264, !23, i64 3272, !24, i64 3424}
!22 = !{!"long", !7, i64 0}
!23 = !{!"qhmemT", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !6, i64 72, !6, i64 80, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144}
!24 = !{!"qhstatT", !7, i64 0, !7, i64 1992, !7, i64 2256, !7, i64 4248, !7, i64 4746, !7, i64 4995, !7, i64 5248, !11, i64 5320, !11, i64 5324, !11, i64 5328, !11, i64 5332, !17, i64 5336}
!25 = !{!21, !6, i64 2424}
!26 = !{!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"

%union.setelemT = type { ptr }

@.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, 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, ptr noundef) local_unnamed_addr #1

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

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

declare void @qh_settemppush(ptr noundef, 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, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %4 = getelementptr inbounds i8, ptr %1, i64 24
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %.loopexit49, label %.preheader

.preheader:                                       ; preds = %2, %7
  %.pn = phi ptr [ %.037, %7 ], [ %5, %2 ]
  %.037 = getelementptr inbounds i8, ptr %.pn, i64 8
  %6 = load ptr, ptr %.037, align 8, !tbaa !11
  %.not43 = icmp eq ptr %6, null
  br i1 %.not43, label %.loopexit49, label %7

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

.loopexit49:                                      ; preds = %.preheader, %2
  %11 = getelementptr inbounds i8, ptr %5, i64 8
  %12 = load ptr, ptr %11, align 8, !tbaa !14
  %13 = getelementptr inbounds i8, ptr %5, i64 16
  %14 = load ptr, ptr %13, align 8, !tbaa !14
  %15 = getelementptr inbounds i8, ptr %0, i64 4336
  %16 = load i32, ptr %15, align 8, !tbaa !14
  %17 = add nsw i32 %16, 1
  store i32 %17, ptr %15, align 8, !tbaa !14
  %.not44 = icmp eq ptr %12, null
  br i1 %.not44, label %.loopexit50, label %18

18:                                               ; preds = %.loopexit49
  %.not45 = icmp eq ptr %14, null
  %19 = getelementptr inbounds i8, ptr %12, i64 64
  %20 = load ptr, ptr %19, align 8, !tbaa !15
  br i1 %.not45, label %21, label %23

21:                                               ; preds = %18
  %22 = tail call ptr @qh_setcopy(ptr noundef nonnull %0, ptr noundef %20, i32 noundef 0) #3
  br label %27

23:                                               ; preds = %18
  %24 = getelementptr inbounds i8, ptr %14, i64 64
  %25 = load ptr, ptr %24, align 8, !tbaa !15
  %26 = tail call ptr @qh_vertexintersect_new(ptr noundef nonnull %0, ptr noundef %20, ptr noundef %25) #3
  br label %27

27:                                               ; preds = %23, %21
  %storemerge = phi ptr [ %22, %21 ], [ %26, %23 ]
  store ptr %storemerge, ptr %3, align 8, !tbaa !11
  tail call void @qh_settemppush(ptr noundef nonnull %0, ptr noundef %storemerge) #3
  %28 = tail call ptr @qh_setdelsorted(ptr noundef %storemerge, ptr noundef %1) #3
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %.not46 = icmp eq ptr %29, null
  br i1 %.not46, label %.loopexit, label %30

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

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

.lr.ph.peel.next54.preheader:                     ; preds = %33
  %.pre = load ptr, ptr %4, align 8, !tbaa !5
  %.phi.trans.insert66 = getelementptr inbounds i8, ptr %.pre, i64 24
  br label %.lr.ph.peel.next54

.lr.ph.peel.next54:                               ; preds = %.lr.ph.peel.next54.preheader, %._crit_edge68
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge68 ], [ 2, %.lr.ph.peel.next54.preheader ]
  %.03651.in = phi ptr [ %44, %._crit_edge68 ], [ %.phi.trans.insert66, %.lr.ph.peel.next54.preheader ]
  %.03651 = load ptr, ptr %.03651.in, align 8, !tbaa !14
  %34 = load i32, ptr %15, align 8, !tbaa !14
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %15, align 8, !tbaa !14
  %36 = getelementptr inbounds i8, ptr %.03651, i64 64
  %37 = load ptr, ptr %36, align 8, !tbaa !15
  call void @qh_vertexintersect(ptr noundef nonnull %0, ptr noundef nonnull %3, ptr noundef %37) #3
  %38 = load ptr, ptr %3, align 8, !tbaa !11
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !14
  %.not47 = icmp eq ptr %40, null
  br i1 %.not47, label %.loopexit60, label %._crit_edge68

.loopexit60:                                      ; preds = %.lr.ph.peel.next54
  %.phi.trans.insert71 = getelementptr inbounds i8, ptr %0, i64 4320
  %.pre72 = load i32, ptr %.phi.trans.insert71, align 8, !tbaa !14
  %41 = getelementptr inbounds i8, ptr %0, i64 4320
  %42 = add nsw i32 %.pre72, 1
  store i32 %42, ptr %41, align 8, !tbaa !14
  call void @qh_settempfree(ptr noundef nonnull %0, ptr noundef nonnull %3) #3
  br label %.loopexit50

._crit_edge68:                                    ; preds = %.lr.ph.peel.next54
  %.pre69 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %.pre69, i64 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %44 = getelementptr inbounds [1 x %union.setelemT], ptr %43, 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.next54, !llvm.loop !18

.loopexit:                                        ; preds = %._crit_edge68, %33, %30, %27
  %45 = phi ptr [ %storemerge, %30 ], [ %storemerge, %27 ], [ %storemerge, %33 ], [ %38, %._crit_edge68 ]
  %46 = getelementptr inbounds i8, ptr %0, i64 136
  %47 = load i32, ptr %46, align 8, !tbaa !20
  %48 = icmp sgt i32 %47, 2
  br i1 %48, label %49, label %.loopexit50

49:                                               ; preds = %.loopexit
  %50 = getelementptr inbounds i8, ptr %0, i64 2424
  %51 = load ptr, ptr %50, align 8, !tbaa !25
  %52 = call i32 @qh_setsize(ptr noundef nonnull %0, ptr noundef %45) #3
  %53 = getelementptr inbounds i8, ptr %1, i64 32
  %54 = load i32, ptr %53, align 8, !tbaa !26
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %51, i32 noundef 3007, ptr noundef nonnull @.str.184, i32 noundef %52, i32 noundef %54) #3
  %.pre73 = load ptr, ptr %3, align 8, !tbaa !11
  br label %.loopexit50

.loopexit50:                                      ; preds = %7, %.loopexit, %49, %.loopexit49, %.loopexit60
  %.0 = phi ptr [ null, %.loopexit60 ], [ null, %.loopexit49 ], [ %.pre73, %49 ], [ %45, %.loopexit ], [ null, %7 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  ret ptr %.0
}

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

declare void @qh_vertexintersect(ptr noundef, 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, !10, i64 2984, !10, i64 2988, !8, i64 2992, !8, i64 3192, !10, i64 3232, !17, i64 3240, !7, i64 3248, !7, i64 3256, !7, i64 3264, !23, i64 3272, !24, i64 3424}
!22 = !{!"long", !8, i64 0}
!23 = !{!"qhmemT", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !7, i64 72, !7, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144}
!24 = !{!"qhstatT", !8, i64 0, !8, i64 1992, !8, i64 2256, !8, i64 4248, !8, i64 4746, !8, i64 4995, !8, i64 5248, !10, i64 5320, !10, i64 5324, !10, i64 5328, !10, i64 5332, !17, i64 5336}
!25 = !{!21, !7, i64 2424}
!26 = !{!6, !10, i64 32}


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