#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ __m256i;

/* Variables and functions */
int /*<<< orphan*/ _MM_SHUFFLE(int, int, int, int);
int /*<<< orphan*/ _mm256_and_si256(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm256_loadu_si256(int /*<<< orphan*/ *);
int /*<<< orphan*/ _mm256_or_si256(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm256_permute4x64_epi64(int /*<<< orphan*/,
                                            int /*<<< orphan*/);
int /*<<< orphan*/ _mm256_slli_epi64(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm256_srli_epi64(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm256_storeu_si256(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/);
int /*<<< orphan*/ _mm256_xor_si256(int /*<<< orphan*/, int /*<<< orphan*/);
void morus_enc_aut_step(const unsigned char *plaintext,
                        unsigned char *ciphertext, __m256i *state) {
  __m256i keystream;
  __m256i msgblk = _mm256_loadu_si256((__m256i *)plaintext);
  keystream = _mm256_xor_si256(
      (state[0]),
      (_mm256_permute4x64_epi64((state[1]), _MM_SHUFFLE(0, 3, 2, 1))));
  keystream =
      _mm256_xor_si256((keystream), (_mm256_and_si256((state[2]), (state[3]))));
  _mm256_storeu_si256((__m256i *)ciphertext,
                      _mm256_xor_si256((keystream), (msgblk)));
  state[0] = _mm256_xor_si256((state[0]), (state[3]));
  state[0] =
      _mm256_xor_si256((state[0]), (_mm256_and_si256((state[1]), (state[2]))));
  state[0] = _mm256_or_si256((_mm256_slli_epi64((state[0]), (13))),
                             (_mm256_srli_epi64((state[0]), (64 - 13))));
  state[3] = _mm256_permute4x64_epi64((state[3]), _MM_SHUFFLE(2, 1, 0, 3));
  state[1] = _mm256_xor_si256((state[1]), (msgblk));
  state[1] = _mm256_xor_si256((state[1]), (state[4]));
  state[1] =
      _mm256_xor_si256((state[1]), (_mm256_and_si256((state[2]), (state[3]))));
  state[1] = _mm256_or_si256((_mm256_slli_epi64((state[1]), (46))),
                             (_mm256_srli_epi64((state[1]), (64 - 46))));
  state[4] = _mm256_permute4x64_epi64((state[4]), _MM_SHUFFLE(1, 0, 3, 2));
  state[2] = _mm256_xor_si256((state[2]), (msgblk));
  state[2] = _mm256_xor_si256((state[2]), (state[0]));
  state[2] =
      _mm256_xor_si256((state[2]), (_mm256_and_si256((state[3]), (state[4]))));
  state[2] = _mm256_or_si256((_mm256_slli_epi64((state[2]), (38))),
                             (_mm256_srli_epi64((state[2]), (64 - 38))));
  state[0] = _mm256_permute4x64_epi64((state[0]), _MM_SHUFFLE(0, 3, 2, 1));
  state[3] = _mm256_xor_si256((state[3]), (msgblk));
  state[3] = _mm256_xor_si256((state[3]), (state[1]));
  state[3] =
      _mm256_xor_si256((state[3]), (_mm256_and_si256((state[4]), (state[0]))));
  state[3] = _mm256_or_si256((_mm256_slli_epi64((state[3]), (7))),
                             (_mm256_srli_epi64((state[3]), (64 - 7))));
  state[1] = _mm256_permute4x64_epi64((state[1]), _MM_SHUFFLE(1, 0, 3, 2));
  state[4] = _mm256_xor_si256((state[4]), (msgblk));
  state[4] = _mm256_xor_si256((state[4]), (state[2]));
  state[4] =
      _mm256_xor_si256((state[4]), (_mm256_and_si256((state[0]), (state[1]))));
  state[4] = _mm256_or_si256((_mm256_slli_epi64((state[4]), (4))),
                             (_mm256_srli_epi64((state[4]), (64 - 4))));
  state[2] = _mm256_permute4x64_epi64((state[2]), _MM_SHUFFLE(2, 1, 0, 3));
}


x86 assembly (clang, -O0):
<morus_enc_aut_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   10b0 <_mm256_loadu_si256@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x70(%rbp)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x74(%rbp)
xor    %edi,%edi
mov    $0x3,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    -0x74(%rbp),%edi
mov    %eax,%esi
call   1090 <_mm256_permute4x64_epi64@plt>
mov    -0x70(%rbp),%edi
mov    %eax,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%edi
mov    -0x18(%rbp),%rax
mov    0xc(%rax),%esi
call   1060 <_mm256_and_si256@plt>
mov    -0x6c(%rbp),%edi
mov    %eax,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1070 <_mm256_xor_si256@plt>
mov    -0x68(%rbp),%rdi
mov    %eax,%esi
call   1050 <_mm256_storeu_si256@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    0xc(%rax),%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%edi
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%esi
call   1060 <_mm256_and_si256@plt>
mov    -0x5c(%rbp),%edi
mov    %eax,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    $0xd,%esi
call   1040 <_mm256_slli_epi64@plt>
mov    %eax,-0x58(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    $0x33,%esi
call   1080 <_mm256_srli_epi64@plt>
mov    -0x58(%rbp),%edi
mov    %eax,%esi
call   10a0 <_mm256_or_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    0xc(%rax),%eax
mov    %eax,-0x54(%rbp)
mov    $0x2,%edi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x3,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    -0x54(%rbp),%edi
mov    %eax,%esi
call   1090 <_mm256_permute4x64_epi64@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%edi
mov    -0x20(%rbp),%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%edi
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x50(%rbp)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%edi
mov    -0x18(%rbp),%rax
mov    0xc(%rax),%esi
call   1060 <_mm256_and_si256@plt>
mov    -0x50(%rbp),%edi
mov    %eax,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%edi
mov    $0x2e,%esi
call   1040 <_mm256_slli_epi64@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%edi
mov    $0x12,%esi
call   1080 <_mm256_srli_epi64@plt>
mov    -0x4c(%rbp),%edi
mov    %eax,%esi
call   10a0 <_mm256_or_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%eax
mov    %eax,-0x48(%rbp)
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x3,%edx
mov    $0x2,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    -0x48(%rbp),%edi
mov    %eax,%esi
call   1090 <_mm256_permute4x64_epi64@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%edi
mov    -0x20(%rbp),%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x44(%rbp)
mov    -0x18(%rbp),%rax
mov    0xc(%rax),%edi
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%esi
call   1060 <_mm256_and_si256@plt>
mov    -0x44(%rbp),%edi
mov    %eax,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%edi
mov    $0x26,%esi
call   1040 <_mm256_slli_epi64@plt>
mov    %eax,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%edi
mov    $0x1a,%esi
call   1080 <_mm256_srli_epi64@plt>
mov    -0x40(%rbp),%edi
mov    %eax,%esi
call   10a0 <_mm256_or_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
xor    %edi,%edi
mov    $0x3,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    -0x3c(%rbp),%edi
mov    %eax,%esi
call   1090 <_mm256_permute4x64_epi64@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    0xc(%rax),%edi
mov    -0x20(%rbp),%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x18(%rbp),%rax
mov    0xc(%rax),%edi
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x18(%rbp),%rax
mov    0xc(%rax),%eax
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1060 <_mm256_and_si256@plt>
mov    -0x38(%rbp),%edi
mov    %eax,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x18(%rbp),%rax
mov    0xc(%rax),%edi
mov    $0x7,%esi
call   1040 <_mm256_slli_epi64@plt>
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%rax
mov    0xc(%rax),%edi
mov    $0x39,%esi
call   1080 <_mm256_srli_epi64@plt>
mov    -0x34(%rbp),%edi
mov    %eax,%esi
call   10a0 <_mm256_or_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x30(%rbp)
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x3,%edx
mov    $0x2,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    -0x30(%rbp),%edi
mov    %eax,%esi
call   1090 <_mm256_permute4x64_epi64@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%edi
mov    -0x20(%rbp),%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%edi
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%esi
call   1060 <_mm256_and_si256@plt>
mov    -0x2c(%rbp),%edi
mov    %eax,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%edi
mov    $0x4,%esi
call   1040 <_mm256_slli_epi64@plt>
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%edi
mov    $0x3c,%esi
call   1080 <_mm256_srli_epi64@plt>
mov    -0x28(%rbp),%edi
mov    %eax,%esi
call   10a0 <_mm256_or_si256@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x24(%rbp)
mov    $0x2,%edi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x3,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    -0x24(%rbp),%edi
mov    %eax,%esi
call   1090 <_mm256_permute4x64_epi64@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x8(%rax)
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<morus_enc_aut_step>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r15
call   10b0 <_mm256_loadu_si256@plt>
mov    %eax,%r14d
mov    (%rbx),%r12d
mov    0x4(%rbx),%ebp
xor    %edi,%edi
mov    $0x3,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1090 <_mm256_permute4x64_epi64@plt>
mov    %r12d,%edi
mov    %eax,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ebp
mov    0x8(%rbx),%edi
mov    0xc(%rbx),%esi
call   1060 <_mm256_and_si256@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%edi
mov    %r14d,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1050 <_mm256_storeu_si256@plt>
mov    (%rbx),%edi
mov    0xc(%rbx),%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ebp
mov    %eax,(%rbx)
mov    0x4(%rbx),%edi
mov    0x8(%rbx),%esi
call   1060 <_mm256_and_si256@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,(%rbx)
mov    %eax,%edi
mov    $0xd,%esi
call   1040 <_mm256_slli_epi64@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
mov    $0x33,%esi
call   1080 <_mm256_srli_epi64@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   10a0 <_mm256_or_si256@plt>
mov    %eax,(%rbx)
mov    0xc(%rbx),%ebp
mov    $0x2,%edi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x3,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1090 <_mm256_permute4x64_epi64@plt>
mov    %eax,0xc(%rbx)
mov    0x4(%rbx),%edi
mov    %r14d,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,0x4(%rbx)
mov    0x10(%rbx),%esi
mov    %eax,%edi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ebp
mov    %eax,0x4(%rbx)
mov    0x8(%rbx),%edi
mov    0xc(%rbx),%esi
call   1060 <_mm256_and_si256@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,0x4(%rbx)
mov    %eax,%edi
mov    $0x2e,%esi
call   1040 <_mm256_slli_epi64@plt>
mov    %eax,%ebp
mov    0x4(%rbx),%edi
mov    $0x12,%esi
call   1080 <_mm256_srli_epi64@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   10a0 <_mm256_or_si256@plt>
mov    %eax,0x4(%rbx)
mov    0x10(%rbx),%ebp
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x3,%edx
mov    $0x2,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1090 <_mm256_permute4x64_epi64@plt>
mov    %eax,0x10(%rbx)
mov    0x8(%rbx),%edi
mov    %r14d,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,0x8(%rbx)
mov    (%rbx),%esi
mov    %eax,%edi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ebp
mov    %eax,0x8(%rbx)
mov    0xc(%rbx),%edi
mov    0x10(%rbx),%esi
call   1060 <_mm256_and_si256@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,0x8(%rbx)
mov    %eax,%edi
mov    $0x26,%esi
call   1040 <_mm256_slli_epi64@plt>
mov    %eax,%ebp
mov    0x8(%rbx),%edi
mov    $0x1a,%esi
call   1080 <_mm256_srli_epi64@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   10a0 <_mm256_or_si256@plt>
mov    %eax,0x8(%rbx)
mov    (%rbx),%ebp
xor    %edi,%edi
mov    $0x3,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1090 <_mm256_permute4x64_epi64@plt>
mov    %eax,(%rbx)
mov    0xc(%rbx),%edi
mov    %r14d,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,0xc(%rbx)
mov    0x4(%rbx),%esi
mov    %eax,%edi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ebp
mov    %eax,0xc(%rbx)
mov    (%rbx),%esi
mov    0x10(%rbx),%edi
call   1060 <_mm256_and_si256@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,0xc(%rbx)
mov    %eax,%edi
mov    $0x7,%esi
call   1040 <_mm256_slli_epi64@plt>
mov    %eax,%ebp
mov    0xc(%rbx),%edi
mov    $0x39,%esi
call   1080 <_mm256_srli_epi64@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   10a0 <_mm256_or_si256@plt>
mov    %eax,0xc(%rbx)
mov    0x4(%rbx),%ebp
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x3,%edx
mov    $0x2,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1090 <_mm256_permute4x64_epi64@plt>
mov    %eax,0x4(%rbx)
mov    0x10(%rbx),%edi
mov    %r14d,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,0x10(%rbx)
mov    0x8(%rbx),%esi
mov    %eax,%edi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,%ebp
mov    %eax,0x10(%rbx)
mov    (%rbx),%edi
mov    0x4(%rbx),%esi
call   1060 <_mm256_and_si256@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1070 <_mm256_xor_si256@plt>
mov    %eax,0x10(%rbx)
mov    %eax,%edi
mov    $0x4,%esi
call   1040 <_mm256_slli_epi64@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%edi
mov    $0x3c,%esi
call   1080 <_mm256_srli_epi64@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   10a0 <_mm256_or_si256@plt>
mov    %eax,0x10(%rbx)
mov    0x8(%rbx),%ebp
mov    $0x2,%edi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x3,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1090 <_mm256_permute4x64_epi64@plt>
mov    %eax,0x8(%rbx)
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @morus_enc_aut_step(i8* %0, i8* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
%11 = call i32 @_mm256_loadu_si256(i32* %10)
store i32 %11, i32* %8
%12 = load i32*, i32** %6
%13 = getelementptr inbounds i32, i32* %12, i64 0
%14 = load i32, i32* %13
%15 = load i32*, i32** %6
%16 = getelementptr inbounds i32, i32* %15, i64 1
%17 = load i32, i32* %16
%18 = call i32 @_MM_SHUFFLE(i32 0, i32 3, i32 2, i32 1)
%19 = call i32 @_mm256_permute4x64_epi64(i32 %17, i32 %18)
%20 = call i32 @_mm256_xor_si256(i32 %14, i32 %19)
store i32 %20, i32* %7
%21 = load i32, i32* %7
%22 = load i32*, i32** %6
%23 = getelementptr inbounds i32, i32* %22, i64 2
%24 = load i32, i32* %23
%25 = load i32*, i32** %6
%26 = getelementptr inbounds i32, i32* %25, i64 3
%27 = load i32, i32* %26
%28 = call i32 @_mm256_and_si256(i32 %24, i32 %27)
%29 = call i32 @_mm256_xor_si256(i32 %21, i32 %28)
store i32 %29, i32* %7
%30 = load i8*, i8** %5
%31 = bitcast i8* %30 to i32*
%32 = load i32, i32* %7
%33 = load i32, i32* %8
%34 = call i32 @_mm256_xor_si256(i32 %32, i32 %33)
%35 = call i32 @_mm256_storeu_si256(i32* %31, i32 %34)
%36 = load i32*, i32** %6
%37 = getelementptr inbounds i32, i32* %36, i64 0
%38 = load i32, i32* %37
%39 = load i32*, i32** %6
%40 = getelementptr inbounds i32, i32* %39, i64 3
%41 = load i32, i32* %40
%42 = call i32 @_mm256_xor_si256(i32 %38, i32 %41)
%43 = load i32*, i32** %6
%44 = getelementptr inbounds i32, i32* %43, i64 0
store i32 %42, i32* %44
%45 = load i32*, i32** %6
%46 = getelementptr inbounds i32, i32* %45, i64 0
%47 = load i32, i32* %46
%48 = load i32*, i32** %6
%49 = getelementptr inbounds i32, i32* %48, i64 1
%50 = load i32, i32* %49
%51 = load i32*, i32** %6
%52 = getelementptr inbounds i32, i32* %51, i64 2
%53 = load i32, i32* %52
%54 = call i32 @_mm256_and_si256(i32 %50, i32 %53)
%55 = call i32 @_mm256_xor_si256(i32 %47, i32 %54)
%56 = load i32*, i32** %6
%57 = getelementptr inbounds i32, i32* %56, i64 0
store i32 %55, i32* %57
%58 = load i32*, i32** %6
%59 = getelementptr inbounds i32, i32* %58, i64 0
%60 = load i32, i32* %59
%61 = call i32 @_mm256_slli_epi64(i32 %60, i32 13)
%62 = load i32*, i32** %6
%63 = getelementptr inbounds i32, i32* %62, i64 0
%64 = load i32, i32* %63
%65 = call i32 @_mm256_srli_epi64(i32 %64, i32 51)
%66 = call i32 @_mm256_or_si256(i32 %61, i32 %65)
%67 = load i32*, i32** %6
%68 = getelementptr inbounds i32, i32* %67, i64 0
store i32 %66, i32* %68
%69 = load i32*, i32** %6
%70 = getelementptr inbounds i32, i32* %69, i64 3
%71 = load i32, i32* %70
%72 = call i32 @_MM_SHUFFLE(i32 2, i32 1, i32 0, i32 3)
%73 = call i32 @_mm256_permute4x64_epi64(i32 %71, i32 %72)
%74 = load i32*, i32** %6
%75 = getelementptr inbounds i32, i32* %74, i64 3
store i32 %73, i32* %75
%76 = load i32*, i32** %6
%77 = getelementptr inbounds i32, i32* %76, i64 1
%78 = load i32, i32* %77
%79 = load i32, i32* %8
%80 = call i32 @_mm256_xor_si256(i32 %78, i32 %79)
%81 = load i32*, i32** %6
%82 = getelementptr inbounds i32, i32* %81, i64 1
store i32 %80, i32* %82
%83 = load i32*, i32** %6
%84 = getelementptr inbounds i32, i32* %83, i64 1
%85 = load i32, i32* %84
%86 = load i32*, i32** %6
%87 = getelementptr inbounds i32, i32* %86, i64 4
%88 = load i32, i32* %87
%89 = call i32 @_mm256_xor_si256(i32 %85, i32 %88)
%90 = load i32*, i32** %6
%91 = getelementptr inbounds i32, i32* %90, i64 1
store i32 %89, i32* %91
%92 = load i32*, i32** %6
%93 = getelementptr inbounds i32, i32* %92, i64 1
%94 = load i32, i32* %93
%95 = load i32*, i32** %6
%96 = getelementptr inbounds i32, i32* %95, i64 2
%97 = load i32, i32* %96
%98 = load i32*, i32** %6
%99 = getelementptr inbounds i32, i32* %98, i64 3
%100 = load i32, i32* %99
%101 = call i32 @_mm256_and_si256(i32 %97, i32 %100)
%102 = call i32 @_mm256_xor_si256(i32 %94, i32 %101)
%103 = load i32*, i32** %6
%104 = getelementptr inbounds i32, i32* %103, i64 1
store i32 %102, i32* %104
%105 = load i32*, i32** %6
%106 = getelementptr inbounds i32, i32* %105, i64 1
%107 = load i32, i32* %106
%108 = call i32 @_mm256_slli_epi64(i32 %107, i32 46)
%109 = load i32*, i32** %6
%110 = getelementptr inbounds i32, i32* %109, i64 1
%111 = load i32, i32* %110
%112 = call i32 @_mm256_srli_epi64(i32 %111, i32 18)
%113 = call i32 @_mm256_or_si256(i32 %108, i32 %112)
%114 = load i32*, i32** %6
%115 = getelementptr inbounds i32, i32* %114, i64 1
store i32 %113, i32* %115
%116 = load i32*, i32** %6
%117 = getelementptr inbounds i32, i32* %116, i64 4
%118 = load i32, i32* %117
%119 = call i32 @_MM_SHUFFLE(i32 1, i32 0, i32 3, i32 2)
%120 = call i32 @_mm256_permute4x64_epi64(i32 %118, i32 %119)
%121 = load i32*, i32** %6
%122 = getelementptr inbounds i32, i32* %121, i64 4
store i32 %120, i32* %122
%123 = load i32*, i32** %6
%124 = getelementptr inbounds i32, i32* %123, i64 2
%125 = load i32, i32* %124
%126 = load i32, i32* %8
%127 = call i32 @_mm256_xor_si256(i32 %125, i32 %126)
%128 = load i32*, i32** %6
%129 = getelementptr inbounds i32, i32* %128, i64 2
store i32 %127, i32* %129
%130 = load i32*, i32** %6
%131 = getelementptr inbounds i32, i32* %130, i64 2
%132 = load i32, i32* %131
%133 = load i32*, i32** %6
%134 = getelementptr inbounds i32, i32* %133, i64 0
%135 = load i32, i32* %134
%136 = call i32 @_mm256_xor_si256(i32 %132, i32 %135)
%137 = load i32*, i32** %6
%138 = getelementptr inbounds i32, i32* %137, i64 2
store i32 %136, i32* %138
%139 = load i32*, i32** %6
%140 = getelementptr inbounds i32, i32* %139, i64 2
%141 = load i32, i32* %140
%142 = load i32*, i32** %6
%143 = getelementptr inbounds i32, i32* %142, i64 3
%144 = load i32, i32* %143
%145 = load i32*, i32** %6
%146 = getelementptr inbounds i32, i32* %145, i64 4
%147 = load i32, i32* %146
%148 = call i32 @_mm256_and_si256(i32 %144, i32 %147)
%149 = call i32 @_mm256_xor_si256(i32 %141, i32 %148)
%150 = load i32*, i32** %6
%151 = getelementptr inbounds i32, i32* %150, i64 2
store i32 %149, i32* %151
%152 = load i32*, i32** %6
%153 = getelementptr inbounds i32, i32* %152, i64 2
%154 = load i32, i32* %153
%155 = call i32 @_mm256_slli_epi64(i32 %154, i32 38)
%156 = load i32*, i32** %6
%157 = getelementptr inbounds i32, i32* %156, i64 2
%158 = load i32, i32* %157
%159 = call i32 @_mm256_srli_epi64(i32 %158, i32 26)
%160 = call i32 @_mm256_or_si256(i32 %155, i32 %159)
%161 = load i32*, i32** %6
%162 = getelementptr inbounds i32, i32* %161, i64 2
store i32 %160, i32* %162
%163 = load i32*, i32** %6
%164 = getelementptr inbounds i32, i32* %163, i64 0
%165 = load i32, i32* %164
%166 = call i32 @_MM_SHUFFLE(i32 0, i32 3, i32 2, i32 1)
%167 = call i32 @_mm256_permute4x64_epi64(i32 %165, i32 %166)
%168 = load i32*, i32** %6
%169 = getelementptr inbounds i32, i32* %168, i64 0
store i32 %167, i32* %169
%170 = load i32*, i32** %6
%171 = getelementptr inbounds i32, i32* %170, i64 3
%172 = load i32, i32* %171
%173 = load i32, i32* %8
%174 = call i32 @_mm256_xor_si256(i32 %172, i32 %173)
%175 = load i32*, i32** %6
%176 = getelementptr inbounds i32, i32* %175, i64 3
store i32 %174, i32* %176
%177 = load i32*, i32** %6
%178 = getelementptr inbounds i32, i32* %177, i64 3
%179 = load i32, i32* %178
%180 = load i32*, i32** %6
%181 = getelementptr inbounds i32, i32* %180, i64 1
%182 = load i32, i32* %181
%183 = call i32 @_mm256_xor_si256(i32 %179, i32 %182)
%184 = load i32*, i32** %6
%185 = getelementptr inbounds i32, i32* %184, i64 3
store i32 %183, i32* %185
%186 = load i32*, i32** %6
%187 = getelementptr inbounds i32, i32* %186, i64 3
%188 = load i32, i32* %187
%189 = load i32*, i32** %6
%190 = getelementptr inbounds i32, i32* %189, i64 4
%191 = load i32, i32* %190
%192 = load i32*, i32** %6
%193 = getelementptr inbounds i32, i32* %192, i64 0
%194 = load i32, i32* %193
%195 = call i32 @_mm256_and_si256(i32 %191, i32 %194)
%196 = call i32 @_mm256_xor_si256(i32 %188, i32 %195)
%197 = load i32*, i32** %6
%198 = getelementptr inbounds i32, i32* %197, i64 3
store i32 %196, i32* %198
%199 = load i32*, i32** %6
%200 = getelementptr inbounds i32, i32* %199, i64 3
%201 = load i32, i32* %200
%202 = call i32 @_mm256_slli_epi64(i32 %201, i32 7)
%203 = load i32*, i32** %6
%204 = getelementptr inbounds i32, i32* %203, i64 3
%205 = load i32, i32* %204
%206 = call i32 @_mm256_srli_epi64(i32 %205, i32 57)
%207 = call i32 @_mm256_or_si256(i32 %202, i32 %206)
%208 = load i32*, i32** %6
%209 = getelementptr inbounds i32, i32* %208, i64 3
store i32 %207, i32* %209
%210 = load i32*, i32** %6
%211 = getelementptr inbounds i32, i32* %210, i64 1
%212 = load i32, i32* %211
%213 = call i32 @_MM_SHUFFLE(i32 1, i32 0, i32 3, i32 2)
%214 = call i32 @_mm256_permute4x64_epi64(i32 %212, i32 %213)
%215 = load i32*, i32** %6
%216 = getelementptr inbounds i32, i32* %215, i64 1
store i32 %214, i32* %216
%217 = load i32*, i32** %6
%218 = getelementptr inbounds i32, i32* %217, i64 4
%219 = load i32, i32* %218
%220 = load i32, i32* %8
%221 = call i32 @_mm256_xor_si256(i32 %219, i32 %220)
%222 = load i32*, i32** %6
%223 = getelementptr inbounds i32, i32* %222, i64 4
store i32 %221, i32* %223
%224 = load i32*, i32** %6
%225 = getelementptr inbounds i32, i32* %224, i64 4
%226 = load i32, i32* %225
%227 = load i32*, i32** %6
%228 = getelementptr inbounds i32, i32* %227, i64 2
%229 = load i32, i32* %228
%230 = call i32 @_mm256_xor_si256(i32 %226, i32 %229)
%231 = load i32*, i32** %6
%232 = getelementptr inbounds i32, i32* %231, i64 4
store i32 %230, i32* %232
%233 = load i32*, i32** %6
%234 = getelementptr inbounds i32, i32* %233, i64 4
%235 = load i32, i32* %234
%236 = load i32*, i32** %6
%237 = getelementptr inbounds i32, i32* %236, i64 0
%238 = load i32, i32* %237
%239 = load i32*, i32** %6
%240 = getelementptr inbounds i32, i32* %239, i64 1
%241 = load i32, i32* %240
%242 = call i32 @_mm256_and_si256(i32 %238, i32 %241)
%243 = call i32 @_mm256_xor_si256(i32 %235, i32 %242)
%244 = load i32*, i32** %6
%245 = getelementptr inbounds i32, i32* %244, i64 4
store i32 %243, i32* %245
%246 = load i32*, i32** %6
%247 = getelementptr inbounds i32, i32* %246, i64 4
%248 = load i32, i32* %247
%249 = call i32 @_mm256_slli_epi64(i32 %248, i32 4)
%250 = load i32*, i32** %6
%251 = getelementptr inbounds i32, i32* %250, i64 4
%252 = load i32, i32* %251
%253 = call i32 @_mm256_srli_epi64(i32 %252, i32 60)
%254 = call i32 @_mm256_or_si256(i32 %249, i32 %253)
%255 = load i32*, i32** %6
%256 = getelementptr inbounds i32, i32* %255, i64 4
store i32 %254, i32* %256
%257 = load i32*, i32** %6
%258 = getelementptr inbounds i32, i32* %257, i64 2
%259 = load i32, i32* %258
%260 = call i32 @_MM_SHUFFLE(i32 2, i32 1, i32 0, i32 3)
%261 = call i32 @_mm256_permute4x64_epi64(i32 %259, i32 %260)
%262 = load i32*, i32** %6
%263 = getelementptr inbounds i32, i32* %262, i64 2
store i32 %261, i32* %263
ret void
}

LLVM IR (-O2):
define void @morus_enc_aut_step(i8* %0, i8* %1, i32* nocapture %2) {
%4 = bitcast i8* %0 to i32*
%5 = tail call i32 @_mm256_loadu_si256(i32* %4)
%6 = load i32, i32* %2
%7 = getelementptr inbounds i32, i32* %2, i64 1
%8 = load i32, i32* %7
%9 = tail call i32 @_MM_SHUFFLE(i32 0, i32 3, i32 2, i32 1)
%10 = tail call i32 @_mm256_permute4x64_epi64(i32 %8, i32 %9)
%11 = tail call i32 @_mm256_xor_si256(i32 %6, i32 %10)
%12 = getelementptr inbounds i32, i32* %2, i64 2
%13 = load i32, i32* %12
%14 = getelementptr inbounds i32, i32* %2, i64 3
%15 = load i32, i32* %14
%16 = tail call i32 @_mm256_and_si256(i32 %13, i32 %15)
%17 = tail call i32 @_mm256_xor_si256(i32 %11, i32 %16)
%18 = bitcast i8* %1 to i32*
%19 = tail call i32 @_mm256_xor_si256(i32 %17, i32 %5)
%20 = tail call i32 @_mm256_storeu_si256(i32* %18, i32 %19)
%21 = load i32, i32* %2
%22 = load i32, i32* %14
%23 = tail call i32 @_mm256_xor_si256(i32 %21, i32 %22)
store i32 %23, i32* %2
%24 = load i32, i32* %7
%25 = load i32, i32* %12
%26 = tail call i32 @_mm256_and_si256(i32 %24, i32 %25)
%27 = tail call i32 @_mm256_xor_si256(i32 %23, i32 %26)
store i32 %27, i32* %2
%28 = tail call i32 @_mm256_slli_epi64(i32 %27, i32 13)
%29 = load i32, i32* %2
%30 = tail call i32 @_mm256_srli_epi64(i32 %29, i32 51)
%31 = tail call i32 @_mm256_or_si256(i32 %28, i32 %30)
store i32 %31, i32* %2
%32 = load i32, i32* %14
%33 = tail call i32 @_MM_SHUFFLE(i32 2, i32 1, i32 0, i32 3)
%34 = tail call i32 @_mm256_permute4x64_epi64(i32 %32, i32 %33)
store i32 %34, i32* %14
%35 = load i32, i32* %7
%36 = tail call i32 @_mm256_xor_si256(i32 %35, i32 %5)
store i32 %36, i32* %7
%37 = getelementptr inbounds i32, i32* %2, i64 4
%38 = load i32, i32* %37
%39 = tail call i32 @_mm256_xor_si256(i32 %36, i32 %38)
store i32 %39, i32* %7
%40 = load i32, i32* %12
%41 = load i32, i32* %14
%42 = tail call i32 @_mm256_and_si256(i32 %40, i32 %41)
%43 = tail call i32 @_mm256_xor_si256(i32 %39, i32 %42)
store i32 %43, i32* %7
%44 = tail call i32 @_mm256_slli_epi64(i32 %43, i32 46)
%45 = load i32, i32* %7
%46 = tail call i32 @_mm256_srli_epi64(i32 %45, i32 18)
%47 = tail call i32 @_mm256_or_si256(i32 %44, i32 %46)
store i32 %47, i32* %7
%48 = load i32, i32* %37
%49 = tail call i32 @_MM_SHUFFLE(i32 1, i32 0, i32 3, i32 2)
%50 = tail call i32 @_mm256_permute4x64_epi64(i32 %48, i32 %49)
store i32 %50, i32* %37
%51 = load i32, i32* %12
%52 = tail call i32 @_mm256_xor_si256(i32 %51, i32 %5)
store i32 %52, i32* %12
%53 = load i32, i32* %2
%54 = tail call i32 @_mm256_xor_si256(i32 %52, i32 %53)
store i32 %54, i32* %12
%55 = load i32, i32* %14
%56 = load i32, i32* %37
%57 = tail call i32 @_mm256_and_si256(i32 %55, i32 %56)
%58 = tail call i32 @_mm256_xor_si256(i32 %54, i32 %57)
store i32 %58, i32* %12
%59 = tail call i32 @_mm256_slli_epi64(i32 %58, i32 38)
%60 = load i32, i32* %12
%61 = tail call i32 @_mm256_srli_epi64(i32 %60, i32 26)
%62 = tail call i32 @_mm256_or_si256(i32 %59, i32 %61)
store i32 %62, i32* %12
%63 = load i32, i32* %2
%64 = tail call i32 @_MM_SHUFFLE(i32 0, i32 3, i32 2, i32 1)
%65 = tail call i32 @_mm256_permute4x64_epi64(i32 %63, i32 %64)
store i32 %65, i32* %2
%66 = load i32, i32* %14
%67 = tail call i32 @_mm256_xor_si256(i32 %66, i32 %5)
store i32 %67, i32* %14
%68 = load i32, i32* %7
%69 = tail call i32 @_mm256_xor_si256(i32 %67, i32 %68)
store i32 %69, i32* %14
%70 = load i32, i32* %37
%71 = load i32, i32* %2
%72 = tail call i32 @_mm256_and_si256(i32 %70, i32 %71)
%73 = tail call i32 @_mm256_xor_si256(i32 %69, i32 %72)
store i32 %73, i32* %14
%74 = tail call i32 @_mm256_slli_epi64(i32 %73, i32 7)
%75 = load i32, i32* %14
%76 = tail call i32 @_mm256_srli_epi64(i32 %75, i32 57)
%77 = tail call i32 @_mm256_or_si256(i32 %74, i32 %76)
store i32 %77, i32* %14
%78 = load i32, i32* %7
%79 = tail call i32 @_MM_SHUFFLE(i32 1, i32 0, i32 3, i32 2)
%80 = tail call i32 @_mm256_permute4x64_epi64(i32 %78, i32 %79)
store i32 %80, i32* %7
%81 = load i32, i32* %37
%82 = tail call i32 @_mm256_xor_si256(i32 %81, i32 %5)
store i32 %82, i32* %37
%83 = load i32, i32* %12
%84 = tail call i32 @_mm256_xor_si256(i32 %82, i32 %83)
store i32 %84, i32* %37
%85 = load i32, i32* %2
%86 = load i32, i32* %7
%87 = tail call i32 @_mm256_and_si256(i32 %85, i32 %86)
%88 = tail call i32 @_mm256_xor_si256(i32 %84, i32 %87)
store i32 %88, i32* %37
%89 = tail call i32 @_mm256_slli_epi64(i32 %88, i32 4)
%90 = load i32, i32* %37
%91 = tail call i32 @_mm256_srli_epi64(i32 %90, i32 60)
%92 = tail call i32 @_mm256_or_si256(i32 %89, i32 %91)
store i32 %92, i32* %37
%93 = load i32, i32* %12
%94 = tail call i32 @_MM_SHUFFLE(i32 2, i32 1, i32 0, i32 3)
%95 = tail call i32 @_mm256_permute4x64_epi64(i32 %93, i32 %94)
store i32 %95, i32* %12
ret void
}