user: 请从给定的汇编指令推导出C源代码：

```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     L45
  mov    %edx,%ebx
  cmp    $0x2,%edx
  je     L51
  lea    (%rdx,%rdx,1),%eax
  mov    %eax,0x18(%rsp)
  test   %eax,%eax
  jle    L24
  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     L108
  xor    %ecx,%ecx
L82:
  lea    0x40(%r14),%r15
  test   %ecx,%ecx
  jne    L92
L11:
  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     L11
L92:
  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     L24
  mov    %r15,%r14
  jmp    L82
  nopl   0x0(%rax)
L84:
  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     L24
  mov    %r15,%r14
L108:
  lea    0x40(%r14),%r15
  test   %r10d,%r10d
  jne    L84
L107:
  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     L107
  jmp    L84
  cs nopw 0x0(%rax,%rax,1)
L24:
  test   %ebx,%ebx
  jle    L34
  lea    -0x1(%rbx),%r14d
  mov    0x8(%rsp),%r13
  mov    %r12,%rbp
  mov    %r14,%rax
  shl    $0x6,%rax
  lea    0x40(%r12,%rax,1),%r15
  nopl   0x0(%rax)
L73:
  mov    %r13,%rsi
  mov    %rbp,%rdi
  mov    $0x40,%edx
  add    $0x40,%rbp
  call   <neoscrypt_blkcpy@plt>
  sub    $0xffffffffffffff80,%r13
  cmp    %rbp,%r15
  jne    L73
  mov    0x8(%rsp),%rax
  shl    $0x4,%ebx
  shl    $0x7,%r14
  movslq %ebx,%rbx
  lea    (%r12,%rbx,4),%rbp
  lea    0x40(%rax),%rbx
  lea    0xc0(%rax,%r14,1),%r12
  nopl   0x0(%rax)
L35:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    $0x40,%edx
  sub    $0xffffffffffffff80,%rbx
  call   <neoscrypt_blkcpy@plt>
  add    $0x40,%rbp
  cmp    %rbx,%r12
  jne    L35
L34:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L45:
  lea    0x40(%rdi),%r13
  mov    $0x40,%edx
  mov    %r13,%rsi
  test   %r10d,%r10d
  je     L99
  call   <neoscrypt_blkxor@plt>
  mov    %ebp,%esi
  mov    %r12,%rdi
  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>
  nopl   0x0(%rax,%rax,1)
L99:
  call   <neoscrypt_blkxor@plt>
  mov    %ebp,%esi
  mov    %r12,%rdi
  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>
  nopw   0x0(%rax,%rax,1)
L51:
  lea    0xc0(%rdi),%r15
  lea    0x40(%rdi),%r13
  mov    $0x40,%edx
  lea    0x80(%rdi),%r14
  mov    %r15,%rsi
  test   %r10d,%r10d
  je     L30
  call   <neoscrypt_blkxor@plt>
  mov    %ebp,%esi
  mov    %r12,%rdi
  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>
L133:
  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>
  xchg   %ax,%ax
L30:
  call   <neoscrypt_blkxor@plt>
  mov    %ebp,%esi
  mov    %r12,%rdi
  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    L133
```

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