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

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

@qh_qh = external global %struct.qhT, align 8
@qh_qhstat = external global %struct.qhstatT, align 8
@.str.16 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [35 x i8], align 1

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @qh_backnormal(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca double, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  store i32 -1, ptr %21, align 4, !tbaa !9
  %22 = load ptr, ptr %11, align 8, !tbaa !5
  %23 = load i32, ptr %9, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds double, ptr %22, i64 %24
  %26 = getelementptr inbounds double, ptr %25, i64 -1
  store ptr %26, ptr %15, align 8, !tbaa !5
  %27 = load i32, ptr %10, align 4, !tbaa !9
  %28 = icmp ne i32 %27, 0
  %29 = zext i1 %28 to i64
  %30 = select i1 %28, double -1.000000e+00, double 1.000000e+00
  %31 = load ptr, ptr %15, align 8, !tbaa !5
  %32 = getelementptr inbounds double, ptr %31, i32 -1
  store ptr %32, ptr %15, align 8, !tbaa !5
  store double %30, ptr %31, align 8, !tbaa !11
  %33 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %33, ptr %13, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %134, %6
  %35 = load i32, ptr %13, align 4, !tbaa !9
  %36 = add nsw i32 %35, -1
  store i32 %36, ptr %13, align 4, !tbaa !9
  %37 = icmp ne i32 %35, 0
  br i1 %37, label %38, label %135

38:                                               ; preds = %34
  %39 = load ptr, ptr %15, align 8, !tbaa !5
  store double 0.000000e+00, ptr %39, align 8, !tbaa !11
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = load i32, ptr %13, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds ptr, ptr %40, i64 %42
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = load i32, ptr %13, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds double, ptr %44, i64 %46
  %48 = getelementptr inbounds double, ptr %47, i64 1
  store ptr %48, ptr %17, align 8, !tbaa !5
  %49 = load ptr, ptr %15, align 8, !tbaa !5
  %50 = getelementptr inbounds double, ptr %49, i64 1
  store ptr %50, ptr %18, align 8, !tbaa !5
  %51 = load i32, ptr %13, align 4, !tbaa !9
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %14, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %68, %38
  %54 = load i32, ptr %14, align 4, !tbaa !9
  %55 = load i32, ptr %9, align 4, !tbaa !9
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %57, label %71

57:                                               ; preds = %53
  %58 = load ptr, ptr %17, align 8, !tbaa !5
  %59 = getelementptr inbounds double, ptr %58, i32 1
  store ptr %59, ptr %17, align 8, !tbaa !5
  %60 = load double, ptr %58, align 8, !tbaa !11
  %61 = load ptr, ptr %18, align 8, !tbaa !5
  %62 = getelementptr inbounds double, ptr %61, i32 1
  store ptr %62, ptr %18, align 8, !tbaa !5
  %63 = load double, ptr %61, align 8, !tbaa !11
  %64 = load ptr, ptr %15, align 8, !tbaa !5
  %65 = load double, ptr %64, align 8, !tbaa !11
  %66 = fneg double %60
  %67 = call double @llvm.fmuladd.f64(double %66, double %63, double %65)
  store double %67, ptr %64, align 8, !tbaa !11
  br label %68

68:                                               ; preds = %57
  %69 = load i32, ptr %14, align 4, !tbaa !9
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %14, align 4, !tbaa !9
  br label %53, !llvm.loop !13

71:                                               ; preds = %53
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = load i32, ptr %13, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds ptr, ptr %72, i64 %74
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  %77 = load i32, ptr %13, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds double, ptr %76, i64 %78
  %80 = load double, ptr %79, align 8, !tbaa !11
  store double %80, ptr %19, align 8, !tbaa !11
  %81 = load double, ptr %19, align 8, !tbaa !11
  %82 = fcmp olt double %81, 0.000000e+00
  br i1 %82, label %83, label %86

83:                                               ; preds = %71
  %84 = load double, ptr %19, align 8, !tbaa !11
  %85 = fneg double %84
  br label %88

86:                                               ; preds = %71
  %87 = load double, ptr %19, align 8, !tbaa !11
  br label %88

88:                                               ; preds = %86, %83
  %89 = phi double [ %85, %83 ], [ %87, %86 ]
  %90 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 143), align 8, !tbaa !15
  %91 = fcmp ogt double %89, %90
  br i1 %91, label %92, label %98

92:                                               ; preds = %88
  %93 = load double, ptr %19, align 8, !tbaa !11
  %94 = load ptr, ptr %15, align 8, !tbaa !5
  %95 = getelementptr inbounds double, ptr %94, i32 -1
  store ptr %95, ptr %15, align 8, !tbaa !5
  %96 = load double, ptr %94, align 8, !tbaa !11
  %97 = fdiv double %96, %93
  store double %97, ptr %94, align 8, !tbaa !11
  br label %134

98:                                               ; preds = %88
  store i32 0, ptr %20, align 4, !tbaa !9
  %99 = load ptr, ptr %15, align 8, !tbaa !5
  %100 = load double, ptr %99, align 8, !tbaa !11
  %101 = load double, ptr %19, align 8, !tbaa !11
  %102 = load double, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 142), align 8, !tbaa !18
  %103 = call double @qh_divzero(double noundef %100, double noundef %101, double noundef %102, ptr noundef %20)
  %104 = load ptr, ptr %15, align 8, !tbaa !5
  store double %103, ptr %104, align 8, !tbaa !11
  %105 = load i32, ptr %20, align 4, !tbaa !9
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %130

107:                                              ; preds = %98
  %108 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %108, ptr %21, align 4, !tbaa !9
  %109 = load i32, ptr %10, align 4, !tbaa !9
  %110 = icmp ne i32 %109, 0
  %111 = zext i1 %110 to i64
  %112 = select i1 %110, double -1.000000e+00, double 1.000000e+00
  %113 = load ptr, ptr %15, align 8, !tbaa !5
  %114 = getelementptr inbounds double, ptr %113, i32 -1
  store ptr %114, ptr %15, align 8, !tbaa !5
  store double %112, ptr %113, align 8, !tbaa !11
  %115 = load ptr, ptr %15, align 8, !tbaa !5
  %116 = getelementptr inbounds double, ptr %115, i64 2
  store ptr %116, ptr %16, align 8, !tbaa !5
  br label %117

117:                                              ; preds = %126, %107
  %118 = load ptr, ptr %16, align 8, !tbaa !5
  %119 = load ptr, ptr %11, align 8, !tbaa !5
  %120 = load i32, ptr %9, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds double, ptr %119, i64 %121
  %123 = icmp ult ptr %118, %122
  br i1 %123, label %124, label %129

124:                                              ; preds = %117
  %125 = load ptr, ptr %16, align 8, !tbaa !5
  store double 0.000000e+00, ptr %125, align 8, !tbaa !11
  br label %126

126:                                              ; preds = %124
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  %128 = getelementptr inbounds double, ptr %127, i32 1
  store ptr %128, ptr %16, align 8, !tbaa !5
  br label %117, !llvm.loop !19

129:                                              ; preds = %117
  br label %133

130:                                              ; preds = %98
  %131 = load ptr, ptr %15, align 8, !tbaa !5
  %132 = getelementptr inbounds double, ptr %131, i32 -1
  store ptr %132, ptr %15, align 8, !tbaa !5
  br label %133

133:                                              ; preds = %130, %129
  br label %134

134:                                              ; preds = %133, %92
  br label %34, !llvm.loop !20

135:                                              ; preds = %34
  %136 = load i32, ptr %21, align 4, !tbaa !9
  %137 = icmp ne i32 %136, -1
  br i1 %137, label %138, label %148

138:                                              ; preds = %135
  %139 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 1, ptr %139, align 4, !tbaa !9
  %140 = load i32, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 29), align 8, !tbaa !21
  %141 = icmp sge i32 %140, 4
  br i1 %141, label %142, label %145

142:                                              ; preds = %138
  %143 = load ptr, ptr getelementptr inbounds (%struct.qhT, ptr @qh_qh, i32 0, i32 158), align 8, !tbaa !22
  %144 = load i32, ptr %13, align 4, !tbaa !9
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %143, i32 noundef 4005, ptr noundef @.str.16, i32 noundef %144)
  br label %145

145:                                              ; preds = %142, %138
  %146 = load i32, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 14), align 8, !tbaa !23
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr getelementptr inbounds ([249 x %union.intrealT], ptr @qh_qhstat, i64 0, i64 14), align 8, !tbaa !23
  call void @qh_joggle_restart(ptr noundef @.str.17)
  br label %148

148:                                              ; preds = %145, %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  ret void
}

declare double @qh_divzero(double noundef, double noundef, double noundef, ptr noundef) #2

declare void @qh_joggle_restart(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { "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 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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !12, i64 1856}
!16 = !{!"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, !17, 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}
!17 = !{!"long", !7, i64 0}
!18 = !{!16, !12, i64 1848}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = !{!16, !10, i64 136}
!22 = !{!16, !6, i64 2424}
!23 = !{!7, !7, i64 0}


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

@qh_qh = external local_unnamed_addr global %struct.qhT, align 8
@qh_qhstat = external local_unnamed_addr global %struct.qhstatT, align 8
@.str.16 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [35 x i8], align 1

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @qh_backnormal(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4, ptr nocapture noundef writeonly %5) local_unnamed_addr #3 {
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %8 = sext i32 %2 to i64
  %9 = getelementptr inbounds double, ptr %4, i64 %8
  %10 = getelementptr inbounds i8, ptr %9, i64 -8
  %.not = icmp eq i32 %3, 0
  %11 = select i1 %.not, double 1.000000e+00, double -1.000000e+00
  store double %11, ptr %10, align 8, !tbaa !5
  %.not4859 = icmp eq i32 %1, 0
  br i1 %.not4859, label %._crit_edge65.thread, label %.lr.ph64.preheader

.lr.ph64.preheader:                               ; preds = %6
  %12 = add i32 %1, -1
  %13 = getelementptr inbounds i8, ptr %9, i64 -16
  %14 = ptrtoint ptr %4 to i64
  %15 = shl nsw i64 %8, 3
  %16 = add i64 %15, %14
  %17 = add i64 %15, %14
  %18 = sext i32 %12 to i64
  %19 = getelementptr i8, ptr %4, i64 %15
  %20 = getelementptr i8, ptr %19, i64 -8
  %21 = sub i32 %2, %1
  %22 = sub i32 %1, %2
  br label %.lr.ph64

.lr.ph64:                                         ; preds = %.lr.ph64.preheader, %.loopexit
  %indvars.iv = phi i64 [ %18, %.lr.ph64.preheader ], [ %indvars.iv.next, %.loopexit ]
  %indvar = phi i64 [ 0, %.lr.ph64.preheader ], [ %indvar.next, %.loopexit ]
  %.062 = phi i32 [ -1, %.lr.ph64.preheader ], [ %.1, %.loopexit ]
  %.04161 = phi i32 [ %1, %.lr.ph64.preheader ], [ %72, %.loopexit ]
  %.04560 = phi ptr [ %13, %.lr.ph64.preheader ], [ %.146, %.loopexit ]
  %23 = trunc i64 %indvar to i32
  %24 = mul nsw i64 %indvar, -8
  %scevgep = getelementptr i8, ptr %20, i64 %24
  %25 = add i64 %16, %24
  %umax = call i64 @llvm.umax.i64(i64 %25, i64 %16)
  %26 = shl nuw nsw i64 %indvar, 3
  %reass.sub = sub i64 %26, %17
  %27 = add i64 %reass.sub, 7
  %28 = add i64 %umax, %27
  %29 = and i64 %28, -8
  %30 = add i64 %29, 8
  store double 0.000000e+00, ptr %.04560, align 8, !tbaa !5
  %31 = getelementptr inbounds ptr, ptr %0, i64 %indvars.iv
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = getelementptr inbounds double, ptr %32, i64 %indvars.iv
  %34 = icmp slt i32 %.04161, %2
  br i1 %34, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.lr.ph64
  %35 = trunc i64 %indvar to i32
  %36 = add i32 %21, %35
  %xtraiter = and i32 %36, 1
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader
  %.042.prol = getelementptr inbounds i8, ptr %.04560, i64 8
  %.043.prol = getelementptr inbounds i8, ptr %33, i64 8
  %37 = load double, ptr %.043.prol, align 8, !tbaa !5
  %38 = load double, ptr %.042.prol, align 8, !tbaa !5
  %39 = fneg double %37
  %40 = call double @llvm.fmuladd.f64(double %39, double %38, double 0.000000e+00)
  store double %40, ptr %.04560, align 8, !tbaa !5
  %41 = add nsw i32 %.04161, 1
  br label %.lr.ph.prol.loopexit

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %.unr = phi double [ 0.000000e+00, %.lr.ph.preheader ], [ %40, %.lr.ph.prol ]
  %.045.pn5154.unr = phi ptr [ %.04560, %.lr.ph.preheader ], [ %.042.prol, %.lr.ph.prol ]
  %.pn53.unr = phi ptr [ %33, %.lr.ph.preheader ], [ %.043.prol, %.lr.ph.prol ]
  %.04752.unr = phi i32 [ %.04161, %.lr.ph.preheader ], [ %41, %.lr.ph.prol ]
  %.lcssa.unr = phi double [ poison, %.lr.ph.preheader ], [ %40, %.lr.ph.prol ]
  %42 = add i32 %23, -1
  %43 = icmp eq i32 %22, %42
  br i1 %43, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %44 = phi double [ %52, %.lr.ph ], [ %.unr, %.lr.ph.prol.loopexit ]
  %.045.pn5154 = phi ptr [ %.042.1, %.lr.ph ], [ %.045.pn5154.unr, %.lr.ph.prol.loopexit ]
  %.pn53 = phi ptr [ %.043.1, %.lr.ph ], [ %.pn53.unr, %.lr.ph.prol.loopexit ]
  %.04752 = phi i32 [ %53, %.lr.ph ], [ %.04752.unr, %.lr.ph.prol.loopexit ]
  %.042 = getelementptr inbounds i8, ptr %.045.pn5154, i64 8
  %.043 = getelementptr inbounds i8, ptr %.pn53, i64 8
  %45 = load double, ptr %.043, align 8, !tbaa !5
  %46 = load double, ptr %.042, align 8, !tbaa !5
  %47 = fneg double %45
  %48 = call double @llvm.fmuladd.f64(double %47, double %46, double %44)
  store double %48, ptr %.04560, align 8, !tbaa !5
  %.042.1 = getelementptr inbounds i8, ptr %.045.pn5154, i64 16
  %.043.1 = getelementptr inbounds i8, ptr %.pn53, i64 16
  %49 = load double, ptr %.043.1, align 8, !tbaa !5
  %50 = load double, ptr %.042.1, align 8, !tbaa !5
  %51 = fneg double %49
  %52 = call double @llvm.fmuladd.f64(double %51, double %50, double %48)
  store double %52, ptr %.04560, align 8, !tbaa !5
  %53 = add nsw i32 %.04752, 2
  %54 = icmp slt i32 %53, %2
  br i1 %54, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %.lr.ph64
  %55 = phi double [ 0.000000e+00, %.lr.ph64 ], [ %.lcssa.unr, %.lr.ph.prol.loopexit ], [ %52, %.lr.ph ]
  %56 = load double, ptr %33, align 8, !tbaa !5
  %57 = fcmp olt double %56, 0.000000e+00
  %58 = fneg double %56
  %59 = select i1 %57, double %58, double %56
  %60 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1856), align 8, !tbaa !13
  %61 = fcmp ogt double %59, %60
  br i1 %61, label %62, label %64

62:                                               ; preds = %._crit_edge
  %63 = fdiv double %55, %56
  store double %63, ptr %.04560, align 8, !tbaa !5
  br label %.loopexit

64:                                               ; preds = %._crit_edge
  store i32 0, ptr %7, align 4, !tbaa !17
  %65 = load double, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 1848), align 8, !tbaa !18
  %66 = call double @qh_divzero(double noundef %55, double noundef %56, double noundef %65, ptr noundef nonnull %7) #6
  store double %66, ptr %.04560, align 8, !tbaa !5
  %67 = load i32, ptr %7, align 4, !tbaa !17
  %.not50 = icmp eq i32 %67, 0
  br i1 %.not50, label %.loopexit, label %68

68:                                               ; preds = %64
  store double %11, ptr %.04560, align 8, !tbaa !5
  %.04455 = getelementptr inbounds i8, ptr %.04560, i64 8
  %69 = icmp ult ptr %.04455, %9
  %70 = trunc nsw i64 %indvars.iv to i32
  br i1 %69, label %.lr.ph58.preheader, label %.loopexit

.lr.ph58.preheader:                               ; preds = %68
  call void @llvm.memset.p0.i64(ptr align 8 %scevgep, i8 0, i64 %30, i1 false), !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph58.preheader, %68, %64, %62
  %.1 = phi i32 [ %.062, %62 ], [ %.062, %64 ], [ %70, %68 ], [ %70, %.lr.ph58.preheader ]
  %.146 = getelementptr inbounds i8, ptr %.04560, i64 -8
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %71 = icmp eq i64 %indvars.iv, 0
  %indvar.next = add nuw nsw i64 %indvar, 1
  %72 = trunc nsw i64 %indvars.iv to i32
  br i1 %71, label %._crit_edge65, label %.lr.ph64, !llvm.loop !19

._crit_edge65:                                    ; preds = %.loopexit
  %73 = icmp eq i32 %.1, -1
  br i1 %73, label %._crit_edge65.thread, label %74

74:                                               ; preds = %._crit_edge65
  store i32 1, ptr %5, align 4, !tbaa !17
  %75 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 136), align 8, !tbaa !20
  %76 = icmp sgt i32 %75, 3
  br i1 %76, label %77, label %79

77:                                               ; preds = %74
  %78 = load ptr, ptr getelementptr inbounds (i8, ptr @qh_qh, i64 2424), align 8, !tbaa !21
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %78, i32 noundef 4005, ptr noundef nonnull @.str.16, i32 noundef -1) #6
  br label %79

79:                                               ; preds = %77, %74
  %80 = load i32, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 112), align 8, !tbaa !22
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr getelementptr inbounds (i8, ptr @qh_qhstat, i64 112), align 8, !tbaa !22
  call void @qh_joggle_restart(ptr noundef nonnull @.str.17) #6
  br label %._crit_edge65.thread

._crit_edge65.thread:                             ; preds = %6, %79, %._crit_edge65
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  ret void
}

declare double @qh_divzero(double noundef, double noundef, double noundef, ptr noundef) local_unnamed_addr #2

declare void @qh_joggle_restart(ptr noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { "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 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass