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

```asm
<jbg_dppriv2int>:
  endbr64
  xor    %r8d,%r8d
  xor    %edx,%edx
  mov    $0xfffffffe,%r9d
  nop
L31:
  mov    %edx,%eax
  mov    %r8d,%r10d
  mov    %edx,%ecx
  sar    %eax
  and    $0x2,%r10d
  sar    $0x2,%ecx
  and    $0x1,%eax
  or     %r10d,%eax
  mov    %edx,%r10d
  sar    $0x7,%r10d
  shl    $0x4,%r10d
  or     %r10d,%eax
  lea    0x0(,%rcx,8),%r10d
  movslq %ecx,%rcx
  and    $0x8,%r10d
  or     %r10d,%eax
  mov    %edx,%r10d
  shr    %r10d
  and    $0x4,%r10d
  or     %r10d,%eax
  lea    0x0(,%rdx,8),%r10d
  and    $0x80,%r10d
  or     %r10d,%eax
  lea    (%rdx,%rdx,1),%r10d
  and    $0x40,%r10d
  or     %r10d,%eax
  mov    %edx,%r10d
  add    $0x1,%edx
  shr    %r10d
  and    $0x20,%r10d
  or     %r10d,%eax
  movzbl (%rsi,%rcx,1),%r10d
  mov    %r9d,%ecx
  sub    %r8d,%ecx
  cltq
  add    $0x2,%r8d
  and    $0x6,%ecx
  sar    %cl,%r10d
  and    $0x3,%r10d
  mov    %r10b,(%rdi,%rax,1)
  cmp    $0x100,%edx
  jne    L31
  xor    %r8d,%r8d
  xor    %edx,%edx
  mov    $0xfffffffe,%r9d
  cs nopw 0x0(%rax,%rax,1)
L21:
  mov    %edx,%eax
  mov    %r8d,%ecx
  sar    %eax
  and    $0x2,%ecx
  and    $0x1,%eax
  or     %ecx,%eax
  mov    %edx,%ecx
  and    $0x40,%ecx
  or     %ecx,%eax
  lea    (%rdx,%rdx,1),%ecx
  and    $0x8,%ecx
  or     %ecx,%eax
  mov    %edx,%ecx
  shr    %ecx
  and    $0x4,%ecx
  or     %ecx,%eax
  mov    %edx,%ecx
  shl    $0x4,%ecx
  and    $0x100,%ecx
  or     %ecx,%eax
  lea    0x0(,%rdx,4),%ecx
  and    $0x80,%ecx
  or     %ecx,%eax
  mov    %edx,%ecx
  shr    $0x2,%ecx
  and    $0x20,%ecx
  or     %ecx,%eax
  lea    0x100(%rdx),%ecx
  add    $0x1,%edx
  sar    $0x2,%ecx
  add    $0x100,%eax
  movslq %ecx,%rcx
  cltq
  movzbl (%rsi,%rcx,1),%r10d
  mov    %r9d,%ecx
  sub    %r8d,%ecx
  add    $0x2,%r8d
  and    $0x6,%ecx
  sar    %cl,%r10d
  and    $0x3,%r10d
  mov    %r10b,(%rdi,%rax,1)
  cmp    $0x200,%edx
  jne    L21
  xor    %r8d,%r8d
  xor    %edx,%edx
  mov    $0xfffffffe,%r9d
  nopw   0x0(%rax,%rax,1)
L27:
  mov    %edx,%eax
  mov    %r8d,%ecx
  sar    %eax
  and    $0x2,%ecx
  and    $0x1,%eax
  or     %ecx,%eax
  mov    %edx,%ecx
  and    $0x80,%ecx
  or     %ecx,%eax
  lea    (%rdx,%rdx,1),%ecx
  and    $0x8,%ecx
  or     %ecx,%eax
  mov    %edx,%ecx
  shr    %ecx
  and    $0x4,%ecx
  or     %ecx,%eax
  mov    %edx,%ecx
  shl    $0x6,%ecx
  and    $0x400,%ecx
  or     %ecx,%eax
  mov    %edx,%ecx
  shl    $0x4,%ecx
  and    $0x200,%ecx
  or     %ecx,%eax
  lea    0x0(,%rdx,4),%ecx
  and    $0x100,%ecx
  or     %ecx,%eax
  lea    0x300(%rdx),%ecx
  add    $0x1,%edx
  sar    $0x2,%ecx
  add    $0x300,%eax
  movslq %ecx,%rcx
  cltq
  movzbl (%rsi,%rcx,1),%r10d
  mov    %r9d,%ecx
  sub    %r8d,%ecx
  add    $0x2,%r8d
  and    $0x6,%ecx
  sar    %cl,%r10d
  and    $0x3,%r10d
  mov    %r10b,(%rdi,%rax,1)
  cmp    $0x800,%edx
  jne    L27
  xor    %r9d,%r9d
  xor    %eax,%eax
  mov    $0xfffffffe,%r10d
  nopl   (%rax)
L9:
  mov    %eax,%edx
  mov    %r9d,%ecx
  sar    %edx
  and    $0x2,%ecx
  and    $0x1,%edx
  or     %ecx,%edx
  lea    (%rax,%rax,1),%ecx
  and    $0x8,%ecx
  or     %edx,%ecx
  mov    %eax,%edx
  shr    %edx
  and    $0x4,%edx
  or     %ecx,%edx
  mov    %eax,%ecx
  shl    $0x7,%ecx
  and    $0x800,%ecx
  or     %edx,%ecx
  mov    %eax,%edx
  shl    $0x5,%edx
  and    $0x400,%edx
  or     %ecx,%edx
  lea    0x0(,%rax,8),%ecx
  and    $0x200,%ecx
  or     %edx,%ecx
  lea    (%rax,%rax,1),%edx
  and    $0x100,%edx
  or     %ecx,%edx
  lea    0xb00(%rax),%ecx
  add    $0x1,%eax
  sar    $0x2,%ecx
  add    $0xb00,%edx
  movslq %ecx,%rcx
  movslq %edx,%rdx
  movzbl (%rsi,%rcx,1),%r8d
  mov    %r10d,%ecx
  sub    %r9d,%ecx
  add    $0x2,%r9d
  and    $0x6,%ecx
  sar    %cl,%r8d
  and    $0x3,%r8d
  mov    %r8b,(%rdi,%rdx,1)
  cmp    $0x1000,%eax
  jne    L9
  ret
```

assistant: ```c
void jbg_dppriv2int(char *internal, const unsigned char *dptable) {
  int i, j, k;
  int trans0[8] = {1, 0, 3, 2, 7, 6, 5, 4};
  int trans1[9] = {1, 0, 3, 2, 8, 7, 6, 5, 4};
  int trans2[11] = {1, 0, 3, 2, 10, 9, 8, 7, 6, 5, 4};
  int trans3[12] = {1, 0, 3, 2, 11, 10, 9, 8, 7, 6, 5, 4};
  for (i = 0; i < 256; i++) {
    k = 0;
    for (j = 0; j < 8; j++)
      k |= ((i >> j) & 1) << trans0[j];
    internal[k + 0] = (dptable[(i + 0) >> 2] >> ((3 - (i & 3)) << 1)) & 3;
  };
  for (i = 0; i < 512; i++) {
    k = 0;
    for (j = 0; j < 8; j++)
      k |= ((i >> j) & 1) << trans1[j];
    internal[k + 256] = (dptable[(i + 256) >> 2] >> ((3 - (i & 3)) << 1)) & 3;
  };
  for (i = 0; i < 2048; i++) {
    k = 0;
    for (j = 0; j < 8; j++)
      k |= ((i >> j) & 1) << trans2[j];
    internal[k + 768] = (dptable[(i + 768) >> 2] >> ((3 - (i & 3)) << 1)) & 3;
  };
  for (i = 0; i < 4096; i++) {
    k = 0;
    for (j = 0; j < 8; j++)
      k |= ((i >> j) & 1) << trans3[j];
    internal[k + 2816] = (dptable[(i + 2816) >> 2] >> ((3 - (i & 3)) << 1)) & 3;
  };
  return;
}
```