// File: /workspace/github_c_makefile_star2_O1/agl[P]obstcp/salsa208.c
// Function: salsa208
void salsa208(
        unsigned char *out,
  const unsigned char *in,
  const unsigned char *k,
  const unsigned char *c
)
{
  uint32 x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15;
  uint32 j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11, j12, j13, j14, j15;
  int i;

  j0 = x0 = load_littleendian(c + 0);
  j1 = x1 = load_littleendian(k + 0);
  j2 = x2 = load_littleendian(k + 4);
  j3 = x3 = load_littleendian(k + 8);
  j4 = x4 = load_littleendian(k + 12);
  j5 = x5 = load_littleendian(c + 4);
  j6 = x6 = load_littleendian(in + 0);
  j7 = x7 = load_littleendian(in + 4);
  j8 = x8 = load_littleendian(in + 8);
  j9 = x9 = load_littleendian(in + 12);
  j10 = x10 = load_littleendian(c + 8);
  j11 = x11 = load_littleendian(k + 16);
  j12 = x12 = load_littleendian(k + 20);
  j13 = x13 = load_littleendian(k + 24);
  j14 = x14 = load_littleendian(k + 28);
  j15 = x15 = load_littleendian(c + 12);

  for (i = ROUNDS;i > 0;i -= 2) {
     x4 ^= rotate( x0+x12, 7);
     x8 ^= rotate( x4+ x0, 9);
    x12 ^= rotate( x8+ x4,13);
     x0 ^= rotate(x12+ x8,18);
     x9 ^= rotate( x5+ x1, 7);
    x13 ^= rotate( x9+ x5, 9);
     x1 ^= rotate(x13+ x9,13);
     x5 ^= rotate( x1+x13,18);
    x14 ^= rotate(x10+ x6, 7);
     x2 ^= rotate(x14+x10, 9);
     x6 ^= rotate( x2+x14,13);
    x10 ^= rotate( x6+ x2,18);
     x3 ^= rotate(x15+x11, 7);
     x7 ^= rotate( x3+x15, 9);
    x11 ^= rotate( x7+ x3,13);
    x15 ^= rotate(x11+ x7,18);
     x1 ^= rotate( x0+ x3, 7);
     x2 ^= rotate( x1+ x0, 9);
     x3 ^= rotate( x2+ x1,13);
     x0 ^= rotate( x3+ x2,18);
     x6 ^= rotate( x5+ x4, 7);
     x7 ^= rotate( x6+ x5, 9);
     x4 ^= rotate( x7+ x6,13);
     x5 ^= rotate( x4+ x7,18);
    x11 ^= rotate(x10+ x9, 7);
     x8 ^= rotate(x11+x10, 9);
     x9 ^= rotate( x8+x11,13);
    x10 ^= rotate( x9+ x8,18);
    x12 ^= rotate(x15+x14, 7);
    x13 ^= rotate(x12+x15, 9);
    x14 ^= rotate(x13+x12,13);
    x15 ^= rotate(x14+x13,18);
  }

  x0 += j0;
  x1 += j1;
  x2 += j2;
  x3 += j3;
  x4 += j4;
  x5 += j5;
  x6 += j6;
  x7 += j7;
  x8 += j8;
  x9 += j9;
  x10 += j10;
  x11 += j11;
  x12 += j12;
  x13 += j13;
  x14 += j14;
  x15 += j15;

  store_littleendian(out + 0,x0);
  store_littleendian(out + 4,x1);
  store_littleendian(out + 8,x2);
  store_littleendian(out + 12,x3);
  store_littleendian(out + 16,x4);
  store_littleendian(out + 20,x5);
  store_littleendian(out + 24,x6);
  store_littleendian(out + 28,x7);
  store_littleendian(out + 32,x8);
  store_littleendian(out + 36,x9);
  store_littleendian(out + 40,x10);
  store_littleendian(out + 44,x11);
  store_littleendian(out + 48,x12);
  store_littleendian(out + 52,x13);
  store_littleendian(out + 56,x14);
  store_littleendian(out + 60,x15);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, -0x8(%rsp)
movl (%rcx), %r9d
movl (%rdx), %r8d
movl 0x4(%rdx), %eax
movl 0x8(%rdx), %r13d
movl 0xc(%rdx), %r12d
movl (%rsi), %r14d
movl 0x4(%rsi), %ebp
movl 0x8(%rsi), %edi
movl %edi, -0x80(%rsp)
movl 0xc(%rsi), %ebx
movl 0x10(%rdx), %r10d
movl 0x14(%rdx), %r15d
movl 0x18(%rdx), %esi
movl %esi, -0x7c(%rsp)
movl 0x1c(%rdx), %edx
movl %edx, -0x78(%rsp)
movl 0x4(%rcx), %edi
movl 0x8(%rcx), %r11d
movl 0xc(%rcx), %esi
movl $0xa, -0x74(%rsp)
movl %r9d, -0x3c(%rsp)
movl %r9d, %edx
movl %r8d, -0x38(%rsp)
movl %r8d, %ecx
movq %rcx, -0x70(%rsp)
movl %eax, -0x34(%rsp)
movq %rax, -0x60(%rsp)
movl %r13d, -0x30(%rsp)
movl %r13d, %eax
movq %rax, -0x58(%rsp)
movl %r12d, -0x2c(%rsp)
movl %r12d, %ecx
movl %edi, -0x28(%rsp)
movl %edi, %r9d
movl %r14d, -0x24(%rsp)
movl %r14d, %eax
movq %rax, -0x68(%rsp)
movl %ebp, -0x20(%rsp)
movl %ebp, %eax
movq %rax, -0x48(%rsp)
movl -0x80(%rsp), %eax
movl %ebx, -0x1c(%rsp)
movl %ebx, %r8d
movl %r11d, -0x18(%rsp)
movl %r11d, %r13d
movl %r10d, -0x14(%rsp)
movl %r10d, %edi
movq %rdi, -0x50(%rsp)
movl %r15d, -0x10(%rsp)
movl -0x7c(%rsp), %edi
movl %edi, %ebp
movl -0x78(%rsp), %edi
movl %esi, -0xc(%rsp)
movl %esi, %ebx
leal (%rdx,%r15), %r12d
roll $0x7, %r12d
xorl %ecx, %r12d
leal (%r12,%rdx), %ecx
roll $0x9, %ecx
xorl %eax, %ecx
movq %rcx, 0x10(%rsp)
leal (%rcx,%r12), %eax
roll $0xd, %eax
xorl %r15d, %eax
movq %rax, 0x20(%rsp)
addl %ecx, %eax
roll $0x12, %eax
movq %rax, %r10
movq %r9, %r11
movq -0x70(%rsp), %rax
leal (%rax,%r9), %ecx
roll $0x7, %ecx
xorl %r8d, %ecx
movq %rcx, 0x8(%rsp)
leal (%rcx,%r9), %esi
roll $0x9, %esi
xorl %ebp, %esi
movq %rsi, 0x18(%rsp)
leal (%rsi,%rcx), %r9d
roll $0xd, %r9d
xorl %eax, %r9d
leal (%r9,%rsi), %r15d
roll $0x12, %r15d
xorl %edx, %r10d
movq %r10, %rcx
movq -0x68(%rsp), %rax
leal (%rax,%r13), %ebp
roll $0x7, %ebp
xorl %edi, %ebp
leal (%rbp,%r13), %edx
roll $0x9, %edx
xorl -0x60(%rsp), %edx
leal (%rdx,%rbp), %esi
roll $0xd, %esi
xorl %eax, %esi
leal (%rsi,%rdx), %r14d
roll $0x12, %r14d
xorl %r11d, %r15d
movq %rbx, %r10
movq -0x50(%rsp), %r11
addl %r11d, %ebx
roll $0x7, %ebx
xorl -0x58(%rsp), %ebx
leal (%rbx,%r10), %edi
roll $0x9, %edi
xorl -0x48(%rsp), %edi
leal (%rdi,%rbx), %r8d
roll $0xd, %r8d
xorl %r11d, %r8d
leal (%r8,%rdi), %r11d
roll $0x12, %r11d
xorl %r13d, %r14d
movq %rcx, (%rsp)
leal (%rcx,%rbx), %eax
roll $0x7, %eax
xorl %r9d, %eax
leal (%rax,%rcx), %r13d
roll $0x9, %r13d
xorl %edx, %r13d
movq %rax, -0x70(%rsp)
leal (%rax,%r13), %ecx
roll $0xd, %ecx
xorl %ebx, %ecx
movq %rcx, -0x58(%rsp)
movq %r13, -0x60(%rsp)
leal (%rcx,%r13), %edx
roll $0x12, %edx
xorl %r10d, %r11d
leal (%r15,%r12), %ecx
roll $0x7, %ecx
xorl %esi, %ecx
leal (%rcx,%r15), %esi
roll $0x9, %esi
xorl %edi, %esi
movq %rcx, -0x68(%rsp)
addl %esi, %ecx
roll $0xd, %ecx
xorl %r12d, %ecx
movq %rsi, -0x48(%rsp)
leal (%rcx,%rsi), %r9d
roll $0x12, %r9d
xorl (%rsp), %edx
movq 0x8(%rsp), %rdi
leal (%r14,%rdi), %esi
roll $0x7, %esi
xorl %r8d, %esi
leal (%rsi,%r14), %eax
roll $0x9, %eax
xorl 0x10(%rsp), %eax
movq %rsi, -0x50(%rsp)
addl %eax, %esi
roll $0xd, %esi
xorl %edi, %esi
movq %rsi, %r8
leal (%rsi,%rax), %r13d
roll $0x12, %r13d
xorl %r15d, %r9d
leal (%r11,%rbp), %esi
roll $0x7, %esi
xorl 0x20(%rsp), %esi
leal (%rsi,%r11), %r10d
roll $0x9, %r10d
xorl 0x18(%rsp), %r10d
movq %rsi, %r15
addl %r10d, %esi
roll $0xd, %esi
xorl %ebp, %esi
movq %rsi, %rdi
movq %r10, %rbp
leal (%rsi,%r10), %ebx
roll $0x12, %ebx
xorl %r14d, %r13d
xorl %r11d, %ebx
movl -0x74(%rsp), %esi
addl $-0x2, %esi
movl %esi, -0x74(%rsp)
cmpl $0x2, %esi
ja 0x39db
addl -0x3c(%rsp), %edx
movq -0x8(%rsp), %rsi
movb %dl, (%rsi)
movb %dh, 0x1(%rsi)
movq %rsi, %r10
movl %edx, %esi
shrl $0x10, %esi
movb %sil, 0x2(%r10)
shrl $0x18, %edx
movq %r10, %rsi
movb %dl, 0x3(%r10)
movq -0x70(%rsp), %rdx
addl -0x38(%rsp), %edx
movb %dl, 0x4(%r10)
movb %dh, 0x5(%rsi)
movq %rdx, %r10
shrl $0x10, %edx
movb %dl, 0x6(%rsi)
shrl $0x18, %r10d
movb %r10b, 0x7(%rsi)
movq -0x60(%rsp), %rdx
addl -0x34(%rsp), %edx
movb %dl, 0x8(%rsi)
movb %dh, 0x9(%rsi)
movq %rdx, %r10
shrl $0x10, %edx
movb %dl, 0xa(%rsi)
shrl $0x18, %r10d
movb %r10b, 0xb(%rsi)
movq -0x58(%rsp), %rdx
addl -0x30(%rsp), %edx
movb %dl, 0xc(%rsi)
movb %dh, 0xd(%rsi)
movq %rdx, %r10
shrl $0x10, %edx
movb %dl, 0xe(%rsi)
shrl $0x18, %r10d
movb %r10b, 0xf(%rsi)
addl -0x2c(%rsp), %ecx
movb %cl, 0x10(%rsi)
movb %ch, 0x11(%rsi)
movl %ecx, %edx
shrl $0x10, %edx
movb %dl, 0x12(%rsi)
shrl $0x18, %ecx
movb %cl, 0x13(%rsi)
movq %r9, %rdx
addl -0x28(%rsp), %edx
movb %dl, 0x14(%rsi)
movb %dh, 0x15(%rsi)
movl %edx, %ecx
shrl $0x10, %ecx
movb %cl, 0x16(%rsi)
shrl $0x18, %edx
movb %dl, 0x17(%rsi)
movq -0x68(%rsp), %rdx
addl -0x24(%rsp), %edx
movb %dl, 0x18(%rsi)
movb %dh, 0x19(%rsi)
movl %edx, %ecx
shrl $0x10, %ecx
movb %cl, 0x1a(%rsi)
shrl $0x18, %edx
movb %dl, 0x1b(%rsi)
movq -0x48(%rsp), %rdx
addl -0x20(%rsp), %edx
movb %dl, 0x1c(%rsi)
movb %dh, 0x1d(%rsi)
movl %edx, %ecx
shrl $0x10, %ecx
movb %cl, 0x1e(%rsi)
shrl $0x18, %edx
movb %dl, 0x1f(%rsi)
addl -0x80(%rsp), %eax
movb %al, 0x20(%rsi)
movb %ah, 0x21(%rsi)
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, 0x22(%rsi)
shrl $0x18, %eax
movb %al, 0x23(%rsi)
movq %r8, %rcx
addl -0x1c(%rsp), %ecx
movb %cl, 0x24(%rsi)
movb %ch, 0x25(%rsi)
movl %ecx, %eax
shrl $0x10, %eax
movb %al, 0x26(%rsi)
shrl $0x18, %ecx
movb %cl, 0x27(%rsi)
movq %r13, %rcx
addl -0x18(%rsp), %ecx
movb %cl, 0x28(%rsi)
movb %ch, 0x29(%rsi)
movl %ecx, %eax
shrl $0x10, %eax
movb %al, 0x2a(%rsi)
shrl $0x18, %ecx
movb %cl, 0x2b(%rsi)
movq -0x50(%rsp), %rcx
addl -0x14(%rsp), %ecx
movb %cl, 0x2c(%rsi)
movb %ch, 0x2d(%rsi)
movl %ecx, %eax
shrl $0x10, %eax
movb %al, 0x2e(%rsi)
shrl $0x18, %ecx
movb %cl, 0x2f(%rsi)
movq %r15, %rcx
addl -0x10(%rsp), %ecx
movb %cl, 0x30(%rsi)
movb %ch, 0x31(%rsi)
movl %ecx, %eax
shrl $0x10, %eax
movb %al, 0x32(%rsi)
shrl $0x18, %ecx
movb %cl, 0x33(%rsi)
movq %rbp, %rcx
addl -0x7c(%rsp), %ecx
movb %cl, 0x34(%rsi)
movb %ch, 0x35(%rsi)
movl %ecx, %eax
shrl $0x10, %eax
movb %al, 0x36(%rsi)
shrl $0x18, %ecx
movb %cl, 0x37(%rsi)
movq %rdi, %rcx
addl -0x78(%rsp), %ecx
movb %cl, 0x38(%rsi)
movb %ch, 0x39(%rsi)
movl %ecx, %eax
shrl $0x10, %eax
movb %al, 0x3a(%rsi)
shrl $0x18, %ecx
movb %cl, 0x3b(%rsi)
addl -0xc(%rsp), %ebx
movb %bl, 0x3c(%rsi)
movb %bh, 0x3d(%rsi)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, 0x3e(%rsi)
shrl $0x18, %ebx
movb %bl, 0x3f(%rsi)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)