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

@.str.3 = external hidden unnamed_addr constant [27 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

; Function Attrs: nounwind uwtable
define dso_local void @adddiamond(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 ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  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 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %17

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

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

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

42:                                               ; preds = %35, %21
  %43 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %43, ptr %12, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %68, %42
  %45 = load i32, ptr %12, align 4, !tbaa !9
  %46 = add nsw i32 %45, -1
  store i32 %46, ptr %12, align 4, !tbaa !9
  %47 = icmp ne i32 %45, 0
  br i1 %47, label %48, label %69

48:                                               ; preds = %44
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = sdiv i32 %49, 2
  %51 = load i32, ptr %12, align 4, !tbaa !9
  %52 = icmp eq i32 %50, %51
  br i1 %52, label %53, label %63

53:                                               ; preds = %48
  %54 = load i32, ptr %11, align 4, !tbaa !9
  %55 = and i32 %54, 1
  %56 = icmp ne i32 %55, 0
  %57 = zext i1 %56 to i64
  %58 = select i1 %56, double 2.000000e+00, double -2.000000e+00
  %59 = load ptr, ptr %13, align 8, !tbaa !5
  %60 = load i32, ptr %12, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds double, ptr %59, i64 %61
  store double %58, ptr %62, align 8, !tbaa !18
  br label %68

63:                                               ; preds = %48
  %64 = load ptr, ptr %13, align 8, !tbaa !5
  %65 = load i32, ptr %12, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds double, ptr %64, i64 %66
  store double 0.000000e+00, ptr %67, align 8, !tbaa !18
  br label %68

68:                                               ; preds = %63, %53
  br label %44, !llvm.loop !19

69:                                               ; preds = %44
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = load ptr, ptr %13, align 8, !tbaa !5
  %72 = call ptr @qh_findbestfacet(ptr noundef %70, ptr noundef %71, i32 noundef 0, ptr noundef %16, ptr noundef %15)
  store ptr %72, ptr %14, align 8, !tbaa !5
  %73 = load i32, ptr %15, align 4, !tbaa !9
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %75, label %83

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

81:                                               ; preds = %75
  br label %94

82:                                               ; preds = %75
  br label %83

83:                                               ; preds = %82, %69
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.qhT, ptr %84, i32 0, i32 170
  %86 = load i32, ptr %85, align 4, !tbaa !21
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.qhT, ptr %87, i32 0, i32 169
  %89 = load i32, ptr %88, align 8, !tbaa !22
  %90 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %86, i32 noundef %89)
  br label %91

91:                                               ; preds = %83
  %92 = load i32, ptr %11, align 4, !tbaa !9
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %11, align 4, !tbaa !9
  br label %17, !llvm.loop !23

94:                                               ; preds = %81, %17
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.qhT, ptr %95, i32 0, i32 99
  %97 = load i32, ptr %96, align 8, !tbaa !24
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %101

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

101:                                              ; preds = %94
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.qhT, ptr %102, i32 0, i32 103
  %104 = load i32, ptr %103, align 4, !tbaa !25
  %105 = icmp ne i32 %104, 0
  br i1 %105, label %106, label %108

106:                                              ; preds = %101
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_nearcoplanar(ptr noundef %107)
  br label %108

108:                                              ; preds = %106, %101
  br label %109

109:                                              ; preds = %108, %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, 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 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

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, !10, i64 2540}
!22 = !{!12, !10, i64 2536}
!23 = distinct !{!23, !20}
!24 = !{!12, !10, i64 592}
!25 = !{!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"

@.str.3 = external hidden unnamed_addr constant [27 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

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

.lr.ph41:                                         ; preds = %5
  %9 = getelementptr inbounds i8, ptr %0, i64 640
  %10 = getelementptr inbounds i8, ptr %0, i64 632
  %.not38 = icmp eq i32 %4, 0
  %11 = getelementptr inbounds i8, ptr %0, i64 2540
  %12 = getelementptr inbounds i8, ptr %0, i64 2536
  br i1 %.not38, label %.lr.ph41.split.us.preheader, label %.lr.ph41.split.preheader

.lr.ph41.split.preheader:                         ; preds = %.lr.ph41
  %13 = sext i32 %4 to i64
  %14 = sext i32 %2 to i64
  %wide.trip.count = zext nneg i32 %3 to i64
  %min.iters.check = icmp ult i32 %4, 4
  %n.vec = and i64 %13, -4
  %ind.end = and i64 %13, 3
  %cmp.n = icmp eq i64 %n.vec, %13
  br label %.lr.ph41.split

.lr.ph41.split.us.preheader:                      ; preds = %.lr.ph41
  %wide.trip.count52 = zext nneg i32 %3 to i64
  br label %.lr.ph41.split.us

.lr.ph41.split.us:                                ; preds = %.lr.ph41.split.us.preheader, %26
  %indvars.iv49 = phi i64 [ 0, %.lr.ph41.split.us.preheader ], [ %indvars.iv.next50, %26 ]
  %15 = load ptr, ptr %9, align 8, !tbaa !5
  %16 = icmp eq ptr %15, %1
  br i1 %16, label %17, label %21

17:                                               ; preds = %.lr.ph41.split.us
  %18 = trunc i64 %indvars.iv49 to i32
  %19 = add i32 %18, %2
  %20 = add i32 %19, 1
  store i32 %20, ptr %10, align 8, !tbaa !15
  br label %21

21:                                               ; preds = %17, %.lr.ph41.split.us
  %22 = call ptr @qh_findbestfacet(ptr noundef nonnull %0, ptr noundef %1, i32 noundef 0, ptr noundef nonnull %7, ptr noundef nonnull %6) #4
  %23 = load i32, ptr %6, align 4, !tbaa !16
  %.not33.us = icmp eq i32 %23, 0
  br i1 %.not33.us, label %26, label %24

24:                                               ; preds = %21
  %25 = call i32 @qh_addpoint(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %22, i32 noundef 0) #4
  %.not34.us = icmp eq i32 %25, 0
  br i1 %.not34.us, label %._crit_edge42, label %26

26:                                               ; preds = %24, %21
  %27 = load i32, ptr %11, align 4, !tbaa !17
  %28 = load i32, ptr %12, align 8, !tbaa !18
  %29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %27, i32 noundef %28)
  %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_edge42, label %.lr.ph41.split.us, !llvm.loop !19

.lr.ph41.split:                                   ; preds = %.lr.ph41.split.preheader, %64
  %indvars.iv46 = phi i64 [ 0, %.lr.ph41.split.preheader ], [ %indvars.iv.next47, %64 ]
  %30 = add nsw i64 %indvars.iv46, %14
  %31 = mul nsw i64 %30, %13
  %32 = getelementptr inbounds double, ptr %1, i64 %31
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = icmp eq ptr %33, %1
  br i1 %34, label %35, label %.lr.ph

35:                                               ; preds = %.lr.ph41.split
  %36 = trunc i64 %30 to i32
  %37 = add i32 %36, 1
  store i32 %37, ptr %10, align 8, !tbaa !15
  br label %.lr.ph

.lr.ph:                                           ; preds = %35, %.lr.ph41.split
  %38 = trunc nuw nsw i64 %indvars.iv46 to i32
  %39 = lshr i32 %38, 1
  %40 = and i32 %38, 1
  %.not37 = icmp eq i32 %40, 0
  %41 = select i1 %.not37, double -2.000000e+00, double 2.000000e+00
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph
  %broadcast.splatinsert = insertelement <2 x i32> poison, i32 %39, i64 0
  %broadcast.splat = shufflevector <2 x i32> %broadcast.splatinsert, <2 x i32> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert56 = insertelement <2 x double> poison, double %41, i64 0
  %broadcast.splat57 = shufflevector <2 x double> %broadcast.splatinsert56, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = sub i64 %13, %index
  %42 = insertelement <2 x i64> poison, i64 %offset.idx, i64 0
  %43 = shufflevector <2 x i64> %42, <2 x i64> poison, <2 x i32> zeroinitializer
  %44 = add <2 x i64> %43, <i64 -1, i64 -2>
  %45 = trunc <2 x i64> %44 to <2 x i32>
  %46 = trunc <2 x i64> %43 to <2 x i32>
  %47 = add <2 x i32> %46, <i32 -3, i32 -4>
  %48 = icmp eq <2 x i32> %broadcast.splat, %45
  %49 = icmp eq <2 x i32> %broadcast.splat, %47
  %50 = select <2 x i1> %48, <2 x double> %broadcast.splat57, <2 x double> zeroinitializer
  %51 = select <2 x i1> %49, <2 x double> %broadcast.splat57, <2 x double> zeroinitializer
  %52 = extractelement <2 x i64> %44, i64 0
  %53 = getelementptr inbounds double, ptr %32, i64 %52
  %54 = getelementptr inbounds i8, ptr %53, i64 -8
  %55 = getelementptr inbounds i8, ptr %53, i64 -24
  %reverse = shufflevector <2 x double> %50, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  store <2 x double> %reverse, ptr %54, align 8
  %reverse58 = shufflevector <2 x double> %51, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  store <2 x double> %reverse58, ptr %55, align 8
  %index.next = add nuw i64 %index, 4
  %56 = icmp eq i64 %index.next, %n.vec
  br i1 %56, label %middle.block, label %vector.body, !llvm.loop !21

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ %13, %.lr.ph ], [ %ind.end, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %57 = trunc nsw i64 %indvars.iv.next to i32
  %58 = icmp eq i32 %39, %57
  %.sink = select i1 %58, double %41, double 0.000000e+00
  %59 = getelementptr inbounds double, ptr %32, i64 %indvars.iv.next
  store double %.sink, ptr %59, align 8
  %.not = icmp eq i64 %indvars.iv.next, 0
  br i1 %.not, label %._crit_edge, label %scalar.ph, !llvm.loop !24

._crit_edge:                                      ; preds = %scalar.ph, %middle.block
  %60 = call ptr @qh_findbestfacet(ptr noundef %0, ptr noundef nonnull %32, i32 noundef 0, ptr noundef nonnull %7, ptr noundef nonnull %6) #4
  %61 = load i32, ptr %6, align 4, !tbaa !16
  %.not33 = icmp eq i32 %61, 0
  br i1 %.not33, label %64, label %62

62:                                               ; preds = %._crit_edge
  %63 = call i32 @qh_addpoint(ptr noundef %0, ptr noundef nonnull %32, ptr noundef %60, i32 noundef 0) #4
  %.not34 = icmp eq i32 %63, 0
  br i1 %.not34, label %._crit_edge42, label %64

64:                                               ; preds = %62, %._crit_edge
  %65 = load i32, ptr %11, align 4, !tbaa !17
  %66 = load i32, ptr %12, align 8, !tbaa !18
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %65, i32 noundef %66)
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next47, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge42, label %.lr.ph41.split, !llvm.loop !19

