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

; 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 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) #1

; Function Attrs: nounwind
declare double @sqrt(double noundef) #2

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

15:                                               ; preds = %120, %3
  %16 = load i32, ptr %11, align 4, !tbaa !9
  %17 = load i32, ptr %6, align 4, !tbaa !9
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %19, label %123

19:                                               ; preds = %15
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = load i32, ptr %11, align 4, !tbaa !9
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds ptr, ptr %20, i64 %22
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %24, ptr %8, align 8, !tbaa !5
  store double 0.000000e+00, ptr %10, align 8, !tbaa !11
  %25 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %25, ptr %13, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %37, %19
  %27 = load i32, ptr %13, align 4, !tbaa !9
  %28 = add nsw i32 %27, -1
  store i32 %28, ptr %13, align 4, !tbaa !9
  %29 = icmp ne i32 %27, 0
  br i1 %29, label %30, label %40

30:                                               ; preds = %26
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = load double, ptr %31, align 8, !tbaa !11
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = load double, ptr %33, align 8, !tbaa !11
  %35 = load double, ptr %10, align 8, !tbaa !11
  %36 = call double @llvm.fmuladd.f64(double %32, double %34, double %35)
  store double %36, ptr %10, align 8, !tbaa !11
  br label %37

37:                                               ; preds = %30
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = getelementptr inbounds double, ptr %38, i32 1
  store ptr %39, ptr %8, align 8, !tbaa !5
  br label %26, !llvm.loop !13

40:                                               ; preds = %26
  %41 = load double, ptr %10, align 8, !tbaa !11
  %42 = call double @sqrt(double noundef %41) #4
  store double %42, ptr %10, align 8, !tbaa !11
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.qhT, ptr %43, i32 0, i32 258
  %45 = getelementptr inbounds %struct.qhstatT, ptr %44, i32 0, i32 0
  %46 = getelementptr inbounds [249 x %union.intrealT], ptr %45, i64 0, i64 140
  %47 = load double, ptr %46, align 8, !tbaa !15
  %48 = load double, ptr %10, align 8, !tbaa !11
  %49 = fcmp ogt double %47, %48
  br i1 %49, label %50, label %56

50:                                               ; preds = %40
  %51 = load double, ptr %10, align 8, !tbaa !11
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.qhT, ptr %52, i32 0, i32 258
  %54 = getelementptr inbounds %struct.qhstatT, ptr %53, i32 0, i32 0
  %55 = getelementptr inbounds [249 x %union.intrealT], ptr %54, i64 0, i64 140
  store double %51, ptr %55, align 8, !tbaa !15
  br label %56

56:                                               ; preds = %50, %40
  %57 = load double, ptr %10, align 8, !tbaa !11
  %58 = fcmp oeq double %57, 0.000000e+00
  br i1 %58, label %59, label %60

59:                                               ; preds = %56
  store i32 0, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %124

60:                                               ; preds = %56
  %61 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %61, ptr %13, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %66, %60
  %63 = load i32, ptr %13, align 4, !tbaa !9
  %64 = add nsw i32 %63, -1
  store i32 %64, ptr %13, align 4, !tbaa !9
  %65 = icmp ne i32 %63, 0
  br i1 %65, label %66, label %72

66:                                               ; preds = %62
  %67 = load double, ptr %10, align 8, !tbaa !11
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = getelementptr inbounds double, ptr %68, i32 -1
  store ptr %69, ptr %8, align 8, !tbaa !5
  %70 = load double, ptr %69, align 8, !tbaa !11
  %71 = fdiv double %70, %67
  store double %71, ptr %69, align 8, !tbaa !11
  br label %62, !llvm.loop !16

72:                                               ; preds = %62
  %73 = load i32, ptr %11, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %12, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %116, %72
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = load i32, ptr %6, align 4, !tbaa !9
  %78 = icmp slt i32 %76, %77
  br i1 %78, label %79, label %119

79:                                               ; preds = %75
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = load i32, ptr %12, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds ptr, ptr %80, i64 %82
  %84 = load ptr, ptr %83, align 8, !tbaa !5
  store ptr %84, ptr %9, align 8, !tbaa !5
  store double 0.000000e+00, ptr %10, align 8, !tbaa !11
  %85 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %85, ptr %13, align 4, !tbaa !9
  br label %86

86:                                               ; preds = %90, %79
  %87 = load i32, ptr %13, align 4, !tbaa !9
  %88 = add nsw i32 %87, -1
  store i32 %88, ptr %13, align 4, !tbaa !9
  %89 = icmp ne i32 %87, 0
  br i1 %89, label %90, label %99

90:                                               ; preds = %86
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = getelementptr inbounds double, ptr %91, i32 1
  store ptr %92, ptr %8, align 8, !tbaa !5
  %93 = load double, ptr %91, align 8, !tbaa !11
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = getelementptr inbounds double, ptr %94, i32 1
  store ptr %95, ptr %9, align 8, !tbaa !5
  %96 = load double, ptr %94, align 8, !tbaa !11
  %97 = load double, ptr %10, align 8, !tbaa !11
  %98 = call double @llvm.fmuladd.f64(double %93, double %96, double %97)
  store double %98, ptr %10, align 8, !tbaa !11
  br label %86, !llvm.loop !17

99:                                               ; preds = %86
  %100 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %100, ptr %13, align 4, !tbaa !9
  br label %101

101:                                              ; preds = %105, %99
  %102 = load i32, ptr %13, align 4, !tbaa !9
  %103 = add nsw i32 %102, -1
  store i32 %103, ptr %13, align 4, !tbaa !9
  %104 = icmp ne i32 %102, 0
  br i1 %104, label %105, label %115

105:                                              ; preds = %101
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = getelementptr inbounds double, ptr %106, i32 -1
  store ptr %107, ptr %8, align 8, !tbaa !5
  %108 = load double, ptr %107, align 8, !tbaa !11
  %109 = load double, ptr %10, align 8, !tbaa !11
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = getelementptr inbounds double, ptr %110, i32 -1
  store ptr %111, ptr %9, align 8, !tbaa !5
  %112 = load double, ptr %111, align 8, !tbaa !11
  %113 = fneg double %108
  %114 = call double @llvm.fmuladd.f64(double %113, double %109, double %112)
  store double %114, ptr %111, align 8, !tbaa !11
  br label %101, !llvm.loop !18

115:                                              ; preds = %101
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %12, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %12, align 4, !tbaa !9
  br label %75, !llvm.loop !19

119:                                              ; preds = %75
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %11, align 4, !tbaa !9
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %11, align 4, !tbaa !9
  br label %15, !llvm.loop !20

123:                                              ; preds = %15
  store i32 1, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %124

124:                                              ; preds = %123, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %125 = load i32, ptr %4, align 4
  ret i32 %125
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind "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 = !{!7, !7, i64 0}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}


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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind memory(readwrite, inaccessiblemem: write) uwtable
define dso_local range(i32 0, 2) i32 @qh_gram_schmidt(ptr nocapture noundef %0, i32 noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #2 {
  %4 = icmp sgt i32 %1, 0
  br i1 %4, label %.lr.ph89, label %._crit_edge90

.lr.ph89:                                         ; preds = %3
  %5 = getelementptr inbounds i8, ptr %0, i64 4544
  %6 = zext nneg i32 %1 to i64
  %wide.trip.count129 = zext nneg i32 %1 to i64
  %7 = add nsw i32 %1, -1
  %8 = zext i32 %7 to i64
  %xtraiter = and i32 %1, 3
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  %9 = icmp ult i32 %1, 4
  %min.iters.check162 = icmp eq i32 %1, 1
  %n.vec165 = and i64 %wide.trip.count129, 2147483646
  %.cast166 = trunc nuw nsw i64 %n.vec165 to i32
  %ind.end167 = sub nsw i32 %1, %.cast166
  %10 = mul nsw i64 %n.vec165, -8
  %cmp.n181 = icmp eq i64 %n.vec165, %wide.trip.count129
  %xtraiter189 = and i32 %1, 3
  %11 = icmp ult i32 %1, 4
  %unroll_iter = and i32 %1, 2147483644
  %lcmp.mod190.not = icmp eq i32 %xtraiter189, 0
  %min.iters.check = icmp ult i32 %1, 4
  %n.vec = and i64 %wide.trip.count129, 2147483644
  %.cast = trunc nuw nsw i64 %n.vec to i32
  %ind.end = sub nsw i32 %1, %.cast
  %12 = mul nsw i64 %n.vec, -8
  %13 = mul nsw i64 %n.vec, -8
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count129
  br label %.lr.ph.preheader

.loopexit:                                        ; preds = %._crit_edge81, %._crit_edge64
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond130.not = icmp eq i64 %indvars.iv.next127, %wide.trip.count129
  br i1 %exitcond130.not, label %._crit_edge90, label %.lr.ph.preheader, !llvm.loop !5

.lr.ph.preheader:                                 ; preds = %.loopexit, %.lr.ph89
  %indvars.iv126 = phi i64 [ 0, %.lr.ph89 ], [ %indvars.iv.next127, %.loopexit ]
  %indvars.iv = phi i64 [ 1, %.lr.ph89 ], [ %indvars.iv.next, %.loopexit ]
  %14 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv126
  %15 = load ptr, ptr %14, align 8, !tbaa !7
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader, %.lr.ph.prol
  %.058.prol = phi i32 [ %16, %.lr.ph.prol ], [ %1, %.lr.ph.preheader ]
  %.03957.prol = phi double [ %18, %.lr.ph.prol ], [ 0.000000e+00, %.lr.ph.preheader ]
  %.04356.prol = phi ptr [ %19, %.lr.ph.prol ], [ %15, %.lr.ph.preheader ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader ]
  %16 = add nsw i32 %.058.prol, -1
  %17 = load double, ptr %.04356.prol, align 8, !tbaa !11
  %18 = tail call double @llvm.fmuladd.f64(double %17, double %17, double %.03957.prol)
  %19 = getelementptr inbounds i8, ptr %.04356.prol, i64 8
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !13

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %.lcssa183.unr = phi double [ poison, %.lr.ph.preheader ], [ %18, %.lr.ph.prol ]
  %.lcssa.unr = phi ptr [ poison, %.lr.ph.preheader ], [ %19, %.lr.ph.prol ]
  %.058.unr = phi i32 [ %1, %.lr.ph.preheader ], [ %16, %.lr.ph.prol ]
  %.03957.unr = phi double [ 0.000000e+00, %.lr.ph.preheader ], [ %18, %.lr.ph.prol ]
  %.04356.unr = phi ptr [ %15, %.lr.ph.preheader ], [ %19, %.lr.ph.prol ]
  br i1 %9, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.058 = phi i32 [ %29, %.lr.ph ], [ %.058.unr, %.lr.ph.prol.loopexit ]
  %.03957 = phi double [ %31, %.lr.ph ], [ %.03957.unr, %.lr.ph.prol.loopexit ]
  %.04356 = phi ptr [ %32, %.lr.ph ], [ %.04356.unr, %.lr.ph.prol.loopexit ]
  %20 = load double, ptr %.04356, align 8, !tbaa !11
  %21 = tail call double @llvm.fmuladd.f64(double %20, double %20, double %.03957)
  %22 = getelementptr inbounds i8, ptr %.04356, i64 8
  %23 = load double, ptr %22, align 8, !tbaa !11
  %24 = tail call double @llvm.fmuladd.f64(double %23, double %23, double %21)
  %25 = getelementptr inbounds i8, ptr %.04356, i64 16
  %26 = load double, ptr %25, align 8, !tbaa !11
  %27 = tail call double @llvm.fmuladd.f64(double %26, double %26, double %24)
  %28 = getelementptr inbounds i8, ptr %.04356, i64 24
  %29 = add nsw i32 %.058, -4
  %30 = load double, ptr %28, align 8, !tbaa !11
  %31 = tail call double @llvm.fmuladd.f64(double %30, double %30, double %27)
  %32 = getelementptr inbounds i8, ptr %.04356, i64 32
  %.not.3 = icmp eq i32 %29, 0
  br i1 %.not.3, label %._crit_edge, label %.lr.ph, !llvm.loop !15

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph.prol.loopexit
  %.lcssa183 = phi double [ %.lcssa183.unr, %.lr.ph.prol.loopexit ], [ %31, %.lr.ph ]
  %.lcssa = phi ptr [ %.lcssa.unr, %.lr.ph.prol.loopexit ], [ %32, %.lr.ph ]
  %33 = tail call double @sqrt(double noundef %.lcssa183) #4
  %34 = load double, ptr %5, align 8, !tbaa !16
  %35 = fcmp ogt double %34, %33
  br i1 %35, label %36, label %37

36:                                               ; preds = %._crit_edge
  store double %33, ptr %5, align 8, !tbaa !16
  br label %37

37:                                               ; preds = %36, %._crit_edge
  %38 = fcmp oeq double %33, 0.000000e+00
  br i1 %38, label %._crit_edge90, label %.lr.ph63.preheader

.lr.ph63.preheader:                               ; preds = %37
  br i1 %min.iters.check162, label %.lr.ph63.preheader182, label %vector.ph163

vector.ph163:                                     ; preds = %.lr.ph63.preheader
  %ind.end169 = getelementptr i8, ptr %.lcssa, i64 %10
  %broadcast.splatinsert177 = insertelement <2 x double> poison, double %33, i64 0
  %invariant.gep = getelementptr i8, ptr %.lcssa, i64 -16
  %39 = shufflevector <2 x double> %broadcast.splatinsert177, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body171

vector.body171:                                   ; preds = %vector.body171, %vector.ph163
  %index172 = phi i64 [ 0, %vector.ph163 ], [ %index.next180, %vector.body171 ]
  %offset.idx173 = mul i64 %index172, -8
  %gep = getelementptr i8, ptr %invariant.gep, i64 %offset.idx173
  %wide.load175 = load <2 x double>, ptr %gep, align 8, !tbaa !11
  %reverse179 = fdiv <2 x double> %wide.load175, %39
  store <2 x double> %reverse179, ptr %gep, align 8, !tbaa !11
  %index.next180 = add nuw i64 %index172, 2
  %40 = icmp eq i64 %index.next180, %n.vec165
  br i1 %40, label %middle.block160, label %vector.body171, !llvm.loop !17

middle.block160:                                  ; preds = %vector.body171
  br i1 %cmp.n181, label %._crit_edge64, label %.lr.ph63.preheader182

.lr.ph63.preheader182:                            ; preds = %middle.block160, %.lr.ph63.preheader
  %.162.ph = phi i32 [ %1, %.lr.ph63.preheader ], [ %ind.end167, %middle.block160 ]
  %.14461.ph = phi ptr [ %.lcssa, %.lr.ph63.preheader ], [ %ind.end169, %middle.block160 ]
  br label %.lr.ph63

.lr.ph63:                                         ; preds = %.lr.ph63.preheader182, %.lr.ph63
  %.162 = phi i32 [ %41, %.lr.ph63 ], [ %.162.ph, %.lr.ph63.preheader182 ]
  %.14461 = phi ptr [ %42, %.lr.ph63 ], [ %.14461.ph, %.lr.ph63.preheader182 ]
  %41 = add nsw i32 %.162, -1
  %42 = getelementptr inbounds i8, ptr %.14461, i64 -8
  %43 = load double, ptr %42, align 8, !tbaa !11
  %44 = fdiv double %43, %33
  store double %44, ptr %42, align 8, !tbaa !11
  %.not51 = icmp eq i32 %41, 0
  br i1 %.not51, label %._crit_edge64, label %.lr.ph63, !llvm.loop !20

._crit_edge64:                                    ; preds = %.lr.ph63, %middle.block160
  %.lcssa138 = phi ptr [ %ind.end169, %middle.block160 ], [ %42, %.lr.ph63 ]
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %45 = icmp ult i64 %indvars.iv.next127, %6
  br i1 %45, label %.lr.ph72.preheader, label %.loopexit

.lr.ph72.preheader:                               ; preds = %._crit_edge64, %._crit_edge81
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %._crit_edge81 ], [ %indvars.iv, %._crit_edge64 ]
  %.24583 = phi ptr [ %.lcssa142, %._crit_edge81 ], [ %.lcssa138, %._crit_edge64 ]
  %46 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv123
  %47 = load ptr, ptr %46, align 8, !tbaa !7
  br i1 %11, label %.preheader.unr-lcssa, label %.lr.ph72

