; LLVM IR from rweather/lightweight-crypto :: src/combined (knot-hash)

; 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.knot384_state_t = type { [6 x i64] }

; Function Attrs: nounwind uwtable
define dso_local i32 @knot_hash_256_384(ptr noundef %0, ptr noundef %1, i64 noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca %union.knot384_state_t, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i64 %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 48, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %15 = getelementptr inbounds [48 x i8], ptr %7, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 48, i1 false)
  %16 = getelementptr inbounds [48 x i8], ptr %7, i64 0, i64 47
  %17 = load i8, ptr %16, align 1, !tbaa !11
  %18 = zext i8 %17 to i32
  %19 = xor i32 %18, 128
  %20 = trunc i32 %19 to i8
  store i8 %20, ptr %16, align 1, !tbaa !11
  br label %21

21:                                               ; preds = %46, %3
  %22 = load i64, ptr %6, align 8, !tbaa !9
  %23 = icmp uge i64 %22, 16
  br i1 %23, label %24, label %51

24:                                               ; preds = %21
  br label %25

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %26 = getelementptr inbounds [48 x i8], ptr %7, i64 0, i64 0
  store ptr %26, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %27, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 16, ptr %11, align 4, !tbaa !12
  br label %28

28:                                               ; preds = %31, %25
  %29 = load i32, ptr %11, align 4, !tbaa !12
  %30 = icmp ugt i32 %29, 0
  br i1 %30, label %31, label %44

31:                                               ; preds = %28
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %32, i32 1
  store ptr %33, ptr %10, align 8, !tbaa !5
  %34 = load i8, ptr %32, align 1, !tbaa !11
  %35 = zext i8 %34 to i32
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i32 1
  store ptr %37, ptr %9, align 8, !tbaa !5
  %38 = load i8, ptr %36, align 1, !tbaa !11
  %39 = zext i8 %38 to i32
  %40 = xor i32 %39, %35
  %41 = trunc i32 %40 to i8
  store i8 %41, ptr %36, align 1, !tbaa !11
  %42 = load i32, ptr %11, align 4, !tbaa !12
  %43 = add i32 %42, -1
  store i32 %43, ptr %11, align 4, !tbaa !12
  br label %28, !llvm.loop !14

44:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %45

45:                                               ; preds = %44
  br label %46

46:                                               ; preds = %45
  call void @knot384_permute_7(ptr noundef %7, i8 noundef zeroext 80)
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %47, i64 16
  store ptr %48, ptr %5, align 8, !tbaa !5
  %49 = load i64, ptr %6, align 8, !tbaa !9
  %50 = sub i64 %49, 16
  store i64 %50, ptr %6, align 8, !tbaa !9
  br label %21, !llvm.loop !16

51:                                               ; preds = %21
  %52 = load i64, ptr %6, align 8, !tbaa !9
  %53 = trunc i64 %52 to i32
  store i32 %53, ptr %8, align 4, !tbaa !12
  br label %54

54:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %55 = getelementptr inbounds [48 x i8], ptr %7, i64 0, i64 0
  store ptr %55, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %56, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %57 = load i32, ptr %8, align 4, !tbaa !12
  store i32 %57, ptr %14, align 4, !tbaa !12
  br label %58

58:                                               ; preds = %61, %54
  %59 = load i32, ptr %14, align 4, !tbaa !12
  %60 = icmp ugt i32 %59, 0
  br i1 %60, label %61, label %74

61:                                               ; preds = %58
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %62, i32 1
  store ptr %63, ptr %13, align 8, !tbaa !5
  %64 = load i8, ptr %62, align 1, !tbaa !11
  %65 = zext i8 %64 to i32
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = getelementptr inbounds i8, ptr %66, i32 1
  store ptr %67, ptr %12, align 8, !tbaa !5
  %68 = load i8, ptr %66, align 1, !tbaa !11
  %69 = zext i8 %68 to i32
  %70 = xor i32 %69, %65
  %71 = trunc i32 %70 to i8
  store i8 %71, ptr %66, align 1, !tbaa !11
  %72 = load i32, ptr %14, align 4, !tbaa !12
  %73 = add i32 %72, -1
  store i32 %73, ptr %14, align 4, !tbaa !12
  br label %58, !llvm.loop !17

74:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %75

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %8, align 4, !tbaa !12
  %78 = zext i32 %77 to i64
  %79 = getelementptr inbounds [48 x i8], ptr %7, i64 0, i64 %78
  %80 = load i8, ptr %79, align 1, !tbaa !11
  %81 = zext i8 %80 to i32
  %82 = xor i32 %81, 1
  %83 = trunc i32 %82 to i8
  store i8 %83, ptr %79, align 1, !tbaa !11
  call void @knot384_permute_7(ptr noundef %7, i8 noundef zeroext 80)
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds [48 x i8], ptr %7, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %84, ptr align 8 %85, i64 16, i1 false)
  call void @knot384_permute_7(ptr noundef %7, i8 noundef zeroext 80)
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds i8, ptr %86, i64 16
  %88 = getelementptr inbounds [48 x i8], ptr %7, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %87, ptr align 8 %88, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #5
  ret i32 0
}

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

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

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

declare void @knot384_permute_7(ptr noundef, i8 noundef zeroext) #4

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 nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !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.knot384_state_t = type { [6 x i64] }

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @knot_hash_256_384(ptr nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, i64 noundef %2) local_unnamed_addr #0 {
  %4 = alloca %union.knot384_state_t, align 16
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %4, i8 0, i64 48, i1 false)
  %5 = getelementptr inbounds i8, ptr %4, i64 47
  store i8 -128, ptr %5, align 1, !tbaa !5
  %6 = icmp ugt i64 %2, 15
  br i1 %6, label %.preheader, label %._crit_edge

.preheader:                                       ; preds = %3, %.preheader
  %.02229 = phi ptr [ %10, %.preheader ], [ %1, %3 ]
  %.02328 = phi i64 [ %11, %.preheader ], [ %2, %3 ]
  %7 = load <16 x i8>, ptr %.02229, align 1, !tbaa !5
  %8 = load <16 x i8>, ptr %4, align 16, !tbaa !5
  %9 = xor <16 x i8> %8, %7
  store <16 x i8> %9, ptr %4, align 16, !tbaa !5
  call void @knot384_permute_7(ptr noundef nonnull %4, i8 noundef zeroext 80) #5
  %10 = getelementptr inbounds i8, ptr %.02229, i64 16
  %11 = add i64 %.02328, -16
  %12 = icmp ugt i64 %11, 15
  br i1 %12, label %.preheader, label %._crit_edge, !llvm.loop !8

._crit_edge:                                      ; preds = %.preheader, %3
  %.023.lcssa = phi i64 [ %2, %3 ], [ %11, %.preheader ]
  %.022.lcssa = phi ptr [ %1, %3 ], [ %10, %.preheader ]
  %.not31 = icmp eq i64 %.023.lcssa, 0
  br i1 %.not31, label %._crit_edge36, label %iter.check

iter.check:                                       ; preds = %._crit_edge
  %13 = trunc nuw i64 %.023.lcssa to i32
  %14 = add nuw nsw i64 %.023.lcssa, 4294967295
  %15 = and i64 %14, 4294967295
  %16 = add nuw nsw i64 %15, 1
  %min.iters.check = icmp ult i64 %15, 7
  br i1 %min.iters.check, label %.lr.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %iter.check
  %17 = add nuw nsw i64 %.023.lcssa, 4294967295
  %18 = and i64 %17, 4294967295
  %19 = add nuw nsw i64 %18, 1
  %scevgep = getelementptr i8, ptr %4, i64 %19
  %scevgep40 = getelementptr i8, ptr %.022.lcssa, i64 %19
  %bound0 = icmp ult ptr %4, %scevgep40
  %bound1 = icmp ult ptr %.022.lcssa, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %vector.memcheck
  %min.iters.check41 = icmp ult i64 %15, 31
  br i1 %min.iters.check41, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %16, 8589934560
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %next.gep = getelementptr i8, ptr %.022.lcssa, i64 %index
  %next.gep43 = getelementptr i8, ptr %4, i64 %index
  %20 = getelementptr i8, ptr %next.gep, i64 16
  %wide.load = load <16 x i8>, ptr %next.gep, align 1, !tbaa !5, !alias.scope !10
  %wide.load45 = load <16 x i8>, ptr %20, align 1, !tbaa !5, !alias.scope !10
  %21 = getelementptr i8, ptr %next.gep43, i64 16
  %wide.load46 = load <16 x i8>, ptr %next.gep43, align 16, !tbaa !5, !alias.scope !13, !noalias !10
  %wide.load47 = load <16 x i8>, ptr %21, align 16, !tbaa !5, !alias.scope !13, !noalias !10
  %22 = xor <16 x i8> %wide.load46, %wide.load
  %23 = xor <16 x i8> %wide.load47, %wide.load45
  store <16 x i8> %22, ptr %next.gep43, align 16, !tbaa !5, !alias.scope !13, !noalias !10
  store <16 x i8> %23, ptr %21, align 16, !tbaa !5, !alias.scope !13, !noalias !10
  %index.next = add nuw i64 %index, 32
  %24 = icmp eq i64 %index.next, %n.vec
  br i1 %24, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %16, %n.vec
  br i1 %cmp.n, label %._crit_edge36, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %ind.end56 = getelementptr i8, ptr %4, i64 %n.vec
  %ind.end53 = getelementptr i8, ptr %.022.lcssa, i64 %n.vec
  %.cast50 = trunc i64 %n.vec to i32
  %ind.end51 = sub i32 %13, %.cast50
  %n.vec.remaining = and i64 %16, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %.lr.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.vec49 = and i64 %16, 8589934584
  %.cast = trunc i64 %n.vec49 to i32
  %ind.end = sub i32 %13, %.cast
  %ind.end52 = getelementptr i8, ptr %.022.lcssa, i64 %n.vec49
  %ind.end55 = getelementptr i8, ptr %4, i64 %n.vec49
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index58 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next63, %vec.epilog.vector.body ]
  %next.gep59 = getelementptr i8, ptr %.022.lcssa, i64 %index58
  %next.gep60 = getelementptr i8, ptr %4, i64 %index58
  %wide.load61 = load <8 x i8>, ptr %next.gep59, align 1, !tbaa !5, !alias.scope !18
  %wide.load62 = load <8 x i8>, ptr %next.gep60, align 8, !tbaa !5, !alias.scope !21, !noalias !18
  %25 = xor <8 x i8> %wide.load62, %wide.load61
  store <8 x i8> %25, ptr %next.gep60, align 8, !tbaa !5, !alias.scope !21, !noalias !18
  %index.next63 = add nuw i64 %index58, 8
  %26 = icmp eq i64 %index.next63, %n.vec49
  br i1 %26, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !23

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n64 = icmp eq i64 %16, %n.vec49
  br i1 %cmp.n64, label %._crit_edge36, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %vec.epilog.middle.block, %vector.memcheck, %iter.check, %vec.epilog.iter.check
  %.034.ph = phi i32 [ %13, %iter.check ], [ %13, %vector.memcheck ], [ %ind.end51, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
  %.01733.ph = phi ptr [ %.022.lcssa, %iter.check ], [ %.022.lcssa, %vector.memcheck ], [ %ind.end53, %vec.epilog.iter.check ], [ %ind.end52, %vec.epilog.middle.block ]
  %.01832.ph = phi ptr [ %4, %iter.check ], [ %4, %vector.memcheck ], [ %ind.end56, %vec.epilog.iter.check ], [ %ind.end55, %vec.epilog.middle.block ]
  %27 = add nsw i32 %.034.ph, -1
  %xtraiter = and i32 %.034.ph, 3
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader, %.lr.ph.prol
  %.034.prol = phi i32 [ %33, %.lr.ph.prol ], [ %.034.ph, %.lr.ph.preheader ]
  %.01733.prol = phi ptr [ %28, %.lr.ph.prol ], [ %.01733.ph, %.lr.ph.preheader ]
  %.01832.prol = phi ptr [ %30, %.lr.ph.prol ], [ %.01832.ph, %.lr.ph.preheader ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader ]
  %28 = getelementptr inbounds i8, ptr %.01733.prol, i64 1
  %29 = load i8, ptr %.01733.prol, align 1, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %.01832.prol, i64 1
  %31 = load i8, ptr %.01832.prol, align 1, !tbaa !5
  %32 = xor i8 %31, %29
  store i8 %32, ptr %.01832.prol, align 1, !tbaa !5
  %33 = add nsw i32 %.034.prol, -1
  %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 !24

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %.034.unr = phi i32 [ %.034.ph, %.lr.ph.preheader ], [ %33, %.lr.ph.prol ]
  %.01733.unr = phi ptr [ %.01733.ph, %.lr.ph.preheader ], [ %28, %.lr.ph.prol ]
  %.01832.unr = phi ptr [ %.01832.ph, %.lr.ph.preheader ], [ %30, %.lr.ph.prol ]
  %34 = icmp ult i32 %27, 3
  br i1 %34, label %._crit_edge36, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.034 = phi i32 [ %55, %.lr.ph ], [ %.034.unr, %.lr.ph.prol.loopexit ]
  %.01733 = phi ptr [ %50, %.lr.ph ], [ %.01733.unr, %.lr.ph.prol.loopexit ]
  %.01832 = phi ptr [ %52, %.lr.ph ], [ %.01832.unr, %.lr.ph.prol.loopexit ]
  %35 = getelementptr inbounds i8, ptr %.01733, i64 1
  %36 = load i8, ptr %.01733, align 1, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %.01832, i64 1
  %38 = load i8, ptr %.01832, align 1, !tbaa !5
  %39 = xor i8 %38, %36
  store i8 %39, ptr %.01832, align 1, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %.01733, i64 2
  %41 = load i8, ptr %35, align 1, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %.01832, i64 2
  %43 = load i8, ptr %37, align 1, !tbaa !5
  %44 = xor i8 %43, %41
  store i8 %44, ptr %37, align 1, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %.01733, i64 3
  %46 = load i8, ptr %40, align 1, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %.01832, i64 3
  %48 = load i8, ptr %42, align 1, !tbaa !5
  %49 = xor i8 %48, %46
  store i8 %49, ptr %42, align 1, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %.01733, i64 4
  %51 = load i8, ptr %45, align 1, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %.01832, i64 4
  %53 = load i8, ptr %47, align 1, !tbaa !5
  %54 = xor i8 %53, %51
  store i8 %54, ptr %47, align 1, !tbaa !5
  %55 = add nsw i32 %.034, -4
  %.not.3 = icmp eq i32 %55, 0
  br i1 %.not.3, label %._crit_edge36, label %.lr.ph, !llvm.loop !26

._crit_edge36:                                    ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %vec.epilog.middle.block, %._crit_edge
  %56 = getelementptr inbounds [48 x i8], ptr %4, i64 0, i64 %.023.lcssa
  %57 = load i8, ptr %56, align 1, !tbaa !5
  %58 = xor i8 %57, 1
  store i8 %58, ptr %56, align 1, !tbaa !5
  call void @knot384_permute_7(ptr noundef nonnull %4, i8 noundef zeroext 80) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %0, ptr noundef nonnull align 16 dereferenceable(16) %4, i64 16, i1 false)
  call void @knot384_permute_7(ptr noundef nonnull %4, i8 noundef zeroext 80) #5
  %59 = getelementptr inbounds i8, ptr %0, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %59, ptr noundef nonnull align 16 dereferenceable(16) %4, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  ret i32 0
}

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

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

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

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

declare void @knot384_permute_7(ptr noundef, i8 noundef zeroext) local_unnamed_addr #4

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "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 #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 = !{!11}
!11 = distinct !{!11, !12}
!12 = distinct !{!12, !"LVerDomain"}
!13 = !{!14}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !9, !16, !17}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = !{!19}
!19 = distinct !{!19, !20}
!20 = distinct !{!20, !"LVerDomain"}
!21 = !{!22}
!22 = distinct !{!22, !20}
!23 = distinct !{!23, !9, !16, !17}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.unroll.disable"}
!26 = distinct !{!26, !9, !16}


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