user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<bin2hex>:
  endbr64
  mov    %rdi,%r8
  mov    %esi,%eax
  mov    %rdx,%r9
  test   %esi,%esi
  jle    L51
  movslq %esi,%rdx
  lea    (%r9,%rdx,2),%rcx
  cmp    %rcx,%rdi
  setae  %cl
  add    %rdi,%rdx
  cmp    %rdx,%r9
  setae  %dl
  or     %dl,%cl
  je     L6
  lea    -0x1(%rsi),%edx
  cmp    $0xe,%edx
  jbe    L6
  mov    %esi,%ecx
  movdqa D7(%rip),%xmm6
  xor    %edx,%edx
  pxor   %xmm2,%xmm2
  shr    $0x4,%ecx
  movdqa D1(%rip),%xmm5
  movdqa D16(%rip),%xmm4
  movdqa D18(%rip),%xmm3
  shl    $0x4,%rcx
  nopl   (%rax)
L75:
  movdqu (%r8,%rdx,1),%xmm1
  movdqa %xmm1,%xmm0
  pand   %xmm6,%xmm1
  psrlw  $0x4,%xmm0
  pand   %xmm6,%xmm0
  movdqa %xmm0,%xmm7
  movdqa %xmm0,%xmm8
  psubusb %xmm5,%xmm0
  pcmpeqb %xmm2,%xmm0
  paddb  %xmm3,%xmm8
  paddb  %xmm4,%xmm7
  pand   %xmm0,%xmm7
  pandn  %xmm8,%xmm0
  movdqa %xmm1,%xmm8
  por    %xmm7,%xmm0
  movdqa %xmm1,%xmm7
  psubusb %xmm5,%xmm1
  pcmpeqb %xmm2,%xmm1
  paddb  %xmm4,%xmm7
  paddb  %xmm3,%xmm8
  pand   %xmm1,%xmm7
  pandn  %xmm8,%xmm1
  por    %xmm7,%xmm1
  movdqa %xmm0,%xmm7
  punpcklbw %xmm1,%xmm7
  punpckhbw %xmm1,%xmm0
  movups %xmm7,(%r9,%rdx,2)
  movups %xmm0,0x10(%r9,%rdx,2)
  add    $0x10,%rdx
  cmp    %rdx,%rcx
  jne    L75
  mov    %eax,%ecx
  and    $0xfffffff0,%ecx
  lea    (%rcx,%rcx,1),%esi
  cmp    %ecx,%eax
  je     L49
  movslq %esi,%rsi
  add    %r9,%rsi
  jmp    L88
  nopl   (%rax)
L95:
  add    $0x57,%edx
  add    $0x1,%rcx
  add    $0x2,%rsi
  mov    %dl,-0x1(%rsi)
  cmp    %ecx,%eax
  jle    L49
L88:
  movzbl (%r8,%rcx,1),%edx
  shr    $0x4,%dl
  lea    0x57(%rdx),%r10d
  cmp    $0xa,%dl
  lea    0x30(%rdx),%edi
  mov    %r10d,%edx
  cmovb  %edi,%edx
  mov    %dl,(%rsi)
  movzbl (%r8,%rcx,1),%edx
  and    $0xf,%edx
  cmp    $0x9,%dl
  ja     L95
  add    $0x30,%edx
  add    $0x1,%rcx
  add    $0x2,%rsi
  mov    %dl,-0x1(%rsi)
  cmp    %ecx,%eax
  jg     L88
L49:
  add    %eax,%eax
  movslq %eax,%rdx
  add    %rdx,%r9
  movb   $0x0,(%r9)
  ret
  nopl   0x0(%rax,%rax,1)
L6:
  mov    %eax,%r10d
  xor    %edx,%edx
L117:
  movzbl (%r8,%rdx,1),%ecx
  shr    $0x4,%cl
  cmp    $0x9,%cl
  lea    0x30(%rcx),%edi
  lea    0x57(%rcx),%esi
  cmova  %esi,%edi
  mov    %dil,(%r9,%rdx,2)
  movzbl (%r8,%rdx,1),%ecx
  and    $0xf,%ecx
  cmp    $0x9,%cl
  ja     L57
  add    $0x30,%ecx
  mov    %cl,0x1(%r9,%rdx,2)
  add    $0x1,%rdx
  cmp    %rdx,%r10
  jne    L117
  jmp    L49
  nopl   (%rax)
L57:
  add    $0x57,%ecx
  mov    %cl,0x1(%r9,%rdx,2)
  add    $0x1,%rdx
  cmp    %rdx,%r10
  jne    L117
  jmp    L49
  nopl   0x0(%rax,%rax,1)
L51:
  movb   $0x0,(%r9)
  xor    %eax,%eax
  ret
```

tool_calls: name: parse_data
arguments: data_label: D7
type: byte[16]
name: parse_data
arguments: data_label: D1
type: byte[16]
name: parse_data
arguments: data_label: D16
type: byte[16]
name: parse_data
arguments: data_label: D18
type: byte[16]

tool: {"D7": [0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f]}

tool: {"D1": [0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09]}

tool: {"D16": [0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30]}

tool: {"D18": [0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57]}

assistant: ```c
int bin2hex(const unsigned char *in, int len, char *out) {
  int n1, n2;
  unsigned char ch;
  for (n1 = 0, n2 = 0; n1 < len; ++n1) {
    ch = in[n1] >> 4;
    if (ch <= 0x09)
      out[n2++] = ch + '0';
    else
      out[n2++] = ch - 10 + 'a';
    ch = in[n1] & 0x0f;
    if (ch <= 0x09)
      out[n2++] = ch + '0';
    else
      out[n2++] = ch - 10 + 'a';
  }
  out[n2] = '\0';
  return n2;
}
```