// File: /workspace/github_c_makefile_star2_O0/heltilda[P]cicada/ccmain.c
// Function: printError
void printError(char *errFileName, ccInt errFileNameLength, char *errText, ccInt errCharNum, ccBool forceLineNo)
{
    
        // print the error/warning message, if there is one
    
    if (errCode != passed)  {
        if ((errCode < passed) || (errCode > finished_signal))  printf("Unknown error #%i\n", (int) errCode);
        else if ((errCode == return_flag) || (errCode == finished_signal))  return;
        else if (errCode == token_expected_err)  printf("Error:  '%s' expected", expectedTokenName);
        else if (errCode != member_not_found_err)  printf("Error:  %s", errorStrings[errCode]);
        else  {
            const char *defaultMemberName = "";
            char *memberName = (char *) defaultMemberName;
            ccInt soughtMember = *(errScript.code_ptr + errIndex - 1);
            
            if ((soughtMember >= 1) && (soughtMember <= currentCompiler->varNames.elementNum))  {
                memberName = ((varNameType *) element(&(currentCompiler->varNames), soughtMember))->theName;    }
            
            printf("Error:  member '%s' not found", memberName);
    }   }
    
    else if (warningCode != passed)  {
        if ((warningCode < passed) || (warningCode > finished_signal))  printf("Unknown warning #%i\n", (int) warningCode);
        printf("Warning:  %s", errorStrings[warningCode]);
        warningCode = passed;          }
    
    else  return;
    
    
        // print the file that caused the error, if its name was recorded
    
    if (errFileName != NULL)  {
        if (errFileNameLength < 0)  printf(" in file %s", errFileName);
        else  printf(" in file %.*s", errFileNameLength, errFileName);      }
    printf("\n");
    
    
        // if we have the source text, flag the line that caused the error
    
    if (errText != NULL)  {
        
        ccInt lineNo = 1, loopChar, lineBeginningChar, lineEndChar;
        int numLineNoChars;
        
        lineBeginningChar = lineEndChar = errCharNum;
        
        while ((errText[lineBeginningChar] != '\n') && (lineBeginningChar > 0))  lineBeginningChar--;
        if (errText[lineBeginningChar] == '\n')  lineBeginningChar++;
        
        while ((errText[lineEndChar] != '\n') && (errText[lineEndChar] != '\x00'))  lineEndChar++;
        if (errText[lineEndChar] == '\n')  lineEndChar--;
        
        printf("\n");
        
        
            // calculate and print out the line number (if we have a file name)
        
        if ((errFileName == NULL) && (!forceLineNo))  numLineNoChars = 0;
        else  {
            
            for (loopChar = 0; loopChar < lineBeginningChar; loopChar++)  {
            if (errText[loopChar] == '\n')  {
                lineNo++;
            }}
            
            printf("%i:  %n", (int) lineNo, &numLineNoChars);         }
        
        
            // .. and the line in the script that caused it..
        
        for (loopChar = lineBeginningChar; loopChar <= lineEndChar; loopChar++)  {
        if (lettertype(errText + loopChar) != unprintable)  {
            if (errText[loopChar] == '\t')  printf(" ");
            else  printf("%c", errText[loopChar]);
        }}
        printf("\n");
        
        
            // .. and finally a marker indicating the offending character in the line.
        
        for (loopChar = 1; loopChar <= (ccInt) numLineNoChars; loopChar++)  {
            printf(" ");        }
        
        for (loopChar = lineBeginningChar; loopChar < errCharNum; loopChar++)  {
        if (lettertype(errText + loopChar) != unprintable)  {
            printf(" ");
        }}
        printf("^\n");        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movb %al, -0x1d(%rbp)
leaq 0xb3dd(%rip), %rax      # 0x2c750
cmpl $0x0, 0x18(%rax)
je 0x214b6
leaq 0xb3cc(%rip), %rax      # 0x2c750
cmpl $0x0, 0x18(%rax)
jl 0x21397
leaq 0xb3bf(%rip), %rax      # 0x2c750
cmpl $0x33, 0x18(%rax)
jle 0x213b4
leaq 0xb3b2(%rip), %rax      # 0x2c750
movl 0x18(%rax), %esi
leaq 0x1e35(%rip), %rdi      # 0x231dd
movb $0x0, %al
callq 0x8050
jmp 0x214b4
leaq 0xb395(%rip), %rax      # 0x2c750
cmpl $0x32, 0x18(%rax)
je 0x213ce
leaq 0xb388(%rip), %rax      # 0x2c750
cmpl $0x33, 0x18(%rax)
jne 0x213d3
jmp 0x217a4
leaq 0xb376(%rip), %rax      # 0x2c750
cmpl $0xb, 0x18(%rax)
jne 0x213fe
leaq 0xaea9(%rip), %rax      # 0x2c290
movq 0x10(%rax), %rsi
leaq 0x1dfe(%rip), %rdi      # 0x231f0
movb $0x0, %al
callq 0x8050
jmp 0x214b0
leaq 0xb34b(%rip), %rax      # 0x2c750
cmpl $0x17, 0x18(%rax)
je 0x21431
leaq 0xb33e(%rip), %rax      # 0x2c750
movslq 0x18(%rax), %rcx
leaq 0xacd3(%rip), %rax      # 0x2c0f0
movq (%rax,%rcx,8), %rsi
leaq 0x1dde(%rip), %rdi      # 0x23206
movb $0x0, %al
callq 0x8050
jmp 0x214ae
leaq 0xc64(%rip), %rax       # 0x2209c
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0xb305(%rip), %rax      # 0x2c750
movq 0x38(%rax), %rax
leaq 0xb2fa(%rip), %rcx      # 0x2c750
movslq 0x1c(%rcx), %rcx
movl -0x4(%rax,%rcx,4), %eax
movl %eax, -0x34(%rbp)
cmpl $0x1, -0x34(%rbp)
jl 0x2149c
movl -0x34(%rbp), %eax
leaq 0xae1f(%rip), %rcx      # 0x2c290
movq (%rcx), %rcx
cmpl 0x14a0(%rcx), %eax
jg 0x2149c
leaq 0xae0d(%rip), %rax      # 0x2c290
movq (%rax), %rdi
addq $0x14a0, %rdi           # imm = 0x14A0
movl -0x34(%rbp), %esi
callq 0x9700
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
leaq 0x1d6a(%rip), %rdi      # 0x23211
movb $0x0, %al
callq 0x8050
jmp 0x214b0
jmp 0x214b2
jmp 0x214b4
jmp 0x21530
leaq 0xb293(%rip), %rax      # 0x2c750
cmpl $0x0, 0x20(%rax)
je 0x21529
leaq 0xb286(%rip), %rax      # 0x2c750
cmpl $0x0, 0x20(%rax)
jl 0x214dd
leaq 0xb279(%rip), %rax      # 0x2c750
cmpl $0x33, 0x20(%rax)
jle 0x214f5
leaq 0xb26c(%rip), %rax      # 0x2c750
movl 0x20(%rax), %esi
leaq 0x1d41(%rip), %rdi      # 0x2322f
movb $0x0, %al
callq 0x8050
leaq 0xb254(%rip), %rax      # 0x2c750
movslq 0x20(%rax), %rcx
leaq 0xabe9(%rip), %rax      # 0x2c0f0
movq (%rax,%rcx,8), %rsi
leaq 0x1d32(%rip), %rdi      # 0x23244
movb $0x0, %al
callq 0x8050
leaq 0xb230(%rip), %rax      # 0x2c750
movl $0x0, 0x20(%rax)
jmp 0x2152e
jmp 0x217a4
jmp 0x21530
cmpq $0x0, -0x8(%rbp)
je 0x21568
cmpl $0x0, -0xc(%rbp)
jge 0x21551
movq -0x8(%rbp), %rsi
leaq 0x1d09(%rip), %rdi      # 0x23251
movb $0x0, %al
callq 0x8050
jmp 0x21566
movl -0xc(%rbp), %esi
movq -0x8(%rbp), %rdx
leaq 0x1cfe(%rip), %rdi      # 0x2325d
movb $0x0, %al
callq 0x8050
jmp 0x21568
leaq 0xb2c(%rip), %rdi       # 0x2209b
movb $0x0, %al
callq 0x8050
cmpq $0x0, -0x18(%rbp)
je 0x217a4
movl $0x1, -0x38(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x44(%rbp)
movl %eax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x49(%rbp)
je 0x215b1
cmpl $0x0, -0x40(%rbp)
setg %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x215ba
jmp 0x215c5
movl -0x40(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x21591
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x215df
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x215e1
movq -0x18(%rbp), %rax
movslq -0x44(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x4a(%rbp)
je 0x2160c
movq -0x18(%rbp), %rax
movslq -0x44(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x4a(%rbp)
movb -0x4a(%rbp), %al
testb $0x1, %al
jne 0x21615
jmp 0x21620
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x215e1
movq -0x18(%rbp), %rax
movslq -0x44(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x2163a
movl -0x44(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x44(%rbp)
leaq 0xa5a(%rip), %rdi       # 0x2209b
movb $0x0, %al
callq 0x8050
cmpq $0x0, -0x8(%rbp)
jne 0x2165e
cmpb $0x0, -0x1d(%rbp)
jne 0x2165e
movl $0x0, -0x48(%rbp)
jmp 0x216a9
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0x21694
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x21687
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x21689
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x21665
movl -0x38(%rbp), %esi
leaq 0x1bcd(%rip), %rdi      # 0x2326b
leaq -0x48(%rbp), %rdx
movb $0x0, %al
callq 0x8050
movl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jg 0x2171c
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x7aa4(%rip), %rax      # 0x29170
cmpl $0x0, (%rax,%rcx,4)
je 0x2170f
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x9, %eax
jne 0x216f3
leaq 0x97c(%rip), %rdi       # 0x22066
movb $0x0, %al
callq 0x8050
jmp 0x2170d
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movsbl (%rax,%rcx), %esi
leaq 0x15b9(%rip), %rdi      # 0x22cbf
movb $0x0, %al
callq 0x8050
jmp 0x2170f
jmp 0x21711
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x216af
leaq 0x978(%rip), %rdi       # 0x2209b
movb $0x0, %al
callq 0x8050
movl $0x1, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x48(%rbp), %eax
jg 0x21752
leaq 0x926(%rip), %rdi       # 0x22066
movb $0x0, %al
callq 0x8050
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x21731
movl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x21796
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x79fb(%rip), %rax      # 0x29170
cmpl $0x0, (%rax,%rcx,4)
je 0x21789
leaq 0x8e4(%rip), %rdi       # 0x22066
movb $0x0, %al
callq 0x8050
jmp 0x2178b
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x21758
leaq 0x1ad6(%rip), %rdi      # 0x23273
movb $0x0, %al
callq 0x8050
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)