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

  CHKS((line[*counter] != 'l'), NCE_BUG_FUNCTION_SHOULD_NOT_HAVE_BEEN_CALLED);
  *counter = (*counter + 1);
  CHKS((block->l_number > -1), NCE_MULTIPLE_L_WORDS_ON_ONE_LINE);
  CHP(read_integer_value(line, counter, &value, parameters));
  CHKS((value < 0), NCE_NEGATIVE_L_WORD_USED);
  block->l_number = value;
  block->l_flag = ON;
  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 %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq (%rcx), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x6c, %eax
je 0x62a81
jmp 0x629ae
leaq 0x19a30(%rip), %rdi     # 0x7c3e5
callq 0x10380
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x24591(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x24580(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x24572(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x1aed9(%rip), %rsi     # 0x7d8dc
movl $0x50, %edx
callq 0x10840
movq 0x2454c(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2453e(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x24526(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x24516(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x24509(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x244fb(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x62d60
jmp 0x62a83
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
cmpl $-0x1, 0x1c8(%rax)
jle 0x62b78
jmp 0x62aa5
leaq 0x1ae6b(%rip), %rdi     # 0x7d917
callq 0x10380
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x2449a(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x24489(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x2447b(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x1ade2(%rip), %rsi     # 0x7d8dc
movl $0x50, %edx
callq 0x10840
movq 0x24455(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x24447(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x2442f(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x2441f(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x24412(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x24404(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x62d60
jmp 0x62b7a
jmp 0x62b7c
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %r8
leaq -0x34(%rbp), %rcx
callq 0x11250
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
je 0x62c5f
jmp 0x62ba4
movq 0x243b5(%rip), %rax     # 0x86f60
cmpl $0x31, 0xd670(%rax)
jge 0x62c54
movq 0x243a1(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x24393(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x1acfa(%rip), %rsi     # 0x7d8dc
movl $0x50, %edx
callq 0x10840
movq 0x2436d(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2435f(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x24347(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x24337(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x2432a(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2431c(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x62d60
jmp 0x62c61
jmp 0x62c63
cmpl $0x0, -0x34(%rbp)
jge 0x62d3f
jmp 0x62c6f
leaq 0x1acbe(%rip), %rdi     # 0x7d934
callq 0x10380
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x242d0(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x242bf(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x242b1(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x1ac18(%rip), %rsi     # 0x7d8dc
movl $0x50, %edx
callq 0x10840
movq 0x2428b(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2427d(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x24265(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x24255(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x24248(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2423a(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x62d60
jmp 0x62d41
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x1c8(%rax)
movq -0x28(%rbp), %rax
movb $0x1, 0x1cc(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)