// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2110
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2170
cmpl $0x0, %eax
je 0x6ea4
movq -0x18(%rbp), %rax
movl $0x67, 0x10(%rax)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x7003
movsbl -0x19(%rbp), %edi
callq 0x7290
cmpl $0x0, %eax
je 0x6ee0
movb -0x19(%rbp), %cl
movq -0x18(%rbp), %rax
movq (%rax), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movb $0x0, 0x1(%rax)
movq -0x18(%rbp), %rax
movl $0x66, 0x10(%rax)
movl $0x66, -0x4(%rbp)
jmp 0x7003
movl $0x0, -0x20(%rbp)
movsbl -0x19(%rbp), %edi
callq 0x7290
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x6f01
jmp 0x6fb5
movslq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jl 0x6f6e
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
shlq %rcx
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x0, %rsi
callq 0x21b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x6f6c
movq 0x80a7(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x4893(%rip), %rsi      # 0xb7ee
movb $0x0, %al
callq 0x2150
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2200
jmp 0x6f6e
movb -0x19(%rbp), %dl
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x20(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rdi
callq 0x2110
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2170
cmpl $0x0, %eax
je 0x6fb0
movq -0x18(%rbp), %rax
movl $0x67, 0x10(%rax)
jmp 0x6fb5
jmp 0x6ee7
movq -0x18(%rbp), %rax
movq (%rax), %rax
movslq -0x20(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
cmpl $0x67, 0x10(%rax)
je 0x6ff9
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x72f0
cmpl $0x0, %eax
je 0x6fec
movq -0x18(%rbp), %rax
movl $0x65, 0x10(%rax)
jmp 0x6ff7
movq -0x18(%rbp), %rax
movl $0x64, 0x10(%rax)
jmp 0x6ff9
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)