user: Please show me the C implementation that matches the assembly code listed below:

```asm
<is_number>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  call   <strlen@plt>
  mov    $0x1,%r10d
  test   %eax,%eax
  je     L147
  mov    %eax,%edi
  movzbl (%rbx),%eax
  sub    $0x2b,%eax
  test   $0xfd,%al
  sete   %dl
  sete   %al
  movzbl %dl,%edx
  cmp    %edx,%edi
  jle    L147
  movzbl %al,%eax
  xor    %r10d,%r10d
  xor    %r9d,%r9d
  xor    %ecx,%ecx
  jmp    L162
  nop
L192:
  lea    -0x30(%rdx),%esi
  cmp    $0x9,%sil
  seta   %r8b
  cmp    $0x2e,%dl
  setne  %sil
  test   %sil,%r8b
  jne    L224
  test   %ecx,%ecx
  jne    L224
  cmp    $0x2e,%dl
  je     L209
  add    $0x1,%r9d
  xor    %ecx,%ecx
L27:
  add    $0x1,%rax
  cmp    %eax,%edi
  jle    L93
L162:
  movzbl (%rbx,%rax,1),%edx
  mov    %eax,%r8d
  mov    %edx,%esi
  and    $0xffffffdf,%esi
  cmp    $0x45,%sil
  je     L205
  cmp    $0x20,%dl
  jne    L192
  test   %r9d,%r9d
  je     L224
  add    $0x1,%rax
  add    $0x1,%ecx
  cmp    %eax,%edi
  jg     L162
L93:
  xor    %r10d,%r10d
  test   %r9d,%r9d
  sete   %r10b
L147:
  mov    %r10d,%eax
  pop    %rbx
  ret
  nopl   0x0(%rax)
L209:
  test   %r10d,%r10d
  jne    L147
  mov    $0x1,%r10d
  jmp    L27
  nopl   (%rax)
L224:
  mov    $0x1,%r10d
  pop    %rbx
  mov    %r10d,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L205:
  mov    $0x1,%r10d
  test   %r9d,%r9d
  je     L147
  lea    0x1(%rax),%eax
  cmp    %eax,%edi
  je     L147
  movslq %eax,%rdx
  add    $0x2,%r8d
  movzbl (%rbx,%rdx,1),%edx
  sub    $0x2b,%edx
  and    $0xfd,%edx
  cmove  %r8d,%eax
  cmp    %eax,%edi
  jle    L147
  movslq %eax,%rdx
  sub    $0x1,%edi
  sub    %eax,%edi
  lea    0x1(%rbx,%rdx,1),%rax
  lea    (%rbx,%rdx,1),%rsi
  add    %rdi,%rax
  xor    %edi,%edi
  jmp    L148
  xchg   %ax,%ax
L234:
  sub    $0x30,%edx
  cmp    $0x9,%dl
  ja     L224
  test   %ecx,%ecx
  jne    L224
  add    $0x1,%edi
L151:
  add    $0x1,%rsi
  cmp    %rax,%rsi
  je     L112
L148:
  movzbl (%rsi),%edx
  cmp    $0x20,%dl
  jne    L234
  test   %edi,%edi
  je     L224
  add    $0x1,%ecx
  jmp    L151
L112:
  xor    %r10d,%r10d
  jmp    L147
```

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;
}
```