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

```asm
<neoscrypt_blkmix>:
  endbr64
  push   %r15
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  shr    $0x8,%r14d
  movzbl %cl,%r13d
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  cmp    $0x1,%edx
  je     L46
  mov    %edx,%ebx
  cmp    $0x2,%edx
  je     L72
  mov    %edx,%eax
  mov    %rsi,%r12
  add    %eax,%eax
  mov    %eax,0x4(%rsp)
  je     L15
  mov    %edx,%eax
  shl    $0x5,%eax
  sub    $0x10,%eax
  lea    (%rdi,%rax,4),%rax
  mov    %rax,0x10(%rsp)
  test   %r14d,%r14d
  jne    L0
  lea    0x40(%rdi),%rax
  mov    %rax,0x18(%rsp)
  nopl   0x0(%rax,%rax,1)
L116:
  mov    %r14d,%eax
  shl    $0x4,%eax
  mov    %eax,%ecx
  shl    $0x2,%rcx
  lea    0x0(%rbp,%rcx,1),%r15
  test   %r14d,%r14d
  jne    L27
  mov    0x10(%rsp),%rsi
  mov    $0x40,%edx
  mov    %rbp,%rdi
  mov    %rcx,0x8(%rsp)
  mov    $0x1,%r14d
  call   <neoscrypt_blkxor@plt>
  mov    %r15,%rdi
  mov    %r13d,%esi
  call   <neoscrypt_salsa@plt>
  mov    0x8(%rsp),%rcx
  mov    %r15,%rsi
  mov    $0x40,%edx
  lea    (%r12,%rcx,1),%rdi
  call   <neoscrypt_blkcpy@plt>
  mov    0x18(%rsp),%r15
  mov    $0x40,%ecx
  mov    $0x10,%eax
L27:
  sub    $0x10,%eax
  mov    $0x40,%edx
  mov    %r15,%rdi
  mov    %rcx,0x8(%rsp)
  lea    0x0(%rbp,%rax,4),%rsi
  add    $0x1,%r14d
  call   <neoscrypt_blkxor@plt>
  mov    %r13d,%esi
  mov    %r15,%rdi
  call   <neoscrypt_salsa@plt>
  mov    0x8(%rsp),%rcx
  mov    $0x40,%edx
  mov    %r15,%rsi
  lea    (%r12,%rcx,1),%rdi
  call   <neoscrypt_blkcpy@plt>
  cmp    %r14d,0x4(%rsp)
  jne    L116
L15:
  xor    %r13d,%r13d
  test   %ebx,%ebx
  je     L70
  nopl   0x0(%rax)
L146:
  mov    %r13d,%eax
  mov    $0x40,%edx
  mov    %r13d,%r14d
  shl    $0x5,%eax
  lea    (%r12,%rax,4),%rsi
  mov    %r13d,%eax
  lea    0x1(%r13),%r13d
  shl    $0x4,%eax
  lea    0x0(%rbp,%rax,4),%rdi
  call   <neoscrypt_blkcpy@plt>
  cmp    %r13d,%ebx
  jne    L146
  shl    $0x4,%ebx
  xor    %r13d,%r13d
  nopl   0x0(%rax)
L59:
  mov    %r13d,%eax
  mov    $0x40,%edx
  shl    $0x5,%eax
  add    $0x10,%eax
  lea    (%r12,%rax,4),%rsi
  mov    %ebx,%eax
  add    $0x10,%ebx
  lea    0x0(%rbp,%rax,4),%rdi
  call   <neoscrypt_blkcpy@plt>
  mov    %r13d,%eax
  add    $0x1,%r13d
  cmp    %eax,%r14d
  jne    L59
L70:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L0:
  lea    0x40(%rdi),%rax
  xor    %r14d,%r14d
  mov    %rax,0x18(%rsp)
  nopl   0x0(%rax)
L140:
  mov    %r14d,%eax
  shl    $0x4,%eax
  mov    %eax,%ecx
  shl    $0x2,%rcx
  lea    0x0(%rbp,%rcx,1),%r15
  test   %r14d,%r14d
  jne    L21
  mov    0x10(%rsp),%rsi
  mov    $0x40,%edx
  mov    %rbp,%rdi
  mov    %rcx,0x8(%rsp)
  mov    $0x1,%r14d
  call   <neoscrypt_blkxor@plt>
  mov    %r15,%rdi
  mov    %r13d,%esi
  call   <neoscrypt_chacha@plt>
  mov    0x8(%rsp),%rcx
  mov    %r15,%rsi
  mov    $0x40,%edx
  lea    (%r12,%rcx,1),%rdi
  call   <neoscrypt_blkcpy@plt>
  mov    0x18(%rsp),%r15
  mov    $0x40,%ecx
  mov    $0x10,%eax
L21:
  sub    $0x10,%eax
  mov    $0x40,%edx
  mov    %r15,%rdi
  mov    %rcx,0x8(%rsp)
  lea    0x0(%rbp,%rax,4),%rsi
  add    $0x1,%r14d
  call   <neoscrypt_blkxor@plt>
  mov    %r13d,%esi
  mov    %r15,%rdi
  call   <neoscrypt_chacha@plt>
  mov    0x8(%rsp),%rcx
  mov    $0x40,%edx
  mov    %r15,%rsi
  lea    (%r12,%rcx,1),%rdi
  call   <neoscrypt_blkcpy@plt>
  cmp    %r14d,0x4(%rsp)
  jne    L140
  jmp    L15
  nopw   0x0(%rax,%rax,1)
L46:
  lea    0x40(%rdi),%r12
  mov    $0x40,%edx
  mov    %r12,%rsi
  test   %r14d,%r14d
  je     L7
  call   <neoscrypt_blkxor@plt>
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <neoscrypt_chacha@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x40,%edx
  call   <neoscrypt_blkxor@plt>
  add    $0x28,%rsp
  mov    %r13d,%esi
  mov    %r12,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10c0 <neoscrypt_chacha@plt>
  nopw   0x0(%rax,%rax,1)
L7:
  call   <neoscrypt_blkxor@plt>
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <neoscrypt_salsa@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x40,%edx
  call   <neoscrypt_blkxor@plt>
  add    $0x28,%rsp
  mov    %r13d,%esi
  mov    %r12,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <neoscrypt_salsa@plt>
  nopl   0x0(%rax)
L72:
  lea    0xc0(%rdi),%r15
  lea    0x40(%rdi),%r12
  mov    $0x40,%edx
  lea    0x80(%rdi),%rbx
  mov    %r15,%rsi
  test   %r14d,%r14d
  je     L142
  call   <neoscrypt_blkxor@plt>
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <neoscrypt_chacha@plt>
  mov    $0x40,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <neoscrypt_chacha@plt>
  mov    $0x40,%edx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %r13d,%esi
  mov    %rbx,%rdi
  call   <neoscrypt_chacha@plt>
  mov    %rbx,%rsi
  mov    %r15,%rdi
  mov    $0x40,%edx
  call   <neoscrypt_blkxor@plt>
  mov    %r13d,%esi
  mov    %r15,%rdi
  call   <neoscrypt_chacha@plt>
L148:
  add    $0x28,%rsp
  mov    %rbx,%rsi
  mov    %r12,%rdi
  mov    $0x40,%edx
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10d0 <neoscrypt_blkswp@plt>
  nopw   0x0(%rax,%rax,1)
L142:
  call   <neoscrypt_blkxor@plt>
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <neoscrypt_salsa@plt>
  mov    $0x40,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <neoscrypt_salsa@plt>
  mov    $0x40,%edx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %r13d,%esi
  mov    %rbx,%rdi
  call   <neoscrypt_salsa@plt>
  mov    %rbx,%rsi
  mov    %r15,%rdi
  mov    $0x40,%edx
  call   <neoscrypt_blkxor@plt>
  mov    %r13d,%esi
  mov    %r15,%rdi
  call   <neoscrypt_salsa@plt>
  jmp    L148
```

