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

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

%struct.qhT = type { i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [29 x i32], i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, i32, ptr, i32, [256 x i8], i32, [256 x i8], [512 x i8], i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, double, double, double, double, double, double, double, double, double, double, double, double, double, double, ptr, double, double, double, double, i32, [6 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, double, i32, i32, i32, i32, i32, i32, ptr, ptr, i32 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }

@qh_qh = external global %struct.qhT, align 8
@.str.1 = external hidden unnamed_addr constant [76 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, i32 noundef, ptr noundef, ...) #1

declare void @qh_errexit(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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: nounwind uwtable
define dso_local double @qh_determinant(ptr noundef %0, i32 noundef %1, ptr noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store double 0.000000e+00, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  %10 = load ptr, ptr %6, align 8, !tbaa !5
  store i32 0, ptr %10, align 4, !tbaa !9
  %11 = load i32, ptr %5, align 4, !tbaa !9
  %12 = icmp slt i32 %11, 2
  br i1 %12, label %13, label %15

13:                                               ; preds = %3
  %14 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !13
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %14, i32 noundef 6005, ptr noundef @.str.1)
  call void @qh_errexit(i32 noundef 5, ptr noundef null, ptr noundef null)
  br label %199

15:                                               ; preds = %3
  %16 = load i32, ptr %5, align 4, !tbaa !9
  %17 = icmp eq i32 %16, 2
  br i1 %17, label %18, label %59

18:                                               ; preds = %15
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds ptr, ptr %19, i64 0
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = getelementptr inbounds double, ptr %21, i64 0
  %23 = load double, ptr %22, align 8, !tbaa !11
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds ptr, ptr %24, i64 1
  %26 = load ptr, ptr %25, align 8, !tbaa !5
  %27 = getelementptr inbounds double, ptr %26, i64 1
  %28 = load double, ptr %27, align 8, !tbaa !11
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds ptr, ptr %29, i64 0
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  %32 = getelementptr inbounds double, ptr %31, i64 1
  %33 = load double, ptr %32, align 8, !tbaa !11
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds ptr, ptr %34, i64 1
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = getelementptr inbounds double, ptr %36, i64 0
  %38 = load double, ptr %37, align 8, !tbaa !11
  %39 = fmul double %33, %38
  %40 = fneg double %39
  %41 = call double @llvm.fmuladd.f64(double %23, double %28, double %40)
  store double %41, ptr %7, align 8, !tbaa !11
  %42 = load double, ptr %7, align 8, !tbaa !11
  %43 = fcmp olt double %42, 0.000000e+00
  br i1 %43, label %44, label %47

44:                                               ; preds = %18
  %45 = load double, ptr %7, align 8, !tbaa !11
  %46 = fneg double %45
  br label %49

47:                                               ; preds = %18
  %48 = load double, ptr %7, align 8, !tbaa !11
  br label %49

49:                                               ; preds = %47, %44
  %50 = phi double [ %46, %44 ], [ %48, %47 ]
  %51 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 145), align 8, !tbaa !16
  %52 = getelementptr inbounds double, ptr %51, i64 1
  %53 = load double, ptr %52, align 8, !tbaa !11
  %54 = fmul double 1.000000e+01, %53
  %55 = fcmp olt double %50, %54
  br i1 %55, label %56, label %58

56:                                               ; preds = %49
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  store i32 1, ptr %57, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %56, %49
  br label %198

59:                                               ; preds = %15
  %60 = load i32, ptr %5, align 4, !tbaa !9
  %61 = icmp eq i32 %60, 3
  br i1 %61, label %62, label %168

62:                                               ; preds = %59
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds ptr, ptr %63, i64 0
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = getelementptr inbounds double, ptr %65, i64 0
  %67 = load double, ptr %66, align 8, !tbaa !11
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds ptr, ptr %68, i64 1
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  %71 = getelementptr inbounds double, ptr %70, i64 1
  %72 = load double, ptr %71, align 8, !tbaa !11
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds ptr, ptr %73, i64 2
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  %76 = getelementptr inbounds double, ptr %75, i64 2
  %77 = load double, ptr %76, align 8, !tbaa !11
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds ptr, ptr %78, i64 1
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = getelementptr inbounds double, ptr %80, i64 2
  %82 = load double, ptr %81, align 8, !tbaa !11
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = getelementptr inbounds ptr, ptr %83, i64 2
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  %86 = getelementptr inbounds double, ptr %85, i64 1
  %87 = load double, ptr %86, align 8, !tbaa !11
  %88 = fmul double %82, %87
  %89 = fneg double %88
  %90 = call double @llvm.fmuladd.f64(double %72, double %77, double %89)
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = getelementptr inbounds ptr, ptr %91, i64 1
  %93 = load ptr, ptr %92, align 8, !tbaa !5
  %94 = getelementptr inbounds double, ptr %93, i64 0
  %95 = load double, ptr %94, align 8, !tbaa !11
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds ptr, ptr %96, i64 0
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  %99 = getelementptr inbounds double, ptr %98, i64 1
  %100 = load double, ptr %99, align 8, !tbaa !11
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds ptr, ptr %101, i64 2
  %103 = load ptr, ptr %102, align 8, !tbaa !5
  %104 = getelementptr inbounds double, ptr %103, i64 2
  %105 = load double, ptr %104, align 8, !tbaa !11
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds ptr, ptr %106, i64 0
  %108 = load ptr, ptr %107, align 8, !tbaa !5
  %109 = getelementptr inbounds double, ptr %108, i64 2
  %110 = load double, ptr %109, align 8, !tbaa !11
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = getelementptr inbounds ptr, ptr %111, i64 2
  %113 = load ptr, ptr %112, align 8, !tbaa !5
  %114 = getelementptr inbounds double, ptr %113, i64 1
  %115 = load double, ptr %114, align 8, !tbaa !11
  %116 = fmul double %110, %115
  %117 = fneg double %116
  %118 = call double @llvm.fmuladd.f64(double %100, double %105, double %117)
  %119 = fmul double %95, %118
  %120 = fneg double %119
  %121 = call double @llvm.fmuladd.f64(double %67, double %90, double %120)
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds ptr, ptr %122, i64 2
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = getelementptr inbounds double, ptr %124, i64 0
  %126 = load double, ptr %125, align 8, !tbaa !11
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = getelementptr inbounds ptr, ptr %127, i64 0
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = getelementptr inbounds double, ptr %129, i64 1
  %131 = load double, ptr %130, align 8, !tbaa !11
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = getelementptr inbounds ptr, ptr %132, i64 1
  %134 = load ptr, ptr %133, align 8, !tbaa !5
  %135 = getelementptr inbounds double, ptr %134, i64 2
  %136 = load double, ptr %135, align 8, !tbaa !11
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds ptr, ptr %137, i64 0
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  %140 = getelementptr inbounds double, ptr %139, i64 2
  %141 = load double, ptr %140, align 8, !tbaa !11
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = getelementptr inbounds ptr, ptr %142, i64 1
  %144 = load ptr, ptr %143, align 8, !tbaa !5
  %145 = getelementptr inbounds double, ptr %144, i64 1
  %146 = load double, ptr %145, align 8, !tbaa !11
  %147 = fmul double %141, %146
  %148 = fneg double %147
  %149 = call double @llvm.fmuladd.f64(double %131, double %136, double %148)
  %150 = call double @llvm.fmuladd.f64(double %126, double %149, double %121)
  store double %150, ptr %7, align 8, !tbaa !11
  %151 = load double, ptr %7, align 8, !tbaa !11
  %152 = fcmp olt double %151, 0.000000e+00
  br i1 %152, label %153, label %156

153:                                              ; preds = %62
  %154 = load double, ptr %7, align 8, !tbaa !11
  %155 = fneg double %154
  br label %158

156:                                              ; preds = %62
  %157 = load double, ptr %7, align 8, !tbaa !11
  br label %158

158:                                              ; preds = %156, %153
  %159 = phi double [ %155, %153 ], [ %157, %156 ]
  %160 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 145), align 8, !tbaa !16
  %161 = getelementptr inbounds double, ptr %160, i64 2
  %162 = load double, ptr %161, align 8, !tbaa !11
  %163 = fmul double 1.000000e+01, %162
  %164 = fcmp olt double %159, %163
  br i1 %164, label %165, label %167

