; LLVM IR from square/subzero :: core/external-crypto/aes (modetest)

; 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.aes_crypt_ctx = type { [60 x i32], %union.aes_inf, [12 x i8] }
%union.aes_inf = type { i32 }

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

declare i32 @aes_encrypt(ptr noundef, ptr noundef, ptr noundef) #1

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local void @CFBdec(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [16 x i8], align 16
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = 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
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, 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 4, ptr %12) #4
  %13 = load ptr, ptr %8, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.aes_crypt_ctx, ptr %13, i32 0, i32 1
  %15 = getelementptr inbounds [4 x i8], ptr %14, i64 0, i64 2
  %16 = load i8, ptr %15, align 2, !tbaa !11
  %17 = zext i8 %16 to i32
  store i32 %17, ptr %12, align 4, !tbaa !9
  %18 = load i32, ptr %12, align 4, !tbaa !9
  %19 = icmp ne i32 %18, 0
  br i1 %19, label %20, label %75

20:                                               ; preds = %4
  %21 = load i32, ptr %12, align 4, !tbaa !9
  %22 = sub nsw i32 16, %21
  store i32 %22, ptr %11, align 4, !tbaa !9
  %23 = load i32, ptr %6, align 4, !tbaa !9
  %24 = load i32, ptr %11, align 4, !tbaa !9
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %26, label %28

26:                                               ; preds = %20
  %27 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %27, ptr %11, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %26, %20
  %29 = getelementptr inbounds [16 x i8], ptr %9, i64 0, i64 0
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = load i32, ptr %11, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %29, ptr align 1 %30, i64 %32, i1 false)
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %54, %28
  %34 = load i32, ptr %10, align 4, !tbaa !9
  %35 = load i32, ptr %11, align 4, !tbaa !9
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %37, label %57

37:                                               ; preds = %33
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = load i32, ptr %10, align 4, !tbaa !9
  %40 = load i32, ptr %12, align 4, !tbaa !9
  %41 = add nsw i32 %39, %40
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds i8, ptr %38, i64 %42
  %44 = load i8, ptr %43, align 1, !tbaa !11
  %45 = zext i8 %44 to i32
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = load i32, ptr %10, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds i8, ptr %46, i64 %48
  %50 = load i8, ptr %49, align 1, !tbaa !11
  %51 = zext i8 %50 to i32
  %52 = xor i32 %51, %45
  %53 = trunc i32 %52 to i8
  store i8 %53, ptr %49, align 1, !tbaa !11
  br label %54

54:                                               ; preds = %37
  %55 = load i32, ptr %10, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %10, align 4, !tbaa !9
  br label %33, !llvm.loop !12

57:                                               ; preds = %33
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds i8, ptr %58, i64 %60
  %62 = getelementptr inbounds [16 x i8], ptr %9, i64 0, i64 0
  %63 = load i32, ptr %11, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %61, ptr align 16 %62, i64 %64, i1 false)
  %65 = load i32, ptr %11, align 4, !tbaa !9
  %66 = load i32, ptr %6, align 4, !tbaa !9
  %67 = sub nsw i32 %66, %65
  store i32 %67, ptr %6, align 4, !tbaa !9
  %68 = load i32, ptr %11, align 4, !tbaa !9
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = sext i32 %68 to i64
  %71 = getelementptr inbounds i8, ptr %69, i64 %70
  store ptr %71, ptr %5, align 8, !tbaa !5
  %72 = load i32, ptr %11, align 4, !tbaa !9
  %73 = load i32, ptr %12, align 4, !tbaa !9
  %74 = add nsw i32 %73, %72
  store i32 %74, ptr %12, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %57, %4
  br label %76

76:                                               ; preds = %117, %75
  %77 = load i32, ptr %6, align 4, !tbaa !9
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %129

79:                                               ; preds = %76
  %80 = load i32, ptr %6, align 4, !tbaa !9
  %81 = icmp sgt i32 %80, 16
  br i1 %81, label %82, label %83

82:                                               ; preds = %79
  br label %85

83:                                               ; preds = %79
  %84 = load i32, ptr %6, align 4, !tbaa !9
  br label %85

85:                                               ; preds = %83, %82
  %86 = phi i32 [ 16, %82 ], [ %84, %83 ]
  store i32 %86, ptr %12, align 4, !tbaa !9
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = call i32 @aes_encrypt(ptr noundef %87, ptr noundef %88, ptr noundef %89)
  %91 = getelementptr inbounds [16 x i8], ptr %9, i64 0, i64 0
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = load i32, ptr %12, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %91, ptr align 1 %92, i64 %94, i1 false)
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %95

95:                                               ; preds = %114, %85
  %96 = load i32, ptr %10, align 4, !tbaa !9
  %97 = load i32, ptr %12, align 4, !tbaa !9
  %98 = icmp slt i32 %96, %97
  br i1 %98, label %99, label %117

99:                                               ; preds = %95
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = load i32, ptr %10, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds i8, ptr %100, i64 %102
  %104 = load i8, ptr %103, align 1, !tbaa !11
  %105 = zext i8 %104 to i32
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = load i32, ptr %10, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i8, ptr %106, i64 %108
  %110 = load i8, ptr %109, align 1, !tbaa !11
  %111 = zext i8 %110 to i32
  %112 = xor i32 %111, %105
  %113 = trunc i32 %112 to i8
  store i8 %113, ptr %109, align 1, !tbaa !11
  br label %114

114:                                              ; preds = %99
  %115 = load i32, ptr %10, align 4, !tbaa !9
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %10, align 4, !tbaa !9
  br label %95, !llvm.loop !14

117:                                              ; preds = %95
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = getelementptr inbounds [16 x i8], ptr %9, i64 0, i64 0
  %120 = load i32, ptr %12, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %118, ptr align 16 %119, i64 %121, i1 false)
  %122 = load i32, ptr %12, align 4, !tbaa !9
  %123 = load i32, ptr %6, align 4, !tbaa !9
  %124 = sub nsw i32 %123, %122
  store i32 %124, ptr %6, align 4, !tbaa !9
  %125 = load i32, ptr %12, align 4, !tbaa !9
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = sext i32 %125 to i64
  %128 = getelementptr inbounds i8, ptr %126, i64 %127
  store ptr %128, ptr %5, align 8, !tbaa !5
  br label %76, !llvm.loop !15

129:                                              ; preds = %76
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = srem i32 %130, 16
  %132 = trunc i32 %131 to i8
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.aes_crypt_ctx, ptr %133, i32 0, i32 1
  %135 = getelementptr inbounds [4 x i8], ptr %134, i64 0, i64 2
  store i8 %132, ptr %135, align 2, !tbaa !11
  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 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}


; 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare i32 @aes_encrypt(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local void @CFBdec(ptr nocapture noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #3 {
  %5 = alloca [16 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5)
  %6 = getelementptr inbounds i8, ptr %3, i64 242
  %7 = load i8, ptr %6, align 2, !tbaa !5
  %8 = zext i8 %7 to i32
  %.not = icmp eq i8 %7, 0
  br i1 %.not, label %40, label %9

9:                                                ; preds = %4
  %10 = sub nsw i32 16, %8
  %spec.select = tail call i32 @llvm.smin.i32(i32 %10, i32 %1)
  %11 = sext i32 %spec.select to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %5, ptr align 1 %0, i64 %11, i1 false)
  %12 = icmp sgt i32 %spec.select, 0
  br i1 %12, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %9
  %13 = zext i8 %7 to i64
  %wide.trip.count = zext nneg i32 %spec.select to i64
  %invariant.gep = getelementptr inbounds i8, ptr %2, i64 %13
  %xtraiter = and i64 %wide.trip.count, 3
  %14 = icmp ult i32 %spec.select, 4
  br i1 %14, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %gep = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv
  %15 = load i8, ptr %gep, align 1, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv
  %17 = load i8, ptr %16, align 1, !tbaa !5
  %18 = xor i8 %17, %15
  store i8 %18, ptr %16, align 1, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %gep.1 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.next
  %19 = load i8, ptr %gep.1, align 1, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv.next
  %21 = load i8, ptr %20, align 1, !tbaa !5
  %22 = xor i8 %21, %19
  store i8 %22, ptr %20, align 1, !tbaa !5
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %gep.2 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.next.1
  %23 = load i8, ptr %gep.2, align 1, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv.next.1
  %25 = load i8, ptr %24, align 1, !tbaa !5
  %26 = xor i8 %25, %23
  store i8 %26, ptr %24, align 1, !tbaa !5
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %gep.3 = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.next.2
  %27 = load i8, ptr %gep.3, align 1, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv.next.2
  %29 = load i8, ptr %28, align 1, !tbaa !5
  %30 = xor i8 %29, %27
  store i8 %30, ptr %28, align 1, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !8

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %gep.epil = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv.epil
  %31 = load i8, ptr %gep.epil, align 1, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv.epil
  %33 = load i8, ptr %32, align 1, !tbaa !5
  %34 = xor i8 %33, %31
  store i8 %34, ptr %32, align 1, !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !10

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %9
  %35 = zext i8 %7 to i64
  %36 = getelementptr inbounds i8, ptr %2, i64 %35
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %36, ptr nonnull align 16 %5, i64 %11, i1 false)
  %37 = sub nsw i32 %1, %spec.select
  %38 = getelementptr inbounds i8, ptr %0, i64 %11
  %39 = add nsw i32 %spec.select, %8
  br label %40

