; LLVM IR from jrl-umi3218/mc_rtc :: 3rd-party/qhull/src/libqhull_r (poly2_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, 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 }
%struct.facetT = type { double, double, double, ptr, %union.anon, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32 }
%union.anon = type { double }

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @qh_findfacet_all(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca double, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  store ptr null, ptr %13, align 8, !tbaa !5
  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 4, ptr %16) #3
  store i32 0, ptr %16, align 4, !tbaa !9
  %17 = load ptr, ptr %10, align 8, !tbaa !5
  store double 0xFFEFFFFFFFFFFFFF, ptr %17, align 8, !tbaa !11
  %18 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 0, ptr %18, align 4, !tbaa !9
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.qhT, ptr %19, i32 0, i32 163
  %21 = load ptr, ptr %20, align 8, !tbaa !13
  store ptr %21, ptr %14, align 8, !tbaa !5
  br label %22

22:                                               ; preds = %86, %6
  %23 = load ptr, ptr %14, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %30

25:                                               ; preds = %22
  %26 = load ptr, ptr %14, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.facetT, ptr %26, i32 0, i32 7
  %28 = load ptr, ptr %27, align 8, !tbaa !18
  %29 = icmp ne ptr %28, null
  br label %30

30:                                               ; preds = %25, %22
  %31 = phi i1 [ false, %22 ], [ %29, %25 ]
  br i1 %31, label %32, label %90

32:                                               ; preds = %30
  %33 = load ptr, ptr %14, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.facetT, ptr %33, i32 0, i32 15
  %35 = load i32, ptr %34, align 8
  %36 = lshr i32 %35, 16
  %37 = and i32 %36, 1
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %51, label %39

39:                                               ; preds = %32
  %40 = load ptr, ptr %14, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.facetT, ptr %40, i32 0, i32 3
  %42 = load ptr, ptr %41, align 8, !tbaa !20
  %43 = icmp ne ptr %42, null
  br i1 %43, label %44, label %51

44:                                               ; preds = %39
  %45 = load ptr, ptr %14, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.facetT, ptr %45, i32 0, i32 15
  %47 = load i32, ptr %46, align 8
  %48 = lshr i32 %47, 11
  %49 = and i32 %48, 1
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %44, %39, %32
  br label %86

52:                                               ; preds = %44
  %53 = load i32, ptr %9, align 4, !tbaa !9
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %63

55:                                               ; preds = %52
  %56 = load ptr, ptr %14, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.facetT, ptr %56, i32 0, i32 15
  %58 = load i32, ptr %57, align 8
  %59 = lshr i32 %58, 17
  %60 = and i32 %59, 1
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %55
  br label %86

63:                                               ; preds = %55, %52
  %64 = load i32, ptr %16, align 4, !tbaa !9
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %16, align 4, !tbaa !9
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  call void @qh_distplane(ptr noundef %66, ptr noundef %67, ptr noundef %68, ptr noundef %15)
  %69 = load double, ptr %15, align 8, !tbaa !11
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = load double, ptr %70, align 8, !tbaa !11
  %72 = fcmp ogt double %69, %71
  br i1 %72, label %73, label %85

73:                                               ; preds = %63
  %74 = load double, ptr %15, align 8, !tbaa !11
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  store double %74, ptr %75, align 8, !tbaa !11
  %76 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %76, ptr %13, align 8, !tbaa !5
  %77 = load double, ptr %15, align 8, !tbaa !11
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.qhT, ptr %78, i32 0, i32 6
  %80 = load double, ptr %79, align 8, !tbaa !21
  %81 = fcmp ogt double %77, %80
  br i1 %81, label %82, label %84

82:                                               ; preds = %73
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 1, ptr %83, align 4, !tbaa !9
  br label %90

84:                                               ; preds = %73
  br label %85

85:                                               ; preds = %84, %63
  br label %86

86:                                               ; preds = %85, %62, %51
  %87 = load ptr, ptr %14, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.facetT, ptr %87, i32 0, i32 7
  %89 = load ptr, ptr %88, align 8, !tbaa !18
  store ptr %89, ptr %14, align 8, !tbaa !5
  br label %22, !llvm.loop !22

90:                                               ; preds = %82, %30
  %91 = load i32, ptr %16, align 4, !tbaa !9
  %92 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 %91, ptr %92, align 4, !tbaa !9
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.qhT, ptr %93, i32 0, i32 29
  %95 = load i32, ptr %94, align 8, !tbaa !24
  %96 = icmp sge i32 %95, 3
  br i1 %96, label %97, label %120

