#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 uint32_t;
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_shuffle_epi32(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_slli_epi32(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_srli_epi32(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_xor_si128(int /*<<< orphan*/, int /*<<< orphan*/);
void xor_salsa_sidm_swap(__m128i *calc_18, __m128i *calc_13, __m128i *calc_9,
                         __m128i *calc_7, __m128i *calc_1, __m128i *calc_4,
                         __m128i *calc_3, __m128i *calc_2,
                         uint32_t double_rounds) {
  int i;
  __m128i _calc;
  __m128i _shift_left;
  __m128i row1 = _mm_xor_si128(*calc_18, *calc_1);
  ;
  __m128i row2 = _mm_xor_si128(*calc_7, *calc_2);
  ;
  __m128i row3 = _mm_xor_si128(*calc_9, *calc_3);
  ;
  __m128i row4 = _mm_xor_si128(*calc_13, *calc_4);
  ;
  *calc_18 = _mm_xor_si128(*calc_18, *calc_1);
  *calc_7 = _mm_xor_si128(*calc_7, *calc_2);
  *calc_9 = _mm_xor_si128(*calc_9, *calc_3);
  *calc_13 = _mm_xor_si128(*calc_13, *calc_4);
  for (i = 0; i < double_rounds; i++) {
    _calc = _mm_add_epi32(row1, row4);
    _shift_left = _mm_slli_epi32(_calc, 7);
    _calc = _mm_srli_epi32(_calc, (32 - 7));
    row2 = _mm_xor_si128(row2, _calc);
    row2 = _mm_xor_si128(row2, _shift_left);
    _calc = _mm_add_epi32(row2, row1);
    _shift_left = _mm_slli_epi32(_calc, 9);
    _calc = _mm_srli_epi32(_calc, (32 - 9));
    row3 = _mm_xor_si128(row3, _calc);
    row3 = _mm_xor_si128(row3, _shift_left);
    _calc = _mm_add_epi32(row3, row2);
    _shift_left = _mm_slli_epi32(_calc, 13);
    _calc = _mm_srli_epi32(_calc, (32 - 13));
    row4 = _mm_xor_si128(row4, _calc);
    row4 = _mm_xor_si128(row4, _shift_left);
    _calc = _mm_add_epi32(row4, row3);
    _shift_left = _mm_slli_epi32(_calc, 18);
    _calc = _mm_srli_epi32(_calc, (32 - 18));
    row1 = _mm_xor_si128(row1, _calc);
    row1 = _mm_xor_si128(row1, _shift_left);
    row2 = _mm_shuffle_epi32(row2, 0x93);
    row3 = _mm_shuffle_epi32(row3, 0x4e);
    row4 = _mm_shuffle_epi32(row4, 0x39);
    _calc = _mm_add_epi32(row1, row2);
    _shift_left = _mm_slli_epi32(_calc, 7);
    _calc = _mm_srli_epi32(_calc, (32 - 7));
    row4 = _mm_xor_si128(row4, _calc);
    row4 = _mm_xor_si128(row4, _shift_left);
    _calc = _mm_add_epi32(row4, row1);
    _shift_left = _mm_slli_epi32(_calc, 9);
    _calc = _mm_srli_epi32(_calc, (32 - 9));
    row3 = _mm_xor_si128(row3, _calc);
    row3 = _mm_xor_si128(row3, _shift_left);
    _calc = _mm_add_epi32(row3, row4);
    _shift_left = _mm_slli_epi32(_calc, 13);
    _calc = _mm_srli_epi32(_calc, (32 - 13));
    row2 = _mm_xor_si128(row2, _calc);
    row2 = _mm_xor_si128(row2, _shift_left);
    _calc = _mm_add_epi32(row2, row3);
    _shift_left = _mm_slli_epi32(_calc, 18);
    _calc = _mm_srli_epi32(_calc, (32 - 18));
    row1 = _mm_xor_si128(row1, _calc);
    row1 = _mm_xor_si128(row1, _shift_left);
    row2 = _mm_shuffle_epi32(row2, 0x39);
    row3 = _mm_shuffle_epi32(row3, 0x4e);
    row4 = _mm_shuffle_epi32(row4, 0x93);
  }
  row1 = _mm_add_epi32(*calc_18, row1);
  row2 = _mm_add_epi32(*calc_7, row2);
  row3 = _mm_add_epi32(*calc_9, row3);
  row4 = _mm_add_epi32(*calc_13, row4);
  *calc_18 = *calc_1;
  *calc_7 = *calc_2;
  *calc_9 = *calc_3;
  *calc_13 = *calc_4;
  *calc_1 = row1;
  *calc_2 = row2;
  *calc_3 = row3;
  *calc_4 = row4;
}


x86 assembly (clang, -O0):
<xor_salsa_sidm_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rax
mov    (%rax),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x40(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%edi
mov    0x18(%rbp),%rax
mov    (%rax),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x44(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    0x10(%rbp),%rax
mov    (%rax),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%rax
mov    (%rax),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rax
mov    (%rax),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%edi
mov    0x18(%rbp),%rax
mov    (%rax),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    0x10(%rbp),%rax
mov    (%rax),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%rax
mov    (%rax),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    1500 <xor_salsa_sidm_swap+0x3b0>
mov    -0x40(%rbp),%edi
mov    -0x4c(%rbp),%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%edi
mov    $0x7,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%edi
mov    $0x19,%esi
call   1070 <_mm_srli_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x38(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x40(%rbp),%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%edi
mov    $0x9,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%edi
mov    $0x17,%esi
call   1070 <_mm_srli_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x48(%rbp),%edi
mov    -0x38(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%edi
mov    -0x44(%rbp),%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%edi
mov    $0xd,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%edi
mov    $0x13,%esi
call   1070 <_mm_srli_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x4c(%rbp),%edi
mov    -0x38(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%edi
mov    -0x48(%rbp),%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%edi
mov    $0x12,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%edi
mov    $0xe,%esi
call   1070 <_mm_srli_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x38(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x40(%rbp)
mov    -0x44(%rbp),%edi
mov    $0x93,%esi
call   1040 <_mm_shuffle_epi32@plt>
mov    %eax,-0x44(%rbp)
mov    -0x48(%rbp),%edi
mov    $0x4e,%esi
call   1040 <_mm_shuffle_epi32@plt>
mov    %eax,-0x48(%rbp)
mov    -0x4c(%rbp),%edi
mov    $0x39,%esi
call   1040 <_mm_shuffle_epi32@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x44(%rbp),%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%edi
mov    $0x7,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%edi
mov    $0x19,%esi
call   1070 <_mm_srli_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x4c(%rbp),%edi
mov    -0x38(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%edi
mov    -0x40(%rbp),%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%edi
mov    $0x9,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%edi
mov    $0x17,%esi
call   1070 <_mm_srli_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x48(%rbp),%edi
mov    -0x38(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%edi
mov    -0x4c(%rbp),%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%edi
mov    $0xd,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%edi
mov    $0x13,%esi
call   1070 <_mm_srli_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x38(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x48(%rbp),%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%edi
mov    $0x12,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%edi
mov    $0xe,%esi
call   1070 <_mm_srli_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x38(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x40(%rbp)
mov    -0x44(%rbp),%edi
mov    $0x39,%esi
call   1040 <_mm_shuffle_epi32@plt>
mov    %eax,-0x44(%rbp)
mov    -0x48(%rbp),%edi
mov    $0x4e,%esi
call   1040 <_mm_shuffle_epi32@plt>
mov    %eax,-0x48(%rbp)
mov    -0x4c(%rbp),%edi
mov    $0x93,%esi
call   1040 <_mm_shuffle_epi32@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1236 <xor_salsa_sidm_swap+0xe6>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x40(%rbp),%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x40(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%edi
mov    -0x44(%rbp),%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x44(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    -0x48(%rbp),%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x4c(%rbp),%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x30(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x40(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x44(%rbp),%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x48(%rbp),%ecx
mov    0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4c(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xor_salsa_sidm_swap>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,0x18(%rsp)
mov    %r8,%rbp
mov    %rcx,%r15
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r12
mov    0x88(%rsp),%r13
mov    (%rdi),%edi
mov    (%r8),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,0x10(%rsp)
mov    (%r15),%edi
mov    0x0(%r13),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%r13d
mov    (%rbx),%edi
mov    0x80(%rsp),%rax
mov    (%rax),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,0x14(%rsp)
mov    (%r14),%edi
mov    0x18(%rsp),%rax
mov    (%rax),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,0xc(%rsp)
mov    (%r12),%edi
mov    %rbp,0x40(%rsp)
mov    0x0(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %r12,0x20(%rsp)
mov    %eax,(%r12)
mov    (%r15),%edi
mov    0x88(%rsp),%rax
mov    (%rax),%esi
call   1050 <_mm_xor_si128@plt>
mov    %r15,0x28(%rsp)
mov    %eax,(%r15)
mov    (%rbx),%edi
mov    0x80(%rsp),%rax
mov    (%rax),%esi
call   1050 <_mm_xor_si128@plt>
mov    %rbx,0x30(%rsp)
mov    %eax,(%rbx)
mov    (%r14),%edi
mov    0x18(%rsp),%rax
mov    (%rax),%esi
call   1050 <_mm_xor_si128@plt>
mov    %r14,0x38(%rsp)
mov    %eax,(%r14)
mov    0x90(%rsp),%ecx
test   %ecx,%ecx
jle    1498 <xor_salsa_sidm_swap+0x348>
mov    0x10(%rsp),%r15d
mov    0x14(%rsp),%r14d
mov    0xc(%rsp),%eax
nop
mov    %ecx,0x10(%rsp)
mov    %r15d,%edi
mov    %eax,%esi
mov    %eax,0xc(%rsp)
call   1030 <_mm_add_epi32@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    $0x7,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    $0x19,%esi
call   1070 <_mm_srli_epi32@plt>
mov    %r13d,%edi
mov    %eax,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%r13d
mov    %eax,%edi
mov    %r15d,%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    $0x9,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0x17,%esi
call   1070 <_mm_srli_epi32@plt>
mov    %r14d,%edi
mov    %eax,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%r12d
mov    %eax,%edi
mov    %r13d,%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    $0xd,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    $0x13,%esi
call   1070 <_mm_srli_epi32@plt>
mov    0xc(%rsp),%edi
mov    %eax,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%r14d
mov    %eax,%edi
mov    %r12d,%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    $0x12,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0xe,%esi
call   1070 <_mm_srli_epi32@plt>
mov    %r15d,%edi
mov    %eax,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%r15d
mov    %r13d,%edi
mov    $0x93,%esi
call   1040 <_mm_shuffle_epi32@plt>
mov    %eax,%r13d
mov    %r12d,%edi
mov    $0x4e,%esi
call   1040 <_mm_shuffle_epi32@plt>
mov    %eax,0xc(%rsp)
mov    %r14d,%edi
mov    $0x39,%esi
call   1040 <_mm_shuffle_epi32@plt>
mov    %eax,%r14d
mov    %r15d,%edi
mov    %r13d,%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    $0x7,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    $0x19,%esi
call   1070 <_mm_srli_epi32@plt>
mov    %r14d,%edi
mov    %eax,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%r12d
mov    %eax,%edi
mov    %r15d,%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    $0x9,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0x17,%esi
call   1070 <_mm_srli_epi32@plt>
mov    0xc(%rsp),%edi
mov    %eax,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%r14d
mov    %eax,%edi
mov    %r12d,%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    $0xd,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    $0x13,%esi
call   1070 <_mm_srli_epi32@plt>
mov    %r13d,%edi
mov    %eax,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %r14d,%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    $0x12,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,%r13d
mov    %ebx,%edi
mov    $0xe,%esi
call   1070 <_mm_srli_epi32@plt>
mov    %r15d,%edi
mov    %eax,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%edi
mov    %r13d,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%r15d
mov    %ebp,%edi
mov    $0x39,%esi
call   1040 <_mm_shuffle_epi32@plt>
mov    %eax,%r13d
mov    %r14d,%edi
mov    $0x4e,%esi
call   1040 <_mm_shuffle_epi32@plt>
mov    %eax,%r14d
mov    %r12d,%edi
mov    $0x93,%esi
call   1040 <_mm_shuffle_epi32@plt>
mov    0x10(%rsp),%ecx
add    $0xffffffff,%ecx
jne    1240 <xor_salsa_sidm_swap+0xf0>
jmp    14a6 <xor_salsa_sidm_swap+0x356>
mov    0x10(%rsp),%r15d
mov    0x14(%rsp),%r14d
mov    0xc(%rsp),%eax
mov    %eax,0xc(%rsp)
mov    0x20(%rsp),%r12
mov    (%r12),%edi
mov    %r15d,%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,0x10(%rsp)
mov    0x28(%rsp),%r15
mov    (%r15),%edi
mov    %r13d,%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,0x14(%rsp)
mov    0x30(%rsp),%rbx
mov    (%rbx),%edi
mov    %r14d,%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,%r13d
mov    0x38(%rsp),%rbp
mov    0x0(%rbp),%edi
mov    0xc(%rsp),%esi
call   1030 <_mm_add_epi32@plt>
mov    0x40(%rsp),%rsi
mov    (%rsi),%ecx
mov    %ecx,(%r12)
mov    0x88(%rsp),%r8
mov    (%r8),%ecx
mov    %ecx,(%r15)
mov    0x80(%rsp),%rdi
mov    (%rdi),%ecx
mov    %ecx,(%rbx)
mov    0x18(%rsp),%rdx
mov    (%rdx),%ecx
mov    %ecx,0x0(%rbp)
mov    0x10(%rsp),%ecx
mov    %ecx,(%rsi)
mov    0x14(%rsp),%ecx
mov    %ecx,(%r8)
mov    %r13d,(%rdi)
mov    %eax,(%rdx)
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @xor_salsa_sidm_swap(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32 %8) {
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
store i32* %0, i32** %10
store i32* %1, i32** %11
store i32* %2, i32** %12
store i32* %3, i32** %13
store i32* %4, i32** %14
store i32* %5, i32** %15
store i32* %6, i32** %16
store i32* %7, i32** %17
store i32 %8, i32* %18
%26 = load i32*, i32** %10
%27 = load i32, i32* %26
%28 = load i32*, i32** %14
%29 = load i32, i32* %28
%30 = call i32 @_mm_xor_si128(i32 %27, i32 %29)
store i32 %30, i32* %22
%31 = load i32*, i32** %13
%32 = load i32, i32* %31
%33 = load i32*, i32** %17
%34 = load i32, i32* %33
%35 = call i32 @_mm_xor_si128(i32 %32, i32 %34)
store i32 %35, i32* %23
%36 = load i32*, i32** %12
%37 = load i32, i32* %36
%38 = load i32*, i32** %16
%39 = load i32, i32* %38
%40 = call i32 @_mm_xor_si128(i32 %37, i32 %39)
store i32 %40, i32* %24
%41 = load i32*, i32** %11
%42 = load i32, i32* %41
%43 = load i32*, i32** %15
%44 = load i32, i32* %43
%45 = call i32 @_mm_xor_si128(i32 %42, i32 %44)
store i32 %45, i32* %25
%46 = load i32*, i32** %10
%47 = load i32, i32* %46
%48 = load i32*, i32** %14
%49 = load i32, i32* %48
%50 = call i32 @_mm_xor_si128(i32 %47, i32 %49)
%51 = load i32*, i32** %10
store i32 %50, i32* %51
%52 = load i32*, i32** %13
%53 = load i32, i32* %52
%54 = load i32*, i32** %17
%55 = load i32, i32* %54
%56 = call i32 @_mm_xor_si128(i32 %53, i32 %55)
%57 = load i32*, i32** %13
store i32 %56, i32* %57
%58 = load i32*, i32** %12
%59 = load i32, i32* %58
%60 = load i32*, i32** %16
%61 = load i32, i32* %60
%62 = call i32 @_mm_xor_si128(i32 %59, i32 %61)
%63 = load i32*, i32** %12
store i32 %62, i32* %63
%64 = load i32*, i32** %11
%65 = load i32, i32* %64
%66 = load i32*, i32** %15
%67 = load i32, i32* %66
%68 = call i32 @_mm_xor_si128(i32 %65, i32 %67)
%69 = load i32*, i32** %11
store i32 %68, i32* %69
store i32 0, i32* %19
br label %70
70: ; preds = %191, %9
%71 = load i32, i32* %19
%72 = load i32, i32* %18
%73 = icmp slt i32 %71, %72
br i1 %73, label %74, label %194
74: ; preds = %70
%75 = load i32, i32* %22
%76 = load i32, i32* %25
%77 = call i32 @_mm_add_epi32(i32 %75, i32 %76)
store i32 %77, i32* %20
%78 = load i32, i32* %20
%79 = call i32 @_mm_slli_epi32(i32 %78, i32 7)
store i32 %79, i32* %21
%80 = load i32, i32* %20
%81 = call i32 @_mm_srli_epi32(i32 %80, i32 25)
store i32 %81, i32* %20
%82 = load i32, i32* %23
%83 = load i32, i32* %20
%84 = call i32 @_mm_xor_si128(i32 %82, i32 %83)
store i32 %84, i32* %23
%85 = load i32, i32* %23
%86 = load i32, i32* %21
%87 = call i32 @_mm_xor_si128(i32 %85, i32 %86)
store i32 %87, i32* %23
%88 = load i32, i32* %23
%89 = load i32, i32* %22
%90 = call i32 @_mm_add_epi32(i32 %88, i32 %89)
store i32 %90, i32* %20
%91 = load i32, i32* %20
%92 = call i32 @_mm_slli_epi32(i32 %91, i32 9)
store i32 %92, i32* %21
%93 = load i32, i32* %20
%94 = call i32 @_mm_srli_epi32(i32 %93, i32 23)
store i32 %94, i32* %20
%95 = load i32, i32* %24
%96 = load i32, i32* %20
%97 = call i32 @_mm_xor_si128(i32 %95, i32 %96)
store i32 %97, i32* %24
%98 = load i32, i32* %24
%99 = load i32, i32* %21
%100 = call i32 @_mm_xor_si128(i32 %98, i32 %99)
store i32 %100, i32* %24
%101 = load i32, i32* %24
%102 = load i32, i32* %23
%103 = call i32 @_mm_add_epi32(i32 %101, i32 %102)
store i32 %103, i32* %20
%104 = load i32, i32* %20
%105 = call i32 @_mm_slli_epi32(i32 %104, i32 13)
store i32 %105, i32* %21
%106 = load i32, i32* %20
%107 = call i32 @_mm_srli_epi32(i32 %106, i32 19)
store i32 %107, i32* %20
%108 = load i32, i32* %25
%109 = load i32, i32* %20
%110 = call i32 @_mm_xor_si128(i32 %108, i32 %109)
store i32 %110, i32* %25
%111 = load i32, i32* %25
%112 = load i32, i32* %21
%113 = call i32 @_mm_xor_si128(i32 %111, i32 %112)
store i32 %113, i32* %25
%114 = load i32, i32* %25
%115 = load i32, i32* %24
%116 = call i32 @_mm_add_epi32(i32 %114, i32 %115)
store i32 %116, i32* %20
%117 = load i32, i32* %20
%118 = call i32 @_mm_slli_epi32(i32 %117, i32 18)
store i32 %118, i32* %21
%119 = load i32, i32* %20
%120 = call i32 @_mm_srli_epi32(i32 %119, i32 14)
store i32 %120, i32* %20
%121 = load i32, i32* %22
%122 = load i32, i32* %20
%123 = call i32 @_mm_xor_si128(i32 %121, i32 %122)
store i32 %123, i32* %22
%124 = load i32, i32* %22
%125 = load i32, i32* %21
%126 = call i32 @_mm_xor_si128(i32 %124, i32 %125)
store i32 %126, i32* %22
%127 = load i32, i32* %23
%128 = call i32 @_mm_shuffle_epi32(i32 %127, i32 147)
store i32 %128, i32* %23
%129 = load i32, i32* %24
%130 = call i32 @_mm_shuffle_epi32(i32 %129, i32 78)
store i32 %130, i32* %24
%131 = load i32, i32* %25
%132 = call i32 @_mm_shuffle_epi32(i32 %131, i32 57)
store i32 %132, i32* %25
%133 = load i32, i32* %22
%134 = load i32, i32* %23
%135 = call i32 @_mm_add_epi32(i32 %133, i32 %134)
store i32 %135, i32* %20
%136 = load i32, i32* %20
%137 = call i32 @_mm_slli_epi32(i32 %136, i32 7)
store i32 %137, i32* %21
%138 = load i32, i32* %20
%139 = call i32 @_mm_srli_epi32(i32 %138, i32 25)
store i32 %139, i32* %20
%140 = load i32, i32* %25
%141 = load i32, i32* %20
%142 = call i32 @_mm_xor_si128(i32 %140, i32 %141)
store i32 %142, i32* %25
%143 = load i32, i32* %25
%144 = load i32, i32* %21
%145 = call i32 @_mm_xor_si128(i32 %143, i32 %144)
store i32 %145, i32* %25
%146 = load i32, i32* %25
%147 = load i32, i32* %22
%148 = call i32 @_mm_add_epi32(i32 %146, i32 %147)
store i32 %148, i32* %20
%149 = load i32, i32* %20
%150 = call i32 @_mm_slli_epi32(i32 %149, i32 9)
store i32 %150, i32* %21
%151 = load i32, i32* %20
%152 = call i32 @_mm_srli_epi32(i32 %151, i32 23)
store i32 %152, i32* %20
%153 = load i32, i32* %24
%154 = load i32, i32* %20
%155 = call i32 @_mm_xor_si128(i32 %153, i32 %154)
store i32 %155, i32* %24
%156 = load i32, i32* %24
%157 = load i32, i32* %21
%158 = call i32 @_mm_xor_si128(i32 %156, i32 %157)
store i32 %158, i32* %24
%159 = load i32, i32* %24
%160 = load i32, i32* %25
%161 = call i32 @_mm_add_epi32(i32 %159, i32 %160)
store i32 %161, i32* %20
%162 = load i32, i32* %20
%163 = call i32 @_mm_slli_epi32(i32 %162, i32 13)
store i32 %163, i32* %21
%164 = load i32, i32* %20
%165 = call i32 @_mm_srli_epi32(i32 %164, i32 19)
store i32 %165, i32* %20
%166 = load i32, i32* %23
%167 = load i32, i32* %20
%168 = call i32 @_mm_xor_si128(i32 %166, i32 %167)
store i32 %168, i32* %23
%169 = load i32, i32* %23
%170 = load i32, i32* %21
%171 = call i32 @_mm_xor_si128(i32 %169, i32 %170)
store i32 %171, i32* %23
%172 = load i32, i32* %23
%173 = load i32, i32* %24
%174 = call i32 @_mm_add_epi32(i32 %172, i32 %173)
store i32 %174, i32* %20
%175 = load i32, i32* %20
%176 = call i32 @_mm_slli_epi32(i32 %175, i32 18)
store i32 %176, i32* %21
%177 = load i32, i32* %20
%178 = call i32 @_mm_srli_epi32(i32 %177, i32 14)
store i32 %178, i32* %20
%179 = load i32, i32* %22
%180 = load i32, i32* %20
%181 = call i32 @_mm_xor_si128(i32 %179, i32 %180)
store i32 %181, i32* %22
%182 = load i32, i32* %22
%183 = load i32, i32* %21
%184 = call i32 @_mm_xor_si128(i32 %182, i32 %183)
store i32 %184, i32* %22
%185 = load i32, i32* %23
%186 = call i32 @_mm_shuffle_epi32(i32 %185, i32 57)
store i32 %186, i32* %23
%187 = load i32, i32* %24
%188 = call i32 @_mm_shuffle_epi32(i32 %187, i32 78)
store i32 %188, i32* %24
%189 = load i32, i32* %25
%190 = call i32 @_mm_shuffle_epi32(i32 %189, i32 147)
store i32 %190, i32* %25
br label %191
191: ; preds = %74
%192 = load i32, i32* %19
%193 = add nsw i32 %192, 1
store i32 %193, i32* %19
br label %70
194: ; preds = %70
%195 = load i32*, i32** %10
%196 = load i32, i32* %195
%197 = load i32, i32* %22
%198 = call i32 @_mm_add_epi32(i32 %196, i32 %197)
store i32 %198, i32* %22
%199 = load i32*, i32** %13
%200 = load i32, i32* %199
%201 = load i32, i32* %23
%202 = call i32 @_mm_add_epi32(i32 %200, i32 %201)
store i32 %202, i32* %23
%203 = load i32*, i32** %12
%204 = load i32, i32* %203
%205 = load i32, i32* %24
%206 = call i32 @_mm_add_epi32(i32 %204, i32 %205)
store i32 %206, i32* %24
%207 = load i32*, i32** %11
%208 = load i32, i32* %207
%209 = load i32, i32* %25
%210 = call i32 @_mm_add_epi32(i32 %208, i32 %209)
store i32 %210, i32* %25
%211 = load i32*, i32** %14
%212 = load i32, i32* %211
%213 = load i32*, i32** %10
store i32 %212, i32* %213
%214 = load i32*, i32** %17
%215 = load i32, i32* %214
%216 = load i32*, i32** %13
store i32 %215, i32* %216
%217 = load i32*, i32** %16
%218 = load i32, i32* %217
%219 = load i32*, i32** %12
store i32 %218, i32* %219
%220 = load i32*, i32** %15
%221 = load i32, i32* %220
%222 = load i32*, i32** %11
store i32 %221, i32* %222
%223 = load i32, i32* %22
%224 = load i32*, i32** %14
store i32 %223, i32* %224
%225 = load i32, i32* %23
%226 = load i32*, i32** %17
store i32 %225, i32* %226
%227 = load i32, i32* %24
%228 = load i32*, i32** %16
store i32 %227, i32* %228
%229 = load i32, i32* %25
%230 = load i32*, i32** %15
store i32 %229, i32* %230
ret void
}

LLVM IR (-O2):
define void @xor_salsa_sidm_swap(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3, i32* nocapture %4, i32* nocapture %5, i32* nocapture %6, i32* nocapture %7, i32 %8) {
%10 = load i32, i32* %0
%11 = load i32, i32* %4
%12 = tail call i32 @_mm_xor_si128(i32 %10, i32 %11)
%13 = load i32, i32* %3
%14 = load i32, i32* %7
%15 = tail call i32 @_mm_xor_si128(i32 %13, i32 %14)
%16 = load i32, i32* %2
%17 = load i32, i32* %6
%18 = tail call i32 @_mm_xor_si128(i32 %16, i32 %17)
%19 = load i32, i32* %1
%20 = load i32, i32* %5
%21 = tail call i32 @_mm_xor_si128(i32 %19, i32 %20)
%22 = load i32, i32* %0
%23 = load i32, i32* %4
%24 = tail call i32 @_mm_xor_si128(i32 %22, i32 %23)
store i32 %24, i32* %0
%25 = load i32, i32* %3
%26 = load i32, i32* %7
%27 = tail call i32 @_mm_xor_si128(i32 %25, i32 %26)
store i32 %27, i32* %3
%28 = load i32, i32* %2
%29 = load i32, i32* %6
%30 = tail call i32 @_mm_xor_si128(i32 %28, i32 %29)
store i32 %30, i32* %2
%31 = load i32, i32* %1
%32 = load i32, i32* %5
%33 = tail call i32 @_mm_xor_si128(i32 %31, i32 %32)
store i32 %33, i32* %1
%34 = icmp sgt i32 %8, 0
br i1 %34, label %35, label %89
35: ; preds = %9, %35
%36 = phi i32 [ %86, %35 ], [ %21, %9 ]
%37 = phi i32 [ %85, %35 ], [ %18, %9 ]
%38 = phi i32 [ %84, %35 ], [ %15, %9 ]
%39 = phi i32 [ %83, %35 ], [ %12, %9 ]
%40 = phi i32 [ %87, %35 ], [ 0, %9 ]
%41 = tail call i32 @_mm_add_epi32(i32 %39, i32 %36)
%42 = tail call i32 @_mm_slli_epi32(i32 %41, i32 7)
%43 = tail call i32 @_mm_srli_epi32(i32 %41, i32 25)
%44 = tail call i32 @_mm_xor_si128(i32 %38, i32 %43)
%45 = tail call i32 @_mm_xor_si128(i32 %44, i32 %42)
%46 = tail call i32 @_mm_add_epi32(i32 %45, i32 %39)
%47 = tail call i32 @_mm_slli_epi32(i32 %46, i32 9)
%48 = tail call i32 @_mm_srli_epi32(i32 %46, i32 23)
%49 = tail call i32 @_mm_xor_si128(i32 %37, i32 %48)
%50 = tail call i32 @_mm_xor_si128(i32 %49, i32 %47)
%51 = tail call i32 @_mm_add_epi32(i32 %50, i32 %45)
%52 = tail call i32 @_mm_slli_epi32(i32 %51, i32 13)
%53 = tail call i32 @_mm_srli_epi32(i32 %51, i32 19)
%54 = tail call i32 @_mm_xor_si128(i32 %36, i32 %53)
%55 = tail call i32 @_mm_xor_si128(i32 %54, i32 %52)
%56 = tail call i32 @_mm_add_epi32(i32 %55, i32 %50)
%57 = tail call i32 @_mm_slli_epi32(i32 %56, i32 18)
%58 = tail call i32 @_mm_srli_epi32(i32 %56, i32 14)
%59 = tail call i32 @_mm_xor_si128(i32 %39, i32 %58)
%60 = tail call i32 @_mm_xor_si128(i32 %59, i32 %57)
%61 = tail call i32 @_mm_shuffle_epi32(i32 %45, i32 147)
%62 = tail call i32 @_mm_shuffle_epi32(i32 %50, i32 78)
%63 = tail call i32 @_mm_shuffle_epi32(i32 %55, i32 57)
%64 = tail call i32 @_mm_add_epi32(i32 %60, i32 %61)
%65 = tail call i32 @_mm_slli_epi32(i32 %64, i32 7)
%66 = tail call i32 @_mm_srli_epi32(i32 %64, i32 25)
%67 = tail call i32 @_mm_xor_si128(i32 %63, i32 %66)
%68 = tail call i32 @_mm_xor_si128(i32 %67, i32 %65)
%69 = tail call i32 @_mm_add_epi32(i32 %68, i32 %60)
%70 = tail call i32 @_mm_slli_epi32(i32 %69, i32 9)
%71 = tail call i32 @_mm_srli_epi32(i32 %69, i32 23)
%72 = tail call i32 @_mm_xor_si128(i32 %62, i32 %71)
%73 = tail call i32 @_mm_xor_si128(i32 %72, i32 %70)
%74 = tail call i32 @_mm_add_epi32(i32 %73, i32 %68)
%75 = tail call i32 @_mm_slli_epi32(i32 %74, i32 13)
%76 = tail call i32 @_mm_srli_epi32(i32 %74, i32 19)
%77 = tail call i32 @_mm_xor_si128(i32 %61, i32 %76)
%78 = tail call i32 @_mm_xor_si128(i32 %77, i32 %75)
%79 = tail call i32 @_mm_add_epi32(i32 %78, i32 %73)
%80 = tail call i32 @_mm_slli_epi32(i32 %79, i32 18)
%81 = tail call i32 @_mm_srli_epi32(i32 %79, i32 14)
%82 = tail call i32 @_mm_xor_si128(i32 %60, i32 %81)
%83 = tail call i32 @_mm_xor_si128(i32 %82, i32 %80)
%84 = tail call i32 @_mm_shuffle_epi32(i32 %78, i32 57)
%85 = tail call i32 @_mm_shuffle_epi32(i32 %73, i32 78)
%86 = tail call i32 @_mm_shuffle_epi32(i32 %68, i32 147)
%87 = add nuw nsw i32 %40, 1
%88 = icmp eq i32 %87, %8
br i1 %88, label %89, label %35
89: ; preds = %35, %9
%90 = phi i32 [ %12, %9 ], [ %83, %35 ]
%91 = phi i32 [ %15, %9 ], [ %84, %35 ]
%92 = phi i32 [ %18, %9 ], [ %85, %35 ]
%93 = phi i32 [ %21, %9 ], [ %86, %35 ]
%94 = load i32, i32* %0
%95 = tail call i32 @_mm_add_epi32(i32 %94, i32 %90)
%96 = load i32, i32* %3
%97 = tail call i32 @_mm_add_epi32(i32 %96, i32 %91)
%98 = load i32, i32* %2
%99 = tail call i32 @_mm_add_epi32(i32 %98, i32 %92)
%100 = load i32, i32* %1
%101 = tail call i32 @_mm_add_epi32(i32 %100, i32 %93)
%102 = load i32, i32* %4
store i32 %102, i32* %0
%103 = load i32, i32* %7
store i32 %103, i32* %3
%104 = load i32, i32* %6
store i32 %104, i32* %2
%105 = load i32, i32* %5
store i32 %105, i32* %1
store i32 %95, i32* %4
store i32 %97, i32* %7
store i32 %99, i32* %6
store i32 %101, i32* %5
ret void
}