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

```asm
<is_number>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  call   <strlen@plt>
  mov    $0x1,%r10d
  test   %eax,%eax
  je     L162
  mov    %eax,%edi
  movzbl (%rbx),%eax
  sub    $0x2b,%eax
  test   $0xfd,%al
  sete   %al
  sete   %dl
  movzbl %dl,%edx
  cmp    %edx,%edi
  jle    L201
  movzbl %al,%eax
  mov    $0x0,%r10d
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    $0x1,%r11d
  jmp    L123
L175:
  mov    $0x1,%r10d
  test   %r8d,%r8d
  je     L162
  lea    0x1(%rax),%eax
  mov    $0x1,%r10d
  cmp    %eax,%edi
  je     L162
  movslq %eax,%rdx
  movzbl (%rbx,%rdx,1),%edx
  sub    $0x2b,%edx
  add    $0x2,%r9d
  test   $0xfd,%dl
  cmove  %r9d,%eax
  cmp    %eax,%edi
  jle    L55
  movslq %eax,%rsi
  lea    (%rbx,%rsi,1),%rdx
  lea    0x1(%rbx,%rsi,1),%rsi
  sub    $0x1,%edi
  sub    %eax,%edi
  add    %rdi,%rsi
  mov    $0x0,%r8d
  jmp    L277
L197:
  test   %r8d,%r8d
  je     L264
  add    $0x1,%ecx
L80:
  add    $0x1,%rax
  cmp    %eax,%edi
  jle    L0
L123:
  mov    %eax,%r9d
  movzbl (%rbx,%rax,1),%edx
  mov    %edx,%esi
  and    $0xffffffdf,%esi
  cmp    $0x45,%sil
  je     L175
  cmp    $0x20,%dl
  je     L197
  lea    -0x30(%rdx),%esi
  cmp    $0x9,%sil
  seta   %r9b
  cmp    $0x2e,%dl
  setne  %sil
  test   %sil,%r9b
  jne    L203
  test   %ecx,%ecx
  jne    L203
  cmp    $0x2e,%dl
  je     L86
  add    $0x1,%r8d
  mov    $0x0,%ecx
  jmp    L80
L86:
  test   %r10d,%r10d
  jne    L162
  mov    %r10d,%ecx
  mov    %r11d,%r10d
  jmp    L80
L43:
  test   %r8d,%r8d
  je     L229
  add    $0x1,%ecx
L48:
  add    $0x1,%rdx
  cmp    %rsi,%rdx
  je     L0
L277:
  movzbl (%rdx),%eax
  cmp    $0x20,%al
  je     L43
  sub    $0x30,%eax
  cmp    $0x9,%al
  ja     L115
  test   %ecx,%ecx
  jne    L115
  add    $0x1,%r8d
  jmp    L48
L55:
  mov    $0x0,%r8d
  jmp    L0
L264:
  mov    $0x1,%r10d
  jmp    L162
L203:
  mov    $0x1,%r10d
L162:
  mov    %r10d,%eax
  pop    %rbx
  ret
L229:
  mov    $0x1,%r10d
  jmp    L162
L115:
  mov    $0x1,%r10d
  jmp    L162
L201:
  mov    $0x0,%r8d
L0:
  test   %r8d,%r8d
  sete   %r10b
  movzbl %r10b,%r10d
  jmp    L162
```

assistant: ```c
int is_number(char *str) {
  int i = 0, len, hasspace = 0, hassign = 0, digit = 0, hasdot = 0, hasexp = 0;
  len = strlen(str);
  if (!len)
    return 1;
  if ((str[0] == '+') || (str[0] == '-')) {
    hassign++;
    i++;
  }
  for (; i < len; i++) {
    if ((str[i] == 'e') || (str[i] == 'E')) {
      if ((!digit) || hasexp) {
        return 1;
      }
      hasexp++;
      hassign = 0;
      digit = 0;
      break;
    }
    if (str[i] == ' ') {
      if (!digit) {
        return 1;
      }
      hasspace++;
    } else {
      if (((str[i] < 48) || (str[i] > 57)) && str[i] != '.') {
        return 1;
      } else {
        if (hasspace) {
          return 1;
        }
        if (str[i] == '.') {
          if (hasdot)
            return 1;
          hasdot++;
        } else {
          digit++;
        }
      }
    }
  }
  if (hasexp) {
    if (++i == len) {
      return 1;
    }
    if ((str[i] == '+') || (str[i] == '-')) {
      hassign++;
      i++;
    }
    for (; i < len; i++) {
      if (str[i] == ' ') {
        if (!digit) {
          return 1;
        }
        hasspace++;
      } else {
        if ((str[i] < 48) || (str[i] > 57)) {
          return 1;
        } else {
          if (hasspace) {
            return 1;
          }
          digit++;
        }
      }
    }
  }
  if (digit)
    return 0;
  else
    return 1;
}
```