; LLVM IR from openssl/openssl :: crypto/chacha (chacha_enc)

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

%union.chacha_buf = type { [16 x i32] }

; Function Attrs: nounwind uwtable
define dso_local void @ChaCha20_ctr32(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca [16 x i32], align 16
  %12 = alloca %union.chacha_buf, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %11) #2
  call void @llvm.lifetime.start.p0(i64 64, ptr %12) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #2
  %15 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 0
  store i32 1634760805, ptr %15, align 16, !tbaa !11
  %16 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 1
  store i32 857760878, ptr %16, align 4, !tbaa !11
  %17 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 2
  store i32 2036477234, ptr %17, align 8, !tbaa !11
  %18 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 3
  store i32 1797285236, ptr %18, align 4, !tbaa !11
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  %20 = getelementptr inbounds i32, ptr %19, i64 0
  %21 = load i32, ptr %20, align 4, !tbaa !11
  %22 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 4
  store i32 %21, ptr %22, align 16, !tbaa !11
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = getelementptr inbounds i32, ptr %23, i64 1
  %25 = load i32, ptr %24, align 4, !tbaa !11
  %26 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 5
  store i32 %25, ptr %26, align 4, !tbaa !11
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = getelementptr inbounds i32, ptr %27, i64 2
  %29 = load i32, ptr %28, align 4, !tbaa !11
  %30 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 6
  store i32 %29, ptr %30, align 8, !tbaa !11
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = getelementptr inbounds i32, ptr %31, i64 3
  %33 = load i32, ptr %32, align 4, !tbaa !11
  %34 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 7
  store i32 %33, ptr %34, align 4, !tbaa !11
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = getelementptr inbounds i32, ptr %35, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !11
  %38 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 8
  store i32 %37, ptr %38, align 16, !tbaa !11
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = getelementptr inbounds i32, ptr %39, i64 5
  %41 = load i32, ptr %40, align 4, !tbaa !11
  %42 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 9
  store i32 %41, ptr %42, align 4, !tbaa !11
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = getelementptr inbounds i32, ptr %43, i64 6
  %45 = load i32, ptr %44, align 4, !tbaa !11
  %46 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 10
  store i32 %45, ptr %46, align 8, !tbaa !11
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds i32, ptr %47, i64 7
  %49 = load i32, ptr %48, align 4, !tbaa !11
  %50 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 11
  store i32 %49, ptr %50, align 4, !tbaa !11
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = getelementptr inbounds i32, ptr %51, i64 0
  %53 = load i32, ptr %52, align 4, !tbaa !11
  %54 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 12
  store i32 %53, ptr %54, align 16, !tbaa !11
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = getelementptr inbounds i32, ptr %55, i64 1
  %57 = load i32, ptr %56, align 4, !tbaa !11
  %58 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 13
  store i32 %57, ptr %58, align 4, !tbaa !11
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  %60 = getelementptr inbounds i32, ptr %59, i64 2
  %61 = load i32, ptr %60, align 4, !tbaa !11
  %62 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 14
  store i32 %61, ptr %62, align 8, !tbaa !11
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = getelementptr inbounds i32, ptr %63, i64 3
  %65 = load i32, ptr %64, align 4, !tbaa !11
  %66 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 15
  store i32 %65, ptr %66, align 4, !tbaa !11
  br label %67

67:                                               ; preds = %100, %5
  %68 = load i64, ptr %8, align 8, !tbaa !9
  %69 = icmp ugt i64 %68, 0
  br i1 %69, label %70, label %113

70:                                               ; preds = %67
  store i64 64, ptr %13, align 8, !tbaa !9
  %71 = load i64, ptr %8, align 8, !tbaa !9
  %72 = load i64, ptr %13, align 8, !tbaa !9
  %73 = icmp ult i64 %71, %72
  br i1 %73, label %74, label %76

74:                                               ; preds = %70
  %75 = load i64, ptr %8, align 8, !tbaa !9
  store i64 %75, ptr %13, align 8, !tbaa !9
  br label %76

76:                                               ; preds = %74, %70
  %77 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 0
  call void @chacha20_core(ptr noundef %12, ptr noundef %77)
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %78

78:                                               ; preds = %97, %76
  %79 = load i64, ptr %14, align 8, !tbaa !9
  %80 = load i64, ptr %13, align 8, !tbaa !9
  %81 = icmp ult i64 %79, %80
  br i1 %81, label %82, label %100

