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

```asm
<netbios_copy_name_raw>:
  endbr64
  push   %r15
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  movb   $0x0,(%r8)
  mov    %rdi,0x28(%rsp)
  mov    %rsi,0x8(%rsp)
  mov    %edx,0x18(%rsp)
  mov    %r9d,0x24(%rsp)
  cmp    %edx,%ecx
  jae    L39
  mov    %r8,%r15
  xor    %ebx,%ebx
  lea    D2(%rip),%r13
  xor    %ebp,%ebp
  nopw   0x0(%rax,%rax,1)
L85:
  mov    0x8(%rsp),%rsi
  mov    %r14d,%eax
  add    $0x1,%r14d
  cmp    $0xf,%ebp
  sete   %cl
  movzbl (%rsi,%rax,1),%edi
  jmp    L110
L118:
  mov    %eax,%ebx
L110:
  test   %ebx,%ebx
  je     L21
  test   %cl,%cl
  je     L21
  lea    -0x1(%rbx),%edx
  cmpb   $0x20,(%r15,%rdx,1)
  mov    %rdx,%rax
  je     L118
  mov    %ebx,%edx
  lea    0x1(%rbx),%r9d
  add    %r15,%r9
  lea    (%r15,%rdx,1),%r12
  mov    %dil,(%r12)
  movb   $0x0,(%r9)
  movsbl (%r12),%edi
  mov    %r9,0x10(%rsp)
  call   <isprint@plt>
  mov    0x10(%rsp),%r9
L4:
  mov    0x24(%rsp),%eax
  lea    0x3(%rbx),%ecx
  sub    $0x1,%eax
  cmp    %eax,%ecx
  ja     L87
  movzbl (%r12),%eax
  lea    0x2(%rbx),%edi
  shr    $0x4,%al
  and    $0xf,%eax
  movzbl 0x0(%r13,%rax,1),%eax
  mov    %al,(%r9)
  movzbl (%r12),%eax
  and    $0xf,%eax
  movzbl 0x0(%r13,%rax,1),%eax
  mov    %al,(%r15,%rdi,1)
  lea    0x4(%rbx),%eax
  movb   $0x3e,(%r15,%rcx,1)
  mov    %rax,%rbx
  movb   $0x0,(%r15,%rax,1)
  movb   $0x3c,(%r12)
L34:
  add    $0x1,%ebp
  cmp    $0xf,%ebp
  ja     L39
  cmp    %r14d,0x18(%rsp)
  ja     L85
L39:
  add    $0x38,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L21:
  mov    %ebx,%edx
  lea    0x1(%rbx),%r9d
  mov    %cl,0x23(%rsp)
  lea    (%r15,%rdx,1),%r12
  mov    %r9d,0x1c(%rsp)
  add    %r15,%r9
  mov    %dil,(%r12)
  movb   $0x0,(%r9)
  movsbl (%r12),%edi
  mov    %r9,0x10(%rsp)
  call   <isprint@plt>
  mov    0x10(%rsp),%r9
  test   %eax,%eax
  je     L4
  movzbl 0x23(%rsp),%ecx
  mov    0x1c(%rsp),%r11d
  test   %cl,%cl
  jne    L4
  mov    %r11d,%ebx
  jmp    L34
L87:
  mov    0x28(%rsp),%rdi
  lea    D16(%rip),%rsi
  call   <FRAMERR@plt>
  jmp    L39
```

tool_calls: name: retrieve_data
arguments: label: D2
type_infered: string
name: retrieve_data
arguments: label: D16
type_infered: string

tool: D2: 0123456789ABCDEF

tool: D16: netbios: name too long


assistant: ```c
unsigned netbios_copy_name_raw(struct NetFrame *frame, const unsigned char *px, unsigned length, unsigned offset, char *name, unsigned sizeof_name) {
  unsigned j = 0;
  unsigned k = 0;
  name[0] = '\0';
  for (j = 0; j < 16 && offset < length; j++) {
    char c = px[offset++];
    while (j == 15 && (k > 0 && name[k - 1] == ' '))
      k--;
    name[k] = c;
    name[k + 1] = '\0';
    if (!isprint(name[k]) || j == 15) {
      if (k + 3 > sizeof_name - 1) {
        FRAMERR(frame, "netbios: name too long\n");
        break;
      }
      name[k + 1] = "0123456789ABCDEF"[(name[k] >> 4) & 0xF];
      name[k + 2] = "0123456789ABCDEF"[(name[k] >> 0) & 0xF];
      name[k + 3] = '>';
      name[k + 4] = '\0';
      name[k] = '<';
      k += 4;
    } else
      k++;
  }
  return offset;
}
```