165:                                              ; preds = %158
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  store i32 1, ptr %166, align 4, !tbaa !9
  br label %167

167:                                              ; preds = %165, %158
  br label %197

168:                                              ; preds = %59
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = load i32, ptr %5, align 4, !tbaa !9
  %171 = load i32, ptr %5, align 4, !tbaa !9
  %172 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_gausselim(ptr noundef %169, i32 noundef %170, i32 noundef %171, ptr noundef %9, ptr noundef %172)
  store double 1.000000e+00, ptr %7, align 8, !tbaa !11
  %173 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %173, ptr %8, align 4, !tbaa !9
  br label %174

174:                                              ; preds = %178, %168
  %175 = load i32, ptr %8, align 4, !tbaa !9
  %176 = add nsw i32 %175, -1
  store i32 %176, ptr %8, align 4, !tbaa !9
  %177 = icmp ne i32 %175, 0
  br i1 %177, label %178, label %190

178:                                              ; preds = %174
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = load i32, ptr %8, align 4, !tbaa !9
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds ptr, ptr %179, i64 %181
  %183 = load ptr, ptr %182, align 8, !tbaa !5
  %184 = load i32, ptr %8, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds double, ptr %183, i64 %185
  %187 = load double, ptr %186, align 8, !tbaa !11
  %188 = load double, ptr %7, align 8, !tbaa !11
  %189 = fmul double %188, %187
  store double %189, ptr %7, align 8, !tbaa !11
  br label %174, !llvm.loop !17

