// File: /workspace/github_c_makefile_star2_O0/heltilda[P]cicada/ciclib.c
// Function: cclib_throw
void cclib_throw()
{
    window *paramWindows[] = { NULL, NULL, NULL, NULL, NULL };
    code_ref *targetCodeRef = &PCCodeRef;
    ccInt numArgs, cA, *holdPC;
    ccInt theArgs[] = { 0, 0, 1, (ccInt) (pcCodePtr-1 - PCCodeRef.code_ptr + 1), ccFalse };
    ccInt argsMin[] = { ccIntMin, 0, 1, 1, 0 };
    ccInt argsMax[] = { ccIntMax, 0, 1, 1, 1 };
    code_ref *errorScript = &errScript;
    
    numArgs = numBIF_args();
    if ((numArgs < 1) || (numArgs > 5))  {  setError(wrong_argument_count_err, pcCodePtr-1);  return;  }
    
    
        // read in the error code, throwing real errors if something's wrong with the argument
    
    for (cA = 0; cA < numArgs; cA++)    {
        paramWindows[cA] = getBIFmember(cA+1);
        if (paramWindows[cA] != NULL)  {
            
            if (cA == 3)  {
                holdPC = pcCodePtr;
                pcCodePtr = targetCodeRef->code_ptr;
                runSkipMode(0);
                argsMax[3] = (ccInt) (pcCodePtr - targetCodeRef->code_ptr);
                pcCodePtr = holdPC;
                if (errCode != passed)  return;     }
            
            if (cA != 1)    {
                if (cA < 4)  theArgs[cA] = (ccInt) getBIFnumArg(cA+1, argsMin[cA], argsMax[cA]);
                else  theArgs[cA] = (ccInt) getBIFboolArg(cA+1);
                if (errCode != passed)  return;     }
            else    {
                argsMax[2] = paramWindows[cA]->variable_ptr->codeList.elementNum;
                theArgs[3] = 1;       }
            
            if (((cA == 1) || (cA == 2)) && (paramWindows[1] != NULL))  {
                targetCodeRef = (code_ref *) element(&(paramWindows[1]->variable_ptr->codeList), theArgs[2]);
    }   }   }
    
    
        // throw the error/warning
    
    if (theArgs[4] == 0)  {
        errCode = theArgs[0];
        errIndex = theArgs[3];
        errorScript = &errScript;       }
    
    else  {
        warningCode = theArgs[0];
        warningIndex = theArgs[3];
        errorScript = &warningScript;       }
    
    if (errorScript->code_ptr != NULL)  derefCodeRef(errorScript);
    *errorScript = *targetCodeRef;
    errorScript->anchor = NULL;
    refCodeRef(errorScript);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x80d0
leaq 0xddbe(%rip), %rax      # 0x2c750
addq $0x208, %rax            # imm = 0x208
movq %rax, -0x38(%rbp)
movl $0x0, -0x60(%rbp)
movl $0x0, -0x5c(%rbp)
movl $0x1, -0x58(%rbp)
leaq 0xdd98(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rax
addq $-0x4, %rax
leaq 0xdd86(%rip), %rcx      # 0x2c750
movq 0x218(%rcx), %rcx
subq %rcx, %rax
sarq $0x2, %rax
addq $0x1, %rax
movl %eax, -0x54(%rbp)
movl $0x0, -0x50(%rbp)
movq 0x4323(%rip), %rax      # 0x22d10
movq %rax, -0x80(%rbp)
movq 0x4320(%rip), %rax      # 0x22d18
movq %rax, -0x78(%rbp)
movl 0x431e(%rip), %eax      # 0x22d20
movl %eax, -0x70(%rbp)
movq 0x4324(%rip), %rax      # 0x22d30
movq %rax, -0xa0(%rbp)
movq 0x431e(%rip), %rax      # 0x22d38
movq %rax, -0x98(%rbp)
movl 0x4319(%rip), %eax      # 0x22d40
movl %eax, -0x90(%rbp)
leaq 0xdd1c(%rip), %rax      # 0x2c750
addq $0x28, %rax
movq %rax, -0xa8(%rbp)
callq 0x1fa40
movl %eax, -0x3c(%rbp)
cmpl $0x1, -0x3c(%rbp)
jl 0x1ea53
cmpl $0x5, -0x3c(%rbp)
jle 0x1ea74
leaq 0xdcf6(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x2d, %edi
callq 0xf740
jmp 0x1ecb0
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x1ebf2
movl -0x40(%rbp), %edi
addl $0x1, %edi
callq 0x1fab0
movq %rax, %rcx
movslq -0x40(%rbp), %rax
movq %rcx, -0x30(%rbp,%rax,8)
movslq -0x40(%rbp), %rax
cmpq $0x0, -0x30(%rbp,%rax,8)
je 0x1ebe2
cmpl $0x3, -0x40(%rbp)
jne 0x1eb2c
leaq 0xdc95(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rcx
leaq 0xdc7b(%rip), %rax      # 0x2c750
movq %rcx, 0xb8(%rax)
xorl %edi, %edi
callq 0x1a6b0
leaq 0xdc66(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rax
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq %rcx, %rax
sarq $0x2, %rax
movl %eax, -0x94(%rbp)
movq -0x48(%rbp), %rcx
leaq 0xdc3f(%rip), %rax      # 0x2c750
movq %rcx, 0xb8(%rax)
leaq 0xdc31(%rip), %rax      # 0x2c750
cmpl $0x0, 0x18(%rax)
je 0x1eb2a
jmp 0x1ecb0
jmp 0x1eb2c
cmpl $0x1, -0x40(%rbp)
je 0x1eb92
cmpl $0x4, -0x40(%rbp)
jge 0x1eb68
movl -0x40(%rbp), %edi
addl $0x1, %edi
movslq -0x40(%rbp), %rax
cvtsi2sdl -0x80(%rbp,%rax,4), %xmm0
movslq -0x40(%rbp), %rax
cvtsi2sdl -0xa0(%rbp,%rax,4), %xmm1
callq 0x1fb80
cvttsd2si %xmm0, %ecx
movslq -0x40(%rbp), %rax
movl %ecx, -0x60(%rbp,%rax,4)
jmp 0x1eb7e
movl -0x40(%rbp), %edi
addl $0x1, %edi
callq 0x1ffe0
movsbl %al, %ecx
movslq -0x40(%rbp), %rax
movl %ecx, -0x60(%rbp,%rax,4)
leaq 0xdbcb(%rip), %rax      # 0x2c750
cmpl $0x0, 0x18(%rax)
je 0x1eb90
jmp 0x1ecb0
jmp 0x1ebb2
movslq -0x40(%rbp), %rax
movq -0x30(%rbp,%rax,8), %rax
movq 0x10(%rax), %rax
movl 0xd0(%rax), %eax
movl %eax, -0x98(%rbp)
movl $0x1, -0x54(%rbp)
cmpl $0x1, -0x40(%rbp)
je 0x1ebbe
cmpl $0x2, -0x40(%rbp)
jne 0x1ebe0
cmpq $0x0, -0x28(%rbp)
je 0x1ebe0
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0xd0, %rdi
movl -0x58(%rbp), %esi
callq 0x9700
movq %rax, -0x38(%rbp)
jmp 0x1ebe2
jmp 0x1ebe4
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x1ea7b
cmpl $0x0, -0x50(%rbp)
jne 0x1ec26
movl -0x60(%rbp), %ecx
leaq 0xdb4e(%rip), %rax      # 0x2c750
movl %ecx, 0x18(%rax)
movl -0x54(%rbp), %ecx
leaq 0xdb41(%rip), %rax      # 0x2c750
movl %ecx, 0x1c(%rax)
leaq 0xdb37(%rip), %rax      # 0x2c750
addq $0x28, %rax
movq %rax, -0xa8(%rbp)
jmp 0x1ec52
movl -0x60(%rbp), %ecx
leaq 0xdb20(%rip), %rax      # 0x2c750
movl %ecx, 0x20(%rax)
movl -0x54(%rbp), %ecx
leaq 0xdb13(%rip), %rax      # 0x2c750
movl %ecx, 0x24(%rax)
leaq 0xdb09(%rip), %rax      # 0x2c750
addq $0x48, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1ec6c
movq -0xa8(%rbp), %rdi
callq 0x12c40
movq -0x38(%rbp), %rcx
movq -0xa8(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0xa8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0xa8(%rbp), %rdi
callq 0x12c80
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)