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

```asm
<spr_compile>:
  endbr64
  push   %r14
  push   %r13
  mov    %esi,%r13d
  mov    %rdi,%rsi
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  sub    $0x70,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbx
  mov    %rbx,%rdi
  call   <strcpy@plt>
  mov    $0x3b,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L57
  jmp    L105
  nopl   0x0(%rax,%rax,1)
L165:
  sub    $0x1,%rax
  cmpb   $0x20,(%rax)
  jne    L105
L57:
  movb   $0x0,(%rax)
  cmp    %rbx,%rax
  jne    L165
L100:
  xor    %eax,%eax
L106:
  mov    0x68(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L9
  add    $0x70,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L105:
  cmpb   $0x20,(%rsp)
  mov    %rbx,%rax
  je     L211
  nopl   0x0(%rax)
L30:
  add    $0x1,%rax
  cmpb   $0x20,(%rax)
  jne    L30
  nopl   0x0(%rax)
L211:
  movzbl 0x1(%rax),%edx
  add    $0x1,%rax
  cmp    $0x20,%dl
  je     L211
  cmp    $0x44,%dl
  jne    L100
  cmpb   $0x42,0x1(%rax)
  jne    L100
  lea    0x2(%rax),%rbp
  test   %r13d,%r13d
  je     L47
  xor    %r13d,%r13d
  nopl   0x0(%rax)
L24:
  cmpb   $0x20,0x0(%rbp)
  je     L62
L37:
  mov    $0x2c,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L31
  movb   $0x0,(%rax)
L31:
  movslq %r13d,%r14
  add    %r12,%r14
  cmpb   $0x23,0x0(%rbp)
  je     L166
  mov    %rbp,%rdi
  call   <atoi@plt>
L73:
  not    %eax
  add    $0x1,%r13d
  mov    %al,(%r14)
  test   %rbx,%rbx
  je     L146
  cmpb   $0x20,0x1(%rbx)
  lea    0x1(%rbx),%rbp
  jne    L37
L62:
  add    $0x1,%rbp
  jmp    L24
  nopl   0x0(%rax,%rax,1)
L83:
  add    $0x1,%rbp
L47:
  cmpb   $0x20,0x0(%rbp)
  je     L83
L157:
  mov    $0x2c,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L121
  movb   $0x0,(%rax)
L121:
  movslq %r13d,%r14
  add    %r12,%r14
  cmpb   $0x23,0x0(%rbp)
  je     L145
  mov    %rbp,%rdi
  call   <atoi@plt>
L175:
  mov    %al,(%r14)
  add    $0x1,%r13d
  test   %rbx,%rbx
  je     L146
  cmpb   $0x20,0x1(%rbx)
  lea    0x1(%rbx),%rbp
  jne    L157
  add    $0x1,%rbp
  jmp    L47
  nopw   0x0(%rax,%rax,1)
L145:
  lea    0x1(%rbp),%rdi
  call   <hex2i@plt>
  jmp    L175
  nopl   0x0(%rax,%rax,1)
L166:
  lea    0x1(%rbp),%rdi
  call   <hex2i@plt>
  jmp    L73
  cs nopw 0x0(%rax,%rax,1)
L146:
  mov    $0x1,%eax
  jmp    L106
L9:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int spr_compile(char *_s, int f, char *code) {
  char *poo, *po;
  char s[100];
  int codelen = 0;
  strcpy(s, _s);
  po = strchr(s, ';');
  if (po != NULL) {
    while (1) {
      *po = 0;
      if (po == s)
        return 0;
      po--;
      if (*po != ' ')
        break;
    }
  }
  po = s;
  while (*po != ' ')
    po++;
  while (*po == ' ')
    po++;
  if (*po != 'D')
    return 0;
  po++;
  if (*po != 'B')
    return 0;
  po++;
  while (1) {
    while (*po == ' ')
      po++;
    poo = strchr(po, ',');
    if (poo != NULL)
      *poo = 0;
    if (*po == '#')
      code[codelen] = hex2i(po + 1);
    else
      code[codelen] = atoi(po);
    if (f)
      code[codelen] = ~code[codelen];
    codelen++;
    if (poo == NULL)
      break;
    poo++;
    po = poo;
  }
  return 1;
}
```