190:                                              ; preds = %174
  %191 = load i32, ptr %9, align 4, !tbaa !9
  %192 = icmp ne i32 %191, 0
  br i1 %192, label %193, label %196

193:                                              ; preds = %190
  %194 = load double, ptr %7, align 8, !tbaa !11
  %195 = fneg double %194
  store double %195, ptr %7, align 8, !tbaa !11
  br label %196

196:                                              ; preds = %193, %190
  br label %197

197:                                              ; preds = %196, %167
  br label %198

198:                                              ; preds = %197, %58
  br label %199

199:                                              ; preds = %198, %13
  %200 = load double, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  ret double %200
}

declare void @qh_gausselim(ptr noundef, i32 noundef, i32 noundef, 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !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 2424}
!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, !6, i64 2984, !10, i64 2992}
!15 = !{!"long", !7, i64 0}
!16 = !{!14, !6, i64 1872}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


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

%struct.qhT = type { i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [29 x i32], i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, i32, ptr, i32, [256 x i8], i32, [256 x i8], [512 x i8], i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, double, double, double, double, double, double, double, double, double, double, double, double, double, double, ptr, double, double, double, double, i32, [6 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, double, i32, i32, i32, i32, i32, i32, ptr, ptr, i32 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }

@qh_qh = external local_unnamed_addr global %struct.qhT, align 8
@.str.1 = external hidden unnamed_addr constant [76 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, i32 noundef, ptr noundef, ...) local_unnamed_addr #1

declare void @qh_errexit(i32 noundef, ptr 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: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: nounwind uwtable
define dso_local double @qh_determinant(ptr noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #3 {
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  store i32 0, ptr %2, align 4, !tbaa !5
  %5 = icmp slt i32 %1, 2
  br i1 %5, label %6, label %8

6:                                                ; preds = %3
  %7 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !9
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %7, i32 noundef 6005, ptr noundef nonnull @.str.1) #4
  tail call void @qh_errexit(i32 noundef 5, ptr noundef null, ptr noundef null) #4
  br label %105

8:                                                ; preds = %3
  switch i32 %1, label %73 [
    i32 2, label %9
    i32 3, label %31
  ]

9:                                                ; preds = %8
  %10 = load ptr, ptr %0, align 8, !tbaa !14
  %11 = load double, ptr %10, align 8, !tbaa !15
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !14
  %14 = getelementptr inbounds i8, ptr %13, i64 8
  %15 = load double, ptr %14, align 8, !tbaa !15
  %16 = getelementptr inbounds i8, ptr %10, i64 8
  %17 = load double, ptr %16, align 8, !tbaa !15
  %18 = load double, ptr %13, align 8, !tbaa !15
  %19 = fneg double %17
  %20 = fmul double %18, %19
  %21 = tail call double @llvm.fmuladd.f64(double %11, double %15, double %20)
  %22 = fcmp olt double %21, 0.000000e+00
  %23 = fneg double %21
  %24 = select i1 %22, double %23, double %21
  %25 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1872), align 8, !tbaa !16
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  %27 = load double, ptr %26, align 8, !tbaa !15
  %28 = fmul double %27, 1.000000e+01
  %29 = fcmp olt double %24, %28
  br i1 %29, label %30, label %105

30:                                               ; preds = %9
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %105

31:                                               ; preds = %8
  %32 = load ptr, ptr %0, align 8, !tbaa !14
  %33 = load double, ptr %32, align 8, !tbaa !15
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  %35 = load ptr, ptr %34, align 8, !tbaa !14
  %36 = getelementptr inbounds i8, ptr %35, i64 8
  %37 = load double, ptr %36, align 8, !tbaa !15
  %38 = getelementptr inbounds i8, ptr %0, i64 16
  %39 = load ptr, ptr %38, align 8, !tbaa !14
  %40 = getelementptr inbounds i8, ptr %39, i64 16
  %41 = load double, ptr %40, align 8, !tbaa !15
  %42 = getelementptr inbounds i8, ptr %35, i64 16
  %43 = load double, ptr %42, align 8, !tbaa !15
  %44 = getelementptr inbounds i8, ptr %39, i64 8
  %45 = load double, ptr %44, align 8, !tbaa !15
  %46 = fneg double %43
  %47 = fmul double %45, %46
  %48 = tail call double @llvm.fmuladd.f64(double %37, double %41, double %47)
  %49 = load double, ptr %35, align 8, !tbaa !15
  %50 = getelementptr inbounds i8, ptr %32, i64 8
  %51 = load double, ptr %50, align 8, !tbaa !15
  %52 = getelementptr inbounds i8, ptr %32, i64 16
  %53 = load double, ptr %52, align 8, !tbaa !15
  %54 = fneg double %53
  %55 = fmul double %45, %54
  %56 = tail call double @llvm.fmuladd.f64(double %51, double %41, double %55)
  %57 = fneg double %49
  %58 = fmul double %56, %57
  %59 = tail call double @llvm.fmuladd.f64(double %33, double %48, double %58)
  %60 = load double, ptr %39, align 8, !tbaa !15
  %61 = fmul double %37, %54
  %62 = tail call double @llvm.fmuladd.f64(double %51, double %43, double %61)
  %63 = tail call double @llvm.fmuladd.f64(double %60, double %62, double %59)
  %64 = fcmp olt double %63, 0.000000e+00
  %65 = fneg double %63
  %66 = select i1 %64, double %65, double %63
  %67 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1872), align 8, !tbaa !16
  %68 = getelementptr inbounds i8, ptr %67, i64 16
  %69 = load double, ptr %68, align 8, !tbaa !15
  %70 = fmul double %69, 1.000000e+01
  %71 = fcmp olt double %66, %70
  br i1 %71, label %72, label %105

72:                                               ; preds = %31
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %105

73:                                               ; preds = %8
  call void @qh_gausselim(ptr noundef %0, i32 noundef %1, i32 noundef %1, ptr noundef nonnull %4, ptr noundef nonnull %2) #4
  %74 = zext nneg i32 %1 to i64
  %xtraiter = and i64 %74, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.prol.loopexit, label %.prol.preheader

.prol.preheader:                                  ; preds = %73, %.prol.preheader
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %.prol.preheader ], [ %74, %73 ]
  %.04245.prol = phi double [ %79, %.prol.preheader ], [ 1.000000e+00, %73 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.prol.preheader ], [ 0, %73 ]
  %indvars.iv.next.prol = add nsw i64 %indvars.iv.prol, -1
  %75 = getelementptr inbounds ptr, ptr %0, i64 %indvars.iv.next.prol
  %76 = load ptr, ptr %75, align 8, !tbaa !14
  %77 = getelementptr inbounds double, ptr %76, i64 %indvars.iv.next.prol
  %78 = load double, ptr %77, align 8, !tbaa !15
  %79 = fmul double %.04245.prol, %78
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.prol.loopexit, label %.prol.preheader, !llvm.loop !17

.prol.loopexit:                                   ; preds = %.prol.preheader, %73
  %.lcssa.unr = phi double [ poison, %73 ], [ %79, %.prol.preheader ]
  %indvars.iv.unr = phi i64 [ %74, %73 ], [ %indvars.iv.next.prol, %.prol.preheader ]
  %.04245.unr = phi double [ 1.000000e+00, %73 ], [ %79, %.prol.preheader ]
  %80 = icmp ult i32 %1, 4
  br i1 %80, label %.unr-lcssa, label %.new

