; LLVM IR from jrl-umi3218/mc_rtc :: 3rd-party/qhull/src/libqhull_r (geom2_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.setT = type { i32, [1 x %union.setelemT] }
%union.setelemT = type { ptr }

@.str.19 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [62 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

declare void @qh_errexit(ptr noundef, i32 noundef, ptr 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
declare dso_local double @qh_determinant(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local double @qh_detsimplex(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4) #2 {
  %6 = alloca ptr, align 8
  %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 ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca double, align 8
  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
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  store i32 0, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.qhT, ptr %20, i32 0, i32 258
  %22 = getelementptr inbounds %struct.qhstatT, ptr %21, i32 0, i32 0
  %23 = getelementptr inbounds [249 x %union.intrealT], ptr %22, i64 0, i64 56
  %24 = load i32, ptr %23, align 8, !tbaa !11
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %23, align 8, !tbaa !11
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.qhT, ptr %26, i32 0, i32 227
  %28 = load ptr, ptr %27, align 8, !tbaa !12
  store ptr %28, ptr %13, align 8, !tbaa !5
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.qhT, ptr %29, i32 0, i32 228
  %31 = load ptr, ptr %30, align 8, !tbaa !18
  store ptr %31, ptr %16, align 8, !tbaa !5
  store ptr null, ptr %14, align 8, !tbaa !5
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %74

34:                                               ; preds = %5
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.setT, ptr %35, i32 0, i32 1
  %37 = getelementptr inbounds [1 x %union.setelemT], ptr %36, i64 0, i64 0
  store ptr %37, ptr %15, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %72, %34
  %39 = load ptr, ptr %15, align 8, !tbaa !5
  %40 = getelementptr inbounds ptr, ptr %39, i32 1
  store ptr %40, ptr %15, align 8, !tbaa !5
  %41 = load ptr, ptr %39, align 8, !tbaa !5
  store ptr %41, ptr %14, align 8, !tbaa !5
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %73

43:                                               ; preds = %38
  %44 = load i32, ptr %18, align 4, !tbaa !9
  %45 = load i32, ptr %9, align 4, !tbaa !9
  %46 = icmp eq i32 %44, %45
  br i1 %46, label %47, label %48

47:                                               ; preds = %43
  br label %73

48:                                               ; preds = %43
  %49 = load ptr, ptr %13, align 8, !tbaa !5
  %50 = load ptr, ptr %16, align 8, !tbaa !5
  %51 = load i32, ptr %18, align 4, !tbaa !9
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %18, align 4, !tbaa !9
  %53 = sext i32 %51 to i64
  %54 = getelementptr inbounds ptr, ptr %50, i64 %53
  store ptr %49, ptr %54, align 8, !tbaa !5
  %55 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %55, ptr %12, align 8, !tbaa !5
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %56, ptr %11, align 8, !tbaa !5
  %57 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %57, ptr %17, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %62, %48
  %59 = load i32, ptr %17, align 4, !tbaa !9
  %60 = add nsw i32 %59, -1
  store i32 %60, ptr %17, align 4, !tbaa !9
  %61 = icmp ne i32 %59, 0
  br i1 %61, label %62, label %72

62:                                               ; preds = %58
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = getelementptr inbounds double, ptr %63, i32 1
  store ptr %64, ptr %12, align 8, !tbaa !5
  %65 = load double, ptr %63, align 8, !tbaa !19
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = getelementptr inbounds double, ptr %66, i32 1
  store ptr %67, ptr %11, align 8, !tbaa !5
  %68 = load double, ptr %66, align 8, !tbaa !19
  %69 = fsub double %65, %68
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = getelementptr inbounds double, ptr %70, i32 1
  store ptr %71, ptr %13, align 8, !tbaa !5
  store double %69, ptr %70, align 8, !tbaa !19
  br label %58, !llvm.loop !20

72:                                               ; preds = %58
  br label %38, !llvm.loop !22

73:                                               ; preds = %47, %38
  br label %74

74:                                               ; preds = %73, %5
  %75 = load i32, ptr %18, align 4, !tbaa !9
  %76 = load i32, ptr %9, align 4, !tbaa !9
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %78, label %86

78:                                               ; preds = %74
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.qhT, ptr %80, i32 0, i32 158
  %82 = load ptr, ptr %81, align 8, !tbaa !23
  %83 = load i32, ptr %18, align 4, !tbaa !9
  %84 = load i32, ptr %9, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %79, ptr noundef %82, i32 noundef 6007, ptr noundef @.str.19, i32 noundef %83, i32 noundef %84)
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_errexit(ptr noundef %85, i32 noundef 5, ptr noundef null, ptr noundef null)
  br label %86

86:                                               ; preds = %78, %74
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = load ptr, ptr %16, align 8, !tbaa !5
  %89 = load i32, ptr %9, align 4, !tbaa !9
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = call double @qh_determinant(ptr noundef %87, ptr noundef %88, i32 noundef %89, ptr noundef %90)
  store double %91, ptr %19, align 8, !tbaa !19
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.qhT, ptr %92, i32 0, i32 29
  %94 = load i32, ptr %93, align 8, !tbaa !24
  %95 = icmp sge i32 %94, 2
  br i1 %95, label %96, label %108

96:                                               ; preds = %86
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.qhT, ptr %98, i32 0, i32 158
  %100 = load ptr, ptr %99, align 8, !tbaa !23
  %101 = load double, ptr %19, align 8, !tbaa !19
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = load ptr, ptr %7, 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 %10, align 8, !tbaa !5
  %107 = load i32, ptr %106, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %97, ptr noundef %100, i32 noundef 2002, ptr noundef @.str.20, double noundef %101, i32 noundef %104, i32 noundef %105, i32 noundef %107)
  br label %108

108:                                              ; preds = %96, %86
  %109 = load double, ptr %19, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  ret double %109
}

declare i32 @qh_pointid(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 2848}
!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 = !{!13, !6, i64 2856}
!19 = !{!14, !14, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = !{!13, !6, i64 2424}
!24 = !{!13, !10, i64 136}


; 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.19 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [62 x i8], align 1

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

declare void @qh_errexit(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local double @qh_determinant(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local double @qh_detsimplex(ptr noundef %0, ptr noundef %1, ptr noundef readonly %2, i32 noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = ptrtoint ptr %1 to i64
  %7 = getelementptr inbounds i8, ptr %0, i64 3872
  %8 = load i32, ptr %7, align 8, !tbaa !5
  %9 = add nsw i32 %8, 1
  store i32 %9, ptr %7, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 2856
  %11 = load ptr, ptr %10, align 8, !tbaa !8
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %.loopexit49, label %12

12:                                               ; preds = %5
  %.04055 = getelementptr inbounds i8, ptr %2, i64 8
  %13 = load ptr, ptr %.04055, align 8, !tbaa !16
  %.not4756 = icmp eq ptr %13, null
  %14 = icmp eq i32 %3, 0
  %or.cond57 = or i1 %.not4756, %14
  br i1 %or.cond57, label %.loopexit49, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %12
  %15 = getelementptr inbounds i8, ptr %0, i64 2848
  %16 = load ptr, ptr %15, align 8, !tbaa !17
  %17 = zext i32 %3 to i64
  %min.iters.check = icmp ult i32 %3, 4
  %n.vec = and i64 %17, 4294967292
  %18 = shl nuw nsw i64 %n.vec, 3
  %ind.end = getelementptr i8, ptr %1, i64 %18
  %.cast = trunc nuw i64 %n.vec to i32
  %ind.end67 = sub i32 %3, %.cast
  %19 = shl nuw nsw i64 %n.vec, 3
  %20 = shl nuw nsw i64 %n.vec, 3
  %cmp.n = icmp eq i64 %n.vec, %17
  br label %.lr.ph

..loopexit_crit_edge:                             ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %.lcssa = phi ptr [ %ind.end71, %middle.block ], [ %.lcssa83.unr, %scalar.ph.prol.loopexit ], [ %67, %scalar.ph ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.040 = getelementptr inbounds i8, ptr %.04060, i64 8
  %21 = load ptr, ptr %.040, align 8, !tbaa !16
  %.not47 = icmp eq ptr %21, null
  %22 = icmp eq i64 %indvars.iv.next, %17
  %or.cond = select i1 %.not47, i1 true, i1 %22
  br i1 %or.cond, label %.loopexit49.loopexit, label %.lr.ph, !llvm.loop !18

.lr.ph:                                           ; preds = %.lr.ph.preheader, %..loopexit_crit_edge
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %..loopexit_crit_edge ]
  %23 = phi ptr [ %13, %.lr.ph.preheader ], [ %21, %..loopexit_crit_edge ]
  %.04060 = phi ptr [ %.04055, %.lr.ph.preheader ], [ %.040, %..loopexit_crit_edge ]
  %.04158 = phi ptr [ %16, %.lr.ph.preheader ], [ %.lcssa, %..loopexit_crit_edge ]
  %24 = getelementptr inbounds ptr, ptr %11, i64 %indvars.iv
  store ptr %.04158, ptr %24, align 8, !tbaa !16
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph
  %25 = ptrtoint ptr %23 to i64
  %.0415865 = ptrtoint ptr %.04158 to i64
  %26 = sub i64 %.0415865, %25
  %diff.check = icmp ult i64 %26, 32
  %27 = sub i64 %.0415865, %6
  %diff.check66 = icmp ult i64 %27, 32
  %conflict.rdx = or i1 %diff.check, %diff.check66
  br i1 %conflict.rdx, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %ind.end69 = getelementptr i8, ptr %23, i64 %19
  %ind.end71 = getelementptr i8, ptr %.04158, i64 %20
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = shl i64 %index, 3
  %next.gep = getelementptr i8, ptr %1, i64 %offset.idx
  %offset.idx74 = shl i64 %index, 3
  %next.gep75 = getelementptr i8, ptr %23, i64 %offset.idx74
  %offset.idx77 = shl i64 %index, 3
  %next.gep78 = getelementptr i8, ptr %.04158, i64 %offset.idx77
  %28 = getelementptr i8, ptr %next.gep75, i64 16
  %wide.load = load <2 x double>, ptr %next.gep75, align 8, !tbaa !20
  %wide.load80 = load <2 x double>, ptr %28, align 8, !tbaa !20
  %29 = getelementptr i8, ptr %next.gep, i64 16
  %wide.load81 = load <2 x double>, ptr %next.gep, align 8, !tbaa !20
  %wide.load82 = load <2 x double>, ptr %29, align 8, !tbaa !20
  %30 = fsub <2 x double> %wide.load, %wide.load81
  %31 = fsub <2 x double> %wide.load80, %wide.load82
  %32 = getelementptr i8, ptr %next.gep78, i64 16
  store <2 x double> %30, ptr %next.gep78, align 8, !tbaa !20
  store <2 x double> %31, ptr %32, align 8, !tbaa !20
  %index.next = add nuw i64 %index, 4
  %33 = icmp eq i64 %index.next, %n.vec
  br i1 %33, label %middle.block, label %vector.body, !llvm.loop !21

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

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph
  %.054.ph = phi ptr [ %1, %vector.memcheck ], [ %1, %.lr.ph ], [ %ind.end, %middle.block ]
  %.03853.ph = phi i32 [ %3, %vector.memcheck ], [ %3, %.lr.ph ], [ %ind.end67, %middle.block ]
  %.03952.ph = phi ptr [ %23, %vector.memcheck ], [ %23, %.lr.ph ], [ %ind.end69, %middle.block ]
  %.14251.ph = phi ptr [ %.04158, %vector.memcheck ], [ %.04158, %.lr.ph ], [ %ind.end71, %middle.block ]
  %34 = add nsw i32 %.03853.ph, -1
  %xtraiter = and i32 %.03853.ph, 3
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %.054.prol = phi ptr [ %38, %scalar.ph.prol ], [ %.054.ph, %scalar.ph.preheader ]
  %.03853.prol = phi i32 [ %35, %scalar.ph.prol ], [ %.03853.ph, %scalar.ph.preheader ]
  %.03952.prol = phi ptr [ %36, %scalar.ph.prol ], [ %.03952.ph, %scalar.ph.preheader ]
  %.14251.prol = phi ptr [ %41, %scalar.ph.prol ], [ %.14251.ph, %scalar.ph.preheader ]
  %prol.iter = phi i32 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %35 = add nsw i32 %.03853.prol, -1
  %36 = getelementptr inbounds i8, ptr %.03952.prol, i64 8
  %37 = load double, ptr %.03952.prol, align 8, !tbaa !20
  %38 = getelementptr inbounds i8, ptr %.054.prol, i64 8
  %39 = load double, ptr %.054.prol, align 8, !tbaa !20
  %40 = fsub double %37, %39
  %41 = getelementptr inbounds i8, ptr %.14251.prol, i64 8
  store double %40, ptr %.14251.prol, align 8, !tbaa !20
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !24

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %.lcssa83.unr = phi ptr [ poison, %scalar.ph.preheader ], [ %41, %scalar.ph.prol ]
  %.054.unr = phi ptr [ %.054.ph, %scalar.ph.preheader ], [ %38, %scalar.ph.prol ]
  %.03853.unr = phi i32 [ %.03853.ph, %scalar.ph.preheader ], [ %35, %scalar.ph.prol ]
  %.03952.unr = phi ptr [ %.03952.ph, %scalar.ph.preheader ], [ %36, %scalar.ph.prol ]
  %.14251.unr = phi ptr [ %.14251.ph, %scalar.ph.preheader ], [ %41, %scalar.ph.prol ]
  %42 = icmp ult i32 %34, 3
  br i1 %42, label %..loopexit_crit_edge, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %.054 = phi ptr [ %64, %scalar.ph ], [ %.054.unr, %scalar.ph.prol.loopexit ]
  %.03853 = phi i32 [ %61, %scalar.ph ], [ %.03853.unr, %scalar.ph.prol.loopexit ]
  %.03952 = phi ptr [ %62, %scalar.ph ], [ %.03952.unr, %scalar.ph.prol.loopexit ]
  %.14251 = phi ptr [ %67, %scalar.ph ], [ %.14251.unr, %scalar.ph.prol.loopexit ]
  %43 = getelementptr inbounds i8, ptr %.03952, i64 8
  %44 = load double, ptr %.03952, align 8, !tbaa !20
  %45 = getelementptr inbounds i8, ptr %.054, i64 8
  %46 = load double, ptr %.054, align 8, !tbaa !20
  %47 = fsub double %44, %46
  %48 = getelementptr inbounds i8, ptr %.14251, i64 8
  store double %47, ptr %.14251, align 8, !tbaa !20
  %49 = getelementptr inbounds i8, ptr %.03952, i64 16
  %50 = load double, ptr %43, align 8, !tbaa !20
  %51 = getelementptr inbounds i8, ptr %.054, i64 16
  %52 = load double, ptr %45, align 8, !tbaa !20
  %53 = fsub double %50, %52
  %54 = getelementptr inbounds i8, ptr %.14251, i64 16
  store double %53, ptr %48, align 8, !tbaa !20
  %55 = getelementptr inbounds i8, ptr %.03952, i64 24
  %56 = load double, ptr %49, align 8, !tbaa !20
  %57 = getelementptr inbounds i8, ptr %.054, i64 24
  %58 = load double, ptr %51, align 8, !tbaa !20
  %59 = fsub double %56, %58
  %60 = getelementptr inbounds i8, ptr %.14251, i64 24
  store double %59, ptr %54, align 8, !tbaa !20
  %61 = add nsw i32 %.03853, -4
  %62 = getelementptr inbounds i8, ptr %.03952, i64 32
  %63 = load double, ptr %55, align 8, !tbaa !20
  %64 = getelementptr inbounds i8, ptr %.054, i64 32
  %65 = load double, ptr %57, align 8, !tbaa !20
  %66 = fsub double %63, %65
  %67 = getelementptr inbounds i8, ptr %.14251, i64 32
  store double %66, ptr %60, align 8, !tbaa !20
  %.not48.3 = icmp eq i32 %61, 0
  br i1 %.not48.3, label %..loopexit_crit_edge, label %scalar.ph, !llvm.loop !26

.loopexit49.loopexit:                             ; preds = %..loopexit_crit_edge
  %68 = trunc nuw i64 %indvars.iv.next to i32
  br label %.loopexit49

.loopexit49:                                      ; preds = %.loopexit49.loopexit, %12, %5
  %.1 = phi i32 [ 0, %5 ], [ 0, %12 ], [ %68, %.loopexit49.loopexit ]
  %69 = icmp slt i32 %.1, %3
  br i1 %69, label %70, label %73

70:                                               ; preds = %.loopexit49
  %71 = getelementptr inbounds i8, ptr %0, i64 2424
  %72 = load ptr, ptr %71, align 8, !tbaa !27
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, ptr noundef %72, i32 noundef 6007, ptr noundef nonnull @.str.19, i32 noundef %.1, i32 noundef %3) #2
  tail call void @qh_errexit(ptr noundef %0, i32 noundef 5, ptr noundef null, ptr noundef null) #2
  br label %73

73:                                               ; preds = %70, %.loopexit49
  %74 = tail call double @qh_determinant(ptr noundef %0, ptr noundef %11, i32 noundef %3, ptr noundef %4)
  %75 = getelementptr inbounds i8, ptr %0, i64 136
  %76 = load i32, ptr %75, align 8, !tbaa !28
  %77 = icmp sgt i32 %76, 1
  br i1 %77, label %78, label %83

78:                                               ; preds = %73
  %79 = getelementptr inbounds i8, ptr %0, i64 2424
  %80 = load ptr, ptr %79, align 8, !tbaa !27
  %81 = tail call i32 @qh_pointid(ptr noundef nonnull %0, ptr noundef %1) #2
  %82 = load i32, ptr %4, align 4, !tbaa !29
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %80, i32 noundef 2002, ptr noundef nonnull @.str.20, double noundef %74, i32 noundef %81, i32 noundef %3, i32 noundef %82) #2
  br label %83

83:                                               ; preds = %78, %73
  ret double %74
}

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

attributes #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 = { 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 = { 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 2856}
!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 = !{!12, !12, i64 0}
!17 = !{!9, !12, i64 2848}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!11, !11, i64 0}
!21 = distinct !{!21, !19, !22, !23}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = !{!"llvm.loop.unroll.runtime.disable"}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.unroll.disable"}
!26 = distinct !{!26, !19, !22}
!27 = !{!9, !12, i64 2424}
!28 = !{!9, !10, i64 136}
!29 = !{!10, !10, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass