; LLVM IR from kkumatani/distant_speech_recognition :: btk20_src/modulated (pc_lattice)

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

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

35:                                               ; preds = %98, %4
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = load i32, ptr %8, align 4, !tbaa !9
  %38 = icmp sle i32 %36, %37
  br i1 %38, label %39, label %107

39:                                               ; preds = %35
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = load double, ptr %40, align 8, !tbaa !11
  %42 = load ptr, ptr %15, align 8, !tbaa !5
  store double %41, ptr %42, align 8, !tbaa !11
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds double, ptr %43, i32 1
  store ptr %44, ptr %7, align 8, !tbaa !5
  %45 = load double, ptr %44, align 8, !tbaa !11
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = load double, ptr %46, align 8, !tbaa !11
  %48 = fmul double %45, %47
  %49 = load ptr, ptr %14, align 8, !tbaa !5
  store double %48, ptr %49, align 8, !tbaa !11
  store i32 1, ptr %10, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %75, %39
  %51 = load i32, ptr %10, align 4, !tbaa !9
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %54, label %78

54:                                               ; preds = %50
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = load double, ptr %55, align 8, !tbaa !11
  %57 = load ptr, ptr %14, align 8, !tbaa !5
  %58 = getelementptr inbounds double, ptr %57, i32 1
  store ptr %58, ptr %14, align 8, !tbaa !5
  %59 = load double, ptr %58, align 8, !tbaa !11
  %60 = load ptr, ptr %15, align 8, !tbaa !5
  %61 = getelementptr inbounds double, ptr %60, i32 1
  store ptr %61, ptr %15, align 8, !tbaa !5
  %62 = load double, ptr %61, align 8, !tbaa !11
  %63 = call double @llvm.fmuladd.f64(double %56, double %59, double %62)
  store double %63, ptr %12, align 8, !tbaa !11
  %64 = load ptr, ptr %14, align 8, !tbaa !5
  %65 = load double, ptr %64, align 8, !tbaa !11
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = load double, ptr %66, align 8, !tbaa !11
  %68 = load ptr, ptr %15, align 8, !tbaa !5
  %69 = load double, ptr %68, align 8, !tbaa !11
  %70 = fneg double %67
  %71 = call double @llvm.fmuladd.f64(double %70, double %69, double %65)
  %72 = load ptr, ptr %15, align 8, !tbaa !5
  store double %71, ptr %72, align 8, !tbaa !11
  %73 = load double, ptr %12, align 8, !tbaa !11
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  store double %73, ptr %74, align 8, !tbaa !11
  br label %75

75:                                               ; preds = %54
  %76 = load i32, ptr %10, align 4, !tbaa !9
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %10, align 4, !tbaa !9
  br label %50, !llvm.loop !13

78:                                               ; preds = %50
  %79 = load ptr, ptr %15, align 8, !tbaa !5
  %80 = getelementptr inbounds double, ptr %79, i32 1
  store ptr %80, ptr %15, align 8, !tbaa !5
  %81 = load double, ptr %80, align 8, !tbaa !11
  %82 = load ptr, ptr %14, align 8, !tbaa !5
  %83 = getelementptr inbounds double, ptr %82, i32 1
  store ptr %83, ptr %14, align 8, !tbaa !5
  store double %81, ptr %83, align 8, !tbaa !11
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = load double, ptr %84, align 8, !tbaa !11
  %86 = fneg double %85
  %87 = load ptr, ptr %15, align 8, !tbaa !5
  %88 = load double, ptr %87, align 8, !tbaa !11
  %89 = fmul double %86, %88
  %90 = load ptr, ptr %15, align 8, !tbaa !5
  store double %89, ptr %90, align 8, !tbaa !11
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = load double, ptr %91, align 8, !tbaa !11
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = load double, ptr %93, align 8, !tbaa !11
  %95 = call double @llvm.fmuladd.f64(double %92, double %94, double 1.000000e+00)
  %96 = load double, ptr %13, align 8, !tbaa !11
  %97 = fmul double %96, %95
  store double %97, ptr %13, align 8, !tbaa !11
  br label %98

98:                                               ; preds = %78
  %99 = load i32, ptr %9, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %9, align 4, !tbaa !9
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %101, ptr %14, align 8, !tbaa !5
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = load i32, ptr %11, align 4, !tbaa !9
  %104 = add nsw i32 %103, -1
  store i32 %104, ptr %11, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds double, ptr %102, i64 %105
  store ptr %106, ptr %15, align 8, !tbaa !5
  br label %35, !llvm.loop !15

107:                                              ; preds = %35
  %108 = load double, ptr %13, align 8, !tbaa !11
  %109 = call double @sqrt(double noundef %108) #4
  %110 = fdiv double 1.000000e+00, %109
  store double %110, ptr %13, align 8, !tbaa !11
  store i32 0, ptr %9, align 4, !tbaa !9
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %111, ptr %14, align 8, !tbaa !5
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %112, ptr %15, align 8, !tbaa !5
  br label %113

113:                                              ; preds = %130, %107
  %114 = load i32, ptr %9, align 4, !tbaa !9
  %115 = load i32, ptr %8, align 4, !tbaa !9
  %116 = icmp sle i32 %114, %115
  br i1 %116, label %117, label %133

117:                                              ; preds = %113
  %118 = load ptr, ptr %14, align 8, !tbaa !5
  %119 = load double, ptr %118, align 8, !tbaa !11
  %120 = load double, ptr %13, align 8, !tbaa !11
  %121 = fmul double %119, %120
  %122 = load ptr, ptr %14, align 8, !tbaa !5
  %123 = getelementptr inbounds double, ptr %122, i32 1
  store ptr %123, ptr %14, align 8, !tbaa !5
  store double %121, ptr %122, align 8, !tbaa !11
  %124 = load ptr, ptr %15, align 8, !tbaa !5
  %125 = load double, ptr %124, align 8, !tbaa !11
  %126 = load double, ptr %13, align 8, !tbaa !11
  %127 = fmul double %125, %126
  %128 = load ptr, ptr %15, align 8, !tbaa !5
  %129 = getelementptr inbounds double, ptr %128, i32 1
  store ptr %129, ptr %15, align 8, !tbaa !5
  store double %127, ptr %128, align 8, !tbaa !11
  br label %130

130:                                              ; preds = %117
  %131 = load i32, ptr %9, align 4, !tbaa !9
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %9, align 4, !tbaa !9
  br label %113, !llvm.loop !16

133:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret void
}

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #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 = distinct !{!15, !14}
!16 = distinct !{!16, !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: nofree nounwind memory(readwrite, inaccessiblemem: write) uwtable
define dso_local void @Pclat(ptr nocapture noundef %0, ptr nocapture noundef %1, ptr nocapture noundef readonly %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = load double, ptr %2, align 8, !tbaa !5
  store double %5, ptr %0, align 8, !tbaa !5
  %6 = sext i32 %3 to i64
  %7 = getelementptr inbounds double, ptr %1, i64 %6
  store double 1.000000e+00, ptr %7, align 8, !tbaa !5
  %8 = load double, ptr %2, align 8, !tbaa !5
  %9 = tail call double @llvm.fmuladd.f64(double %8, double %8, double 1.000000e+00)
  %.not68 = icmp slt i32 %3, 1
  br i1 %.not68, label %._crit_edge75, label %.lr.ph74.preheader

.lr.ph74.preheader:                               ; preds = %4
  %10 = shl nuw nsw i64 %6, 3
  %scevgep95 = getelementptr i8, ptr %0, i64 8
  %scevgep96 = getelementptr i8, ptr %0, i64 16
  %scevgep98 = getelementptr i8, ptr %2, i64 8
  %11 = add nsw i32 %3, -1
  %12 = zext i32 %11 to i64
  %13 = shl nuw nsw i64 %12, 3
  %14 = getelementptr i8, ptr %2, i64 %13
  %scevgep99 = getelementptr i8, ptr %14, i64 16
  %15 = getelementptr i8, ptr %1, i64 %10
  %16 = getelementptr i8, ptr %1, i64 %10
  %17 = getelementptr i8, ptr %16, i64 8
  %bound0103 = icmp ult ptr %scevgep95, %scevgep99
  %invariant.gep = getelementptr i8, ptr %0, i64 8
  br label %.lr.ph74

.lr.ph74:                                         ; preds = %.lr.ph74.preheader, %._crit_edge
  %indvar = phi i64 [ 0, %.lr.ph74.preheader ], [ %indvar.next, %._crit_edge ]
  %indvars.iv = phi i64 [ %6, %.lr.ph74.preheader ], [ %indvars.iv.next, %._crit_edge ]
  %.05571 = phi double [ %9, %.lr.ph74.preheader ], [ %71, %._crit_edge ]
  %.05670 = phi ptr [ %2, %.lr.ph74.preheader ], [ %24, %._crit_edge ]
  %.05969 = phi i32 [ 1, %.lr.ph74.preheader ], [ %72, %._crit_edge ]
  %18 = trunc i64 %indvar to i32
  %19 = mul nsw i64 %indvar, -8
  %scevgep = getelementptr i8, ptr %15, i64 %19
  %scevgep93 = getelementptr i8, ptr %17, i64 %19
  %20 = shl i64 %indvar, 3
  %21 = add i64 %20, 34359738360
  %22 = and i64 %21, 34359738360
  %scevgep94 = getelementptr i8, ptr %scevgep93, i64 %22
  %scevgep97 = getelementptr i8, ptr %scevgep96, i64 %22
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %.0 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next
  %23 = load double, ptr %0, align 8, !tbaa !5
  store double %23, ptr %.0, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %.05670, i64 8
  %25 = load double, ptr %24, align 8, !tbaa !5
  %26 = fmul double %25, %23
  store double %26, ptr %0, align 8, !tbaa !5
  %27 = icmp ugt i32 %.05969, 1
  br i1 %27, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.lr.ph74
  %min.iters.check = icmp ult i64 %indvar, 4
  br i1 %min.iters.check, label %.lr.ph.preheader150, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph.preheader
  %bound0 = icmp ult ptr %scevgep, %scevgep97
  %bound1 = icmp ult ptr %scevgep95, %scevgep94
  %found.conflict = and i1 %bound0, %bound1
  %bound0100 = icmp ult ptr %scevgep, %scevgep99
  %bound1101 = icmp ult ptr %scevgep98, %scevgep94
  %found.conflict102 = and i1 %bound0100, %bound1101
  %conflict.rdx = or i1 %found.conflict, %found.conflict102
  %bound1104 = icmp ult ptr %scevgep98, %scevgep97
  %found.conflict105 = and i1 %bound0103, %bound1104
  %conflict.rdx106 = or i1 %conflict.rdx, %found.conflict105
  br i1 %conflict.rdx106, label %.lr.ph.preheader150, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %indvar, -2
  %28 = shl i64 %n.vec, 3
  %ind.end = getelementptr i8, ptr %.0, i64 %28
  %29 = shl i64 %n.vec, 3
  %ind.end107 = getelementptr i8, ptr %0, i64 %29
  %.cast = trunc i64 %indvar to i32
  %ind.end109 = or i32 %.cast, 1
  %30 = load double, ptr %24, align 8, !tbaa !5, !alias.scope !9
  %broadcast.splatinsert = insertelement <2 x double> poison, double %30, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %invariant.gep158 = getelementptr i8, ptr %.0, i64 8
  %31 = fneg <2 x double> %broadcast.splat
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = shl i64 %index, 3
  %offset.idx111 = shl i64 %index, 3
  %gep = getelementptr i8, ptr %invariant.gep, i64 %offset.idx111
  %wide.load = load <2 x double>, ptr %gep, align 8, !tbaa !5, !alias.scope !12, !noalias !9
  %gep159 = getelementptr i8, ptr %invariant.gep158, i64 %offset.idx
  %wide.load113 = load <2 x double>, ptr %gep159, align 8, !tbaa !5, !alias.scope !14, !noalias !16
  %32 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load, <2 x double> %wide.load113)
  %33 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %31, <2 x double> %wide.load113, <2 x double> %wide.load)
  store <2 x double> %33, ptr %gep159, align 8, !tbaa !5, !alias.scope !14, !noalias !16
  store <2 x double> %32, ptr %gep, align 8, !tbaa !5, !alias.scope !12, !noalias !9
  %index.next = add nuw i64 %index, 2
  %34 = icmp eq i64 %index.next, %n.vec
  br i1 %34, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %indvar, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader150

