// File: /workspace/github_c_makefile_star2_O2/rakitzis[P]rc/lex.c
// Function: yylex
extern int yylex() {
	static bool dollar = FALSE;
	bool saw_meta = FALSE;
	int c;
	size_t i;			/* The purpose of all these local assignments is to	*/
	const char *meta;		/* allow optimizing compilers like gcc to load these	*/
	char *buf = realbuf;		/* values into registers. On a sparc this is a		*/
	YYSTYPE *y = &yylval;		/* win, in code size *and* execution time		*/
	if (errset) {
		errset = FALSE;
		return '\n';
	}
	/* rc variable-names may contain only alnum, '*' and '_', so use dnw if we are scanning one. */
	meta = (dollar ? dnw : nw);
	if (newline) {
		--lineno; /* slight space optimization; nextline() always increments lineno */
		nextline();
		newline = FALSE;
	}
top:	while ((c = gchar()) == ' ' || c == '\t')
		w = NW;
	if (c != '(') dollar = FALSE;
	if (c == EOF)
		return END;
	if (!meta[(unsigned char) c]) {	/* it's a word or keyword. */
		checkfreecaret;
		w = RW;
		i = 0;
	read:	do {
			buf[i++] = c;
			if (c == '?' || c == '[' || c == '*')
				saw_meta = TRUE;
			if (i >= bufsize)
				buf = realbuf = erealloc(buf, bufsize *= 2);
		} while ((c = gchar()) != EOF && !meta[(unsigned char) c]);
		while (c == '\\') {
			if ((c = gchar()) == '\n') {
				nextline();
				c = ' '; /* Pretend a space was read */
				break;
			} else {
	bs:			if (meta != dnw) { /* all words but varnames may have a bslash */
					buf[i++] = '\\';
					if (i >= bufsize)
						buf = realbuf = erealloc(buf, bufsize *= 2);
					if (!meta[(unsigned char) c])
						goto read;
				} else {
					ugchar(c);
					c = '\\';
					break;
				}
			}
		}
		ugchar(c);
		buf[i] = '\0';
		w = KW;
		if (i == 2) {
			if (*buf == 'i' && buf[1] == 'f') return IF;
			if (*buf == 'f' && buf[1] == 'n') return FN;
			if (*buf == 'i' && buf[1] == 'n') return IN;
		}
		if (streq(buf, "for")) return FOR;
		if (streq(buf, "else")) return ELSE;
		if (streq(buf, "switch")) return SWITCH;
		if (streq(buf, "while")) return WHILE;
		if (streq(buf, "case")) return CASE;
		w = RW;
		y->word.w = ncpy(buf);
		if (saw_meta) {
			char *r, *s;

			y->word.m = nalloc(strlen(buf) + 1);
			for (r = buf, s = y->word.m; *r != '\0'; r++, s++)
				*s = (*r == '?' || *r == '[' || *r == '*');
		} else {
			y->word.m = NULL;
		}
		y->word.q = FALSE;
		return WORD;
	}
	if (c == '`' || c == '!' || c == '@' || c == '~' || c == '$' || c == '\'' || c == '=') {
		checkfreecaret;
		if (c == '!' || c == '@' || c == '~' || c == '=')
			w = KW;
	}
	switch (c) {
	case '!':
		return BANG;
	case '@':
		return SUBSHELL;
	case '~':
		return TWIDDLE;
	case '`':
		c = gchar();
		if (c == '`')
			return BACKBACK;
		ugchar(c);
		return '`';
	case '$':
		dollar = TRUE;
		c = gchar();
		if (c == '#')
			return COUNT;
		if (c == '^' || c == '"')
			return FLAT;
		ugchar(c);
		return '$';
	case '\'':
		w = RW;
		i = 0;
		/* double ' to quote it, like this: 'how''s it going?' */
		while ((c = gchar()) != '\'' || (c = gchar()) == '\'') {
			buf[i++] = c;
			if (c == '\n')
				nextline();
			if (c == EOF) {
				w = NW;
				scanerror("eof in quoted string");
				return HUH;
			}
			if (i >= bufsize)
				buf = realbuf = erealloc(buf, bufsize *= 2);
		}
		ugchar(c);
		buf[i] = '\0';
		y->word.w = ncpy(buf);
		y->word.m = NULL;
		y->word.q = TRUE;
		return WORD;
	case '\\':
		if ((c = gchar()) == '\n') {
			nextline();
			goto top; /* Pretend it was just another space. */
		}
		ugchar(c);
		c = '\\';
		checkfreecaret;
		c = gchar();
		i = 0;
		goto bs;
	case '(':
		if (w == RW) /* SUB's happen only after real words, not keywords, so if () and while () work */
			c = SUB;
		w = NW;
		return c;
	case '#':
		while ((c = gchar()) != '\n') /* skip comment until newline */
			if (c == EOF)
				return END;
		/* FALLTHROUGH */
	case '\n':
		lineno++;
		newline = TRUE;
		/* FALLTHROUGH */
	case ';':
	case '^':
	case ')':
	case '{': case '}':
		w = NW;
	case '=':
		return c;
	case '&':
		w = NW;
		c = gchar();
		if (c == '&')
			return ANDAND;
		ugchar(c);
		return '&';
	case '|':
		w = NW;
		c = gchar();
		if (c == '|')
			return OROR;
		getpair(c);
		if (errset)
			return HUH;
		if ((y->pipe.left = fd_left) == UNSET)
			y->pipe.left = 1;				/* default to fd 1 */
		if ((y->pipe.right = fd_right) == UNSET)
			y->pipe.right = 0;				/* default to fd 0 */
		if (y->pipe.right == CLOSED) {
			scanerror("expected digit after '='");		/* can't close a pipe */
			return HUH;
		}
		return PIPE;
	case '>':
		c = gchar();
		if (c == '>') {
			c = gchar();
			y->redir.type = rAppend;
		} else
			y->redir.type = rCreate;
		y->redir.fd = 1;
		goto common;
	case '<':
		c = gchar();
		if (c == '<') {
			c = gchar();
			if (c == '<') {
				c = gchar();
				y->redir.type = rHerestring;
			} else {
				y->redir.type = rHeredoc;
			}
		} else
			y->redir.type = rFrom;
		y->redir.fd = 0;
	common:
		w = NW;
		getpair(c);
		if (errset)
			return HUH;
		if (fd_right == UNSET) { /* redirection, not dup */
			if (fd_left != UNSET) {
				y->redir.fd = fd_left;
				return SREDIR;
			}
			return (y->redir.type == rFrom || y->redir.type == rCreate) ? REDIR : SREDIR;
		} else { /* dup; recast yylval */
			y->dup.type = y->redir.type;
			y->dup.left = fd_left;
			y->dup.right = fd_right;
			return DUP;
		}
	default:
		w = NW;
		return c; /* don't know what it is, let yacc barf on it */
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpb $0x1, 0x1147f(%rip)     # 0x19b90
jne 0x8723
movb $0x0, 0x11476(%rip)     # 0x19b90
pushq $0xa
popq %r14
jmp 0x8c96
movq 0x1145e(%rip), %rbx     # 0x19b88
movb 0x11450(%rip), %al      # 0x19b80
leaq 0x6389(%rip), %r12      # 0xeac0
leaq 0x6282(%rip), %rcx      # 0xe9c0
movb %al, 0xf(%rsp)
testb %al, %al
cmoveq %rcx, %r12
cmpb $0x1, 0x11445(%rip)     # 0x19b94
jne 0x8763
decl 0x11441(%rip)           # 0x19b98
callq 0x830c
movb $0x0, 0x11431(%rip)     # 0x19b94
leaq 0x61c6(%rip), %r13      # 0xe930
leaq 0x614f(%rip), %rbp      # 0xe8c0
pushq $0x1
popq %r15
callq 0x7e62
cmpl $0x9, %eax
je 0x878d
movl %eax, %r14d
cmpl $0x28, %eax
je 0x87a7
cmpl $0x20, %r14d
jne 0x8796
andl $0x0, 0x11408(%rip)     # 0x19b9c
jmp 0x8775
movb $0x0, 0x113e3(%rip)     # 0x19b80
cmpl $-0x1, %r14d
je 0x89f4
movzbl %r14b, %eax
cmpb $0x0, (%r12,%rax)
je 0x89db
leal -0x21(%r14), %eax
cmpl $0x8, %eax
jbe 0x87e6
leal -0x3b(%r14), %ecx
cmpl $0x5, %ecx
jbe 0x87f0
leal -0x7b(%r14), %ecx
cmpl $0x3, %ecx
jbe 0x8800
cmpl $0x5c, %r14d
je 0x887a
cmpl $0x60, %r14d
je 0x8810
jmp 0x8b85
movslq (%rbp,%rax,4), %rcx
addq %rbp, %rcx
jmpq *%rcx
leaq 0x60ed(%rip), %rdx      # 0xe8e4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x60f5(%rip), %rdx      # 0xe8fc
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpl $0x0, 0x11385(%rip)     # 0x19b9c
jne 0x89e8
leal -0x3b(%r14), %ecx
cmpl $0x5, %ecx
jbe 0x8844
cmpl $0x8, %eax
jbe 0x884e
leal -0x7b(%r14), %edx
cmpl $0x3, %edx
ja 0x8870
leaq 0x610d(%rip), %rsi      # 0xe948
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movslq (%r13,%rcx,4), %rdx
addq %r13, %rdx
jmpq *%rdx
leaq 0x60b7(%rip), %rsi      # 0xe90c
movslq (%rsi,%rax,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movl $0x2, 0x11334(%rip)     # 0x19b9c
cmpl $0x5c, %r14d
je 0x887a
jmp 0x8892
cmpl $0x5c, %r14d
jne 0x89a5
callq 0x7e62
cmpl $0xa, %eax
jne 0x8a52
callq 0x830c
jmp 0x8775
cmpl $0x8, %eax
jbe 0x8939
cmpl $0x5, %ecx
jbe 0x896c
leal -0x7b(%r14), %eax
cmpl $0x3, %eax
ja 0x89a5
leaq 0x60dc(%rip), %rcx      # 0xe994
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
andl $0x0, 0x112d4(%rip)     # 0x19b9c
callq 0x7e62
movl $0x10e, %r14d           # imm = 0x10E
cmpl $0x7c, %eax
je 0x8c96
movl %eax, %edi
callq 0x8f7b
movl $0x118, %r14d           # imm = 0x118
cmpb $0x0, 0x112a0(%rip)     # 0x19b90
jne 0x8c96
movl 0x112a4(%rip), %eax     # 0x19ba0
cmpl $-0x9, %eax
cmovnel %eax, %r15d
movl 0x1129b(%rip), %eax     # 0x19ba4
xorl %ecx, %ecx
cmpl $-0x9, %eax
cmovnel %eax, %ecx
leaq 0x11340(%rip), %rax     # 0x19c58
movl %r15d, (%rax)
movl %ecx, 0x4(%rax)
movl $0x10f, %r14d           # imm = 0x10F
cmpl $-0x1, %ecx
jne 0x8c96
leaq 0x63bc(%rip), %rdi      # 0xecf0
jmp 0x8be8
leaq 0x6018(%rip), %rcx      # 0xe958
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x103, %r14d           # imm = 0x103
jmp 0x8c96
callq 0x7e62
cmpl $-0x1, %eax
je 0x89f4
cmpl $0xa, %eax
jne 0x8954
jmp 0x8b94
leaq 0x6009(%rip), %rax      # 0xe97c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
callq 0x7e62
cmpl $0x3c, %eax
jne 0x8bb5
callq 0x7e62
cmpl $0x3c, %eax
jne 0x8bf8
movss 0x5f10(%rip), %xmm0     # 0xe8b0
jmp 0x8a3e
cmpl $0x5e, %r14d
je 0x8c8f
cmpl $0x60, %r14d
jne 0x8c8f
callq 0x7e62
movl $0x102, %r14d           # imm = 0x102
cmpl $0x60, %eax
je 0x8c96
movl %eax, %edi
callq 0x7e28
pushq $0x60
jmp 0x871c
cmpl $0x0, 0x111ba(%rip)     # 0x19b9c
je 0x8b26
andl $0x0, 0x111ad(%rip)     # 0x19b9c
movl %r14d, %edi
jmp 0x8a70
movl $0x108, %r14d           # imm = 0x108
jmp 0x8c96
andl $0x0, 0x11196(%rip)     # 0x19b9c
callq 0x7e62
movl $0x101, %r14d           # imm = 0x101
cmpl $0x26, %eax
je 0x8c96
movl %eax, %edi
callq 0x7e28
pushq $0x26
jmp 0x871c
callq 0x7e62
cmpl $0x3e, %eax
jne 0x8bba
movsd 0x5e42(%rip), %xmm0     # 0xe880
movaps %xmm0, 0x10(%rsp)
callq 0x7e62
movaps 0x10(%rsp), %xmm0
jmp 0x8c00
movl %eax, %edi
callq 0x7e28
cmpl $0x0, 0x1113c(%rip)     # 0x19b9c
je 0x8bc3
andl $0x0, 0x1112f(%rip)     # 0x19b9c
pushq $0x5c
popq %rdi
callq 0x7e28
pushq $0x5e
jmp 0x871c
movl $0x1, 0x11116(%rip)     # 0x19b9c
xorl %r14d, %r14d
callq 0x7e62
cmpl $0x27, %eax
jne 0x8aa8
callq 0x7e62
cmpl $0x27, %eax
jne 0x8b3f
movb $0x27, (%rbx,%r14)
jmp 0x8ac0
movb %al, (%rbx,%r14)
cmpl $0xa, %eax
je 0x8abb
cmpl $-0x1, %eax
jne 0x8ac0
jmp 0x8bda
callq 0x830c
incq %r14
movq 0x10876(%rip), %rsi     # 0x19340
cmpq %rsi, %r14
jb 0x8a89
addq %rsi, %rsi
movq %rsi, 0x10867(%rip)     # 0x19340
movq %rbx, %rdi
callq 0x9acc
movq %rax, %rbx
movq %rax, 0x1109d(%rip)     # 0x19b88
jmp 0x8a89
movb $0x1, 0x1108c(%rip)     # 0x19b80
callq 0x7e62
cmpl $0x22, %eax
je 0x8b10
cmpl $0x23, %eax
je 0x8c65
cmpl $0x5e, %eax
jne 0x8c6d
movl $0x109, %r14d           # imm = 0x109
jmp 0x8c96
movl $0x113, %r14d           # imm = 0x113
jmp 0x8c96
movl $0x1, 0x1106c(%rip)     # 0x19b9c
xorl %ebp, %ebp
movl $0x0, 0x10(%rsp)
jmp 0x8ca8
movl %eax, %edi
callq 0x7e28
movb $0x0, (%rbx,%r14)
movq %rbx, %rdi
callq 0x30f0
leaq 0x1(%rax), %rdi
callq 0x9928
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3070
leaq 0x110e7(%rip), %rax     # 0x19c58
movq %r14, (%rax)
andq $0x0, 0x8(%rax)
movl $0x1, 0x10(%rax)
jmp 0x8f44
cmpl $0xa, %r14d
je 0x8b94
cmpl $0x5e, %r14d
jmp 0x8c8f
incl 0x10ffe(%rip)           # 0x19b98
movb $0x1, 0x10ff3(%rip)     # 0x19b94
pushq $0xa
popq %r14
jmp 0x8c8f
movl $0x115, %r14d           # imm = 0x115
jmp 0x8c96
xorps %xmm0, %xmm0
jmp 0x8c00
movaps 0x5caf(%rip), %xmm0     # 0xe870
jmp 0x8c00
xorl %ebp, %ebp
callq 0x7e62
movl %eax, %r14d
movl $0x0, 0x10(%rsp)
jmp 0x8d2c
andl $0x0, 0x10fbb(%rip)     # 0x19b9c
leaq 0x60f3(%rip), %rdi      # 0xecdb
callq 0x8f5a
movl $0x118, %r14d           # imm = 0x118
jmp 0x8c96
movss 0x5cb4(%rip), %xmm0     # 0xe8b4
leaq 0x11051(%rip), %rbx     # 0x19c58
movlps %xmm0, (%rbx)
andl $0x0, 0x10f8b(%rip)     # 0x19b9c
movl %eax, %edi
callq 0x8f7b
movl $0x118, %r14d           # imm = 0x118
cmpb $0x0, 0x10f6b(%rip)     # 0x19b90
jne 0x8c96
movl 0x10f77(%rip), %ecx     # 0x19ba4
movl 0x10f6d(%rip), %eax     # 0x19ba0
cmpl $-0x9, %ecx
jne 0x8c4c
cmpl $-0x9, %eax
jne 0x8c5a
cmpl $0x2, (%rbx)
movl $0x111, %r14d           # imm = 0x111
sbbl $0x0, %r14d
jmp 0x8c96
movl %eax, 0x4(%rbx)
movl %ecx, 0x8(%rbx)
movl $0x106, %r14d           # imm = 0x106
jmp 0x8c96
movl %eax, 0x4(%rbx)
movl $0x111, %r14d           # imm = 0x111
jmp 0x8c96
movl $0x105, %r14d           # imm = 0x105
jmp 0x8c96
movl %eax, %edi
callq 0x7e28
pushq $0x24
jmp 0x871c
cmpl $0x1, 0x10f1a(%rip)     # 0x19b9c
movl $0x112, %eax            # imm = 0x112
pushq $0x28
popq %r14
cmovel %eax, %r14d
andl $0x0, 0x10f06(%rip)     # 0x19b9c
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incq %rbp
movabsq $0x2000000200001, %r13  # imm = 0x2000000200001
movq %rbp, %rax
movq %rax, %rbp
movb %r14b, -0x1(%rbx,%rax)
addl $-0x2a, %r14d
cmpl $0x31, %r14d
ja 0x8cd5
btq %r14, %r13
jae 0x8cd5
movl %r15d, 0x10(%rsp)
movq 0x10664(%rip), %rsi     # 0x19340
cmpq %rsi, %rbp
jb 0x8cfd
addq %rsi, %rsi
movq %rsi, 0x10655(%rip)     # 0x19340
movq %rbx, %rdi
callq 0x9acc
movq %rax, %rbx
movq %rax, 0x10e8b(%rip)     # 0x19b88
callq 0x7e62
movl %eax, %r14d
cmpl $-0x1, %eax
je 0x8d19
movzbl %r14b, %ecx
leaq 0x1(%rbp), %rax
cmpb $0x0, (%r12,%rcx)
je 0x8cb8
cmpl $0x5c, %r14d
jne 0x8d8d
callq 0x7e62
cmpl $0xa, %eax
je 0x8d84
movl %eax, %r14d
cmpb $0x0, 0xf(%rsp)
jne 0x8d78
movb $0x5c, (%rbx,%rbp)
incq %rbp
movq 0x105ff(%rip), %rsi     # 0x19340
cmpq %rsi, %rbp
jb 0x8d62
addq %rsi, %rsi
movq %rsi, 0x105f0(%rip)     # 0x19340
movq %rbx, %rdi
callq 0x9acc
movq %rax, %rbx
movq %rax, 0x10e26(%rip)     # 0x19b88
movzbl %r14b, %eax
leaq 0x5c53(%rip), %rcx      # 0xe9c0
cmpb $0x0, (%rax,%rcx)
jne 0x8d19
jmp 0x8ca8
movl %r14d, %edi
callq 0x7e28
pushq $0x5c
jmp 0x8d8b
callq 0x830c
pushq $0x20
popq %r14
movl %r14d, %edi
callq 0x7e28
movb $0x0, (%rbx,%rbp)
movl $0x2, 0x10df9(%rip)     # 0x19b9c
movzbl (%rbx), %eax
cmpq $0x2, %rbp
jne 0x8dd6
leal -0x63(%rax), %ecx
cmpl $0x6, %ecx
ja 0x8e1d
leaq 0x5be9(%rip), %rax      # 0xe9a4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl $0x10a, %r14d           # imm = 0x10A
cmpb $0x6e, 0x1(%rbx)
je 0x8c96
jmp 0x8dfb
cmpl $0x63, %eax
je 0x8e6b
cmpl $0x65, %eax
je 0x8e4d
cmpl $0x77, %eax
je 0x8e2b
cmpl $0x73, %eax
je 0x8e89
cmpl $0x66, %eax
jne 0x8ec4
leaq 0x5ebe(%rip), %rsi      # 0xecc0
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
jne 0x8ec4
movl $0x10b, %r14d           # imm = 0x10B
jmp 0x8c96
cmpl $0x73, %eax
je 0x8e89
cmpl $0x77, %eax
jne 0x8ec4
leaq 0x5e9e(%rip), %rsi      # 0xecd0
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
jne 0x8ec4
movl $0x116, %r14d           # imm = 0x116
jmp 0x8c96
leaq 0x5e70(%rip), %rsi      # 0xecc4
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
jne 0x8ec4
movl $0x107, %r14d           # imm = 0x107
jmp 0x8c96
leaq 0x5e64(%rip), %rsi      # 0xecd6
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
jne 0x8ec4
movl $0x104, %r14d           # imm = 0x104
jmp 0x8c96
leaq 0x5e39(%rip), %rsi      # 0xecc9
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
jne 0x8ec4
movl $0x114, %r14d           # imm = 0x114
jmp 0x8c96
movzbl 0x1(%rbx), %eax
cmpl $0x66, %eax
je 0x8f4f
cmpl $0x6e, %eax
jne 0x8ec4
movl $0x10d, %r14d           # imm = 0x10D
jmp 0x8c96
movl $0x1, 0x10cce(%rip)     # 0x19b9c
movq %rbx, %rdi
callq 0x30f0
leaq 0x1(%rax), %rdi
callq 0x9928
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3070
leaq 0x10d64(%rip), %r15     # 0x19c58
movq %r14, (%r15)
cmpl $0x0, 0x10(%rsp)
je 0x8f3a
movq %rbx, %rdi
callq 0x30f0
leaq 0x1(%rax), %rdi
callq 0x9928
movq %rax, 0x8(%r15)
xorl %ecx, %ecx
movzbl (%rbx,%rcx), %edx
movb $0x1, %sil
cmpl $0x3f, %edx
je 0x8f31
cmpl $0x5b, %edx
je 0x8f31
testl %edx, %edx
je 0x8f3f
cmpb $0x2a, %dl
sete %sil
movb %sil, (%rax,%rcx)
incq %rcx
jmp 0x8f15
andq $0x0, 0x8(%r15)
andl $0x0, 0x10(%r15)
movl $0x117, %r14d           # imm = 0x117
jmp 0x8c96
movl $0x10c, %r14d           # imm = 0x10C
jmp 0x8c96