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

```asm
<number>:
  endbr64
  push   %r15
  mov    %rdx,%rax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  sub    $0xd8,%rsp
  movdqa D31(%rip),%xmm0
  mov    %fs:0x28,%rcx
  mov    %rcx,0xc8(%rsp)
  xor    %ecx,%ecx
  mov    0x110(%rsp),%edx
  movb   $0x0,0x44(%rsp)
  movaps %xmm0,0x20(%rsp)
  movdqa D27(%rip),%xmm0
  movl   $0x7a797877,0x40(%rsp)
  movaps %xmm0,0x30(%rsp)
  movdqa D32(%rip),%xmm0
  movl   $0x5a595857,0x70(%rsp)
  movaps %xmm0,0x50(%rsp)
  movdqa D29(%rip),%xmm0
  movb   $0x0,0x74(%rsp)
  movaps %xmm0,0x60(%rsp)
  test   $0x40,%dl
  jne    L130
  mov    %edx,%ebx
  movb   $0x78,0x1f(%rsp)
  lea    0x20(%rsp),%r12
  lea    -0x2(%rbp),%ecx
  and    $0x10,%ebx
  mov    %ebx,0xc(%rsp)
  je     L197
L63:
  and    $0xfffffffe,%edx
  cmp    $0x22,%ecx
  ja     L349
  mov    %edx,%r14d
  mov    %ebx,0x18(%rsp)
  mov    $0x20,%r13d
  and    $0x20,%r14d
  test   $0x2,%dl
  je     L86
L112:
  test   %rax,%rax
  js     L80
  test   $0x4,%dl
  jne    L221
  and    $0x8,%edx
  movb   $0x0,0x1e(%rsp)
  je     L70
  movb   $0x20,0x1e(%rsp)
  sub    $0x1,%r8d
  jmp    L70
  nopl   0x0(%rax,%rax,1)
L130:
  mov    %edx,%ebx
  movb   $0x58,0x1f(%rsp)
  lea    0x50(%rsp),%r12
  lea    -0x2(%rbp),%ecx
  and    $0x10,%ebx
  mov    %ebx,0xc(%rsp)
  jne    L63
L197:
  cmp    $0x22,%ecx
  ja     L349
  mov    %edx,%ecx
  mov    %edx,%ebx
  mov    %edx,%r14d
  and    $0x1,%ecx
  and    $0x11,%ebx
  cmp    $0x1,%ecx
  mov    %ebx,0x18(%rsp)
  sbb    %r13d,%r13d
  and    $0x20,%r14d
  and    $0xfffffff0,%r13d
  add    $0x30,%r13d
  test   $0x2,%dl
  jne    L112
L86:
  movb   $0x0,0x1e(%rsp)
L70:
  test   %r14d,%r14d
  je     L332
L9:
  cmp    $0x10,%ebp
  je     L347
  xor    %edx,%edx
  cmp    $0x8,%ebp
  sete   %dl
  sub    %edx,%r8d
L332:
  test   %rax,%rax
  jne    L318
  lea    0x80(%rsp),%rax
  movb   $0x30,0x80(%rsp)
  xor    %r15d,%r15d
  mov    $0x1,%ecx
  mov    %rax,0x10(%rsp)
L394:
  cmp    %r9d,%ecx
  mov    0x18(%rsp),%edx
  cmovge %ecx,%r9d
  sub    %r9d,%r8d
  test   %edx,%edx
  jne    L375
  lea    -0x1(%r8),%eax
  test   %r8d,%r8d
  jle    L51
  movslq %r8d,%r8
  add    %rdi,%r8
  nopw   0x0(%rax,%rax,1)
L148:
  cmp    %rdi,%rsi
  jb     L406
  movb   $0x20,(%rdi)
L406:
  add    $0x1,%rdi
  cmp    %r8,%rdi
  jne    L148
  mov    $0xffffffff,%r8d
L375:
  movzbl 0x1e(%rsp),%eax
  test   %al,%al
  je     L320
  cmp    %rsi,%rdi
  ja     L146
  mov    %al,(%rdi)
L146:
  add    $0x1,%rdi
L320:
  test   %r14d,%r14d
  je     L92
  cmp    $0x8,%ebp
  je     L20
  cmp    $0x10,%ebp
  je     L342
L92:
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jne    L176
  lea    -0x1(%r8),%eax
  test   %r8d,%r8d
  jle    L241
  movslq %r8d,%r8
  add    %rdi,%r8
  nopl   (%rax)
L280:
  cmp    %rdi,%rsi
  jb     L482
  mov    %r13b,(%rdi)
L482:
  add    $0x1,%rdi
  cmp    %r8,%rdi
  jne    L280
  mov    $0xffffffff,%r8d
L176:
  cmp    %r9d,%ecx
  jge    L111
  sub    %ecx,%r9d
  lea    -0x1(%r9),%eax
  lea    0x1(%rdi,%rax,1),%rdx
  nopl   0x0(%rax)
L433:
  cmp    %rdi,%rsi
  jb     L159
  movb   $0x30,(%rdi)
L159:
  add    $0x1,%rdi
  cmp    %rdx,%rdi
  jne    L433
L477:
  mov    0x10(%rsp),%rcx
  movslq %r15d,%rax
  lea    0x1(%r15),%r10d
  lea    (%r10,%rdx,1),%r9d
  add    %rax,%rcx
  mov    %rdx,%rax
  nop
L73:
  cmp    %rax,%rsi
  jb     L187
  movzbl (%rcx),%edi
  mov    %dil,(%rax)
L187:
  add    $0x1,%rax
  mov    %r9d,%edi
  sub    $0x1,%rcx
  sub    %eax,%edi
  test   %edi,%edi
  jg     L73
  movslq %r10d,%r10
  add    %r10,%rdx
  test   %r8d,%r8d
  jle    L296
  movslq %r8d,%r8
  lea    (%rdx,%r8,1),%rax
  nopw   0x0(%rax,%rax,1)
L245:
  cmp    %rdx,%rsi
  jb     L293
  movb   $0x20,(%rdx)
L293:
  add    $0x1,%rdx
  cmp    %rax,%rdx
  jne    L245
L428:
  mov    0xc8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L409
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L80:
  movb   $0x2d,0x1e(%rsp)
  neg    %rax
  sub    $0x1,%r8d
  test   %r14d,%r14d
  jne    L9
L318:
  lea    0x80(%rsp),%rbx
  mov    %ebp,%r11d
  xor    %ecx,%ecx
  mov    %rbx,0x10(%rsp)
  mov    %rbx,%r10
  nopw   0x0(%rax,%rax,1)
L476:
  xor    %edx,%edx
  mov    %rax,%rbx
  mov    %ecx,%r15d
  add    $0x1,%r10
  div    %r11
  add    $0x1,%ecx
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,-0x1(%r10)
  cmp    %r11,%rbx
  jae    L476
  jmp    L394
  nopl   (%rax)
L221:
  movb   $0x2b,0x1e(%rsp)
  sub    $0x1,%r8d
  jmp    L70
  xchg   %ax,%ax
L342:
  cmp    %rsi,%rdi
  ja     L183
  movb   $0x30,(%rdi)
L183:
  lea    0x1(%rdi),%rax
  cmp    %rax,%rsi
  jb     L326
  movzbl 0x1f(%rsp),%eax
  mov    %al,0x1(%rdi)
L326:
  add    $0x2,%rdi
  jmp    L92
  nopw   0x0(%rax,%rax,1)
L349:
  xor    %eax,%eax
  jmp    L428
  nop
L347:
  sub    $0x2,%r8d
  jmp    L332
  nopl   0x0(%rax)
L20:
  cmp    %rsi,%rdi
  ja     L193
  movb   $0x30,(%rdi)
L193:
  add    $0x1,%rdi
  jmp    L92
  nopl   0x0(%rax)
L296:
  mov    %rdx,%rax
  jmp    L428
L111:
  mov    %rdi,%rdx
  jmp    L477
L241:
  mov    %eax,%r8d
  jmp    L176
L51:
  mov    %eax,%r8d
  jmp    L375
L409:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D31
type: byte[16]
name: unpack_data
arguments: data_label: D27
type: byte[16]
name: unpack_data
arguments: data_label: D32
type: byte[16]
name: unpack_data
arguments: data_label: D29
type: byte[16]

tool: {"D31": [0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x61,0x62,0x63,0x64,0x65,0x66]}

tool: {"D27": [0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0x75,0x76]}

tool: {"D32": [0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x41,0x42,0x43,0x44,0x45,0x46]}

tool: {"D29": [0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52,0x53,0x54,0x55,0x56]}

assistant: ```c
char *number(char *buf, char *end, long long num, int base, int size, int precision, int type) {
  char c, sign, tmp[66];
  const char *digits;
  const char small_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
  const char large_digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  int i;
  digits = (type & 64) ? large_digits : small_digits;
  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 & 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;
        __res = ((unsigned long)num) % (unsigned)base;
        num = ((unsigned long)num) / (unsigned)base;
        __res;
      })];
  if (i > precision)
    precision = i;
  size -= precision;
  if (!(type & (1 + 16))) {
    while (size-- > 0) {
      if (buf <= end)
        *buf = ' ';
      ++buf;
    }
  }
  if (sign) {
    if (buf <= end)
      *buf = sign;
    ++buf;
  }
  if (type & 32) {
    if (base == 8) {
      if (buf <= end)
        *buf = '0';
      ++buf;
    } else if (base == 16) {
      if (buf <= end)
        *buf = '0';
      ++buf;
      if (buf <= end)
        *buf = digits[33];
      ++buf;
    }
  }
  if (!(type & 16)) {
    while (size-- > 0) {
      if (buf <= end)
        *buf = c;
      ++buf;
    }
  }
  while (i < precision--) {
    if (buf <= end)
      *buf = '0';
    ++buf;
  }
  while (i-- > 0) {
    if (buf <= end)
      *buf = tmp[i];
    ++buf;
  }
  while (size-- > 0) {
    if (buf <= end)
      *buf = ' ';
    ++buf;
  }
  return buf;
}
```