.preheader.unr-lcssa.loopexit:                    ; preds = %.lr.ph72
  %indvar.next.2 = or disjoint i64 %indvar, 3
  br label %.preheader.unr-lcssa

.preheader.unr-lcssa:                             ; preds = %.preheader.unr-lcssa.loopexit, %.lr.ph72.preheader
  %indvar.lcssa.ph = phi i64 [ poison, %.lr.ph72.preheader ], [ %indvar.next.2, %.preheader.unr-lcssa.loopexit ]
  %.lcssa187.ph = phi ptr [ poison, %.lr.ph72.preheader ], [ %87, %.preheader.unr-lcssa.loopexit ]
  %.lcssa186.ph = phi ptr [ poison, %.lr.ph72.preheader ], [ %89, %.preheader.unr-lcssa.loopexit ]
  %.lcssa185.ph = phi double [ poison, %.lr.ph72.preheader ], [ %91, %.preheader.unr-lcssa.loopexit ]
  %indvar.unr = phi i64 [ 0, %.lr.ph72.preheader ], [ %indvar.next.3, %.preheader.unr-lcssa.loopexit ]
  %.14069.unr = phi double [ 0.000000e+00, %.lr.ph72.preheader ], [ %91, %.preheader.unr-lcssa.loopexit ]
  %.04168.unr = phi ptr [ %47, %.lr.ph72.preheader ], [ %89, %.preheader.unr-lcssa.loopexit ]
  %.34667.unr = phi ptr [ %.24583, %.lr.ph72.preheader ], [ %87, %.preheader.unr-lcssa.loopexit ]
  br i1 %lcmp.mod190.not, label %.preheader, label %.lr.ph72.epil

.lr.ph72.epil:                                    ; preds = %.preheader.unr-lcssa, %.lr.ph72.epil
  %indvar.epil = phi i64 [ %indvar.next.epil, %.lr.ph72.epil ], [ %indvar.unr, %.preheader.unr-lcssa ]
  %.14069.epil = phi double [ %52, %.lr.ph72.epil ], [ %.14069.unr, %.preheader.unr-lcssa ]
  %.04168.epil = phi ptr [ %50, %.lr.ph72.epil ], [ %.04168.unr, %.preheader.unr-lcssa ]
  %.34667.epil = phi ptr [ %48, %.lr.ph72.epil ], [ %.34667.unr, %.preheader.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.lr.ph72.epil ], [ 0, %.preheader.unr-lcssa ]
  %48 = getelementptr i8, ptr %.34667.epil, i64 8
  %49 = load double, ptr %.34667.epil, align 8, !tbaa !11
  %50 = getelementptr i8, ptr %.04168.epil, i64 8
  %51 = load double, ptr %.04168.epil, align 8, !tbaa !11
  %52 = tail call double @llvm.fmuladd.f64(double %49, double %51, double %.14069.epil)
  %indvar.next.epil = add i64 %indvar.epil, 1
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter189
  br i1 %epil.iter.cmp.not, label %.preheader, label %.lr.ph72.epil, !llvm.loop !21

.preheader:                                       ; preds = %.lr.ph72.epil, %.preheader.unr-lcssa
  %indvar.lcssa = phi i64 [ %indvar.lcssa.ph, %.preheader.unr-lcssa ], [ %indvar.epil, %.lr.ph72.epil ]
  %.lcssa187 = phi ptr [ %.lcssa187.ph, %.preheader.unr-lcssa ], [ %48, %.lr.ph72.epil ]
  %.lcssa186 = phi ptr [ %.lcssa186.ph, %.preheader.unr-lcssa ], [ %50, %.lr.ph72.epil ]
  %.lcssa185 = phi double [ %.lcssa185.ph, %.preheader.unr-lcssa ], [ %52, %.lr.ph72.epil ]
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.preheader
  %.379.ph = phi i32 [ %1, %vector.memcheck ], [ %1, %.preheader ], [ %ind.end, %middle.block ]
  %.14278.ph = phi ptr [ %.lcssa186, %vector.memcheck ], [ %.lcssa186, %.preheader ], [ %ind.end144, %middle.block ]
  %.477.ph = phi ptr [ %.lcssa187, %vector.memcheck ], [ %.lcssa187, %.preheader ], [ %ind.end146, %middle.block ]
  %xtraiter195 = and i32 %.379.ph, 1
  %lcmp.mod196.not = icmp eq i32 %xtraiter195, 0
  br i1 %lcmp.mod196.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %53 = add nsw i32 %.379.ph, -1
  %54 = getelementptr inbounds i8, ptr %.477.ph, i64 -8
  %55 = load double, ptr %54, align 8, !tbaa !11
  %56 = getelementptr inbounds i8, ptr %.14278.ph, i64 -8
  %57 = load double, ptr %56, align 8, !tbaa !11
  %58 = fneg double %55
  %59 = tail call double @llvm.fmuladd.f64(double %58, double %.lcssa185, double %57)
  store double %59, ptr %56, align 8, !tbaa !11
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %.lcssa188.unr = phi ptr [ poison, %scalar.ph.preheader ], [ %54, %scalar.ph.prol ]
  %.379.unr = phi i32 [ %.379.ph, %scalar.ph.preheader ], [ %53, %scalar.ph.prol ]
  %.14278.unr = phi ptr [ %.14278.ph, %scalar.ph.preheader ], [ %56, %scalar.ph.prol ]
  %.477.unr = phi ptr [ %.477.ph, %scalar.ph.preheader ], [ %54, %scalar.ph.prol ]
  %60 = icmp eq i32 %.379.ph, 1
  br i1 %60, label %._crit_edge81, label %scalar.ph

