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

```asm
<debcmp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L291
L165:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L57
  addq   $0x1,-0x28(%rbp)
L291:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L165
  jmp    L312
L57:
  nop
  jmp    L312
L150:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L352
  addq   $0x1,-0x30(%rbp)
L312:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L150
  jmp    L50
L352:
  nop
L50:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L151
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  je     L248
  mov    $0x1,%eax
  jmp    L62
L248:
  mov    -0x28(%rbp),%rax
  sub    -0x10(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  sub    -0x8(%rbp),%rax
  cmp    %rax,%rdx
  jle    L299
  mov    $0x1,%eax
  jmp    L62
L299:
  mov    -0x28(%rbp),%rax
  sub    -0x10(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  sub    -0x8(%rbp),%rax
  cmp    %rax,%rdx
  jge    L255
  mov    $0xffffffff,%eax
  jmp    L62
L80:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jge    L272
  mov    $0xffffffff,%eax
  jmp    L62
L272:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jge    L227
  mov    $0x1,%eax
  jmp    L62
L227:
  addq   $0x1,-0x10(%rbp)
  addq   $0x1,-0x8(%rbp)
L255:
  mov    -0x10(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jne    L80
  addq   $0x1,-0x10(%rbp)
  addq   $0x1,-0x8(%rbp)
  addq   $0x1,-0x28(%rbp)
  addq   $0x1,-0x30(%rbp)
  jmp    L300
L151:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L354
  mov    $0xffffffff,%eax
  jmp    L62
L354:
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  jmp    L300
L277:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <debccmp@plt>
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  je     L278
  mov    -0x14(%rbp),%eax
  jmp    L62
L278:
  addq   $0x1,-0x28(%rbp)
  addq   $0x1,-0x30(%rbp)
L300:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L43
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L277
L43:
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L9
L234:
  addq   $0x1,-0x28(%rbp)
L9:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L234
  jmp    L217
L252:
  addq   $0x1,-0x30(%rbp)
L217:
  mov    -0x30(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L252
  mov    -0x28(%rbp),%rax
  sub    -0x10(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  sub    -0x8(%rbp),%rax
  cmp    %rax,%rdx
  jle    L152
  mov    $0x1,%eax
  jmp    L62
L152:
  mov    -0x28(%rbp),%rax
  sub    -0x10(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  sub    -0x8(%rbp),%rax
  cmp    %rax,%rdx
  jge    L313
  mov    $0xffffffff,%eax
  jmp    L62
L313:
  mov    $0x0,%eax
L62:
  leave
  ret
```

assistant: ```c
int debcmp(const char *d1, const char *d2) {
  const char *sd1 = d1, *sd2 = d2;
  while (*d1) {
    if (!isdigit(*d1)) {
      break;
    }
    ++d1;
  }
  while (*d2) {
    if (!isdigit(*d2)) {
      break;
    }
    ++d2;
  }
  if (*d1 == ':') {
    if (*d2 != ':') {
      return 1;
    }
    if (d1 - sd1 > d2 - sd2) {
      return 1;
    } else if (d1 - sd1 < d2 - sd2) {
      return -1;
    }
    while (sd1 != d1) {
      if (*sd1 < *sd2) {
        return -1;
      } else if (*sd2 < *sd1) {
        return 1;
      }
      ++sd1;
      ++sd2;
    }
    ++sd1;
    ++sd2;
    ++d1;
    ++d2;
  } else if (*d2 == ':') {
    return -1;
  } else {
    d1 = sd1;
    d2 = sd2;
  }
  while (!isdigit(*d1) && !isdigit(*d2)) {
    int r = debccmp(*d1, *d2);
    if (r) {
      return r;
    }
    ++d1;
    ++d2;
  }
  sd1 = d1;
  sd2 = d2;
  while (isdigit(*d1)) {
    ++d1;
  }
  while (isdigit(*d2)) {
    ++d2;
  }
  if (d1 - sd1 > d2 - sd2) {
    return 1;
  } else if (d1 - sd1 < d2 - sd2) {
    return -1;
  }
  return 0;
}
```