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

```asm
<crypto_scrypt_smix_sse2>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%r12
  mov    %rsi,%r14
  mov    %edx,0x28(%rsp)
  mov    %rcx,0x10(%rsp)
  mov    %r8,(%rsp)
  mov    %rsi,%rax
  shl    $0x7,%rax
  mov    %rax,0x18(%rsp)
  mov    %rax,%r13
  add    %r8,%r13
  add    %r13,%rax
  mov    %rax,0x8(%rsp)
  mov    %rsi,%rax
  add    %rax,%rax
  mov    %rax,0x30(%rsp)
  je     L76
  mov    $0x0,%r15d
  mov    %r13,0x20(%rsp)
  mov    %rsi,0x38(%rsp)
  mov    0x30(%rsp),%r14
L39:
  mov    %r15,%r13
  shl    $0x4,%r13
  mov    %r15,%rbp
  shl    $0x6,%rbp
  add    (%rsp),%rbp
  mov    $0x0,%ebx
L77:
  mov    %ebx,%eax
  sar    $0x1f,%eax
  shr    $0x1c,%eax
  lea    (%rbx,%rax,1),%edi
  and    $0xf,%edi
  sub    %eax,%edi
  movslq %edi,%rdi
  add    %r13,%rdi
  shl    $0x4,%rdi
  add    %r12,%rdi
  call   <le32dec@plt>
  mov    %eax,0x0(%rbp)
  add    $0x5,%ebx
  add    $0x4,%rbp
  cmp    $0x50,%ebx
  jne    L77
  add    $0x1,%r15
  cmp    %r14,%r15
  jne    L39
  mov    0x20(%rsp),%r13
  mov    0x38(%rsp),%r14
  cmpl   $0x0,0x28(%rsp)
  jle    L105
L69:
  mov    %r14d,%r15d
  shl    $0x7,%r15d
  mov    0x10(%rsp),%rbx
  mov    0x28(%rsp),%eax
  sub    $0x1,%eax
  and    $0xfffffffe,%eax
  add    $0x2,%eax
  mov    %eax,0x20(%rsp)
  mov    $0x0,%ebp
  mov    %r12,0x38(%rsp)
  mov    (%rsp),%r12
L30:
  mov    %r15d,%edx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <sse2_blkcpy@plt>
  mov    %r14,%rcx
  mov    0x8(%rsp),%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <sse2_blockmix_salsa8@plt>
  add    0x18(%rsp),%rbx
  mov    %r15d,%edx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <sse2_blkcpy@plt>
  mov    %r14,%rcx
  mov    0x8(%rsp),%rdx
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <sse2_blockmix_salsa8@plt>
  mov    %ebp,%eax
  add    $0x2,%ebp
  add    0x18(%rsp),%rbx
  cmp    0x20(%rsp),%ebp
  jne    L30
  mov    %eax,0x20(%rsp)
  mov    0x38(%rsp),%r12
  mov    $0x0,%ebx
  mov    0x28(%rsp),%ebp
  sub    $0x1,%ebp
  mov    %ebp,0x18(%rsp)
  mov    %r12,0x28(%rsp)
  mov    0x8(%rsp),%r12
  mov    (%rsp),%rbp
L102:
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <sse2_integerify@plt>
  and    0x18(%rsp),%eax
  mov    %eax,%esi
  shl    $0x7,%esi
  movslq %esi,%rsi
  imul   %r14,%rsi
  add    0x10(%rsp),%rsi
  mov    %r15d,%edx
  mov    %rbp,%rdi
  call   <sse2_blkxor@plt>
  mov    %r14,%rcx
  mov    %r12,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <sse2_blockmix_salsa8@plt>
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <sse2_integerify@plt>
  and    0x18(%rsp),%eax
  mov    %eax,%esi
  shl    $0x7,%esi
  movslq %esi,%rsi
  imul   %r14,%rsi
  add    0x10(%rsp),%rsi
  mov    %r15d,%edx
  mov    %r13,%rdi
  call   <sse2_blkxor@plt>
  mov    %r14,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <sse2_blockmix_salsa8@plt>
  mov    %ebx,%eax
  add    $0x2,%ebx
  cmp    %eax,0x20(%rsp)
  jne    L102
  mov    0x28(%rsp),%r12
  cmpq   $0x0,0x30(%rsp)
  je     L52
L105:
  mov    $0x0,%r14d
  mov    0x30(%rsp),%r15
L40:
  mov    %r14,%r13
  shl    $0x4,%r13
  mov    %r14,%rbp
  shl    $0x6,%rbp
  add    (%rsp),%rbp
  mov    $0x0,%ebx
L2:
  mov    %ebx,%eax
  sar    $0x1f,%eax
  shr    $0x1c,%eax
  lea    (%rbx,%rax,1),%edi
  and    $0xf,%edi
  sub    %eax,%edi
  movslq %edi,%rdi
  add    %r13,%rdi
  shl    $0x4,%rdi
  add    %r12,%rdi
  mov    0x0(%rbp),%esi
  call   <le32enc@plt>
  add    $0x4,%rbp
  add    $0x5,%ebx
  cmp    $0x50,%ebx
  jne    L2
  add    $0x1,%r14
  cmp    %r14,%r15
  jne    L40
L52:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L76:
  cmpl   $0x0,0x28(%rsp)
  jg     L69
  jmp    L52
```

assistant: ```c
void crypto_scrypt_smix_sse2(uint8_t *B, size_t r, uint64_t N, void *V, void *XY) {
  __m128i *X = XY;
  __m128i *Y = (void *)((uintptr_t)(XY) + 128 * r);
  __m128i *Z = (void *)((uintptr_t)(XY) + 256 * r);
  uint32_t *X32 = (void *)X;
  uint64_t i, j;
  size_t k;
  for (k = 0; k < 2 * r; k++) {
    for (i = 0; i < 16; i++) {
      X32[k * 16 + i] = le32dec(&B[(k * 16 + (i * 5 % 16)) * 4]);
    }
  }
  for (i = 0; i < N; i += 2) {
    sse2_blkcpy(((unsigned char *)V) + i * 128 * r, X, 128 * r);
    sse2_blockmix_salsa8(X, Y, Z, r);
    sse2_blkcpy(((unsigned char *)V) + (i + 1) * 128 * r, Y, 128 * r);
    sse2_blockmix_salsa8(Y, X, Z, r);
  }
  for (i = 0; i < N; i += 2) {
    j = sse2_integerify(X, r) & (N - 1);
    sse2_blkxor(X, ((unsigned char *)V) + j * 128 * r, 128 * r);
    sse2_blockmix_salsa8(X, Y, Z, r);
    j = sse2_integerify(Y, r) & (N - 1);
    sse2_blkxor(Y, ((unsigned char *)V) + j * 128 * r, 128 * r);
    sse2_blockmix_salsa8(Y, X, Z, r);
  }
  for (k = 0; k < 2 * r; k++) {
    for (i = 0; i < 16; i++) {
      le32enc(&B[(k * 16 + (i * 5 % 16)) * 4], X32[k * 16 + i]);
    }
  }
}
```