// File: /workspace/github_c_makefile_star2_O0/anuwu[P]ERPLAG-Compiler/lexer.c
// Function: handleLexError
token *handleLexError (DFAError err, twinBuffer *twinBuf)
{
	token *tk = (token *) malloc (sizeof(token)) ;
	tk->id = TK_LEXERROR ;
	tk->lineNumber = getLexemeLineNumber (twinBuf) ;
 
	switch (err)
	{
		case UNKNOWN_SYMBOL :
			tk->lexeme = (char *) malloc (sizeof(char) * (strlen("Unknown Symbol") + 1)) ;
			strcpy (tk->lexeme, "Unknown Symbol") ;
			break ;
 
		case EOF_WHILE_LEXING :
			retract (twinBuf) ;
			resetBeginPointer (twinBuf) ;
			tk->lineNumber = twinBuf->lineNumber ;
			nextChar (twinBuf) ;

			tk->lexeme = (char *) malloc (sizeof(char) * (strlen("Reached EOF while lexing") + 1)) ;
			strcpy (tk->lexeme, "Reached EOF while lexing") ;
			break ;
 
		case EOF_COMMENT :
			retract (twinBuf) ;
			resetBeginPointer (twinBuf) ;
			tk->lineNumber = twinBuf->lineNumber ;
			nextChar (twinBuf) ;

			tk->lexeme = (char *) malloc (sizeof(char) * (strlen("EOF encountered before end of comment") + 1)) ;
			strcpy (tk->lexeme , "EOF encountered before end of comment") ;
			break ;
 
		case RANGEOP_ERR :
			tk->lexeme = (char *) malloc (sizeof(char) * (strlen("Expected '.'")+1)) ;
			strcpy (tk->lexeme, "Expected '.'") ;
			break ;
 
		case EQ_EXPECTED :
			tk->lexeme = (char *) malloc (sizeof(char) * (strlen("Expected '='") + 1)) ;
			strcpy (tk->lexeme, "Expected '='") ;
			break ;
 
		case TOO_LONG_ID :
			tk->lexeme = (char *) malloc (sizeof(char) * (strlen("Identifier longer than 20 characters") + 1)) ;
			strcpy (tk->lexeme, "Identifier longer than 20 characters") ;
			break ;
 
		case RNUM_DIG_EXPECTED :
			tk->lexeme = (char *) malloc (sizeof(char) * (strlen("Digit expected in real number") + 1)) ;
			strcpy (tk->lexeme, "Digit expected in real number") ;
			break ;
 
		case RNUM_DIGORSIGN_EXPECTED :
			tk->lexeme = (char *) malloc (sizeof(char) * (strlen("Digit or +/- expected in real number") + 1)) ;
			strcpy (tk->lexeme, "Digit or +/- expected in real number") ;
			break ;
	}

	nextChar (twinBuf) ;
	resetBeginPointer (twinBuf) ;
 
	return tk ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x18, %edi
callq 0x10e0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x6e, (%rax)
movq -0x10(%rbp), %rdi
callq 0xa140
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x4(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x7, %rax
ja 0xa422
movq -0x20(%rbp), %rax
leaq 0xcb7f(%rip), %rcx      # 0x16de4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xf, %edi
callq 0x10e0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xcd13(%rip), %rsi      # 0x16fa5
callq 0x1040
jmp 0xa422
movq -0x10(%rbp), %rdi
callq 0xa440
movq -0x10(%rbp), %rdi
callq 0xa1c0
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rdi
callq 0xa500
movl $0x19, %edi
callq 0x10e0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xcccb(%rip), %rsi      # 0x16fb4
callq 0x1040
jmp 0xa422
movq -0x10(%rbp), %rdi
callq 0xa440
movq -0x10(%rbp), %rdi
callq 0xa1c0
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rdi
callq 0xa500
movl $0x26, %edi
callq 0x10e0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xcc8d(%rip), %rsi      # 0x16fcd
callq 0x1040
jmp 0xa422
movl $0xd, %edi
callq 0x10e0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xcc85(%rip), %rsi      # 0x16ff3
callq 0x1040
jmp 0xa422
movl $0xd, %edi
callq 0x10e0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xcc64(%rip), %rsi      # 0x17000
callq 0x1040
jmp 0xa422
movl $0x25, %edi
callq 0x10e0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xcc46(%rip), %rsi      # 0x1700d
callq 0x1040
jmp 0xa422
movl $0x1e, %edi
callq 0x10e0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xcc40(%rip), %rsi      # 0x17032
callq 0x1040
jmp 0xa422
movl $0x25, %edi
callq 0x10e0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xcc33(%rip), %rsi      # 0x17050
callq 0x1040
movq -0x10(%rbp), %rdi
callq 0xa500
movq -0x10(%rbp), %rdi
callq 0xa1c0
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop