// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/aes128poetv2aes128ni/ref/poet.c
// Function: keysetup_encrypt_only
void keysetup_encrypt_only(poet_ctx_t *ctx, const unsigned char key[KEYLEN])
{
    AES_KEY expanded_key;
    __m128i sk = loadu(key);
    __m128i k = zero;
    ctx->l = one;
    __m128i k_axu = two;

    aes_expand_key(sk, expanded_key);
    aes_encrypt_3blocks_single_key(k, ctx->l, k_axu, expanded_key);

    aes_expand_key(k, ctx->aes_enc);
    aes_expand_key(k_axu, ctx->aes_axu);
}

// Assembly:
subq $0x548, %rsp            # imm = 0x548
movq %rdi, 0xe8(%rsp)
movq %rsi, 0xe0(%rsp)
movq 0xe0(%rsp), %rdi
callq 0x2f50
vmovdqa %xmm0, 0x20(%rsp)
vpxor %xmm0, %xmm0, %xmm0
vmovdqa %xmm0, 0x170(%rsp)
vmovdqa 0x170(%rsp), %xmm1
vmovdqa %xmm1, 0x10(%rsp)
vmovdqa %xmm0, 0x160(%rsp)
vmovdqa 0x160(%rsp), %xmm1
movl $0x1, %eax
vpinsrb $0xf, %eax, %xmm1, %xmm1
movq 0xe8(%rsp), %rax
vmovdqa %xmm1, 0x210(%rax)
vmovdqa %xmm0, 0x150(%rsp)
vmovdqa 0x150(%rsp), %xmm0
movl $0x2, %eax
vpinsrb $0xf, %eax, %xmm0, %xmm0
vmovdqa %xmm0, (%rsp)
vmovdqa 0x20(%rsp), %xmm0
leaq 0x30(%rsp), %rdi
callq 0x2f70
vmovdqa 0x10(%rsp), %xmm1
vmovdqa 0x30(%rsp), %xmm0
vmovdqa %xmm1, 0x140(%rsp)
vmovdqa %xmm0, 0x130(%rsp)
vmovdqa 0x140(%rsp), %xmm0
vpxor 0x130(%rsp), %xmm0, %xmm0
vmovdqa %xmm0, 0x10(%rsp)
movq 0xe8(%rsp), %rax
vmovdqa 0x210(%rax), %xmm1
vmovdqa 0x30(%rsp), %xmm0
vmovdqa %xmm1, 0x120(%rsp)
vmovdqa %xmm0, 0x110(%rsp)
vmovdqa 0x120(%rsp), %xmm0
vpxor 0x110(%rsp), %xmm0, %xmm0
movq 0xe8(%rsp), %rax
vmovdqa %xmm0, 0x210(%rax)
vmovdqa (%rsp), %xmm1
vmovdqa 0x30(%rsp), %xmm0
vmovdqa %xmm1, 0x100(%rsp)
vmovdqa %xmm0, 0xf0(%rsp)
vmovdqa 0x100(%rsp), %xmm0
vpxor 0xf0(%rsp), %xmm0, %xmm0
vmovdqa %xmm0, (%rsp)
vmovdqa 0x10(%rsp), %xmm1
vmovdqa 0x40(%rsp), %xmm0
vmovdqa %xmm1, 0x4d0(%rsp)
vmovdqa %xmm0, 0x4c0(%rsp)
vmovdqa 0x4d0(%rsp), %xmm0
vmovdqa 0x4c0(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x10(%rsp)
movq 0xe8(%rsp), %rax
vmovdqa 0x210(%rax), %xmm1
vmovdqa 0x40(%rsp), %xmm0
vmovdqa %xmm1, 0x4b0(%rsp)
vmovdqa %xmm0, 0x4a0(%rsp)
vmovdqa 0x4b0(%rsp), %xmm0
vmovdqa 0x4a0(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
movq 0xe8(%rsp), %rax
vmovdqa %xmm0, 0x210(%rax)
vmovdqa (%rsp), %xmm1
vmovdqa 0x40(%rsp), %xmm0
vmovdqa %xmm1, 0x490(%rsp)
vmovdqa %xmm0, 0x480(%rsp)
vmovdqa 0x490(%rsp), %xmm0
vmovdqa 0x480(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, (%rsp)
vmovdqa 0x10(%rsp), %xmm1
vmovdqa 0x50(%rsp), %xmm0
vmovdqa %xmm1, 0x470(%rsp)
vmovdqa %xmm0, 0x460(%rsp)
vmovdqa 0x470(%rsp), %xmm0
vmovdqa 0x460(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x10(%rsp)
movq 0xe8(%rsp), %rax
vmovdqa 0x210(%rax), %xmm1
vmovdqa 0x50(%rsp), %xmm0
vmovdqa %xmm1, 0x450(%rsp)
vmovdqa %xmm0, 0x440(%rsp)
vmovdqa 0x450(%rsp), %xmm0
vmovdqa 0x440(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
movq 0xe8(%rsp), %rax
vmovdqa %xmm0, 0x210(%rax)
vmovdqa (%rsp), %xmm1
vmovdqa 0x50(%rsp), %xmm0
vmovdqa %xmm1, 0x430(%rsp)
vmovdqa %xmm0, 0x420(%rsp)
vmovdqa 0x430(%rsp), %xmm0
vmovdqa 0x420(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, (%rsp)
vmovdqa 0x10(%rsp), %xmm1
vmovdqa 0x60(%rsp), %xmm0
vmovdqa %xmm1, 0x410(%rsp)
vmovdqa %xmm0, 0x400(%rsp)
vmovdqa 0x410(%rsp), %xmm0
vmovdqa 0x400(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x10(%rsp)
movq 0xe8(%rsp), %rax
vmovdqa 0x210(%rax), %xmm1
vmovdqa 0x60(%rsp), %xmm0
vmovdqa %xmm1, 0x3f0(%rsp)
vmovdqa %xmm0, 0x3e0(%rsp)
vmovdqa 0x3f0(%rsp), %xmm0
vmovdqa 0x3e0(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
movq 0xe8(%rsp), %rax
vmovdqa %xmm0, 0x210(%rax)
vmovdqa (%rsp), %xmm1
vmovdqa 0x60(%rsp), %xmm0
vmovdqa %xmm1, 0x3d0(%rsp)
vmovdqa %xmm0, 0x3c0(%rsp)
vmovdqa 0x3d0(%rsp), %xmm0
vmovdqa 0x3c0(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, (%rsp)
vmovdqa 0x10(%rsp), %xmm1
vmovdqa 0x70(%rsp), %xmm0
vmovdqa %xmm1, 0x3b0(%rsp)
vmovdqa %xmm0, 0x3a0(%rsp)
vmovdqa 0x3b0(%rsp), %xmm0
vmovdqa 0x3a0(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x10(%rsp)
movq 0xe8(%rsp), %rax
vmovdqa 0x210(%rax), %xmm1
vmovdqa 0x70(%rsp), %xmm0
vmovdqa %xmm1, 0x390(%rsp)
vmovdqa %xmm0, 0x380(%rsp)
vmovdqa 0x390(%rsp), %xmm0
vmovdqa 0x380(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
movq 0xe8(%rsp), %rax
vmovdqa %xmm0, 0x210(%rax)
vmovdqa (%rsp), %xmm1
vmovdqa 0x70(%rsp), %xmm0
vmovdqa %xmm1, 0x370(%rsp)
vmovdqa %xmm0, 0x360(%rsp)
vmovdqa 0x370(%rsp), %xmm0
vmovdqa 0x360(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, (%rsp)
vmovdqa 0x10(%rsp), %xmm1
vmovdqa 0x80(%rsp), %xmm0
vmovdqa %xmm1, 0x350(%rsp)
vmovdqa %xmm0, 0x340(%rsp)
vmovdqa 0x350(%rsp), %xmm0
vmovdqa 0x340(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x10(%rsp)
movq 0xe8(%rsp), %rax
vmovdqa 0x210(%rax), %xmm1
vmovdqa 0x80(%rsp), %xmm0
vmovdqa %xmm1, 0x330(%rsp)
vmovdqa %xmm0, 0x320(%rsp)
vmovdqa 0x330(%rsp), %xmm0
vmovdqa 0x320(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
movq 0xe8(%rsp), %rax
vmovdqa %xmm0, 0x210(%rax)
vmovdqa (%rsp), %xmm1
vmovdqa 0x80(%rsp), %xmm0
vmovdqa %xmm1, 0x310(%rsp)
vmovdqa %xmm0, 0x300(%rsp)
vmovdqa 0x310(%rsp), %xmm0
vmovdqa 0x300(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, (%rsp)
vmovdqa 0x10(%rsp), %xmm1
vmovdqa 0x90(%rsp), %xmm0
vmovdqa %xmm1, 0x2f0(%rsp)
vmovdqa %xmm0, 0x2e0(%rsp)
vmovdqa 0x2f0(%rsp), %xmm0
vmovdqa 0x2e0(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x10(%rsp)
movq 0xe8(%rsp), %rax
vmovdqa 0x210(%rax), %xmm1
vmovdqa 0x90(%rsp), %xmm0
vmovdqa %xmm1, 0x2d0(%rsp)
vmovdqa %xmm0, 0x2c0(%rsp)
vmovdqa 0x2d0(%rsp), %xmm0
vmovdqa 0x2c0(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
movq 0xe8(%rsp), %rax
vmovdqa %xmm0, 0x210(%rax)
vmovdqa (%rsp), %xmm1
vmovdqa 0x90(%rsp), %xmm0
vmovdqa %xmm1, 0x2b0(%rsp)
vmovdqa %xmm0, 0x2a0(%rsp)
vmovdqa 0x2b0(%rsp), %xmm0
vmovdqa 0x2a0(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, (%rsp)
vmovdqa 0x10(%rsp), %xmm1
vmovdqa 0xa0(%rsp), %xmm0
vmovdqa %xmm1, 0x290(%rsp)
vmovdqa %xmm0, 0x280(%rsp)
vmovdqa 0x290(%rsp), %xmm0
vmovdqa 0x280(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x10(%rsp)
movq 0xe8(%rsp), %rax
vmovdqa 0x210(%rax), %xmm1
vmovdqa 0xa0(%rsp), %xmm0
vmovdqa %xmm1, 0x270(%rsp)
vmovdqa %xmm0, 0x260(%rsp)
vmovdqa 0x270(%rsp), %xmm0
vmovdqa 0x260(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
movq 0xe8(%rsp), %rax
vmovdqa %xmm0, 0x210(%rax)
vmovdqa (%rsp), %xmm1
vmovdqa 0xa0(%rsp), %xmm0
vmovdqa %xmm1, 0x250(%rsp)
vmovdqa %xmm0, 0x240(%rsp)
vmovdqa 0x250(%rsp), %xmm0
vmovdqa 0x240(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, (%rsp)
vmovdqa 0x10(%rsp), %xmm1
vmovdqa 0xb0(%rsp), %xmm0
vmovdqa %xmm1, 0x230(%rsp)
vmovdqa %xmm0, 0x220(%rsp)
vmovdqa 0x230(%rsp), %xmm0
vmovdqa 0x220(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x10(%rsp)
movq 0xe8(%rsp), %rax
vmovdqa 0x210(%rax), %xmm1
vmovdqa 0xb0(%rsp), %xmm0
vmovdqa %xmm1, 0x210(%rsp)
vmovdqa %xmm0, 0x200(%rsp)
vmovdqa 0x210(%rsp), %xmm0
vmovdqa 0x200(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
movq 0xe8(%rsp), %rax
vmovdqa %xmm0, 0x210(%rax)
vmovdqa (%rsp), %xmm1
vmovdqa 0xb0(%rsp), %xmm0
vmovdqa %xmm1, 0x1f0(%rsp)
vmovdqa %xmm0, 0x1e0(%rsp)
vmovdqa 0x1f0(%rsp), %xmm0
vmovdqa 0x1e0(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, (%rsp)
vmovdqa 0x10(%rsp), %xmm1
vmovdqa 0xc0(%rsp), %xmm0
vmovdqa %xmm1, 0x1d0(%rsp)
vmovdqa %xmm0, 0x1c0(%rsp)
vmovdqa 0x1d0(%rsp), %xmm0
vmovdqa 0x1c0(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x10(%rsp)
movq 0xe8(%rsp), %rax
vmovdqa 0x210(%rax), %xmm1
vmovdqa 0xc0(%rsp), %xmm0
vmovdqa %xmm1, 0x1b0(%rsp)
vmovdqa %xmm0, 0x1a0(%rsp)
vmovdqa 0x1b0(%rsp), %xmm0
vmovdqa 0x1a0(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
movq 0xe8(%rsp), %rax
vmovdqa %xmm0, 0x210(%rax)
vmovdqa (%rsp), %xmm1
vmovdqa 0xc0(%rsp), %xmm0
vmovdqa %xmm1, 0x190(%rsp)
vmovdqa %xmm0, 0x180(%rsp)
vmovdqa 0x190(%rsp), %xmm0
vmovdqa 0x180(%rsp), %xmm1
vaesenc %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, (%rsp)
vmovdqa 0x10(%rsp), %xmm1
vmovdqa 0xd0(%rsp), %xmm0
vmovdqa %xmm1, 0x530(%rsp)
vmovdqa %xmm0, 0x520(%rsp)
vmovdqa 0x530(%rsp), %xmm0
vmovdqa 0x520(%rsp), %xmm1
vaesenclast %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, 0x10(%rsp)
movq 0xe8(%rsp), %rax
vmovdqa 0x210(%rax), %xmm1
vmovdqa 0xd0(%rsp), %xmm0
vmovdqa %xmm1, 0x510(%rsp)
vmovdqa %xmm0, 0x500(%rsp)
vmovdqa 0x510(%rsp), %xmm0
vmovdqa 0x500(%rsp), %xmm1
vaesenclast %xmm1, %xmm0, %xmm0
movq 0xe8(%rsp), %rax
vmovdqa %xmm0, 0x210(%rax)
vmovdqa (%rsp), %xmm1
vmovdqa 0xd0(%rsp), %xmm0
vmovdqa %xmm1, 0x4f0(%rsp)
vmovdqa %xmm0, 0x4e0(%rsp)
vmovdqa 0x4f0(%rsp), %xmm0
vmovdqa 0x4e0(%rsp), %xmm1
vaesenclast %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, (%rsp)
vmovdqa 0x10(%rsp), %xmm0
movq 0xe8(%rsp), %rdi
callq 0x2f70
vmovdqa (%rsp), %xmm0
movq 0xe8(%rsp), %rdi
addq $0x160, %rdi            # imm = 0x160
callq 0x2f70
addq $0x548, %rsp            # imm = 0x548
retq
nopw %cs:(%rax,%rax)