// File: /workspace/github_cpp_makefile_star2_O3/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 0x3662c(%rip), %rax     # 0x603c0
movq %rax, (%rcx)
movq 0x171c2(%rip), %r13     # 0x40f60
cmpl $0x0, 0x1b6b4(%r13)
jle 0x29de0
callq 0xaf80
subq $0x8, %rsp
leaq 0x17e28(%rip), %r10     # 0x41be0
leaq 0xfc97(%rip), %rsi      # 0x39a56
leaq 0xf6e8(%rip), %r8       # 0x394ae
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 0x29dfa
callq 0xb140
testl %eax, %eax
je 0x29edd
leaq 0x365bf(%rip), %r12     # 0x603c0
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0xa9a0
testl %eax, %eax
jne 0x29e76
cmpl $0x0, 0x1b6b4(%r13)
jle 0x29e5c
callq 0xaf80
subq $0x8, %rsp
leaq 0x17db0(%rip), %r10     # 0x41be0
leaq 0xfc3d(%rip), %rsi      # 0x39a74
leaq 0xf670(%rip), %r8       # 0x394ae
movq %rbx, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x919, %r9d            # imm = 0x919
xorl %eax, %eax
pushq %r12
pushq $0x0
pushq %r10
callq 0xb470
addq $0x20, %rsp
leaq 0x3655d(%rip), %r15     # 0x603c0
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa310
testl %eax, %eax
je 0x29f2b
movl %eax, %r14d
movslq 0xd670(%r13), %rax
cmpq $0x30, %rax
jg 0x29f79
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%rax,%r13), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
leaq 0xeb5d(%rip), %rsi      # 0x38a01
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 0x29f79
leaq 0xd36b(%rip), %rdi      # 0x3724f
callq 0xa1f0
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xa850
leaq 0xc6d0(%r13), %rdi
leaq 0xeafd(%rip), %rsi      # 0x38a01
movl $0x50, %edx
callq 0xa8a0
movw $0x0, 0xc71f(%r13)
movl $0x1, 0xd670(%r13)
movl $0x5, %r14d
jmp 0x29f79
cmpl $0x0, 0x1b6b4(%r13)
jle 0x29f76
callq 0xaf80
subq $0x8, %rsp
leaq 0x17c9b(%rip), %r10     # 0x41be0
leaq 0xfb60(%rip), %rsi      # 0x39aac
leaq 0xf55b(%rip), %r8       # 0x394ae
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x91d, %r9d            # imm = 0x91D
xorl %eax, %eax
pushq %r15
pushq $0x0
pushq %r10
callq 0xb470
addq $0x20, %rsp
jmp 0x29f79
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop