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

```asm
<translate_netbios_name>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,-0x2c(%rbp)
  movl   $0x0,-0x8(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L95
L32:
  mov    -0xc(%rbp),%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jle    L36
  mov    -0xc(%rbp),%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x50,%al
  jle    L81
L36:
  mov    -0xc(%rbp),%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%ecx
  mov    -0xc(%rbp),%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x18(%rbp),%rax
  lea    D11(%rip),%rsi
  mov    %rax,%rdi
  call   <FRAMERR@plt>
L81:
  mov    -0xc(%rbp),%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x41,%eax
  shl    $0x4,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0xc(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jle    L96
  mov    -0xc(%rbp),%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x50,%al
  jle    L92
L96:
  mov    -0xc(%rbp),%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%ecx
  mov    -0xc(%rbp),%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x18(%rbp),%rax
  lea    D11(%rip),%rsi
  mov    %rax,%rdi
  call   <FRAMERR@plt>
L92:
  mov    -0xc(%rbp),%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L35
  mov    -0xc(%rbp),%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  je     L35
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rdx),%ecx
  mov    -0xc(%rbp),%esi
  mov    -0x20(%rbp),%rdx
  add    %rsi,%rdx
  movzbl (%rdx),%edx
  sub    $0x41,%edx
  and    $0xf,%edx
  mov    %eax,%esi
  mov    -0x28(%rbp),%rax
  add    %rsi,%rax
  or     %ecx,%edx
  mov    %dl,(%rax)
L35:
  addl   $0x1,-0xc(%rbp)
L95:
  mov    -0xc(%rbp),%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L94
  mov    -0xc(%rbp),%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L32
L94:
  cmpl   $0x0,-0x8(%rbp)
  je     L109
  mov    -0x8(%rbp),%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isprint@plt>
  test   %eax,%eax
  jne    L109
  mov    -0x8(%rbp),%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0x4(%rbp)
  subl   $0x1,-0x8(%rbp)
  jmp    L23
L152:
  subl   $0x1,-0x8(%rbp)
L23:
  cmpl   $0x0,-0x8(%rbp)
  je     L153
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L152
L153:
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x3c,(%rax)
  mov    -0x4(%rbp),%eax
  shr    $0x4,%eax
  and    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    %ecx,%ecx
  lea    D24(%rip),%rax
  movzbl (%rcx,%rax,1),%eax
  mov    %al,(%rdx)
  mov    -0x4(%rbp),%eax
  and    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    %ecx,%ecx
  lea    D24(%rip),%rax
  movzbl (%rcx,%rax,1),%eax
  mov    %al,(%rdx)
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x3e,(%rax)
  jmp    L109
L42:
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  mov    %eax,%edx
  mov    -0x20(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  movzbl (%rcx),%eax
  mov    %al,(%rdx)
L109:
  mov    -0xc(%rbp),%edx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L115
  mov    -0x2c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x8(%rbp)
  jb     L42
L115:
  mov    -0x8(%rbp),%edx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  nop
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D11
type: string
name: read_data
arguments: data_tag: D24
type: string

tool: D11: netbios: bad netbios name char %c (0x%02x) 


tool: D24: 0123456789ABCDEF

assistant: ```c
void translate_netbios_name(struct NetFrame *frame, const char *name, char *netbios_name, unsigned sizeof_netbios_name) {
  unsigned j;
  unsigned k;
  sizeof_netbios_name;
  k = 0;
  for (j = 0; name[j] && name[j] != '.'; j++) {
    if (name[j] < 'A' || name[j] > 'A' + 15)
      FRAMERR(frame, "netbios: bad netbios name char %c (0x%02x) \n", name[j], name[j]);
    netbios_name[k] = (char)((name[j] - 'A') << 4);
    j++;
    if (name[j] < 'A' || name[j] > 'A' + 15)
      FRAMERR(frame, "netbios: bad netbios name char %c (0x%02x) \n", name[j], name[j]);
    if (name[j] && name[j] != '.')
      netbios_name[k++] |= (char)((name[j] - 'A') & 0x0F);
  }
  if (k && !isprint(netbios_name[k])) {
    unsigned code = netbios_name[k];
    k--;
    while (k && isspace(netbios_name[k - 1]))
      k--;
    netbios_name[k++] = '<';
    netbios_name[k++] = "0123456789ABCDEF"[(code >> 4) & 0x0f];
    netbios_name[k++] = "0123456789ABCDEF"[(code >> 0) & 0x0f];
    netbios_name[k++] = '>';
  }
  while (name[j] && k < sizeof_netbios_name - 1)
    netbios_name[k++] = name[j++];
  netbios_name[k] = '\0';
}
```