// File: /workspace/github_cpp_makefile_star2_O2/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
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x35163(%rip), %rax     # 0x5c480
movq %rax, (%rcx)
movq 0x15c39(%rip), %r13     # 0x3cf60
cmpl $0x0, 0x1b6b4(%r13)
jle 0x27363
callq 0xc0b0
leaq 0x16963(%rip), %rcx     # 0x3dca0
movq %rcx, (%rsp)
leaq 0xe70e(%rip), %rsi      # 0x35a56
leaq 0xe15f(%rip), %r8       # 0x354ae
movq %rbx, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x912, %r9d            # imm = 0x912
xorl %eax, %eax
callq 0xc5e0
movslq (%r14), %rax
movsbl (%r15,%rax), %edi
cmpl $0x3c, %edi
je 0x2737d
callq 0xc290
testl %eax, %eax
je 0x27456
leaq 0x350fc(%rip), %r12     # 0x5c480
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0xba50
testl %eax, %eax
jne 0x273f9
cmpl $0x0, 0x1b6b4(%r13)
jle 0x273df
callq 0xc0b0
movq %r12, 0x10(%rsp)
leaq 0x168ec(%rip), %rcx     # 0x3dca0
movq %rcx, (%rsp)
andl $0x0, 0x8(%rsp)
leaq 0xe6b0(%rip), %rsi      # 0x35a74
leaq 0xe0e3(%rip), %r8       # 0x354ae
movq %rbx, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x919, %r9d            # imm = 0x919
xorl %eax, %eax
callq 0xc5e0
leaq 0x3509a(%rip), %r15     # 0x5c480
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb350
testl %eax, %eax
je 0x2749f
movl %eax, %r14d
movslq 0xd670(%r13), %rax
cmpq $0x30, %rax
jg 0x274ed
imulq $0x50, %rax, %rax
leaq (%rax,%r13), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
leaq 0xd5de(%rip), %rsi      # 0x34a01
pushq $0x50
popq %rdx
callq 0xb940
movslq 0xd670(%r13), %rax
imulq $0x50, %rax, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%r13,%rcx)
incl %eax
movl %eax, 0xd670(%r13)
movb %dl, 0xc720(%r13,%rcx)
jmp 0x274ed
leaq 0xbdf2(%rip), %rdi      # 0x3324f
callq 0xb220
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xb8e0
leaq 0xc6d0(%r13), %rdi
leaq 0xd584(%rip), %rsi      # 0x34a01
pushq $0x50
popq %rdx
callq 0xb940
andw $0x0, 0xc71f(%r13)
movl $0x1, 0xd670(%r13)
pushq $0x5
popq %r14
jmp 0x274ed
cmpl $0x0, 0x1b6b4(%r13)
jle 0x274ea
callq 0xc0b0
movq %r15, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
leaq 0x167e1(%rip), %rcx     # 0x3dca0
movq %rcx, (%rsp)
leaq 0xe5e2(%rip), %rsi      # 0x35aac
leaq 0xdfdd(%rip), %r8       # 0x354ae
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x91d, %r9d            # imm = 0x91D
xorl %eax, %eax
callq 0xc5e0
jmp 0x274ed
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop