user: 请将以下的汇编代码转换成C语言代码：

```asm
<R8FirstPass>:
  endbr64
  test   %esi,%esi
  je     L2
  push   %r15
  mov    %esi,%esi
  mov    %rdi,%r11
  push   %r14
  shl    $0x6,%rsi
  push   %r13
  lea    (%rdi,%rsi,1),%rax
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rax,0x18(%rsp)
  nopl   0x0(%rax)
L11:
  movq   0x10(%r11),%xmm1
  movq   0x18(%r11),%xmm0
  movq   (%r11),%xmm2
  movq   0x38(%r11),%xmm3
  paddd  %xmm1,%xmm0
  movq   0x8(%r11),%xmm1
  movq   0x20(%r11),%xmm5
  movq   0x30(%r11),%xmm4
  mov    (%r11),%r8d
  paddd  %xmm2,%xmm1
  movq   0x28(%r11),%xmm2
  mov    0x4(%r11),%esi
  pshufd $0xe5,%xmm5,%xmm6
  mov    0x10(%r11),%edi
  mov    %r8d,%ebx
  sub    0x8(%r11),%ebx
  movd   %xmm6,%r13d
  pshufd $0xe5,%xmm2,%xmm7
  paddd  %xmm5,%xmm2
  mov    %esi,%ebp
  sub    0xc(%r11),%ebp
  paddd  %xmm0,%xmm1
  movdqa %xmm3,%xmm0
  mov    %edi,%eax
  sub    0x18(%r11),%eax
  paddd  %xmm4,%xmm0
  mov    0x14(%r11),%edx
  lea    0x0(%rbp,%rax,1),%r14d
  mov    %ebx,%r15d
  sub    0x1c(%r11),%edx
  sub    %eax,%ebp
  movd   %xmm7,%eax
  mov    0x20(%r11),%r10d
  pshufd $0xe5,%xmm4,%xmm6
  pshufd $0xe5,%xmm3,%xmm7
  sub    %edx,%r15d
  add    %edx,%ebx
  paddd  %xmm0,%xmm2
  movd   %xmm7,%edx
  sub    %eax,%r13d
  mov    0x30(%r11),%r9d
  movd   %xmm6,%eax
  psrad  $0x1,%xmm1
  mov    %r10d,%r12d
  add    0x18(%r11),%edi
  sub    %edx,%eax
  mov    0x28(%r11),%edx
  add    0x8(%r11),%r8d
  mov    %r9d,%ecx
  psrad  $0x1,%xmm2
  sub    0x38(%r11),%ecx
  sub    0x28(%r11),%r12d
  sub    %edi,%r8d
  movdqa %xmm2,%xmm0
  add    %r10d,%edx
  mov    0x38(%r11),%r10d
  add    0xc(%r11),%esi
  paddd  %xmm1,%xmm0
  psubd  %xmm2,%xmm1
  mov    0x14(%r11),%edi
  sar    %r8d
  add    %r9d,%r10d
  sub    %r10d,%edx
  movq   %xmm0,(%r11)
  mov    %edx,%r9d
  mov    0x2c(%r11),%edx
  add    0x24(%r11),%edx
  movq   %xmm1,0x20(%r11)
  sub    0x3c(%r11),%edx
  sub    0x34(%r11),%edx
  sar    %r9d
  add    0x1c(%r11),%edi
  sar    %edx
  mov    %r11,0x10(%rsp)
  sub    %edi,%esi
  lea    (%r8,%rdx,1),%edi
  sub    %edx,%r8d
  mov    %r12d,%edx
  sar    %esi
  movd   %edi,%xmm0
  sub    %eax,%edx
  add    %eax,%r12d
  mov    %esi,%edi
  add    %r9d,%esi
  mov    %edx,0x8(%rsp)
  sub    %r9d,%edi
  movd   %esi,%xmm4
  lea    0x0(%r13,%rcx,1),%r9d
  mov    %edx,%esi
  movd   %edi,%xmm3
  sub    %ecx,%r13d
  mov    $0x5a82799a,%edi
  xor    %eax,%eax
  punpckldq %xmm3,%xmm0
  sub    %r9d,%esi
  mov    %r9d,0x4(%rsp)
  sar    %r15d
  movq   %xmm0,0x10(%r11)
  sar    %r14d
  movd   %r8d,%xmm0
  sar    %ebx
  punpckldq %xmm4,%xmm0
  sar    %ebp
  movq   %xmm0,0x30(%r11)
  call   <cook_MULSHIFT32@plt>
  mov    0x8(%rsp),%edx
  mov    0x4(%rsp),%r9d
  mov    $0x5a82799a,%edi
  mov    %eax,0xc(%rsp)
  xor    %eax,%eax
  lea    (%rdx,%r9,1),%esi
  call   <cook_MULSHIFT32@plt>
  mov    %r12d,%esi
  mov    $0x5a82799a,%edi
  mov    %eax,0x8(%rsp)
  sub    %r13d,%esi
  xor    %eax,%eax
  call   <cook_MULSHIFT32@plt>
  lea    (%r12,%r13,1),%esi
  mov    $0x5a82799a,%edi
  mov    %eax,0x4(%rsp)
  xor    %eax,%eax
  call   <cook_MULSHIFT32@plt>
  mov    %r15d,%esi
  mov    0x8(%rsp),%ecx
  mov    0x4(%rsp),%edx
  mov    0xc(%rsp),%r8d
  mov    0x10(%rsp),%r11
  sub    %r8d,%esi
  add    %r8d,%r15d
  add    $0x40,%r11
  mov    %esi,-0x28(%r11)
  mov    %r14d,%esi
  add    %ecx,%r14d
  sub    %ecx,%esi
  mov    %ebx,%ecx
  mov    %r15d,-0x8(%r11)
  sub    %eax,%ecx
  add    %ebx,%eax
  mov    %esi,-0x24(%r11)
  movd   %eax,%xmm0
  mov    %ebp,%eax
  add    %edx,%ebp
  mov    %r14d,-0x4(%r11)
  sub    %edx,%eax
  mov    %ecx,-0x18(%r11)
  movd   %eax,%xmm5
  mov    %ebp,-0x14(%r11)
  punpckldq %xmm5,%xmm0
  movq   %xmm0,-0x38(%r11)
  cmp    %r11,0x18(%rsp)
  jne    L11
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L2:
  ret
```

assistant: ```c
void R8FirstPass(int *x, int bg) {
  int ar, ai, br, bi, cr, ci, dr, di;
  int sr, si, tr, ti, ur, ui, vr, vi;
  int wr, wi, xr, xi, yr, yi, zr, zi;
  for (; bg != 0; bg--) {
    ar = x[0] + x[2];
    br = x[0] - x[2];
    ai = x[1] + x[3];
    bi = x[1] - x[3];
    cr = x[4] + x[6];
    dr = x[4] - x[6];
    ci = x[5] + x[7];
    di = x[5] - x[7];
    sr = ar + cr;
    ur = ar - cr;
    si = ai + ci;
    ui = ai - ci;
    tr = br - di;
    vr = br + di;
    ti = bi + dr;
    vi = bi - dr;
    ar = x[8] + x[10];
    br = x[8] - x[10];
    ai = x[9] + x[11];
    bi = x[9] - x[11];
    cr = x[12] + x[14];
    dr = x[12] - x[14];
    ci = x[13] + x[15];
    di = x[13] - x[15];
    wr = (ar + cr) >> 1;
    yr = (ar - cr) >> 1;
    wi = (ai + ci) >> 1;
    yi = (ai - ci) >> 1;
    x[0] = (sr >> 1) + wr;
    x[8] = (sr >> 1) - wr;
    x[1] = (si >> 1) + wi;
    x[9] = (si >> 1) - wi;
    x[4] = (ur >> 1) + yi;
    x[12] = (ur >> 1) - yi;
    x[5] = (ui >> 1) - yr;
    x[13] = (ui >> 1) + yr;
    ar = br - di;
    cr = br + di;
    ai = bi + dr;
    ci = bi - dr;
    xr = cook_MULSHIFT32(1518500250, ar - ai);
    xi = cook_MULSHIFT32(1518500250, ar + ai);
    zr = cook_MULSHIFT32(1518500250, cr - ci);
    zi = cook_MULSHIFT32(1518500250, cr + ci);
    x[6] = (tr >> 1) - xr;
    x[14] = (tr >> 1) + xr;
    x[7] = (ti >> 1) - xi;
    x[15] = (ti >> 1) + xi;
    x[2] = (vr >> 1) + zi;
    x[10] = (vr >> 1) - zi;
    x[3] = (vi >> 1) - zr;
    x[11] = (vi >> 1) + zr;
    x += 16;
  }
}
```