// File: /workspace/github_c_makefile_star2_O2/heltilda[P]cicada/bytecd.c
// Function: beginExecution
void beginExecution(code_ref *theCode, ccBool ifStorePC, ccInt newPCOffset, ccInt newPCwidth, ccInt codesToSkip)
{
    code_ref holdPCCodeRef = PCCodeRef;
    searchPath *holdPCpath = pcSearchPath;
    view holdTopView = topView, holdThatView = thatView;
    ccInt *holdPCCodePtr = pcCodePtr, *holdStartCodePtr = startCodePtr, rtrn;
    object_params holdObjectParams = GL_Object;
    linkedlist holdLL;
    step_params holdStepParams = GL_Path;
    void *oldStackTop, *newStackTop;
    
    
        // don't go too many levels deep or we will blow the (real) stack
    
    if (recursionCounter >= glMaxRecursions)  {  
        setError(recursion_depth_err, pcCodePtr);  return;  }
    recursionCounter++;
    
    
        // point to the code we will run
        
    PCCodeRef = *theCode;
    startCodePtr = storedCode(theCode->PLL_index)->bytecode;
    pcCodePtr = PCCodeRef.code_ptr;
    
    
        // store the old state on our makeshift 'program stack'
    
    if (ifStorePC)  {
        rtrn = pushStack(&PCStack, &newStackTop);
        if (rtrn != passed)  {  setError(out_of_memory_err, pcCodePtr);  PCCodeRef = holdPCCodeRef;  return;  }
        *(view *) newStackTop = baseView;
        
        rtrn = pushStack(&PCStack, &newStackTop);
        if (rtrn != passed)    {  setError(out_of_memory_err, pcCodePtr);  PCCodeRef = holdPCCodeRef;  return;  }
        *(view *) newStackTop = searchView;     }
    
    
        // move our memory location to the code's variable
    
    pcSearchPath = theCode->anchor;
    baseView.windowPtr = pcSearchPath->jamb;
    baseView.offset = newPCOffset;
    baseView.width = newPCwidth;
    baseView.multipleIndices = ccFalse;
    topView.windowPtr = NULL;
    
    refCodeRef(&PCCodeRef);
    refPath(pcSearchPath);
    refWindow(baseView.windowPtr);
    
    errCode = passed;
    
    
        // Skip over codes we are not running (i.e. find the Nth 'code' marker), and go.
    
    if (codesToSkip != 0)   {
        runSkipMode(codesToSkip);
        if (*pcCodePtr == code_marker)  {
            pcCodePtr++;
            runBytecode();   }   }
    else  runBytecode();
    
    
        // dereference the old location variables
    
    derefWindow(&(baseView.windowPtr));
    derefPath(&pcSearchPath);
    derefCodeRef(&PCCodeRef);
    
    
        // pull the old location info off the program stack
    
    if (ifStorePC)   {
        popStack(&PCStack, &oldStackTop);
        searchView = *(view *) oldStackTop;
        
        popStack(&PCStack, &oldStackTop);
        baseView = *(view *) oldStackTop;    }
    
    
    
        // restore the old code pointer
    
    pcSearchPath = holdPCpath;
    
    startCodePtr = holdStartCodePtr;
    pcCodePtr = holdPCCodePtr;
    PCCodeRef = holdPCCodeRef;
    GL_Path = holdStepParams;
    thatView = holdThatView;
    topView = holdTopView;
    
    holdLL = GL_Object.arrayDimList;
    GL_Object = holdObjectParams;
    GL_Object.arrayDimList = holdLL;
    
    recursionCounter--;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movl %ecx, %r15d
movl %esi, %ebp
movups 0x152ee(%rip), %xmm0    # 0x24978
movaps %xmm0, 0x20(%rsp)
movups 0x152d2(%rip), %xmm0    # 0x24968
movaps %xmm0, 0x10(%rsp)
movq 0x1522e(%rip), %rbx     # 0x248d0
movq 0x1529f(%rip), %rax     # 0x24948
movq %rax, 0x80(%rsp)
movups 0x15280(%rip), %xmm0    # 0x24938
movaps %xmm0, 0x70(%rsp)
movq 0x1526c(%rip), %rax     # 0x24930
movq %rax, 0x60(%rsp)
movups 0x15250(%rip), %xmm0    # 0x24920
movaps %xmm0, 0x50(%rsp)
movq 0x1513c(%rip), %rsi     # 0x24818
movq 0x1513d(%rip), %rcx     # 0x24820
movups 0x1516e(%rip), %xmm0    # 0x24858
movaps %xmm0, 0xe0(%rsp)
movups 0x1514f(%rip), %xmm0    # 0x24848
movaps %xmm0, 0xd0(%rsp)
movups 0x15130(%rip), %xmm0    # 0x24838
movaps %xmm0, 0xc0(%rsp)
movups 0x15171(%rip), %xmm0    # 0x24888
movaps %xmm0, 0xb0(%rsp)
movups 0x15152(%rip), %xmm0    # 0x24878
movaps %xmm0, 0xa0(%rsp)
movups 0x15133(%rip), %xmm0    # 0x24868
movaps %xmm0, 0x90(%rsp)
movl 0x1521d(%rip), %eax     # 0x24960
cmpl $0x64, %eax
jl 0xf761
pushq $0x30
popq %rdi
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc7c2
movl %r8d, %r14d
movl %edx, %r12d
movq %rdi, %r13
movq %rcx, 0x40(%rsp)
movq %rsi, 0x48(%rsp)
incl %eax
movl %eax, 0x151e4(%rip)     # 0x24960
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movups %xmm0, 0x151de(%rip)    # 0x24968
movups %xmm1, 0x151e7(%rip)    # 0x24978
movl (%rdi), %esi
leaq 0x14f0e(%rip), %rdi     # 0x246a8
callq 0x9088
movq 0x10(%rax), %rax
movq %rax, 0x15076(%rip)     # 0x24820
movq 0x151c7(%rip), %rax     # 0x24978
movq %rax, 0x15060(%rip)     # 0x24818
testb %bpl, %bpl
je 0xf857
movq %rbx, 0x38(%rsp)
movl $0x90, %ebx
addq 0x117fe(%rip), %rbx     # 0x20fd0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x92a6
testl %eax, %eax
jne 0xf80c
leaq 0x8(%rsp), %rsi
movq (%rsi), %rax
movq 0x150be(%rip), %rcx     # 0x248b0
movq %rcx, 0x10(%rax)
movups 0x150a3(%rip), %xmm0    # 0x248a0
movups %xmm0, (%rax)
movq %rbx, %rdi
callq 0x92a6
testl %eax, %eax
je 0xf838
movq 0x15005(%rip), %rsi     # 0x24818
pushq $0x1
popq %rdi
callq 0xc7c2
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movups %xmm1, 0x1514c(%rip)    # 0x24978
movups %xmm0, 0x15135(%rip)    # 0x24968
jmp 0xfa5d
movq 0x8(%rsp), %rax
movq 0x15084(%rip), %rcx     # 0x248c8
movq %rcx, 0x10(%rax)
movups 0x15069(%rip), %xmm0    # 0x248b8
movups %xmm0, (%rax)
movq 0x38(%rsp), %rbx
movq 0x18(%r13), %rax
movq %rax, 0x1506e(%rip)     # 0x248d0
movq 0x18(%rax), %rax
movq %rax, 0x15033(%rip)     # 0x248a0
movl %r12d, 0x15034(%rip)    # 0x248a8
movl %r15d, 0x15031(%rip)    # 0x248ac
movb $0x0, 0x1502e(%rip)     # 0x248b0
andq $0x0, 0x150ae(%rip)     # 0x24938
leaq 0x150d7(%rip), %rdi     # 0x24968
callq 0xe54f
movq 0x15033(%rip), %rdi     # 0x248d0
callq 0xec75
movq 0x14ff7(%rip), %rdi     # 0x248a0
callq 0xc7e1
andl $0x0, 0x14ec3(%rip)     # 0x24778
testl %r14d, %r14d
je 0xf8d9
movl %r14d, %edi
callq 0x139ae
movq 0x14f4f(%rip), %rax     # 0x24818
cmpl $0x4, (%rax)
jne 0xf8de
addq $0x4, %rax
movq %rax, 0x14f3f(%rip)     # 0x24818
callq 0x14465
leaq 0x14fbb(%rip), %rdi     # 0x248a0
callq 0xc801
leaq 0x14fdf(%rip), %rdi     # 0x248d0
callq 0xebb6
leaq 0x1506b(%rip), %rdi     # 0x24968
callq 0xe533
testb %bpl, %bpl
je 0xf967
movq %rbx, %r15
movl $0x90, %ebx
addq 0x116ba(%rip), %rbx     # 0x20fd0
leaq 0xf8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x92e8
movq (%r14), %rax
movups (%rax), %xmm0
movups %xmm0, 0x14f82(%rip)    # 0x248b8
movq 0x10(%rax), %rax
movq %rax, 0x14f87(%rip)     # 0x248c8
movq %rbx, %rdi
movq %r15, %rbx
movq %r14, %rsi
callq 0x92e8
movq (%r14), %rax
movups (%rax), %xmm0
movups %xmm0, 0x14f44(%rip)    # 0x248a0
movq 0x10(%rax), %rax
movq %rax, 0x14f49(%rip)     # 0x248b0
movq %rbx, 0x14f62(%rip)     # 0x248d0
movq 0x40(%rsp), %rax
movq %rax, 0x14ea6(%rip)     # 0x24820
movq 0x48(%rsp), %rax
movq %rax, 0x14e92(%rip)     # 0x24818
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movups %xmm0, 0x14fd1(%rip)    # 0x24968
movups %xmm1, 0x14fda(%rip)    # 0x24978
movaps 0x90(%rsp), %xmm0
movaps 0xa0(%rsp), %xmm1
movaps 0xb0(%rsp), %xmm2
movups %xmm0, 0x14eab(%rip)    # 0x24868
movups %xmm1, 0x14eb4(%rip)    # 0x24878
movups %xmm2, 0x14ebd(%rip)    # 0x24888
movaps 0x50(%rsp), %xmm0
movups %xmm0, 0x14f49(%rip)    # 0x24920
movq 0x60(%rsp), %rax
movq %rax, 0x14f4d(%rip)     # 0x24930
movq 0x80(%rsp), %rax
movq %rax, 0x14f56(%rip)     # 0x24948
movaps 0x70(%rsp), %xmm0
movups %xmm0, 0x14f3a(%rip)    # 0x24938
movups 0x14e4b(%rip), %xmm0    # 0x24850
movaps %xmm0, 0x110(%rsp)
movups 0x14e2c(%rip), %xmm1    # 0x24840
movaps %xmm1, 0x100(%rsp)
movaps 0xc0(%rsp), %xmm2
movaps 0xd0(%rsp), %xmm3
movaps 0xe0(%rsp), %xmm4
movups %xmm2, 0x14dfd(%rip)    # 0x24838
movups %xmm3, 0x14e06(%rip)    # 0x24848
movups %xmm4, 0x14e0f(%rip)    # 0x24858
movups %xmm1, 0x14df0(%rip)    # 0x24840
movups %xmm0, 0x14df9(%rip)    # 0x24850
decl 0x14f03(%rip)           # 0x24960
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq