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

```asm
<print_int>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,%r12
  mov    %rsi,%r13
  mov    %edx,%eax
  mov    %r9d,%ebp
  mov    0xa0(%rsp),%r14d
  movzbl 0x98(%rsp),%r9d
  mov    %fs:0x28,%rdx
  mov    %rdx,0x48(%rsp)
  xor    %edx,%edx
  test   %eax,%eax
  je     L9
  mov    %ecx,%esi
  test   %r8d,%r8d
  setne  %cl
  cmp    $0xa,%esi
  sete   %dl
  test   %dl,%cl
  je     L156
  test   %eax,%eax
  js     L107
L156:
  mov    %eax,%ecx
  mov    $0x0,%r15d
L125:
  movb   $0x0,0x3f(%rsp)
  lea    0x3f(%rsp),%rdi
  mov    %esi,%r8d
  sub    $0xa,%r9d
  jmp    L147
L9:
  movb   $0x30,(%rsp)
  movb   $0x0,0x1(%rsp)
  mov    %rsp,%rdx
  movsbl %r14b,%r9d
  mov    0x90(%rsp),%r8d
  mov    %ebp,%ecx
  call   <print_string@plt>
  jmp    L123
L107:
  neg    %eax
  mov    %eax,%ecx
  mov    $0x1,%r15d
  jmp    L125
L5:
  mov    %eax,%ecx
  mov    %rbx,%rdi
L147:
  mov    %ecx,%eax
  mov    $0x0,%edx
  div    %esi
  lea    (%r9,%rdx,1),%r10d
  lea    0x30(%rdx),%eax
  cmp    $0xa,%dl
  cmovge %r10d,%eax
  lea    -0x1(%rdi),%rbx
  mov    %al,-0x1(%rdi)
  mov    %ecx,%eax
  mov    $0x0,%edx
  div    %r8d
  cmp    %ecx,%esi
  jbe    L5
  cmp    $0x30,%r14b
  je     L110
  test   %r15d,%r15d
  je     L56
  movb   $0x2d,-0x1(%rbx)
  lea    -0x2(%rdi),%rbx
  movl   $0x0,0xa8(%rsp)
L23:
  movsbl %r14b,%r9d
  mov    0x90(%rsp),%r8d
  mov    %ebp,%ecx
  mov    %rbx,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <print_string@plt>
  add    0xa8(%rsp),%eax
L123:
  mov    0x48(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L127
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L110:
  test   %r15d,%r15d
  jne    L136
  cmpl   $0x0,0xa8(%rsp)
  je     L23
  mov    $0x2b,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <print_char@plt>
  sub    $0x1,%ebp
  movl   $0x1,0xa8(%rsp)
  jmp    L23
L136:
  mov    $0x2d,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <print_char@plt>
  sub    $0x1,%ebp
  mov    %r15d,0xa8(%rsp)
  jmp    L23
L56:
  cmpl   $0x0,0xa8(%rsp)
  je     L23
  movb   $0x2b,-0x1(%rbx)
  mov    %r15d,0xa8(%rsp)
  lea    -0x2(%rdi),%rbx
  jmp    L23
L127:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int print_int(char **out, size_t *size, int num, int radix, int sign, int width, int align_right, char letter_base, char padding_char, int plus) {
  char buf[64], *s;
  int neg = 0, count = 0;
  unsigned int unum = num;
  if (num == 0) {
    buf[0] = '0';
    buf[1] = '\0';
    return print_string(out, size, buf, width, align_right, padding_char);
  }
  if (sign && radix == 10 && num < 0) {
    neg = 1;
    unum = -num;
  }
  s = &buf[sizeof(buf) - 1];
  *s = '\0';
  while (unum > 0) {
    char digit = unum % radix;
    if (digit >= 10)
      digit += letter_base - 10;
    else
      digit += '0';
    *(--s) = digit;
    unum /= radix;
  }
  if (padding_char == '0') {
    if (neg) {
      print_char(out, size, '-');
      count++;
      width--;
    } else if (plus) {
      print_char(out, size, '+');
      count++;
      width--;
    }
  } else {
    if (neg) {
      *(--s) = '-';
    } else if (plus) {
      *(--s) = '+';
    }
  }
  return count + print_string(out, size, s, width, align_right, padding_char);
}
```