40:                                               ; preds = %._crit_edge, %4
  %.052 = phi i32 [ %37, %._crit_edge ], [ %1, %4 ]
  %.050 = phi ptr [ %38, %._crit_edge ], [ %0, %4 ]
  %.0 = phi i32 [ %39, %._crit_edge ], [ 0, %4 ]
  %.not5965 = icmp eq i32 %.052, 0
  br i1 %.not5965, label %._crit_edge70, label %.lr.ph69

.lr.ph69:                                         ; preds = %40, %._crit_edge64
  %.15167 = phi ptr [ %78, %._crit_edge64 ], [ %.050, %40 ]
  %.15366 = phi i32 [ %77, %._crit_edge64 ], [ %.052, %40 ]
  %41 = tail call i32 @llvm.smin.i32(i32 %.15366, i32 16)
  %42 = tail call i32 @aes_encrypt(ptr noundef %2, ptr noundef %2, ptr noundef %3) #5
  %43 = sext i32 %41 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %5, ptr noundef nonnull align 1 dereferenceable(1) %.15167, i64 %43, i1 false)
  %44 = icmp sgt i32 %.15366, 0
  br i1 %44, label %iter.check, label %._crit_edge64

iter.check:                                       ; preds = %.lr.ph69
  %wide.trip.count75 = zext nneg i32 %41 to i64
  %min.iters.check = icmp slt i32 %.15366, 8
  br i1 %min.iters.check, label %.lr.ph63.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %iter.check
  %scevgep = getelementptr i8, ptr %.15167, i64 %wide.trip.count75
  %scevgep77 = getelementptr i8, ptr %2, i64 %wide.trip.count75
  %bound0 = icmp ult ptr %.15167, %scevgep77
  %bound1 = icmp ugt ptr %scevgep, %2
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph63.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %vector.memcheck
  %min.iters.check78 = icmp slt i32 %.15366, 16
  br i1 %min.iters.check78, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %wide.trip.count75, 16
  %wide.load = load <16 x i8>, ptr %2, align 1, !tbaa !5, !alias.scope !12
  %wide.load79 = load <16 x i8>, ptr %.15167, align 1, !tbaa !5, !alias.scope !15, !noalias !12
  %45 = xor <16 x i8> %wide.load79, %wide.load
  store <16 x i8> %45, ptr %.15167, align 1, !tbaa !5, !alias.scope !15, !noalias !12
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count75
  br i1 %cmp.n, label %._crit_edge64, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %vector.ph
  %n.vec.remaining = and i64 %wide.trip.count75, 8
  %min.epilog.iters.check.not.not = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check.not.not, label %.lr.ph63.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.vec81 = and i64 %wide.trip.count75, 24
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index82 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next85, %vec.epilog.vector.body ]
  %46 = getelementptr inbounds i8, ptr %2, i64 %index82
  %wide.load83 = load <8 x i8>, ptr %46, align 1, !tbaa !5, !alias.scope !17
  %47 = getelementptr inbounds i8, ptr %.15167, i64 %index82
  %wide.load84 = load <8 x i8>, ptr %47, align 1, !tbaa !5, !alias.scope !20, !noalias !17
  %48 = xor <8 x i8> %wide.load84, %wide.load83
  store <8 x i8> %48, ptr %47, align 1, !tbaa !5, !alias.scope !20, !noalias !17
  %index.next85 = add nuw i64 %index82, 8
  %49 = icmp eq i64 %index.next85, %n.vec81
  br i1 %49, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !22

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n86 = icmp eq i64 %n.vec81, %wide.trip.count75
  br i1 %cmp.n86, label %._crit_edge64, label %.lr.ph63.preheader

.lr.ph63.preheader:                               ; preds = %vec.epilog.middle.block, %vector.memcheck, %iter.check, %vec.epilog.iter.check
  %indvars.iv72.ph = phi i64 [ 0, %iter.check ], [ 0, %vector.memcheck ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec81, %vec.epilog.middle.block ]
  %xtraiter87 = and i64 %wide.trip.count75, 3
  %lcmp.mod88.not = icmp eq i64 %xtraiter87, 0
  br i1 %lcmp.mod88.not, label %.lr.ph63.prol.loopexit, label %.lr.ph63.prol

.lr.ph63.prol:                                    ; preds = %.lr.ph63.preheader, %.lr.ph63.prol
  %indvars.iv72.prol = phi i64 [ %indvars.iv.next73.prol, %.lr.ph63.prol ], [ %indvars.iv72.ph, %.lr.ph63.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph63.prol ], [ 0, %.lr.ph63.preheader ]
  %50 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv72.prol
  %51 = load i8, ptr %50, align 1, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %.15167, i64 %indvars.iv72.prol
  %53 = load i8, ptr %52, align 1, !tbaa !5
  %54 = xor i8 %53, %51
  store i8 %54, ptr %52, align 1, !tbaa !5
  %indvars.iv.next73.prol = add nuw nsw i64 %indvars.iv72.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter87
  br i1 %prol.iter.cmp.not, label %.lr.ph63.prol.loopexit, label %.lr.ph63.prol, !llvm.loop !25

.lr.ph63.prol.loopexit:                           ; preds = %.lr.ph63.prol, %.lr.ph63.preheader
  %indvars.iv72.unr = phi i64 [ %indvars.iv72.ph, %.lr.ph63.preheader ], [ %indvars.iv.next73.prol, %.lr.ph63.prol ]
  %55 = sub nsw i64 %indvars.iv72.ph, %wide.trip.count75
  %56 = icmp ugt i64 %55, -4
  br i1 %56, label %._crit_edge64, label %.lr.ph63

.lr.ph63:                                         ; preds = %.lr.ph63.prol.loopexit, %.lr.ph63
  %indvars.iv72 = phi i64 [ %indvars.iv.next73.3, %.lr.ph63 ], [ %indvars.iv72.unr, %.lr.ph63.prol.loopexit ]
  %57 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv72
  %58 = load i8, ptr %57, align 1, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %.15167, i64 %indvars.iv72
  %60 = load i8, ptr %59, align 1, !tbaa !5
  %61 = xor i8 %60, %58
  store i8 %61, ptr %59, align 1, !tbaa !5
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %62 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next73
  %63 = load i8, ptr %62, align 1, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %.15167, i64 %indvars.iv.next73
  %65 = load i8, ptr %64, align 1, !tbaa !5
  %66 = xor i8 %65, %63
  store i8 %66, ptr %64, align 1, !tbaa !5
  %indvars.iv.next73.1 = add nuw nsw i64 %indvars.iv72, 2
  %67 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next73.1
  %68 = load i8, ptr %67, align 1, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %.15167, i64 %indvars.iv.next73.1
  %70 = load i8, ptr %69, align 1, !tbaa !5
  %71 = xor i8 %70, %68
  store i8 %71, ptr %69, align 1, !tbaa !5
  %indvars.iv.next73.2 = add nuw nsw i64 %indvars.iv72, 3
  %72 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next73.2
  %73 = load i8, ptr %72, align 1, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %.15167, i64 %indvars.iv.next73.2
  %75 = load i8, ptr %74, align 1, !tbaa !5
  %76 = xor i8 %75, %73
  store i8 %76, ptr %74, align 1, !tbaa !5
  %indvars.iv.next73.3 = add nuw nsw i64 %indvars.iv72, 4
  %exitcond76.not.3 = icmp eq i64 %indvars.iv.next73.3, %wide.trip.count75
  br i1 %exitcond76.not.3, label %._crit_edge64, label %.lr.ph63, !llvm.loop !26

._crit_edge64:                                    ; preds = %.lr.ph63.prol.loopexit, %.lr.ph63, %vector.ph, %vec.epilog.middle.block, %.lr.ph69
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %2, ptr noundef nonnull align 16 dereferenceable(1) %5, i64 %43, i1 false)
  %77 = sub nsw i32 %.15366, %41
  %78 = getelementptr inbounds i8, ptr %.15167, i64 %43
  %.not59 = icmp eq i32 %77, 0
  br i1 %.not59, label %._crit_edge70, label %.lr.ph69, !llvm.loop !27

._crit_edge70:                                    ; preds = %._crit_edge64, %40
  %.1.lcssa = phi i32 [ %.0, %40 ], [ %41, %._crit_edge64 ]
  %79 = srem i32 %.1.lcssa, 16
  %80 = trunc nsw i32 %79 to i8
  store i8 %80, ptr %6, align 2, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5)
  ret void
}

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

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


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