vector.memcheck:                                  ; preds = %.preheader
  %61 = sub i64 %indvar.lcssa, %8
  %62 = shl i64 %61, 3
  %scevgep = getelementptr i8, ptr %47, i64 %62
  %scevgep143 = getelementptr i8, ptr %.24583, i64 %62
  %bound0 = icmp ult ptr %scevgep, %.lcssa187
  %bound1 = icmp ult ptr %scevgep143, %.lcssa186
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %ind.end144 = getelementptr i8, ptr %.lcssa186, i64 %12
  %ind.end146 = getelementptr i8, ptr %.lcssa187, i64 %13
  %broadcast.splatinsert = insertelement <2 x double> poison, double %.lcssa185, i64 0
  %63 = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %64 = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = mul i64 %index, -8
  %next.gep = getelementptr i8, ptr %.lcssa186, i64 %offset.idx
  %offset.idx149 = mul i64 %index, -8
  %next.gep150 = getelementptr i8, ptr %.lcssa187, i64 %offset.idx149
  %65 = getelementptr inbounds i8, ptr %next.gep150, i64 -16
  %66 = getelementptr inbounds i8, ptr %next.gep150, i64 -32
  %wide.load = load <2 x double>, ptr %65, align 8, !tbaa !11, !alias.scope !22
  %wide.load152 = load <2 x double>, ptr %66, align 8, !tbaa !11, !alias.scope !22
  %67 = getelementptr inbounds i8, ptr %next.gep, i64 -16
  %68 = getelementptr inbounds i8, ptr %next.gep, i64 -32
  %wide.load154 = load <2 x double>, ptr %67, align 8, !tbaa !11, !alias.scope !25, !noalias !22
  %wide.load156 = load <2 x double>, ptr %68, align 8, !tbaa !11, !alias.scope !25, !noalias !22
  %69 = fneg <2 x double> %wide.load
  %reverse158 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %69, <2 x double> %63, <2 x double> %wide.load154)
  store <2 x double> %reverse158, ptr %67, align 8, !tbaa !11, !alias.scope !25, !noalias !22
  %70 = fneg <2 x double> %wide.load152
  %reverse159 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %70, <2 x double> %64, <2 x double> %wide.load156)
  store <2 x double> %reverse159, ptr %68, align 8, !tbaa !11, !alias.scope !25, !noalias !22
  %index.next = add nuw i64 %index, 4
  %71 = icmp eq i64 %index.next, %n.vec
  br i1 %71, label %middle.block, label %vector.body, !llvm.loop !27

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

