// File: /workspace/github_cpp_makefile_star2_O2/rofl0r[P]ascc/cc_error.cpp
// Function: cc_error(char const*, ...)
void cc_error(const char *descr, ...)
{
    ccErrorIsUserError = false;
    if (descr[0] == '!')
    {
        ccErrorIsUserError = true;
        descr++;
    }

    char displbuf[1000];
    va_list ap;

    va_start(ap, descr);
    vsprintf(displbuf, descr, ap);
    va_end(ap);

    if (currentline > 0)
    {
        // [IKM] Implementation is project-specific
        std::pair<String, String> errinfo = cc_error_at_line(displbuf);
        ccErrorString = errinfo.first;
        ccErrorCallStack = errinfo.second;
    }
    else
    {
        ccErrorString = cc_error_without_line(displbuf);
        ccErrorCallStack = "";
    }

    if(ccPrintAllErrors) {
        std::cout << ccErrorString;
        std::cout << std::endl;
        if(ccErrorCallStack != "") {
            std::cout << ccErrorCallStack;
            std::cout << std::endl;
        }
    }

    ccError = 1;
    ccErrorLine = currentline;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rdi, %r10
testb %al, %al
je 0xf2a5
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movaps %xmm3, 0x90(%rsp)
movaps %xmm4, 0xa0(%rsp)
movaps %xmm5, 0xb0(%rsp)
movaps %xmm6, 0xc0(%rsp)
movaps %xmm7, 0xd0(%rsp)
movq %r9, 0x58(%rsp)
movq %r8, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movb $0x0, 0x16423(%rip)     # 0x256e8
cmpb $0x21, (%rdi)
jne 0xf2d4
movb $0x1, 0x16417(%rip)     # 0x256e8
incq %r10
leaq 0x30(%rsp), %rax
leaq 0x10(%rsp), %rdx
movq %rax, 0x10(%rdx)
leaq 0x4f0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
leaq 0xe0(%rsp), %rdi
movq %r10, %rsi
callq 0x31b0
leaq 0x1649e(%rip), %r15     # 0x257b0
cmpl $0x0, (%r15)
jle 0xf355
movq %rsp, %rbx
leaq 0xe0(%rsp), %rsi
movq %rbx, %rdi
callq 0x127ec
leaq 0x163a6(%rip), %rdi     # 0x256d8
movq %rbx, %rsi
callq 0x13374
leaq 0x8(%rsp), %rsi
leaq 0x1639a(%rip), %rdi     # 0x256e0
callq 0x13374
movq %rsp, %rdi
callq 0xf450
jmp 0xf392
movq %rsp, %rbx
leaq 0xe0(%rsp), %rsi
movq %rbx, %rdi
callq 0x12868
leaq 0x16369(%rip), %rdi     # 0x256d8
movq %rbx, %rsi
callq 0x13374
movq %rsp, %rdi
callq 0x134b0
leaq 0x1635a(%rip), %rdi     # 0x256e0
leaq 0xbe6b(%rip), %rsi      # 0x1b1f8
callq 0x133b8
cmpl $0x0, 0x16333(%rip)     # 0x256cc
je 0xf40f
movq 0x16336(%rip), %rax     # 0x256d8
testq %rax, %rax
je 0xf3ad
movq 0x18(%rax), %rsi
jmp 0xf3b4
leaq 0xbe44(%rip), %rsi      # 0x1b1f8
movq 0x15bfd(%rip), %rbx     # 0x24fb8
movq %rbx, %rdi
callq 0x32d0
movq %rbx, %rdi
callq 0x31e0
leaq 0x1630e(%rip), %rdi     # 0x256e0
leaq 0xbe1f(%rip), %rbx      # 0x1b1f8
movq %rbx, %rsi
callq 0xf466
testb %al, %al
je 0xf40f
movq 0x162f4(%rip), %rax     # 0x256e0
testq %rax, %rax
je 0xf3f5
movq 0x18(%rax), %rbx
movq 0x15bbc(%rip), %r14     # 0x24fb8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32d0
movq %r14, %rdi
callq 0x31e0
movl $0x1, 0x162b7(%rip)     # 0x256d0
movl (%r15), %eax
movl %eax, 0x162b2(%rip)     # 0x256d4
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x134b0
jmp 0xf447
movq %rax, %rbx
movq %rsp, %rdi
callq 0xf450
movq %rbx, %rdi
callq 0x3560
nop