82:                                               ; preds = %78
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = load i64, ptr %14, align 8, !tbaa !9
  %85 = getelementptr inbounds i8, ptr %83, i64 %84
  %86 = load i8, ptr %85, align 1, !tbaa !13
  %87 = zext i8 %86 to i32
  %88 = load i64, ptr %14, align 8, !tbaa !9
  %89 = getelementptr inbounds [64 x i8], ptr %12, i64 0, i64 %88
  %90 = load i8, ptr %89, align 1, !tbaa !13
  %91 = zext i8 %90 to i32
  %92 = xor i32 %87, %91
  %93 = trunc i32 %92 to i8
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = load i64, ptr %14, align 8, !tbaa !9
  %96 = getelementptr inbounds i8, ptr %94, i64 %95
  store i8 %93, ptr %96, align 1, !tbaa !13
  br label %97

97:                                               ; preds = %82
  %98 = load i64, ptr %14, align 8, !tbaa !9
  %99 = add i64 %98, 1
  store i64 %99, ptr %14, align 8, !tbaa !9
  br label %78, !llvm.loop !14

100:                                              ; preds = %78
  %101 = load i64, ptr %13, align 8, !tbaa !9
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds i8, ptr %102, i64 %101
  store ptr %103, ptr %6, align 8, !tbaa !5
  %104 = load i64, ptr %13, align 8, !tbaa !9
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = getelementptr inbounds i8, ptr %105, i64 %104
  store ptr %106, ptr %7, align 8, !tbaa !5
  %107 = load i64, ptr %13, align 8, !tbaa !9
  %108 = load i64, ptr %8, align 8, !tbaa !9
  %109 = sub i64 %108, %107
  store i64 %109, ptr %8, align 8, !tbaa !9
  %110 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 12
  %111 = load i32, ptr %110, align 16, !tbaa !11
  %112 = add i32 %111, 1
  store i32 %112, ptr %110, align 16, !tbaa !11
  br label %67, !llvm.loop !16

113:                                              ; preds = %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #2
  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: nounwind uwtable
declare hidden void @chacha20_core(ptr noundef, ptr noundef) #0

; 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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


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

%union.chacha_buf = type { [16 x i32] }

; Function Attrs: nounwind uwtable
define dso_local void @ChaCha20_ctr32(ptr nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, i64 noundef %2, ptr nocapture noundef readonly %3, ptr nocapture noundef readonly %4) local_unnamed_addr #0 {
  %6 = alloca [16 x i32], align 16
  %7 = alloca %union.chacha_buf, align 16
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #3
  store <4 x i32> <i32 1634760805, i32 857760878, i32 2036477234, i32 1797285236>, ptr %6, align 16, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %6, i64 16
  %9 = load <4 x i32>, ptr %3, align 4, !tbaa !5
  store <4 x i32> %9, ptr %8, align 16, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %3, i64 16
  %11 = getelementptr inbounds i8, ptr %6, i64 32
  %12 = load <4 x i32>, ptr %10, align 4, !tbaa !5
  store <4 x i32> %12, ptr %11, align 16, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %6, i64 48
  %14 = load <4 x i32>, ptr %4, align 4, !tbaa !5
  store <4 x i32> %14, ptr %13, align 16, !tbaa !5
  %.not34 = icmp eq i64 %2, 0
  br i1 %.not34, label %._crit_edge, label %iter.check.preheader

iter.check.preheader:                             ; preds = %5
  %15 = getelementptr inbounds i8, ptr %7, i64 16
  %16 = getelementptr inbounds i8, ptr %7, i64 32
  %17 = getelementptr inbounds i8, ptr %7, i64 48
  br label %iter.check

