// File: sundale[P]gcode/rs274ngc/interp_read.cc
// Function: Interp::read_n_number(char*, int*, block_struct*)
int Interp::read_n_number(char *line, //!< string: line of RS274    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 
{
  int value;

  CHKS(((line[*counter] != 'n') && (line[*counter] != 'o')),
      NCE_BUG_FUNCTION_SHOULD_NOT_HAVE_BEEN_CALLED);
  *counter = (*counter + 1);
  CHP(read_integer_unsigned(line, counter, &value));
/* This next test is problematic as many CAM systems will exceed this !
  CHKS((value > 99999), NCE_LINE_NUMBER_GREATER_THAN_99999); */
  block->n_number = value;
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq (%rcx), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x6e, %eax
je 0x60455
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq (%rcx), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x6f, %eax
je 0x60455
jmp 0x60382
leaq 0x1c05c(%rip), %rdi     # 0x7c3e5
callq 0x10380
movq -0x38(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x26bbd(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x26bac(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x26b9e(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x1d572(%rip), %rsi     # 0x7d949
movl $0x50, %edx
callq 0x10840
movq 0x26b78(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x26b6a(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x26b52(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x26b42(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x26b35(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x26b27(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x60558
jmp 0x60457
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x2c(%rbp), %rcx
callq 0x11d40
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0x60542
jmp 0x6048a
movq 0x26acf(%rip), %rax     # 0x86f60
cmpl $0x31, 0xd670(%rax)
jge 0x6053a
movq 0x26abb(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x26aad(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x1d481(%rip), %rsi     # 0x7d949
movl $0x50, %edx
callq 0x10840
movq 0x26a87(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x26a79(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x26a61(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x26a51(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x26a44(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x26a36(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x60558
jmp 0x60544
movl -0x2c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x1d4(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)