assistant: ```c
void neoscrypt_blkmix(unsigned int *X, unsigned int *Y, unsigned int r, unsigned int mixmode) {
  unsigned int i, mixer, rounds;
  mixer = mixmode >> 8;
  rounds = mixmode & 0xFF;
  if (r == 1) {
    if (mixer) {
      neoscrypt_blkxor(&X[0], &X[16], 64);
      neoscrypt_chacha(&X[0], rounds);
      neoscrypt_blkxor(&X[16], &X[0], 64);
      neoscrypt_chacha(&X[16], rounds);
    } else {
      neoscrypt_blkxor(&X[0], &X[16], 64);
      neoscrypt_salsa(&X[0], rounds);
      neoscrypt_blkxor(&X[16], &X[0], 64);
      neoscrypt_salsa(&X[16], rounds);
    }
    return;
  }
  if (r == 2) {
    if (mixer) {
      neoscrypt_blkxor(&X[0], &X[48], 64);
      neoscrypt_chacha(&X[0], rounds);
      neoscrypt_blkxor(&X[16], &X[0], 64);
      neoscrypt_chacha(&X[16], rounds);
      neoscrypt_blkxor(&X[32], &X[16], 64);
      neoscrypt_chacha(&X[32], rounds);
      neoscrypt_blkxor(&X[48], &X[32], 64);
      neoscrypt_chacha(&X[48], rounds);
      neoscrypt_blkswp(&X[16], &X[32], 64);
    } else {
      neoscrypt_blkxor(&X[0], &X[48], 64);
      neoscrypt_salsa(&X[0], rounds);
      neoscrypt_blkxor(&X[16], &X[0], 64);
      neoscrypt_salsa(&X[16], rounds);
      neoscrypt_blkxor(&X[32], &X[16], 64);
      neoscrypt_salsa(&X[32], rounds);
      neoscrypt_blkxor(&X[48], &X[32], 64);
      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);
}
```