// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/interp_read.cc
// Function: Interp::read_named_parameter_setting(char*, int*, char**, double*)
int Interp::read_named_parameter_setting(
    char *line,   //!< string: line of RS274/NGC code being processed
    int *counter, //!< pointer to a counter for position on the line 
    char **param,  //!< pointer to the char * to be returned 
    double *parameters)   //!< array of system parameters
{
  static char name[] = "read_named_parameter_setting";
  int status;
  static char paramNameBuf[LINELEN+1];

  *param = paramNameBuf;

  logDebug("entered %s", name);
  CHKS(((line[*counter] != '<') && !isalpha(line[*(counter)])),
      NCE_BUG_FUNCTION_SHOULD_NOT_HAVE_BEEN_CALLED);

  status=read_name(line, counter, paramNameBuf);
  CHP(status);

  logDebug("%s: returned(%d) from read_name:|%s|", name, status, paramNameBuf);

  status = add_named_param(paramNameBuf);
  CHP(status);
  logDebug("%s: returned(%d) from add_named_param:|%s|", name, status, paramNameBuf);

  // the rest of the work is done in read_parameter_setting

  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x35f26(%rip), %rax     # 0x633c0
movq %rax, (%rcx)
movq 0x16abc(%rip), %r13     # 0x43f60
cmpl $0x0, 0x1b6b4(%r13)
jle 0x2d4e6
callq 0xaf80
subq $0x8, %rsp
leaq 0x17722(%rip), %r10     # 0x44be0
leaq 0xf59c(%rip), %rsi      # 0x3ca61
leaq 0xefea(%rip), %r8       # 0x3c4b6
movq %rbx, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x912, %r9d            # imm = 0x912
xorl %eax, %eax
pushq %r10
callq 0xb470
addq $0x10, %rsp
movslq (%r14), %rax
movsbl (%r15,%rax), %edi
cmpl $0x3c, %edi
je 0x2d500
callq 0xb140
testl %eax, %eax
je 0x2d69b
leaq 0x35eb9(%rip), %r12     # 0x633c0
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0xa9a0
movl %eax, %r14d
testl %eax, %eax
je 0x2d583
movslq 0xd670(%r13), %rax
cmpq $0x30, %rax
jg 0x2d6f2
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%rax,%r13), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
leaq 0xe4b7(%rip), %rsi      # 0x3ba01
movl $0x50, %edx
callq 0xa8a0
movslq 0xd670(%r13), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%r13,%rcx)
incl %eax
movl %eax, 0xd670(%r13)
movb %dl, 0xc720(%r13,%rcx)
jmp 0x2d6f2
cmpl $0x0, 0x1b6b4(%r13)
jle 0x2d5c9
callq 0xaf80
subq $0x8, %rsp
leaq 0x17643(%rip), %r10     # 0x44be0
leaq 0xf4db(%rip), %rsi      # 0x3ca7f
leaq 0xef0b(%rip), %r8       # 0x3c4b6
movq %rbx, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x919, %r9d            # imm = 0x919
xorl %eax, %eax
pushq %r12
pushq %r14
pushq %r10
callq 0xb470
addq $0x20, %rsp
leaq 0x35df0(%rip), %r15     # 0x633c0
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa310
movl %eax, %r12d
testl %eax, %eax
je 0x2d643
movslq 0xd670(%r13), %rax
movl %r12d, %r14d
cmpq $0x30, %rax
jg 0x2d643
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%rax,%r13), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
leaq 0xe3f5(%rip), %rsi      # 0x3ba01
movl $0x50, %edx
callq 0xa8a0
movslq 0xd670(%r13), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%r13,%rcx)
incl %eax
movl %eax, 0xd670(%r13)
movb %dl, 0xc720(%r13,%rcx)
movl %r12d, %r14d
testl %r12d, %r12d
jne 0x2d6f2
cmpl $0x0, 0x1b6b4(%r13)
jle 0x2d704
callq 0xaf80
subq $0x8, %rsp
leaq 0x17576(%rip), %r10     # 0x44be0
leaq 0xf446(%rip), %rsi      # 0x3cab7
leaq 0xee3e(%rip), %r8       # 0x3c4b6
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x91d, %r9d            # imm = 0x91D
xorl %eax, %eax
pushq %r15
pushq %r12
pushq %r10
callq 0xb470
addq $0x20, %rsp
jmp 0x2d6f2
leaq 0xcbb5(%rip), %rdi      # 0x3a257
callq 0xa1f0
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xa850
movl $0x0, 0xd670(%r13)
leaq 0xc6d0(%r13), %rdi
leaq 0xe334(%rip), %rsi      # 0x3ba01
movl $0x50, %edx
callq 0xa8a0
movw $0x0, 0xc71f(%r13)
movl $0x1, 0xd670(%r13)
movl $0x5, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0x2d6f2
nop