iter.check:                                       ; preds = %iter.check.preheader, %.loopexit
  %.03037 = phi ptr [ %72, %.loopexit ], [ %0, %iter.check.preheader ]
  %.03136 = phi ptr [ %73, %.loopexit ], [ %1, %iter.check.preheader ]
  %.03235 = phi i64 [ %74, %.loopexit ], [ %2, %iter.check.preheader ]
  %spec.select = call i64 @llvm.umin.i64(i64 %.03235, i64 64)
  call void @chacha20_core(ptr noundef nonnull %7, ptr noundef nonnull %6)
  %min.iters.check = icmp ult i64 %.03235, 8
  %.0313639 = ptrtoint ptr %.03136 to i64
  %.0303738 = ptrtoint ptr %.03037 to i64
  %18 = sub i64 %.0303738, %.0313639
  %diff.check = icmp ult i64 %18, 32
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %vec.epilog.scalar.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check40 = icmp ult i64 %.03235, 32
  br i1 %min.iters.check40, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %spec.select, 96
  %19 = getelementptr inbounds i8, ptr %.03136, i64 16
  %wide.load = load <16 x i8>, ptr %.03136, align 1, !tbaa !9
  %wide.load41 = load <16 x i8>, ptr %19, align 1, !tbaa !9
  %wide.load42 = load <16 x i8>, ptr %7, align 16, !tbaa !9
  %wide.load43 = load <16 x i8>, ptr %15, align 16, !tbaa !9
  %20 = xor <16 x i8> %wide.load42, %wide.load
  %21 = xor <16 x i8> %wide.load43, %wide.load41
  %22 = getelementptr inbounds i8, ptr %.03037, i64 16
  store <16 x i8> %20, ptr %.03037, align 1, !tbaa !9
  store <16 x i8> %21, ptr %22, align 1, !tbaa !9
  %23 = icmp eq i64 %n.vec, 32
  br i1 %23, label %middle.block, label %vector.body.1, !llvm.loop !10

vector.body.1:                                    ; preds = %vector.ph
  %24 = getelementptr inbounds i8, ptr %.03136, i64 32
  %25 = getelementptr inbounds i8, ptr %.03136, i64 48
  %wide.load.1 = load <16 x i8>, ptr %24, align 1, !tbaa !9
  %wide.load41.1 = load <16 x i8>, ptr %25, align 1, !tbaa !9
  %wide.load42.1 = load <16 x i8>, ptr %16, align 16, !tbaa !9
  %wide.load43.1 = load <16 x i8>, ptr %17, align 16, !tbaa !9
  %26 = xor <16 x i8> %wide.load42.1, %wide.load.1
  %27 = xor <16 x i8> %wide.load43.1, %wide.load41.1
  %28 = getelementptr inbounds i8, ptr %.03037, i64 32
  %29 = getelementptr inbounds i8, ptr %.03037, i64 48
  store <16 x i8> %26, ptr %28, align 1, !tbaa !9
  store <16 x i8> %27, ptr %29, align 1, !tbaa !9
  br label %middle.block

middle.block:                                     ; preds = %vector.body.1, %vector.ph
  %cmp.n = icmp eq i64 %spec.select, %n.vec
  br i1 %cmp.n, label %.loopexit, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %n.vec.remaining = and i64 %spec.select, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %vec.epilog.scalar.ph.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec45 = and i64 %spec.select, 120
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index46 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next49, %vec.epilog.vector.body ]
  %30 = getelementptr inbounds i8, ptr %.03136, i64 %index46
  %wide.load47 = load <8 x i8>, ptr %30, align 1, !tbaa !9
  %31 = getelementptr inbounds [64 x i8], ptr %7, i64 0, i64 %index46
  %wide.load48 = load <8 x i8>, ptr %31, align 8, !tbaa !9
  %32 = xor <8 x i8> %wide.load48, %wide.load47
  %33 = getelementptr inbounds i8, ptr %.03037, i64 %index46
  store <8 x i8> %32, ptr %33, align 1, !tbaa !9
  %index.next49 = add nuw i64 %index46, 8
  %34 = icmp eq i64 %index.next49, %n.vec45
  br i1 %34, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !14

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n50 = icmp eq i64 %spec.select, %n.vec45
  br i1 %cmp.n50, label %.loopexit, label %vec.epilog.scalar.ph.preheader

vec.epilog.scalar.ph.preheader:                   ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %.033.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec45, %vec.epilog.middle.block ]
  %xtraiter = and i64 %spec.select, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %vec.epilog.scalar.ph.prol.loopexit, label %vec.epilog.scalar.ph.prol

vec.epilog.scalar.ph.prol:                        ; preds = %vec.epilog.scalar.ph.preheader, %vec.epilog.scalar.ph.prol
  %.033.prol = phi i64 [ %41, %vec.epilog.scalar.ph.prol ], [ %.033.ph, %vec.epilog.scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %vec.epilog.scalar.ph.prol ], [ 0, %vec.epilog.scalar.ph.preheader ]
  %35 = getelementptr inbounds i8, ptr %.03136, i64 %.033.prol
  %36 = load i8, ptr %35, align 1, !tbaa !9
  %37 = getelementptr inbounds [64 x i8], ptr %7, i64 0, i64 %.033.prol
  %38 = load i8, ptr %37, align 1, !tbaa !9
  %39 = xor i8 %38, %36
  %40 = getelementptr inbounds i8, ptr %.03037, i64 %.033.prol
  store i8 %39, ptr %40, align 1, !tbaa !9
  %41 = add nuw nsw i64 %.033.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %vec.epilog.scalar.ph.prol.loopexit, label %vec.epilog.scalar.ph.prol, !llvm.loop !15

