user: 请将以下的汇编代码转换成C语言代码:

```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     L295
  and    $0xfffffffe,%r9d
  cmp    $0x22,%edx
  ja     L166
  mov    %r9d,%ecx
  mov    %esi,0x10(%rsp)
  mov    $0x20,%r15d
  and    $0x40,%ecx
  mov    %ecx,0x8(%rsp)
  test   $0x2,%r9b
  je     L207
L118:
  test   %rax,%rax
  js     L188
  test   $0x4,%r9b
  jne    L15
  and    $0x8,%r9d
  movb   $0x0,0x1b(%rsp)
  je     L307
  movb   $0x20,0x1b(%rsp)
  sub    $0x1,%r10d
  jmp    L307
  nopl   0x0(%rax,%rax,1)
L295:
  cmp    $0x22,%edx
  ja     L166
  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    L118
L207:
  movb   $0x0,0x1b(%rsp)
L307:
  mov    0x8(%rsp),%esi
  test   %esi,%esi
  je     L136
L152:
  cmp    $0x10,%r12d
  je     L216
  xor    %edx,%edx
  cmp    $0x8,%r12d
  sete   %dl
  sub    %edx,%r10d
L136:
  test   %rax,%rax
  jne    L106
  movb   $0x30,0x20(%rsp)
  mov    $0x30,%ebx
  xor    %r13d,%r13d
  mov    $0x1,%ebp
L159:
  cmp    %r8d,%ebp
  mov    0x10(%rsp),%ecx
  cmovge %ebp,%r8d
  sub    %r8d,%r10d
  test   %ecx,%ecx
  jne    L6
  lea    -0x1(%r10),%edx
  test   %r10d,%r10d
  jle    L30
  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
L6:
  movzbl 0x1b(%rsp),%eax
  test   %al,%al
  je     L20
  mov    %al,(%rdi)
  add    $0x1,%rdi
L20:
  mov    0x8(%rsp),%edx
  test   %edx,%edx
  je     L161
  cmp    $0x8,%r12d
  je     L89
  cmp    $0x10,%r12d
  je     L292
L161:
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jne    L246
  lea    -0x1(%r10),%r12d
  test   %r10d,%r10d
  jle    L128
  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
L246:
  cmp    %r8d,%ebp
  jge    L76
  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
L76:
  movslq %r13d,%rax
  mov    %rdi,%rdx
  lea    0x1f(%rsp),%rcx
  jmp    L226
  nopw   0x0(%rax,%rax,1)
L44:
  movzbl (%rcx,%rax,1),%ebx
  sub    $0x1,%rax
L226:
  add    $0x1,%rdx
  mov    %bl,-0x1(%rdx)
  test   %eax,%eax
  jg     L44
  add    $0x1,%r13d
  lea    -0x1(%r10),%ebx
  movslq %r13d,%r13
  add    %rdi,%r13
  test   %r10d,%r10d
  jle    L331
  add    $0x1,%rbx
  mov    %r13,%rdi
  mov    $0x20,%esi
  mov    %rbx,%rdx
  add    %rbx,%r13
  call   <memset@plt>
L331:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L303
  add    $0x78,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L188:
  movb   $0x2d,0x1b(%rsp)
  neg    %rax
  sub    $0x1,%r10d
  test   %ecx,%ecx
  jne    L152
L106:
  mov    %r12d,%esi
  lea    0x20(%rsp),%rcx
  xor    %ebp,%ebp
  lea    D5(%rip),%r11
  nopl   (%rax)
L123:
  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    L123
  jmp    L159
  nopw   0x0(%rax,%rax,1)
L15:
  movb   $0x2b,0x1b(%rsp)
  sub    $0x1,%r10d
  jmp    L307
  xchg   %ax,%ax
L292:
  or     $0x58,%r14d
  movb   $0x30,(%rdi)
  add    $0x2,%rdi
  mov    %r14b,-0x1(%rdi)
  jmp    L161
  nopl   0x0(%rax)
L166:
  xor    %r13d,%r13d
  jmp    L331
L216:
  sub    $0x2,%r10d
  jmp    L136
  nopl   0x0(%rax)
L89:
  movb   $0x30,(%rdi)
  add    $0x1,%rdi
  jmp    L161
L30:
  mov    %edx,%r10d
  jmp    L6
L128:
  mov    %r12d,%r10d
  jmp    L246
L303:
  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 > 36)
    return 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;
}
```