// File: /workspace/github_c_makefile_star2_O2/sharmaeklavya2[P]cerplag/error.c
// Function: print_error
void print_error(const char* category, int type, int err_num, int line, int col,
    const char* lexeme, const char* err_code, const char* err_msg)
{
    if(!print_error_req)
        return;
    if(error_stream == NULL)
        error_stream = stderr;

    const char* type_str;
    if(type == ERROR) {
        type_str = "error";
        error_count++;
    }
    else {
        type_str = "warning";
        warning_count++;
    }

    if(category != NULL)
        fprintf(error_stream, "%s_", category);
    fprintf(error_stream, "%s", type_str);
    if(err_num >= 0)
        fprintf(error_stream, "_%02d", err_num);
    fprintf(error_stream, ": ");

    if(line > 0)
    {
        fprintf(error_stream, "line %2d", line);
        if(col > 0)
            fprintf(error_stream, ", col %2d", col);
        fprintf(error_stream, ": ");
    }

    if(lexeme != NULL)
        fprintf(error_stream, "\'%s\'", lexeme);

    if(err_code != NULL || err_msg != NULL)
        fprintf(error_stream, "\n");
    if(err_code != NULL)
        fprintf(error_stream, "%s: ", err_code);
    if(err_msg != NULL)
        fprintf(error_stream, "%s", err_msg);

    fprintf(error_stream, "\n\n");
}

// Assembly:
cmpb $0x1, 0xc38d(%rip)      # 0x14ad0
jne 0x8902
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r15
movl %r8d, %r12d
movl %ecx, %r13d
movl %edx, %ebx
movl %esi, %eax
movq %rdi, %rdx
movq 0x18(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rbp), %rcx
movq %rcx, -0x30(%rbp)
movq 0x1162f(%rip), %rsi     # 0x19db0
testq %rsi, %rsi
jne 0x8797
movq 0xb86b(%rip), %rcx      # 0x13ff8
movq (%rcx), %rsi
movq %rsi, 0x11619(%rip)     # 0x19db0
testl %eax, %eax
leaq 0x11618(%rip), %rax     # 0x19db8
leaq 0x11615(%rip), %rcx     # 0x19dbc
cmoveq %rax, %rcx
leaq 0x4a3e(%rip), %rax      # 0xd1f0
leaq 0x590c(%rip), %r14      # 0xe0c5
cmoveq %rax, %r14
incl (%rcx)
testq %rdx, %rdx
je 0x87df
leaq 0x5902(%rip), %rax      # 0xe0cd
movq %rsi, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x3130
movq 0x115d1(%rip), %rsi     # 0x19db0
movq %r14, %rdi
callq 0x30e0
testl %ebx, %ebx
js 0x8802
movq 0x115be(%rip), %rdi     # 0x19db0
leaq 0x58d8(%rip), %rsi      # 0xe0d1
movl %ebx, %edx
xorl %eax, %eax
callq 0x3130
movq 0x115a7(%rip), %rcx     # 0x19db0
leaq 0x47fc(%rip), %rdi      # 0xd00c
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
callq 0x31c0
testl %r13d, %r13d
movq -0x38(%rbp), %rbx
movq -0x30(%rbp), %r14
jle 0x8876
movq 0x11581(%rip), %rdi     # 0x19db0
leaq 0x58a1(%rip), %rsi      # 0xe0d7
movl %r13d, %edx
xorl %eax, %eax
callq 0x3130
testl %r12d, %r12d
jle 0x885d
movq 0x11564(%rip), %rdi     # 0x19db0
leaq 0x588d(%rip), %rsi      # 0xe0e0
movl %r12d, %edx
xorl %eax, %eax
callq 0x3130
movq 0x1154c(%rip), %rcx     # 0x19db0
leaq 0x47a1(%rip), %rdi      # 0xd00c
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
callq 0x31c0
testq %r15, %r15
je 0x8893
movq 0x1152e(%rip), %rdi     # 0x19db0
leaq 0x5f24(%rip), %rsi      # 0xe7ad
movq %r15, %rdx
xorl %eax, %eax
callq 0x3130
movq %r14, %rax
orq %rbx, %rax
je 0x88db
movq 0x1150e(%rip), %rsi     # 0x19db0
pushq $0xa
popq %rdi
callq 0x3100
testq %r14, %r14
je 0x88c7
movq 0x114fa(%rip), %rdi     # 0x19db0
leaq 0x515c(%rip), %rsi      # 0xda19
movq %r14, %rdx
xorl %eax, %eax
callq 0x3130
testq %rbx, %rbx
je 0x88db
movq 0x114dd(%rip), %rsi     # 0x19db0
movq %rbx, %rdi
callq 0x30e0
movq 0x114ce(%rip), %rcx     # 0x19db0
leaq 0x5801(%rip), %rdi      # 0xe0ea
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x31c0
retq
nop