user: What is the c source code of the assembly code below:

```asm
<printi>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %r9d,%r12d
  push   %rbp
  mov    %r8d,%ebp
  push   %rbx
  mov    %rdi,%rbx
  mov    %esi,%edi
  mov    %edx,%esi
  sub    $0x48,%rsp
  mov    %ecx,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  test   %r8d,%r8d
  js     L205
  movl   $0x0,0x1c(%rsp)
  and    $0xfffffffd,%r12d
L452:
  mov    %r12d,%r13d
  and    $0x4,%r13d
  je     L171
  test   %edi,%edi
  js     L436
  mov    %r12d,%r13d
  and    $0x18,%r13d
  jne    L244
L171:
  mov    $0x2,%ecx
  mov    $0x1,%eax
L240:
  test   %edi,%edi
  jne    L482
L43:
  movslq %edi,%rax
  lea    0x1(%rdi),%r15d
  mov    %rax,0x10(%rsp)
  movb   $0x30,0x2c(%rsp,%rax,1)
L365:
  cmp    %ebp,%r15d
  mov    %ebp,%eax
  mov    %r12d,%r14d
  cmovge %r15d,%eax
  add    %r13d,%eax
  mov    %eax,0xc(%rsp)
  and    $0x3,%r14d
  jne    L484
  mov    0x18(%rsp),%eax
  sub    0xc(%rsp),%eax
  mov    %eax,0x8(%rsp)
  test   %eax,%eax
  jle    L484
  nopw   0x0(%rax,%rax,1)
L61:
  mov    %rbx,%rsi
  mov    $0x20,%edi
  add    $0x1,%r14d
  call   <putc@plt>
  cmp    0x8(%rsp),%r14d
  jne    L61
L484:
  test   %r13d,%r13d
  je     L219
  movsbl 0x2a(%rsp),%edi
  mov    %rbx,%rsi
  call   <putc@plt>
  cmp    $0x1,%r13d
  je     L219
  movsbl 0x2b(%rsp),%edi
  mov    %rbx,%rsi
  call   <putc@plt>
L219:
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  je     L51
  mov    0x18(%rsp),%r13d
  sub    0xc(%rsp),%r13d
  test   %r13d,%r13d
  jle    L51
  xor    %r14d,%r14d
  nop
L145:
  mov    %rbx,%rsi
  mov    $0x30,%edi
  add    $0x1,%r14d
  call   <putc@plt>
  cmp    %r13d,%r14d
  jne    L145
L51:
  sub    %r15d,%ebp
  xor    %r13d,%r13d
  test   %ebp,%ebp
  jle    L178
L428:
  mov    %rbx,%rsi
  mov    $0x30,%edi
  add    $0x1,%r13d
  call   <putc@plt>
  cmp    %ebp,%r13d
  jne    L428
L178:
  mov    0x10(%rsp),%rbp
  lea    0x2c(%rsp),%r13
L160:
  movsbl 0x0(%r13,%rbp,1),%edi
  mov    %rbx,%rsi
  sub    $0x1,%rbp
  call   <putc@plt>
  cmp    $0xffffffff,%ebp
  jne    L160
  and    $0x1,%r12d
  je     L185
  mov    0x18(%rsp),%r12d
  sub    0xc(%rsp),%r12d
  test   %r12d,%r12d
  jle    L185
  xor    %ebp,%ebp
  xchg   %ax,%ax
L338:
  mov    %rbx,%rsi
  mov    $0x20,%edi
  add    $0x1,%ebp
  call   <putc@plt>
  cmp    %r12d,%ebp
  jne    L338
L185:
  mov    0xc(%rsp),%ecx
  mov    0x18(%rsp),%eax
  cmp    %eax,%ecx
  cmovge %ecx,%eax
  mov    0x38(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L222
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L436:
  mov    %edi,%r10d
  movb   $0x2d,0x2a(%rsp)
  mov    $0x1,%r13d
  neg    %r10d
  test   $0x40,%r12b
  jne    L48
L279:
  mov    %r12d,%eax
  and    $0x80,%eax
  cmp    $0x1,%eax
  mov    %r10d,%eax
  sbb    %ecx,%ecx
  xor    %edx,%edx
  div    %esi
  and    $0x20,%ecx
  add    $0x41,%ecx
  lea    -0xa(%rcx),%r8d
  mov    %eax,%r9d
  lea    (%r8,%rdx,1),%r11d
  lea    0x30(%rdx),%eax
  cmp    $0xa,%edx
  cmovge %r11d,%eax
  mov    %al,0x2c(%rsp)
  cmp    %esi,%r10d
  jb     L187
  xor    %edx,%edx
  mov    %r9d,%eax
  div    %esi
  mov    %eax,%r10d
  lea    (%r8,%rdx,1),%r11d
  lea    0x30(%rdx),%eax
  cmp    $0xa,%edx
  cmovge %r11d,%eax
  mov    %al,0x2d(%rsp)
  cmp    %r9d,%esi
  ja     L366
  xor    %edx,%edx
  mov    %r10d,%eax
  div    %esi
  mov    %eax,%r9d
  lea    (%r8,%rdx,1),%r11d
  lea    0x30(%rdx),%eax
  cmp    $0xa,%edx
  cmovge %r11d,%eax
  mov    %al,0x2e(%rsp)
  cmp    %esi,%r10d
  jb     L135
  xor    %edx,%edx
  mov    %r9d,%eax
  div    %esi
  mov    %eax,%r10d
  lea    (%r8,%rdx,1),%r11d
  lea    0x30(%rdx),%eax
  cmp    $0xa,%edx
  cmovge %r11d,%eax
  mov    %al,0x2f(%rsp)
  cmp    %r9d,%esi
  ja     L351
  xor    %edx,%edx
  mov    %r10d,%eax
  div    %esi
  mov    %eax,%r9d
  lea    (%r8,%rdx,1),%r11d
  lea    0x30(%rdx),%eax
  cmp    $0xa,%edx
  cmovge %r11d,%eax
  mov    %al,0x30(%rsp)
  cmp    %r10d,%esi
  ja     L329
  xor    %edx,%edx
  mov    %r9d,%eax
  div    %esi
  mov    %eax,%r10d
  lea    (%r8,%rdx,1),%r11d
  lea    0x30(%rdx),%eax
  cmp    $0xa,%edx
  cmovge %r11d,%eax
  mov    %al,0x31(%rsp)
  cmp    %r9d,%esi
  ja     L292
  xor    %edx,%edx
  mov    %r10d,%eax
  div    %esi
  mov    %eax,%r9d
  lea    (%r8,%rdx,1),%r11d
  lea    0x30(%rdx),%eax
  cmp    $0xa,%edx
  cmovge %r11d,%eax
  mov    %al,0x32(%rsp)
  cmp    %r10d,%esi
  ja     L206
  xor    %edx,%edx
  mov    %r9d,%eax
  div    %esi
  mov    %eax,%r11d
  lea    (%r8,%rdx,1),%r10d
  lea    0x30(%rdx),%eax
  cmp    $0xa,%edx
  cmovge %r10d,%eax
  mov    %al,0x33(%rsp)
  cmp    %r9d,%esi
  ja     L325
  xor    %edx,%edx
  mov    %r11d,%eax
  div    %esi
  mov    %eax,%r10d
  lea    (%r8,%rdx,1),%r9d
  lea    0x30(%rdx),%eax
  cmp    $0xa,%edx
  cmovge %r9d,%eax
  mov    %al,0x34(%rsp)
  cmp    %r11d,%esi
  ja     L342
  xor    %edx,%edx
  mov    %r10d,%eax
  div    %esi
  add    %edx,%r8d
  mov    %eax,%r9d
  lea    0x30(%rdx),%eax
  cmp    $0xa,%edx
  cmovge %r8d,%eax
  mov    %al,0x35(%rsp)
  cmp    %r10d,%esi
  ja     L241
  xor    %edx,%edx
  mov    %r9d,%eax
  sub    $0xa,%ecx
  div    %esi
  lea    (%rcx,%rdx,1),%r10d
  lea    0x30(%rdx),%r8d
  cmp    $0xa,%edx
  cmovge %r10d,%r8d
  mov    %r8b,0x36(%rsp)
  cmp    %r9d,%esi
  ja     L430
  xor    %edx,%edx
  mov    $0xc,%r15d
  div    %esi
  lea    0x30(%rdx),%eax
  add    %edx,%ecx
  cmp    $0x9,%edx
  cmovle %eax,%ecx
  mov    $0xb,%eax
  mov    %cl,0x37(%rsp)
L393:
  test   %edi,%edi
  je     L85
  mov    %rax,0x10(%rsp)
  test   $0x20,%r12b
  je     L365
L85:
  mov    %r15d,%edi
  jmp    L43
  nopl   0x0(%rax,%rax,1)
L205:
  mov    %r9d,%eax
  and    $0x2,%eax
  mov    %eax,0x1c(%rsp)
  jmp    L452
  nop
L482:
  mov    %edi,%r10d
  test   $0x40,%r12b
  je     L279
L486:
  mov    %r12d,%edx
  movslq %r13d,%r13
  and    $0x80,%edx
  movb   $0x30,0x2a(%rsp,%r13,1)
  mov    %ecx,%r13d
  cmp    $0x1,%edx
  sbb    %edx,%edx
  and    $0x20,%edx
  add    $0x58,%edx
  mov    %dl,0x2a(%rsp,%rax,1)
  jmp    L279
  cs nopw 0x0(%rax,%rax,1)
L244:
  mov    %r12d,%eax
  mov    $0x3,%ecx
  mov    $0x1,%r13d
  and    $0x8,%eax
  cmp    $0x1,%eax
  sbb    %eax,%eax
  and    $0xfffffff5,%eax
  add    $0x2b,%eax
  mov    %al,0x2a(%rsp)
  mov    $0x2,%eax
  jmp    L240
  nopw   0x0(%rax,%rax,1)
L48:
  mov    $0x3,%ecx
  mov    $0x2,%eax
  mov    $0x1,%r13d
  jmp    L486
  nopw   0x0(%rax,%rax,1)
L187:
  xor    %eax,%eax
  mov    $0x1,%r15d
  jmp    L393
L366:
  mov    $0x1,%eax
  mov    $0x2,%r15d
  jmp    L393
L135:
  mov    $0x2,%eax
  mov    $0x3,%r15d
  jmp    L393
L351:
  mov    $0x3,%eax
  mov    $0x4,%r15d
  jmp    L393
L329:
  mov    $0x4,%eax
  mov    $0x5,%r15d
  jmp    L393
L292:
  mov    $0x5,%eax
  mov    $0x6,%r15d
  jmp    L393
L206:
  mov    $0x6,%eax
  mov    $0x7,%r15d
  jmp    L393
L325:
  mov    $0x7,%eax
  mov    $0x8,%r15d
  jmp    L393
L342:
  mov    $0x8,%eax
  mov    $0x9,%r15d
  jmp    L393
L241:
  mov    $0x9,%eax
  mov    $0xa,%r15d
  jmp    L393
L430:
  mov    $0xa,%eax
  mov    $0xb,%r15d
  jmp    L393
L222:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int printi(FILE *fp, int x, int base, int w, int prec, int flag) {
  char buf[12], pbuf[2];
  int i, n, len = 0, plen = 0;
  unsigned u = x;
  if (prec >= 0)
    flag &= ~(1 << 1);
  if (flag & (1 << 2)) {
    if (x < 0) {
      u = -x;
      pbuf[plen++] = '-';
    } else if (flag & ((1 << 3) | (1 << 4))) {
      pbuf[plen++] = flag & (1 << 3) ? '+' : ' ';
    }
  }
  if (x && flag & (1 << 6)) {
    pbuf[plen++] = '0';
    pbuf[plen++] = flag & (1 << 7) ? 'X' : 'x';
  }
  while (u > 0) {
    int t = u % base;
    buf[len++] = (t < 10) ? (t + '0') : (t - 10 + (flag & (1 << 7) ? 'A' : 'a'));
    u /= base;
  }
  if (x == 0 || flag & (1 << 5))
    buf[len++] = '0';
  n = ((len) > (prec) ? (len) : (prec)) + plen;
  if (!(flag & ((1 << 0) | (1 << 1))))
    for (i = 0; i < w - n; ++i)
      putc(' ', fp);
  for (i = 0; i < plen; ++i)
    putc(pbuf[i], fp);
  if (flag & (1 << 1))
    for (i = 0; i < w - n; ++i)
      putc('0', fp);
  for (i = 0; i < prec - len; ++i)
    putc('0', fp);
  for (i = len - 1; i >= 0; --i)
    putc(buf[i], fp);
  if (flag & (1 << 0))
    for (i = 0; i < w - n; ++i)
      putc(' ', fp);
  return ((w) > (n) ? (w) : (n));
}
```