; LLVM IR from rweather/lightweight-crypto :: src/combined (skinny-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"

; Function Attrs: nounwind uwtable
define dso_local i32 @skinny_tk2_hash(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 [32 x i8], align 16
  %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 32, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %15 = getelementptr inbounds [32 x i8], ptr %7, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %15, i8 0, i64 32, i1 false)
  %16 = getelementptr inbounds [32 x i8], ptr %7, i64 0, i64 4
  store i8 -128, ptr %16, align 4, !tbaa !11
  br label %17

17:                                               ; preds = %42, %3
  %18 = load i64, ptr %6, align 8, !tbaa !9
  %19 = icmp uge i64 %18, 4
  br i1 %19, label %20, label %48

20:                                               ; preds = %17
  br label %21

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %22 = getelementptr inbounds [32 x i8], ptr %7, i64 0, i64 0
  store ptr %22, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %23, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 4, ptr %11, align 4, !tbaa !12
  br label %24

24:                                               ; preds = %27, %21
  %25 = load i32, ptr %11, align 4, !tbaa !12
  %26 = icmp ugt i32 %25, 0
  br i1 %26, label %27, label %40

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

40:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %41

41:                                               ; preds = %40
  br label %42

42:                                               ; preds = %41
  %43 = getelementptr inbounds [32 x i8], ptr %7, i64 0, i64 0
  call void @skinny_tk2_permute(ptr noundef %43)
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %44, i64 4
  store ptr %45, ptr %5, align 8, !tbaa !5
  %46 = load i64, ptr %6, align 8, !tbaa !9
  %47 = sub i64 %46, 4
  store i64 %47, ptr %6, align 8, !tbaa !9
  br label %17, !llvm.loop !16

48:                                               ; preds = %17
  %49 = load i64, ptr %6, align 8, !tbaa !9
  %50 = trunc i64 %49 to i32
  store i32 %50, ptr %8, align 4, !tbaa !12
  br label %51

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

55:                                               ; preds = %58, %51
  %56 = load i32, ptr %14, align 4, !tbaa !12
  %57 = icmp ugt i32 %56, 0
  br i1 %57, label %58, label %71

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

71:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, 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
  br label %72

72:                                               ; preds = %71
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %8, align 4, !tbaa !12
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds [32 x i8], ptr %7, i64 0, i64 %75
  %77 = load i8, ptr %76, align 1, !tbaa !11
  %78 = zext i8 %77 to i32
  %79 = xor i32 %78, 128
  %80 = trunc i32 %79 to i8
  store i8 %80, ptr %76, align 1, !tbaa !11
  %81 = getelementptr inbounds [32 x i8], ptr %7, i64 0, i64 0
  call void @skinny_tk2_permute(ptr noundef %81)
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds [32 x i8], ptr %7, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %82, ptr align 16 %83, i64 16, i1 false)
  %84 = getelementptr inbounds [32 x i8], ptr %7, i64 0, i64 0
  call void @skinny_tk2_permute(ptr noundef %84)
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds i8, ptr %85, i64 16
  %87 = getelementptr inbounds [32 x i8], ptr %7, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %86, ptr align 16 %87, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #4
  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

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

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 = { 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"

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @skinny_tk2_hash(ptr nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, i64 noundef %2) local_unnamed_addr #0 {
  %4 = alloca [32 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %4, i8 0, i64 32, i1 false)
  %5 = getelementptr inbounds i8, ptr %4, i64 4
  store i8 -128, ptr %5, align 4, !tbaa !5
  %6 = icmp ugt i64 %2, 3
  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 <4 x i8>, ptr %.02229, align 1, !tbaa !5
  %8 = load <4 x i8>, ptr %4, align 16, !tbaa !5
  %9 = xor <4 x i8> %8, %7
  store <4 x i8> %9, ptr %4, align 16, !tbaa !5
  call void @skinny_tk2_permute(ptr noundef nonnull %4)
  %10 = getelementptr inbounds i8, ptr %.02229, i64 4
  %11 = add i64 %.02328, -4
  %12 = icmp ugt i64 %11, 3
  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 [32 x i8], ptr %4, i64 0, i64 %.023.lcssa
  %57 = load i8, ptr %56, align 1, !tbaa !5
  %58 = xor i8 %57, -128
  store i8 %58, ptr %56, align 1, !tbaa !5
  call void @skinny_tk2_permute(ptr noundef nonnull %4)
  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 @skinny_tk2_permute(ptr noundef nonnull %4)
  %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 32, ptr nonnull %4) #4
  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

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

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 = { 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