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

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

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

@qh_qh = external dso_local global %struct.qhT, align 8
@qhmem = external global %struct.qhmemT, align 8

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

; 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 @qh_initqhull_buffers() #1 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  %2 = load i32, ptr getelementptr inbounds (%struct.qhmemT, ptr @qhmem, i32 0, i32 4), align 8, !tbaa !5
  %3 = sub nsw i32 %2, 16
  %4 = sdiv i32 %3, 8
  store i32 %4, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 162), align 8, !tbaa !11
  %5 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 162), align 8, !tbaa !11
  %6 = icmp sle i32 %5, 0
  br i1 %6, label %11, label %7

7:                                                ; preds = %0
  %8 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 162), align 8, !tbaa !11
  %9 = load i32, ptr getelementptr inbounds (%struct.qhmemT, ptr @qhmem, i32 0, i32 4), align 8, !tbaa !5
  %10 = icmp sgt i32 %8, %9
  br i1 %10, label %11, label %12

11:                                               ; preds = %7, %0
  store i32 8, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 162), align 8, !tbaa !11
  br label %12

12:                                               ; preds = %11, %7
  %13 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 162), align 8, !tbaa !11
  %14 = call ptr @qh_setnew(i32 noundef %13)
  store ptr %14, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 225), align 8, !tbaa !15
  %15 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 162), align 8, !tbaa !11
  %16 = call ptr @qh_setnew(i32 noundef %15)
  store ptr %16, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 226), align 8, !tbaa !16
  %17 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 162), align 8, !tbaa !11
  %18 = call ptr @qh_setnew(i32 noundef %17)
  store ptr %18, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 236), align 8, !tbaa !17
  %19 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 110), align 8, !tbaa !18
  %20 = mul nsw i32 %19, 8
  %21 = call ptr @qh_memalloc(i32 noundef %20)
  store ptr %21, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 145), align 8, !tbaa !19
  %22 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 111), align 4, !tbaa !20
  %23 = add nsw i32 %22, 1
  %24 = mul nsw i32 %23, 8
  %25 = call ptr @qh_memalloc(i32 noundef %24)
  store ptr %25, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 128), align 8, !tbaa !21
  %26 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 111), align 4, !tbaa !20
  %27 = add nsw i32 %26, 1
  %28 = mul nsw i32 %27, 8
  %29 = call ptr @qh_memalloc(i32 noundef %28)
  store ptr %29, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 127), align 8, !tbaa !22
  %30 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 111), align 4, !tbaa !20
  %31 = add nsw i32 %30, 1
  %32 = mul nsw i32 %31, 8
  %33 = call ptr @qh_memalloc(i32 noundef %32)
  store ptr %33, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 130), align 8, !tbaa !23
  %34 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 111), align 4, !tbaa !20
  %35 = add nsw i32 %34, 1
  %36 = mul nsw i32 %35, 8
  %37 = call ptr @qh_memalloc(i32 noundef %36)
  store ptr %37, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 129), align 8, !tbaa !24
  %38 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 111), align 4, !tbaa !20
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %1, align 4, !tbaa !25
  br label %40

40:                                               ; preds = %44, %12
  %41 = load i32, ptr %1, align 4, !tbaa !25
  %42 = add nsw i32 %41, -1
  store i32 %42, ptr %1, align 4, !tbaa !25
  %43 = icmp ne i32 %41, 0
  br i1 %43, label %44, label %61

44:                                               ; preds = %40
  %45 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 128), align 8, !tbaa !21
  %46 = load i32, ptr %1, align 4, !tbaa !25
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds double, ptr %45, i64 %47
  store double 0xFFEFFFFFFFFFFFFF, ptr %48, align 8, !tbaa !26
  %49 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 127), align 8, !tbaa !22
  %50 = load i32, ptr %1, align 4, !tbaa !25
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds double, ptr %49, i64 %51
  store double 0x7FEFFFFFFFFFFFFF, ptr %52, align 8, !tbaa !26
  %53 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 130), align 8, !tbaa !23
  %54 = load i32, ptr %1, align 4, !tbaa !25
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds double, ptr %53, i64 %55
  store double 0xFFEFFFFFFFFFFFFF, ptr %56, align 8, !tbaa !26
  %57 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 129), align 8, !tbaa !24
  %58 = load i32, ptr %1, align 4, !tbaa !25
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds double, ptr %57, i64 %59
  store double 0x7FEFFFFFFFFFFFFF, ptr %60, align 8, !tbaa !26
  br label %40, !llvm.loop !27

61:                                               ; preds = %40
  %62 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 110), align 8, !tbaa !18
  %63 = add nsw i32 %62, 1
  %64 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 110), align 8, !tbaa !18
  %65 = mul nsw i32 %63, %64
  %66 = mul nsw i32 %65, 8
  %67 = call ptr @qh_memalloc(i32 noundef %66)
  store ptr %67, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 227), align 8, !tbaa !29
  %68 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 110), align 8, !tbaa !18
  %69 = add nsw i32 %68, 1
  %70 = mul nsw i32 %69, 8
  %71 = call ptr @qh_memalloc(i32 noundef %70)
  store ptr %71, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 228), align 8, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  ret void
}

declare ptr @qh_setnew(i32 noundef) #2

declare ptr @qh_memalloc(i32 noundef) #2

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


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

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

@qh_qh = external dso_local local_unnamed_addr global %struct.qhT, align 8
@qhmem = external local_unnamed_addr global %struct.qhmemT, align 8

; Function Attrs: nounwind uwtable
define dso_local void @qh_initqhull_buffers() local_unnamed_addr #0 {
  %1 = load i32, ptr getelementptr inbounds (i8, ptr @qhmem, i64 16), align 8
  %2 = add nsw i32 %1, -16
  %3 = sdiv i32 %2, 8
  %4 = icmp slt i32 %1, 24
  %5 = icmp sgt i32 %3, %1
  %or.cond = select i1 %4, i1 true, i1 %5
  %spec.store.select = select i1 %or.cond, i32 8, i32 %3
  store i32 %spec.store.select, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2448), align 8
  %6 = tail call ptr @qh_setnew(i32 noundef %spec.store.select) #2
  store ptr %6, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2832), align 8, !tbaa !5
  %7 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2448), align 8, !tbaa !13
  %8 = tail call ptr @qh_setnew(i32 noundef %7) #2
  store ptr %8, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2840), align 8, !tbaa !14
  %9 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2448), align 8, !tbaa !13
  %10 = tail call ptr @qh_setnew(i32 noundef %9) #2
  store ptr %10, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2912), align 8, !tbaa !15
  %11 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 632), align 8, !tbaa !16
  %12 = shl nsw i32 %11, 3
  %13 = tail call ptr @qh_memalloc(i32 noundef %12) #2
  store ptr %13, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1872), align 8, !tbaa !17
  %14 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 636), align 4, !tbaa !18
  %15 = shl i32 %14, 3
  %16 = add i32 %15, 8
  %17 = tail call ptr @qh_memalloc(i32 noundef %16) #2
  store ptr %17, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1736), align 8, !tbaa !19
  %18 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 636), align 4, !tbaa !18
  %19 = shl i32 %18, 3
  %20 = add i32 %19, 8
  %21 = tail call ptr @qh_memalloc(i32 noundef %20) #2
  store ptr %21, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1728), align 8, !tbaa !20
  %22 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 636), align 4, !tbaa !18
  %23 = shl i32 %22, 3
  %24 = add i32 %23, 8
  %25 = tail call ptr @qh_memalloc(i32 noundef %24) #2
  store ptr %25, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1752), align 8, !tbaa !21
  %26 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 636), align 4, !tbaa !18
  %27 = shl i32 %26, 3
  %28 = add i32 %27, 8
  %29 = tail call ptr @qh_memalloc(i32 noundef %28) #2
  %30 = ptrtoint ptr %29 to i64
  store ptr %29, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1744), align 8, !tbaa !22
  %31 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 636), align 4, !tbaa !18
  %.not7 = icmp eq i32 %31, -1
  br i1 %.not7, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0
  %32 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1736), align 8, !tbaa !19
  %33 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1728), align 8, !tbaa !20
  %34 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1752), align 8, !tbaa !21
  %35 = sext i32 %31 to i64
  %36 = add nsw i64 %35, 1
  %min.iters.check = icmp ult i64 %36, 18
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph
  %37 = ptrtoint ptr %34 to i64
  %38 = ptrtoint ptr %33 to i64
  %39 = ptrtoint ptr %32 to i64
  %40 = sub i64 %39, %38
  %diff.check = icmp ult i64 %40, 32
  %41 = sub i64 %39, %37
  %diff.check10 = icmp ult i64 %41, 32
  %conflict.rdx = or i1 %diff.check, %diff.check10
  %42 = sub i64 %39, %30
  %diff.check11 = icmp ult i64 %42, 32
  %conflict.rdx12 = or i1 %conflict.rdx, %diff.check11
  %43 = sub i64 %38, %37
  %diff.check13 = icmp ult i64 %43, 32
  %conflict.rdx14 = or i1 %conflict.rdx12, %diff.check13
  %44 = sub i64 %38, %30
  %diff.check15 = icmp ult i64 %44, 32
  %conflict.rdx16 = or i1 %conflict.rdx14, %diff.check15
  %45 = sub i64 %37, %30
  %diff.check17 = icmp ult i64 %45, 32
  %conflict.rdx18 = or i1 %conflict.rdx16, %diff.check17
  br i1 %conflict.rdx18, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %36, -4
  %ind.end = and i64 %36, 3
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %46 = sub i64 %35, %index
  %47 = getelementptr inbounds double, ptr %32, i64 %46
  %48 = getelementptr inbounds i8, ptr %47, i64 -8
  %49 = getelementptr inbounds i8, ptr %47, i64 -24
  store <2 x double> <double 0xFFEFFFFFFFFFFFFF, double 0xFFEFFFFFFFFFFFFF>, ptr %48, align 8, !tbaa !23
  store <2 x double> <double 0xFFEFFFFFFFFFFFFF, double 0xFFEFFFFFFFFFFFFF>, ptr %49, align 8, !tbaa !23
  %50 = getelementptr inbounds double, ptr %33, i64 %46
  %51 = getelementptr inbounds i8, ptr %50, i64 -8
  %52 = getelementptr inbounds i8, ptr %50, i64 -24
  store <2 x double> <double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF>, ptr %51, align 8, !tbaa !23
  store <2 x double> <double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF>, ptr %52, align 8, !tbaa !23
  %53 = getelementptr inbounds double, ptr %34, i64 %46
  %54 = getelementptr inbounds i8, ptr %53, i64 -8
  %55 = getelementptr inbounds i8, ptr %53, i64 -24
  store <2 x double> <double 0xFFEFFFFFFFFFFFFF, double 0xFFEFFFFFFFFFFFFF>, ptr %54, align 8, !tbaa !23
  store <2 x double> <double 0xFFEFFFFFFFFFFFFF, double 0xFFEFFFFFFFFFFFFF>, ptr %55, align 8, !tbaa !23
  %56 = getelementptr inbounds double, ptr %29, i64 %46
  %57 = getelementptr inbounds i8, ptr %56, i64 -8
  %58 = getelementptr inbounds i8, ptr %56, i64 -24
  store <2 x double> <double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF>, ptr %57, align 8, !tbaa !23
  store <2 x double> <double 0x7FEFFFFFFFFFFFFF, double 0x7FEFFFFFFFFFFFFF>, ptr %58, align 8, !tbaa !23
  %index.next = add nuw i64 %index, 4
  %59 = icmp eq i64 %index.next, %n.vec
  br i1 %59, label %middle.block, label %vector.body, !llvm.loop !24

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

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph
  %indvars.iv.ph = phi i64 [ %36, %vector.memcheck ], [ %36, %.lr.ph ], [ %ind.end, %middle.block ]
  %xtraiter = and i64 %indvars.iv.ph, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %indvars.iv.next.prol = add nsw i64 %indvars.iv.ph, -1
  %60 = getelementptr inbounds double, ptr %32, i64 %indvars.iv.next.prol
  store double 0xFFEFFFFFFFFFFFFF, ptr %60, align 8, !tbaa !23
  %61 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.next.prol
  store double 0x7FEFFFFFFFFFFFFF, ptr %61, align 8, !tbaa !23
  %62 = getelementptr inbounds double, ptr %34, i64 %indvars.iv.next.prol
  store double 0xFFEFFFFFFFFFFFFF, ptr %62, align 8, !tbaa !23
  %63 = getelementptr inbounds double, ptr %29, i64 %indvars.iv.next.prol
  store double 0x7FEFFFFFFFFFFFFF, ptr %63, align 8, !tbaa !23
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %64 = icmp eq i64 %indvars.iv.ph, 1
  br i1 %64, label %._crit_edge, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %65 = getelementptr inbounds double, ptr %32, i64 %indvars.iv.next
  store double 0xFFEFFFFFFFFFFFFF, ptr %65, align 8, !tbaa !23
  %66 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.next
  store double 0x7FEFFFFFFFFFFFFF, ptr %66, align 8, !tbaa !23
  %67 = getelementptr inbounds double, ptr %34, i64 %indvars.iv.next
  store double 0xFFEFFFFFFFFFFFFF, ptr %67, align 8, !tbaa !23
  %68 = getelementptr inbounds double, ptr %29, i64 %indvars.iv.next
  store double 0x7FEFFFFFFFFFFFFF, ptr %68, align 8, !tbaa !23
  %indvars.iv.next.1 = add nsw i64 %indvars.iv, -2
  %69 = getelementptr inbounds double, ptr %32, i64 %indvars.iv.next.1
  store double 0xFFEFFFFFFFFFFFFF, ptr %69, align 8, !tbaa !23
  %70 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.next.1
  store double 0x7FEFFFFFFFFFFFFF, ptr %70, align 8, !tbaa !23
  %71 = getelementptr inbounds double, ptr %34, i64 %indvars.iv.next.1
  store double 0xFFEFFFFFFFFFFFFF, ptr %71, align 8, !tbaa !23
  %72 = getelementptr inbounds double, ptr %29, i64 %indvars.iv.next.1
  store double 0x7FEFFFFFFFFFFFFF, ptr %72, align 8, !tbaa !23
  %73 = icmp eq i64 %indvars.iv.next.1, 0
  br i1 %73, label %._crit_edge, label %scalar.ph, !llvm.loop !28

._crit_edge:                                      ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %0
  %74 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 632), align 8, !tbaa !16
  %75 = add nsw i32 %74, 1
  %76 = shl i32 %74, 3
  %77 = mul i32 %76, %75
  %78 = tail call ptr @qh_memalloc(i32 noundef %77) #2
  store ptr %78, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2848), align 8, !tbaa !29
  %79 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 632), align 8, !tbaa !16
  %80 = shl i32 %79, 3
  %81 = add i32 %80, 8
  %82 = tail call ptr @qh_memalloc(i32 noundef %81) #2
  store ptr %82, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2856), align 8, !tbaa !30
  ret void
}

declare ptr @qh_setnew(i32 noundef) local_unnamed_addr #1

declare ptr @qh_memalloc(i32 noundef) local_unnamed_addr #1

attributes #0 = { 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 #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 }

!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 2832}
!6 = !{!"qhT", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !10, i64 64, !10, i64 72, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !11, i64 104, !7, i64 112, !7, i64 116, !11, i64 120, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144, !7, i64 148, !7, i64 152, !10, i64 160, !10, i64 168, !7, i64 176, !7, i64 180, !7, i64 184, !7, i64 188, !10, i64 192, !10, i64 200, !7, i64 208, !7, i64 212, !10, i64 216, !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, !7, i64 296, !8, i64 300, !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, !7, i64 544, !10, i64 552, !7, i64 560, !7, i64 564, !7, i64 568, !7, i64 572, !7, i64 576, !7, i64 580, !7, i64 584, !7, i64 588, !10, i64 592, !7, i64 600, !11, i64 608, !11, i64 616, !7, i64 624, !7, i64 628, !7, i64 632, !7, i64 636, !7, i64 640, !11, i64 648, !7, i64 656, !11, i64 664, !7, i64 672, !8, i64 676, !7, i64 932, !8, i64 936, !8, i64 1192, !7, i64 1704, !7, i64 1708, !7, i64 1712, !7, i64 1716, !7, i64 1720, !7, i64 1724, !11, i64 1728, !11, i64 1736, !11, i64 1744, !11, 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, !10, i64 1856, !10, i64 1864, !11, i64 1872, !10, i64 1880, !10, i64 1888, !10, i64 1896, !10, i64 1904, !7, i64 1912, !8, i64 1916, !8, i64 1928, !8, i64 2128, !8, i64 2168, !8, i64 2368, !11, i64 2408, !11, i64 2416, !11, i64 2424, !11, i64 2432, !7, i64 2440, !7, i64 2444, !7, i64 2448, !11, i64 2456, !11, i64 2464, !11, i64 2472, !11, i64 2480, !11, i64 2488, !7, i64 2496, !7, i64 2500, !11, i64 2504, !7, i64 2512, !11, i64 2520, !7, i64 2528, !11, i64 2536, !11, i64 2544, !11, i64 2552, !11, i64 2560, !7, i64 2568, !7, i64 2572, !7, i64 2576, !7, i64 2580, !7, i64 2584, !7, i64 2588, !7, i64 2592, !7, i64 2596, !12, i64 2600, !7, i64 2608, !7, i64 2612, !7, i64 2616, !7, i64 2620, !7, i64 2624, !11, i64 2632, !11, i64 2640, !7, i64 2648, !7, i64 2652, !7, i64 2656, !10, i64 2664, !7, i64 2672, !10, i64 2680, !10, i64 2688, !10, i64 2696, !7, i64 2704, !7, i64 2708, !7, i64 2712, !7, i64 2716, !7, i64 2720, !10, i64 2728, !10, i64 2736, !7, i64 2744, !7, i64 2748, !7, i64 2752, !7, i64 2756, !7, i64 2760, !7, i64 2764, !10, i64 2768, !10, i64 2776, !7, i64 2784, !7, i64 2788, !7, i64 2792, !7, i64 2796, !11, i64 2800, !11, i64 2808, !11, i64 2816, !11, i64 2824, !11, i64 2832, !11, i64 2840, !11, i64 2848, !11, i64 2856, !11, i64 2864, !7, i64 2872, !11, i64 2880, !11, i64 2888, !7, i64 2896, !7, i64 2900, !7, i64 2904, !11, i64 2912, !10, i64 2920, !10, i64 2928, !10, i64 2936, !10, i64 2944, !7, i64 2952, !7, i64 2956, !7, i64 2960, !7, i64 2964, !7, i64 2968, !7, i64 2972, !11, i64 2976, !11, i64 2984, !7, i64 2992}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!6, !7, i64 2448}
!14 = !{!6, !11, i64 2840}
!15 = !{!6, !11, i64 2912}
!16 = !{!6, !7, i64 632}
!17 = !{!6, !11, i64 1872}
!18 = !{!6, !7, i64 636}
!19 = !{!6, !11, i64 1736}
!20 = !{!6, !11, i64 1728}
!21 = !{!6, !11, i64 1752}
!22 = !{!6, !11, i64 1744}
!23 = !{!10, !10, i64 0}
!24 = distinct !{!24, !25, !26, !27}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!"llvm.loop.isvectorized", i32 1}
!27 = !{!"llvm.loop.unroll.runtime.disable"}
!28 = distinct !{!28, !25, !26}
!29 = !{!6, !11, i64 2848}
!30 = !{!6, !11, i64 2856}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass