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

```asm
<print>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x98,%rsp
  movslq (%rsi),%r15
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  movzbl (%r15),%eax
  test   %al,%al
  je     L151
  lea    0x30(%rsp),%rcx
  lea    0x4(%rsi),%r13
  xor    %ebx,%ebx
  xor    %r12d,%r12d
  mov    %rcx,(%rsp)
  lea    0x2e(%rsp),%rcx
  mov    %rcx,0x8(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L218:
  cmp    $0x25,%al
  jne    L213
  movsbl 0x1(%r15),%eax
  test   %al,%al
  je     L219
  lea    0x1(%r15),%r14
  cmp    $0x25,%al
  je     L140
  xor    %r9d,%r9d
  cmp    $0x2d,%al
  jne    L262
  movsbl 0x2(%r15),%eax
  lea    0x2(%r15),%r14
  mov    $0x1,%r9d
  jmp    L262
  nopl   (%rax)
L261:
  movsbl 0x1(%r14),%eax
  add    $0x1,%r14
  or     $0x2,%r9d
L262:
  cmp    $0x30,%al
  je     L261
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  jbe    L162
  cmp    $0x2e,%al
  je     L162
  xor    %r8d,%r8d
  lea    0x1(%r14),%r15
L73:
  cmp    $0x6c,%al
  jne    L130
  movzbl 0x1(%r14),%eax
  mov    %r15,%r14
  add    $0x1,%r15
L130:
  sub    $0x58,%eax
  cmp    $0x20,%al
  ja     L47
  lea    D4(%rip),%rdi
  movzbl %al,%eax
  movslq (%rdi,%rax,4),%rax
  add    %rdi,%rax
  notrack jmp *%rax
  nopl   0x0(%rax,%rax,1)
L140:
  mov    %r14,%r15
L213:
  movsbl %al,%esi
  mov    %rbp,%rdi
  mov    %r15,%r14
  add    $0x1,%r12d
  call   <printchar@plt>
  lea    0x1(%r15),%r15
L221:
  movzbl 0x1(%r14),%eax
  test   %al,%al
  jne    L218
L219:
  test   %rbp,%rbp
  je     L17
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
L17:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L254
  add    $0x98,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L162:
  xor    %ecx,%ecx
  xor    %r8d,%r8d
  jmp    L255
  nopw   0x0(%rax,%rax,1)
L187:
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  ja     L73
  test   %ecx,%ecx
  je     L223
  lea    (%rbx,%rbx,4),%edx
  lea    -0x30(%rax,%rdx,2),%ebx
L38:
  movsbl (%r15),%eax
  mov    %r15,%r14
L255:
  lea    0x1(%r14),%r15
  cmp    $0x2e,%al
  jne    L187
  xor    %ebx,%ebx
  mov    $0x1,%ecx
  jmp    L38
  nop
L223:
  lea    (%r8,%r8,4),%eax
  movsbl %dl,%edx
  lea    (%rdx,%rax,2),%r8d
  jmp    L38
  nopl   (%rax)
L47:
  mov    %rbp,%rdi
  mov    $0x25,%esi
  call   <printchar@plt>
  movsbl (%r14),%esi
  mov    %rbp,%rdi
  call   <printchar@plt>
  jmp    L221
  lea    0x4(%r13),%rax
  sub    $0x8,%rsp
  xor    %ecx,%ecx
  mov    $0x10,%edx
  mov    %rax,0x18(%rsp)
  push   $0x61
L52:
  mov    0x0(%r13),%esi
  mov    %rbp,%rdi
  call   <printi@plt>
  add    %eax,%r12d
  pop    %rax
  pop    %rdx
  mov    0x10(%rsp),%r13
  jmp    L221
  lea    0x4(%r13),%rax
  sub    $0x8,%rsp
  xor    %ecx,%ecx
  mov    %rax,0x18(%rsp)
  push   $0x61
L94:
  mov    $0xa,%edx
  jmp    L52
  mov    0x0(%r13),%rsi
  lea    0x4(%r13),%rax
  mov    %r8d,%edx
  mov    %rbp,%rdi
  lea    D8(%rip),%rcx
  mov    %rax,0x10(%rsp)
  test   %rsi,%rsi
  cmove  %rcx,%rsi
  mov    %r9d,%ecx
  call   <prints@plt>
  mov    0x10(%rsp),%r13
  add    %eax,%r12d
  jmp    L221
  movsd  0x0(%r13),%xmm0
  lea    0x8(%r13),%rax
  mov    (%rsp),%r13
  mov    %ebx,%esi
  mov    %r9d,0x1c(%rsp)
  mov    %r13,%rdi
  mov    %r8d,0x18(%rsp)
  mov    %rax,0x10(%rsp)
  call   <dbl2stri@plt>
  mov    0x1c(%rsp),%ecx
  mov    0x18(%rsp),%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <prints@plt>
  mov    0x10(%rsp),%r13
  add    %eax,%r12d
  jmp    L221
  lea    0x4(%r13),%rax
  sub    $0x8,%rsp
  mov    $0x1,%ecx
  mov    %rax,0x18(%rsp)
  push   $0x61
  jmp    L94
  lea    0x4(%r13),%rax
  mov    0x8(%rsp),%rsi
  mov    %r9d,%ecx
  mov    %r8d,%edx
  mov    %rax,0x10(%rsp)
  mov    0x0(%r13),%eax
  mov    %rbp,%rdi
  movb   $0x0,0x2f(%rsp)
  mov    %al,0x2e(%rsp)
  call   <prints@plt>
  mov    0x10(%rsp),%r13
  add    %eax,%r12d
  jmp    L221
  lea    0x4(%r13),%rax
  sub    $0x8,%rsp
  xor    %ecx,%ecx
  mov    $0x10,%edx
  mov    %rax,0x18(%rsp)
  push   $0x41
  jmp    L52
L151:
  xor    %r12d,%r12d
  jmp    L219
L254:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D8
data_type: string

tool: D8: (null)

assistant: ```c
int print(char **out, int *varg) {
  register int width, pad;
  register int pc = 0;
  register char *format = (char *)(*varg++);
  register int post_decimal;
  register unsigned dec_width = 0;
  char scr[2];
  for (; *format != 0; ++format) {
    if (*format == '%') {
      ++format;
      width = pad = 0;
      if (*format == '\0')
        break;
      if (*format == '%')
        goto out;
      if (*format == '-') {
        ++format;
        pad = 1;
      }
      while (*format == '0') {
        ++format;
        pad |= 2;
      }
      post_decimal = 0;
      if (*format == '.' || (*format >= '0' && *format <= '9')) {
        while (1) {
          if (*format == '.') {
            post_decimal = 1;
            dec_width = 0;
            format++;
          } else if ((*format >= '0' && *format <= '9')) {
            if (post_decimal) {
              dec_width *= 10;
              dec_width += *format - '0';
            } else {
              width *= 10;
              width += *format - '0';
            }
            format++;
          } else {
            break;
          }
        }
      }
      if (*format == 'l')
        ++format;
      switch (*format) {
      case 's': {
        char *s = *((char **)varg++);
        pc += prints(out, s ? s : "(null)", width, pad);
      } break;
      case 'd':
        pc += printi(out, *varg++, 10, 1, width, pad, 'a');
        break;
      case 'x':
        pc += printi(out, *varg++, 16, 0, width, pad, 'a');
        break;
      case 'X':
        pc += printi(out, *varg++, 16, 0, width, pad, 'A');
        break;
      case 'u':
        pc += printi(out, *varg++, 10, 0, width, pad, 'a');
        break;
      case 'c':
        scr[0] = *varg++;
        scr[1] = '\0';
        pc += prints(out, scr, width, pad);
        break;
      case 'f': {
        double *dblptr = (double *)varg;
        double dbl = *dblptr++;
        varg = (int *)dblptr;
        char bfr[81];
        dbl2stri(bfr, dbl, dec_width);
        pc += prints(out, bfr, width, pad);
      } break;
      default:
        printchar(out, '%');
        printchar(out, *format);
        break;
      }
    } else {
    out:
      printchar(out, *format);
      ++pc;
    }
  }
  if (out)
    **out = '\0';
  return pc;
}
```