// File: /workspace/github_c_makefile_star2_O0/heltilda[P]cicada/bytecd.c
// Function: sub_code
void _sub_code()
{
    searchPath **loopPath, *oldPath, *stemPath;
    ccInt counter, holdCodeNumber, numIndices, rtrn;
    linkedlist tempCodeRegister;
    
    
        // get the right-hand argument:  containing the code to substitute
    
    callCodeFunction();
    if (errCode != passed)  return;
    
    getCurrentCodeList(&tempCodeRegister);
    if (errCode != passed)  return;
    
    holdCodeNumber = codeNumber;
    
    
        // get the left-hand argument:  the variable to substitute into
    
    callBytecodeFunction();
    if (GL_Object.type != var_type)  setError(not_a_variable_err, pcCodePtr-1);
    else if (searchView.windowPtr == NULL)  setError(void_member_err, pcCodePtr-1);
    else if (searchView.windowPtr->variable_ptr->type < composite_type)  setError(not_a_function_err, pcCodePtr-1);
    
    
        // copy our code list into the official code register
    
    derefCodeList(&codeRegister);
    rtrn = resizeLinkedList(&codeRegister, tempCodeRegister.elementNum, ccFalse);
    if (rtrn != passed)  {  setError(rtrn, pcCodePtr-1);  return;  }
    copyElements(&tempCodeRegister, 1, &codeRegister, 1, tempCodeRegister.elementNum);
    
    if (errCode != passed)  return;
    
    
        // 'fix' the anchoring paths of each code in the codeRegister:  have their stems drawn
        // from the original stem of the anchors from the function that donated the code
    
    for (counter = 1; counter <= codeRegister.elementNum; counter++)  {
        
        loopPath = &(((code_ref *) element(&codeRegister, counter))->anchor);
        oldPath = *loopPath;
        
        if (oldPath == NULL)  stemPath = PCCodeRef.anchor;
        else  stemPath = oldPath->stem;
        
        numIndices = 1;
        if (stemPath != NULL)  {
            if (searchView.windowPtr->width % stemPath->jamb->width != 0)
                {  setError(mismatched_indices_err, pcCodePtr-1);  return;  }
            numIndices = searchView.windowPtr->width / stemPath->jamb->width;       }
        
        rtrn = drawPath(loopPath, searchView.windowPtr, stemPath, numIndices, PCCodeRef.PLL_index);  // in case GL_P.sM == NULL 
        if (rtrn != passed)  {  setError(rtrn, pcCodePtr-1);  return;  }
        
        refPath(*loopPath);
        derefPath(&oldPath);         }
    
    GL_Object.codeList = &codeRegister;
    codeNumber = holdCodeNumber;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
callq 0x14300
cmpl $0x0, 0x12d74(%rip)     # 0x2c768
je 0x199fb
jmp 0x19c41
leaq -0x48(%rbp), %rdi
callq 0x19c50
cmpl $0x0, 0x12d5d(%rip)     # 0x2c768
je 0x19a12
jmp 0x19c41
movl 0x12f2c(%rip), %eax     # 0x2c944
movl %eax, -0x20(%rbp)
callq 0x146f0
cmpl $-0x1, 0x12e01(%rip)    # 0x2c828
je 0x19a40
movq 0x12dd8(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x22, %edi
callq 0xf740
jmp 0x19a8e
cmpq $0x0, 0x12e60(%rip)     # 0x2c8a8
jne 0x19a61
movq 0x12db7(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x1a, %edi
callq 0xf740
jmp 0x19a8c
movq 0x12e40(%rip), %rax     # 0x2c8a8
movq 0x10(%rax), %rax
cmpl $0x5, 0xc0(%rax)
jge 0x19a8a
movq 0x12d8c(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x23, %edi
callq 0xf740
jmp 0x19a8c
jmp 0x19a8e
leaq 0x12cbb(%rip), %rdi     # 0x2c750
addq $0x98, %rdi
callq 0x19dc0
movl -0x48(%rbp), %esi
leaq 0x12ca5(%rip), %rdi     # 0x2c750
addq $0x98, %rdi
xorl %edx, %edx
callq 0x8ee0
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x19ada
movl -0x28(%rbp), %edi
movq 0x12d3c(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
callq 0xf740
jmp 0x19c41
movl -0x48(%rbp), %r8d
leaq -0x48(%rbp), %rdi
movl $0x1, %ecx
leaq 0x12c62(%rip), %rdx     # 0x2c750
addq $0x98, %rdx
movl %ecx, %esi
callq 0x8a90
cmpl $0x0, 0x12c65(%rip)     # 0x2c768
je 0x19b0a
jmp 0x19c41
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x12cce(%rip), %eax     # 0x2c7e8
jg 0x19c24
movl -0x1c(%rbp), %esi
leaq 0x12c26(%rip), %rdi     # 0x2c750
addq $0x98, %rdi
callq 0x9700
addq $0x18, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x19b5d
movq 0x12e19(%rip), %rax     # 0x2c970
movq %rax, -0x18(%rbp)
jmp 0x19b69
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x1, -0x24(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x19bc5
movq 0x12d2a(%rip), %rax     # 0x2c8a8
movl 0x1c(%rax), %eax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
cltd
idivl 0x1c(%rcx)
cmpl $0x0, %edx
je 0x19bac
movq 0x12c6f(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x4, %edi
callq 0xf740
jmp 0x19c41
movq 0x12cf5(%rip), %rax     # 0x2c8a8
movl 0x1c(%rax), %eax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
cltd
idivl 0x1c(%rcx)
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq 0x12cd8(%rip), %rsi     # 0x2c8a8
movq -0x18(%rbp), %rdx
movl -0x24(%rbp), %ecx
movl 0x12d7a(%rip), %r8d     # 0x2c958
callq 0x137e0
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x19c01
movl -0x28(%rbp), %edi
movq 0x12c12(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
callq 0xf740
jmp 0x19c41
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x13770
leaq -0x10(%rbp), %rdi
callq 0x13630
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x19b11
leaq 0x12b25(%rip), %rax     # 0x2c750
addq $0x98, %rax
movq %rax, 0x12c18(%rip)     # 0x2c850
movl -0x20(%rbp), %eax
movl %eax, 0x12d03(%rip)     # 0x2c944
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)