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

```asm
<decode_block4>:
  endbr64
  test   %esi,%esi
  je     L24
  push   %r14
  mov    %rdi,%r8
  lea    -0x2(%rsi),%eax
  mov    %rdx,%rdi
  push   %r13
  lea    0x2(%r8,%rax,1),%rsi
  xor    %r9d,%r9d
  pxor   %xmm7,%xmm7
  push   %r12
  pxor   %xmm5,%xmm5
  push   %rbp
  push   %rbx
  sub    $0x358,%rsp
  movdqa D4(%rip),%xmm6
  jmp    L113
  xchg   %ax,%ax
L5:
  shr    $0x8,%r10w
  add    $0x4,%rdi
  add    $0x4,%r9d
  mov    %r10,%r11
  and    $0x1,%r10d
  and    $0xfe,%r11d
  add    %rcx,%r11
  movzbl (%r11),%edx
  movzbl 0x1(%r11),%r11d
  shl    $0x8,%edx
  add    %r11d,%edx
  add    %edx,%edx
  or     %r10d,%edx
  mov    %rax,%r10
  and    $0x1,%eax
  and    $0xfe,%r10d
  rol    $0x8,%dx
  add    %rcx,%r10
  mov    %dx,-0x4(%rdi)
  movzbl (%r10),%edx
  movzbl 0x1(%r10),%r10d
  shl    $0x8,%edx
  add    %r10d,%edx
  add    %edx,%edx
  or     %edx,%eax
  rol    $0x8,%ax
  mov    %ax,-0x2(%rdi)
L33:
  cmp    %rsi,%r8
  je     L94
L113:
  movzbl (%r8),%eax
  movzbl 0x1(%r8),%edx
  add    $0x2,%r8
  shl    $0x8,%eax
  add    %dx,%ax
  mov    %eax,%r10d
  jns    L5
  shr    $0x4,%r10w
  mov    %rdi,%rdx
  and    $0x7fe,%r10d
  mov    %r10,%r11
  sub    %r10,%rdx
  neg    %r11
  and    $0x1f,%ax
  je     L33
  lea    -0x1(%rax),%ebx
  cmp    $0xffffffffffffffc0,%r11
  ja     L4
  cmp    $0xe,%bx
  jbe    L4
  movdqu (%rdx),%xmm2
  movdqu 0x10(%rdx),%xmm0
  movdqa %xmm6,%xmm8
  movdqa %xmm6,%xmm9
  movdqu (%rdx),%xmm1
  movdqu 0x20(%rdx),%xmm3
  pand   %xmm6,%xmm0
  pand   %xmm6,%xmm2
  movdqu 0x30(%rdx),%xmm4
  packuswb %xmm0,%xmm2
  movdqu 0x10(%rdx),%xmm0
  psrlw  $0x8,%xmm1
  pand   %xmm6,%xmm3
  psrlw  $0x8,%xmm4
  psrlw  $0x8,%xmm0
  packuswb %xmm0,%xmm1
  movdqu 0x30(%rdx),%xmm0
  pand   %xmm1,%xmm9
  psrlw  $0x8,%xmm1
  pand   %xmm6,%xmm0
  packuswb %xmm0,%xmm3
  movdqu 0x20(%rdx),%xmm0
  pand   %xmm3,%xmm8
  psrlw  $0x8,%xmm3
  psrlw  $0x8,%xmm0
  packuswb %xmm4,%xmm0
  movdqa %xmm6,%xmm4
  pand   %xmm2,%xmm4
  psrlw  $0x8,%xmm2
  packuswb %xmm3,%xmm2
  movdqa %xmm6,%xmm3
  packuswb %xmm8,%xmm4
  pand   %xmm0,%xmm3
  psrlw  $0x8,%xmm0
  movdqa %xmm2,%xmm10
  packuswb %xmm3,%xmm9
  movdqa %xmm4,%xmm3
  packuswb %xmm0,%xmm1
  movdqa %xmm9,%xmm11
  punpcklbw %xmm7,%xmm3
  punpcklbw %xmm7,%xmm10
  punpcklbw %xmm7,%xmm11
  movdqa %xmm3,%xmm0
  punpckhwd %xmm5,%xmm3
  movdqa %xmm11,%xmm12
  punpcklwd %xmm5,%xmm0
  punpckhwd %xmm5,%xmm11
  punpcklwd %xmm5,%xmm12
  psllw  $0x8,%xmm10
  movdqa %xmm1,%xmm8
  pslld  $0x10,%xmm12
  pslld  $0x18,%xmm0
  punpcklbw %xmm7,%xmm8
  paddd  %xmm12,%xmm0
  pslld  $0x10,%xmm11
  movdqa %xmm10,%xmm12
  pslld  $0x18,%xmm3
  punpcklwd %xmm5,%xmm12
  punpckhwd %xmm5,%xmm10
  paddd  %xmm11,%xmm3
  punpckhbw %xmm7,%xmm4
  punpckhbw %xmm7,%xmm9
  paddd  %xmm12,%xmm0
  paddd  %xmm10,%xmm3
  movdqa %xmm8,%xmm12
  punpckhwd %xmm5,%xmm8
  movdqa %xmm9,%xmm10
  punpckhbw %xmm7,%xmm2
  paddd  %xmm8,%xmm3
  movdqa %xmm4,%xmm8
  punpcklwd %xmm5,%xmm10
  punpcklwd %xmm5,%xmm8
  punpckhwd %xmm5,%xmm4
  punpckhwd %xmm5,%xmm9
  psllw  $0x8,%xmm2
  pslld  $0x10,%xmm10
  punpcklwd %xmm5,%xmm12
  pslld  $0x10,%xmm9
  pslld  $0x18,%xmm8
  paddd  %xmm12,%xmm0
  pslld  $0x18,%xmm4
  paddd  %xmm10,%xmm8
  movdqa %xmm2,%xmm10
  paddd  %xmm9,%xmm4
  punpckhwd %xmm5,%xmm2
  punpckhbw %xmm7,%xmm1
  punpcklwd %xmm5,%xmm10
  paddd  %xmm2,%xmm4
  movdqa %xmm3,%xmm9
  movdqa %xmm0,%xmm2
  psrld  $0x18,%xmm9
  paddd  %xmm10,%xmm8
  psrld  $0x18,%xmm2
  movdqa %xmm1,%xmm10
  punpckhwd %xmm5,%xmm1
  paddd  %xmm1,%xmm4
  punpcklwd %xmm5,%xmm10
  movdqa %xmm2,%xmm1
  punpcklwd %xmm9,%xmm2
  paddd  %xmm10,%xmm8
  punpckhwd %xmm9,%xmm1
  movdqa %xmm2,%xmm9
  movdqa %xmm4,%xmm10
  punpcklwd %xmm1,%xmm2
  punpckhwd %xmm1,%xmm9
  movdqa %xmm8,%xmm1
  movdqa %xmm4,%xmm11
  psrld  $0x18,%xmm10
  psrld  $0x18,%xmm1
  punpcklwd %xmm9,%xmm2
  movdqa %xmm1,%xmm9
  punpcklwd %xmm10,%xmm1
  pand   %xmm6,%xmm2
  punpckhwd %xmm10,%xmm9
  psrld  $0x10,%xmm11
  movdqa %xmm1,%xmm10
  punpckhwd %xmm9,%xmm10
  punpcklwd %xmm9,%xmm1
  punpcklwd %xmm10,%xmm1
  movdqa %xmm3,%xmm10
  pand   %xmm6,%xmm1
  psrld  $0x10,%xmm10
  packuswb %xmm1,%xmm2
  movdqa %xmm0,%xmm1
  psrld  $0x10,%xmm1
  movaps %xmm2,0x348(%rsp)
  movd   %xmm2,%ebp
  movdqa %xmm1,%xmm9
  punpcklwd %xmm10,%xmm1
  movaps %xmm2,0x2c8(%rsp)
  movzbl %bpl,%ebp
  punpckhwd %xmm10,%xmm9
  movdqa %xmm1,%xmm10
  movaps %xmm2,0x308(%rsp)
  punpckhwd %xmm9,%xmm10
  punpcklwd %xmm9,%xmm1
  movdqa %xmm8,%xmm9
  psrld  $0x10,%xmm9
  punpcklwd %xmm10,%xmm1
  movdqa %xmm9,%xmm10
  punpcklwd %xmm11,%xmm9
  pand   %xmm6,%xmm1
  punpckhwd %xmm11,%xmm10
  movdqa %xmm9,%xmm11
  punpckhwd %xmm10,%xmm11
  punpcklwd %xmm10,%xmm9
  punpcklwd %xmm11,%xmm9
  pand   %xmm6,%xmm9
  packuswb %xmm9,%xmm1
  movdqa %xmm0,%xmm9
  punpcklwd %xmm3,%xmm0
  punpckhwd %xmm3,%xmm9
  movdqa %xmm0,%xmm3
  movaps %xmm1,0x338(%rsp)
  movd   %xmm1,%r10d
  punpckhwd %xmm9,%xmm3
  punpcklwd %xmm9,%xmm0
  movdqa %xmm8,%xmm9
  movzbl %r10b,%r10d
  punpcklwd %xmm4,%xmm8
  punpckhwd %xmm4,%xmm9
  punpcklwd %xmm3,%xmm0
  movaps %xmm1,0x2b8(%rsp)
  movdqa %xmm8,%xmm4
  punpcklwd %xmm9,%xmm8
  movdqa %xmm0,%xmm3
  movaps %xmm1,0x2f8(%rsp)
  punpckhwd %xmm9,%xmm4
  psrlw  $0x8,%xmm3
  pand   %xmm6,%xmm0
  punpcklwd %xmm4,%xmm8
  pand   %xmm6,%xmm3
  movdqa %xmm8,%xmm4
  pand   %xmm6,%xmm8
  psrlw  $0x8,%xmm4
  packuswb %xmm8,%xmm0
  pand   %xmm6,%xmm4
  movaps %xmm0,0x318(%rsp)
  movzbl 0x319(%rsp),%r11d
  movd   %xmm0,%r13d
  packuswb %xmm4,%xmm3
  movzbl %r13b,%r13d
  movaps %xmm0,0x298(%rsp)
  movaps %xmm3,0x328(%rsp)
  shl    $0x8,%r11
  movzbl 0x329(%rsp),%r14d
  movd   %xmm3,%r12d
  movzbl %r12b,%r12d
  movaps %xmm3,0x2a8(%rsp)
  or     %r14,%r11
  movaps %xmm0,0x2d8(%rsp)
  movzbl 0x339(%rsp),%r14d
  shl    $0x8,%r11
  movaps %xmm3,0x2e8(%rsp)
  or     %r14,%r11
  movzbl 0x349(%rsp),%r14d
  shl    $0x8,%r11
  or     %r14,%r11
  shl    $0x8,%r11
  or     %r13,%r11
  shl    $0x8,%r11
  or     %r12,%r11
  movzbl 0x2ab(%rsp),%r12d
  shl    $0x8,%r11
  or     %r10,%r11
  movzbl 0x29b(%rsp),%r10d
  shl    $0x8,%r11
  shl    $0x8,%r10
  or     %rbp,%r11
  or     %r12,%r10
  movzbl 0x2bb(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0x2cb(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0x2da(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0x2ea(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0x2fa(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0x30a(%rsp),%r12d
  mov    %r11,-0x78(%rsp)
  shl    $0x8,%r10
  or     %r12,%r10
  mov    %r10,-0x70(%rsp)
  movdqa -0x78(%rsp),%xmm4
  movups %xmm4,(%rdi)
  movaps %xmm0,0x218(%rsp)
  movzbl 0x21d(%rsp),%r11d
  movaps %xmm3,0x228(%rsp)
  movzbl 0x22d(%rsp),%r10d
  shl    $0x8,%r11
  movaps %xmm1,0x238(%rsp)
  or     %r10,%r11
  movaps %xmm2,0x248(%rsp)
  movzbl 0x23d(%rsp),%r10d
  shl    $0x8,%r11
  movaps %xmm0,0x258(%rsp)
  or     %r10,%r11
  movaps %xmm3,0x268(%rsp)
  movzbl 0x24d(%rsp),%r10d
  shl    $0x8,%r11
  movaps %xmm1,0x278(%rsp)
  or     %r10,%r11
  movaps %xmm0,0x198(%rsp)
  movzbl 0x25c(%rsp),%r10d
  shl    $0x8,%r11
  movaps %xmm3,0x1a8(%rsp)
  movzbl 0x1af(%rsp),%r12d
  or     %r10,%r11
  movaps %xmm1,0x1b8(%rsp)
  movzbl 0x26c(%rsp),%r10d
  shl    $0x8,%r11
  movaps %xmm2,0x1c8(%rsp)
  or     %r10,%r11
  movaps %xmm2,0x288(%rsp)
  movzbl 0x27c(%rsp),%r10d
  movzbl 0x28c(%rsp),%ebp
  shl    $0x8,%r11
  movaps %xmm2,0x208(%rsp)
  or     %r10,%r11
  movaps %xmm1,0x1f8(%rsp)
  movzbl 0x19f(%rsp),%r10d
  movaps %xmm3,0x1e8(%rsp)
  shl    $0x8,%r11
  shl    $0x8,%r10
  movaps %xmm0,0x1d8(%rsp)
  or     %rbp,%r11
  or     %r12,%r10
  movzbl 0x1bf(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0x1cf(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0x1de(%rsp),%r12d
  mov    %r11,-0x78(%rsp)
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0x1ee(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0x1fe(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0x20e(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  mov    %r10,-0x70(%rsp)
  movdqa -0x78(%rsp),%xmm4
  movups %xmm4,0x10(%rdi)
  movaps %xmm0,0x118(%rsp)
  movzbl 0x121(%rsp),%r11d
  movaps %xmm3,0x128(%rsp)
  movzbl 0x131(%rsp),%r10d
  shl    $0x8,%r11
  movaps %xmm1,0x138(%rsp)
  or     %r10,%r11
  movaps %xmm2,0x148(%rsp)
  movzbl 0x141(%rsp),%r10d
  shl    $0x8,%r11
  movaps %xmm0,0x158(%rsp)
  or     %r10,%r11
  movaps %xmm3,0x168(%rsp)
  movzbl 0x151(%rsp),%r10d
  shl    $0x8,%r11
  movaps %xmm1,0x178(%rsp)
  or     %r10,%r11
  movaps %xmm2,0x188(%rsp)
  movzbl 0x160(%rsp),%r10d
  shl    $0x8,%r11
  movaps %xmm2,0x108(%rsp)
  or     %r10,%r11
  movaps %xmm1,0xf8(%rsp)
  movzbl 0x170(%rsp),%r10d
  shl    $0x8,%r11
  movaps %xmm3,0xe8(%rsp)
  or     %r10,%r11
  movaps %xmm0,0xd8(%rsp)
  movzbl 0x180(%rsp),%r10d
  shl    $0x8,%r11
  movaps %xmm2,0xc8(%rsp)
  or     %r10,%r11
  movaps %xmm1,0xb8(%rsp)
  movaps %xmm3,0xa8(%rsp)
  shl    $0x8,%r11
  movaps %xmm0,0x98(%rsp)
  movzbl 0x190(%rsp),%ebp
  movzbl 0xa3(%rsp),%r10d
  movzbl 0xb3(%rsp),%r12d
  shl    $0x8,%r10
  or     %rbp,%r11
  or     %r12,%r10
  mov    %r11,-0x78(%rsp)
  movzbl 0xc3(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0xd3(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0xe2(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0xf2(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0x102(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0x112(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  mov    %r10,-0x70(%rsp)
  movdqa -0x78(%rsp),%xmm4
  movups %xmm4,0x20(%rdi)
  movaps %xmm0,0x18(%rsp)
  movzbl 0x25(%rsp),%r11d
  movaps %xmm3,0x28(%rsp)
  movzbl 0x35(%rsp),%r10d
  shl    $0x8,%r11
  movaps %xmm2,0x88(%rsp)
  or     %r10,%r11
  movaps %xmm1,0x78(%rsp)
  movaps %xmm3,0x68(%rsp)
  shl    $0x8,%r11
  movaps %xmm0,0x58(%rsp)
  movaps %xmm2,0x48(%rsp)
  movaps %xmm1,0x38(%rsp)
  movaps %xmm2,0x8(%rsp)
  movaps %xmm1,-0x8(%rsp)
  movaps %xmm3,-0x18(%rsp)
  movaps %xmm0,-0x28(%rsp)
  movaps %xmm2,-0x38(%rsp)
  movaps %xmm1,-0x48(%rsp)
  movaps %xmm3,-0x58(%rsp)
  movaps %xmm0,-0x68(%rsp)
  movzbl 0x45(%rsp),%r10d
  movzbl -0x49(%rsp),%r12d
  movzbl 0x94(%rsp),%ebp
  or     %r10,%r11
  movzbl 0x55(%rsp),%r10d
  shl    $0x8,%r11
  or     %r10,%r11
  movzbl 0x64(%rsp),%r10d
  shl    $0x8,%r11
  or     %r10,%r11
  movzbl 0x74(%rsp),%r10d
  shl    $0x8,%r11
  or     %r10,%r11
  movzbl 0x84(%rsp),%r10d
  shl    $0x8,%r11
  or     %r10,%r11
  movzbl -0x59(%rsp),%r10d
  shl    $0x8,%r11
  add    $0x40,%rdx
  shl    $0x8,%r10
  or     %rbp,%r11
  or     %r12,%r10
  movzbl -0x39(%rsp),%r12d
  mov    %r11,-0x78(%rsp)
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl -0x29(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl -0x1a(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl -0xa(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0x6(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  movzbl 0x16(%rsp),%r12d
  shl    $0x8,%r10
  or     %r12,%r10
  mov    %r10,-0x70(%rsp)
  movdqa -0x78(%rsp),%xmm4
  lea    0x40(%rdi),%r10
  movups %xmm4,0x30(%rdi)
  cmp    $0x10,%ax
  je     L21
  lea    -0x10(%rax),%r11d
  movzwl %r11w,%r11d
  lea    (%rdx,%r11,4),%r14
  nop
L38:
  movzbl (%rdx),%r13d
  movzbl 0x2(%rdx),%ebp
  add    $0x4,%rdx
  add    $0x4,%r10
  movzbl -0x3(%rdx),%r12d
  movzbl -0x1(%rdx),%r11d
  mov    %r13b,-0x4(%r10)
  mov    %r12b,-0x3(%r10)
  mov    %bpl,-0x2(%r10)
  mov    %r11b,-0x1(%r10)
  cmp    %r14,%rdx
  jne    L38
  movzwl %ax,%eax
L85:
  movzwl %bx,%ebx
  lea    (%rdi,%rax,4),%rdi
  lea    0x4(%r9,%rbx,4),%r9d
  cmp    %rsi,%r8
  jne    L113
L94:
  add    $0x358,%rsp
  mov    %r9d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L4:
  movzwl %ax,%eax
  mov    %rdi,%r10
  lea    (%rdx,%rax,4),%r14
  nopw   0x0(%rax,%rax,1)
L116:
  movzbl (%rdx),%r13d
  movzbl 0x2(%rdx),%ebp
  add    $0x4,%rdx
  add    $0x4,%r10
  movzbl -0x3(%rdx),%r12d
  movzbl -0x1(%rdx),%r11d
  mov    %r13b,-0x4(%r10)
  mov    %r12b,-0x3(%r10)
  mov    %bpl,-0x2(%r10)
  mov    %r11b,-0x1(%r10)
  cmp    %rdx,%r14
  jne    L116
  jmp    L85
L21:
  mov    $0x10,%eax
  jmp    L85
L24:
  xor    %eax,%eax
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D4
datatype: byte[16]

tool: {"D4": [0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00]}

assistant: ```c
int decode_block4(unsigned char *in, int length, unsigned char *out, unsigned char *lut) {
  unsigned char *look;
  unsigned int t3;
  unsigned short t0, t1, t2;
  int len = 0;
  while (length != 0) {
    t0 = (((in)[0] << 8) + ((in)[1]));
    in += 2;
    if ((t0 & 0x8000) == 0) {
      t1 = t0 >> 8;
      t2 = t1 & 0xFE;
      look = lut + t2;
      t2 = (((look)[0] << 8) + ((look)[1]));
      t1 &= 1;
      t2 <<= 1;
      t1 |= t2;
      do {
        (out)[0] = ((t1) >> 8) & 0xFF;
        (out)[1] = ((t1)) & 0xFF;
      } while (0);
      out += 2;
      t1 = t0 & 0xFE;
      look = lut + t1;
      t1 = (((look)[0] << 8) + ((look)[1]));
      t0 &= 1;
      length -= 2;
      t1 <<= 1;
      t1 |= t0;
      do {
        (out)[0] = ((t1) >> 8) & 0xFF;
        (out)[1] = ((t1)) & 0xFF;
      } while (0);
      out += 2;
      len += 4;
    } else {
      t1 = t0 & 0x1F;
      t0 &= 0x7FE0;
      t0 >>= 4;
      length -= 2;
      look = out - t0;
      while (t1 != 0) {
        t3 = (unsigned int)(((look)[0] << 24) + ((look)[1] << 16) + ((look)[2] << 8) + ((look)[3]));
        look += 4;
        t1 -= 1;
        do {
          (out)[0] = ((t3) >> 24) & 0xFF;
          (out)[1] = ((t3) >> 16) & 0xFF;
          (out)[2] = ((t3) >> 8) & 0xFF;
          (out)[3] = (t3)&0xFF;
        } while (0);
        out += 4;
        len += 4;
      }
    }
  }
  return len;
}
```