97:                                               ; preds = %90
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.qhT, ptr %99, i32 0, i32 158
  %101 = load ptr, ptr %100, align 8, !tbaa !25
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = call i32 @qh_pointid(ptr noundef %102, ptr noundef %103)
  %105 = load i32, ptr %9, align 4, !tbaa !9
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = icmp ne ptr %106, null
  br i1 %107, label %108, label %112

108:                                              ; preds = %97
  %109 = load ptr, ptr %13, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.facetT, ptr %109, i32 0, i32 14
  %111 = load i32, ptr %110, align 4, !tbaa !26
  br label %113

112:                                              ; preds = %97
  br label %113

113:                                              ; preds = %112, %108
  %114 = phi i32 [ %111, %108 ], [ -1, %112 ]
  %115 = load ptr, ptr %10, align 8, !tbaa !5
  %116 = load double, ptr %115, align 8, !tbaa !11
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = load i32, ptr %117, align 4, !tbaa !9
  %119 = load i32, ptr %16, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %98, ptr noundef %101, i32 noundef 3016, ptr noundef @.str.139, i32 noundef %104, i32 noundef %105, i32 noundef %114, double noundef %116, i32 noundef %118, i32 noundef %119)
  br label %120

120:                                              ; preds = %113, %90
  %121 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, 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
  ret ptr %121
}

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, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !6, i64 2456}
!14 = !{!"qhT", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !12, 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, !12, i64 64, !12, 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, !12, i64 160, !12, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !12, i64 192, !12, i64 200, !10, i64 208, !10, i64 212, !12, 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, !12, i64 448, !12, i64 456, !12, 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, !12, 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, !12, 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, !12, i64 1760, !12, i64 1768, !12, i64 1776, !12, i64 1784, !12, i64 1792, !12, i64 1800, !12, i64 1808, !12, i64 1816, !12, i64 1824, !12, i64 1832, !12, i64 1840, !12, i64 1848, !12, i64 1856, !12, i64 1864, !6, i64 1872, !12, i64 1880, !12, i64 1888, !12, i64 1896, !12, 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, !12, i64 2664, !10, i64 2672, !12, i64 2680, !12, i64 2688, !12, i64 2696, !10, i64 2704, !10, i64 2708, !10, i64 2712, !10, i64 2716, !10, i64 2720, !12, i64 2728, !12, i64 2736, !10, i64 2744, !10, i64 2748, !10, i64 2752, !10, i64 2756, !10, i64 2760, !10, i64 2764, !12, i64 2768, !12, 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, !12, i64 2920, !12, i64 2928, !12, i64 2936, !12, 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, !12, i64 3240, !6, i64 3248, !6, i64 3256, !6, i64 3264, !16, i64 3272, !17, i64 3424}
!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, !12, i64 5336}
!18 = !{!19, !6, i64 56}
!19 = !{!"facetT", !12, i64 0, !12, i64 8, !12, 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}
!20 = !{!19, !6, i64 24}
!21 = !{!14, !12, i64 24}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!14, !10, i64 136}
!25 = !{!14, !6, i64 2424}
!26 = !{!19, !10, i64 108}


; 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.139 = external hidden unnamed_addr constant [79 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @qh_findfacet_all(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr nocapture noundef %3, ptr nocapture noundef %4, ptr nocapture noundef writeonly %5) local_unnamed_addr #2 {
  %7 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  store double 0xFFEFFFFFFFFFFFFF, ptr %3, align 8, !tbaa !5
  store i32 0, ptr %4, align 4, !tbaa !9
  %8 = getelementptr inbounds i8, ptr %0, i64 2456
  %.03349 = load ptr, ptr %8, align 8, !tbaa !11
  %.not50 = icmp eq ptr %.03349, null
  br i1 %.not50, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %6
  %.not42 = icmp eq i32 %2, 0
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  br i1 %.not42, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %28
  %.03353.us = phi ptr [ %.033.us, %28 ], [ %.03349, %.lr.ph ]
  %.052.us = phi i32 [ %.1.us, %28 ], [ 0, %.lr.ph ]
  %.03451.us = phi ptr [ %.135.us, %28 ], [ null, %.lr.ph ]
  %10 = getelementptr inbounds i8, ptr %.03353.us, i64 56
  %11 = load ptr, ptr %10, align 8, !tbaa !13
  %.not38.us = icmp eq ptr %11, null
  br i1 %.not38.us, label %.critedge, label %12

12:                                               ; preds = %.lr.ph.split.us
  %13 = getelementptr inbounds i8, ptr %.03353.us, i64 112
  %14 = load i32, ptr %13, align 8
  %15 = and i32 %14, 65536
  %.not39.us = icmp eq i32 %15, 0
  br i1 %.not39.us, label %16, label %28

16:                                               ; preds = %12
  %17 = getelementptr inbounds i8, ptr %.03353.us, i64 24
  %18 = load ptr, ptr %17, align 8, !tbaa !15
  %.not40.us = icmp ne ptr %18, null
  %19 = and i32 %14, 2048
  %.not41.us = icmp eq i32 %19, 0
  %or.cond.us = and i1 %.not41.us, %.not40.us
  br i1 %or.cond.us, label %20, label %28

20:                                               ; preds = %16
  %21 = add nsw i32 %.052.us, 1
  call void @qh_distplane(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %.03353.us, ptr noundef nonnull %7) #3
  %22 = load double, ptr %7, align 8, !tbaa !5
  %23 = load double, ptr %3, align 8, !tbaa !5
  %24 = fcmp ogt double %22, %23
  br i1 %24, label %25, label %28

25:                                               ; preds = %20
  store double %22, ptr %3, align 8, !tbaa !5
  %26 = load double, ptr %9, align 8, !tbaa !16
  %27 = fcmp ogt double %22, %26
  br i1 %27, label %.split.us, label %28

28:                                               ; preds = %25, %20, %16, %12
  %.135.us = phi ptr [ %.03451.us, %12 ], [ %.03353.us, %25 ], [ %.03451.us, %20 ], [ %.03451.us, %16 ]
  %.1.us = phi i32 [ %.052.us, %12 ], [ %21, %25 ], [ %21, %20 ], [ %.052.us, %16 ]
  %.033.us = load ptr, ptr %10, align 8, !tbaa !11
  %.not.us = icmp eq ptr %.033.us, null
  br i1 %.not.us, label %.critedge, label %.lr.ph.split.us, !llvm.loop !21

.lr.ph.split:                                     ; preds = %.lr.ph, %48
  %.03353 = phi ptr [ %.033, %48 ], [ %.03349, %.lr.ph ]
  %.052 = phi i32 [ %.1, %48 ], [ 0, %.lr.ph ]
  %.03451 = phi ptr [ %.135, %48 ], [ null, %.lr.ph ]
  %29 = getelementptr inbounds i8, ptr %.03353, i64 56
  %30 = load ptr, ptr %29, align 8, !tbaa !13
  %.not38 = icmp eq ptr %30, null
  br i1 %.not38, label %.critedge, label %31

31:                                               ; preds = %.lr.ph.split
  %32 = getelementptr inbounds i8, ptr %.03353, i64 112
  %33 = load i32, ptr %32, align 8
  %34 = and i32 %33, 65536
  %.not39 = icmp eq i32 %34, 0
  br i1 %.not39, label %35, label %48

35:                                               ; preds = %31
  %36 = getelementptr inbounds i8, ptr %.03353, i64 24
  %37 = load ptr, ptr %36, align 8, !tbaa !15
  %.not40 = icmp ne ptr %37, null
  %38 = and i32 %33, 133120
  %39 = icmp eq i32 %38, 0
  %or.cond63 = and i1 %39, %.not40
  br i1 %or.cond63, label %40, label %48

40:                                               ; preds = %35
  %41 = add nsw i32 %.052, 1
  call void @qh_distplane(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %.03353, ptr noundef nonnull %7) #3
  %42 = load double, ptr %7, align 8, !tbaa !5
  %43 = load double, ptr %3, align 8, !tbaa !5
  %44 = fcmp ogt double %42, %43
  br i1 %44, label %45, label %48

45:                                               ; preds = %40
  store double %42, ptr %3, align 8, !tbaa !5
  %46 = load double, ptr %9, align 8, !tbaa !16
  %47 = fcmp ogt double %42, %46
  br i1 %47, label %.split.us, label %48

.split.us:                                        ; preds = %45, %25
  %.us-phi59 = phi i32 [ %21, %25 ], [ %41, %45 ]
  %.us-phi60 = phi ptr [ %.03353.us, %25 ], [ %.03353, %45 ]
  store i32 1, ptr %4, align 4, !tbaa !9
  br label %.critedge

48:                                               ; preds = %40, %45, %31, %35
  %.135 = phi ptr [ %.03451, %31 ], [ %.03353, %45 ], [ %.03451, %40 ], [ %.03451, %35 ]
  %.1 = phi i32 [ %.052, %31 ], [ %41, %45 ], [ %41, %40 ], [ %.052, %35 ]
  %.033 = load ptr, ptr %29, align 8, !tbaa !11
  %.not = icmp eq ptr %.033, null
  br i1 %.not, label %.critedge, label %.lr.ph.split, !llvm.loop !21

.critedge:                                        ; preds = %.lr.ph.split, %48, %.lr.ph.split.us, %28, %6, %.split.us
  %.236 = phi ptr [ %.us-phi60, %.split.us ], [ null, %6 ], [ %.03451.us, %.lr.ph.split.us ], [ %.135.us, %28 ], [ %.03451, %.lr.ph.split ], [ %.135, %48 ]
  %.2 = phi i32 [ %.us-phi59, %.split.us ], [ 0, %6 ], [ %.052.us, %.lr.ph.split.us ], [ %.1.us, %28 ], [ %.052, %.lr.ph.split ], [ %.1, %48 ]
  store i32 %.2, ptr %5, align 4, !tbaa !9
  %49 = getelementptr inbounds i8, ptr %0, i64 136
  %50 = load i32, ptr %49, align 8, !tbaa !23
  %51 = icmp sgt i32 %50, 2
  br i1 %51, label %52, label %63

52:                                               ; preds = %.critedge
  %53 = getelementptr inbounds i8, ptr %0, i64 2424
  %54 = load ptr, ptr %53, align 8, !tbaa !24
  %55 = call i32 @qh_pointid(ptr noundef nonnull %0, ptr noundef %1) #3
  %.not44 = icmp eq ptr %.236, null
  br i1 %.not44, label %59, label %56

56:                                               ; preds = %52
  %57 = getelementptr inbounds i8, ptr %.236, i64 108
  %58 = load i32, ptr %57, align 4, !tbaa !25
  br label %59

59:                                               ; preds = %52, %56
  %60 = phi i32 [ %58, %56 ], [ -1, %52 ]
  %61 = load double, ptr %3, align 8, !tbaa !5
  %62 = load i32, ptr %4, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %54, i32 noundef 3016, ptr noundef nonnull @.str.139, i32 noundef %55, i32 noundef %2, i32 noundef %60, double noundef %61, i32 noundef %62, i32 noundef %.2) #3
  br label %63

63:                                               ; preds = %59, %.critedge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  ret ptr %.236
}

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 = !{!"double", !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, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !12, i64 56}
!14 = !{!"facetT", !6, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !7, 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}
!15 = !{!14, !12, i64 24}
!16 = !{!17, !6, i64 24}
!17 = !{!"qhT", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, 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, !6, i64 64, !6, 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, !6, i64 160, !6, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !6, i64 192, !6, i64 200, !10, i64 208, !10, i64 212, !6, 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, !6, i64 448, !6, i64 456, !6, 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, !6, 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, !6, 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, !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, !12, i64 1728, !12, i64 1736, !12, i64 1744, !12, i64 1752, !6, i64 1760, !6, i64 1768, !6, i64 1776, !6, i64 1784, !6, i64 1792, !6, i64 1800, !6, i64 1808, !6, i64 1816, !6, i64 1824, !6, i64 1832, !6, i64 1840, !6, i64 1848, !6, i64 1856, !6, i64 1864, !12, i64 1872, !6, i64 1880, !6, i64 1888, !6, i64 1896, !6, i64 1904, !10, i64 1912, !7, i64 1916, !7, i64 1928, !7, i64 2128, !7, i64 2168, !7, 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, !18, 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, !6, i64 2664, !10, i64 2672, !6, i64 2680, !6, i64 2688, !6, i64 2696, !10, i64 2704, !10, i64 2708, !10, i64 2712, !10, i64 2716, !10, i64 2720, !6, i64 2728, !6, i64 2736, !10, i64 2744, !10, i64 2748, !10, i64 2752, !10, i64 2756, !10, i64 2760, !10, i64 2764, !6, i64 2768, !6, 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, !6, i64 2920, !6, i64 2928, !6, i64 2936, !6, 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, !7, i64 2992, !7, i64 3192, !10, i64 3232, !6, i64 3240, !12, i64 3248, !12, i64 3256, !12, i64 3264, !19, i64 3272, !20, i64 3424}
!18 = !{!"long", !7, i64 0}
!19 = !{!"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}
!20 = !{!"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, !6, i64 5336}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!17, !10, i64 136}
!24 = !{!17, !12, i64 2424}
!25 = !{!14, !10, i64 108}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass