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

```asm
<print>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdi,-0xb8(%rbp)
  mov    %rsi,-0xc0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    $0x0,%r12d
  mov    -0xc0(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0xc0(%rbp)
  mov    (%rax),%eax
  cltq
  mov    %rax,%rbx
  mov    $0x0,%r15d
  jmp    L313
L252:
  movzbl (%rbx),%eax
  cmp    $0x25,%al
  jne    L101
  add    $0x1,%rbx
  mov    $0x0,%r13d
  mov    %r13d,%r14d
  movzbl (%rbx),%eax
  test   %al,%al
  je     L36
  movzbl (%rbx),%eax
  cmp    $0x25,%al
  je     L81
  movzbl (%rbx),%eax
  cmp    $0x2d,%al
  jne    L314
  add    $0x1,%rbx
  mov    $0x1,%r13d
  jmp    L314
L228:
  add    $0x1,%rbx
  or     $0x2,%r13d
L314:
  movzbl (%rbx),%eax
  cmp    $0x30,%al
  je     L228
  mov    $0x0,%ecx
  movzbl (%rbx),%eax
  cmp    $0x2e,%al
  je     L263
  movzbl (%rbx),%eax
  cmp    $0x2f,%al
  jle    L185
  movzbl (%rbx),%eax
  cmp    $0x39,%al
  jg     L185
L263:
  movzbl (%rbx),%eax
  cmp    $0x2e,%al
  jne    L164
  mov    $0x1,%ecx
  mov    $0x0,%r15d
  add    $0x1,%rbx
  jmp    L263
L164:
  movzbl (%rbx),%eax
  cmp    $0x2f,%al
  jle    L185
  movzbl (%rbx),%eax
  cmp    $0x39,%al
  jg     L185
  mov    %ecx,%eax
  test   %eax,%eax
  je     L170
  mov    %r15d,%eax
  shl    $0x2,%eax
  add    %r15d,%eax
  add    %eax,%eax
  mov    %eax,%r15d
  movzbl (%rbx),%eax
  movsbl %al,%eax
  add    %r15d,%eax
  lea    -0x30(%rax),%r15d
  jmp    L300
L170:
  mov    %r14d,%eax
  shl    $0x2,%eax
  add    %r14d,%eax
  add    %eax,%eax
  mov    %eax,%r14d
  movzbl (%rbx),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %eax,%r14d
L300:
  add    $0x1,%rbx
  jmp    L263
L185:
  movzbl (%rbx),%eax
  cmp    $0x6c,%al
  jne    L229
  add    $0x1,%rbx
L229:
  movzbl (%rbx),%eax
  movsbl %al,%eax
  sub    $0x58,%eax
  cmp    $0x20,%eax
  ja     L179
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D29(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D29(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    -0xc0(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0xc0(%rbp)
  mov    (%rax),%rax
  mov    %rax,-0xb0(%rbp)
  cmpq   $0x0,-0xb0(%rbp)
  je     L102
  mov    -0xb0(%rbp),%rax
  jmp    L29
L102:
  lea    D2(%rip),%rax
L29:
  mov    -0xb8(%rbp),%rdi
  mov    %r13d,%ecx
  mov    %r14d,%edx
  mov    %rax,%rsi
  call   <prints@plt>
  add    %eax,%r12d
  jmp    L301
  mov    -0xc0(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0xc0(%rbp)
  mov    (%rax),%esi
  mov    -0xb8(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x61
  mov    %r13d,%r9d
  mov    %r14d,%r8d
  mov    $0x1,%ecx
  mov    $0xa,%edx
  mov    %rax,%rdi
  call   <printi@plt>
  add    $0x10,%rsp
  add    %eax,%r12d
  jmp    L301
  mov    -0xc0(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0xc0(%rbp)
  mov    (%rax),%esi
  mov    -0xb8(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x61
  mov    %r13d,%r9d
  mov    %r14d,%r8d
  mov    $0x0,%ecx
  mov    $0x10,%edx
  mov    %rax,%rdi
  call   <printi@plt>
  add    $0x10,%rsp
  add    %eax,%r12d
  jmp    L301
  mov    -0xc0(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0xc0(%rbp)
  mov    (%rax),%esi
  mov    -0xb8(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x41
  mov    %r13d,%r9d
  mov    %r14d,%r8d
  mov    $0x0,%ecx
  mov    $0x10,%edx
  mov    %rax,%rdi
  call   <printi@plt>
  add    $0x10,%rsp
  add    %eax,%r12d
  jmp    L301
  mov    -0xc0(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0xc0(%rbp)
  mov    (%rax),%esi
  mov    -0xb8(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x61
  mov    %r13d,%r9d
  mov    %r14d,%r8d
  mov    $0x0,%ecx
  mov    $0xa,%edx
  mov    %rax,%rdi
  call   <printi@plt>
  add    $0x10,%rsp
  add    %eax,%r12d
  jmp    L301
  mov    -0xc0(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0xc0(%rbp)
  mov    (%rax),%eax
  mov    %al,-0x92(%rbp)
  movb   $0x0,-0x91(%rbp)
  lea    -0x92(%rbp),%rsi
  mov    -0xb8(%rbp),%rax
  mov    %r13d,%ecx
  mov    %r14d,%edx
  mov    %rax,%rdi
  call   <prints@plt>
  add    %eax,%r12d
  jmp    L301
  mov    -0xc0(%rbp),%rax
  mov    %rax,-0xa8(%rbp)
  mov    -0xa8(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0xa8(%rbp)
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  mov    -0xa8(%rbp),%rax
  mov    %rax,-0xc0(%rbp)
  mov    -0xa0(%rbp),%rdx
  lea    -0x90(%rbp),%rax
  mov    %r15d,%esi
  movq   %rdx,%xmm0
  mov    %rax,%rdi
  call   <dbl2stri@plt>
  lea    -0x90(%rbp),%rsi
  mov    -0xb8(%rbp),%rax
  mov    %r13d,%ecx
  mov    %r14d,%edx
  mov    %rax,%rdi
  call   <prints@plt>
  add    %eax,%r12d
  jmp    L301
L179:
  mov    -0xb8(%rbp),%rax
  mov    $0x25,%esi
  mov    %rax,%rdi
  call   <printchar@plt>
  movzbl (%rbx),%eax
  movsbl %al,%edx
  mov    -0xb8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <printchar@plt>
  jmp    L301
L101:
  nop
  jmp    L220
L81:
  nop
L220:
  movzbl (%rbx),%eax
  movsbl %al,%edx
  mov    -0xb8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <printchar@plt>
  add    $0x1,%r12d
L301:
  add    $0x1,%rbx
L313:
  movzbl (%rbx),%eax
  test   %al,%al
  jne    L252
  jmp    L4
L36:
  nop
L4:
  cmpq   $0x0,-0xb8(%rbp)
  je     L207
  mov    -0xb8(%rbp),%rax
  mov    (%rax),%rax
  movb   $0x0,(%rax)
L207:
  mov    %r12d,%eax
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L289
  call   <__stack_chk_fail@plt>
L289:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: tag: D2
datatype: string

tool: D2: (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;
}
```