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

```asm
<R4Core>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,0x58(%rsp)
  mov    %esi,0x44(%rsp)
  mov    %edx,0x40(%rsp)
  mov    %rcx,0x48(%rsp)
  lea    (%rdx,%rdx,1),%eax
  mov    %eax,0x50(%rsp)
  mov    %esi,0x54(%rsp)
  mov    %rdi,0x38(%rsp)
  test   %esi,%esi
  jne    L18
L69:
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L30:
  movslq 0x50(%rsp),%rax
  lea    0x0(,%rax,4),%rcx
  mov    0x38(%rsp),%r14
  lea    (%r14,%rax,8),%r13
  mov    0x40(%rsp),%eax
  lea    (%r14,%rax,8),%rax
  mov    %rax,0x30(%rsp)
  mov    0x48(%rsp),%r15
  mov    %r15,%rbp
  mov    %rcx,%r15
L31:
  mov    (%r14),%eax
  mov    %eax,0x10(%rsp)
  mov    0x4(%r14),%ecx
  mov    %ecx,0x14(%rsp)
  mov    0x0(%rbp),%ebx
  mov    0x4(%rbp),%edi
  mov    (%r14,%r15,1),%r12d
  mov    0x4(%r14,%r15,1),%r10d
  lea    (%rbx,%rdi,2),%r9d
  mov    %r9d,0x18(%rsp)
  mov    %r10d,0xc(%rsp)
  lea    (%r12,%r10,1),%esi
  call   <cook_MULSHIFT32@plt>
  mov    %eax,0x1c(%rsp)
  mov    %r12d,%esi
  mov    0x18(%rsp),%edi
  call   <cook_MULSHIFT32@plt>
  mov    %eax,%r8d
  mov    0x1c(%rsp),%r12d
  sub    %r12d,%r8d
  mov    %r8d,0x18(%rsp)
  mov    0xc(%rsp),%esi
  mov    %ebx,%edi
  call   <cook_MULSHIFT32@plt>
  add    %r12d,%eax
  mov    %eax,0x1c(%rsp)
  mov    0x8(%rbp),%ebx
  mov    0xc(%rbp),%edi
  mov    0x0(%r13),%r12d
  mov    0x4(%r13),%r10d
  lea    (%rbx,%rdi,2),%r11d
  mov    %r11d,0x20(%rsp)
  mov    %r10d,0xc(%rsp)
  lea    (%r12,%r10,1),%esi
  call   <cook_MULSHIFT32@plt>
  mov    %eax,0x24(%rsp)
  mov    %r12d,%esi
  mov    0x20(%rsp),%edi
  call   <cook_MULSHIFT32@plt>
  mov    0x24(%rsp),%r12d
  sub    %r12d,%eax
  mov    %eax,0x20(%rsp)
  mov    0xc(%rsp),%esi
  mov    %ebx,%edi
  call   <cook_MULSHIFT32@plt>
  mov    %eax,%r11d
  add    %r12d,%r11d
  mov    %r11d,0x24(%rsp)
  mov    0x10(%rbp),%ebx
  mov    0x14(%rbp),%edi
  mov    0x0(%r13,%r15,1),%r12d
  mov    0x4(%r13,%r15,1),%r10d
  lea    (%rbx,%rdi,2),%edx
  mov    %edx,0x2c(%rsp)
  mov    %r10d,0x28(%rsp)
  lea    (%r12,%r10,1),%esi
  call   <cook_MULSHIFT32@plt>
  mov    %eax,0xc(%rsp)
  mov    %r12d,%esi
  mov    0x2c(%rsp),%edi
  call   <cook_MULSHIFT32@plt>
  mov    %eax,%r12d
  sub    0xc(%rsp),%r12d
  mov    0x28(%rsp),%esi
  mov    %ebx,%edi
  call   <cook_MULSHIFT32@plt>
  mov    0xc(%rsp),%ecx
  add    %eax,%ecx
  add    $0x18,%rbp
  mov    0x10(%rsp),%edx
  sar    $0x2,%edx
  mov    %edx,%edi
  mov    0x18(%rsp),%r8d
  sub    %r8d,%edi
  mov    0x14(%rsp),%esi
  sar    $0x2,%esi
  mov    %esi,%eax
  mov    0x1c(%rsp),%r9d
  sub    %r9d,%esi
  add    %r8d,%edx
  add    %r9d,%eax
  mov    0x20(%rsp),%ebx
  lea    (%rbx,%r12,1),%r8d
  mov    %ecx,%r10d
  mov    0x24(%rsp),%r11d
  sub    %r11d,%r10d
  sub    %r12d,%ebx
  add    %r11d,%ecx
  lea    (%rdi,%r10,1),%r11d
  mov    %r11d,0x0(%r13,%r15,1)
  lea    (%rsi,%rbx,1),%r11d
  mov    %r11d,0x4(%r13,%r15,1)
  mov    %edx,%r11d
  sub    %r8d,%r11d
  mov    %r11d,0x0(%r13)
  mov    %eax,%r11d
  sub    %ecx,%r11d
  mov    %r11d,0x4(%r13)
  sub    %r10d,%edi
  mov    %edi,(%r14,%r15,1)
  sub    %ebx,%esi
  mov    %esi,0x4(%r14,%r15,1)
  add    %r8d,%edx
  mov    %edx,(%r14)
  add    %ecx,%eax
  mov    %eax,0x4(%r14)
  add    $0x8,%r14
  add    $0x8,%r13
  cmp    0x30(%rsp),%r14
  jne    L31
  mov    0x40(%rsp),%eax
  lea    -0x1(%rax),%eax
  mov    0x38(%rsp),%rcx
  lea    0x8(%rcx,%rax,8),%rax
  mov    %rax,0x38(%rsp)
L49:
  mov    0x40(%rsp),%eax
  lea    (%rax,%rax,2),%eax
  add    %eax,%eax
  cltq
  shl    $0x2,%rax
  add    %rax,0x38(%rsp)
  subl   $0x1,0x44(%rsp)
  je     L47
L18:
  cmpl   $0x0,0x40(%rsp)
  jne    L30
  jmp    L49
L47:
  add    %rax,0x48(%rsp)
  shll   $0x2,0x40(%rsp)
  mov    0x54(%rsp),%eax
  sar    $0x2,%eax
  mov    %eax,0x44(%rsp)
  je     L69
  mov    0x40(%rsp),%eax
  add    %eax,%eax
  mov    %eax,0x50(%rsp)
  mov    0x44(%rsp),%eax
  mov    %eax,0x54(%rsp)
  mov    0x58(%rsp),%rax
  mov    %rax,0x38(%rsp)
  jmp    L18
```

assistant: ```c
void R4Core(int *x, int bg, int gp, int *wtab) {
  int ar, ai, br, bi, cr, ci, dr, di, tr, ti;
  int wd, ws, wi;
  int i, j, step;
  int *xptr, *wptr;
  for (; bg != 0; gp <<= 2, bg >>= 2) {
    step = 2 * gp;
    xptr = x;
    for (i = bg; i != 0; i--) {
      wptr = wtab;
      for (j = gp; j != 0; j--) {
        ar = xptr[0];
        ai = xptr[1];
        xptr += step;
        ws = wptr[0];
        wi = wptr[1];
        br = xptr[0];
        bi = xptr[1];
        wd = ws + 2 * wi;
        tr = cook_MULSHIFT32(wi, br + bi);
        br = cook_MULSHIFT32(wd, br) - tr;
        bi = cook_MULSHIFT32(ws, bi) + tr;
        xptr += step;
        ws = wptr[2];
        wi = wptr[3];
        cr = xptr[0];
        ci = xptr[1];
        wd = ws + 2 * wi;
        tr = cook_MULSHIFT32(wi, cr + ci);
        cr = cook_MULSHIFT32(wd, cr) - tr;
        ci = cook_MULSHIFT32(ws, ci) + tr;
        xptr += step;
        ws = wptr[4];
        wi = wptr[5];
        dr = xptr[0];
        di = xptr[1];
        wd = ws + 2 * wi;
        tr = cook_MULSHIFT32(wi, dr + di);
        dr = cook_MULSHIFT32(wd, dr) - tr;
        di = cook_MULSHIFT32(ws, di) + tr;
        wptr += 6;
        tr = ar;
        ti = ai;
        ar = (tr >> 2) - br;
        ai = (ti >> 2) - bi;
        br = (tr >> 2) + br;
        bi = (ti >> 2) + bi;
        tr = cr;
        ti = ci;
        cr = tr + dr;
        ci = di - ti;
        dr = tr - dr;
        di = di + ti;
        xptr[0] = ar + ci;
        xptr[1] = ai + dr;
        xptr -= step;
        xptr[0] = br - cr;
        xptr[1] = bi - di;
        xptr -= step;
        xptr[0] = ar - ci;
        xptr[1] = ai - dr;
        xptr -= step;
        xptr[0] = br + cr;
        xptr[1] = bi + di;
        xptr += 2;
      }
      xptr += 3 * step;
    }
    wtab += 3 * step;
  }
}
```