vec.epilog.scalar.ph.prol.loopexit:               ; preds = %vec.epilog.scalar.ph.prol, %vec.epilog.scalar.ph.preheader
  %.033.unr = phi i64 [ %.033.ph, %vec.epilog.scalar.ph.preheader ], [ %41, %vec.epilog.scalar.ph.prol ]
  %42 = sub nsw i64 %.033.ph, %spec.select
  %43 = icmp ugt i64 %42, -4
  br i1 %43, label %.loopexit, label %vec.epilog.scalar.ph

vec.epilog.scalar.ph:                             ; preds = %vec.epilog.scalar.ph.prol.loopexit, %vec.epilog.scalar.ph
  %.033 = phi i64 [ %71, %vec.epilog.scalar.ph ], [ %.033.unr, %vec.epilog.scalar.ph.prol.loopexit ]
  %44 = getelementptr inbounds i8, ptr %.03136, i64 %.033
  %45 = load i8, ptr %44, align 1, !tbaa !9
  %46 = getelementptr inbounds [64 x i8], ptr %7, i64 0, i64 %.033
  %47 = load i8, ptr %46, align 1, !tbaa !9
  %48 = xor i8 %47, %45
  %49 = getelementptr inbounds i8, ptr %.03037, i64 %.033
  store i8 %48, ptr %49, align 1, !tbaa !9
  %50 = add nuw nsw i64 %.033, 1
  %51 = getelementptr inbounds i8, ptr %.03136, i64 %50
  %52 = load i8, ptr %51, align 1, !tbaa !9
  %53 = getelementptr inbounds [64 x i8], ptr %7, i64 0, i64 %50
  %54 = load i8, ptr %53, align 1, !tbaa !9
  %55 = xor i8 %54, %52
  %56 = getelementptr inbounds i8, ptr %.03037, i64 %50
  store i8 %55, ptr %56, align 1, !tbaa !9
  %57 = add nuw nsw i64 %.033, 2
  %58 = getelementptr inbounds i8, ptr %.03136, i64 %57
  %59 = load i8, ptr %58, align 1, !tbaa !9
  %60 = getelementptr inbounds [64 x i8], ptr %7, i64 0, i64 %57
  %61 = load i8, ptr %60, align 1, !tbaa !9
  %62 = xor i8 %61, %59
  %63 = getelementptr inbounds i8, ptr %.03037, i64 %57
  store i8 %62, ptr %63, align 1, !tbaa !9
  %64 = add nuw nsw i64 %.033, 3
  %65 = getelementptr inbounds i8, ptr %.03136, i64 %64
  %66 = load i8, ptr %65, align 1, !tbaa !9
  %67 = getelementptr inbounds [64 x i8], ptr %7, i64 0, i64 %64
  %68 = load i8, ptr %67, align 1, !tbaa !9
  %69 = xor i8 %68, %66
  %70 = getelementptr inbounds i8, ptr %.03037, i64 %64
  store i8 %69, ptr %70, align 1, !tbaa !9
  %71 = add nuw nsw i64 %.033, 4
  %exitcond.not.3 = icmp eq i64 %71, %spec.select
  br i1 %exitcond.not.3, label %.loopexit, label %vec.epilog.scalar.ph, !llvm.loop !17

.loopexit:                                        ; preds = %vec.epilog.scalar.ph.prol.loopexit, %vec.epilog.scalar.ph, %vec.epilog.middle.block, %middle.block
  %72 = getelementptr inbounds i8, ptr %.03037, i64 %spec.select
  %73 = getelementptr inbounds i8, ptr %.03136, i64 %spec.select
  %74 = sub i64 %.03235, %spec.select
  %75 = load i32, ptr %13, align 16, !tbaa !5
  %76 = add i32 %75, 1
  store i32 %76, ptr %13, align 16, !tbaa !5
  %.not = icmp eq i64 %74, 0
  br i1 %.not, label %._crit_edge, label %iter.check, !llvm.loop !18

._crit_edge:                                      ; preds = %.loopexit, %5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #3
  ret void
}

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

; Function Attrs: nounwind uwtable
declare hidden void @chacha20_core(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11, !12, !13}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !11, !12, !13}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.unroll.disable"}
!17 = distinct !{!17, !11, !12}
!18 = distinct !{!18, !11}


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