// File: /workspace/github_cpp_makefile_star2_O3/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 0x10341
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, 0x15377(%rip)     # 0x256d8
cmpb $0x21, (%rdi)
jne 0x10370
movb $0x1, 0x1536b(%rip)     # 0x256d8
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 0x153f2(%rip), %r15     # 0x257a0
cmpl $0x0, (%r15)
jle 0x103fc
movq %rsp, %rbx
leaq 0xe0(%rsp), %rsi
movq %rbx, %rdi
callq 0x13f38
leaq 0x152fa(%rip), %rdi     # 0x256c8
movq %rbx, %rsi
callq 0x14c14
leaq 0x8(%rsp), %rbx
leaq 0x152ee(%rip), %rdi     # 0x256d0
movq %rbx, %rsi
callq 0x14c14
movq %rbx, %rdi
callq 0x14d62
movq %rsp, %rdi
callq 0x14d62
jmp 0x10439
movq %rsp, %rbx
leaq 0xe0(%rsp), %rsi
movq %rbx, %rdi
callq 0x13fb4
leaq 0x152b2(%rip), %rdi     # 0x256c8
movq %rbx, %rsi
callq 0x14c14
movq %rsp, %rdi
callq 0x14d62
leaq 0x152a3(%rip), %rdi     # 0x256d0
leaq 0xcdb4(%rip), %rsi      # 0x1d1e8
callq 0x14c62
cmpl $0x0, 0x1527c(%rip)     # 0x256bc
je 0x10553
movq 0x1527b(%rip), %rax     # 0x256c8
testq %rax, %rax
je 0x1047b
movq 0x18(%rax), %rbx
testq %rbx, %rbx
jne 0x10482
movq 0x14b56(%rip), %rax     # 0x24fb8
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %rdi
movl 0x20(%rax,%rcx), %esi
orl $0x1, %esi
callq 0x3550
jmp 0x1049c
leaq 0xcd66(%rip), %rbx      # 0x1d1e8
movq %rbx, %rdi
callq 0x31a0
movq 0x14b27(%rip), %rdi     # 0x24fb8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x33a0
movq 0x14b15(%rip), %rbx     # 0x24fb8
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3050
movq %rax, %rdi
callq 0x3250
leaq 0x151ff(%rip), %rdi     # 0x256d0
leaq 0xcd10(%rip), %r14      # 0x1d1e8
movq %r14, %rsi
callq 0x15124
testl %eax, %eax
je 0x10553
movq 0x151e5(%rip), %rax     # 0x256d0
testq %rax, %rax
je 0x104f9
movq 0x18(%rax), %r14
testq %r14, %r14
je 0x10515
movq %r14, %rdi
callq 0x31a0
movq 0x14ab0(%rip), %rdi     # 0x24fb8
movq %r14, %rsi
movq %rax, %rdx
callq 0x33a0
jmp 0x1052c
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x3550
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3050
movq %rax, %rdi
callq 0x3250
movl $0x1, 0x15163(%rip)     # 0x256c0
movl (%r15), %eax
movl %eax, 0x1515e(%rip)     # 0x256c4
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x10585
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x14d62
movq %rsp, %rdi
callq 0x14d62
movq %rbx, %rdi
callq 0x3560
nopl (%rax)