// File: sundale[P]gcode/rs274ngc/interp_read.cc
// Function: Interp::read_one_item(char*, int*, block_struct*, double*)
int Interp::read_one_item(
    char *line,    //!< string: line of RS274/NGC code being processed
    int *counter,  //!< pointer to a counter for position on the line 
    block_pointer block,   //!< pointer to a block being filled from the line 
    double * parameters) /* array of system parameters  */
{
  read_function_pointer function_pointer;
  char letter;

  letter = line[*counter];      /* check if in array range */
  CHKS(((letter < ' ') || (letter > 'z')),
	_("Bad character '\\%03o' used"), (unsigned char)letter);
  function_pointer = _readers[(int) letter]; /* Find the function pointer in the array */
  CHKS((function_pointer == 0),
	(!isprint(letter) || isspace(letter)) ?
	    _("Bad character '\\%03o' used") : _("Bad character '%c' used"), letter);
  CHP((*this.*function_pointer)(line, counter, block, parameters)); /* Call the function */ 
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq (%rcx), %rcx
movb (%rax,%rcx), %al
movb %al, -0x41(%rbp)
movsbl -0x41(%rbp), %eax
cmpl $0x20, %eax
jl 0x61f9b
movsbl -0x41(%rbp), %eax
cmpl $0x7a, %eax
jle 0x62074
jmp 0x61f9d
leaq 0x1ba6c(%rip), %rdi     # 0x7da10
callq 0x10380
movq -0x50(%rbp), %rdi
movq %rax, %rsi
movzbl -0x41(%rbp), %edx
movb $0x0, %al
callq 0x10df0
movq 0x24f9e(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x24f8d(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x24f7f(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x1ba35(%rip), %rsi     # 0x7da2b
movl $0x50, %edx
callq 0x10840
movq 0x24f59(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x24f4b(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x24f33(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x24f23(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x24f16(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x24f08(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x622fb
jmp 0x62076
movq -0x50(%rbp), %rcx
movsbq -0x41(%rbp), %rdx
shlq $0x4, %rdx
movq 0x8(%rcx,%rdx), %rax
movq 0x10(%rcx,%rdx), %rcx
movq %rcx, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rdx
cmpq $0x0, %rcx
sete %al
cmpq $0x0, %rcx
sete %cl
cmpq $0x0, %rdx
sete %dl
orb %dl, %cl
andb %cl, %al
testb $0x1, %al
jne 0x620bf
jmp 0x621cb
jmp 0x620c1
movsbl -0x41(%rbp), %edi
callq 0x11f60
cmpl $0x0, %eax
je 0x620dd
movsbl -0x41(%rbp), %edi
callq 0x10120
cmpl $0x0, %eax
je 0x620ef
leaq 0x1b92c(%rip), %rdi     # 0x7da10
callq 0x10380
movq %rax, -0x58(%rbp)
jmp 0x620ff
leaq 0x1b977(%rip), %rdi     # 0x7da6d
callq 0x10380
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
movsbl -0x41(%rbp), %edx
movb $0x0, %al
callq 0x10df0
movq 0x24e47(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x24e36(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x24e28(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x1b8de(%rip), %rsi     # 0x7da2b
movl $0x50, %edx
callq 0x10840
movq 0x24e02(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x24df4(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x24ddc(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x24dcc(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x24dbf(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x24db1(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x622fb
jmp 0x621cd
jmp 0x621cf
movq -0x50(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x38(%rbp), %rdx
addq %rdx, %rcx
movq %rcx, -0x60(%rbp)
andq $0x1, %rax
cmpq $0x0, %rax
je 0x62209
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x70(%rbp)
jmp 0x62211
movq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x60(%rbp), %rdi
movq -0x70(%rbp), %rax
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
callq *%rax
movl %eax, -0x48(%rbp)
cmpl $0x0, -0x48(%rbp)
je 0x622f2
jmp 0x6223a
movq 0x24d1f(%rip), %rax     # 0x86f60
cmpl $0x31, 0xd670(%rax)
jge 0x622ea
movq 0x24d0b(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x24cfd(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x1b7b3(%rip), %rsi     # 0x7da2b
movl $0x50, %edx
callq 0x10840
movq 0x24cd7(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x24cc9(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x24cb1(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x24ca1(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x24c94(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x24c86(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl -0x48(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x622fb
jmp 0x622f4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)