user: Translate the below assembly code into C programming language:

```asm
<number>:
  endbr64
  push   %r15
  mov    %rsi,%rax
  mov    %r9d,%esi
  mov    %ecx,%r10d
  push   %r14
  mov    %r9d,%r14d
  push   %r13
  and    $0x20,%r14d
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %fs:0x28,%rdx
  mov    %rdx,0x68(%rsp)
  xor    %edx,%edx
  and    $0x10,%esi
  lea    -0x2(%r12),%edx
  mov    %esi,0xc(%rsp)
  je     L170
  and    $0xfffffffe,%r9d
  cmp    $0xe,%edx
  ja     L255
  mov    %r9d,%ecx
  mov    %esi,0x10(%rsp)
  mov    $0x20,%r15d
  and    $0x40,%ecx
  mov    %ecx,0x8(%rsp)
  test   $0x2,%r9b
  je     L94
L310:
  test   %rax,%rax
  js     L73
  test   $0x4,%r9b
  jne    L241
  and    $0x8,%r9d
  movb   $0x0,0x1b(%rsp)
  je     L115
  movb   $0x20,0x1b(%rsp)
  sub    $0x1,%r10d
  jmp    L115
  nopl   0x0(%rax,%rax,1)
L170:
  cmp    $0xe,%edx
  ja     L255
  mov    %r9d,%edx
  mov    %r9d,%esi
  mov    %r9d,%ecx
  and    $0x1,%edx
  and    $0x11,%esi
  cmp    $0x1,%edx
  mov    %esi,0x10(%rsp)
  sbb    %r15d,%r15d
  and    $0x40,%ecx
  and    $0xfffffff0,%r15d
  mov    %ecx,0x8(%rsp)
  add    $0x30,%r15d
  test   $0x2,%r9b
  jne    L310
L94:
  movb   $0x0,0x1b(%rsp)
L115:
  mov    0x8(%rsp),%esi
  test   %esi,%esi
  je     L230
L88:
  cmp    $0x10,%r12d
  je     L221
  xor    %edx,%edx
  cmp    $0x8,%r12d
  sete   %dl
  sub    %edx,%r10d
L230:
  test   %rax,%rax
  jne    L153
  movb   $0x30,0x20(%rsp)
  mov    $0x30,%ebx
  xor    %r13d,%r13d
  mov    $0x1,%ebp
L215:
  cmp    %r8d,%ebp
  mov    0x10(%rsp),%ecx
  cmovge %ebp,%r8d
  sub    %r8d,%r10d
  test   %ecx,%ecx
  jne    L261
  lea    -0x1(%r10),%edx
  test   %r10d,%r10d
  jle    L56
  add    $0x1,%rdx
  mov    $0x20,%esi
  mov    %r8d,0x1c(%rsp)
  mov    %rdx,0x10(%rsp)
  call   <memset@plt>
  mov    0x10(%rsp),%rdx
  mov    0x1c(%rsp),%r8d
  mov    $0xffffffff,%r10d
  mov    %rax,%rdi
  add    %rdx,%rdi
L261:
  movzbl 0x1b(%rsp),%eax
  test   %al,%al
  je     L273
  mov    %al,(%rdi)
  add    $0x1,%rdi
L273:
  mov    0x8(%rsp),%edx
  test   %edx,%edx
  je     L21
  cmp    $0x8,%r12d
  je     L112
  cmp    $0x10,%r12d
  je     L301
L21:
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jne    L249
  lea    -0x1(%r10),%r12d
  test   %r10d,%r10d
  jle    L160
  add    $0x1,%r12
  movsbl %r15b,%esi
  mov    %r8d,0x8(%rsp)
  mov    %r12,%rdx
  call   <memset@plt>
  mov    0x8(%rsp),%r8d
  mov    $0xffffffff,%r10d
  mov    %rax,%rdi
  add    %r12,%rdi
L249:
  cmp    %r8d,%ebp
  jge    L89
  sub    %ebp,%r8d
  mov    $0x30,%esi
  mov    %r10d,0x8(%rsp)
  lea    -0x1(%r8),%ebp
  add    $0x1,%rbp
  mov    %rbp,%rdx
  call   <memset@plt>
  mov    0x8(%rsp),%r10d
  mov    %rax,%rdi
  add    %rbp,%rdi
L89:
  movslq %r13d,%rax
  mov    %rdi,%rdx
  lea    0x1f(%rsp),%rcx
  jmp    L343
  nopw   0x0(%rax,%rax,1)
L92:
  movzbl (%rcx,%rax,1),%ebx
  sub    $0x1,%rax
L343:
  add    $0x1,%rdx
  mov    %bl,-0x1(%rdx)
  test   %eax,%eax
  jg     L92
  add    $0x1,%r13d
  lea    -0x1(%r10),%ebx
  movslq %r13d,%r13
  add    %rdi,%r13
  test   %r10d,%r10d
  jle    L63
  add    $0x1,%rbx
  mov    %r13,%rdi
  mov    $0x20,%esi
  mov    %rbx,%rdx
  add    %rbx,%r13
  call   <memset@plt>
L63:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L86
  add    $0x78,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L73:
  movb   $0x2d,0x1b(%rsp)
  neg    %rax
  sub    $0x1,%r10d
  test   %ecx,%ecx
  jne    L88
L153:
  mov    %r12d,%esi
  lea    0x20(%rsp),%rcx
  xor    %ebp,%ebp
  lea    D8(%rip),%r11
  nopl   (%rax)
L183:
  xor    %edx,%edx
  mov    %rax,%r9
  mov    %ebp,%r13d
  add    $0x1,%rcx
  div    %rsi
  add    $0x1,%ebp
  movslq %edx,%rdx
  movzbl (%r11,%rdx,1),%ebx
  or     %r14d,%ebx
  mov    %bl,-0x1(%rcx)
  cmp    %rsi,%r9
  jae    L183
  jmp    L215
  nopw   0x0(%rax,%rax,1)
L241:
  movb   $0x2b,0x1b(%rsp)
  sub    $0x1,%r10d
  jmp    L115
  xchg   %ax,%ax
L301:
  or     $0x58,%r14d
  movb   $0x30,(%rdi)
  add    $0x2,%rdi
  mov    %r14b,-0x1(%rdi)
  jmp    L21
  nopl   0x0(%rax)
L255:
  xor    %r13d,%r13d
  jmp    L63
L221:
  sub    $0x2,%r10d
  jmp    L230
  nopl   0x0(%rax)
L112:
  movb   $0x30,(%rdi)
  add    $0x1,%rdi
  jmp    L21
L56:
  mov    %edx,%r10d
  jmp    L261
L160:
  mov    %r12d,%r10d
  jmp    L249
L86:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
char *number(char *str, long num, int base, int size, int precision, int type) {
  static const char digits[16] = "0123456789ABCDEF";
  char tmp[66];
  char c, sign, locase;
  int i;
  locase = (type & 32);
  if (type & 16)
    type &= ~1;
  if (base < 2 || base > 16)
    return ((void *)0);
  c = (type & 1) ? '0' : ' ';
  sign = 0;
  if (type & 2) {
    if (num < 0) {
      sign = '-';
      num = -num;
      size--;
    } else if (type & 4) {
      sign = '+';
      size--;
    } else if (type & 8) {
      sign = ' ';
      size--;
    }
  }
  if (type & 64) {
    if (base == 16)
      size -= 2;
    else if (base == 8)
      size--;
  }
  i = 0;
  if (num == 0)
    tmp[i++] = '0';
  else
    while (num != 0)
      tmp[i++] = (digits[({
                    int __res;
                    __res = ((unsigned long)num) % (unsigned)base;
                    num = ((unsigned long)num) / (unsigned)base;
                    __res;
                  })] |
                  locase);
  if (i > precision)
    precision = i;
  size -= precision;
  if (!(type & (1 + 16)))
    while (size-- > 0)
      *str++ = ' ';
  if (sign)
    *str++ = sign;
  if (type & 64) {
    if (base == 8)
      *str++ = '0';
    else if (base == 16) {
      *str++ = '0';
      *str++ = ('X' | locase);
    }
  }
  if (!(type & 16))
    while (size-- > 0)
      *str++ = c;
  while (i < precision--)
    *str++ = '0';
  while (i-- > 0)
    *str++ = tmp[i];
  while (size-- > 0)
    *str++ = ' ';
  return str;
}
```