// File: /workspace/github_c_makefile_star2_O3/sheneman[P]clearcut/dmat.c
// Function: NJ_get_token
static inline
int
NJ_get_token(FILE *fp,
	     NJ_DIST_TOKEN *token) {

  char c;
  int index;

  c = fgetc(fp);
  if(feof(fp)) {
    token->type = NJ_EOF_STATE;
    return(token->type);
  }

  if(NJ_is_whitespace(c)) {
    token->buf[0] = c;
    token->buf[1] = '\0';
    token->type   = NJ_WS_STATE;

    return NJ_WS_STATE;
  } 

  index = 0;
  while(!NJ_is_whitespace(c)) {

    /* reallocate our buffer if necessary */
    if(index >= token->bufsize) {
      token->bufsize *= 2;
      token->buf = (char *)realloc(token->buf, token->bufsize*sizeof(char));
      if(!token->buf) {
	fprintf(stderr, "Clearcut: Memory allocation error in NJ_get_token()\n");
	exit(-1);
      }
    }

    token->buf[index++] = c;
    
    c = fgetc(fp);
    if(feof(fp)) {
      token->type = NJ_EOF_STATE;
      break;
    }
  }
  
  token->buf[index] = '\0';
  
  if(token->type != NJ_EOF_STATE) {

    if(NJ_is_distance(token->buf)) {
      token->type = NJ_FLOAT_STATE;
    } else {
      token->type = NJ_NAME_STATE;
    }

  }
  
  return(token->type);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2130
movl %eax, %ebp
movq %r14, %rdi
callq 0x21a0
testl %eax, %eax
je 0x5c77
movl $0x67, 0x10(%rbx)
movl $0x67, %eax
jmp 0x5c9c
movzbl %bpl, %eax
leal -0x9(%rax), %ecx
cmpl $0x5, %ecx
jae 0x5cab
movq (%rbx), %rax
movb %bpl, (%rax)
movq (%rbx), %rax
movb $0x0, 0x1(%rax)
movl $0x66, 0x10(%rbx)
movl $0x66, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x20, %eax
je 0x5c83
xorl %r15d, %r15d
movabsq $0x100003e00, %r12      # imm = 0x100003E00
cmpb $0x20, %bpl
ja 0x5ccd
movzbl %bpl, %eax
btq %rax, %r12
jb 0x5d18
movq (%rbx), %rax
movq 0x8(%rbx), %rsi
cmpq %r15, %rsi
jg 0x5cf4
addq %rsi, %rsi
movq %rsi, 0x8(%rbx)
movq %rax, %rdi
callq 0x21e0
movq %rax, (%rbx)
testq %rax, %rax
je 0x5edc
movb %bpl, (%rax,%r15)
incq %r15
movq %r14, %rdi
callq 0x2130
movl %eax, %ebp
movq %r14, %rdi
callq 0x21a0
testl %eax, %eax
je 0x5cbd
movl $0x67, 0x10(%rbx)
movq (%rbx), %rax
movslq %r15d, %rcx
movb $0x0, (%rax,%rcx)
movl $0x67, %eax
cmpl $0x67, 0x10(%rbx)
je 0x5c9c
movq (%rbx), %r14
testq %r14, %r14
je 0x5eba
movb (%r14), %al
leal -0x30(%rax), %ecx
cmpb $0x9, %cl
ja 0x5d52
movq %r14, %rdi
callq 0x20e0
jmp 0x5d83
cmpb $0x2e, %al
ja 0x5eba
movzbl %al, %eax
movabsq $0x680000000000, %rcx   # imm = 0x680000000000
btq %rax, %rcx
jae 0x5eba
movq %r14, %rdi
callq 0x20e0
cmpq $0x1, %rax
je 0x5eba
testq %rax, %rax
je 0x5eaf
xorl %ecx, %ecx
movl $0x1, %esi
xorl %edi, %edi
xorl %r8d, %r8d
xorl %r10d, %r10d
movb (%r14,%rcx), %r9b
leal -0x3a(%r9), %r11d
cmpb $-0xb, %r11b
ja 0x5dcf
movzbl %r9b, %r11d
addl $-0x2b, %r11d
cmpl $0x3a, %r11d
ja 0x5eba
movabsq $0x40000000400000d, %rdx # imm = 0x40000000400000D
btq %r11, %rdx
jae 0x5eba
testq %rcx, %rcx
je 0x5e02
testl %r10d, %r10d
jne 0x5e02
cmpb $0x2b, %r9b
je 0x5eba
movzbl %r9b, %r11d
cmpl $0x2d, %r11d
je 0x5eba
testl %r8d, %r8d
setne %r11b
cmpb $0x2e, %r9b
sete %bpl
jmp 0x5e3d
testl %r8d, %r8d
setne %r11b
testl %r10d, %r10d
je 0x5e2a
testl %r8d, %r8d
je 0x5e2a
cmpb $0x2b, %r9b
je 0x5eba
movzbl %r9b, %ebp
cmpl $0x2d, %ebp
je 0x5eba
cmpb $0x2e, %r9b
sete %bpl
testl %r10d, %r10d
je 0x5e3d
cmpb $0x2e, %r9b
je 0x5eba
testl %r10d, %r10d
setne %r13b
movl %r9d, %r12d
andb $-0x21, %r12b
cmpb $0x45, %r12b
sete %dl
testl %edi, %edi
setne %r15b
testb %dl, %r13b
jne 0x5eba
andb %bpl, %r15b
jne 0x5eba
movl $0x1, %r15d
testl %r10d, %r10d
jne 0x5e7e
xorl %r15d, %r15d
cmpb $0x45, %r12b
sete %r15b
setne %dl
orb %dl, %r11b
addb $-0x2b, %r9b
xorl %edx, %edx
testb $-0x3, %r9b
sete %dl
testb $0x1, %r11b
cmovel %edx, %r8d
testb %bpl, %bpl
movl %edi, %edx
cmovnel %esi, %edx
testl %edi, %edi
cmovel %edx, %edi
incq %rcx
movl %r15d, %r10d
cmpq %rcx, %rax
jne 0x5d9b
movb -0x1(%r14,%rax), %al
addb $-0x3a, %al
cmpb $-0xa, %al
jae 0x5ecb
movl $0x64, 0x10(%rbx)
movl $0x64, %eax
jmp 0x5c9c
movl $0x65, 0x10(%rbx)
movl $0x65, %eax
jmp 0x5c9c
callq 0x266a