; LLVM IR from jrl-umi3218/mc_rtc :: 3rd-party/qhull/src/libqhull_r (geom_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.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, 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, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6) #3 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca double, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i32 %2, ptr %10, align 4, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, 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 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  store i32 -1, ptr %23, align 4, !tbaa !9
  %24 = load ptr, ptr %13, align 8, !tbaa !5
  %25 = load i32, ptr %11, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds double, ptr %24, i64 %26
  %28 = getelementptr inbounds double, ptr %27, i64 -1
  store ptr %28, ptr %17, align 8, !tbaa !5
  %29 = load i32, ptr %12, align 4, !tbaa !9
  %30 = icmp ne i32 %29, 0
  %31 = zext i1 %30 to i64
  %32 = select i1 %30, double -1.000000e+00, double 1.000000e+00
  %33 = load ptr, ptr %17, align 8, !tbaa !5
  %34 = getelementptr inbounds double, ptr %33, i32 -1
  store ptr %34, ptr %17, align 8, !tbaa !5
  store double %32, ptr %33, align 8, !tbaa !11
  %35 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %35, ptr %15, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %140, %7
  %37 = load i32, ptr %15, align 4, !tbaa !9
  %38 = add nsw i32 %37, -1
  store i32 %38, ptr %15, align 4, !tbaa !9
  %39 = icmp ne i32 %37, 0
  br i1 %39, label %40, label %141

40:                                               ; preds = %36
  %41 = load ptr, ptr %17, align 8, !tbaa !5
  store double 0.000000e+00, ptr %41, align 8, !tbaa !11
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = load i32, ptr %15, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds ptr, ptr %42, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  %47 = load i32, ptr %15, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds double, ptr %46, i64 %48
  %50 = getelementptr inbounds double, ptr %49, i64 1
  store ptr %50, ptr %19, align 8, !tbaa !5
  %51 = load ptr, ptr %17, align 8, !tbaa !5
  %52 = getelementptr inbounds double, ptr %51, i64 1
  store ptr %52, ptr %20, align 8, !tbaa !5
  %53 = load i32, ptr %15, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %16, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %70, %40
  %56 = load i32, ptr %16, align 4, !tbaa !9
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %59, label %73

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

70:                                               ; preds = %59
  %71 = load i32, ptr %16, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %16, align 4, !tbaa !9
  br label %55, !llvm.loop !13

73:                                               ; preds = %55
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = load i32, ptr %15, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds ptr, ptr %74, i64 %76
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = load i32, ptr %15, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds double, ptr %78, i64 %80
  %82 = load double, ptr %81, align 8, !tbaa !11
  store double %82, ptr %21, align 8, !tbaa !11
  %83 = load double, ptr %21, align 8, !tbaa !11
  %84 = fcmp olt double %83, 0.000000e+00
  br i1 %84, label %85, label %88

85:                                               ; preds = %73
  %86 = load double, ptr %21, align 8, !tbaa !11
  %87 = fneg double %86
  br label %90

88:                                               ; preds = %73
  %89 = load double, ptr %21, align 8, !tbaa !11
  br label %90

90:                                               ; preds = %88, %85
  %91 = phi double [ %87, %85 ], [ %89, %88 ]
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.qhT, ptr %92, i32 0, i32 143
  %94 = load double, ptr %93, align 8, !tbaa !15
  %95 = fcmp ogt double %91, %94
  br i1 %95, label %96, label %102

96:                                               ; preds = %90
  %97 = load double, ptr %21, align 8, !tbaa !11
  %98 = load ptr, ptr %17, align 8, !tbaa !5
  %99 = getelementptr inbounds double, ptr %98, i32 -1
  store ptr %99, ptr %17, align 8, !tbaa !5
  %100 = load double, ptr %98, align 8, !tbaa !11
  %101 = fdiv double %100, %97
  store double %101, ptr %98, align 8, !tbaa !11
  br label %140

102:                                              ; preds = %90
  store i32 0, ptr %22, align 4, !tbaa !9
  %103 = load ptr, ptr %17, align 8, !tbaa !5
  %104 = load double, ptr %103, align 8, !tbaa !11
  %105 = load double, ptr %21, align 8, !tbaa !11
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.qhT, ptr %106, i32 0, i32 142
  %108 = load double, ptr %107, align 8, !tbaa !20
  %109 = call double @qh_divzero(double noundef %104, double noundef %105, double noundef %108, ptr noundef %22)
  %110 = load ptr, ptr %17, align 8, !tbaa !5
  store double %109, ptr %110, align 8, !tbaa !11
  %111 = load i32, ptr %22, align 4, !tbaa !9
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %136

113:                                              ; preds = %102
  %114 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %114, ptr %23, align 4, !tbaa !9
  %115 = load i32, ptr %12, align 4, !tbaa !9
  %116 = icmp ne i32 %115, 0
  %117 = zext i1 %116 to i64
  %118 = select i1 %116, double -1.000000e+00, double 1.000000e+00
  %119 = load ptr, ptr %17, align 8, !tbaa !5
  %120 = getelementptr inbounds double, ptr %119, i32 -1
  store ptr %120, ptr %17, align 8, !tbaa !5
  store double %118, ptr %119, align 8, !tbaa !11
  %121 = load ptr, ptr %17, align 8, !tbaa !5
  %122 = getelementptr inbounds double, ptr %121, i64 2
  store ptr %122, ptr %18, align 8, !tbaa !5
  br label %123

123:                                              ; preds = %132, %113
  %124 = load ptr, ptr %18, align 8, !tbaa !5
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = load i32, ptr %11, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds double, ptr %125, i64 %127
  %129 = icmp ult ptr %124, %128
  br i1 %129, label %130, label %135

130:                                              ; preds = %123
  %131 = load ptr, ptr %18, align 8, !tbaa !5
  store double 0.000000e+00, ptr %131, align 8, !tbaa !11
  br label %132

132:                                              ; preds = %130
  %133 = load ptr, ptr %18, align 8, !tbaa !5
  %134 = getelementptr inbounds double, ptr %133, i32 1
  store ptr %134, ptr %18, align 8, !tbaa !5
  br label %123, !llvm.loop !21

135:                                              ; preds = %123
  br label %139

136:                                              ; preds = %102
  %137 = load ptr, ptr %17, align 8, !tbaa !5
  %138 = getelementptr inbounds double, ptr %137, i32 -1
  store ptr %138, ptr %17, align 8, !tbaa !5
  br label %139

139:                                              ; preds = %136, %135
  br label %140

140:                                              ; preds = %139, %96
  br label %36, !llvm.loop !22

141:                                              ; preds = %36
  %142 = load i32, ptr %23, align 4, !tbaa !9
  %143 = icmp ne i32 %142, -1
  br i1 %143, label %144, label %164

144:                                              ; preds = %141
  %145 = load ptr, ptr %14, align 8, !tbaa !5
  store i32 1, ptr %145, align 4, !tbaa !9
  %146 = load ptr, ptr %8, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.qhT, ptr %146, i32 0, i32 29
  %148 = load i32, ptr %147, align 8, !tbaa !23
  %149 = icmp sge i32 %148, 4
  br i1 %149, label %150, label %156

150:                                              ; preds = %144
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = load ptr, ptr %8, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.qhT, ptr %152, i32 0, i32 158
  %154 = load ptr, ptr %153, align 8, !tbaa !24
  %155 = load i32, ptr %15, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %151, ptr noundef %154, i32 noundef 4005, ptr noundef @.str.16, i32 noundef %155)
  br label %156

156:                                              ; preds = %150, %144
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.qhT, ptr %157, i32 0, i32 258
  %159 = getelementptr inbounds %struct.qhstatT, ptr %158, i32 0, i32 0
  %160 = getelementptr inbounds [249 x %union.intrealT], ptr %159, i64 0, i64 14
  %161 = load i32, ptr %160, align 8, !tbaa !25
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %160, align 8, !tbaa !25
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  call void @qh_joggle_restart(ptr noundef %163, ptr noundef @.str.17)
  br label %164

164:                                              ; preds = %156, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, 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 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  ret void
}

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

declare void @qh_joggle_restart(ptr noundef, 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, !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, !18, i64 3272, !19, i64 3424}
!17 = !{!"long", !7, i64 0}
!18 = !{!"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}
!19 = !{!"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}
!20 = !{!16, !12, i64 1848}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = !{!16, !10, i64 136}
!24 = !{!16, !6, i64 2424}
!25 = !{!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"

@.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, 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 noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, ptr nocapture noundef writeonly %6) local_unnamed_addr #3 {
  %8 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %9 = sext i32 %3 to i64
  %10 = getelementptr inbounds double, ptr %5, i64 %9
  %11 = getelementptr inbounds i8, ptr %10, i64 -8
  %.not = icmp eq i32 %4, 0
  %12 = select i1 %.not, double 1.000000e+00, double -1.000000e+00
  store double %12, ptr %11, align 8, !tbaa !5
  %.not5566 = icmp eq i32 %2, 0
  br i1 %.not5566, label %._crit_edge72.thread, label %.lr.ph71

.lr.ph71:                                         ; preds = %7
  %13 = add i32 %2, -1
  %14 = ptrtoint ptr %5 to i64
  %15 = getelementptr inbounds i8, ptr %10, i64 -16
  %16 = getelementptr inbounds i8, ptr %0, i64 1856
  %17 = getelementptr inbounds i8, ptr %0, i64 1848
  %18 = shl nsw i64 %9, 3
  %19 = add i64 %18, %14
  %20 = add i64 %18, %14
  %21 = sext i32 %13 to i64
  %22 = getelementptr i8, ptr %5, i64 %18
  %23 = getelementptr i8, ptr %22, i64 -8
  %24 = sub i32 %3, %2
  %25 = sub i32 %2, %3
  br label %26

26:                                               ; preds = %.lr.ph71, %.loopexit
  %indvars.iv = phi i64 [ %21, %.lr.ph71 ], [ %indvars.iv.next, %.loopexit ]
  %indvar = phi i64 [ 0, %.lr.ph71 ], [ %indvar.next, %.loopexit ]
  %.069 = phi i32 [ -1, %.lr.ph71 ], [ %.1, %.loopexit ]
  %.04868 = phi i32 [ %2, %.lr.ph71 ], [ %76, %.loopexit ]
  %.05267 = phi ptr [ %15, %.lr.ph71 ], [ %.153, %.loopexit ]
  %27 = trunc i64 %indvar to i32
  %28 = mul nsw i64 %indvar, -8
  %scevgep = getelementptr i8, ptr %23, i64 %28
  %29 = add i64 %19, %28
  %umax = call i64 @llvm.umax.i64(i64 %29, i64 %19)
  %30 = shl nuw nsw i64 %indvar, 3
  %reass.sub = sub i64 %30, %20
  %31 = add i64 %reass.sub, 7
  %32 = add i64 %umax, %31
  %33 = and i64 %32, -8
  %34 = add i64 %33, 8
  store double 0.000000e+00, ptr %.05267, align 8, !tbaa !5
  %35 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  %37 = getelementptr inbounds double, ptr %36, i64 %indvars.iv
  %38 = icmp slt i32 %.04868, %3
  br i1 %38, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %26
  %39 = trunc i64 %indvar to i32
  %40 = add i32 %24, %39
  %xtraiter = and i32 %40, 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
  %.049.prol = getelementptr inbounds i8, ptr %.05267, i64 8
  %.050.prol = getelementptr inbounds i8, ptr %37, i64 8
  %41 = load double, ptr %.050.prol, align 8, !tbaa !5
  %42 = load double, ptr %.049.prol, align 8, !tbaa !5
  %43 = fneg double %41
  %44 = call double @llvm.fmuladd.f64(double %43, double %42, double 0.000000e+00)
  store double %44, ptr %.05267, align 8, !tbaa !5
  %45 = add nsw i32 %.04868, 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 ], [ %44, %.lr.ph.prol ]
  %.052.pn5861.unr = phi ptr [ %.05267, %.lr.ph.preheader ], [ %.049.prol, %.lr.ph.prol ]
  %.pn60.unr = phi ptr [ %37, %.lr.ph.preheader ], [ %.050.prol, %.lr.ph.prol ]
  %.05459.unr = phi i32 [ %.04868, %.lr.ph.preheader ], [ %45, %.lr.ph.prol ]
  %.lcssa.unr = phi double [ poison, %.lr.ph.preheader ], [ %44, %.lr.ph.prol ]
  %46 = add i32 %27, -1
  %47 = icmp eq i32 %25, %46
  br i1 %47, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %48 = phi double [ %56, %.lr.ph ], [ %.unr, %.lr.ph.prol.loopexit ]
  %.052.pn5861 = phi ptr [ %.049.1, %.lr.ph ], [ %.052.pn5861.unr, %.lr.ph.prol.loopexit ]
  %.pn60 = phi ptr [ %.050.1, %.lr.ph ], [ %.pn60.unr, %.lr.ph.prol.loopexit ]
  %.05459 = phi i32 [ %57, %.lr.ph ], [ %.05459.unr, %.lr.ph.prol.loopexit ]
  %.049 = getelementptr inbounds i8, ptr %.052.pn5861, i64 8
  %.050 = getelementptr inbounds i8, ptr %.pn60, i64 8
  %49 = load double, ptr %.050, align 8, !tbaa !5
  %50 = load double, ptr %.049, align 8, !tbaa !5
  %51 = fneg double %49
  %52 = call double @llvm.fmuladd.f64(double %51, double %50, double %48)
  store double %52, ptr %.05267, align 8, !tbaa !5
  %.049.1 = getelementptr inbounds i8, ptr %.052.pn5861, i64 16
  %.050.1 = getelementptr inbounds i8, ptr %.pn60, i64 16
  %53 = load double, ptr %.050.1, align 8, !tbaa !5
  %54 = load double, ptr %.049.1, align 8, !tbaa !5
  %55 = fneg double %53
  %56 = call double @llvm.fmuladd.f64(double %55, double %54, double %52)
  store double %56, ptr %.05267, align 8, !tbaa !5
  %57 = add nsw i32 %.05459, 2
  %58 = icmp slt i32 %57, %3
  br i1 %58, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %26
  %59 = phi double [ 0.000000e+00, %26 ], [ %.lcssa.unr, %.lr.ph.prol.loopexit ], [ %56, %.lr.ph ]
  %60 = load double, ptr %37, align 8, !tbaa !5
  %61 = fcmp olt double %60, 0.000000e+00
  %62 = fneg double %60
  %63 = select i1 %61, double %62, double %60
  %64 = load double, ptr %16, align 8, !tbaa !13
  %65 = fcmp ogt double %63, %64
  br i1 %65, label %66, label %68

66:                                               ; preds = %._crit_edge
  %67 = fdiv double %59, %60
  store double %67, ptr %.05267, align 8, !tbaa !5
  br label %.loopexit

68:                                               ; preds = %._crit_edge
  store i32 0, ptr %8, align 4, !tbaa !19
  %69 = load double, ptr %17, align 8, !tbaa !20
  %70 = call double @qh_divzero(double noundef %59, double noundef %60, double noundef %69, ptr noundef nonnull %8) #6
  store double %70, ptr %.05267, align 8, !tbaa !5
  %71 = load i32, ptr %8, align 4, !tbaa !19
  %.not57 = icmp eq i32 %71, 0
  br i1 %.not57, label %.loopexit, label %72

72:                                               ; preds = %68
  store double %12, ptr %.05267, align 8, !tbaa !5
  %.05162 = getelementptr inbounds i8, ptr %.05267, i64 8
  %73 = icmp ult ptr %.05162, %10
  %74 = trunc nsw i64 %indvars.iv to i32
  br i1 %73, label %.lr.ph65.preheader, label %.loopexit

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

.loopexit:                                        ; preds = %.lr.ph65.preheader, %72, %68, %66
  %.1 = phi i32 [ %.069, %66 ], [ %.069, %68 ], [ %74, %72 ], [ %74, %.lr.ph65.preheader ]
  %.153 = getelementptr inbounds i8, ptr %.05267, i64 -8
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %75 = icmp eq i64 %indvars.iv, 0
  %indvar.next = add nuw nsw i64 %indvar, 1
  %76 = trunc nsw i64 %indvars.iv to i32
  br i1 %75, label %._crit_edge72, label %26, !llvm.loop !21

._crit_edge72:                                    ; preds = %.loopexit
  %77 = icmp eq i32 %.1, -1
  br i1 %77, label %._crit_edge72.thread, label %78

78:                                               ; preds = %._crit_edge72
  store i32 1, ptr %6, align 4, !tbaa !19
  %79 = getelementptr inbounds i8, ptr %0, i64 136
  %80 = load i32, ptr %79, align 8, !tbaa !22
  %81 = icmp sgt i32 %80, 3
  br i1 %81, label %82, label %85

82:                                               ; preds = %78
  %83 = getelementptr inbounds i8, ptr %0, i64 2424
  %84 = load ptr, ptr %83, align 8, !tbaa !23
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %84, i32 noundef 4005, ptr noundef nonnull @.str.16, i32 noundef -1) #6
  br label %85

85:                                               ; preds = %82, %78
  %86 = getelementptr inbounds i8, ptr %0, i64 3536
  %87 = load i32, ptr %86, align 8, !tbaa !24
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %86, align 8, !tbaa !24
  call void @qh_joggle_restart(ptr noundef nonnull %0, ptr noundef nonnull @.str.17) #6
  br label %._crit_edge72.thread

._crit_edge72.thread:                             ; preds = %7, %85, %._crit_edge72
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #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, 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, !15, i64 2984, !15, i64 2988, !7, i64 2992, !7, i64 3192, !15, i64 3232, !6, i64 3240, !10, i64 3248, !10, i64 3256, !10, i64 3264, !17, i64 3272, !18, i64 3424}
!15 = !{!"int", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"qhmemT", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !15, i64 64, !10, i64 72, !10, i64 80, !15, i64 88, !15, i64 92, !15, i64 96, !15, i64 100, !15, i64 104, !15, i64 108, !15, i64 112, !15, i64 116, !15, i64 120, !15, i64 124, !15, i64 128, !15, i64 132, !15, i64 136, !15, i64 140, !15, i64 144}
!18 = !{!"qhstatT", !7, i64 0, !7, i64 1992, !7, i64 2256, !7, i64 4248, !7, i64 4746, !7, i64 4995, !7, i64 5248, !15, i64 5320, !15, i64 5324, !15, i64 5328, !15, i64 5332, !6, i64 5336}
!19 = !{!15, !15, i64 0}
!20 = !{!14, !6, i64 1848}
!21 = distinct !{!21, !12}
!22 = !{!14, !15, i64 136}
!23 = !{!14, !10, i64 2424}
!24 = !{!7, !7, i64 0}


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