; 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 }

@.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, 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: 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, ptr noundef %1, i32 noundef %2, ptr noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store double 0.000000e+00, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  %12 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %12, align 4, !tbaa !9
  %13 = load i32, ptr %7, align 4, !tbaa !9
  %14 = icmp slt i32 %13, 2
  br i1 %14, label %15, label %21

15:                                               ; preds = %4
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.qhT, ptr %17, i32 0, i32 158
  %19 = load ptr, ptr %18, align 8, !tbaa !13
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %16, ptr noundef %19, i32 noundef 6005, ptr noundef @.str.1)
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_errexit(ptr noundef %20, i32 noundef 5, ptr noundef null, ptr noundef null)
  br label %210

21:                                               ; preds = %4
  %22 = load i32, ptr %7, align 4, !tbaa !9
  %23 = icmp eq i32 %22, 2
  br i1 %23, label %24, label %67

24:                                               ; preds = %21
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds ptr, ptr %25, i64 0
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = getelementptr inbounds double, ptr %27, i64 0
  %29 = load double, ptr %28, align 8, !tbaa !11
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds ptr, ptr %30, i64 1
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = getelementptr inbounds double, ptr %32, i64 1
  %34 = load double, ptr %33, align 8, !tbaa !11
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds ptr, ptr %35, i64 0
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = getelementptr inbounds double, ptr %37, i64 1
  %39 = load double, ptr %38, align 8, !tbaa !11
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds ptr, ptr %40, i64 1
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  %43 = getelementptr inbounds double, ptr %42, i64 0
  %44 = load double, ptr %43, align 8, !tbaa !11
  %45 = fmul double %39, %44
  %46 = fneg double %45
  %47 = call double @llvm.fmuladd.f64(double %29, double %34, double %46)
  store double %47, ptr %9, align 8, !tbaa !11
  %48 = load double, ptr %9, align 8, !tbaa !11
  %49 = fcmp olt double %48, 0.000000e+00
  br i1 %49, label %50, label %53

50:                                               ; preds = %24
  %51 = load double, ptr %9, align 8, !tbaa !11
  %52 = fneg double %51
  br label %55

53:                                               ; preds = %24
  %54 = load double, ptr %9, align 8, !tbaa !11
  br label %55

55:                                               ; preds = %53, %50
  %56 = phi double [ %52, %50 ], [ %54, %53 ]
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.qhT, ptr %57, i32 0, i32 145
  %59 = load ptr, ptr %58, align 8, !tbaa !18
  %60 = getelementptr inbounds double, ptr %59, i64 1
  %61 = load double, ptr %60, align 8, !tbaa !11
  %62 = fmul double 1.000000e+01, %61
  %63 = fcmp olt double %56, %62
  br i1 %63, label %64, label %66

64:                                               ; preds = %55
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 1, ptr %65, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %64, %55
  br label %209

67:                                               ; preds = %21
  %68 = load i32, ptr %7, align 4, !tbaa !9
  %69 = icmp eq i32 %68, 3
  br i1 %69, label %70, label %178

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

161:                                              ; preds = %70
  %162 = load double, ptr %9, align 8, !tbaa !11
  %163 = fneg double %162
  br label %166

164:                                              ; preds = %70
  %165 = load double, ptr %9, align 8, !tbaa !11
  br label %166

166:                                              ; preds = %164, %161
  %167 = phi double [ %163, %161 ], [ %165, %164 ]
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.qhT, ptr %168, i32 0, i32 145
  %170 = load ptr, ptr %169, align 8, !tbaa !18
  %171 = getelementptr inbounds double, ptr %170, i64 2
  %172 = load double, ptr %171, align 8, !tbaa !11
  %173 = fmul double 1.000000e+01, %172
  %174 = fcmp olt double %167, %173
  br i1 %174, label %175, label %177

175:                                              ; preds = %166
  %176 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 1, ptr %176, align 4, !tbaa !9
  br label %177

177:                                              ; preds = %175, %166
  br label %208

178:                                              ; preds = %67
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = load i32, ptr %7, align 4, !tbaa !9
  %182 = load i32, ptr %7, align 4, !tbaa !9
  %183 = load ptr, ptr %8, align 8, !tbaa !5
  call void @qh_gausselim(ptr noundef %179, ptr noundef %180, i32 noundef %181, i32 noundef %182, ptr noundef %11, ptr noundef %183)
  store double 1.000000e+00, ptr %9, align 8, !tbaa !11
  %184 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %184, ptr %10, align 4, !tbaa !9
  br label %185

185:                                              ; preds = %189, %178
  %186 = load i32, ptr %10, align 4, !tbaa !9
  %187 = add nsw i32 %186, -1
  store i32 %187, ptr %10, align 4, !tbaa !9
  %188 = icmp ne i32 %186, 0
  br i1 %188, label %189, label %201

189:                                              ; preds = %185
  %190 = load ptr, ptr %6, align 8, !tbaa !5
  %191 = load i32, ptr %10, align 4, !tbaa !9
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds ptr, ptr %190, i64 %192
  %194 = load ptr, ptr %193, align 8, !tbaa !5
  %195 = load i32, ptr %10, align 4, !tbaa !9
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds double, ptr %194, i64 %196
  %198 = load double, ptr %197, align 8, !tbaa !11
  %199 = load double, ptr %9, align 8, !tbaa !11
  %200 = fmul double %199, %198
  store double %200, ptr %9, align 8, !tbaa !11
  br label %185, !llvm.loop !19

201:                                              ; preds = %185
  %202 = load i32, ptr %11, align 4, !tbaa !9
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %204, label %207

204:                                              ; preds = %201
  %205 = load double, ptr %9, align 8, !tbaa !11
  %206 = fneg double %205
  store double %206, ptr %9, align 8, !tbaa !11
  br label %207

207:                                              ; preds = %204, %201
  br label %208

208:                                              ; preds = %207, %177
  br label %209

209:                                              ; preds = %208, %66
  br label %210

210:                                              ; preds = %209, %15
  %211 = load double, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  ret double %211
}

declare void @qh_gausselim(ptr noundef, 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, !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 = !{!14, !6, i64 1872}
!19 = distinct !{!19, !20}
!20 = !{!"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"

@.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, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #1

declare void @qh_errexit(ptr noundef, 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, ptr noundef %1, i32 noundef %2, ptr noundef %3) local_unnamed_addr #3 {
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  store i32 0, ptr %3, align 4, !tbaa !5
  %6 = icmp slt i32 %2, 2
  br i1 %6, label %7, label %10

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

10:                                               ; preds = %4
  switch i32 %2, label %77 [
    i32 2, label %11
    i32 3, label %34
  ]

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

33:                                               ; preds = %11
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %109

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

76:                                               ; preds = %34
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %109

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

.prol.preheader:                                  ; preds = %77, %.prol.preheader
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %.prol.preheader ], [ %78, %77 ]
  %.04851.prol = phi double [ %83, %.prol.preheader ], [ 1.000000e+00, %77 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.prol.preheader ], [ 0, %77 ]
  %indvars.iv.next.prol = add nsw i64 %indvars.iv.prol, -1
  %79 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv.next.prol
  %80 = load ptr, ptr %79, align 8, !tbaa !16
  %81 = getelementptr inbounds double, ptr %80, i64 %indvars.iv.next.prol
  %82 = load double, ptr %81, align 8, !tbaa !17
  %83 = fmul double %.04851.prol, %82
  %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 !19

.prol.loopexit:                                   ; preds = %.prol.preheader, %77
  %.lcssa.unr = phi double [ poison, %77 ], [ %83, %.prol.preheader ]
  %indvars.iv.unr = phi i64 [ %78, %77 ], [ %indvars.iv.next.prol, %.prol.preheader ]
  %.04851.unr = phi double [ 1.000000e+00, %77 ], [ %83, %.prol.preheader ]
  %84 = icmp ult i32 %2, 4
  br i1 %84, label %.unr-lcssa, label %.new

.new:                                             ; preds = %.prol.loopexit, %.new
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %.new ], [ %indvars.iv.unr, %.prol.loopexit ]
  %.04851 = phi double [ %104, %.new ], [ %.04851.unr, %.prol.loopexit ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %85 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv.next
  %86 = load ptr, ptr %85, align 8, !tbaa !16
  %87 = getelementptr inbounds double, ptr %86, i64 %indvars.iv.next
  %88 = load double, ptr %87, align 8, !tbaa !17
  %89 = fmul double %.04851, %88
  %indvars.iv.next.1 = add nsw i64 %indvars.iv, -2
  %90 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv.next.1
  %91 = load ptr, ptr %90, align 8, !tbaa !16
  %92 = getelementptr inbounds double, ptr %91, i64 %indvars.iv.next.1
  %93 = load double, ptr %92, align 8, !tbaa !17
  %94 = fmul double %89, %93
  %indvars.iv.next.2 = add nsw i64 %indvars.iv, -3
  %95 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv.next.2
  %96 = load ptr, ptr %95, align 8, !tbaa !16
  %97 = getelementptr inbounds double, ptr %96, i64 %indvars.iv.next.2
  %98 = load double, ptr %97, align 8, !tbaa !17
  %99 = fmul double %94, %98
  %indvars.iv.next.3 = add nsw i64 %indvars.iv, -4
  %100 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv.next.3
  %101 = load ptr, ptr %100, align 8, !tbaa !16
  %102 = getelementptr inbounds double, ptr %101, i64 %indvars.iv.next.3
  %103 = load double, ptr %102, align 8, !tbaa !17
  %104 = fmul double %99, %103
  %105 = icmp eq i64 %indvars.iv.next.3, 0
  br i1 %105, label %.unr-lcssa, label %.new, !llvm.loop !21

.unr-lcssa:                                       ; preds = %.new, %.prol.loopexit
  %.lcssa = phi double [ %.lcssa.unr, %.prol.loopexit ], [ %104, %.new ]
  %106 = load i32, ptr %5, align 4, !tbaa !5
  %.not50 = icmp eq i32 %106, 0
  br i1 %.not50, label %109, label %107

107:                                              ; preds = %.unr-lcssa
  %108 = fneg double %.lcssa
  br label %109

109:                                              ; preds = %33, %11, %.unr-lcssa, %107, %34, %76, %7
  %.1 = phi double [ 0.000000e+00, %7 ], [ %23, %33 ], [ %23, %11 ], [ %66, %76 ], [ %66, %34 ], [ %108, %107 ], [ %.lcssa, %.unr-lcssa ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  ret double %.1
}

declare void @qh_gausselim(ptr noundef, 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, !6, i64 2984, !6, i64 2988, !7, i64 2992, !7, i64 3192, !6, i64 3232, !11, i64 3240, !12, i64 3248, !12, i64 3256, !12, i64 3264, !14, i64 3272, !15, i64 3424}
!11 = !{!"double", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"qhmemT", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !6, i64 64, !12, i64 72, !12, i64 80, !6, i64 88, !6, i64 92, !6, i64 96, !6, i64 100, !6, i64 104, !6, i64 108, !6, i64 112, !6, i64 116, !6, i64 120, !6, i64 124, !6, i64 128, !6, i64 132, !6, i64 136, !6, i64 140, !6, i64 144}
!15 = !{!"qhstatT", !7, i64 0, !7, i64 1992, !7, i64 2256, !7, i64 4248, !7, i64 4746, !7, i64 4995, !7, i64 5248, !6, i64 5320, !6, i64 5324, !6, i64 5328, !6, i64 5332, !11, i64 5336}
!16 = !{!12, !12, i64 0}
!17 = !{!11, !11, i64 0}
!18 = !{!10, !12, i64 1872}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


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