.lr.ph.preheader150:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph.preheader
  %.165.ph = phi ptr [ %.0, %vector.memcheck ], [ %.0, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  %.15364.ph = phi ptr [ %0, %vector.memcheck ], [ %0, %.lr.ph.preheader ], [ %ind.end107, %middle.block ]
  %.05863.ph = phi i32 [ 1, %vector.memcheck ], [ 1, %.lr.ph.preheader ], [ %ind.end109, %middle.block ]
  %35 = and i32 %.05969, 1
  %lcmp.mod.not.not = icmp eq i32 %35, 0
  br i1 %lcmp.mod.not.not, label %.lr.ph.prol, label %.lr.ph.prol.loopexit

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader150
  %36 = load double, ptr %24, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %.15364.ph, i64 8
  %38 = load double, ptr %37, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %.165.ph, i64 8
  %40 = load double, ptr %39, align 8, !tbaa !5
  %41 = tail call double @llvm.fmuladd.f64(double %36, double %38, double %40)
  %42 = fneg double %36
  %43 = tail call double @llvm.fmuladd.f64(double %42, double %40, double %38)
  store double %43, ptr %39, align 8, !tbaa !5
  store double %41, ptr %37, align 8, !tbaa !5
  %44 = add nuw nsw i32 %.05863.ph, 1
  br label %.lr.ph.prol.loopexit

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader150
  %.lcssa151.unr = phi ptr [ poison, %.lr.ph.preheader150 ], [ %37, %.lr.ph.prol ]
  %.lcssa.unr = phi ptr [ poison, %.lr.ph.preheader150 ], [ %39, %.lr.ph.prol ]
  %.165.unr = phi ptr [ %.165.ph, %.lr.ph.preheader150 ], [ %39, %.lr.ph.prol ]
  %.15364.unr = phi ptr [ %.15364.ph, %.lr.ph.preheader150 ], [ %37, %.lr.ph.prol ]
  %.05863.unr = phi i32 [ %.05863.ph, %.lr.ph.preheader150 ], [ %44, %.lr.ph.prol ]
  %45 = icmp eq i32 %.05863.ph, %18
  br i1 %45, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.165 = phi ptr [ %57, %.lr.ph ], [ %.165.unr, %.lr.ph.prol.loopexit ]
  %.15364 = phi ptr [ %55, %.lr.ph ], [ %.15364.unr, %.lr.ph.prol.loopexit ]
  %.05863 = phi i32 [ %62, %.lr.ph ], [ %.05863.unr, %.lr.ph.prol.loopexit ]
  %46 = load double, ptr %24, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %.15364, i64 8
  %48 = load double, ptr %47, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %.165, i64 8
  %50 = load double, ptr %49, align 8, !tbaa !5
  %51 = tail call double @llvm.fmuladd.f64(double %46, double %48, double %50)
  %52 = fneg double %46
  %53 = tail call double @llvm.fmuladd.f64(double %52, double %50, double %48)
  store double %53, ptr %49, align 8, !tbaa !5
  store double %51, ptr %47, align 8, !tbaa !5
  %54 = load double, ptr %24, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %.15364, i64 16
  %56 = load double, ptr %55, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %.165, i64 16
  %58 = load double, ptr %57, align 8, !tbaa !5
  %59 = tail call double @llvm.fmuladd.f64(double %54, double %56, double %58)
  %60 = fneg double %54
  %61 = tail call double @llvm.fmuladd.f64(double %60, double %58, double %56)
  store double %61, ptr %57, align 8, !tbaa !5
  store double %59, ptr %55, align 8, !tbaa !5
  %62 = add nuw nsw i32 %.05863, 2
  %exitcond.not.1 = icmp eq i32 %62, %.05969
  br i1 %exitcond.not.1, label %._crit_edge, label %.lr.ph, !llvm.loop !21

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %.lr.ph74
  %.153.lcssa = phi ptr [ %0, %.lr.ph74 ], [ %ind.end107, %middle.block ], [ %.lcssa151.unr, %.lr.ph.prol.loopexit ], [ %55, %.lr.ph ]
  %.1.lcssa = phi ptr [ %.0, %.lr.ph74 ], [ %ind.end, %middle.block ], [ %.lcssa.unr, %.lr.ph.prol.loopexit ], [ %57, %.lr.ph ]
  %63 = getelementptr inbounds i8, ptr %.1.lcssa, i64 8
  %64 = load double, ptr %63, align 8, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %.153.lcssa, i64 8
  store double %64, ptr %65, align 8, !tbaa !5
  %66 = load double, ptr %24, align 8, !tbaa !5
  %67 = fneg double %66
  %68 = fmul double %64, %67
  store double %68, ptr %63, align 8, !tbaa !5
  %69 = load double, ptr %24, align 8, !tbaa !5
  %70 = tail call double @llvm.fmuladd.f64(double %69, double %69, double 1.000000e+00)
  %71 = fmul double %.05571, %70
  %72 = add nuw i32 %.05969, 1
  %exitcond87.not = icmp eq i32 %.05969, %3
  %indvar.next = add i64 %indvar, 1
  br i1 %exitcond87.not, label %._crit_edge75, label %.lr.ph74, !llvm.loop !22

._crit_edge75:                                    ; preds = %._crit_edge, %4
  %.055.lcssa = phi double [ %9, %4 ], [ %71, %._crit_edge ]
  %73 = tail call double @sqrt(double noundef %.055.lcssa) #4
  %74 = fdiv double 1.000000e+00, %73
  %.not6277 = icmp slt i32 %3, 0
  br i1 %.not6277, label %._crit_edge83, label %.lr.ph82.preheader

.lr.ph82.preheader:                               ; preds = %._crit_edge75
  %75 = add nuw i32 %3, 1
  %76 = zext i32 %75 to i64
  %min.iters.check122 = icmp ult i32 %3, 5
  br i1 %min.iters.check122, label %.lr.ph82.preheader149, label %vector.memcheck114

vector.memcheck114:                               ; preds = %.lr.ph82.preheader
  %77 = zext nneg i32 %3 to i64
  %78 = shl nuw nsw i64 %77, 3
  %79 = add nuw nsw i64 %78, 8
  %scevgep115 = getelementptr i8, ptr %0, i64 %79
  %scevgep116 = getelementptr i8, ptr %1, i64 %79
  %bound0117 = icmp ugt ptr %scevgep116, %0
  %bound1118 = icmp ugt ptr %scevgep115, %1
  %found.conflict119 = and i1 %bound0117, %bound1118
  br i1 %found.conflict119, label %.lr.ph82.preheader149, label %vector.ph123

vector.ph123:                                     ; preds = %vector.memcheck114
  %n.vec125 = and i64 %76, 4294967292
  %80 = shl nuw nsw i64 %n.vec125, 3
  %ind.end126 = getelementptr i8, ptr %1, i64 %80
  %81 = shl nuw nsw i64 %n.vec125, 3
  %ind.end128 = getelementptr i8, ptr %0, i64 %81
  %ind.end131 = trunc nuw i64 %n.vec125 to i32
  %broadcast.splatinsert143 = insertelement <2 x double> poison, double %74, i64 0
  %broadcast.splat144 = shufflevector <2 x double> %broadcast.splatinsert143, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body133

vector.body133:                                   ; preds = %vector.body133, %vector.ph123
  %index134 = phi i64 [ 0, %vector.ph123 ], [ %index.next147, %vector.body133 ]
  %offset.idx135 = shl i64 %index134, 3
  %next.gep136 = getelementptr i8, ptr %1, i64 %offset.idx135
  %offset.idx138 = shl i64 %index134, 3
  %next.gep139 = getelementptr i8, ptr %0, i64 %offset.idx138
  %82 = getelementptr i8, ptr %next.gep139, i64 16
  %wide.load141 = load <2 x double>, ptr %next.gep139, align 8, !tbaa !5, !alias.scope !23, !noalias !26
  %wide.load142 = load <2 x double>, ptr %82, align 8, !tbaa !5, !alias.scope !23, !noalias !26
  %83 = fmul <2 x double> %broadcast.splat144, %wide.load141
  %84 = fmul <2 x double> %broadcast.splat144, %wide.load142
  store <2 x double> %83, ptr %next.gep139, align 8, !tbaa !5, !alias.scope !23, !noalias !26
  store <2 x double> %84, ptr %82, align 8, !tbaa !5, !alias.scope !23, !noalias !26
  %85 = getelementptr i8, ptr %next.gep136, i64 16
  %wide.load145 = load <2 x double>, ptr %next.gep136, align 8, !tbaa !5, !alias.scope !26
  %wide.load146 = load <2 x double>, ptr %85, align 8, !tbaa !5, !alias.scope !26
  %86 = fmul <2 x double> %broadcast.splat144, %wide.load145
  %87 = fmul <2 x double> %broadcast.splat144, %wide.load146
  store <2 x double> %86, ptr %next.gep136, align 8, !tbaa !5, !alias.scope !26
  store <2 x double> %87, ptr %85, align 8, !tbaa !5, !alias.scope !26
  %index.next147 = add nuw i64 %index134, 4
  %88 = icmp eq i64 %index.next147, %n.vec125
  br i1 %88, label %middle.block120, label %vector.body133, !llvm.loop !28

middle.block120:                                  ; preds = %vector.body133
  %cmp.n148 = icmp eq i64 %n.vec125, %76
  br i1 %cmp.n148, label %._crit_edge83, label %.lr.ph82.preheader149

.lr.ph82.preheader149:                            ; preds = %middle.block120, %vector.memcheck114, %.lr.ph82.preheader
  %.280.ph = phi ptr [ %1, %vector.memcheck114 ], [ %1, %.lr.ph82.preheader ], [ %ind.end126, %middle.block120 ]
  %.25479.ph = phi ptr [ %0, %vector.memcheck114 ], [ %0, %.lr.ph82.preheader ], [ %ind.end128, %middle.block120 ]
  %.16078.ph = phi i32 [ 0, %vector.memcheck114 ], [ 0, %.lr.ph82.preheader ], [ %ind.end131, %middle.block120 ]
  %89 = add i32 %.16078.ph, %3
  %90 = and i32 %89, 1
  %lcmp.mod154.not.not = icmp eq i32 %90, 0
  br i1 %lcmp.mod154.not.not, label %.lr.ph82.prol, label %.lr.ph82.prol.loopexit

.lr.ph82.prol:                                    ; preds = %.lr.ph82.preheader149
  %91 = load double, ptr %.25479.ph, align 8, !tbaa !5
  %92 = fmul double %74, %91
  %93 = getelementptr inbounds i8, ptr %.25479.ph, i64 8
  store double %92, ptr %.25479.ph, align 8, !tbaa !5
  %94 = load double, ptr %.280.ph, align 8, !tbaa !5
  %95 = fmul double %74, %94
  %96 = getelementptr inbounds i8, ptr %.280.ph, i64 8
  store double %95, ptr %.280.ph, align 8, !tbaa !5
  %97 = add nuw i32 %.16078.ph, 1
  br label %.lr.ph82.prol.loopexit

.lr.ph82.prol.loopexit:                           ; preds = %.lr.ph82.prol, %.lr.ph82.preheader149
  %.280.unr = phi ptr [ %.280.ph, %.lr.ph82.preheader149 ], [ %96, %.lr.ph82.prol ]
  %.25479.unr = phi ptr [ %.25479.ph, %.lr.ph82.preheader149 ], [ %93, %.lr.ph82.prol ]
  %.16078.unr = phi i32 [ %.16078.ph, %.lr.ph82.preheader149 ], [ %97, %.lr.ph82.prol ]
  %98 = icmp eq i32 %.16078.ph, %3
  br i1 %98, label %._crit_edge83, label %.lr.ph82

.lr.ph82:                                         ; preds = %.lr.ph82.prol.loopexit, %.lr.ph82
  %.280 = phi ptr [ %111, %.lr.ph82 ], [ %.280.unr, %.lr.ph82.prol.loopexit ]
  %.25479 = phi ptr [ %108, %.lr.ph82 ], [ %.25479.unr, %.lr.ph82.prol.loopexit ]
  %.16078 = phi i32 [ %112, %.lr.ph82 ], [ %.16078.unr, %.lr.ph82.prol.loopexit ]
  %99 = load double, ptr %.25479, align 8, !tbaa !5
  %100 = fmul double %74, %99
  %101 = getelementptr inbounds i8, ptr %.25479, i64 8
  store double %100, ptr %.25479, align 8, !tbaa !5
  %102 = load double, ptr %.280, align 8, !tbaa !5
  %103 = fmul double %74, %102
  %104 = getelementptr inbounds i8, ptr %.280, i64 8
  store double %103, ptr %.280, align 8, !tbaa !5
  %105 = add nuw i32 %.16078, 1
  %106 = load double, ptr %101, align 8, !tbaa !5
  %107 = fmul double %74, %106
  %108 = getelementptr inbounds i8, ptr %.25479, i64 16
  store double %107, ptr %101, align 8, !tbaa !5
  %109 = load double, ptr %104, align 8, !tbaa !5
  %110 = fmul double %74, %109
  %111 = getelementptr inbounds i8, ptr %.280, i64 16
  store double %110, ptr %104, align 8, !tbaa !5
  %112 = add nuw i32 %.16078, 2
  %exitcond88.not.1 = icmp eq i32 %105, %3
  br i1 %exitcond88.not.1, label %._crit_edge83, label %.lr.ph82, !llvm.loop !29

._crit_edge83:                                    ; preds = %.lr.ph82.prol.loopexit, %.lr.ph82, %middle.block120, %._crit_edge75
  ret void
}

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

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

; 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 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #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 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10}
!10 = distinct !{!10, !11}
!11 = distinct !{!11, !"LVerDomain"}
!12 = !{!13}
!13 = distinct !{!13, !11}
!14 = !{!15}
!15 = distinct !{!15, !11}
!16 = !{!13, !10}
!17 = distinct !{!17, !18, !19, !20}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !18, !19}
!22 = distinct !{!22, !18}
!23 = !{!24}
!24 = distinct !{!24, !25}
!25 = distinct !{!25, !"LVerDomain"}
!26 = !{!27}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !18, !19, !20}
!29 = distinct !{!29, !18, !19}


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