.lr.ph72:                                         ; preds = %.lr.ph72.preheader, %.lr.ph72
  %indvar = phi i64 [ %indvar.next.3, %.lr.ph72 ], [ 0, %.lr.ph72.preheader ]
  %.14069 = phi double [ %91, %.lr.ph72 ], [ 0.000000e+00, %.lr.ph72.preheader ]
  %.04168 = phi ptr [ %89, %.lr.ph72 ], [ %47, %.lr.ph72.preheader ]
  %.34667 = phi ptr [ %87, %.lr.ph72 ], [ %.24583, %.lr.ph72.preheader ]
  %niter = phi i32 [ %niter.next.3, %.lr.ph72 ], [ 0, %.lr.ph72.preheader ]
  %72 = getelementptr i8, ptr %.34667, i64 8
  %73 = load double, ptr %.34667, align 8, !tbaa !11
  %74 = getelementptr i8, ptr %.04168, i64 8
  %75 = load double, ptr %.04168, align 8, !tbaa !11
  %76 = tail call double @llvm.fmuladd.f64(double %73, double %75, double %.14069)
  %77 = getelementptr i8, ptr %.34667, i64 16
  %78 = load double, ptr %72, align 8, !tbaa !11
  %79 = getelementptr i8, ptr %.04168, i64 16
  %80 = load double, ptr %74, align 8, !tbaa !11
  %81 = tail call double @llvm.fmuladd.f64(double %78, double %80, double %76)
  %82 = getelementptr i8, ptr %.34667, i64 24
  %83 = load double, ptr %77, align 8, !tbaa !11
  %84 = getelementptr i8, ptr %.04168, i64 24
  %85 = load double, ptr %79, align 8, !tbaa !11
  %86 = tail call double @llvm.fmuladd.f64(double %83, double %85, double %81)
  %87 = getelementptr i8, ptr %.34667, i64 32
  %88 = load double, ptr %82, align 8, !tbaa !11
  %89 = getelementptr i8, ptr %.04168, i64 32
  %90 = load double, ptr %84, align 8, !tbaa !11
  %91 = tail call double @llvm.fmuladd.f64(double %88, double %90, double %86)
  %indvar.next.3 = add nuw nsw i64 %indvar, 4
  %niter.next.3 = add i32 %niter, 4
  %niter.ncmp.3 = icmp eq i32 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader.unr-lcssa.loopexit, label %.lr.ph72, !llvm.loop !28

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %.379 = phi i32 [ %98, %scalar.ph ], [ %.379.unr, %scalar.ph.prol.loopexit ]
  %.14278 = phi ptr [ %101, %scalar.ph ], [ %.14278.unr, %scalar.ph.prol.loopexit ]
  %.477 = phi ptr [ %99, %scalar.ph ], [ %.477.unr, %scalar.ph.prol.loopexit ]
  %92 = getelementptr inbounds i8, ptr %.477, i64 -8
  %93 = load double, ptr %92, align 8, !tbaa !11
  %94 = getelementptr inbounds i8, ptr %.14278, i64 -8
  %95 = load double, ptr %94, align 8, !tbaa !11
  %96 = fneg double %93
  %97 = tail call double @llvm.fmuladd.f64(double %96, double %.lcssa185, double %95)
  store double %97, ptr %94, align 8, !tbaa !11
  %98 = add nsw i32 %.379, -2
  %99 = getelementptr inbounds i8, ptr %.477, i64 -16
  %100 = load double, ptr %99, align 8, !tbaa !11
  %101 = getelementptr inbounds i8, ptr %.14278, i64 -16
  %102 = load double, ptr %101, align 8, !tbaa !11
  %103 = fneg double %100
  %104 = tail call double @llvm.fmuladd.f64(double %103, double %.lcssa185, double %102)
  store double %104, ptr %101, align 8, !tbaa !11
  %.not53.1 = icmp eq i32 %98, 0
  br i1 %.not53.1, label %._crit_edge81, label %scalar.ph, !llvm.loop !29

._crit_edge81:                                    ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %.lcssa142 = phi ptr [ %ind.end146, %middle.block ], [ %.lcssa188.unr, %scalar.ph.prol.loopexit ], [ %99, %scalar.ph ]
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next124, %wide.trip.count129
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph72.preheader, !llvm.loop !30

._crit_edge90:                                    ; preds = %37, %.loopexit, %3
  %.047 = phi i32 [ 1, %3 ], [ 1, %.loopexit ], [ 0, %37 ]
  ret i32 %.047
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nofree nounwind willreturn memory(write) "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 = { nofree nounwind memory(readwrite, inaccessiblemem: write) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !9, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.unroll.disable"}
!15 = distinct !{!15, !6}
!16 = !{!9, !9, i64 0}
!17 = distinct !{!17, !6, !18, !19}
!18 = !{!"llvm.loop.isvectorized", i32 1}
!19 = !{!"llvm.loop.unroll.runtime.disable"}
!20 = distinct !{!20, !6, !19, !18}
!21 = distinct !{!21, !14}
!22 = !{!23}
!23 = distinct !{!23, !24}
!24 = distinct !{!24, !"LVerDomain"}
!25 = !{!26}
!26 = distinct !{!26, !24}
!27 = distinct !{!27, !6, !18, !19}
!28 = distinct !{!28, !6}
!29 = distinct !{!29, !6, !18}
!30 = distinct !{!30, !6}


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