user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<neoscrypt_blkmix>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbx
  mov    %ecx,%eax
  shr    $0x8,%eax
  mov    %eax,(%rsp)
  movzbl %cl,%r15d
  cmp    $0x1,%edx
  je     L73
  mov    %rsi,%r13
  mov    %edx,%r14d
  cmp    $0x2,%edx
  je     L155
  mov    %edx,%eax
  add    %eax,%eax
  mov    %eax,0x4(%rsp)
  je     L139
  mov    %edx,%eax
  shl    $0x5,%eax
  sub    $0x10,%eax
  mov    %eax,%eax
  lea    (%rdi,%rax,4),%rax
  mov    %rax,0x8(%rsp)
  mov    $0x0,%ebp
  mov    $0x0,%r12d
  jmp    L151
L73:
  test   %eax,%eax
  je     L110
  lea    0x40(%rdi),%rbp
  mov    $0x40,%edx
  mov    %rbp,%rsi
  call   <neoscrypt_blkxor@plt>
  mov    %r15d,%esi
  mov    %rbx,%rdi
  call   <neoscrypt_chacha@plt>
  mov    $0x40,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %r15d,%esi
  mov    %rbp,%rdi
  call   <neoscrypt_chacha@plt>
  jmp    L97
L110:
  lea    0x40(%rdi),%rbp
  mov    $0x40,%edx
  mov    %rbp,%rsi
  call   <neoscrypt_blkxor@plt>
  mov    %r15d,%esi
  mov    %rbx,%rdi
  call   <neoscrypt_salsa@plt>
  mov    $0x40,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %r15d,%esi
  mov    %rbp,%rdi
  call   <neoscrypt_salsa@plt>
  jmp    L97
L155:
  cmpl   $0x0,(%rsp)
  je     L72
  lea    0xc0(%rdi),%r12
  mov    $0x40,%edx
  mov    %r12,%rsi
  call   <neoscrypt_blkxor@plt>
  mov    %r15d,%esi
  mov    %rbx,%rdi
  call   <neoscrypt_chacha@plt>
  lea    0x40(%rbx),%rbp
  mov    $0x40,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %r15d,%esi
  mov    %rbp,%rdi
  call   <neoscrypt_chacha@plt>
  sub    $0xffffffffffffff80,%rbx
  mov    $0x40,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %r15d,%esi
  mov    %rbx,%rdi
  call   <neoscrypt_chacha@plt>
  mov    $0x40,%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %r15d,%esi
  mov    %r12,%rdi
  call   <neoscrypt_chacha@plt>
  mov    $0x40,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <neoscrypt_blkswp@plt>
  jmp    L97
L72:
  lea    0xc0(%rdi),%r12
  mov    $0x40,%edx
  mov    %r12,%rsi
  call   <neoscrypt_blkxor@plt>
  mov    %r15d,%esi
  mov    %rbx,%rdi
  call   <neoscrypt_salsa@plt>
  lea    0x40(%rbx),%rbp
  mov    $0x40,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %r15d,%esi
  mov    %rbp,%rdi
  call   <neoscrypt_salsa@plt>
  sub    $0xffffffffffffff80,%rbx
  mov    $0x40,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %r15d,%esi
  mov    %rbx,%rdi
  call   <neoscrypt_salsa@plt>
  mov    $0x40,%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <neoscrypt_blkxor@plt>
  mov    %r15d,%esi
  mov    %r12,%rdi
  call   <neoscrypt_salsa@plt>
  mov    $0x40,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <neoscrypt_blkswp@plt>
  jmp    L97
L78:
  mov    $0x40,%edx
  mov    0x8(%rsp),%rsi
  mov    %rbx,%rdi
  call   <neoscrypt_blkxor@plt>
  jmp    L62
L174:
  mov    %ebp,%eax
  lea    (%rbx,%rax,4),%rdi
  mov    %r15d,%esi
  call   <neoscrypt_salsa@plt>
L104:
  mov    %ebp,%edi
  shl    $0x2,%rdi
  lea    (%rbx,%rdi,1),%rsi
  add    %r13,%rdi
  mov    $0x40,%edx
  call   <neoscrypt_blkcpy@plt>
  add    $0x1,%r12d
  add    $0x10,%ebp
  cmp    0x4(%rsp),%r12d
  je     L139
L151:
  test   %r12d,%r12d
  je     L78
  lea    -0x10(%rbp),%eax
  lea    (%rbx,%rax,4),%rsi
  mov    %ebp,%eax
  lea    (%rbx,%rax,4),%rdi
  mov    $0x40,%edx
  call   <neoscrypt_blkxor@plt>
L62:
  cmpl   $0x0,(%rsp)
  je     L174
  mov    %ebp,%eax
  lea    (%rbx,%rax,4),%rdi
  mov    %r15d,%esi
  call   <neoscrypt_chacha@plt>
  jmp    L104
L139:
  test   %r14d,%r14d
  je     L97
  mov    $0x0,%ebp
L57:
  mov    %ebp,%eax
  shl    $0x5,%eax
  mov    %eax,%eax
  lea    0x0(%r13,%rax,4),%rsi
  mov    %ebp,%eax
  shl    $0x4,%eax
  mov    %eax,%eax
  lea    (%rbx,%rax,4),%rdi
  mov    $0x40,%edx
  call   <neoscrypt_blkcpy@plt>
  mov    %ebp,%r12d
  add    $0x1,%ebp
  cmp    %ebp,%r14d
  jne    L57
  shl    $0x4,%ebp
  mov    $0x0,%r14d
L101:
  mov    %r14d,%eax
  shl    $0x5,%eax
  add    $0x10,%eax
  mov    %eax,%eax
  lea    0x0(%r13,%rax,4),%rsi
  mov    %ebp,%eax
  lea    (%rbx,%rax,4),%rdi
  mov    $0x40,%edx
  call   <neoscrypt_blkcpy@plt>
  mov    %r14d,%eax
  add    $0x1,%r14d
  add    $0x10,%ebp
  cmp    %eax,%r12d
  jne    L101
L97:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

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);
}
```