user: Converte this assembly snippet into its equivalent C code:

```asm
<number>:
  endbr64
  push   %r15
  mov    %r9d,%r11d
  mov    %esi,%eax
  push   %r14
  lea    D11(%rip),%r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rdx
  mov    %rdx,0x48(%rsp)
  xor    %edx,%edx
  test   $0x40,%r9b
  lea    D12(%rip),%rdx
  cmovne %rdx,%r14
  and    $0x10,%r11d
  lea    -0x2(%r12),%edx
  mov    %r11d,0x8(%rsp)
  je     L236
  and    $0xfffffffe,%r9d
  cmp    $0x22,%edx
  ja     L255
  mov    $0x20,%r15d
L141:
  test   $0x2,%r9b
  je     L326
  test   %eax,%eax
  js     L130
L326:
  test   $0x4,%r9b
  jne    L250
  lea    0x0(,%r9,4),%r10d
  and    $0x20,%r10d
  jne    L21
L199:
  and    $0x20,%r9d
  mov    %r9d,0xc(%rsp)
  je     L294
  cmp    $0x10,%r12d
  je     L314
  xor    %edx,%edx
  cmp    $0x8,%r12d
  sete   %dl
  sub    %edx,%ecx
L294:
  test   %eax,%eax
  jne    L195
  movb   $0x30,0x20(%rsp)
  xor    %r13d,%r13d
  mov    $0x30,%ebx
  mov    $0x1,%ebp
L196:
  cmp    %r8d,%ebp
  cmovge %ebp,%r8d
  sub    %r8d,%ecx
  test   %r11d,%r11d
  jne    L224
  lea    -0x1(%rcx),%edx
  test   %ecx,%ecx
  jle    L89
  add    $0x1,%rdx
  mov    $0x20,%esi
  mov    %r8d,0x1c(%rsp)
  mov    %r10b,0x1b(%rsp)
  mov    %rdx,0x10(%rsp)
  call   <memset@plt>
  mov    0x10(%rsp),%rdx
  movzbl 0x1b(%rsp),%r10d
  mov    $0xffffffff,%ecx
  mov    %rax,%rdi
  mov    0x1c(%rsp),%r8d
  add    %rdx,%rdi
L224:
  test   %r10b,%r10b
  je     L68
  mov    %r10b,(%rdi)
  add    $0x1,%rdi
L68:
  mov    0xc(%rsp),%edx
  test   %edx,%edx
  je     L39
  cmp    $0x8,%r12d
  je     L291
  cmp    $0x10,%r12d
  je     L212
L39:
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jne    L240
  lea    -0x1(%rcx),%r12d
  test   %ecx,%ecx
  jle    L269
  add    $0x1,%r12
  movsbl %r15b,%esi
  mov    %r8d,0x8(%rsp)
  mov    %r12,%rdx
  call   <memset@plt>
  mov    0x8(%rsp),%r8d
  mov    $0xffffffff,%ecx
  mov    %rax,%rdi
  add    %r12,%rdi
L240:
  cmp    %r8d,%ebp
  jge    L202
  sub    %ebp,%r8d
  mov    $0x30,%esi
  mov    %ecx,0x8(%rsp)
  lea    -0x1(%r8),%ebp
  add    $0x1,%rbp
  mov    %rbp,%rdx
  call   <memset@plt>
  mov    0x8(%rsp),%ecx
  mov    %rax,%rdi
  add    %rbp,%rdi
L202:
  movslq %r13d,%rax
  mov    %rdi,%rdx
  lea    0x1f(%rsp),%rsi
  jmp    L301
  cs nopw 0x0(%rax,%rax,1)
L85:
  movzbl (%rsi,%rax,1),%ebx
  sub    $0x1,%rax
L301:
  add    $0x1,%rdx
  mov    %bl,-0x1(%rdx)
  test   %eax,%eax
  jg     L85
  add    $0x1,%r13d
  lea    -0x1(%rcx),%ebx
  movslq %r13d,%r13
  add    %rdi,%r13
  test   %ecx,%ecx
  jle    L32
  add    $0x1,%rbx
  mov    %r13,%rdi
  mov    $0x20,%esi
  mov    %rbx,%rdx
  add    %rbx,%r13
  call   <memset@plt>
L32:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L302
  add    $0x58,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L236:
  cmp    $0x22,%edx
  ja     L255
  mov    %r9d,%edx
  mov    %r9d,%r11d
  and    $0x1,%edx
  and    $0x11,%r11d
  cmp    $0x1,%edx
  sbb    %r15d,%r15d
  and    $0xfffffff0,%r15d
  add    $0x30,%r15d
  jmp    L141
  nopl   0x0(%rax)
L250:
  mov    $0x2b,%r10d
L21:
  sub    $0x1,%ecx
  jmp    L199
  cs nopw 0x0(%rax,%rax,1)
L195:
  lea    0x20(%rsp),%rsi
  xor    %ebp,%ebp
  xor    %r9d,%r9d
  nopw   0x0(%rax,%rax,1)
L277:
  mov    %r9d,%edx
  mov    %ebp,%r13d
  add    $0x1,%rsi
  add    $0x1,%ebp
  div    %r12d
  movslq %edx,%rdx
  movzbl (%r14,%rdx,1),%ebx
  mov    %bl,-0x1(%rsi)
  test   %eax,%eax
  jne    L277
  jmp    L196
  nopl   0x0(%rax)
L212:
  movzbl 0x21(%r14),%eax
  movb   $0x30,(%rdi)
  add    $0x2,%rdi
  mov    %al,-0x1(%rdi)
  jmp    L39
  nopl   0x0(%rax)
L255:
  xor    %r13d,%r13d
  jmp    L32
  nopl   0x0(%rax,%rax,1)
L130:
  neg    %eax
  mov    $0x2d,%r10d
  sub    $0x1,%ecx
  jmp    L199
L291:
  movb   $0x30,(%rdi)
  add    $0x1,%rdi
  jmp    L39
  nopl   0x0(%rax)
L314:
  sub    $0x2,%ecx
  jmp    L294
L89:
  mov    %edx,%ecx
  jmp    L224
L269:
  mov    %r12d,%ecx
  jmp    L240
L302:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D11
datatype: string
name: retrieve_data
arguments: data_label: D12
datatype: string

tool: D11: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ

tool: D12: 0123456789abcdefghijklmnopqrstuvwxyz

assistant: ```c
char *number(char *str, int num, int base, int size, int precision, int type) {
  char c, sign, tmp[36];
  const char *digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  int i;
  if (type & 64)
    digits = "0123456789abcdefghijklmnopqrstuvwxyz";
  if (type & 16)
    type &= ~1;
  if (base < 2 || base > 36)
    return 0;
  c = (type & 1) ? '0' : ' ';
  if (type & 2 && num < 0) {
    sign = '-';
    num = -num;
  } else
    sign = (type & 4) ? '+' : ((type & 8) ? ' ' : 0);
  if (sign)
    size--;
  if (type & 32)
    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;
        __asm__("divl %4" : "=a"(num), "=d"(__res) : ""(num), "1"(0), "r"(base));
        __res;
      })];
  if (i > precision)
    precision = i;
  size -= precision;
  if (!(type & (1 + 16)))
    while (size-- > 0)
      *str++ = ' ';
  if (sign)
    *str++ = sign;
  if (type & 32)
    if (base == 8)
      *str++ = '0';
    else if (base == 16) {
      *str++ = '0';
      *str++ = digits[33];
    }
  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;
}
```