user: Translate the below assembly code into C programming language:

```asm
<neoscrypt_blkmix>:
  endbr64
  push   %r15
  mov    %ecx,%r10d
  push   %r14
  sar    $0x8,%r10d
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  movzbl %cl,%ebp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rsi,0x8(%rsp)
  cmp    $0x1,%edx
  je     L165
  mov    %edx,%ebx
  cmp    $0x2,%edx
  je     L102
  lea    (%rdx,%rdx,1),%eax
  mov    %eax,0x18(%rsp)
  test   %eax,%eax
  jle    L117
  sub    $0x1,%eax
  mov    %rsi,%r13
  lea    -0x40(%rdi),%r14
  shl    $0x4,%eax
  cltq
  lea    (%rdi,%rax,4),%rax
  mov    %rax,0x10(%rsp)
  test   %r10d,%r10d
  je     L83
  xor    %ecx,%ecx
L128:
  lea    0x40(%r14),%r15
  test   %ecx,%ecx
  jne    L70
L4:
  mov    0x10(%rsp),%rsi
  mov    $0x40,%edx
  mov    %r12,%rdi
  sub    $0xffffffffffffff80,%r14
  call   <neoscrypt_blkxor@plt>
  mov    %r15,%rdi
  mov    %ebp,%esi
  call   <neoscrypt_chacha@plt>
  mov    %r15,%rsi
  mov    %r13,%rdi
  mov    $0x40,%edx
  call   <neoscrypt_blkcpy@plt>
  mov    $0x40,%edx
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %ebp,%esi
  mov    %r14,%rdi
  lea    0x40(%r14),%r15
  call   <neoscrypt_chacha@plt>
  lea    0x40(%r13),%rdi
  mov    $0x40,%edx
  mov    %r14,%rsi
  call   <neoscrypt_blkcpy@plt>
  mov    $0x2,%ecx
  sub    $0xffffffffffffff80,%r13
  test   %ecx,%ecx
  je     L4
L70:
  mov    $0x40,%edx
  mov    %r14,%rsi
  mov    %r15,%rdi
  mov    %ecx,0x1c(%rsp)
  call   <neoscrypt_blkxor@plt>
  mov    %ebp,%esi
  mov    %r15,%rdi
  call   <neoscrypt_chacha@plt>
  mov    %r13,%rdi
  mov    $0x40,%edx
  mov    %r15,%rsi
  call   <neoscrypt_blkcpy@plt>
  mov    0x1c(%rsp),%ecx
  add    $0x40,%r13
  add    $0x1,%ecx
  cmp    0x18(%rsp),%ecx
  je     L117
  mov    %r15,%r14
  jmp    L128
  nopl   0x0(%rax)
L62:
  mov    $0x40,%edx
  mov    %r14,%rsi
  mov    %r15,%rdi
  mov    %r10d,0x1c(%rsp)
  call   <neoscrypt_blkxor@plt>
  mov    %ebp,%esi
  mov    %r15,%rdi
  call   <neoscrypt_salsa@plt>
  mov    %r13,%rdi
  mov    $0x40,%edx
  mov    %r15,%rsi
  call   <neoscrypt_blkcpy@plt>
  mov    0x1c(%rsp),%r10d
  add    $0x40,%r13
  add    $0x1,%r10d
  cmp    %r10d,0x18(%rsp)
  je     L117
  mov    %r15,%r14
L83:
  lea    0x40(%r14),%r15
  test   %r10d,%r10d
  jne    L62
L94:
  mov    0x10(%rsp),%rsi
  mov    $0x40,%edx
  mov    %r12,%rdi
  sub    $0xffffffffffffff80,%r14
  call   <neoscrypt_blkxor@plt>
  mov    %r15,%rdi
  mov    %ebp,%esi
  call   <neoscrypt_salsa@plt>
  mov    %r15,%rsi
  mov    %r13,%rdi
  mov    $0x40,%edx
  call   <neoscrypt_blkcpy@plt>
  mov    $0x40,%edx
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %ebp,%esi
  mov    %r14,%rdi
  lea    0x40(%r14),%r15
  call   <neoscrypt_salsa@plt>
  lea    0x40(%r13),%rdi
  mov    $0x40,%edx
  mov    %r14,%rsi
  call   <neoscrypt_blkcpy@plt>
  mov    $0x2,%r10d
  sub    $0xffffffffffffff80,%r13
  test   %r10d,%r10d
  je     L94
  jmp    L62
  cs nopw 0x0(%rax,%rax,1)
L117:
  test   %ebx,%ebx
  jle    L33
  lea    -0x1(%rbx),%r13d
  mov    0x8(%rsp),%r15
  mov    %r12,%rbp
  mov    %r13,%rax
  shl    $0x6,%rax
  lea    0x40(%r12,%rax,1),%r14
  nopl   0x0(%rax)
L39:
  mov    %r15,%rsi
  mov    %rbp,%rdi
  mov    $0x40,%edx
  add    $0x40,%rbp
  call   <neoscrypt_blkcpy@plt>
  sub    $0xffffffffffffff80,%r15
  cmp    %rbp,%r14
  jne    L39
  mov    0x8(%rsp),%rax
  shl    $0x4,%ebx
  shl    $0x7,%r13
  movslq %ebx,%rbx
  lea    (%r12,%rbx,4),%rbp
  lea    0x40(%rax),%rbx
  lea    0xc0(%rax,%r13,1),%r12
  nopl   0x0(%rax)
L100:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    $0x40,%edx
  sub    $0xffffffffffffff80,%rbx
  call   <neoscrypt_blkcpy@plt>
  add    $0x40,%rbp
  cmp    %rbx,%r12
  jne    L100
L33:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L165:
  lea    0x40(%rdi),%r13
  mov    $0x40,%edx
  mov    %r10d,0x18(%rsp)
  mov    %r13,%rsi
  call   <neoscrypt_blkxor@plt>
  mov    0x18(%rsp),%r10d
  mov    %ebp,%esi
  mov    %r12,%rdi
  test   %r10d,%r10d
  je     L41
  call   <neoscrypt_chacha@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  mov    $0x40,%edx
  call   <neoscrypt_blkxor@plt>
  add    $0x28,%rsp
  mov    %ebp,%esi
  mov    %r13,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10c0 <neoscrypt_chacha@plt>
  cs nopw 0x0(%rax,%rax,1)
L102:
  mov    $0x40,%edx
  lea    0xc0(%rdi),%r15
  mov    %r10d,0x18(%rsp)
  lea    0x80(%r12),%r14
  mov    %r15,%rsi
  lea    0x40(%r12),%r13
  call   <neoscrypt_blkxor@plt>
  mov    0x18(%rsp),%r10d
  mov    %ebp,%esi
  mov    %r12,%rdi
  test   %r10d,%r10d
  je     L16
  call   <neoscrypt_chacha@plt>
  mov    $0x40,%edx
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <neoscrypt_chacha@plt>
  mov    $0x40,%edx
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %ebp,%esi
  mov    %r14,%rdi
  call   <neoscrypt_chacha@plt>
  mov    %r14,%rsi
  mov    %r15,%rdi
  mov    $0x40,%edx
  call   <neoscrypt_blkxor@plt>
  mov    %ebp,%esi
  mov    %r15,%rdi
  call   <neoscrypt_chacha@plt>
L56:
  add    $0x28,%rsp
  mov    %r14,%rsi
  mov    %r13,%rdi
  mov    $0x40,%edx
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10d0 <neoscrypt_blkswp@plt>
L41:
  call   <neoscrypt_salsa@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  mov    $0x40,%edx
  call   <neoscrypt_blkxor@plt>
  add    $0x28,%rsp
  mov    %ebp,%esi
  mov    %r13,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <neoscrypt_salsa@plt>
L16:
  call   <neoscrypt_salsa@plt>
  mov    $0x40,%edx
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <neoscrypt_salsa@plt>
  mov    $0x40,%edx
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %ebp,%esi
  mov    %r14,%rdi
  call   <neoscrypt_salsa@plt>
  mov    %r14,%rsi
  mov    %r15,%rdi
  mov    $0x40,%edx
  call   <neoscrypt_blkxor@plt>
  mov    %ebp,%esi
  mov    %r15,%rdi
  call   <neoscrypt_salsa@plt>
  jmp    L56
```

assistant: ```c
void neoscrypt_blkmix(uint *X, uint *Y, uint r, uint mixmode) {
  uint i, mixer, rounds;
  mixer = mixmode >> 8;
  rounds = mixmode & 0xFF;
  if (r == 1) {
    neoscrypt_blkxor(&X[0], &X[16], 64);
    if (mixer)
      neoscrypt_chacha(&X[0], rounds);
    else
      neoscrypt_salsa(&X[0], rounds);
    neoscrypt_blkxor(&X[16], &X[0], 64);
    if (mixer)
      neoscrypt_chacha(&X[16], rounds);
    else
      neoscrypt_salsa(&X[16], rounds);
    return;
  }
  if (r == 2) {
    neoscrypt_blkxor(&X[0], &X[48], 64);
    if (mixer)
      neoscrypt_chacha(&X[0], rounds);
    else
      neoscrypt_salsa(&X[0], rounds);
    neoscrypt_blkxor(&X[16], &X[0], 64);
    if (mixer)
      neoscrypt_chacha(&X[16], rounds);
    else
      neoscrypt_salsa(&X[16], rounds);
    neoscrypt_blkxor(&X[32], &X[16], 64);
    if (mixer)
      neoscrypt_chacha(&X[32], rounds);
    else
      neoscrypt_salsa(&X[32], rounds);
    neoscrypt_blkxor(&X[48], &X[32], 64);
    if (mixer)
      neoscrypt_chacha(&X[48], rounds);
    else
      neoscrypt_salsa(&X[48], rounds);
    neoscrypt_blkswp(&X[16], &X[32], 64);
    return;
  }
  for (i = 0; i < 2 * r; i++) {
    if (i)
      neoscrypt_blkxor(&X[16 * i], &X[16 * (i - 1)], 64);
    else
      neoscrypt_blkxor(&X[0], &X[16 * (2 * r - 1)], 64);
    if (mixer)
      neoscrypt_chacha(&X[16 * i], rounds);
    else
      neoscrypt_salsa(&X[16 * i], rounds);
    neoscrypt_blkcpy(&Y[16 * i], &X[16 * i], 64);
  }
  for (i = 0; i < r; i++)
    neoscrypt_blkcpy(&X[16 * i], &Y[16 * 2 * i], 64);
  for (i = 0; i < r; i++)
    neoscrypt_blkcpy(&X[16 * (i + r)], &Y[16 * (2 * i + 1)], 64);
}
```