// File: /workspace/github_cpp_makefile_star2_O1/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 0x10465
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, 0x15253(%rip)     # 0x256d8
cmpb $0x21, (%rdi)
jne 0x10494
movb $0x1, 0x15247(%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 0x152ce(%rip), %r15     # 0x257a0
cmpl $0x0, (%r15)
jle 0x10520
movq %rsp, %rbx
leaq 0xe0(%rsp), %rsi
movq %rbx, %rdi
callq 0x140b0
leaq 0x151d6(%rip), %rdi     # 0x256c8
movq %rbx, %rsi
callq 0x14da0
leaq 0x8(%rsp), %rbx
leaq 0x151ca(%rip), %rdi     # 0x256d0
movq %rbx, %rsi
callq 0x14da0
movq %rbx, %rdi
callq 0x14eee
movq %rsp, %rdi
callq 0x14eee
jmp 0x1055d
movq %rsp, %rbx
leaq 0xe0(%rsp), %rsi
movq %rbx, %rdi
callq 0x1412c
leaq 0x1518e(%rip), %rdi     # 0x256c8
movq %rbx, %rsi
callq 0x14da0
movq %rsp, %rdi
callq 0x14eee
leaq 0x1517f(%rip), %rdi     # 0x256d0
leaq 0xcc90(%rip), %rsi      # 0x1d1e8
callq 0x14dee
cmpl $0x0, 0x15158(%rip)     # 0x256bc
je 0x10679
movq 0x15157(%rip), %rax     # 0x256c8
testq %rax, %rax
je 0x1057c
movq 0x18(%rax), %rbx
jmp 0x10583
leaq 0xcc65(%rip), %rbx      # 0x1d1e8
testq %rbx, %rbx
je 0x105a4
movq %rbx, %rdi
callq 0x31a0
movq 0x14a21(%rip), %rdi     # 0x24fb8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x33a0
jmp 0x105c2
movq 0x14a0d(%rip), %rax     # 0x24fb8
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %rdi
movl 0x20(%rax,%rcx), %esi
orl $0x1, %esi
callq 0x3550
movq 0x149ef(%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 0x150d9(%rip), %rdi     # 0x256d0
leaq 0xcbea(%rip), %r14      # 0x1d1e8
movq %r14, %rsi
callq 0x152c2
testl %eax, %eax
je 0x10679
movq 0x150bf(%rip), %rax     # 0x256d0
testq %rax, %rax
je 0x1061a
movq 0x18(%rax), %r14
testq %r14, %r14
je 0x1063b
movq %r14, %rdi
callq 0x31a0
movq 0x1498a(%rip), %rdi     # 0x24fb8
movq %r14, %rsi
movq %rax, %rdx
callq 0x33a0
jmp 0x10652
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, 0x1503d(%rip)     # 0x256c0
movl (%r15), %eax
movl %eax, 0x15038(%rip)     # 0x256c4
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x106ab
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x14eee
movq %rsp, %rdi
callq 0x14eee
movq %rbx, %rdi
callq 0x3560
nop