user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<pi_pack>:
  endbr64
  mov    %ecx,%eax
  pxor   %xmm0,%xmm0
  push   %r13
  mov    %rsi,%r13
  shr    $0x1f,%eax
  push   %r12
  mov    %rdi,%r12
  add    %ecx,%eax
  push   %rbp
  mov    %ecx,%ebp
  sar    %eax
  push   %rbx
  mov    %rdx,%rbx
  cvtsi2sd %eax,%xmm0
  sub    $0x8,%rsp
  call   <ceil@plt>
  lea    0x1(%rax),%edi
  call   <malloc@plt>
  mov    %rax,%rdx
  test   %ebp,%ebp
  jle    L196
  lea    -0x1(%rbp),%edi
  mov    %edi,%esi
  shr    %esi
  lea    0x1(%rsi),%eax
  lea    (%rbx,%rax,2),%rcx
  mov    %rax,%rsi
  cmp    %rcx,%rdx
  setae  %cl
  add    %rdx,%rax
  cmp    %rax,%rbx
  setae  %al
  or     %al,%cl
  je     L6
  cmp    $0x1d,%edi
  jbe    L6
  mov    %esi,%ecx
  movdqa D6(%rip),%xmm4
  movdqa D3(%rip),%xmm3
  xor    %eax,%eax
  shr    $0x4,%ecx
  shl    $0x4,%rcx
  xchg   %ax,%ax
L83:
  movdqu (%rbx,%rax,2),%xmm0
  movdqu 0x10(%rbx,%rax,2),%xmm1
  movdqu 0x10(%rbx,%rax,2),%xmm2
  pand   %xmm4,%xmm1
  pand   %xmm4,%xmm0
  packuswb %xmm1,%xmm0
  movdqu (%rbx,%rax,2),%xmm1
  psrlw  $0x8,%xmm2
  paddb  %xmm3,%xmm0
  paddb  %xmm0,%xmm0
  psrlw  $0x8,%xmm1
  paddb  %xmm0,%xmm0
  packuswb %xmm2,%xmm1
  paddb  %xmm0,%xmm0
  paddb  %xmm3,%xmm1
  paddb  %xmm0,%xmm0
  paddb  %xmm1,%xmm0
  movups %xmm0,(%rdx,%rax,1)
  add    $0x10,%rax
  cmp    %rcx,%rax
  jne    L83
  mov    %esi,%eax
  and    $0xfffffff0,%eax
  lea    (%rax,%rax,1),%ecx
  cmp    %eax,%esi
  je     L187
  movslq %ecx,%r10
  mov    %eax,%r8d
  lea    0x1(%rax),%r9d
  movsbl (%rbx,%r10,1),%edi
  movsbl 0x1(%rbx,%r10,1),%r10d
  sub    $0x30,%edi
  shl    $0x4,%edi
  lea    -0x30(%rdi,%r10,1),%r10d
  lea    0x2(%rcx),%edi
  mov    %r10b,(%rdx,%r8,1)
  cmp    %edi,%ebp
  jle    L187
  movslq %edi,%rdi
  movslq %r9d,%r9
  lea    0x2(%rax),%r10d
  movsbl (%rbx,%rdi,1),%r8d
  movsbl 0x1(%rbx,%rdi,1),%edi
  sub    $0x30,%r8d
  shl    $0x4,%r8d
  lea    -0x30(%r8,%rdi,1),%edi
  mov    %dil,(%rdx,%r9,1)
  lea    0x4(%rcx),%edi
  cmp    %edi,%ebp
  jle    L187
  movslq %edi,%rdi
  movslq %r10d,%r10
  lea    0x3(%rax),%r9d
  movsbl (%rbx,%rdi,1),%r8d
  movsbl 0x1(%rbx,%rdi,1),%edi
  sub    $0x30,%r8d
  shl    $0x4,%r8d
  lea    -0x30(%r8,%rdi,1),%edi
  mov    %dil,(%rdx,%r10,1)
  lea    0x6(%rcx),%edi
  cmp    %edi,%ebp
  jle    L187
  movslq %edi,%rdi
  movslq %r9d,%r9
  lea    0x4(%rax),%r10d
  movsbl (%rbx,%rdi,1),%r8d
  movsbl 0x1(%rbx,%rdi,1),%edi
  sub    $0x30,%r8d
  shl    $0x4,%r8d
  lea    -0x30(%r8,%rdi,1),%edi
  mov    %dil,(%rdx,%r9,1)
  lea    0x8(%rcx),%edi
  cmp    %edi,%ebp
  jle    L187
  movslq %edi,%rdi
  movslq %r10d,%r10
  lea    0x5(%rax),%r9d
  movsbl (%rbx,%rdi,1),%r8d
  movsbl 0x1(%rbx,%rdi,1),%edi
  sub    $0x30,%r8d
  shl    $0x4,%r8d
  lea    -0x30(%r8,%rdi,1),%edi
  mov    %dil,(%rdx,%r10,1)
  lea    0xa(%rcx),%edi
  cmp    %edi,%ebp
  jle    L187
  movslq %edi,%rdi
  movslq %r9d,%r9
  lea    0x6(%rax),%r10d
  movsbl (%rbx,%rdi,1),%r8d
  movsbl 0x1(%rbx,%rdi,1),%edi
  sub    $0x30,%r8d
  shl    $0x4,%r8d
  lea    -0x30(%r8,%rdi,1),%edi
  mov    %dil,(%rdx,%r9,1)
  lea    0xc(%rcx),%edi
  cmp    %edi,%ebp
  jle    L187
  movslq %edi,%rdi
  movslq %r10d,%r10
  lea    0x7(%rax),%r9d
  movsbl (%rbx,%rdi,1),%r8d
  movsbl 0x1(%rbx,%rdi,1),%edi
  sub    $0x30,%r8d
  shl    $0x4,%r8d
  lea    -0x30(%r8,%rdi,1),%edi
  mov    %dil,(%rdx,%r10,1)
  lea    0xe(%rcx),%edi
  cmp    %edi,%ebp
  jle    L187
  movslq %edi,%rdi
  movslq %r9d,%r9
  lea    0x8(%rax),%r10d
  movsbl (%rbx,%rdi,1),%r8d
  movsbl 0x1(%rbx,%rdi,1),%edi
  sub    $0x30,%r8d
  shl    $0x4,%r8d
  lea    -0x30(%r8,%rdi,1),%edi
  mov    %dil,(%rdx,%r9,1)
  lea    0x10(%rcx),%edi
  cmp    %edi,%ebp
  jle    L187
  movslq %edi,%rdi
  movslq %r10d,%r10
  lea    0x9(%rax),%r9d
  movsbl (%rbx,%rdi,1),%r8d
  movsbl 0x1(%rbx,%rdi,1),%edi
  sub    $0x30,%r8d
  shl    $0x4,%r8d
  lea    -0x30(%r8,%rdi,1),%edi
  mov    %dil,(%rdx,%r10,1)
  lea    0x12(%rcx),%edi
  cmp    %edi,%ebp
  jle    L187
  movslq %edi,%rdi
  movslq %r9d,%r9
  lea    0xa(%rax),%r10d
  movsbl (%rbx,%rdi,1),%r8d
  movsbl 0x1(%rbx,%rdi,1),%edi
  sub    $0x30,%r8d
  shl    $0x4,%r8d
  lea    -0x30(%r8,%rdi,1),%edi
  mov    %dil,(%rdx,%r9,1)
  lea    0x14(%rcx),%edi
  cmp    %edi,%ebp
  jle    L187
  movslq %edi,%rdi
  movslq %r10d,%r10
  lea    0xb(%rax),%r9d
  movsbl (%rbx,%rdi,1),%r8d
  movsbl 0x1(%rbx,%rdi,1),%edi
  sub    $0x30,%r8d
  shl    $0x4,%r8d
  lea    -0x30(%r8,%rdi,1),%edi
  mov    %dil,(%rdx,%r10,1)
  lea    0x16(%rcx),%edi
  cmp    %edi,%ebp
  jle    L187
  movslq %edi,%rdi
  movslq %r9d,%r9
  lea    0xc(%rax),%r10d
  movsbl (%rbx,%rdi,1),%r8d
  movsbl 0x1(%rbx,%rdi,1),%edi
  sub    $0x30,%r8d
  shl    $0x4,%r8d
  lea    -0x30(%r8,%rdi,1),%edi
  mov    %dil,(%rdx,%r9,1)
  lea    0x18(%rcx),%edi
  cmp    %edi,%ebp
  jle    L187
  movslq %edi,%rdi
  movslq %r10d,%r10
  lea    0xd(%rax),%r9d
  movsbl (%rbx,%rdi,1),%r8d
  movsbl 0x1(%rbx,%rdi,1),%edi
  sub    $0x30,%r8d
  shl    $0x4,%r8d
  lea    -0x30(%r8,%rdi,1),%edi
  mov    %dil,(%rdx,%r10,1)
  lea    0x1a(%rcx),%edi
  cmp    %edi,%ebp
  jle    L187
  movslq %edi,%rdi
  movslq %r9d,%r9
  add    $0x1c,%ecx
  add    $0xe,%eax
  movsbl (%rbx,%rdi,1),%r8d
  movsbl 0x1(%rbx,%rdi,1),%edi
  sub    $0x30,%r8d
  shl    $0x4,%r8d
  lea    -0x30(%r8,%rdi,1),%edi
  mov    %dil,(%rdx,%r9,1)
  cmp    %ecx,%ebp
  jle    L187
  movslq %ecx,%rcx
  cltq
  movsbl (%rbx,%rcx,1),%edi
  movsbl 0x1(%rbx,%rcx,1),%ecx
  sub    $0x30,%edi
  shl    $0x4,%edi
  lea    -0x30(%rdi,%rcx,1),%ecx
  mov    %cl,(%rdx,%rax,1)
L187:
  mov    %rdx,(%r12)
  mov    %esi,0x0(%r13)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L6:
  mov    %esi,%r8d
  xor    %eax,%eax
  nopl   (%rax)
L170:
  movsbl (%rbx,%rax,2),%ecx
  movsbl 0x1(%rbx,%rax,2),%edi
  sub    $0x30,%ecx
  shl    $0x4,%ecx
  lea    -0x30(%rcx,%rdi,1),%ecx
  mov    %cl,(%rdx,%rax,1)
  add    $0x1,%rax
  cmp    %r8,%rax
  jne    L170
  jmp    L187
  nopl   0x0(%rax)
L196:
  xor    %esi,%esi
  jmp    L187
```

tool_calls: name: unpack_data
arguments: data_label: D6
data_type: byte[16]
name: unpack_data
arguments: data_label: D3
data_type: byte[16]

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

tool: {"D3": [0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0]}

assistant: ```c
void pi_pack(char **output, int *output_size, char *input, int input_size) {
  int byte = 0, size = 0, i = 0, l = 0;
  char *out = NULL;
  out = malloc(sizeof(char) * ceil((double)(input_size / 2)) + 1);
  for (i = 0, l = input_size; i < l; i += 2) {
    byte = ((int)input[i] - 48) << 4;
    byte += (int)input[i + 1] - 48;
    out[size++] = (char)byte;
  }
  *output = out;
  *output_size = size;
}
```