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

```asm
<number>:
  endbr64
  push   %r15
  mov    %rsi,%rax
  mov    %ecx,%r10d
  push   %r14
  push   %r13
  push   %r12
  lea    D15(%rip),%r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  mov    %r9d,%ebx
  sub    $0x78,%rsp
  mov    %r8d,0x14(%rsp)
  mov    0xb0(%rsp),%rcx
  mov    0xb8(%rsp),%rsi
  mov    %fs:0x28,%rdx
  mov    %rdx,0x68(%rsp)
  mov    %r9d,%edx
  and    $0x40,%edx
  cmp    $0x1,%edx
  sbb    %r13d,%r13d
  and    $0x20,%r13d
  add    $0x58,%r13d
  test   %edx,%edx
  lea    D18(%rip),%rdx
  cmovne %rdx,%r12
  and    $0x10,%ebx
  lea    -0x2(%rbp),%edx
  mov    %ebx,0x10(%rsp)
  je     L337
  and    $0xfe,%r9d
  cmp    $0x22,%edx
  ja     L155
  mov    %ebx,0x1c(%rsp)
  mov    %r9d,%ebx
  mov    $0x20,%r14d
  and    $0x20,%ebx
  mov    %ebx,0xc(%rsp)
  test   $0x2,%r9b
  je     L292
L90:
  test   %rax,%rax
  js     L418
  test   $0x4,%r9b
  jne    L392
  and    $0x8,%r9d
  movb   $0x0,0x1b(%rsp)
  je     L492
  movb   $0x20,0x1b(%rsp)
  sub    $0x1,%r10d
  jmp    L492
  nopw   0x0(%rax,%rax,1)
L337:
  cmp    $0x22,%edx
  ja     L155
  mov    %r9d,%edx
  mov    %r9d,%ebx
  and    $0x1,%edx
  and    $0x11,%ebx
  cmp    $0x1,%edx
  mov    %ebx,0x1c(%rsp)
  mov    %r9d,%ebx
  sbb    %r14d,%r14d
  and    $0x20,%ebx
  and    $0xfffffff0,%r14d
  mov    %ebx,0xc(%rsp)
  add    $0x30,%r14d
  test   $0x2,%r9b
  jne    L90
L292:
  movb   $0x0,0x1b(%rsp)
L492:
  mov    0xc(%rsp),%r15d
  test   %r15d,%r15d
  je     L354
L481:
  cmp    $0x10,%ebp
  je     L526
  xor    %edx,%edx
  cmp    $0x8,%ebp
  sete   %dl
  sub    %edx,%r10d
L354:
  test   %rax,%rax
  jne    L265
  movb   $0x30,0x20(%rsp)
  xor    %r15d,%r15d
  mov    $0x1,%r8d
L179:
  mov    0x14(%rsp),%eax
  mov    0x1c(%rsp),%r12d
  cmp    %eax,%r8d
  mov    %eax,%edx
  mov    (%rcx),%rax
  cmovge %r8d,%edx
  sub    %edx,%r10d
  test   %r12d,%r12d
  jne    L428
  lea    -0x1(%r10),%r9d
  test   %r10d,%r10d
  jg     L27
  jmp    L462
  nopl   0x0(%rax)
L330:
  movb   $0x20,(%rdi)
  add    $0x1,%rdi
  mov    (%rcx),%rax
  sub    $0x1,%r9d
  jb     L515
L27:
  lea    0x1(%rax),%r10
  mov    %r10,(%rcx)
  cmp    %rax,%rsi
  ja     L330
  mov    %r10,%rax
  sub    $0x1,%r9d
  jae    L27
L515:
  mov    $0xffffffff,%r10d
L428:
  movzbl 0x1b(%rsp),%ebx
  test   %bl,%bl
  je     L447
  lea    0x1(%rax),%r9
  mov    %r9,(%rcx)
  cmp    %rax,%rsi
  jbe    L452
  mov    %bl,(%rdi)
  mov    (%rcx),%rax
  add    $0x1,%rdi
L447:
  mov    0xc(%rsp),%ebx
  lea    0x1(%rax),%r9
  test   %ebx,%ebx
  je     L220
  mov    %r9,%r11
  cmp    $0x8,%ebp
  je     L194
  cmp    $0x10,%ebp
  je     L473
L220:
  mov    0x10(%rsp),%r11d
  test   %r11d,%r11d
  jne    L424
  lea    -0x1(%r10),%r11d
  test   %r10d,%r10d
  mov    %r11d,%r10d
  jg     L215
  jmp    L424
  cs nopw 0x0(%rax,%rax,1)
L255:
  mov    %r14b,(%rdi)
  mov    (%rcx),%rax
  sub    $0x1,%r10d
  add    $0x1,%rdi
  lea    0x1(%rax),%r9
  cmp    $0xffffffff,%r10d
  je     L424
L215:
  mov    %r9,(%rcx)
  cmp    %rax,%rsi
  ja     L255
  mov    %r9,%rax
  sub    $0x1,%r10d
  lea    0x1(%rax),%r9
  cmp    $0xffffffff,%r10d
  jne    L215
L424:
  lea    -0x1(%rdx),%ebx
  lea    -0x1(%r8),%ebp
  mov    %rdi,%r11
  cmp    %r8d,%edx
  jg     L334
  jmp    L192
  nopw   0x0(%rax,%rax,1)
L60:
  movb   $0x30,(%r11)
  mov    (%rcx),%rax
  add    $0x1,%r11
L293:
  sub    $0x1,%ebx
  lea    0x1(%rax),%r9
  cmp    %ebp,%ebx
  je     L192
L334:
  mov    %r9,(%rcx)
  cmp    %rax,%rsi
  ja     L60
  mov    %r9,%rax
  jmp    L293
  nopl   0x0(%rax,%rax,1)
L486:
  mov    (%rcx),%rax
  sub    $0x1,%r15
  lea    0x1(%rax),%r9
L192:
  mov    %r9,(%rcx)
  cmp    %rax,%rsi
  jbe    L29
  movzbl 0x20(%rsp,%r15,1),%eax
  add    $0x1,%r11
  mov    %al,-0x1(%r11)
L29:
  test   %r15d,%r15d
  jg     L486
  lea    -0x1(%r10),%eax
  test   %r10d,%r10d
  jle    L57
  nop
L122:
  mov    (%rcx),%rdx
  lea    0x1(%rdx),%rdi
  mov    %rdi,(%rcx)
  cmp    %rsi,%rdx
  jae    L62
  movb   $0x20,(%r11)
  add    $0x1,%r11
L62:
  sub    $0x1,%eax
  jae    L122
L57:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L325
  add    $0x78,%rsp
  mov    %r11,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L418:
  movb   $0x2d,0x1b(%rsp)
  neg    %rax
  sub    $0x1,%r10d
  test   %ebx,%ebx
  jne    L481
L265:
  mov    %ebp,%r11d
  lea    0x20(%rsp),%r9
  xor    %r8d,%r8d
  nopw   0x0(%rax,%rax,1)
L251:
  xor    %edx,%edx
  mov    %rax,%rbx
  movslq %r8d,%r15
  add    $0x1,%r9
  div    %r11
  add    $0x1,%r8d
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,-0x1(%r9)
  cmp    %r11,%rbx
  jae    L251
  jmp    L179
  cs nopw 0x0(%rax,%rax,1)
L452:
  mov    %r9,%rax
  jmp    L447
  nopl   0x0(%rax,%rax,1)
L392:
  movb   $0x2b,0x1b(%rsp)
  sub    $0x1,%r10d
  jmp    L492
  xchg   %ax,%ax
L473:
  mov    %r9,(%rcx)
  cmp    %rax,%rsi
  jbe    L172
  movb   $0x30,(%rdi)
  mov    (%rcx),%r11
  add    $0x1,%rdi
L172:
  lea    0x1(%r11),%rax
  lea    0x2(%r11),%r9
  mov    %rax,(%rcx)
  cmp    %r11,%rsi
  jbe    L220
  mov    %r13b,(%rdi)
  mov    (%rcx),%rax
  add    $0x1,%rdi
  lea    0x1(%rax),%r9
  jmp    L220
  nopl   0x0(%rax)
L155:
  xor    %r11d,%r11d
  jmp    L57
  nopl   0x0(%rax,%rax,1)
L526:
  sub    $0x2,%r10d
  jmp    L354
  nopl   0x0(%rax)
L194:
  mov    %r9,(%rcx)
  cmp    %rax,%rsi
  jbe    L320
  movb   $0x30,(%rdi)
  mov    (%rcx),%rax
  add    $0x1,%rdi
  lea    0x1(%rax),%r9
  jmp    L220
L320:
  mov    %r9,%rax
  lea    0x1(%r9),%r9
  jmp    L220
L462:
  mov    %r9d,%r10d
  jmp    L428
L325:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D15
type_guessed: string
name: disassemble_data
arguments: label: D18
type_guessed: string

tool: D15: 0123456789abcdefghijklmnopqrstuvwxyz

tool: D18: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ

assistant: ```c
char *number(char *str, long long num, int base, int size, int precision, int type, size_t *osize, size_t n) {
  char c, sign, tmp[66];
  const char *digits = "0123456789abcdefghijklmnopqrstuvwxyz";
  int i;
  if (type & 0x40)
    digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  if (type & 0x10)
    type &= 0xFE;
  if ((base < 2) || (base > 36))
    return NULL;
  c = (type & 0x01) ? '0' : ' ';
  sign = 0;
  if (type & 0x02) {
    if (num < 0) {
      sign = '-';
      num = -num;
      size--;
    } else if (type & 0x04) {
      sign = '+';
      size--;
    } else if (type & 0x08) {
      sign = ' ';
      size--;
    }
  }
  if (type & 0x20) {
    if (base == 16)
      size -= 2;
    else if (base == 8)
      size--;
  }
  i = 0;
  if (num == 0)
    tmp[i++] = '0';
  else {
    while (num != 0) {
      unsigned long long __res;
      __res = ((unsigned long long)num) % (unsigned int)base;
      num = ((unsigned long long)num) / (unsigned int)base;
      tmp[i++] = digits[__res];
    }
  }
  if (i > precision)
    precision = i;
  size -= precision;
  if (!(type & 0x11))
    while (size-- > 0)
      if ((*osize)++ < n)
        *(str++) = ' ';
  if (sign)
    if ((*osize)++ < n)
      *(str++) = sign;
  if (type & 0x20) {
    if (base == 8) {
      if ((*osize)++ < n)
        *(str++) = '0';
    } else if (base == 16) {
      if ((*osize)++ < n)
        *(str++) = '0';
      if ((*osize)++ < n)
        *(str++) = digits[33];
    }
  }
  if (!(type & 0x10))
    while (size-- > 0)
      if ((*osize)++ < n)
        *(str++) = c;
  while (i < precision--)
    if ((*osize)++ < n)
      *(str++) = '0';
  while (i-- > 0)
    if ((*osize)++ < n)
      *(str++) = tmp[i];
  while (size-- > 0)
    if ((*osize)++ < n)
      *(str++) = ' ';
  return str;
}
```