// File: /workspace/github_c_makefile_star2_O1/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, 0xc5f5(%rip)      # 0x15ad0
jne 0x96a5
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
movq %rdi, %rdx
movq 0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, 0x11898(%rip)     # 0x1adb0
jne 0x952b
movq 0xbad7(%rip), %rax      # 0x14ff8
movq (%rax), %rax
movq %rax, 0x11885(%rip)     # 0x1adb0
testl %esi, %esi
leaq 0x11884(%rip), %rax     # 0x1adb8
leaq 0x11881(%rip), %rcx     # 0x1adbc
cmoveq %rax, %rcx
leaq 0x4caa(%rip), %rax      # 0xe1f0
leaq 0x5b78(%rip), %r14      # 0xf0c5
cmoveq %rax, %r14
incl (%rcx)
testq %rdx, %rdx
je 0x956d
movq 0x11851(%rip), %rdi     # 0x1adb0
leaq 0x5b67(%rip), %rsi      # 0xf0cd
xorl %eax, %eax
callq 0x3140
movq 0x1183c(%rip), %rsi     # 0x1adb0
movq %r14, %rdi
callq 0x30e0
testl %ebx, %ebx
js 0x9597
movq 0x11829(%rip), %rdi     # 0x1adb0
leaq 0x5b43(%rip), %rsi      # 0xf0d1
movl %ebx, %edx
xorl %eax, %eax
callq 0x3140
movq 0x11812(%rip), %rcx     # 0x1adb0
leaq 0x4a67(%rip), %rdi      # 0xe00c
movl $0x2, %esi
movl $0x1, %edx
callq 0x31d0
testl %r13d, %r13d
movq -0x38(%rbp), %rbx
movq -0x30(%rbp), %r14
jle 0x9613
movq 0x117e8(%rip), %rdi     # 0x1adb0
leaq 0x5b08(%rip), %rsi      # 0xf0d7
movl %r13d, %edx
xorl %eax, %eax
callq 0x3140
testl %r12d, %r12d
jle 0x95f6
movq 0x117cb(%rip), %rdi     # 0x1adb0
leaq 0x5af4(%rip), %rsi      # 0xf0e0
movl %r12d, %edx
xorl %eax, %eax
callq 0x3140
movq 0x117b3(%rip), %rcx     # 0x1adb0
leaq 0x4a08(%rip), %rdi      # 0xe00c
movl $0x2, %esi
movl $0x1, %edx
callq 0x31d0
testq %r15, %r15
je 0x9630
movq 0x11791(%rip), %rdi     # 0x1adb0
leaq 0x6187(%rip), %rsi      # 0xf7ad
movq %r15, %rdx
xorl %eax, %eax
callq 0x3140
movq %r14, %rax
orq %rbx, %rax
je 0x9649
movq 0x11771(%rip), %rsi     # 0x1adb0
movl $0xa, %edi
callq 0x3110
testq %r14, %r14
je 0x9666
movq 0x1175b(%rip), %rdi     # 0x1adb0
leaq 0x53bd(%rip), %rsi      # 0xea19
movq %r14, %rdx
xorl %eax, %eax
callq 0x3140
testq %rbx, %rbx
je 0x967a
movq 0x1173e(%rip), %rsi     # 0x1adb0
movq %rbx, %rdi
callq 0x30e0
movq 0x1172f(%rip), %rcx     # 0x1adb0
leaq 0x5a62(%rip), %rdi      # 0xf0ea
movl $0x2, %esi
movl $0x1, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x31d0
retq
nop