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

```asm
<html_unsafe_printf>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  test   %rsi,%rsi
  je     L29
  movb   $0x0,(%rdi)
  lea    -0x1(%rdx),%r13
  movzbl (%rsi),%edx
  test   %dl,%dl
  je     L47
  test   %r13,%r13
  je     L47
  lea    0x1(%rsi),%r14
  xor    %ebx,%ebx
  lea    D59(%rip),%rbp
  lea    D78(%rip),%r15
  nopl   (%rax)
L132:
  lea    -0x20(%rdx),%eax
  lea    (%r12,%rbx,1),%rdi
  cmp    $0x1e,%al
  ja     L134
  movzbl %al,%eax
  movslq 0x0(%rbp,%rax,4),%rax
  add    %rbp,%rax
  notrack jmp *%rax
  nopl   0x0(%rax)
L134:
  add    $0x1,%rbx
  mov    %dl,(%rdi)
  movb   $0x0,(%r12,%rbx,1)
  nopl   0x0(%rax,%rax,1)
L106:
  movzbl (%r14),%edx
  add    $0x1,%r14
  cmp    %r13,%rbx
  jae    L104
  test   %dl,%dl
  jne    L132
L104:
  cmp    %r13,%rbx
  cmova  %r13,%rbx
  add    %r12,%rbx
L42:
  movb   $0x0,(%rbx)
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  mov    %r13,%rdx
  lea    D51(%rip),%rsi
  sub    %rbx,%rdx
  add    $0x4,%rbx
  call   <strncat@plt>
  jmp    L106
  nopl   0x0(%rax,%rax,1)
  mov    %r13,%rdx
  lea    D75(%rip),%rsi
  sub    %rbx,%rdx
  add    $0x4,%rbx
  call   <strncat@plt>
  jmp    L106
  nopl   0x0(%rax,%rax,1)
  mov    %r13,%rdx
  mov    %r15,%rsi
  sub    %rbx,%rdx
  add    $0x6,%rbx
  call   <strncat@plt>
  jmp    L106
  nopw   0x0(%rax,%rax,1)
  mov    %r13,%rdx
  lea    D28(%rip),%rsi
  sub    %rbx,%rdx
  add    $0x6,%rbx
  call   <strncat@plt>
  jmp    L106
  nopl   0x0(%rax,%rax,1)
  mov    %r13,%rdx
  lea    D67(%rip),%rsi
  sub    %rbx,%rdx
  add    $0x5,%rbx
  call   <strncat@plt>
  jmp    L106
  nopl   0x0(%rax,%rax,1)
  mov    %r13,%rdx
  lea    D57(%rip),%rsi
  sub    %rbx,%rdx
  add    $0x6,%rbx
  call   <strncat@plt>
  jmp    L106
  nopl   0x0(%rax,%rax,1)
  mov    %r13,%rdx
  lea    D40(%rip),%rsi
  sub    %rbx,%rdx
  add    $0x6,%rbx
  call   <strncat@plt>
  jmp    L106
  nopl   0x0(%rax,%rax,1)
L29:
  movb   $0x0,(%rdi)
L47:
  mov    %r12,%rbx
  jmp    L42
```

tool_calls: name: retrieve_data
arguments: data_label: D78
type: string
name: retrieve_data
arguments: data_label: D51
type: string
name: retrieve_data
arguments: data_label: D75
type: string
name: retrieve_data
arguments: data_label: D28
type: string
name: retrieve_data
arguments: data_label: D67
type: string
name: retrieve_data
arguments: data_label: D57
type: string
name: retrieve_data
arguments: data_label: D40
type: string

tool: D78: &#x2F;

tool: D51: &gt;

tool: D75: &lt;

tool: D28: &#x27;

tool: D67: &amp;

tool: D57: &quot;

tool: D40: &nbsp;

assistant: ```c
const char *html_unsafe_printf(char *dst, const char *src, size_t len) {
  size_t i;
  size_t o;
  src = ((src)) ? src : "";
  dst[0] = '\0';
  len--;
  o = 0;
  for (i = 0; ((src[i] != '\0') && (o < len)); i++) {
    switch (src[i]) {
    case ' ':
      strncat(&dst[o], "&nbsp;", len - o);
      o += 6;
      break;
    case '&':
      strncat(&dst[o], "&amp;", len - o);
      o += 5;
      break;
    case '<':
      strncat(&dst[o], "&lt;", len - o);
      o += 4;
      break;
    case '>':
      strncat(&dst[o], "&gt;", len - o);
      o += 4;
      break;
    case '"':
      strncat(&dst[o], "&quot;", len - o);
      o += 6;
      break;
    case '\'':
      strncat(&dst[o], "&#x27;", len - o);
      o += 6;
      break;
    case '/':
      strncat(&dst[o], "&#x2F;", len - o);
      o += 6;
      break;
    default:
      dst[o + 0] = src[i];
      dst[o + 1] = '\0';
      o++;
      break;
    };
  };
  o = (o >= len) ? len : o;
  dst[o] = '\0';
  return (dst);
}
```