// File: /workspace/github_c_makefile_star2_O3/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 %edx, %r12d
movl %esi, %ebp
movups 0x156b9(%rip), %xmm0    # 0x25978
movaps %xmm0, 0x20(%rsp)
movups 0x1569d(%rip), %xmm0    # 0x25968
movaps %xmm0, 0x10(%rsp)
movq 0x155f9(%rip), %rcx     # 0x258d0
movq 0x1566a(%rip), %rax     # 0x25948
movq %rax, 0x80(%rsp)
movups 0x1564b(%rip), %xmm0    # 0x25938
movaps %xmm0, 0x70(%rsp)
movq 0x15637(%rip), %rax     # 0x25930
movq %rax, 0x60(%rsp)
movups 0x1561b(%rip), %xmm0    # 0x25920
movaps %xmm0, 0x50(%rsp)
movq 0x15507(%rip), %rsi     # 0x25818
movq 0x15508(%rip), %rdx     # 0x25820
movups 0x15539(%rip), %xmm0    # 0x25858
movaps %xmm0, 0xe0(%rsp)
movups 0x1551a(%rip), %xmm0    # 0x25848
movaps %xmm0, 0xd0(%rsp)
movups 0x154fb(%rip), %xmm0    # 0x25838
movaps %xmm0, 0xc0(%rsp)
movups 0x1553c(%rip), %xmm0    # 0x25888
movaps %xmm0, 0xb0(%rsp)
movups 0x1551d(%rip), %xmm0    # 0x25878
movaps %xmm0, 0xa0(%rsp)
movups 0x154fe(%rip), %xmm0    # 0x25868
movaps %xmm0, 0x90(%rsp)
movl 0x155e8(%rip), %eax     # 0x25960
cmpl $0x64, %eax
jl 0x10398
movl $0x30, %edi
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xcfa3
movl %r8d, %r14d
movq %rdi, %r13
movq %rdx, 0x38(%rsp)
movq %rsi, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
incl %eax
movl %eax, 0x155ab(%rip)     # 0x25960
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movups %xmm0, 0x155a5(%rip)    # 0x25968
movups %xmm1, 0x155ae(%rip)    # 0x25978
movl (%rdi), %esi
leaq 0x152d5(%rip), %rdi     # 0x256a8
callq 0x91d8
movq 0x10(%rax), %rax
movq %rax, 0x1543d(%rip)     # 0x25820
movq 0x1558e(%rip), %rax     # 0x25978
movq %rax, 0x15427(%rip)     # 0x25818
testb %bpl, %bpl
je 0x10488
movl $0x90, %ebx
addq 0x11bca(%rip), %rbx     # 0x21fd0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x9544
testl %eax, %eax
jne 0x10440
leaq 0x8(%rsp), %rsi
movq (%rsi), %rax
movq 0x1548a(%rip), %rcx     # 0x258b0
movq %rcx, 0x10(%rax)
movups 0x1546f(%rip), %xmm0    # 0x258a0
movups %xmm0, (%rax)
movq %rbx, %rdi
callq 0x9544
testl %eax, %eax
je 0x1046e
movq 0x153d1(%rip), %rsi     # 0x25818
movl $0x1, %edi
callq 0xcfa3
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movups %xmm1, 0x15516(%rip)    # 0x25978
movups %xmm0, 0x154ff(%rip)    # 0x25968
jmp 0x106fd
movq 0x8(%rsp), %rax
movq 0x1544e(%rip), %rcx     # 0x258c8
movq %rcx, 0x10(%rax)
movups 0x15433(%rip), %xmm0    # 0x258b8
movups %xmm0, (%rax)
movq 0x18(%r13), %rax
movq %rax, 0x1543d(%rip)     # 0x258d0
movq 0x18(%rax), %rax
movq %rax, 0x15402(%rip)     # 0x258a0
movl %r12d, 0x15403(%rip)    # 0x258a8
movl %r15d, 0x15400(%rip)    # 0x258ac
movb $0x0, 0x153fd(%rip)     # 0x258b0
movq $0x0, 0x1547a(%rip) # 0x25938
leaq 0x154a3(%rip), %rdi     # 0x25968
callq 0xf028
movq 0x153ff(%rip), %rdi     # 0x258d0
callq 0xf809
movq 0x153c3(%rip), %rdi     # 0x258a0
callq 0xcfc2
movl $0x0, 0x1528c(%rip)     # 0x25778
testl %r14d, %r14d
je 0x10542
movl %r14d, %edi
callq 0x15681
movq 0x15318(%rip), %rax     # 0x25818
cmpl $0x4, (%rax)
jne 0x1057f
addq $0x4, %rax
movq %rax, 0x15308(%rip)     # 0x25818
leaq 0x13e79(%rip), %rbx     # 0x24390
movq 0x152fa(%rip), %rax     # 0x25818
movslq (%rax), %rcx
testl $0xfffffffb, %ecx       # imm = 0xFFFFFFFB
je 0x10574
addq $0x4, %rax
movq %rax, 0x152e4(%rip)     # 0x25818
callq *(%rbx,%rcx,8)
cmpl $0x0, 0x1523a(%rip)     # 0x25778
je 0x10517
jmp 0x1057f
leaq 0x13e47(%rip), %rbx     # 0x24390
movq 0x152c8(%rip), %rax     # 0x25818
movslq (%rax), %rcx
testl $0xfffffffb, %ecx       # imm = 0xFFFFFFFB
je 0x10574
addq $0x4, %rax
movq %rax, 0x152b2(%rip)     # 0x25818
callq *(%rbx,%rcx,8)
cmpl $0x0, 0x15208(%rip)     # 0x25778
je 0x10549
jmp 0x1057f
addq $0x4, %rax
movq %rax, 0x15299(%rip)     # 0x25818
leaq 0x1531a(%rip), %rdi     # 0x258a0
callq 0xcfe2
leaq 0x1533e(%rip), %rdi     # 0x258d0
callq 0xf72e
leaq 0x153ca(%rip), %rdi     # 0x25968
callq 0xf00c
testb %bpl, %bpl
je 0x10602
movl $0x90, %ebx
addq 0x11a1c(%rip), %rbx     # 0x21fd0
leaq 0xf8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x95b4
movq (%r14), %rax
movups (%rax), %xmm0
movups %xmm0, 0x152e4(%rip)    # 0x258b8
movq 0x10(%rax), %rax
movq %rax, 0x152e9(%rip)     # 0x258c8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x95b4
movq (%r14), %rax
movups (%rax), %xmm0
movups %xmm0, 0x152a9(%rip)    # 0x258a0
movq 0x10(%rax), %rax
movq %rax, 0x152ae(%rip)     # 0x258b0
movq 0x48(%rsp), %rax
movq %rax, 0x152c2(%rip)     # 0x258d0
movq 0x38(%rsp), %rax
movq %rax, 0x15206(%rip)     # 0x25820
movq 0x40(%rsp), %rax
movq %rax, 0x151f2(%rip)     # 0x25818
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movups %xmm0, 0x15331(%rip)    # 0x25968
movups %xmm1, 0x1533a(%rip)    # 0x25978
movaps 0x90(%rsp), %xmm0
movaps 0xa0(%rsp), %xmm1
movaps 0xb0(%rsp), %xmm2
movups %xmm0, 0x1520b(%rip)    # 0x25868
movups %xmm1, 0x15214(%rip)    # 0x25878
movups %xmm2, 0x1521d(%rip)    # 0x25888
movaps 0x50(%rsp), %xmm0
movups %xmm0, 0x152a9(%rip)    # 0x25920
movq 0x60(%rsp), %rax
movq %rax, 0x152ad(%rip)     # 0x25930
movq 0x80(%rsp), %rax
movq %rax, 0x152b6(%rip)     # 0x25948
movaps 0x70(%rsp), %xmm0
movups %xmm0, 0x1529a(%rip)    # 0x25938
movups 0x151ab(%rip), %xmm0    # 0x25850
movaps %xmm0, 0x110(%rsp)
movups 0x1518c(%rip), %xmm1    # 0x25840
movaps %xmm1, 0x100(%rsp)
movaps 0xc0(%rsp), %xmm2
movaps 0xd0(%rsp), %xmm3
movaps 0xe0(%rsp), %xmm4
movups %xmm2, 0x1515d(%rip)    # 0x25838
movups %xmm3, 0x15166(%rip)    # 0x25848
movups %xmm4, 0x1516f(%rip)    # 0x25858
movups %xmm1, 0x15150(%rip)    # 0x25840
movups %xmm0, 0x15159(%rip)    # 0x25850
decl 0x15263(%rip)           # 0x25960
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq