LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/interp_read.cc
// Function: Interp::read_atsign(char*, int*, block_struct*, double*)
int Interp::read_atsign(char *line, int *counter, block_pointer block,
                        double *parameters) {
    CHKS((line[*counter] != '@'), NCE_BUG_FUNCTION_SHOULD_NOT_HAVE_BEEN_CALLED);
    (*counter)++;
    CHP(read_real_value(line, counter, &block->radius, parameters));
    block->radius_flag = ON;
    return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movslq (%rdx), %rax
cmpb $0x40, (%rsi,%rax)
jne 0x2e79b
movq %rcx, %rbx
incl %eax
movl %eax, (%rdx)
addq $0x2a8, %rcx            # imm = 0x2A8
movq %r14, %rdi
callq 0xaf10
testl %eax, %eax
je 0x2e78c
movl %eax, %r14d
movq 0x15834(%rip), %r15     # 0x43f60
movslq 0xd670(%r15), %rax
cmpq $0x30, %rax
jg 0x2e787
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%r15,%rax), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
leaq 0xd67a(%rip), %rsi      # 0x3bdcd
movl $0x50, %edx
callq 0xa8a0
movslq 0xd670(%r15), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%r15,%rcx)
incl %eax
movl %eax, 0xd670(%r15)
movb %dl, 0xc720(%r15,%rcx)
testl %r14d, %r14d
jne 0x2e7f6
movl $0x1, 0x2a0(%rbx)
xorl %r14d, %r14d
jmp 0x2e7f6
leaq 0xbab5(%rip), %rdi      # 0x3a257
callq 0xa1f0
movq %r14, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xa850
movq 0x157a5(%rip), %rbx     # 0x43f60
movl $0x0, 0xd670(%rbx)
leaq 0xc6d0(%rbx), %rdi
leaq 0xd5fa(%rip), %rsi      # 0x3bdcd
movl $0x50, %edx
callq 0xa8a0
movw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
movl $0x5, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/interp_read.cc
// Function: Interp::read_carat(char*, int*, block_struct*, double*)
int Interp::read_carat(char *line, int *counter, block_pointer block,
                       double *parameters) {
    CHKS((line[*counter] != '^'), NCE_BUG_FUNCTION_SHOULD_NOT_HAVE_BEEN_CALLED);
    (*counter)++;
    CHP(read_real_value(line, counter, &block->theta, parameters));
    block->theta_flag = ON;
    return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movslq (%rdx), %rax
cmpb $0x5e, (%rsi,%rax)
jne 0x2e8b1
movq %rcx, %rbx
incl %eax
movl %eax, (%rdx)
addq $0x2b8, %rcx            # imm = 0x2B8
movq %r14, %rdi
callq 0xaf10
testl %eax, %eax
je 0x2e8a2
movl %eax, %r14d
movq 0x1571e(%rip), %r15     # 0x43f60
movslq 0xd670(%r15), %rax
cmpq $0x30, %rax
jg 0x2e89d
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%r15,%rax), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
leaq 0xd5b5(%rip), %rsi      # 0x3be1e
movl $0x50, %edx
callq 0xa8a0
movslq 0xd670(%r15), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%r15,%rcx)
incl %eax
movl %eax, 0xd670(%r15)
movb %dl, 0xc720(%r15,%rcx)
testl %r14d, %r14d
jne 0x2e90c
movl $0x1, 0x2b0(%rbx)
xorl %r14d, %r14d
jmp 0x2e90c
leaq 0xb99f(%rip), %rdi      # 0x3a257
callq 0xa1f0
movq %r14, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xa850
movq 0x1568f(%rip), %rbx     # 0x43f60
movl $0x0, 0xd670(%rbx)
leaq 0xc6d0(%rbx), %rdi
leaq 0xd535(%rip), %rsi      # 0x3be1e
movl $0x50, %edx
callq 0xa8a0
movw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
movl $0x5, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/interp_read.cc
// Function: Interp::read_y(char*, int*, block_struct*, double*)
int Interp::read_y(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 
                  double *parameters)   //!< array of system parameters                    
{
  double value;

  CHKS((line[*counter] != 'y'), NCE_BUG_FUNCTION_SHOULD_NOT_HAVE_BEEN_CALLED);
  *counter = (*counter + 1);
  CHKS((block->y_flag != OFF), NCE_MULTIPLE_Y_WORDS_ON_ONE_LINE);
  CHP(read_real_value(line, counter, &value, parameters));
  block->y_flag = ON;
  block->y_number = value;
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movslq (%rdx), %rax
cmpb $0x79, (%rsi,%rax)
jne 0x2e94a
movq %rcx, %r14
incl %eax
movl %eax, (%rdx)
cmpb $0x1, 0x280(%rcx)
jne 0x2e9af
leaq 0xe41e(%rip), %rdi      # 0x3cd66
jmp 0x2e951
leaq 0xb906(%rip), %rdi      # 0x3a257
callq 0xa1f0
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xa850
movq 0x155f6(%rip), %rbx     # 0x43f60
movl $0x0, 0xd670(%rbx)
leaq 0xc6d0(%rbx), %rdi
leaq 0xd4ed(%rip), %rsi      # 0x3be6f
movl $0x50, %edx
callq 0xa8a0
movw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
movl $0x5, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x18(%rbp), %rcx
movq %rbx, %rdi
callq 0xaf10
testl %eax, %eax
je 0x2ea28
movl %eax, %ebx
movq 0x15598(%rip), %r14     # 0x43f60
movslq 0xd670(%r14), %rax
cmpq $0x30, %rax
jg 0x2e9a4
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%r14,%rax), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
leaq 0xd480(%rip), %rsi      # 0x3be6f
movl $0x50, %edx
callq 0xa8a0
movslq 0xd670(%r14), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%r14,%rcx)
incl %eax
movl %eax, 0xd670(%r14)
movb %dl, 0xc720(%r14,%rcx)
jmp 0x2e9a4
movb $0x1, 0x280(%r14)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, 0x288(%r14)
xorl %ebx, %ebx
jmp 0x2e9a4
nop
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/interp_read.cc
// Function: Interp::read_z(char*, int*, block_struct*, double*)
int Interp::read_z(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 
                  double *parameters)   //!< array of system parameters                    
{
  double value;

  CHKS((line[*counter] != 'z'), NCE_BUG_FUNCTION_SHOULD_NOT_HAVE_BEEN_CALLED);
  *counter = (*counter + 1);
  CHKS((block->z_flag != OFF), NCE_MULTIPLE_Z_WORDS_ON_ONE_LINE);
  CHP(read_real_value(line, counter, &value, parameters));
  block->z_flag = ON;
  block->z_number = value;
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movslq (%rdx), %rax
cmpb $0x7a, (%rsi,%rax)
jne 0x2ea76
movq %rcx, %r14
incl %eax
movl %eax, (%rdx)
cmpb $0x1, 0x290(%rcx)
jne 0x2eadb
leaq 0xe30f(%rip), %rdi      # 0x3cd83
jmp 0x2ea7d
leaq 0xb7da(%rip), %rdi      # 0x3a257
callq 0xa1f0
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xa850
movq 0x154ca(%rip), %rbx     # 0x43f60
movl $0x0, 0xd670(%rbx)
leaq 0xc6d0(%rbx), %rdi
leaq 0xd412(%rip), %rsi      # 0x3bec0
movl $0x50, %edx
callq 0xa8a0
movw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
movl $0x5, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x18(%rbp), %rcx
movq %rbx, %rdi
callq 0xaf10
testl %eax, %eax
je 0x2eb54
movl %eax, %ebx
movq 0x1546c(%rip), %r14     # 0x43f60
movslq 0xd670(%r14), %rax
cmpq $0x30, %rax
jg 0x2ead0
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%r14,%rax), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
leaq 0xd3a5(%rip), %rsi      # 0x3bec0
movl $0x50, %edx
callq 0xa8a0
movslq 0xd670(%r14), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%r14,%rcx)
incl %eax
movl %eax, 0xd670(%r14)
movb %dl, 0xc720(%r14,%rcx)
jmp 0x2ead0
movb $0x1, 0x290(%r14)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, 0x298(%r14)
xorl %ebx, %ebx
jmp 0x2ead0
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/interp_write.cc
// Function: Interp::write_m_codes(block_struct*, setup_struct*)
int Interp::write_m_codes(block_pointer block,   //!< pointer to a block of RS274/NGC instructions
                         setup_pointer settings)        //!< pointer to machine settings                 
{
  int *emz;

  emz = settings->active_m_codes;
  emz[0] = settings->sequence_number;   /* 0 seq number  */
  emz[1] = (block == NULL) ? -1 : block->m_modes[4];    /* 1 stopping    */
  emz[2] = (settings->spindle_turning == CANON_STOPPED) ? 5 :   /* 2 spindle     */
    (settings->spindle_turning == CANON_CLOCKWISE) ? 3 : 4;
  emz[3] =                      /* 3 tool change */
    (block == NULL) ? -1 : block->m_modes[6];
  emz[4] =                      /* 4 mist        */
    (settings->mist == ON) ? 7 : (settings->flood == ON) ? -1 : 9;
  emz[5] =                      /* 5 flood       */
    (settings->flood == ON) ? 8 : -1;
  if (settings->feed_override == ON) {
    if (settings->speed_override == ON) emz[6] =  48;
    else emz[6] = 50;
  } else if (settings->speed_override == ON) {
    emz[6] = 51;
  } else emz[6] = 49;
  
  emz[7] =                      /* 7 overrides   */
    (settings->adaptive_feed == ON) ? 52 : -1;

  emz[8] =                      /* 8 overrides   */
    (settings->feed_hold == ON) ? 53 : -1;

  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0xc6b4(%rdx), %eax
movl %eax, 0xd0(%rdx)
testq %rsi, %rsi
je 0x2ee05
movl 0x1f0(%rsi), %eax
movl %eax, 0xd4(%rdx)
movl 0xc6cc(%rdx), %eax
xorl %ecx, %ecx
cmpl $0x2, %eax
setne %cl
addl $0x3, %ecx
cmpl $0x1, %eax
movl $0x5, %eax
cmovnel %ecx, %eax
movl %eax, 0xd8(%rdx)
movl 0x1f8(%rsi), %eax
jmp 0x2ee36
movl $0xffffffff, 0xd4(%rdx) # imm = 0xFFFFFFFF
movl 0xc6cc(%rdx), %eax
xorl %ecx, %ecx
cmpl $0x2, %eax
setne %cl
addl $0x3, %ecx
cmpl $0x1, %eax
movl $0x5, %eax
cmovnel %ecx, %eax
movl %eax, 0xd8(%rdx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0xdc(%rdx)
movl $0x7, %eax
cmpb $0x0, 0x1797(%rdx)
jne 0x2ee56
movzbl 0x1688(%rdx), %eax
negl %eax
orl $0x9, %eax
movl %eax, 0xe0(%rdx)
movzbl 0x1688(%rdx), %eax
decl %eax
orl $0x8, %eax
movl %eax, 0xe4(%rdx)
movzbl 0xc6c8(%rdx), %eax
leal 0x31(,%rax,2), %ecx
xorb $0x1, %al
movzbl %al, %eax
leal 0x30(,%rax,2), %eax
cmpb $0x0, 0x674(%rdx)
cmovnel %eax, %ecx
movl %ecx, 0xe8(%rdx)
movzbl 0x1b6b0(%rdx), %eax
decl %eax
orl $0x34, %eax
movl %eax, 0xec(%rdx)
movzbl 0x1b6b1(%rdx), %eax
decl %eax
orl $0x35, %eax
movl %eax, 0xf0(%rdx)
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/interp_write.cc
// Function: Interp::write_settings(setup_struct*)
int Interp::write_settings(setup_pointer settings)       //!< pointer to machine settings
{
  double *vals;

  vals = settings->active_settings;
  vals[0] = settings->sequence_number;  /* 0 sequence number */
  vals[1] = settings->feed_rate;        /* 1 feed rate       */
  vals[2] = settings->speed;    /* 2 spindle speed   */

  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cvtsi2sdl 0xc6b4(%rsi), %xmm0
movsd %xmm0, 0xf8(%rsi)
movsd 0x678(%rsi), %xmm0
movsd %xmm0, 0x100(%rsi)
movsd 0xc6b8(%rsi), %xmm0
movsd %xmm0, 0x108(%rsi)
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/interp_o_word.cc
// Function: Interp::control_find_oword(block_struct*, setup_struct*, int*)
int Interp::control_find_oword( /* ARGUMENTS                       */
  block_pointer block,      /* pointer to block */
  setup_pointer settings,   /* pointer to machine settings      */
  int *o_index)             /* the index of o-word (returned) */
{
  static char name[] = "control_find_oword";
  int i;

  logDebug("Entered:%s", name);
  for(i=0; i<settings->oword_labels; i++)
    {
      if(0 == strcmp(settings->oword_offset[i].o_word_name, block->o_name))
	{
	  *o_index = i;
	  logDebug("Found oword[%d]: |%s|", i, block->o_name);
	  return INTERP_OK;
	}
    }
  logDebug("Unknown oword name: |%s|", block->o_name);
  ERS(NCE_UNKNOWN_OWORD_NUMBER);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, -0x38(%rbp)
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq 0x14cd9(%rip), %rax     # 0x43f60
cmpl $0x0, 0x1b6b4(%rax)
jle 0x2f2c2
callq 0xaf80
leaq 0x15984(%rip), %rcx     # 0x44c20
movq %rcx, (%rsp)
leaq 0xdd9f(%rip), %rsi      # 0x3d046
leaq 0xdd30(%rip), %r8       # 0x3cfde
movq %rbx, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x8d, %r9d
xorl %eax, %eax
callq 0xb470
movq %rbx, -0x30(%rbp)
movslq 0xfb28(%r12), %rbx
testq %rbx, %rbx
jle 0x2f304
movq 0x2d0(%r14), %r13
addq $0xfb38, %r12           # imm = 0xFB38
xorl %r15d, %r15d
movq (%r12), %rdi
movq %r13, %rsi
callq 0xaeb0
testl %eax, %eax
je 0x2f3a4
incq %r15
addq $0x30, %r12
cmpq %r15, %rbx
jne 0x2f2e4
movq 0x14c55(%rip), %r15     # 0x43f60
cmpl $0x0, 0x1b6b4(%r15)
movq -0x30(%rbp), %rbx
jle 0x2f34b
callq 0xaf80
movq 0x2d0(%r14), %rcx
movq %rcx, (%rsp)
leaq 0xdd5d(%rip), %rsi      # 0x3d08d
leaq 0xdca7(%rip), %r8       # 0x3cfde
movq %rbx, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x97, %r9d
xorl %eax, %eax
callq 0xb470
leaq 0xdd67(%rip), %rdi      # 0x3d0b9
callq 0xa1f0
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xa850
movl $0x0, 0xd670(%r15)
leaq 0xc6d0(%r15), %rdi
leaq 0xdb29(%rip), %rsi      # 0x3cea6
movl $0x50, %edx
callq 0xa8a0
movw $0x0, 0xc71f(%r15)
movl $0x1, 0xd670(%r15)
movl $0x5, %r14d
jmp 0x2f3fb
movq -0x38(%rbp), %rax
movl %r15d, (%rax)
movq 0x14bae(%rip), %rax     # 0x43f60
cmpl $0x0, 0x1b6b4(%rax)
jle 0x2f3f8
callq 0xaf80
movq 0x2d0(%r14), %rcx
movq %rcx, 0x8(%rsp)
movl %r15d, (%rsp)
leaq 0xdc8d(%rip), %rsi      # 0x3d064
leaq 0xdc00(%rip), %r8       # 0x3cfde
xorl %r14d, %r14d
movq -0x30(%rbp), %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x93, %r9d
xorl %eax, %eax
callq 0xb470
jmp 0x2f3fb
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/nurbs_additional_functions.cc
// Function: knot_vector_creator(unsigned int, unsigned int)
std::vector<unsigned int> knot_vector_creator(unsigned int n, unsigned int k) {
    
    unsigned int i;
    std::vector<unsigned int> knot_vector;
    for (i=0; i<=n+k; i++) {
	if (i < k)  
            knot_vector.push_back(0);
        else if (i >= k && i <= n)
            knot_vector.push_back(i - k + 1);
        else
            knot_vector.push_back(n - k + 2);
    }
    return knot_vector;
 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r14d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leal (%r14,%rsi), %r13d
movq %rsi, -0x48(%rbp)
movl %esi, %r12d
subl %edx, %r12d
addl $0x2, %r12d
movl $0x1, %eax
subl %edx, %eax
movq %rax, -0x40(%rbp)
xorl %r15d, %r15d
cmpl %r14d, %r15d
jae 0x30f9b
movl $0x0, -0x34(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x30fd4
movl $0x0, (%rsi)
jmp 0x30fca
cmpl -0x48(%rbp), %r15d
jbe 0x30fb4
movl %r12d, -0x2c(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x30fe2
movl %r12d, (%rsi)
jmp 0x30fca
movq -0x40(%rbp), %rax
addl %r15d, %eax
movl %eax, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x30ff0
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x30ffc
movq %rbx, %rdi
leaq -0x34(%rbp), %rdx
callq 0xa370
jmp 0x30ffc
movq %rbx, %rdi
leaq -0x2c(%rbp), %rdx
callq 0xa370
jmp 0x30ffc
movq %rbx, %rdi
leaq -0x30(%rbp), %rdx
callq 0xa370
incl %r15d
cmpl %r13d, %r15d
jbe 0x30f7d
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3101e
jmp 0x3101e
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x31035
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0xaae0
movq %r14, %rdi
callq 0xb3b0
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/nurbs_additional_functions.cc
// Function: Rden(double, unsigned int, std::vector<CONTROL_POINT, std::allocator<CONTROL_POINT>>, std::vector<unsigned int, std::allocator<unsigned int>>)
double Rden(double u, unsigned int k,
                  std::vector<CONTROL_POINT> nurbs_control_points,
                  std::vector<unsigned int> knot_vector) {

    unsigned int i;
    double d = 0.0;   
    for (i=0; i<(nurbs_control_points.size()); i++)
        d = d + Nmix(i,k,u,knot_vector)*nurbs_control_points[i].W;
    return d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movsd %xmm0, -0x30(%rbp)
movq 0x8(%rsi), %rax
cmpq (%rsi), %rax
je 0x3144c
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
xorpd %xmm0, %xmm0
xorl %r12d, %r12d
leaq -0x58(%rbp), %r13
movsd %xmm0, -0x40(%rbp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0xa240
movl %r12d, %edi
movl %r15d, %esi
movsd -0x30(%rbp), %xmm0
movq %r13, %rdx
callq 0xb5f0
movapd %xmm0, %xmm1
movq (%r14), %rax
leaq (%r12,%r12,2), %rcx
mulsd 0x10(%rax,%rcx,8), %xmm1
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x31420
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
movsd %xmm1, -0x38(%rbp)
callq 0xaae0
movsd -0x38(%rbp), %xmm1
movsd -0x40(%rbp), %xmm0
addsd %xmm1, %xmm0
movq 0x8(%r14), %rax
subq (%r14), %rax
incl %r12d
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %r12, %rax
ja 0x313cd
jmp 0x31450
xorpd %xmm0, %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x31477
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
callq 0xaae0
movq %rbx, %rdi
callq 0xb3b0
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/rs274ngc_pre.cc
// Function: Interp::doLog(char*, ...)
void Interp::doLog(char *fmt, ...)
{
#ifdef LOG_FILE
    struct timeval tv;
    struct tm *tm;
    va_list ap;

    va_start(ap, fmt);

    if(log_file == NULL)
    {
       log_file = fopen(LOG_FILE, "a");
    }

    if(log_file == NULL)
    {
         fprintf(stderr, "(%d)Unable to open log file:%s\n",
                  getpid(), LOG_FILE);
    }

    gettimeofday(&tv, NULL);
    tm = localtime(&tv.tv_sec);

    fprintf(log_file, "%04d%02d%02d-%02d:%02d:%02d.%03ld ",
	    tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
	    tm->tm_hour, tm->tm_min, tm->tm_sec,
	    tv.tv_usec/1000);

    vfprintf(log_file, fmt, ap);
    fflush(log_file);

    va_end(ap);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x100(%rbp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x31c3e
movaps %xmm0, -0xd0(%rbp)
movaps %xmm1, -0xc0(%rbp)
movaps %xmm2, -0xb0(%rbp)
movaps %xmm3, -0xa0(%rbp)
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x80(%rbp)
movaps %xmm6, -0x70(%rbp)
movaps %xmm7, -0x60(%rbp)
movq %rsi, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, -0x40(%rbp)
cmpq $0x0, (%rdi)
jne 0x31c79
movl $0x1b6b8, %edi          # imm = 0x1B6B8
addq 0x122f6(%rip), %rdi     # 0x43f60
leaq 0xa725(%rip), %rsi      # 0x3c396
callq 0xace0
movq %rax, (%rbx)
cmpq $0x0, (%rbx)
je 0x31d21
leaq -0x50(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0xb180
movq %r15, %rdi
callq 0xa730
movq (%rbx), %rdi
movl $0x76c, %r10d           # imm = 0x76C
addl 0x14(%rax), %r10d
movl 0x10(%rax), %ecx
incl %ecx
movl 0xc(%rax), %r8d
movl 0x8(%rax), %r9d
movl (%rax), %r12d
movl 0x4(%rax), %r13d
movabsq $0x20c49ba5e353f7cf, %rax # imm = 0x20C49BA5E353F7CF
imulq 0x8(%r15)
movq %rdx, %r11
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %r11
addq %rax, %r11
subq $0x8, %rsp
leaq 0xbd5c(%rip), %rsi      # 0x3da40
movl %r10d, %edx
xorl %eax, %eax
pushq %r11
pushq %r12
pushq %r13
callq 0xaf00
addq $0x20, %rsp
movq (%rbx), %rdi
leaq -0x40(%rbp), %rdx
movq %r14, %rsi
callq 0xadd0
movq (%rbx), %rdi
callq 0xacd0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xb7ba
jmp 0x31c83
nop
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/rs274ngc_pre.cc
// Function: Interp::close()
int Interp::close()
{
  if(_setup.use_lazy_close)
    {
      _setup.lazy_closing = 1;
      return INTERP_OK;
    }

  if (_setup.file_pointer != NULL) {
    fclose(_setup.file_pointer);
    _setup.file_pointer = NULL;
    _setup.percent_flag = OFF;
  }
  reset();

  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x12227(%rip), %rbx     # 0x43f60
cmpl $0x0, 0x1d6b8(%rbx)
je 0x31d4e
movl $0x1, 0x1d6bc(%rbx)
jmp 0x31da7
movq 0x1680(%rbx), %rdi
testq %rdi, %rdi
je 0x31d71
callq 0xaa80
movq $0x0, 0x1680(%rbx)
movb $0x0, 0xc678(%rbx)
xorl %eax, %eax
movb %al, 0x1698(%rbx)
movb %al, 0x4f8(%rbx)
movl %eax, 0x1694(%rbx)
movl %eax, 0xef90(%rbx)
movl %eax, 0xef50(%rbx)
movq $0x0, 0xef70(%rbx)
movl %eax, 0xfb28(%rbx)
callq 0xa090
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/rs274ngc_pre.cc
// Function: Interp::exit()
int Interp::exit()
{
  char file_name[LINELEN];

  GET_EXTERNAL_PARAMETER_FILE_NAME(file_name, (LINELEN - 1));
  save_parameters(((file_name[0] ==
                             0) ?
                            RS274NGC_PARAMETER_FILE_NAME_DEFAULT :
                            file_name), _setup.parameters);
  reset();

  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
leaq -0x120(%rbp), %r14
movq %r14, %rdi
movl $0xfe, %esi
callq 0xa8e0
xorl %r15d, %r15d
cmpb %r15b, (%r14)
leaq 0xb53f(%rip), %rsi      # 0x3dbdb
cmovneq %r14, %rsi
movq 0x118b9(%rip), %r14     # 0x43f60
leaq 0x17c0(%r14), %rdx
movq %rbx, %rdi
callq 0xb610
movb %r15b, 0x1698(%r14)
movb %r15b, 0x4f8(%r14)
movl %r15d, 0x1694(%r14)
movl %r15d, 0xef90(%r14)
movl %r15d, 0xef50(%r14)
movq $0x0, 0xef70(%r14)
movl %r15d, 0xfb28(%r14)
callq 0xa090
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/rs274ngc_pre.cc
// Function: Interp::init_tool_parameters()
int Interp::init_tool_parameters()
{
  if (_setup.random_toolchanger) {
     // random_toolchanger: tool at startup expected
    _setup.parameters[5400] = _setup.tool_table[0].toolno;
    _setup.parameters[5401] = _setup.tool_table[0].offset.tran.x;
    _setup.parameters[5402] = _setup.tool_table[0].offset.tran.y;
    _setup.parameters[5403] = _setup.tool_table[0].offset.tran.z;
    _setup.parameters[5404] = _setup.tool_table[0].offset.a;
    _setup.parameters[5405] = _setup.tool_table[0].offset.b;
    _setup.parameters[5406] = _setup.tool_table[0].offset.c;
    _setup.parameters[5407] = _setup.tool_table[0].offset.u;
    _setup.parameters[5408] = _setup.tool_table[0].offset.v;
    _setup.parameters[5409] = _setup.tool_table[0].offset.w;
    _setup.parameters[5410] = _setup.tool_table[0].diameter;
    _setup.parameters[5411] = _setup.tool_table[0].frontangle;
    _setup.parameters[5412] = _setup.tool_table[0].backangle;
    _setup.parameters[5413] = _setup.tool_table[0].orientation;
  } else {
    // non random_toolchanger: no tool at startup, one-time init
    if (_setup.tool_table[0].toolno == -1) {
      default_tool_parameters();
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xfe2d(%rip), %rax      # 0x43f60
cmpl $0x0, 0xc6ac(%rax)
movl 0xd6c8(%rax), %ecx
je 0x341cd
cvtsi2sd %ecx, %xmm0
movsd %xmm0, 0xc080(%rax)
movsd 0xd6d0(%rax), %xmm0
movsd %xmm0, 0xc088(%rax)
movups 0xd6d8(%rax), %xmm0
movups %xmm0, 0xc090(%rax)
movups 0xd6e8(%rax), %xmm0
movups %xmm0, 0xc0a0(%rax)
movups 0xd6f8(%rax), %xmm0
movups %xmm0, 0xc0b0(%rax)
movups 0xd708(%rax), %xmm0
movups %xmm0, 0xc0c0(%rax)
movups 0xd718(%rax), %xmm0
movups %xmm0, 0xc0d0(%rax)
movsd 0xd728(%rax), %xmm0
movsd %xmm0, 0xc0e0(%rax)
xorps %xmm0, %xmm0
cvtsi2sdl 0xd730(%rax), %xmm0
movsd %xmm0, 0xc0e8(%rax)
jmp 0x3420e
cmpl $-0x1, %ecx
jne 0x3420e
xorpd %xmm0, %xmm0
movupd %xmm0, 0xc0e0(%rax)
movupd %xmm0, 0xc0d0(%rax)
movupd %xmm0, 0xc0c0(%rax)
movupd %xmm0, 0xc0b0(%rax)
movupd %xmm0, 0xc0a0(%rax)
movupd %xmm0, 0xc090(%rax)
movupd %xmm0, 0xc080(%rax)
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/rs274ngc_pre.cc
// Function: Interp::load_tool_table()
int Interp::load_tool_table()
{
  int n;

  CHKS((_setup.pockets_max > CANON_POCKETS_MAX), NCE_POCKET_MAX_TOO_LARGE);
  for (n = 0; n < _setup.pockets_max; n++) {
    _setup.tool_table[n] = GET_EXTERNAL_TOOL_TABLE(n);
  }
  for (; n < CANON_POCKETS_MAX; n++) {
    _setup.tool_table[n].toolno = -1;
    ZERO_EMC_POSE(_setup.tool_table[n].offset);
    _setup.tool_table[n].diameter = 0;
    _setup.tool_table[n].orientation = 0;
    _setup.tool_table[n].frontangle = 0;
    _setup.tool_table[n].backangle = 0;
  }
  set_tool_parameters();
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq 0xfd38(%rip), %r12      # 0x43f60
cmpl $0x38, 0xd6c0(%r12)
jle 0x3428f
leaq 0x9c30(%rip), %rdi      # 0x3de6a
callq 0xa1f0
movq %rax, %rsi
xorl %eax, %eax
callq 0xa850
movl $0x0, 0xd670(%r12)
leaq 0xc6d0(%r12), %rdi
leaq 0x9fbd(%rip), %rsi      # 0x3e221
movl $0x50, %edx
callq 0xa8a0
movw $0x0, 0xc71f(%r12)
movl $0x1, 0xd670(%r12)
movl $0x5, %eax
jmp 0x3434f
cmpl $0x0, 0xd6c0(%r12)
jle 0x342de
movl $0xd6c8, %r14d          # imm = 0xD6C8
addq 0xfcb9(%rip), %r14      # 0x43f60
xorl %ebx, %ebx
leaq -0x90(%rbp), %r15
movq %r15, %rdi
movl %ebx, %esi
callq 0xb390
movl $0xe, %ecx
movq %r14, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
incq %rbx
movslq 0xd6c0(%r12), %rax
addq $0x70, %r14
cmpq %rax, %rbx
jl 0x342b0
jmp 0x342e0
xorl %ebx, %ebx
cmpl $0x37, %ebx
ja 0x34348
movl %ebx, %eax
imulq $0x70, %rax, %rax
xorps %xmm0, %xmm0
movl $0xffffffff, 0xd6c8(%r12,%rax) # imm = 0xFFFFFFFF
movups %xmm0, 0xd6d0(%r12,%rax)
movups %xmm0, 0xd6e0(%r12,%rax)
movups %xmm0, 0xd6f0(%r12,%rax)
movups %xmm0, 0xd700(%r12,%rax)
movups %xmm0, 0xd710(%r12,%rax)
movups %xmm0, 0xd720(%r12,%rax)
movl $0x0, 0xd730(%r12,%rax)
addq $0x70, %rax
cmpq $0x1880, %rax           # imm = 0x1880
jne 0x342ee
callq 0xaf90
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/rs274ngc_pre.cc
// Function: Interp::set_tool_parameters()
int Interp::set_tool_parameters()
{
  // invoke to set tool parameters for current tool (pocket==0)
  // when a tool is absent, set default (zero offset) tool parameters

  if ((! _setup.random_toolchanger) && (_setup.tool_table[0].toolno <= 0)) {
    default_tool_parameters();
    return 0;
  }
  _setup.parameters[5400] = _setup.tool_table[0].toolno;
  _setup.parameters[5401] = _setup.tool_table[0].offset.tran.x;
  _setup.parameters[5402] = _setup.tool_table[0].offset.tran.y;
  _setup.parameters[5403] = _setup.tool_table[0].offset.tran.z;
  _setup.parameters[5404] = _setup.tool_table[0].offset.a;
  _setup.parameters[5405] = _setup.tool_table[0].offset.b;
  _setup.parameters[5406] = _setup.tool_table[0].offset.c;
  _setup.parameters[5407] = _setup.tool_table[0].offset.u;
  _setup.parameters[5408] = _setup.tool_table[0].offset.v;
  _setup.parameters[5409] = _setup.tool_table[0].offset.w;
  _setup.parameters[5410] = _setup.tool_table[0].diameter;
  _setup.parameters[5411] = _setup.tool_table[0].frontangle;
  _setup.parameters[5412] = _setup.tool_table[0].backangle;
  _setup.parameters[5413] = _setup.tool_table[0].orientation;

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xfb6f(%rip), %rax      # 0x43f60
cmpl $0x0, 0xc6ac(%rax)
sete %dl
movl 0xd6c8(%rax), %ecx
testl %ecx, %ecx
setle %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x34451
xorpd %xmm0, %xmm0
movupd %xmm0, 0xc0e0(%rax)
movupd %xmm0, 0xc0d0(%rax)
movupd %xmm0, 0xc0c0(%rax)
movupd %xmm0, 0xc0b0(%rax)
movupd %xmm0, 0xc0a0(%rax)
movupd %xmm0, 0xc090(%rax)
movupd %xmm0, 0xc080(%rax)
jmp 0x344d6
cvtsi2sd %ecx, %xmm0
movsd %xmm0, 0xc080(%rax)
movsd 0xd6d0(%rax), %xmm0
movsd %xmm0, 0xc088(%rax)
movups 0xd6d8(%rax), %xmm0
movups %xmm0, 0xc090(%rax)
movups 0xd6e8(%rax), %xmm0
movups %xmm0, 0xc0a0(%rax)
movups 0xd6f8(%rax), %xmm0
movups %xmm0, 0xc0b0(%rax)
movups 0xd708(%rax), %xmm0
movups %xmm0, 0xc0c0(%rax)
movups 0xd718(%rax), %xmm0
movups %xmm0, 0xc0d0(%rax)
movsd 0xd728(%rax), %xmm0
movsd %xmm0, 0xc0e0(%rax)
xorps %xmm0, %xmm0
cvtsi2sdl 0xd730(%rax), %xmm0
movsd %xmm0, 0xc0e8(%rax)
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/rs274ngc_pre.cc
// Function: Interp::line_text(char*, int)
void Interp::line_text(char *line_text,        //!< string: to copy line into           
                        int max_size)   //!< maximum number of characters to copy
{
  int n;
  char *the_text;

  the_text = _setup.linetext;
  for (n = 0; n < (max_size - 1); n++) {
    if (the_text[n] != 0)
      line_text[n] = the_text[n];
    else
      break;
  }
  line_text[n] = 0;
}

// Assembly:
cmpl $0x2, %edx
jl 0x34895
pushq %rbp
movq %rsp, %rbp
decl %edx
movl %edx, %ecx
xorl %eax, %eax
movq 0xf6e6(%rip), %rdi      # 0x43f60
movb 0x1698(%rdi,%rax), %r8b
testb %r8b, %r8b
je 0x34899
movb %r8b, (%rsi,%rax)
incq %rax
cmpq %rax, %rcx
jne 0x3487a
jmp 0x3489b
xorl %eax, %eax
jmp 0x3489e
movl %eax, %edx
movl %edx, %eax
popq %rbp
movb $0x0, (%rsi,%rax)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/rs274ngc_pre.cc
// Function: Interp::stack_name(int, char*, int)
void Interp::stack_name(int stack_index,       //!< index into stack of function names  
                         char *function_name,   //!< string: to copy function name into
                         int max_size)  //!< maximum number of characters to copy
{
  int n;
  char *the_name;

  if ((stack_index > -1) && (stack_index < STACK_LEN)) {
    the_name = _setup.stack[stack_index];
    for (n = 0; n < (max_size - 1); n++) {
      if (the_name[n] != 0)
        function_name[n] = the_name[n];
      else
        break;
    }
    function_name[n] = 0;
  } else
    function_name[0] = 0;
}

// Assembly:
cmpl $0x31, %esi
ja 0x34905
cmpl $0x2, %ecx
jl 0x348fa
movl %esi, %esi
decl %ecx
movl %ecx, %eax
leaq (%rsi,%rsi,4), %rsi
shlq $0x4, %rsi
movq 0xf689(%rip), %rdi      # 0x43f60
addq %rsi, %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
xorl %esi, %esi
movb (%rdi,%rsi), %r8b
testb %r8b, %r8b
je 0x348fe
movb %r8b, (%rdx,%rsi)
incq %rsi
cmpq %rsi, %rax
jne 0x348e3
jmp 0x34900
xorl %eax, %eax
jmp 0x34902
movl %esi, %ecx
movl %ecx, %eax
addq %rax, %rdx
pushq %rbp
movq %rsp, %rbp
movb $0x0, (%rdx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/rs274ngc_pre.cc
// Function: Interp::ini_load(char const*)
int Interp::ini_load(const char *filename)
{
    IniFile inifile;
    const char *inistring;

    // open it
    if (inifile.Open(filename) == false) {
        logDebug("Unable to open inifile:%s:", filename);
	return -1;
    }

    logDebug("Opened inifile:%s:", filename);


    if (NULL != (inistring = inifile.Find("PARAMETER_FILE", "RS274NGC"))) {
	// found it
	strncpy(_parameter_file_name, inistring, LINELEN);
        logDebug("found PARAMETER_FILE:%s:", _parameter_file_name);
    } else {
	// not found, leave RS274NGC_PARAMETER_FILE alone
        logDebug("did not find PARAMETER_FILE");
    }

    // close it
    inifile.Close();

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq -0x90(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xb380
movq %r14, %rdi
movq %r15, %rsi
callq 0xa650
movq 0xf615(%rip), %r12      # 0x43f60
movl 0x1b6b4(%r12), %ecx
testb %al, %al
je 0x349fe
testl %ecx, %ecx
jle 0x3498a
callq 0xaf80
movq %r15, (%rsp)
leaq 0x968d(%rip), %rsi      # 0x3dffc
leaq 0x910c(%rip), %r8       # 0x3da82
movq %rbx, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x5cf, %r9d            # imm = 0x5CF
xorl %eax, %eax
callq 0xb470
leaq 0x9691(%rip), %rsi      # 0x3e022
leaq 0x933a(%rip), %rdx      # 0x3dcd2
leaq -0x90(%rbp), %rdi
movl $0x1, %ecx
callq 0xa630
testq %rax, %rax
je 0x34a35
movq 0xf5df(%rip), %r14      # 0x43f98
movl $0xff, %edx
movq %r14, %rdi
movq %rax, %rsi
callq 0xa530
cmpl $0x0, 0x1b6b4(%r12)
jle 0x34a67
callq 0xaf80
movq %r14, (%rsp)
leaq 0x9649(%rip), %rsi      # 0x3e031
leaq 0x9093(%rip), %r8       # 0x3da82
movq %rbx, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x5d5, %r9d            # imm = 0x5D5
jmp 0x34a60
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testl %ecx, %ecx
jle 0x34a76
callq 0xaf80
movq %r15, (%rsp)
leaq 0x9201(%rip), %rsi      # 0x3dc19
leaq 0x9063(%rip), %r8       # 0x3da82
movq %rbx, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x5cb, %r9d            # imm = 0x5CB
xorl %eax, %eax
callq 0xb470
jmp 0x34a76
cmpl $0x0, 0x1b6b4(%r12)
jle 0x34a67
callq 0xaf80
leaq 0x9611(%rip), %rsi      # 0x3e05d
leaq 0x902f(%rip), %r8       # 0x3da82
movq %rbx, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x5d8, %r9d            # imm = 0x5D8
xorl %eax, %eax
callq 0xb470
xorl %r14d, %r14d
leaq -0x90(%rbp), %rdi
callq 0xa4b0
leaq -0x90(%rbp), %rdi
callq 0xa4b0
movl %r14d, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x34aae
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0xa4b0
movq %rbx, %rdi
callq 0xb3b0
movq %rax, %rdi
callq 0x34af9
// File: /workspace/github_cpp_makefile_star2_O1/WbtLm[P]mempool/./mempool.cpp
// Function: mpnsp::memPool::allocMemFromPool() (.cold.1)
int mpnsp::memPool::clean(long long size/*=-1*/)
{
    // cout<<"--------------AutoCleanSize="<<AutoCleanSize<<endl;
    if(size<0)
    {
        size=AutoCleanSize;
    }
    if(size>=maxNumInNode)
    {
        return -1;  //把最大的都删了就不合适了
    }
    int cnt=0;
    for(int i=1;i<=MaxNodeNum;i++)
    {
        if(nodeArr[i] && nodeArr[i]->size<=AutoCleanSize && !nodeArr[i]->deleted)
        {
            nodeArr[i]->deleted=1;
            cnt++;
        }
    }
    nodeNum-=cnt;
    deletedNum+=cnt;
    return cnt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movl 0x2c(%rax), %eax
cmpl $0x7f, %eax
jg 0x1234
movslq %eax, %rcx
movq (%rdi,%rcx,8), %rcx
testq %rcx, %rcx
je 0x1230
cmpb $0x1, 0x10(%rcx)
je 0x1224
movl 0x18(%rcx), %r8d
cmpl 0x14(%rcx), %r8d
jb 0x123c
movl 0x2c(%rcx), %eax
cmpl $0x80, %eax
jl 0x1208
jmp 0x1234
incl %eax
jmp 0x1227
orq $-0x1, (%rsi)
movb $0x1, %al
popq %rbp
retq
movl 0x28(%rcx), %edi
movq 0x8(%rcx), %r9
addq %rdi, %r9
movq %r9, (%rdx)
incl %r8d
movl %r8d, 0x18(%rcx)
movq 0x20(%rcx), %rdx
movl (%rdx,%rdi,4), %edx
movl %edx, 0x28(%rcx)
shll $0x15, %eax
cltq
orq %rdx, %rax
movq %rax, (%rsi)
xorl %eax, %eax
jmp 0x123a
// File: /workspace/github_cpp_makefile_star2_O1/WbtLm[P]mempool/./mempool.h
// Function: myErrorOperate(char const*, int, int)
int myErrorOperate(char const * const error_str,int error_line,int error_exit=1)
{
    #include<stdio.h>
    printf("%d\n",error_line);
    if(error_exit==1)
        exit(1);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edx, %ebx
leaq 0x1bc9(%rip), %rdi      # 0x3004
xorl %eax, %eax
callq 0x1040
cmpl $0x1, %ebx
je 0x1450
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x1, %edi
callq 0x1130
// File: /workspace/github_cpp_makefile_star2_O1/WbtLm[P]mempool/./mempool.cpp
// Function: mpnsp::memPool::freeMemNode(int)
void mpnsp::memPool::freeMemNode(int idx) //删除被标记为deleted的node
{
    if(__builtin_expect(MaxNodeNum<idx,0))
    {
        myErrorOperate("fatal error ! freeMemNode.nodeNumidx.",__LINE__,1);
        return;
    }
    if(__builtin_expect(!nodeArr[idx],0))
    {
        myErrorOperate("freeMemNode.node is already NULL.",__LINE__,0);
        return;
    }
    if(!__builtin_expect(nodeArr[idx]->deleted,1))
    {
        myErrorOperate("freeMemNode.deleted must be true.",__LINE__,0);
        return;
    }
    int fptr=nodeArr[idx]->fptr;
    int nptr=nodeArr[idx]->nptr;
    nodeArr[fptr]->nptr=nptr;
    if(nptr<=MaxNodeNum)
    {
        nodeArr[nptr]->fptr=fptr;
    }
    free(nodeArr[idx]->memory);
    free(nodeArr[idx]->ptrArr);
    free(nodeArr[idx]);
    nodeArr[idx]=NULL;
    deletedNum--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpl $0x80, %esi
jge 0x1534
movq %rdi, %rbx
movq 0x20(%rdi), %rcx
movslq %esi, %r14
movq (%rcx,%r14,8), %rax
testq %rax, %rax
je 0x1539
cmpb $0x0, 0x10(%rax)
je 0x1547
movslq 0x30(%rax), %rdx
movslq 0x2c(%rax), %rsi
movq (%rcx,%rdx,8), %rdi
movl %esi, 0x2c(%rdi)
cmpq $0x7f, %rsi
jg 0x14fa
movq (%rcx,%rsi,8), %rcx
movl %edx, 0x30(%rcx)
movq (%rax), %rdi
callq 0x1120
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rax
movq 0x20(%rax), %rdi
callq 0x1120
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1120
movq 0x20(%rbx), %rax
movq $0x0, (%rax,%r14,8)
decl 0x14(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
callq 0x11c0
leaq 0x1ac4(%rip), %rdi      # 0x3004
movl $0x23, %esi
jmp 0x1553
leaq 0x1ab6(%rip), %rdi      # 0x3004
movl $0x28, %esi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x1040
// File: /workspace/github_cpp_makefile_star2_O1/WbtLm[P]mempool/./mempool.cpp
// Function: mpnsp::memPool::createNewNode(unsigned int)
int mpnsp::memPool::createNewNode(uint num)//返回值是新开辟的位置
{
    if(__builtin_expect(nodeNum+deletedNum>=MaxNodeNum,0))
    {
        myErrorOperate("memPool.nodes are too many.",__LINE__,0);
        return -1;
    }
    if(num<=1)
    {
        myErrorOperate("createNewNode.num must >1",__LINE__,1);
    }
    int i;
    for(i=0;i<MaxNodeNum && nodeArr[i]!=NULL;i++);//ok 寻找一个空节点
    memNode *node=(memNode*)malloc(sizeof(memNode));
    if(__builtin_expect(node==NULL,0))
        return -1;
    nodeArr[i]=node;
    node->used=0;
    node->deleted=0;
    node->memory=(char*)malloc(unitSize*(num+1));
    if(__builtin_expect(node->memory==NULL,0))
        return -1;
    MaxAllocNum=std::max(num,MaxAllocNum);
    node->head=node->memory+unitSize-((long long)node->memory%unitSize);//内存对齐
    node->size=num;
    node->ptrArr=(uint*)malloc(num*sizeof(uint*));
    if(__builtin_expect(node->ptrArr==NULL,0))
        return -1;
    node->fptr=i-1;
    node->nptr=nodeArr[i-1]->nptr;
    nodeArr[i-1]->nptr=i;
    if(node->nptr < MaxNodeNum)
    {
        nodeArr[node->nptr]->fptr=i;
    }

    for(int j=1;j<=num;j++)//ok
    {
        node->ptrArr[j-1]=j;
    }
    node->top=0;
    nodeNum++;
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x14(%rdi), %eax
addl 0x10(%rdi), %eax
cmpl $0x7f, %eax
jae 0x169c
movl %esi, %r14d
cmpl $0x2, %esi
jb 0x16b6
movq %rdi, %rbx
movq 0x20(%rdi), %rax
xorl %r13d, %r13d
cmpq $0x0, (%rax,%r13,8)
je 0x15a7
incq %r13
cmpq $0x7f, %r13
jne 0x1591
movl $0x7f, %r13d
movl $0x38, %edi
callq 0x1140
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x168b
movq %rax, %r15
movq 0x20(%rbx), %rax
movl %r13d, %ecx
movq %r15, (%rax,%rcx,8)
movl $0x0, 0x18(%r15)
movb $0x0, 0x10(%r15)
movslq (%rbx), %r12
leal 0x1(%r14), %edi
imull %r12d, %edi
callq 0x1140
movq %rax, (%r15)
testq %rax, %rax
je 0x16af
movl 0x18(%rbx), %ecx
cmpl %r14d, %ecx
cmovbel %r14d, %ecx
movl %ecx, 0x18(%rbx)
movq %rax, %rcx
addq %r12, %rcx
cqto
idivq %r12
subq %rdx, %rcx
movq %rcx, 0x8(%r15)
movl %r14d, 0x14(%r15)
movl %r14d, %edi
shlq $0x3, %rdi
callq 0x1140
movq %rax, 0x20(%r15)
testq %rax, %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
je 0x168b
leal -0x1(%r13), %ecx
movl %ecx, 0x30(%r15)
movq 0x20(%rbx), %rcx
movslq %r13d, %rdx
movq -0x8(%rcx,%rdx,8), %rdx
movl 0x2c(%rdx), %esi
movl %esi, 0x2c(%r15)
movl %r13d, 0x2c(%rdx)
movl 0x2c(%r15), %edx
cmpq $0x7e, %rdx
ja 0x1664
movq (%rcx,%rdx,8), %rcx
movl %r13d, 0x30(%rcx)
cmpl $0x1, %r14d
adcl $0x1, %r14d
movl $0x1, %ecx
movl %ecx, -0x4(%rax,%rcx,4)
incq %rcx
cmpq %rcx, %r14
jne 0x1671
movl $0x0, 0x28(%r15)
incl 0x10(%rbx)
movl %r13d, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1961(%rip), %rdi      # 0x3004
movl $0x3c, %esi
xorl %eax, %eax
callq 0x1040
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jmp 0x168b
leaq 0x1947(%rip), %rdi      # 0x3004
movl $0x41, %esi
xorl %eax, %eax
callq 0x1040
movl $0x1, %edi
callq 0x1130
nop
// File: /workspace/github_cpp_makefile_star2_O1/WbtLm[P]mempool/./mempool.cpp
// Function: mpnsp::memPool::~memPool()
mpnsp::memPool::~memPool()
{
    for(int i=0;i<MaxNodeNum;i++)
    {
        if(nodeArr[i])
        {
            free(nodeArr[i]->memory);
            free(nodeArr[i]->ptrArr);
            free(nodeArr[i]);
        }
    }
    free(nodeArr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rax
testq %rax, %rax
je 0x1714
movq (%rax), %rdi
callq 0x1120
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rax
movq 0x20(%rax), %rdi
callq 0x1120
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1120
incq %r14
cmpq $0x7f, %r14
jne 0x16e1
movq 0x20(%rbx), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1120
// File: /workspace/github_cpp_makefile_star2_O1/WbtLm[P]mempool/./mempool.cpp
// Function: mpnsp::memPool::memPoolInit()
void mpnsp::memPool::memPoolInit()
{
    int s=sizeof(memNode*)*(MaxNodeNum+1);
    nodeArr=(memNode**)malloc(s);
    if(__builtin_expect(nodeArr==NULL,0))
    {
        myErrorOperate("memPool.nodeArr.create fail",__LINE__,0);
        return;
    }
    memset(nodeArr,0,s);
    //初始化头结点
    memNode *node=(memNode*)malloc(sizeof(memNode));
    if(__builtin_expect(node==NULL,0))
    {
        myErrorOperate("memPool.create head node fail",0);
        return;
    }
    nodeArr[0]=node;
    node->used=0;
    node->deleted=0;
    node->memory=NULL;
    node->head=NULL;
    node->size=0;
    node->ptrArr=NULL;
    node->fptr=0;
    node->nptr=MaxNodeNum+1;
    node->top=-1;
        //创建第一个节点

    int ret=createNewNode(maxNumInNode);
    if(ret<0)
    {
        myErrorOperate("memPool.createNewNode.fail",__LINE__,1);
    }
    topPtr=ret<<OffsetBits;//指向新开辟的node
    status=1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x400, %edi            # imm = 0x400
callq 0x1140
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x17b5
movq %rax, %r14
movl $0x400, %edx            # imm = 0x400
movq %rax, %rdi
xorl %esi, %esi
callq 0x1080
movl $0x38, %edi
callq 0x1140
testq %rax, %rax
je 0x17cc
movq %rax, (%r14)
xorl %ecx, %ecx
movq %rcx, 0x14(%rax)
movq %rcx, 0x20(%rax)
movl $0x0, 0x30(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movb $0x0, 0x10(%rax)
movabsq $0x80ffffffff, %rcx     # imm = 0x80FFFFFFFF
movq %rcx, 0x28(%rax)
movl 0x1c(%rbx), %esi
movq %rbx, %rdi
callq 0x155e
testl %eax, %eax
js 0x17d1
shll $0x15, %eax
cltq
movq %rax, 0x8(%rbx)
movb $0x1, 0x28(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1848(%rip), %rdi      # 0x3004
movl $0x77, %esi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x1040
callq 0x11dd
leaq 0x182c(%rip), %rdi      # 0x3004
movl $0x91, %esi
xorl %eax, %eax
callq 0x1040
movl $0x1, %edi
callq 0x1130
// File: /workspace/github_cpp_makefile_star2_O1/WbtLm[P]mempool/./mempool.cpp
// Function: mpnsp::memPool::memPool(int, int)
mpnsp::memPool::memPool(int nodeSize,int initNum/*=InitNumInNode*/)
{
    status=0;
    unitSize=nodeSize;
    topPtr=-1;
    nodeNum=0;
    deletedNum=0;
    maxNumInNode=initNum;
    MaxAllocNum=MaxAllocMem/nodeSize;
    if(MaxAllocMem<16)
    {
        myErrorOperate("memPool.MaxAllocMem is too small.",__LINE__,1); //开发阶段就很容易找到的错误
        return;
    }
    if(maxNumInNode>MaxAllocNum)
    {
        maxNumInNode=MaxAllocNum;
    }
    memPoolInit();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edx, %ecx
xorl %eax, %eax
movq %rax, 0x20(%rdi)
movb $0x0, 0x28(%rdi)
movl %esi, (%rdi)
movq $-0x1, 0x8(%rdi)
movq %rax, 0x10(%rdi)
movl %edx, 0x1c(%rdi)
movl $0x8000000, %eax        # imm = 0x8000000
xorl %edx, %edx
idivl %esi
movl %eax, 0x18(%rdi)
cmpl %ecx, %eax
jae 0x1822
movl %eax, 0x1c(%rdi)
popq %rbp
jmp 0x172a
// File: /workspace/github_cpp_makefile_star2_O1/WbtLm[P]mempool/./mempool.cpp
// Function: mpnsp::memPool::freeMemToPool(void*)
void mpnsp::memPool::freeMemToPool(void *p)
{
    #define free_end(idx) (nodeArr[idx]->head+unitSize*nodeArr[idx]->size)
    #define free_head(idx) (nodeArr[idx]->head)
    int i;
    char *ptr=(char*)p;
    for(i=nodeArr[0]->nptr;i<=MaxNodeNum;)
    {
        if(__builtin_expect(nodeArr[i]==NULL,0))
            i++;
        else if(!(p>=free_head(i) && p<free_end(i)))
        {
            i=nodeArr[i]->nptr;
        }
        else
        {
            memNode *node=nodeArr[i];
            uint idx=(ptr-node->head)/unitSize;
            *alloc_ptr(idx)=node->top;
            node->top=idx;
            topPtr=i<<OffsetBits;
            topPtr|=node->top;
            node->used--;
            #if EnableAutoClean
            if(__builtin_expect(nodeArr[i]->deleted == 0 && nodeArr[i]->size <= AutoCleanSize,0))
            {
                nodeArr[i]->deleted=1;
                nodeNum--;
                deletedNum++;
            }
            #endif
            if(!nodeArr[i]->used && nodeArr[i]->deleted)
            {
                //如果打了deleted标记的node已经没有成员了，就删除
                freeMemNode(i);
            }
            return;
        }
    }
    myErrorOperate("freeMemToPool.mem.Release mem to OS instand of to pool.",__LINE__,0);
    free(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq 0x20(%rdi), %rax
movq (%rax), %rcx
movl 0x2c(%rcx), %r14d
cmpl $0x7f, %r14d
jg 0x1a0c
movq %rdi, %rbx
movslq (%rdi), %rsi
movslq %r14d, %rcx
movq (%rax,%rcx,8), %rcx
testq %rcx, %rcx
je 0x1a07
movq 0x8(%rcx), %rdx
cmpq %r15, %rdx
ja 0x19f8
movl 0x14(%rcx), %edi
imull %esi, %edi
addq %rdx, %rdi
cmpq %r15, %rdi
ja 0x1a2f
movl 0x2c(%rcx), %r14d
cmpl $0x80, %r14d
jl 0x19d5
jmp 0x1a0c
incl %r14d
jmp 0x19fc
leaq 0x15f1(%rip), %rdi      # 0x3004
movl $0x127, %esi            # imm = 0x127
xorl %eax, %eax
callq 0x1040
movq %r15, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1120
subq %rdx, %r15
movq %r15, %rax
cqto
idivq %rsi
movl 0x28(%rcx), %edx
movq 0x20(%rcx), %rsi
movl %eax, %edi
movl %edx, (%rsi,%rdi,4)
movl %eax, 0x28(%rcx)
movl %r14d, %eax
shll $0x15, %eax
cltq
orq %rdi, %rax
movq %rax, 0x8(%rbx)
movl 0x18(%rcx), %r12d
decl %r12d
movl %r12d, 0x18(%rcx)
leaq 0x10(%rcx), %r15
cmpb $0x0, 0x10(%rcx)
jne 0x1a78
movl 0x1c(%rbx), %eax
shrl $0x4, %eax
cmpl %eax, 0x14(%rcx)
jbe 0x1a9f
testl %r12d, %r12d
jne 0x1a96
cmpb $0x1, (%r15)
jne 0x1a96
movq %rbx, %rdi
movl %r14d, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x14b6
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1269
jmp 0x1a78
// File: /workspace/github_cpp_makefile_star2_O1/WbtLm[P]mempool/./mempool.cpp
// Function: mpnsp::do_createMemPool(int, int, std::map<int, mpnsp::memPool*, std::less<int>, std::allocator<std::pair<int const, mpnsp::memPool*>>>&)
int mpnsp::do_createMemPool(int nodeSize,int initNum,std::map<int,memPool*>&memPoolMap)//初始个数
{
 //   cout<<"do_create.初始化内存池:"<<"size="<<nodeSize<<endl;
    if(memPoolMap.count(nodeSize))//不允许重复建立
    {
        myErrorOperate("不允许重复建立",__LINE__,1);
        return 1;
    }
    memPool *pool=new memPool(nodeSize,initNum);
    memPoolMap[nodeSize]=pool;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movl %edi, %r15d
movl %edi, -0x1c(%rbp)
movq 0x10(%rdx), %rdx
leaq 0x8(%rbx), %rax
movq %rax, %rcx
testq %rdx, %rdx
je 0x1aed
movq %rax, %rcx
xorl %esi, %esi
cmpl %r15d, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x1ad5
movq %rax, %rdx
cmpq %rax, %rcx
je 0x1b00
cmpl %r15d, 0x20(%rcx)
cmovgq %rax, %rcx
movq %rcx, %rdx
cmpq %rax, %rdx
je 0x1b22
leaq 0x14f8(%rip), %rdi      # 0x3004
movl $0x152, %esi            # imm = 0x152
xorl %eax, %eax
callq 0x1040
movl $0x1, %edi
callq 0x1130
movl $0x30, %edi
callq 0x10e0
movq %rax, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x17ee
leaq -0x1c(%rbp), %rsi
movq %rbx, %rdi
callq 0x1efe