user: What would the C source look like for the assembly code provided here:

```asm
<NJ_is_distance>:
  endbr64
  mov    $0x0,%eax
  test   %rdi,%rdi
  je     L219
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r13
  movzbl (%rdi),%ebx
  movsbl %bl,%ebp
  mov    %ebp,%edi
  call   <NJ_is_number@plt>
  test   %eax,%eax
  jne    L9
  lea    -0x2d(%rbx),%edx
  cmp    $0x1,%dl
  jbe    L9
  cmp    $0x2b,%bl
  jne    L220
L9:
  mov    %r13,%rdi
  call   <strlen@plt>
  cmp    $0x1,%eax
  je     L163
L262:
  mov    $0x0,%ebp
  mov    $0x0,%r14d
  mov    $0x0,%r15d
  mov    $0x0,%r12d
  jmp    L51
L163:
  mov    %ebp,%edi
  call   <NJ_is_number@plt>
  test   %eax,%eax
  jne    L262
  jmp    L220
L24:
  mov    %r12d,%edx
  test   %r15d,%r15d
  je     L339
  test   %r12b,%r12b
  je     L339
  lea    -0x2b(%rbx),%edx
  test   $0xfd,%dl
  je     L187
  cmp    $0x2e,%bl
  je     L121
L56:
  mov    %ebx,%edx
  and    $0xffffffdf,%edx
  cmp    $0x45,%dl
  je     L216
  test   %r12d,%r12d
  je     L205
L72:
  test   %r12d,%r12d
  je     L205
  test   %r15d,%r15d
  jne    L205
  sub    $0x2b,%ebx
  test   $0xfd,%bl
  sete   %r15b
  movzbl %r15b,%r15d
L205:
  test   %r14d,%r14d
  jne    L172
  test   %al,%al
  mov    $0x1,%eax
  cmovne %eax,%r14d
L172:
  add    $0x1,%rbp
L51:
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    %ebp,0xc(%rsp)
  cmp    %ebp,%eax
  jle    L147
  movzbl 0x0(%r13,%rbp,1),%ebx
  movsbl %bl,%edi
  call   <NJ_is_number@plt>
  test   %eax,%eax
  jne    L162
  lea    -0x2b(%rbx),%edx
  cmp    $0x3a,%dl
  ja     L220
  movabs $0x40000000400000d,%rcx
  bt     %rdx,%rcx
  jae    L220
L162:
  cmpl   $0x0,0xc(%rsp)
  setg   %al
  test   %r12d,%r12d
  sete   %dl
  and    %dl,%al
  je     L24
  lea    -0x2b(%rbx),%eax
  test   $0xfd,%al
  je     L360
  cmp    $0x2e,%bl
  sete   %al
L265:
  test   %r14d,%r14d
  je     L364
  test   %al,%al
  jne    L267
L364:
  mov    %ebx,%edx
  and    $0xffffffdf,%edx
  mov    $0x0,%r12d
  cmp    $0x45,%dl
  jne    L205
  mov    $0x1,%r12d
  jmp    L72
L339:
  cmp    $0x2e,%bl
  sete   %al
  test   %dl,%dl
  je     L257
  test   %al,%al
  je     L257
  mov    $0x0,%eax
  jmp    L220
L257:
  test   %r12d,%r12d
  jne    L56
  jmp    L265
L147:
  mov    %r13,%rdi
  call   <strlen@plt>
  cltq
  movsbl -0x1(%r13,%rax,1),%edi
  call   <NJ_is_number@plt>
  test   %eax,%eax
  setne  %al
  movzbl %al,%eax
L220:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L360:
  mov    $0x0,%eax
  jmp    L220
L187:
  mov    $0x0,%eax
  jmp    L220
L216:
  mov    $0x0,%eax
  jmp    L220
L267:
  mov    $0x0,%eax
  jmp    L220
L121:
  mov    $0x0,%eax
  jmp    L220
L219:
  ret
```

assistant: ```c
int NJ_is_distance(char *token) {
  int i;
  char c;
  int exponent_state;
  int expsign_state;
  int dpoint_state;
  if (!token) {
    return (0);
  }
  exponent_state = 0;
  expsign_state = 0;
  dpoint_state = 0;
  c = token[0];
  if (!NJ_is_number(c) && c != '.' && c != '-' && c != '+') {
    goto BAD;
  }
  if (strlen(token) == 1) {
    if (!NJ_is_number(c)) {
      goto BAD;
    }
  }
  for (i = 0; i < strlen(token); i++) {
    c = token[i];
    if (!NJ_is_number(c) && c != '.' && c != '-' && c != '+' && c != 'e' && c != 'E') {
      goto BAD;
    }
    if (i > 0 && !exponent_state) {
      if (c == '-' || c == '+') {
        goto BAD;
      }
    }
    if (exponent_state && expsign_state) {
      if (c == '-' || c == '+') {
        goto BAD;
      }
    }
    if (exponent_state) {
      if (c == '.') {
        goto BAD;
      }
    }
    if (exponent_state) {
      if (c == 'e' || c == 'E') {
        goto BAD;
      }
    }
    if (dpoint_state) {
      if (c == '.') {
        goto BAD;
      }
    }
    if (!exponent_state) {
      if (c == 'e' || c == 'E') {
        exponent_state = 1;
      }
    }
    if (exponent_state && !expsign_state) {
      if (c == '-' || c == '+') {
        expsign_state = 1;
      }
    }
    if (!dpoint_state) {
      if (c == '.') {
        dpoint_state = 1;
      }
    }
  }
  if (!NJ_is_number(token[strlen(token) - 1])) {
    goto BAD;
  }
  return (1);
BAD:
  return (0);
}
```