; LLVM IR from Discngine/fpocket :: src/qhull/src/user_eg2 (user_eg2_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.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, i32, i32, [1 x %struct.__jmp_buf_tag], [40 x i8], i32, double, 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 { [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 }

@stdout = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [65 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 i32 @printf(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 ptr @qh_findbestfacet(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

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

declare void @qh_check_maxout(ptr noundef) #1

declare void @qh_nearcoplanar(ptr noundef) #1

declare i32 @qh_rand(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @addDelaunay(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca double, align 8
  %15 = alloca ptr, align 8
  %16 = alloca double, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %100, %5
  %19 = load i32, ptr %11, align 4, !tbaa !9
  %20 = load i32, ptr %9, align 4, !tbaa !9
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %22, label %103

22:                                               ; preds = %18
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = load i32, ptr %8, align 4, !tbaa !9
  %25 = load i32, ptr %11, align 4, !tbaa !9
  %26 = add nsw i32 %24, %25
  %27 = load i32, ptr %10, align 4, !tbaa !9
  %28 = mul nsw i32 %26, %27
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds double, ptr %23, i64 %29
  store ptr %30, ptr %13, align 8, !tbaa !5
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.qhT, ptr %32, i32 0, i32 107
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = icmp eq ptr %31, %34
  br i1 %35, label %36, label %43

36:                                               ; preds = %22
  %37 = load i32, ptr %8, align 4, !tbaa !9
  %38 = load i32, ptr %11, align 4, !tbaa !9
  %39 = add nsw i32 %37, %38
  %40 = add nsw i32 %39, 1
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.qhT, ptr %41, i32 0, i32 106
  store i32 %40, ptr %42, align 8, !tbaa !17
  br label %43

43:                                               ; preds = %36, %22
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %61, %43
  %45 = load i32, ptr %12, align 4, !tbaa !9
  %46 = load i32, ptr %10, align 4, !tbaa !9
  %47 = sub nsw i32 %46, 1
  %48 = icmp slt i32 %45, %47
  br i1 %48, label %49, label %64

49:                                               ; preds = %44
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = call i32 @qh_rand(ptr noundef %50)
  %52 = sitofp i32 %51 to double
  store double %52, ptr %14, align 8, !tbaa !18
  %53 = load double, ptr %14, align 8, !tbaa !18
  %54 = fmul double 2.000000e+00, %53
  %55 = fdiv double %54, 0x41DFFFFFFFC00000
  %56 = fsub double %55, 1.000000e+00
  %57 = load ptr, ptr %13, align 8, !tbaa !5
  %58 = load i32, ptr %12, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds double, ptr %57, i64 %59
  store double %56, ptr %60, align 8, !tbaa !18
  br label %61

61:                                               ; preds = %49
  %62 = load i32, ptr %12, align 4, !tbaa !9
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %12, align 4, !tbaa !9
  br label %44, !llvm.loop !19

64:                                               ; preds = %44
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = load i32, ptr %10, align 4, !tbaa !9
  %67 = load ptr, ptr %13, align 8, !tbaa !5
  call void @qh_setdelaunay(ptr noundef %65, i32 noundef %66, i32 noundef 1, ptr noundef %67)
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = call ptr @qh_findbestfacet(ptr noundef %68, ptr noundef %69, i32 noundef 0, ptr noundef %16, ptr noundef %17)
  store ptr %70, ptr %15, align 8, !tbaa !5
  %71 = load i32, ptr %17, align 4, !tbaa !9
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %81

73:                                               ; preds = %64
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = load ptr, ptr %13, align 8, !tbaa !5
  %76 = load ptr, ptr %15, align 8, !tbaa !5
  %77 = call i32 @qh_addpoint(ptr noundef %74, ptr noundef %75, ptr noundef %76, i32 noundef 0)
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %80, label %79

79:                                               ; preds = %73
  br label %103

80:                                               ; preds = %73
  br label %81

81:                                               ; preds = %80, %64
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = load ptr, ptr @stdout, align 8, !tbaa !5
  %84 = load ptr, ptr %13, align 8, !tbaa !5
  call void @qh_printpoint(ptr noundef %82, ptr noundef %83, ptr noundef @.str.5, ptr noundef %84)
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.qhT, ptr %85, i32 0, i32 106
  %87 = load i32, ptr %86, align 8, !tbaa !17
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.qhT, ptr %89, i32 0, i32 208
  %91 = load ptr, ptr %90, align 8, !tbaa !21
  %92 = call i32 @qh_setsize(ptr noundef %88, ptr noundef %91)
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.qhT, ptr %93, i32 0, i32 170
  %95 = load i32, ptr %94, align 4, !tbaa !22
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.qhT, ptr %96, i32 0, i32 169
  %98 = load i32, ptr %97, align 8, !tbaa !23
  %99 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %87, i32 noundef %92, i32 noundef %95, i32 noundef %98)
  br label %100

100:                                              ; preds = %81
  %101 = load i32, ptr %11, align 4, !tbaa !9
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %11, align 4, !tbaa !9
  br label %18, !llvm.loop !24

103:                                              ; preds = %79, %18
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.qhT, ptr %104, i32 0, i32 99
  %106 = load i32, ptr %105, align 8, !tbaa !25
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %110

108:                                              ; preds = %103
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_check_maxout(ptr noundef %109)
  br label %118

110:                                              ; preds = %103
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.qhT, ptr %111, i32 0, i32 103
  %113 = load i32, ptr %112, align 4, !tbaa !26
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %115, label %117

115:                                              ; preds = %110
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_nearcoplanar(ptr noundef %116)
  br label %117

117:                                              ; preds = %115, %110
  br label %118

118:                                              ; preds = %117, %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  ret void
}

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

declare i32 @qh_setsize(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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 640}
!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, !10, i64 2880, !10, i64 2884, !7, i64 2888, !7, i64 3088, !10, i64 3128, !13, i64 3136, !6, i64 3144, !15, i64 3152, !16, i64 3304}
!13 = !{!"double", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"qhmemT", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64, !6, i64 72, !6, 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}
!16 = !{!"qhstatT", !7, i64 0, !7, i64 1816, !7, i64 2056, !7, i64 3872, !7, i64 4326, !7, i64 4553, !7, i64 4784, !10, i64 4856, !10, i64 4860, !10, i64 4864, !10, i64 4868, !13, i64 4872}
!17 = !{!12, !10, i64 632}
!18 = !{!13, !13, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!12, !6, i64 2752}
!22 = !{!12, !10, i64 2540}
!23 = !{!12, !10, i64 2536}
!24 = distinct !{!24, !20}
!25 = !{!12, !10, i64 592}
!26 = !{!12, !10, i64 620}


; 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"

@stdout = external local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [65 x i8], align 1

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) 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 ptr @qh_findbestfacet(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @qh_addpoint(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @qh_check_maxout(ptr noundef) local_unnamed_addr #2

declare void @qh_nearcoplanar(ptr noundef) local_unnamed_addr #2

declare i32 @qh_rand(ptr noundef) local_unnamed_addr #2

declare void @qh_setdelaunay(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @addDelaunay(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #3 {
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  %8 = icmp sgt i32 %3, 0
  br i1 %8, label %.lr.ph44, label %._crit_edge45

.lr.ph44:                                         ; preds = %5
  %9 = getelementptr inbounds i8, ptr %0, i64 640
  %10 = getelementptr inbounds i8, ptr %0, i64 632
  %11 = icmp sgt i32 %4, 1
  %12 = getelementptr inbounds i8, ptr %0, i64 2752
  %13 = getelementptr inbounds i8, ptr %0, i64 2540
  %14 = getelementptr inbounds i8, ptr %0, i64 2536
  %15 = sext i32 %2 to i64
  %wide.trip.count57 = zext nneg i32 %3 to i64
  br i1 %11, label %.lr.ph44.split.us.preheader, label %.lr.ph44.split.preheader

.lr.ph44.split.preheader:                         ; preds = %.lr.ph44
  %16 = sext i32 %4 to i64
  br label %.lr.ph44.split

.lr.ph44.split.us.preheader:                      ; preds = %.lr.ph44
  %17 = add nsw i32 %4, -1
  %18 = zext nneg i32 %4 to i64
  %wide.trip.count52 = zext i32 %17 to i64
  br label %.lr.ph44.split.us

.lr.ph44.split.us:                                ; preds = %.lr.ph44.split.us.preheader, %29
  %indvars.iv54 = phi i64 [ 0, %.lr.ph44.split.us.preheader ], [ %indvars.iv.next55, %29 ]
  %19 = add nsw i64 %indvars.iv54, %15
  %20 = mul nsw i64 %19, %18
  %21 = getelementptr inbounds double, ptr %1, i64 %20
  %22 = load ptr, ptr %9, align 8, !tbaa !5
  %23 = icmp eq ptr %22, %1
  br i1 %23, label %24, label %.lr.ph.us.preheader

.lr.ph.us.preheader:                              ; preds = %24, %.lr.ph44.split.us
  br label %.lr.ph.us

24:                                               ; preds = %.lr.ph44.split.us
  %25 = trunc i64 %19 to i32
  %26 = add i32 %25, 1
  store i32 %26, ptr %10, align 8, !tbaa !15
  br label %.lr.ph.us.preheader

27:                                               ; preds = %._crit_edge.us
  %28 = call i32 @qh_addpoint(ptr noundef %0, ptr noundef nonnull %21, ptr noundef %43, i32 noundef 0) #4
  %.not38.us = icmp eq i32 %28, 0
  br i1 %.not38.us, label %._crit_edge45, label %29

29:                                               ; preds = %27, %._crit_edge.us
  %30 = load ptr, ptr @stdout, align 8, !tbaa !16
  call void @qh_printpoint(ptr noundef %0, ptr noundef %30, ptr noundef nonnull @.str.5, ptr noundef nonnull %21) #4
  %31 = load i32, ptr %10, align 8, !tbaa !15
  %32 = load ptr, ptr %12, align 8, !tbaa !17
  %33 = call i32 @qh_setsize(ptr noundef %0, ptr noundef %32) #4
  %34 = load i32, ptr %13, align 4, !tbaa !18
  %35 = load i32, ptr %14, align 8, !tbaa !19
  %36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %31, i32 noundef %33, i32 noundef %34, i32 noundef %35)
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %exitcond58.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count57
  br i1 %exitcond58.not, label %._crit_edge45, label %.lr.ph44.split.us, !llvm.loop !20

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %.lr.ph.us
  %indvars.iv49 = phi i64 [ %indvars.iv.next50, %.lr.ph.us ], [ 0, %.lr.ph.us.preheader ]
  %37 = call i32 @qh_rand(ptr noundef %0) #4
  %38 = sitofp i32 %37 to double
  %39 = fmul double %38, 2.000000e+00
  %40 = fdiv double %39, 0x41DFFFFFFFC00000
  %41 = fadd double %40, -1.000000e+00
  %42 = getelementptr inbounds double, ptr %21, i64 %indvars.iv49
  store double %41, ptr %42, align 8, !tbaa !22
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %exitcond53.not = icmp eq i64 %indvars.iv.next50, %wide.trip.count52
  br i1 %exitcond53.not, label %._crit_edge.us, label %.lr.ph.us, !llvm.loop !23

._crit_edge.us:                                   ; preds = %.lr.ph.us
  call void @qh_setdelaunay(ptr noundef %0, i32 noundef %4, i32 noundef 1, ptr noundef nonnull %21) #4
  %43 = call ptr @qh_findbestfacet(ptr noundef %0, ptr noundef nonnull %21, i32 noundef 0, ptr noundef nonnull %6, ptr noundef nonnull %7) #4
  %44 = load i32, ptr %7, align 4, !tbaa !24
  %.not.us = icmp eq i32 %44, 0
  br i1 %.not.us, label %29, label %27

.lr.ph44.split:                                   ; preds = %.lr.ph44.split.preheader, %58
  %indvars.iv = phi i64 [ 0, %.lr.ph44.split.preheader ], [ %indvars.iv.next, %58 ]
  %45 = add nsw i64 %indvars.iv, %15
  %46 = mul nsw i64 %45, %16
  %47 = getelementptr inbounds double, ptr %1, i64 %46
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = icmp eq ptr %48, %1
  br i1 %49, label %50, label %53

50:                                               ; preds = %.lr.ph44.split
  %51 = trunc i64 %45 to i32
  %52 = add i32 %51, 1
  store i32 %52, ptr %10, align 8, !tbaa !15
  br label %53

53:                                               ; preds = %50, %.lr.ph44.split
  call void @qh_setdelaunay(ptr noundef nonnull %0, i32 noundef %4, i32 noundef 1, ptr noundef %47) #4
  %54 = call ptr @qh_findbestfacet(ptr noundef nonnull %0, ptr noundef %47, i32 noundef 0, ptr noundef nonnull %6, ptr noundef nonnull %7) #4
  %55 = load i32, ptr %7, align 4, !tbaa !24
  %.not = icmp eq i32 %55, 0
  br i1 %.not, label %58, label %56

56:                                               ; preds = %53
  %57 = call i32 @qh_addpoint(ptr noundef nonnull %0, ptr noundef %47, ptr noundef %54, i32 noundef 0) #4
  %.not38 = icmp eq i32 %57, 0
  br i1 %.not38, label %._crit_edge45, label %58

58:                                               ; preds = %56, %53
  %59 = load ptr, ptr @stdout, align 8, !tbaa !16
  call void @qh_printpoint(ptr noundef nonnull %0, ptr noundef %59, ptr noundef nonnull @.str.5, ptr noundef %47) #4
  %60 = load i32, ptr %10, align 8, !tbaa !15
  %61 = load ptr, ptr %12, align 8, !tbaa !17
  %62 = call i32 @qh_setsize(ptr noundef nonnull %0, ptr noundef %61) #4
  %63 = load i32, ptr %13, align 4, !tbaa !18
  %64 = load i32, ptr %14, align 8, !tbaa !19
  %65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %60, i32 noundef %62, i32 noundef %63, i32 noundef %64)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count57
  br i1 %exitcond.not, label %._crit_edge45, label %.lr.ph44.split, !llvm.loop !20

._crit_edge45:                                    ; preds = %58, %56, %29, %27, %5
  %66 = getelementptr inbounds i8, ptr %0, i64 592
  %67 = load i32, ptr %66, align 8, !tbaa !25
  %.not39 = icmp eq i32 %67, 0
  br i1 %.not39, label %69, label %68

68:                                               ; preds = %._crit_edge45
  call void @qh_check_maxout(ptr noundef nonnull %0) #4
  br label %73

69:                                               ; preds = %._crit_edge45
  %70 = getelementptr inbounds i8, ptr %0, i64 620
  %71 = load i32, ptr %70, align 4, !tbaa !26
  %.not40 = icmp eq i32 %71, 0
  br i1 %.not40, label %73, label %72

72:                                               ; preds = %69
  call void @qh_nearcoplanar(ptr noundef nonnull %0) #4
  br label %73

73:                                               ; preds = %69, %72, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  ret void
}

declare void @qh_printpoint(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @qh_setsize(ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nofree nounwind "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 = { "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 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 #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 640}
!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, !7, i64 2880, !7, i64 2884, !8, i64 2888, !8, i64 3088, !7, i64 3128, !10, i64 3136, !11, i64 3144, !13, i64 3152, !14, i64 3304}
!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 = !{!"qhmemT", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !7, i64 64, !11, i64 72, !11, i64 80, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144}
!14 = !{!"qhstatT", !8, i64 0, !8, i64 1816, !8, i64 2056, !8, i64 3872, !8, i64 4326, !8, i64 4553, !8, i64 4784, !7, i64 4856, !7, i64 4860, !7, i64 4864, !7, i64 4868, !10, i64 4872}
!15 = !{!6, !7, i64 632}
!16 = !{!11, !11, i64 0}
!17 = !{!6, !11, i64 2752}
!18 = !{!6, !7, i64 2540}
!19 = !{!6, !7, i64 2536}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!10, !10, i64 0}
!23 = distinct !{!23, !21}
!24 = !{!7, !7, i64 0}
!25 = !{!6, !7, i64 592}
!26 = !{!6, !7, i64 620}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass