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

```asm
<sprint_int_number_nonlocalized>:
  endbr64
  movslq %ecx,%rax
  test   %edx,%edx
  js     L8
  xor    %r8d,%r8d
  cmp    $0x9,%edx
  setg   %r8b
L21:
  test   %esi,%esi
  js     L109
  test   %eax,%eax
  jne    L36
L284:
  mov    %esi,%ecx
  shr    $0x9,%ecx
  imul   $0x44b83,%rcx,%rcx
  shr    $0x27,%rcx
  imul   $0x3b9aca00,%ecx,%r9d
  sub    %r9d,%esi
  cmp    $0xa,%edx
  je     L132
  or     %ecx,%r8d
  jne    L366
  mov    %esi,%ecx
  imul   $0x55e63b89,%rcx,%rcx
  shr    $0x39,%rcx
  imul   $0x5f5e100,%ecx,%r8d
  sub    %r8d,%esi
  cmp    $0x9,%edx
  je     L39
  test   %ecx,%ecx
  jne    L39
  mov    %esi,%ecx
  imul   $0x6b5fca6b,%rcx,%rcx
  shr    $0x36,%rcx
  imul   $0x989680,%ecx,%r8d
  sub    %r8d,%esi
  cmp    $0x8,%edx
  je     L161
  test   %ecx,%ecx
  jne    L161
  mov    %esi,%ecx
  imul   $0x431bde83,%rcx,%rcx
  shr    $0x32,%rcx
  imul   $0xf4240,%ecx,%r8d
  sub    %r8d,%esi
  cmp    $0x7,%edx
  je     L126
  test   %ecx,%ecx
  jne    L126
  mov    %esi,%ecx
  shr    $0x5,%ecx
  imul   $0xa7c5ac5,%rcx,%rcx
  shr    $0x27,%rcx
  imul   $0x186a0,%ecx,%r8d
  sub    %r8d,%esi
  cmp    $0x6,%edx
  je     L111
  test   %ecx,%ecx
  jne    L111
  mov    %esi,%ecx
  mov    $0xd1b71759,%r8d
  imul   %r8,%rcx
  shr    $0x2d,%rcx
  imul   $0x2710,%ecx,%r8d
  sub    %r8d,%esi
  cmp    $0x5,%edx
  je     L252
  test   %ecx,%ecx
  jne    L252
  mov    %esi,%ecx
  imul   $0x10624dd3,%rcx,%rcx
  shr    $0x26,%rcx
  imul   $0x3e8,%ecx,%r8d
  sub    %r8d,%esi
  cmp    $0x4,%edx
  je     L72
  test   %ecx,%ecx
  jne    L72
  mov    %esi,%ecx
  imul   $0x51eb851f,%rcx,%rcx
  shr    $0x25,%rcx
  imul   $0x64,%ecx,%r8d
  sub    %r8d,%esi
  cmp    $0x3,%edx
  je     L231
  test   %ecx,%ecx
  jne    L231
  mov    %esi,%ecx
  mov    $0xcccccccd,%r8d
  imul   %r8,%rcx
  shr    $0x23,%rcx
  lea    (%rcx,%rcx,4),%r8d
  add    %r8d,%r8d
  sub    %r8d,%esi
  cmp    $0x2,%edx
  je     L85
  test   %ecx,%ecx
  jne    L85
  cmp    $0x1,%edx
  je     L300
  test   %esi,%esi
  jne    L300
  lea    0x1(%rax),%r8d
  movb   $0x30,(%rdi,%rax,1)
  movslq %r8d,%rax
  movb   $0x0,(%rdi,%rax,1)
  mov    %r8d,%eax
  ret
  nop
L366:
  movslq %eax,%r9
  add    $0x30,%ecx
  lea    0x1(%rax),%r8d
  mov    %cl,(%rdi,%r9,1)
  mov    %esi,%ecx
  imul   $0x55e63b89,%rcx,%rcx
  shr    $0x39,%rcx
  imul   $0x5f5e100,%ecx,%r9d
  sub    %r9d,%esi
  cmp    $0x9,%edx
  jne    L196
  movslq %r8d,%r8
  add    $0x30,%ecx
  add    $0x2,%eax
  mov    %cl,(%rdi,%r8,1)
  mov    %esi,%ecx
  imul   $0x6b5fca6b,%rcx,%rcx
  shr    $0x36,%rcx
  imul   $0x989680,%ecx,%r8d
  sub    %r8d,%esi
L161:
  movslq %eax,%r9
  add    $0x30,%ecx
  lea    0x1(%rax),%r8d
  mov    %cl,(%rdi,%r9,1)
  mov    %esi,%ecx
  imul   $0x431bde83,%rcx,%rcx
  shr    $0x32,%rcx
  imul   $0xf4240,%ecx,%r9d
  sub    %r9d,%esi
  cmp    $0x7,%edx
  jne    L288
  movslq %r8d,%r8
  add    $0x30,%ecx
  add    $0x2,%eax
  mov    %cl,(%rdi,%r8,1)
  mov    %esi,%ecx
  shr    $0x5,%ecx
  imul   $0xa7c5ac5,%rcx,%rcx
  shr    $0x27,%rcx
  imul   $0x186a0,%ecx,%r8d
  sub    %r8d,%esi
L111:
  movslq %eax,%r9
  add    $0x30,%ecx
  lea    0x1(%rax),%r8d
  mov    %cl,(%rdi,%r9,1)
  mov    %esi,%ecx
  mov    $0xd1b71759,%r9d
  imul   %r9,%rcx
  shr    $0x2d,%rcx
  imul   $0x2710,%ecx,%r9d
  sub    %r9d,%esi
  cmp    $0x5,%edx
  jne    L298
  movslq %r8d,%r8
  add    $0x30,%ecx
  add    $0x2,%eax
  mov    %cl,(%rdi,%r8,1)
  mov    %esi,%ecx
  imul   $0x10624dd3,%rcx,%rcx
  shr    $0x26,%rcx
  imul   $0x3e8,%ecx,%r8d
  sub    %r8d,%esi
L72:
  movslq %eax,%r9
  add    $0x30,%ecx
  lea    0x1(%rax),%r8d
  mov    %cl,(%rdi,%r9,1)
  mov    %esi,%ecx
  imul   $0x51eb851f,%rcx,%rcx
  shr    $0x25,%rcx
  imul   $0x64,%ecx,%r9d
  sub    %r9d,%esi
  cmp    $0x3,%edx
  jne    L56
  add    $0x30,%ecx
  movslq %r8d,%r8
  lea    0x2(%rax),%r9d
  mov    $0xcccccccd,%eax
  mov    %cl,(%rdi,%r8,1)
  mov    %esi,%ecx
  imul   %rax,%rcx
  shr    $0x23,%rcx
  lea    (%rcx,%rcx,4),%eax
  add    %eax,%eax
  sub    %eax,%esi
L40:
  lea    0x1(%r9),%eax
  add    $0x30,%ecx
  movslq %r9d,%r9
  mov    %cl,(%rdi,%r9,1)
L300:
  lea    0x1(%rax),%r8d
  add    $0x30,%esi
  cltq
  mov    %sil,(%rdi,%rax,1)
L268:
  movslq %r8d,%rax
  movb   $0x0,(%rdi,%rax,1)
  mov    %r8d,%eax
  ret
  nopl   0x0(%rax)
L36:
  movb   $0x2b,(%rdi)
  mov    $0x1,%eax
  jmp    L284
  nopl   (%rax)
L109:
  movb   $0x2d,(%rdi)
  neg    %esi
  mov    $0x1,%eax
  jmp    L284
  nopw   0x0(%rax,%rax,1)
L8:
  xor    %edx,%edx
  xor    %r8d,%r8d
  jmp    L21
  nopw   0x0(%rax,%rax,1)
L132:
  add    $0x30,%ecx
  lea    0x1(%rax),%r8d
  mov    %cl,(%rdi,%rax,1)
  mov    %esi,%ecx
  imul   $0x55e63b89,%rcx,%rcx
  shr    $0x39,%rcx
  imul   $0x5f5e100,%ecx,%eax
  sub    %eax,%esi
L196:
  movslq %r8d,%r9
  add    $0x30,%ecx
  lea    0x1(%r8),%eax
  mov    %cl,(%rdi,%r9,1)
  mov    %esi,%ecx
  imul   $0x6b5fca6b,%rcx,%rcx
  shr    $0x36,%rcx
  imul   $0x989680,%ecx,%r9d
  sub    %r9d,%esi
  cmp    $0x8,%edx
  jne    L161
  cltq
  add    $0x30,%ecx
  add    $0x2,%r8d
  mov    %cl,(%rdi,%rax,1)
  mov    %esi,%ecx
  imul   $0x431bde83,%rcx,%rcx
  shr    $0x32,%rcx
  imul   $0xf4240,%ecx,%eax
  sub    %eax,%esi
L288:
  movslq %r8d,%r9
  add    $0x30,%ecx
  lea    0x1(%r8),%eax
  mov    %cl,(%rdi,%r9,1)
  mov    %esi,%ecx
  shr    $0x5,%ecx
  imul   $0xa7c5ac5,%rcx,%rcx
  shr    $0x27,%rcx
  imul   $0x186a0,%ecx,%r9d
  sub    %r9d,%esi
  cmp    $0x6,%edx
  jne    L111
  cltq
  add    $0x30,%ecx
  add    $0x2,%r8d
  mov    %cl,(%rdi,%rax,1)
  mov    %esi,%ecx
  mov    $0xd1b71759,%eax
  imul   %rax,%rcx
  shr    $0x2d,%rcx
  imul   $0x2710,%ecx,%eax
  sub    %eax,%esi
L298:
  movslq %r8d,%r9
  add    $0x30,%ecx
  lea    0x1(%r8),%eax
  mov    %cl,(%rdi,%r9,1)
  mov    %esi,%ecx
  imul   $0x10624dd3,%rcx,%rcx
  shr    $0x26,%rcx
  imul   $0x3e8,%ecx,%r9d
  sub    %r9d,%esi
  cmp    $0x4,%edx
  jne    L72
  cltq
  add    $0x30,%ecx
  add    $0x2,%r8d
  mov    %cl,(%rdi,%rax,1)
  mov    %esi,%ecx
  imul   $0x51eb851f,%rcx,%rcx
  shr    $0x25,%rcx
  imul   $0x64,%ecx,%eax
  sub    %eax,%esi
L56:
  movslq %r8d,%rax
  add    $0x30,%ecx
  lea    0x1(%r8),%r9d
  mov    %cl,(%rdi,%rax,1)
  mov    %esi,%ecx
  mov    $0xcccccccd,%eax
  imul   %rax,%rcx
  shr    $0x23,%rcx
  lea    (%rcx,%rcx,4),%eax
  add    %eax,%eax
  sub    %eax,%esi
  cmp    $0x2,%edx
  jne    L40
  lea    0x2(%r8),%eax
  movslq %r9d,%r9
  add    $0x30,%ecx
  add    $0x30,%esi
  lea    0x1(%rax),%r8d
  cltq
  mov    %cl,(%rdi,%r9,1)
  mov    %sil,(%rdi,%rax,1)
  jmp    L268
L252:
  mov    %eax,%r8d
  jmp    L298
L85:
  mov    %eax,%r9d
  jmp    L40
L231:
  mov    %eax,%r8d
  jmp    L56
L126:
  mov    %eax,%r8d
  jmp    L288
L39:
  mov    %eax,%r8d
  jmp    L196
```

assistant: ```c
int sprint_int_number_nonlocalized(char *str, int q, int minimum, int sign) {
  int flag = 0, z, i, j = 0, base = 1000000000;
  if (minimum < 0) {
    minimum = 0;
  }
  if (minimum > 9) {
    flag = 1;
  }
  if (q < 0) {
    str[j++] = '-';
    q = -q;
  } else {
    if (sign) {
      str[j++] = '+';
    }
  }
  for (i = 10; i; i--) {
    if (minimum == i) {
      flag = 1;
    }
    z = q / base;
    q %= base;
    if (z || flag) {
      str[j++] = '0' + z;
      flag = 1;
    }
    base /= 10;
  }
  if (!flag) {
    str[j++] = '0';
  }
  str[j] = 0;
  return j;
}
```