._crit_edge42:                                    ; preds = %64, %62, %26, %24, %5
  %68 = getelementptr inbounds i8, ptr %0, i64 592
  %69 = load i32, ptr %68, align 8, !tbaa !25
  %.not35 = icmp eq i32 %69, 0
  br i1 %.not35, label %71, label %70

70:                                               ; preds = %._crit_edge42
  call void @qh_check_maxout(ptr noundef nonnull %0) #4
  br label %75

71:                                               ; preds = %._crit_edge42
  %72 = getelementptr inbounds i8, ptr %0, i64 620
  %73 = load i32, ptr %72, align 4, !tbaa !26
  %.not36 = icmp eq i32 %73, 0
  br i1 %.not36, label %75, label %74

74:                                               ; preds = %71
  call void @qh_nearcoplanar(ptr noundef nonnull %0) #4
  br label %75

75:                                               ; preds = %71, %74, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  ret void
}

declare ptr @qh_findbestfacet(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare void @qh_check_maxout(ptr noundef) local_unnamed_addr #3

declare void @qh_nearcoplanar(ptr noundef) local_unnamed_addr #3

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 = { 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 = { "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 = !{!7, !7, i64 0}
!17 = !{!6, !7, i64 2540}
!18 = !{!6, !7, i64 2536}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20, !22, !23}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = !{!"llvm.loop.unroll.runtime.disable"}
!24 = distinct !{!24, !20, !23, !22}
!25 = !{!6, !7, i64 592}
!26 = !{!6, !7, i64 620}


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