.new:                                             ; preds = %.prol.loopexit, %.new
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %.new ], [ %indvars.iv.unr, %.prol.loopexit ]
  %.04245 = phi double [ %100, %.new ], [ %.04245.unr, %.prol.loopexit ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %81 = getelementptr inbounds ptr, ptr %0, i64 %indvars.iv.next
  %82 = load ptr, ptr %81, align 8, !tbaa !14
  %83 = getelementptr inbounds double, ptr %82, i64 %indvars.iv.next
  %84 = load double, ptr %83, align 8, !tbaa !15
  %85 = fmul double %.04245, %84
  %indvars.iv.next.1 = add nsw i64 %indvars.iv, -2
  %86 = getelementptr inbounds ptr, ptr %0, i64 %indvars.iv.next.1
  %87 = load ptr, ptr %86, align 8, !tbaa !14
  %88 = getelementptr inbounds double, ptr %87, i64 %indvars.iv.next.1
  %89 = load double, ptr %88, align 8, !tbaa !15
  %90 = fmul double %85, %89
  %indvars.iv.next.2 = add nsw i64 %indvars.iv, -3
  %91 = getelementptr inbounds ptr, ptr %0, i64 %indvars.iv.next.2
  %92 = load ptr, ptr %91, align 8, !tbaa !14
  %93 = getelementptr inbounds double, ptr %92, i64 %indvars.iv.next.2
  %94 = load double, ptr %93, align 8, !tbaa !15
  %95 = fmul double %90, %94
  %indvars.iv.next.3 = add nsw i64 %indvars.iv, -4
  %96 = getelementptr inbounds ptr, ptr %0, i64 %indvars.iv.next.3
  %97 = load ptr, ptr %96, align 8, !tbaa !14
  %98 = getelementptr inbounds double, ptr %97, i64 %indvars.iv.next.3
  %99 = load double, ptr %98, align 8, !tbaa !15
  %100 = fmul double %95, %99
  %101 = icmp eq i64 %indvars.iv.next.3, 0
  br i1 %101, label %.unr-lcssa, label %.new, !llvm.loop !19

.unr-lcssa:                                       ; preds = %.new, %.prol.loopexit
  %.lcssa = phi double [ %.lcssa.unr, %.prol.loopexit ], [ %100, %.new ]
  %102 = load i32, ptr %4, align 4, !tbaa !5
  %.not44 = icmp eq i32 %102, 0
  br i1 %.not44, label %105, label %103

103:                                              ; preds = %.unr-lcssa
  %104 = fneg double %.lcssa
  br label %105

105:                                              ; preds = %30, %9, %.unr-lcssa, %103, %31, %72, %6
  %.1 = phi double [ 0.000000e+00, %6 ], [ %21, %30 ], [ %21, %9 ], [ %63, %72 ], [ %63, %31 ], [ %104, %103 ], [ %.lcssa, %.unr-lcssa ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  ret double %.1
}

declare void @qh_gausselim(ptr noundef, i32 noundef, i32 noundef, 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !12, i64 2424}
!10 = !{!"qhT", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !11, i64 24, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !6, i64 56, !6, i64 60, !11, i64 64, !11, i64 72, !6, i64 80, !6, i64 84, !6, i64 88, !6, i64 92, !6, i64 96, !6, i64 100, !12, i64 104, !6, i64 112, !6, i64 116, !12, i64 120, !6, i64 128, !6, i64 132, !6, i64 136, !6, i64 140, !6, i64 144, !6, i64 148, !6, i64 152, !11, i64 160, !11, i64 168, !6, i64 176, !6, i64 180, !6, i64 184, !6, i64 188, !11, i64 192, !11, i64 200, !6, i64 208, !6, i64 212, !11, i64 216, !6, i64 224, !6, i64 228, !6, i64 232, !6, i64 236, !6, i64 240, !6, i64 244, !6, i64 248, !6, i64 252, !6, i64 256, !6, i64 260, !6, i64 264, !6, i64 268, !6, i64 272, !6, i64 276, !6, i64 280, !6, i64 284, !6, i64 288, !6, i64 292, !6, i64 296, !7, i64 300, !6, i64 416, !6, i64 420, !6, i64 424, !6, i64 428, !6, i64 432, !6, i64 436, !6, i64 440, !6, i64 444, !11, i64 448, !11, i64 456, !11, i64 464, !6, i64 472, !6, i64 476, !6, i64 480, !6, i64 484, !6, i64 488, !6, i64 492, !6, i64 496, !6, i64 500, !6, i64 504, !6, i64 508, !6, i64 512, !6, i64 516, !6, i64 520, !6, i64 524, !6, i64 528, !6, i64 532, !6, i64 536, !6, i64 540, !6, i64 544, !11, i64 552, !6, i64 560, !6, i64 564, !6, i64 568, !6, i64 572, !6, i64 576, !6, i64 580, !6, i64 584, !6, i64 588, !11, i64 592, !6, i64 600, !12, i64 608, !12, i64 616, !6, i64 624, !6, i64 628, !6, i64 632, !6, i64 636, !6, i64 640, !12, i64 648, !6, i64 656, !12, i64 664, !6, i64 672, !7, i64 676, !6, i64 932, !7, i64 936, !7, i64 1192, !6, i64 1704, !6, i64 1708, !6, i64 1712, !6, i64 1716, !6, i64 1720, !6, 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, !6, 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, !6, i64 2440, !6, i64 2444, !6, i64 2448, !12, i64 2456, !12, i64 2464, !12, i64 2472, !12, i64 2480, !12, i64 2488, !6, i64 2496, !6, i64 2500, !12, i64 2504, !6, i64 2512, !12, i64 2520, !6, i64 2528, !12, i64 2536, !12, i64 2544, !12, i64 2552, !12, i64 2560, !6, i64 2568, !6, i64 2572, !6, i64 2576, !6, i64 2580, !6, i64 2584, !6, i64 2588, !6, i64 2592, !6, i64 2596, !13, i64 2600, !6, i64 2608, !6, i64 2612, !6, i64 2616, !6, i64 2620, !6, i64 2624, !12, i64 2632, !12, i64 2640, !6, i64 2648, !6, i64 2652, !6, i64 2656, !11, i64 2664, !6, i64 2672, !11, i64 2680, !11, i64 2688, !11, i64 2696, !6, i64 2704, !6, i64 2708, !6, i64 2712, !6, i64 2716, !6, i64 2720, !11, i64 2728, !11, i64 2736, !6, i64 2744, !6, i64 2748, !6, i64 2752, !6, i64 2756, !6, i64 2760, !6, i64 2764, !11, i64 2768, !11, i64 2776, !6, i64 2784, !6, i64 2788, !6, i64 2792, !6, 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, !6, i64 2872, !12, i64 2880, !12, i64 2888, !6, i64 2896, !6, i64 2900, !6, i64 2904, !12, i64 2912, !11, i64 2920, !11, i64 2928, !11, i64 2936, !11, i64 2944, !6, i64 2952, !6, i64 2956, !6, i64 2960, !6, i64 2964, !6, i64 2968, !6, i64 2972, !12, i64 2976, !12, i64 2984, !6, i64 2992}
!11 = !{!"double", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!11, !11, i64 0}
!16 = !{!10, !12, i64 1872}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.unroll.disable"}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopRotatePass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass