user: Please show me the C implementation that matches the assembly code listed below:

```asm
<lily_lily_to_html>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x38,%rsp
  call   <strlen@plt>
  mov    D101(%rip),%rdi
  mov    %rax,0x10(%rsp)
  mov    %rax,%r13
  lea    (%rax,%rax,2),%rax
  lea    0x1(%rax,%rax,1),%rsi
  call   <realloc@plt>
  mov    %rax,D16(%rip)
  test   %rax,%rax
  je     L177
L448:
  cmpq   $0x0,0x10(%rsp)
  je     L366
  mov    $0x20,%esi
  mov    %rbp,%rdi
  mov    %rbp,%r15
  call   <strchr@plt>
  mov    $0x1,%r10d
  movl   $0x0,0x24(%rsp)
  lea    0x1(%rbp),%r11
  mov    %rax,%rdx
  movzbl 0x1(%rbp),%eax
  mov    %r10,%r14
  movl   $0x0,0x28(%rsp)
  movl   $0x0,0x2c(%rsp)
  mov    $0x1,%r9d
  cmp    $0x20,%al
  mov    %eax,%ecx
  sete   %sil
  and    $0xfffffffd,%ecx
  cmp    $0x2c,%cl
  sete   %bl
  test   $0xdf,%al
  sete   %al
  xor    %r13d,%r13d
  xor    %r12d,%r12d
  or     %eax,%ebx
  movzbl %bl,%ebx
  test   %rdx,%rdx
  je     L56
  nop
L43:
  movzbl (%r15),%eax
  movslq %r13d,%rcx
  cmp    $0x3e,%al
  jg     L185
L78:
  cmp    $0x1f,%al
  jle    L274
  lea    -0x20(%rax),%edi
  cmp    $0x1e,%dil
  ja     L274
  lea    D16(%rip),%r8
  movzbl %dil,%edi
  movslq (%r8,%rdi,4),%rdi
  add    %r8,%rdi
  notrack jmp *%rdi
  nopl   0x0(%rax)
L274:
  mov    D16(%rip),%rdx
  add    $0x1,%r13d
  mov    %al,(%rdx,%rcx,1)
  cs nopw 0x0(%rax,%rax,1)
L180:
  lea    0x1(%r12),%rcx
  cmp    %rcx,0x10(%rsp)
  jbe    L42
L436:
  lea    0x0(%rbp,%rcx,1),%r15
  mov    $0x20,%esi
  lea    0x2(%r12),%r14
  mov    %rcx,0x8(%rsp)
  mov    %r15,%rdi
  call   <strchr@plt>
  lea    0x0(%rbp,%r14,1),%r11
  mov    %rax,%rdx
  movzbl (%r11),%eax
  cmp    $0x20,%al
  sete   %sil
  test   $0xdf,%al
  sete   %bl
  and    $0xfffffffd,%eax
  cmp    $0x2c,%al
  sete   %al
  xor    %r9d,%r9d
  or     %eax,%ebx
  cmpb   $0x20,0x0(%rbp,%r12,1)
  mov    0x8(%rsp),%r12
  movzbl %bl,%ebx
  sete   %r9b
  test   %rdx,%rdx
  jne    L43
L56:
  mov    %rbp,%rdi
  mov    %r9d,0x20(%rsp)
  mov    %sil,0x18(%rsp)
  mov    %r11,0x8(%rsp)
  call   <strlen@plt>
  mov    0x20(%rsp),%r9d
  movzbl 0x18(%rsp),%esi
  movslq %r13d,%rcx
  lea    0x0(%rbp,%rax,1),%rdx
  movzbl (%r15),%eax
  mov    0x8(%rsp),%r11
  cmp    $0x3e,%al
  jle    L78
L185:
  cmp    $0x5f,%al
  jne    L274
  mov    $0x5f,%esi
  mov    %r11,%rdi
  mov    %r9d,0x20(%rsp)
  mov    %rdx,0x18(%rsp)
  mov    %rcx,0x8(%rsp)
  call   <strchr@plt>
  mov    0x8(%rsp),%rcx
  mov    0x18(%rsp),%rdx
  test   %rax,%rax
  mov    0x20(%rsp),%r9d
  je     L242
  movzbl 0x1(%rax),%edi
  mov    %edi,%esi
  and    $0xfffffffd,%esi
  cmp    $0x2c,%sil
  sete   %sil
  and    $0xdf,%edi
  sete   %dil
  or     %edi,%esi
  movzbl %sil,%esi
L57:
  add    D16(%rip),%rcx
  mov    %rcx,%rdi
  test   %ebx,0x24(%rsp)
  jne    L401
  mov    0x24(%rsp),%ebx
  xor    $0x1,%ebx
  and    %r9d,%ebx
  je     L111
  cmp    %rax,%rdx
  jbe    L111
  test   %esi,%esi
  jne    L305
  nop
L111:
  movzbl (%r15),%eax
  add    $0x1,%r13d
  lea    0x1(%r12),%rcx
  mov    %al,(%rdi)
  cmp    %rcx,0x10(%rsp)
  ja     L436
  nopw   0x0(%rax,%rax,1)
L42:
  movslq %r13d,%r13
L366:
  mov    D16(%rip),%rax
  movb   $0x0,(%rax,%r13,1)
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
  add    D16(%rip),%rcx
  mov    $0x4,%edx
  lea    D15(%rip),%rsi
  add    $0x4,%r13d
  mov    %rcx,%rdi
  call   <memcpy@plt>
  jmp    L180
  nopl   0x0(%rax)
  mov    $0x2f,%esi
  mov    %r11,%rdi
  mov    %r9d,0x20(%rsp)
  mov    %rdx,0x18(%rsp)
  mov    %rcx,0x8(%rsp)
  call   <strchr@plt>
  mov    0x8(%rsp),%rcx
  mov    0x18(%rsp),%rdx
  test   %rax,%rax
  mov    0x20(%rsp),%r9d
  je     L98
  movzbl 0x1(%rax),%edi
  test   $0xdf,%dil
  sete   %sil
  and    $0xfffffffd,%edi
  cmp    $0x2c,%dil
  sete   %dil
  or     %edi,%esi
  movzbl %sil,%esi
L392:
  add    D16(%rip),%rcx
  mov    %rcx,%rdi
  test   %ebx,%r9d
  jne    L263
  test   %ebx,0x2c(%rsp)
  jne    L389
  mov    0x2c(%rsp),%ebx
  xor    $0x1,%ebx
  and    %r9d,%ebx
  je     L111
  cmp    %rax,%rdx
  jbe    L111
  test   %esi,%esi
  je     L111
  mov    $0x3,%edx
  lea    D151(%rip),%rsi
  add    $0x3,%r13d
  call   <memcpy@plt>
  mov    %ebx,0x2c(%rsp)
  jmp    L180
  nopl   (%rax)
  mov    $0x2a,%esi
  mov    %r11,%rdi
  mov    %r9d,0x20(%rsp)
  mov    %rdx,0x18(%rsp)
  mov    %rcx,0x8(%rsp)
  call   <strchr@plt>
  mov    0x8(%rsp),%rcx
  mov    0x18(%rsp),%rdx
  test   %rax,%rax
  mov    0x20(%rsp),%r9d
  je     L341
  movzbl 0x1(%rax),%edi
  mov    %edi,%esi
  and    $0xfffffffd,%esi
  cmp    $0x2c,%sil
  sete   %sil
  and    $0xdf,%edi
  sete   %dil
  or     %edi,%esi
  movzbl %sil,%esi
L24:
  mov    %r9d,%edi
  add    D16(%rip),%rcx
  xor    $0x1,%edi
  and    0x28(%rsp),%edi
  test   %bl,%dil
  jne    L223
  mov    0x28(%rsp),%edi
  xor    $0x1,%edi
  and    %edi,%r9d
  je     L113
  xor    $0x1,%ebx
  cmp    %rax,%rdx
  seta   %al
  test   %al,%bl
  je     L113
  test   %esi,%esi
  jne    L206
L113:
  movzbl (%r15),%eax
  add    $0x1,%r13d
  mov    %al,(%rcx)
  jmp    L180
  nopw   0x0(%rax,%rax,1)
  add    D16(%rip),%rcx
  mov    $0x5,%edx
  lea    D47(%rip),%rsi
  add    $0x5,%r13d
  mov    %rcx,%rdi
  call   <memcpy@plt>
  jmp    L180
  nopl   0x0(%rax)
  add    D16(%rip),%rcx
  test   %sil,%sil
  jne    L79
  movb   $0x20,(%rcx)
  add    $0x1,%r13d
  jmp    L180
  nopl   0x0(%rax)
  add    D16(%rip),%rcx
  mov    $0x4,%edx
  lea    D56(%rip),%rsi
  add    $0x4,%r13d
  mov    %rcx,%rdi
  call   <memcpy@plt>
  jmp    L180
  nopl   0x0(%rax)
L389:
  mov    $0x4,%edx
  lea    D109(%rip),%rsi
  add    $0x4,%r13d
  call   <memcpy@plt>
  movl   $0x0,0x2c(%rsp)
  jmp    L180
  nopw   0x0(%rax,%rax,1)
L263:
  mov    $0x4,%edx
  lea    D228(%rip),%rsi
  add    $0x4,%r13d
  mov    %r14,%r12
  call   <memcpy@plt>
  jmp    L180
  nopl   (%rax)
L401:
  mov    $0x4,%edx
  lea    D130(%rip),%rsi
  add    $0x4,%r13d
  call   <memcpy@plt>
  movl   $0x0,0x24(%rsp)
  jmp    L180
  nopw   0x0(%rax,%rax,1)
L98:
  mov    %rdx,%rax
  xor    %esi,%esi
  jmp    L392
  nopw   0x0(%rax,%rax,1)
L242:
  mov    %rdx,%rax
  xor    %esi,%esi
  jmp    L57
  nopw   0x0(%rax,%rax,1)
L341:
  mov    %rdx,%rax
  xor    %esi,%esi
  jmp    L24
  nopw   0x0(%rax,%rax,1)
L79:
  mov    $0x6,%edx
  lea    D195(%rip),%rsi
  mov    %rcx,%rdi
  add    $0x6,%r13d
  call   <memcpy@plt>
  jmp    L180
  nopl   (%rax)
L305:
  mov    $0x3,%edx
  lea    D13(%rip),%rsi
  add    $0x3,%r13d
  call   <memcpy@plt>
  mov    %ebx,0x24(%rsp)
  jmp    L180
L206:
  mov    $0x3,%edx
  lea    D120(%rip),%rsi
  mov    %rcx,%rdi
  add    $0x3,%r13d
  mov    %r9d,0x8(%rsp)
  call   <memcpy@plt>
  mov    0x8(%rsp),%r9d
  mov    %r9d,0x28(%rsp)
  jmp    L180
  nopw   0x0(%rax,%rax,1)
L177:
  call   <abort@plt>
  jmp    L448
  nopw   0x0(%rax,%rax,1)
L223:
  mov    $0x4,%edx
  lea    D23(%rip),%rsi
  mov    %rcx,%rdi
  add    $0x4,%r13d
  call   <memcpy@plt>
  movl   $0x0,0x28(%rsp)
  jmp    L180
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D15
type_infered: string
name: extract_symbolic_data
arguments: data_label: D151
type_infered: string
name: extract_symbolic_data
arguments: data_label: D47
type_infered: string
name: extract_symbolic_data
arguments: data_label: D56
type_infered: string
name: extract_symbolic_data
arguments: data_label: D109
type_infered: string
name: extract_symbolic_data
arguments: data_label: D228
type_infered: string
name: extract_symbolic_data
arguments: data_label: D130
type_infered: string
name: extract_symbolic_data
arguments: data_label: D195
type_infered: string
name: extract_symbolic_data
arguments: data_label: D13
type_infered: string
name: extract_symbolic_data
arguments: data_label: D120
type_infered: string
name: extract_symbolic_data
arguments: data_label: D23
type_infered: string

tool: D15: &gt;

tool: D151: <i>

tool: D47: &amp;

tool: D56: &lt;

tool: D109: </i>

tool: D228: <br>

tool: D130: </u>

tool: D195: &nbsp;

tool: D13: <u>

tool: D120: <b>

tool: D23: </b>

assistant: ```c
char *lily_lily_to_html(const char *const string) {
  static char *output = NULL;
  int o = 0;
  size_t l, i = 0;
  int inbold = 0, initalics = 0, inunderline = 0;
  l = strlen(string);
  output = realloc(output, (l * 6) + 1);
  if (output == NULL)
    abort();
  while (i < l) {
    const char *sp = strchr(string + i, ' '), *ch;
    int word_end = ((string[i + 1] == ' ') || (string[i + 1] == ',') || (string[i + 1] == '.') || (string[i + 1] == 0)), word_begin = ((i == 0) || (string[i - 1] == ' ')), ch_end = 0;
    if (sp == NULL)
      sp = string + strlen(string);
    switch (string[i]) {
    case '*':
      if ((ch = strchr(string + i + 1, '*')) == NULL)
        ch = sp;
      else
        ch_end = ((ch[1] == ' ') || (ch[1] == ',') || (ch[1] == '.') || (ch[1] == 0));
      if (inbold && !word_begin && word_end) {
        inbold = 0;
        memcpy(&output[o], "</b>", 4);
        o += 4;
      } else if (!inbold && word_begin && !word_end && (ch < sp) && ch_end) {
        inbold = 1;
        memcpy(&output[o], "<b>", 3);
        o += 3;
      } else
        output[o++] = string[i];
      break;
    case '/':
      if ((ch = strchr(string + i + 1, '/')) == NULL)
        ch = sp;
      else
        ch_end = ((ch[1] == ' ') || (ch[1] == ',') || (ch[1] == '.') || (ch[1] == 0));
      if (word_begin && word_end) {
        i++;
        memcpy(&output[o], "<br>", 4);
        o += 4;
      } else if (initalics && word_end) {
        memcpy(&output[o], "</i>", 4);
        o += 4;
        initalics = 0;
      } else if (!initalics && word_begin && (ch < sp) && ch_end) {
        memcpy(&output[o], "<i>", 3);
        o += 3;
        initalics = 1;
      } else
        output[o++] = string[i];
      break;
    case '_':
      if ((ch = strchr(string + i + 1, '_')) == NULL)
        ch = sp;
      else
        ch_end = ((ch[1] == ' ') || (ch[1] == ',') || (ch[1] == '.') || (ch[1] == 0));
      if (inunderline && word_end) {
        memcpy(&output[o], "</u>", 4);
        o += 4;
        inunderline = 0;
      } else if (!inunderline && word_begin && (ch < sp) && ch_end) {
        memcpy(&output[o], "<u>", 3);
        o += 3;
        inunderline = 1;
      } else
        output[o++] = string[i];
      break;
    case '&':
      memcpy(&output[o], "&amp;", 5);
      o += 5;
      break;
    case '<':
      memcpy(&output[o], "&lt;", 4);
      o += 4;
      break;
    case '>':
      memcpy(&output[o], "&gt;", 4);
      o += 4;
      break;
    case ' ':
      if (string[i + 1] == ' ') {
        memcpy(&output[o], "&nbsp;", 6);
        o += 6;
      } else
        output[o++] = string[i];
      break;
    default:
      output[o++] = string[i];
      break;
    }
    i++;
  }
  output[o] = '\0';
  return (output);
}
```