// File: /workspace/github_c_makefile_star2_O3/heltilda[P]cicada/ciclib.c
// Function: cclib_trap
void cclib_trap()
{
    code_ref argCodeRef;
    ccInt counter, codeNo;
    ccBool ifErrorWasTrapped = ccFalse, holdDoPrintError = doPrintError, doClearError = ccTrue;
    
    
        // run each code in our args constructor
    
    for (counter = 1; counter <= BIF_argsView.windowPtr->variable_ptr->codeList.elementNum; counter++)  {
        
        
            // get a handle on the code
        
        argCodeRef = *(code_ref *) element(&(BIF_argsView.windowPtr->variable_ptr->codeList), counter);
        argCodeRef.anchor = pcSearchPath;
        refCodeRef(&argCodeRef);   // in case bE() changes something
        
        doPrintError = (argCodeRef.code_ptr[0] == code_marker);
        if (doPrintError)  {
            doClearError = (argCodeRef.code_ptr[1] != code_marker);
            if (doClearError)  codeNo = 1;
            else  codeNo = 2;       }
        else  codeNo = 0;
        
        
            // run the code
        
        warningCode = passed;
        beginExecution(&argCodeRef, ccTrue, BIF_argsView.offset, BIF_argsView.width, codeNo);
        derefCodeRef(&argCodeRef);
        if (errCode == return_flag)  errCode = passed;
        
        
            // print errors/warnings if we are instructed to do so
        
        if ((errCode != passed) || (warningCode != passed))  {
            
            if (doPrintError)  {
                
                storedCodeType *errorBaseScript;
                ccInt errIndexToPrint, errCharNum = 0;
                code_ref *errScriptToPrint;
                
                if (errCode != passed)  {  errIndexToPrint = errIndex;  errScriptToPrint = &errScript;  }
                else  {  errIndexToPrint = warningIndex;  errScriptToPrint = &warningScript;  }
                
                errorBaseScript = storedCode(errScriptToPrint->PLL_index);
                if (errorBaseScript->opCharNum != NULL)  errCharNum = errorBaseScript->opCharNum[
                                   errIndexToPrint + (ccInt) (errScriptToPrint->code_ptr - errorBaseScript->bytecode) - 1] - 1;
                
                printError(errorBaseScript->fileName, -1, errorBaseScript->sourceCode, errCharNum, ccFalse);       }
            
            if (errCode != passed)  {  intRegister = errCode;  if (doClearError)  errCode = passed;  }
            else  intRegister = -warningCode;
            if (doClearError)  warningCode = passed;
            
            ifErrorWasTrapped = ccTrue;
            if (intRegister > passed)  break;       // break if it was an error that stops execution
    }   }
    
    
        // clear intRegister if no error and no warning
    
    if (!ifErrorWasTrapped)  intRegister = passed;
    
    doPrintError = holdDoPrintError;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0xd501(%rip), %r12      # 0x25760
movb 0x2a9(%r12), %al
movb %al, 0xb(%rsp)
movq 0x178(%r12), %rax
movq 0x10(%rax), %rdi
cmpl $0x0, 0xd0(%rdi)
jle 0x1845c
addq $0xd0, %rdi
movb $0x1, %r13b
movl $0x1, %r15d
leaq 0x10(%rsp), %rbx
movb $0x1, %r14b
movl %r15d, %esi
callq 0x91d8
movups (%rax), %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x170(%r12), %rax
movq %rax, 0x28(%rsp)
movq %rbx, %rdi
callq 0xf028
movq 0x20(%rsp), %rax
xorl %r8d, %r8d
cmpl $0x4, (%rax)
sete 0x2a9(%r12)
jne 0x182f4
xorl %r13d, %r13d
cmpl $0x4, 0x4(%rax)
setne %r13b
movl $0x2, %r8d
subl %r13d, %r8d
movl $0x0, 0x20(%r12)
movl 0x180(%r12), %edx
movl 0x184(%r12), %ecx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x1029f
movq %rbx, %rdi
callq 0xf00c
movl 0x18(%r12), %ebp
cmpl $0x32, %ebp
jne 0x18337
movl $0x0, 0x18(%r12)
xorl %ebp, %ebp
movl 0x20(%r12), %eax
orl %ebp, %eax
jne 0x1836c
leal 0x1(%r15), %eax
movq 0x178(%r12), %rcx
movq 0x10(%rcx), %rcx
leaq 0xd0(%rcx), %rdi
cmpl 0xd0(%rcx), %r15d
movl %eax, %r15d
jl 0x1829c
jmp 0x18456
cmpb $0x0, 0x2a9(%r12)
je 0x183f3
xorl %eax, %eax
testl %ebp, %ebp
sete %al
movl 0x1c(%r12), %ecx
movl %ecx, 0xc(%rsp)
movl 0x24(%r12), %r14d
shll $0x5, %eax
movl 0x28(%rax,%r12), %esi
leaq 0xd30d(%rip), %rdi      # 0x256a8
callq 0x91d8
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x183d8
leaq 0x38(%r12), %rdx
leaq 0x58(%r12), %rsi
testl %ebp, %ebp
cmovnel 0xc(%rsp), %r14d
cmovneq %rdx, %rsi
movq (%rsi), %rdx
subq 0x10(%rax), %rdx
shrq $0x2, %rdx
addl %r14d, %edx
movslq %edx, %rdx
movl -0x4(%rcx,%rdx,4), %ecx
decl %ecx
jmp 0x183da
xorl %ecx, %ecx
movq (%rax), %rdi
movq 0x8(%rax), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
callq 0x1a237
movl 0x18(%r12), %ebp
testl %ebp, %ebp
je 0x1840c
movl %ebp, 0x6c(%r12)
testb %r13b, %r13b
je 0x18426
movl $0x0, 0x18(%r12)
jmp 0x1841d
xorl %ebp, %ebp
subl 0x20(%r12), %ebp
movl %ebp, 0x6c(%r12)
testb %r13b, %r13b
je 0x18426
movl $0x0, 0x20(%r12)
testl %ebp, %ebp
jg 0x18465
leal 0x1(%r15), %eax
movq 0x178(%r12), %rcx
movq 0x10(%rcx), %rcx
leaq 0xd0(%rcx), %rdi
xorl %r14d, %r14d
cmpl 0xd0(%rcx), %r15d
movl %eax, %r15d
jl 0x1829c
jmp 0x18465
testb $0x1, %r14b
je 0x18465
movl $0x0, 0x6c(%r12)
movb 0xb(%rsp), %al
movb %al, 0x2a9(%r12)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq