; LLVM IR from jrl-umi3218/mc_rtc :: 3rd-party/qhull/src/libqhull_r (poly_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.facetT = type { double, double, double, ptr, %union.anon, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32 }
%union.anon = type { double }
%struct.qhT = type { i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [29 x i32], i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, i32, ptr, i32, [256 x i8], i32, [256 x i8], [512 x i8], i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, double, double, double, double, double, double, double, double, double, double, double, double, double, double, ptr, double, double, double, double, i32, [6 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, [1 x %struct.__jmp_buf_tag], [40 x i8], i32, double, ptr, ptr, ptr, %struct.qhmemT, %struct.qhstatT }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.qhmemT = type { i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.qhstatT = type { [249 x %union.intrealT], [259 x i8], [249 x ptr], [249 x i16], [249 x i8], [249 x i8], [9 x %union.intrealT], i32, i32, i32, i32, double }
%union.intrealT = type { double }

@.str.6 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1

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

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

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

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

18:                                               ; preds = %4
  %19 = load ptr, ptr %8, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %22, label %21

21:                                               ; preds = %18
  store i32 0, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %97

22:                                               ; preds = %18, %4
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.qhT, ptr %23, i32 0, i32 258
  %25 = getelementptr inbounds %struct.qhstatT, ptr %24, i32 0, i32 0
  %26 = getelementptr inbounds [249 x %union.intrealT], ptr %25, i64 0, i64 57
  %27 = load i32, ptr %26, align 8, !tbaa !11
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %26, align 8, !tbaa !11
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.qhT, ptr %30, i32 0, i32 159
  %32 = load ptr, ptr %31, align 8, !tbaa !12
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  call void @qh_distplane(ptr noundef %29, ptr noundef %32, ptr noundef %33, ptr noundef %10)
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %39

36:                                               ; preds = %22
  %37 = load double, ptr %10, align 8, !tbaa !18
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  store double %37, ptr %38, align 8, !tbaa !18
  br label %39

39:                                               ; preds = %36, %22
  %40 = load i32, ptr %9, align 4, !tbaa !9
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %49

42:                                               ; preds = %39
  %43 = load double, ptr %10, align 8, !tbaa !18
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.qhT, ptr %44, i32 0, i32 134
  %46 = load double, ptr %45, align 8, !tbaa !19
  %47 = fneg double %46
  %48 = fcmp oge double %43, %47
  br i1 %48, label %55, label %49

49:                                               ; preds = %42, %39
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %96, label %52

52:                                               ; preds = %49
  %53 = load double, ptr %10, align 8, !tbaa !18
  %54 = fcmp ogt double %53, 0.000000e+00
  br i1 %54, label %55, label %96

55:                                               ; preds = %52, %42
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.facetT, ptr %56, i32 0, i32 15
  %58 = load i32, ptr %57, align 8
  %59 = and i32 %58, -65537
  %60 = or i32 %59, 65536
  store i32 %60, ptr %57, align 8
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.qhT, ptr %61, i32 0, i32 29
  %63 = load i32, ptr %62, align 8, !tbaa !20
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %78

65:                                               ; preds = %55
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.qhT, ptr %67, i32 0, i32 158
  %69 = load ptr, ptr %68, align 8, !tbaa !21
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.facetT, ptr %70, i32 0, i32 14
  %72 = load i32, ptr %71, align 4, !tbaa !22
  %73 = load i32, ptr %9, align 4, !tbaa !9
  %74 = load double, ptr %10, align 8, !tbaa !18
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.qhT, ptr %75, i32 0, i32 190
  %77 = load i32, ptr %76, align 4, !tbaa !24
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %66, ptr noundef %69, i32 noundef 19, ptr noundef @.str.6, i32 noundef %72, i32 noundef %73, double noundef %74, i32 noundef %77)
  br label %78

78:                                               ; preds = %65, %55
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.qhT, ptr %79, i32 0, i32 178
  %81 = load i32, ptr %80, align 8, !tbaa !25
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.qhT, ptr %82, i32 0, i32 110
  %84 = load i32, ptr %83, align 8, !tbaa !26
  %85 = add nsw i32 %84, 1
  %86 = icmp sgt i32 %81, %85
  br i1 %86, label %87, label %95

87:                                               ; preds = %78
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.qhT, ptr %88, i32 0, i32 258
  %90 = getelementptr inbounds %struct.qhstatT, ptr %89, i32 0, i32 0
  %91 = getelementptr inbounds [249 x %union.intrealT], ptr %90, i64 0, i64 87
  %92 = load i32, ptr %91, align 8, !tbaa !11
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %91, align 8, !tbaa !11
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_joggle_restart(ptr noundef %94, ptr noundef @.str.7)
  br label %95

95:                                               ; preds = %87, %78
  store i32 0, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %97

96:                                               ; preds = %52, %49
  store i32 1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %97

97:                                               ; preds = %96, %95, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %98 = load i32, ptr %5, align 4
  ret i32 %98
}

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

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


; 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.6 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @qh_checkflipped(ptr noundef %0, ptr noundef %1, ptr noundef writeonly %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %6 = getelementptr inbounds i8, ptr %1, i64 112
  %7 = load i32, ptr %6, align 8
  %8 = and i32 %7, 65536
  %9 = icmp eq i32 %8, 0
  %10 = icmp ne ptr %2, null
  %or.cond = or i1 %10, %9
  br i1 %or.cond, label %11, label %.thread

11:                                               ; preds = %4
  %12 = getelementptr inbounds i8, ptr %0, i64 3880
  %13 = load i32, ptr %12, align 8, !tbaa !5
  %14 = add nsw i32 %13, 1
  store i32 %14, ptr %12, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %0, i64 2432
  %16 = load ptr, ptr %15, align 8, !tbaa !8
  call void @qh_distplane(ptr noundef %0, ptr noundef %16, ptr noundef nonnull %1, ptr noundef nonnull %5) #3
  br i1 %10, label %17, label %19

17:                                               ; preds = %11
  %18 = load double, ptr %5, align 8, !tbaa !16
  store double %18, ptr %2, align 8, !tbaa !16
  br label %19

19:                                               ; preds = %17, %11
  %.not = icmp eq i32 %3, 0
  %20 = load double, ptr %5, align 8
  br i1 %.not, label %26, label %21

21:                                               ; preds = %19
  %22 = getelementptr inbounds i8, ptr %0, i64 1784
  %23 = load double, ptr %22, align 8, !tbaa !17
  %24 = fneg double %23
  %25 = fcmp ult double %20, %24
  br i1 %25, label %.thread, label %28

26:                                               ; preds = %19
  %27 = fcmp ogt double %20, 0.000000e+00
  br i1 %27, label %28, label %.thread

28:                                               ; preds = %26, %21
  %29 = load i32, ptr %6, align 8
  %30 = or i32 %29, 65536
  store i32 %30, ptr %6, align 8
  %31 = getelementptr inbounds i8, ptr %0, i64 136
  %32 = load i32, ptr %31, align 8, !tbaa !18
  %.not26 = icmp eq i32 %32, 0
  br i1 %.not26, label %40, label %33

33:                                               ; preds = %28
  %34 = getelementptr inbounds i8, ptr %0, i64 2424
  %35 = load ptr, ptr %34, align 8, !tbaa !19
  %36 = getelementptr inbounds i8, ptr %1, i64 108
  %37 = load i32, ptr %36, align 4, !tbaa !20
  %38 = getelementptr inbounds i8, ptr %0, i64 2620
  %39 = load i32, ptr %38, align 4, !tbaa !22
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %35, i32 noundef 19, ptr noundef nonnull @.str.6, i32 noundef %37, i32 noundef %3, double noundef %20, i32 noundef %39) #3
  br label %40

40:                                               ; preds = %33, %28
  %41 = getelementptr inbounds i8, ptr %0, i64 2568
  %42 = load i32, ptr %41, align 8, !tbaa !23
  %43 = getelementptr inbounds i8, ptr %0, i64 632
  %44 = load i32, ptr %43, align 8, !tbaa !24
  %45 = add nsw i32 %44, 1
  %46 = icmp sgt i32 %42, %45
  br i1 %46, label %47, label %.thread

47:                                               ; preds = %40
  %48 = getelementptr inbounds i8, ptr %0, i64 4120
  %49 = load i32, ptr %48, align 8, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %48, align 8, !tbaa !5
  call void @qh_joggle_restart(ptr noundef nonnull %0, ptr noundef nonnull @.str.7) #3
  br label %.thread

.thread:                                          ; preds = %21, %26, %40, %47, %4
  %.0 = phi i32 [ 0, %4 ], [ 0, %47 ], [ 0, %40 ], [ 1, %26 ], [ 1, %21 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  ret i32 %.0
}

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

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

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass