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

```asm
<number>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  sub    $0xd8,%rsp
  movdqa D10(%rip),%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  mov    0x110(%rsp),%ecx
  movb   $0x0,0x44(%rsp)
  movaps %xmm0,0x20(%rsp)
  movdqa D2(%rip),%xmm0
  movl   $0x7a797877,0x40(%rsp)
  movaps %xmm0,0x30(%rsp)
  movdqa D28(%rip),%xmm0
  movl   $0x5a595857,0x70(%rsp)
  movaps %xmm0,0x50(%rsp)
  movdqa D9(%rip),%xmm0
  movb   $0x0,0x74(%rsp)
  movaps %xmm0,0x60(%rsp)
  test   $0x40,%cl
  jne    L81
  movb   $0x78,0x1f(%rsp)
  lea    0x20(%rsp),%r12
L492:
  mov    %ecx,%ebx
  lea    -0x2(%rbp),%r10d
  mov    %rdi,%rax
  and    $0x10,%ebx
  mov    %ebx,0xc(%rsp)
  je     L164
  cmp    $0x22,%r10d
  ja     L417
  and    $0xfffffffe,%ecx
  mov    %ebx,0x18(%rsp)
  mov    $0x20,%r13d
  mov    %ecx,%r14d
  and    $0x20,%r14d
  test   $0x2,%cl
  jne    L261
L278:
  movb   $0x0,0x1e(%rsp)
L382:
  test   %r14d,%r14d
  je     L199
L407:
  cmp    $0x10,%ebp
  je     L47
  xor    %eax,%eax
  cmp    $0x8,%ebp
  sete   %al
  sub    %eax,%r8d
L199:
  test   %rdx,%rdx
  jne    L175
  lea    0x80(%rsp),%rax
  xor    %r15d,%r15d
  movb   $0x30,0x80(%rsp)
  mov    $0x1,%r10d
  mov    %rax,0x10(%rsp)
L445:
  cmp    %r9d,%r10d
  mov    0x18(%rsp),%ecx
  mov    %r8d,%eax
  cmovge %r10d,%r9d
  sub    %r9d,%eax
  test   %ecx,%ecx
  jne    L283
  lea    -0x1(%rax),%edx
  test   %eax,%eax
  jle    L321
  cltq
  add    %rdi,%rax
  nopl   0x0(%rax)
L71:
  cmp    %rdi,%rsi
  jb     L487
  movb   $0x20,(%rdi)
L487:
  add    $0x1,%rdi
  cmp    %rdi,%rax
  jne    L71
  mov    $0xffffffff,%eax
L283:
  movzbl 0x1e(%rsp),%ebx
  test   %bl,%bl
  je     L330
  cmp    %rsi,%rdi
  jbe    L463
L433:
  add    $0x1,%rdi
L330:
  test   %r14d,%r14d
  je     L103
  cmp    $0x8,%ebp
  je     L139
  cmp    $0x10,%ebp
  je     L219
L103:
  mov    0xc(%rsp),%edx
  test   %edx,%edx
  jne    L435
  lea    -0x1(%rax),%edx
  test   %eax,%eax
  jle    L178
  cltq
  add    %rdi,%rax
  nopl   0x0(%rax,%rax,1)
L202:
  cmp    %rdi,%rsi
  jb     L285
  mov    %r13b,(%rdi)
L285:
  add    $0x1,%rdi
  cmp    %rdi,%rax
  jne    L202
  mov    $0xffffffff,%eax
L435:
  cmp    %r9d,%r10d
  jge    L98
  sub    %r10d,%r9d
  lea    -0x1(%r9),%edx
  lea    0x1(%rdi,%rdx,1),%rdx
  nopl   0x0(%rax,%rax,1)
L189:
  cmp    %rdi,%rsi
  jb     L134
  movb   $0x30,(%rdi)
L134:
  add    $0x1,%rdi
  cmp    %rdx,%rdi
  jne    L189
L14:
  mov    0x10(%rsp),%rdi
  movslq %r15d,%rcx
  lea    0x1(%r15),%r10d
  lea    (%r10,%rdx,1),%r9d
  add    %rcx,%rdi
  mov    %rdx,%rcx
  nopw   0x0(%rax,%rax,1)
L453:
  cmp    %rcx,%rsi
  jb     L72
  movzbl (%rdi),%r8d
  mov    %r8b,(%rcx)
L72:
  add    $0x1,%rcx
  mov    %r9d,%r8d
  sub    $0x1,%rdi
  sub    %ecx,%r8d
  test   %r8d,%r8d
  jg     L453
  movslq %r10d,%r10
  add    %r10,%rdx
  test   %eax,%eax
  jle    L125
  cltq
  add    %rdx,%rax
  nopw   0x0(%rax,%rax,1)
L162:
  cmp    %rdx,%rsi
  jb     L30
  movb   $0x20,(%rdx)
L30:
  add    $0x1,%rdx
  cmp    %rax,%rdx
  jne    L162
L417:
  mov    0xc8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L66
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L164:
  cmp    $0x22,%r10d
  ja     L417
  mov    %ecx,%eax
  mov    %ecx,%r14d
  and    $0x11,%eax
  mov    %eax,0x18(%rsp)
  mov    %ecx,%eax
  and    $0x1,%eax
  cmp    $0x1,%eax
  sbb    %r13d,%r13d
  and    $0x20,%r14d
  and    $0xfffffff0,%r13d
  add    $0x30,%r13d
  test   $0x2,%cl
  je     L278
L261:
  test   %rdx,%rdx
  js     L50
  test   $0x4,%cl
  je     L148
  movb   $0x2b,0x1e(%rsp)
  sub    $0x1,%r8d
  jmp    L382
  cs nopw 0x0(%rax,%rax,1)
L81:
  movb   $0x58,0x1f(%rsp)
  lea    0x50(%rsp),%r12
  jmp    L492
  nop
L50:
  movb   $0x2d,0x1e(%rsp)
  neg    %rdx
  sub    $0x1,%r8d
  test   %r14d,%r14d
  jne    L407
L175:
  lea    0x80(%rsp),%rax
  mov    %rdx,%rcx
  mov    %ebp,%ebx
  xor    %r10d,%r10d
  mov    %rax,0x10(%rsp)
  mov    %rax,%r11
  nopl   (%rax)
L329:
  mov    %rcx,%rax
  xor    %edx,%edx
  mov    %r10d,%r15d
  add    $0x1,%r11
  div    %rbx
  add    $0x1,%r10d
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,-0x1(%r11)
  mov    %rcx,%rdx
  mov    %rax,%rcx
  cmp    %rdx,%rbx
  jbe    L329
  jmp    L445
  nopl   0x0(%rax)
L463:
  mov    %bl,(%rdi)
  jmp    L433
  nopw   0x0(%rax,%rax,1)
L219:
  cmp    %rsi,%rdi
  ja     L221
  movb   $0x30,(%rdi)
L221:
  lea    0x1(%rdi),%rdx
  cmp    %rdx,%rsi
  jb     L21
  movzbl 0x1f(%rsp),%ebx
  mov    %bl,0x1(%rdi)
L21:
  add    $0x2,%rdi
  jmp    L103
  nopw   0x0(%rax,%rax,1)
L47:
  sub    $0x2,%r8d
  jmp    L199
  nopl   0x0(%rax)
L139:
  cmp    %rsi,%rdi
  ja     L214
  movb   $0x30,(%rdi)
L214:
  add    $0x1,%rdi
  jmp    L103
  nopl   0x0(%rax)
L148:
  and    $0x8,%ecx
  movb   $0x0,0x1e(%rsp)
  je     L382
  movb   $0x20,0x1e(%rsp)
  sub    $0x1,%r8d
  jmp    L382
  nopl   0x0(%rax)
L125:
  mov    %rdx,%rax
  jmp    L417
  nopl   0x0(%rax,%rax,1)
L98:
  mov    %rdi,%rdx
  jmp    L14
L178:
  mov    %edx,%eax
  jmp    L435
L321:
  mov    %edx,%eax
  jmp    L283
L66:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D10
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D2
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D28
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D9
data_type: byte[16]

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

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

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

tool: {"D9": [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 buf;
  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 {
    unsigned long long num2 = (unsigned long long)num;
    unsigned int base2 = (unsigned int)base;
    while (num2 != 0) {
      tmp[i++] = digits[num2 % base2];
      num2 /= base2;
    }
  }
  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;
}
```