// File: /workspace/github_c_makefile_star2_O1/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 0x15456(%rip), %xmm0    # 0x25978
movaps %xmm0, 0x20(%rsp)
movups 0x1543a(%rip), %xmm0    # 0x25968
movaps %xmm0, 0x10(%rsp)
movq 0x15396(%rip), %rcx     # 0x258d0
movq 0x15407(%rip), %rax     # 0x25948
movq %rax, 0x80(%rsp)
movups 0x153e8(%rip), %xmm0    # 0x25938
movaps %xmm0, 0x70(%rsp)
movq 0x153d4(%rip), %rax     # 0x25930
movq %rax, 0x60(%rsp)
movups 0x153b8(%rip), %xmm0    # 0x25920
movaps %xmm0, 0x50(%rsp)
movq 0x152a4(%rip), %rsi     # 0x25818
movq 0x152a5(%rip), %rdx     # 0x25820
movups 0x152d6(%rip), %xmm0    # 0x25858
movaps %xmm0, 0xe0(%rsp)
movups 0x152b7(%rip), %xmm0    # 0x25848
movaps %xmm0, 0xd0(%rsp)
movups 0x15298(%rip), %xmm0    # 0x25838
movaps %xmm0, 0xc0(%rsp)
movups 0x152d9(%rip), %xmm0    # 0x25888
movaps %xmm0, 0xb0(%rsp)
movups 0x152ba(%rip), %xmm0    # 0x25878
movaps %xmm0, 0xa0(%rsp)
movups 0x1529b(%rip), %xmm0    # 0x25868
movaps %xmm0, 0x90(%rsp)
movl 0x15385(%rip), %eax     # 0x25960
cmpl $0x64, %eax
jl 0x105fb
movl $0x30, %edi
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd1a9
movl %r8d, %r14d
movq %rdi, %r13
movq %rdx, 0x38(%rsp)
movq %rsi, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
incl %eax
movl %eax, 0x15348(%rip)     # 0x25960
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movups %xmm0, 0x15342(%rip)    # 0x25968
movups %xmm1, 0x1534b(%rip)    # 0x25978
movl (%rdi), %esi
leaq 0x15072(%rip), %rdi     # 0x256a8
callq 0x911c
movq 0x10(%rax), %rax
movq %rax, 0x151da(%rip)     # 0x25820
movq 0x1532b(%rip), %rax     # 0x25978
movq %rax, 0x151c4(%rip)     # 0x25818
testb %bpl, %bpl
je 0x106eb
movl $0x90, %ebx
addq 0x1196f(%rip), %rbx     # 0x21fd8
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x949a
testl %eax, %eax
jne 0x106a3
leaq 0x8(%rsp), %rsi
movq (%rsi), %rax
movq 0x15227(%rip), %rcx     # 0x258b0
movq %rcx, 0x10(%rax)
movups 0x1520c(%rip), %xmm0    # 0x258a0
movups %xmm0, (%rax)
movq %rbx, %rdi
callq 0x949a
testl %eax, %eax
je 0x106d1
movq 0x1516e(%rip), %rsi     # 0x25818
movl $0x1, %edi
callq 0xd1a9
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movups %xmm1, 0x152b3(%rip)    # 0x25978
movups %xmm0, 0x1529c(%rip)    # 0x25968
jmp 0x10960
movq 0x8(%rsp), %rax
movq 0x151eb(%rip), %rcx     # 0x258c8
movq %rcx, 0x10(%rax)
movups 0x151d0(%rip), %xmm0    # 0x258b8
movups %xmm0, (%rax)
movq 0x18(%r13), %rax
movq %rax, 0x151da(%rip)     # 0x258d0
movq 0x18(%rax), %rax
movq %rax, 0x1519f(%rip)     # 0x258a0
movl %r12d, 0x151a0(%rip)    # 0x258a8
movl %r15d, 0x1519d(%rip)    # 0x258ac
movb $0x0, 0x1519a(%rip)     # 0x258b0
movq $0x0, 0x15217(%rip) # 0x25938
leaq 0x15240(%rip), %rdi     # 0x25968
callq 0xf268
movq 0x1519c(%rip), %rdi     # 0x258d0
callq 0xfa4d
movq 0x15160(%rip), %rdi     # 0x258a0
callq 0xd1c8
movl $0x0, 0x15029(%rip)     # 0x25778
testl %r14d, %r14d
je 0x107a5
movl %r14d, %edi
callq 0x1569b
movq 0x150b5(%rip), %rax     # 0x25818
cmpl $0x4, (%rax)
jne 0x107e2
addq $0x4, %rax
movq %rax, 0x150a5(%rip)     # 0x25818
leaq 0x13c16(%rip), %rbx     # 0x24390
movq 0x15097(%rip), %rax     # 0x25818
movslq (%rax), %rcx
testl $0xfffffffb, %ecx       # imm = 0xFFFFFFFB
je 0x107d7
addq $0x4, %rax
movq %rax, 0x15081(%rip)     # 0x25818
callq *(%rbx,%rcx,8)
cmpl $0x0, 0x14fd7(%rip)     # 0x25778
je 0x1077a
jmp 0x107e2
leaq 0x13be4(%rip), %rbx     # 0x24390
movq 0x15065(%rip), %rax     # 0x25818
movslq (%rax), %rcx
testl $0xfffffffb, %ecx       # imm = 0xFFFFFFFB
je 0x107d7
addq $0x4, %rax
movq %rax, 0x1504f(%rip)     # 0x25818
callq *(%rbx,%rcx,8)
cmpl $0x0, 0x14fa5(%rip)     # 0x25778
je 0x107ac
jmp 0x107e2
addq $0x4, %rax
movq %rax, 0x15036(%rip)     # 0x25818
leaq 0x150b7(%rip), %rdi     # 0x258a0
callq 0xd1e8
leaq 0x150db(%rip), %rdi     # 0x258d0
callq 0xf972
leaq 0x15167(%rip), %rdi     # 0x25968
callq 0xf24c
testb %bpl, %bpl
je 0x10865
movl $0x90, %ebx
addq 0x117c1(%rip), %rbx     # 0x21fd8
leaq 0xf8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x950a
movq (%r14), %rax
movups (%rax), %xmm0
movups %xmm0, 0x15081(%rip)    # 0x258b8
movq 0x10(%rax), %rax
movq %rax, 0x15086(%rip)     # 0x258c8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x950a
movq (%r14), %rax
movups (%rax), %xmm0
movups %xmm0, 0x15046(%rip)    # 0x258a0
movq 0x10(%rax), %rax
movq %rax, 0x1504b(%rip)     # 0x258b0
movq 0x48(%rsp), %rax
movq %rax, 0x1505f(%rip)     # 0x258d0
movq 0x38(%rsp), %rax
movq %rax, 0x14fa3(%rip)     # 0x25820
movq 0x40(%rsp), %rax
movq %rax, 0x14f8f(%rip)     # 0x25818
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movups %xmm0, 0x150ce(%rip)    # 0x25968
movups %xmm1, 0x150d7(%rip)    # 0x25978
movaps 0x90(%rsp), %xmm0
movaps 0xa0(%rsp), %xmm1
movaps 0xb0(%rsp), %xmm2
movups %xmm0, 0x14fa8(%rip)    # 0x25868
movups %xmm1, 0x14fb1(%rip)    # 0x25878
movups %xmm2, 0x14fba(%rip)    # 0x25888
movaps 0x50(%rsp), %xmm0
movups %xmm0, 0x15046(%rip)    # 0x25920
movq 0x60(%rsp), %rax
movq %rax, 0x1504a(%rip)     # 0x25930
movq 0x80(%rsp), %rax
movq %rax, 0x15053(%rip)     # 0x25948
movaps 0x70(%rsp), %xmm0
movups %xmm0, 0x15037(%rip)    # 0x25938
movups 0x14f48(%rip), %xmm0    # 0x25850
movaps %xmm0, 0x110(%rsp)
movups 0x14f29(%rip), %xmm1    # 0x25840
movaps %xmm1, 0x100(%rsp)
movaps 0xc0(%rsp), %xmm2
movaps 0xd0(%rsp), %xmm3
movaps 0xe0(%rsp), %xmm4
movups %xmm2, 0x14efa(%rip)    # 0x25838
movups %xmm3, 0x14f03(%rip)    # 0x25848
movups %xmm4, 0x14f0c(%rip)    # 0x25858
movups %xmm1, 0x14eed(%rip)    # 0x25840
movups %xmm0, 0x14ef6(%rip)    # 0x25850
decl 0x15000(%rip)           # 0x25960
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq