// File: /workspace/github_c_makefile_star2_O3/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 $0x18, %rsp
cmpb $0x1, 0x11049(%rip)     # 0x19b90
jne 0x8b5b
movb $0x0, 0x11040(%rip)     # 0x19b90
movl $0xa, %r14d
jmp 0x9073
movq 0x11026(%rip), %rbx     # 0x19b88
movb 0x11017(%rip), %bpl     # 0x19b80
leaq 0x6f50(%rip), %r15      # 0xfac0
leaq 0x6e49(%rip), %rax      # 0xf9c0
testb %bpl, %bpl
cmoveq %rax, %r15
cmpb $0x1, 0x1100f(%rip)     # 0x19b94
jne 0x8b99
decl 0x1100b(%rip)           # 0x19b98
callq 0x871a
movb $0x0, 0x10ffb(%rip)     # 0x19b94
leaq 0x6d20(%rip), %r12      # 0xf8c0
leaq 0x6d89(%rip), %r13      # 0xf930
callq 0x8254
cmpl $0x9, %eax
je 0x8bbf
movl %eax, %r14d
cmpl $0x28, %eax
je 0x8bdc
cmpl $0x20, %r14d
jne 0x8bcb
movl $0x0, 0x10fd3(%rip)     # 0x19b9c
jmp 0x8ba7
movb $0x0, 0x10fae(%rip)     # 0x19b80
cmpl $-0x1, %r14d
je 0x8e3e
movzbl %r14b, %eax
cmpb $0x0, (%r15,%rax)
je 0x8e18
cmpl $0x3a, %r14d
jle 0x8c14
cmpl $0x5d, %r14d
jg 0x8c2a
leal -0x3b(%r14), %eax
cmpl $0x5, %eax
ja 0x8cd9
leaq 0x6cd9(%rip), %rcx      # 0xf8e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leal -0x21(%r14), %eax
cmpl $0x8, %eax
ja 0x901f
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
leal -0x7b(%r14), %eax
cmpl $0x3, %eax
ja 0x8c43
leaq 0x6cc2(%rip), %rcx      # 0xf8fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x60, %r14d
jne 0x903a
cmpl $0x0, 0x10f48(%rip)     # 0x19b9c
jne 0x8e21
cmpl $0x5b, %r14d
jg 0x8c73
leal -0x3b(%r14), %eax
cmpl $0x5, %eax
ja 0x8c96
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
cmpl $0x7a, %r14d
jle 0x8cce
leal -0x7b(%r14), %eax
cmpl $0x3, %eax
ja 0x9069
leaq 0x6cbb(%rip), %rcx      # 0xf948
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leal -0x21(%r14), %eax
cmpl $0x8, %eax
ja 0x9069
leaq 0x6c62(%rip), %rcx      # 0xf90c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x2, 0x10edf(%rip)     # 0x19b9c
cmpl $0x5d, %r14d
jg 0x8cfb
cmpl $0x5c, %r14d
je 0x8ce3
jmp 0x8de0
cmpl $0x5c, %r14d
je 0x8ce3
jmp 0x8d9b
cmpl $0x5c, %r14d
jne 0x9069
callq 0x8254
cmpl $0xa, %eax
jne 0x8eff
callq 0x871a
jmp 0x8ba7
leal -0x7b(%r14), %eax
cmpl $0x3, %eax
ja 0x8d9b
leaq 0x6c85(%rip), %rcx      # 0xf994
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, 0x10e7a(%rip)     # 0x19b9c
callq 0x8254
movl $0x10e, %r14d           # imm = 0x10E
cmpl $0x7c, %eax
je 0x9073
movl %eax, %edi
callq 0x943d
movl $0x118, %r14d           # imm = 0x118
cmpb $0x0, 0x10e46(%rip)     # 0x19b90
jne 0x9073
movl 0x10e4a(%rip), %eax     # 0x19ba0
cmpl $-0x9, %eax
movl $0x1, %ecx
cmovnel %eax, %ecx
movl 0x10e3d(%rip), %eax     # 0x19ba4
xorl %edx, %edx
cmpl $-0x9, %eax
cmovnel %eax, %edx
leaq 0x10ee2(%rip), %rax     # 0x19c58
movl %ecx, (%rax)
movl %edx, 0x4(%rax)
movl $0x10f, %r14d           # imm = 0x10F
cmpl $-0x1, %edx
jne 0x9073
callq 0x8498
leaq 0x6f5a(%rip), %rdi      # 0xfcf0
jmp 0x9116
cmpl $0x5e, %r14d
je 0x9069
cmpl $0x60, %r14d
jne 0x9069
callq 0x8254
movl $0x102, %r14d           # imm = 0x102
cmpl $0x60, %eax
je 0x9073
movl %eax, %edi
callq 0x8218
movl $0x60, %r14d
jmp 0x9073
movl $0x115, %r14d           # imm = 0x115
jmp 0x9073
leal -0x21(%r14), %eax
cmpl $0x8, %eax
ja 0x8e49
leaq 0x6b68(%rip), %rcx      # 0xf958
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x103, %r14d           # imm = 0x103
jmp 0x9073
callq 0x8254
cmpl $-0x1, %eax
je 0x8e3e
cmpl $0xa, %eax
jne 0x8e04
jmp 0x9025
cmpl $0x0, 0x10d7d(%rip)     # 0x19b9c
je 0x8e8e
movl $0x0, 0x10d71(%rip)     # 0x19b9c
movl %r14d, %edi
callq 0x8218
movl $0x5e, %r14d
jmp 0x9073
movl $0x108, %r14d           # imm = 0x108
jmp 0x9073
movl %r14d, %eax
addl $-0x3b, %eax
cmpl $0x5, %eax
ja 0x9069
leaq 0x6b1d(%rip), %rcx      # 0xf97c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x8254
cmpl $0x3c, %eax
jne 0x8fce
callq 0x8254
cmpl $0x3c, %eax
jne 0x908d
movss 0x6a24(%rip), %xmm0     # 0xf8b0
jmp 0x8eed
movb %bpl, (%rsp)
movl $0x1, 0x10d00(%rip)     # 0x19b9c
xorl %r12d, %r12d
xorl %r13d, %r13d
jmp 0x9151
movl $0x0, 0x10ceb(%rip)     # 0x19b9c
callq 0x8254
movl $0x101, %r14d           # imm = 0x101
cmpl $0x26, %eax
je 0x9073
movl %eax, %edi
callq 0x8218
movl $0x26, %r14d
jmp 0x9073
callq 0x8254
cmpl $0x3e, %eax
jne 0x8fc2
movsd 0x6993(%rip), %xmm0     # 0xf880
movaps %xmm0, (%rsp)
callq 0x8254
movaps (%rsp), %xmm0
jmp 0x9095
movl %eax, %edi
callq 0x8218
cmpl $0x0, 0x10c8f(%rip)     # 0x19b9c
je 0x9040
movl $0x0, 0x10c7f(%rip)     # 0x19b9c
movl $0x5c, %edi
jmp 0x8e2e
movb $0x1, 0x10c52(%rip)     # 0x19b80
callq 0x8254
cmpl $0x22, %eax
je 0x8f4a
cmpl $0x23, %eax
je 0x9134
cmpl $0x5e, %eax
jne 0x913f
movl $0x109, %r14d           # imm = 0x109
jmp 0x9073
movl $0x1, 0x10c3d(%rip)     # 0x19b9c
xorl %r14d, %r14d
callq 0x8254
cmpl $0x27, %eax
jne 0x8f7d
callq 0x8254
cmpl $0x27, %eax
jne 0x8fd6
movb $0x27, (%rbx,%r14)
jmp 0x8f95
movb %al, (%rbx,%r14)
cmpl $0xa, %eax
je 0x8f90
cmpl $-0x1, %eax
jne 0x8f95
jmp 0x9100
callq 0x871a
incq %r14
movq 0x103a1(%rip), %rsi     # 0x19340
cmpq %rsi, %r14
jb 0x8f62
addq %rsi, %rsi
movq %rsi, 0x10392(%rip)     # 0x19340
movq %rbx, %rdi
callq 0xa05a
movq %rax, %rbx
movq %rax, 0x10bc8(%rip)     # 0x19b88
jmp 0x8f62
movaps 0x68a7(%rip), %xmm0     # 0xf870
jmp 0x9095
xorps %xmm0, %xmm0
jmp 0x9095
movl %eax, %edi
callq 0x8218
movb $0x0, (%rbx,%r14)
movq %rbx, %rdi
callq 0x30f0
leaq 0x1(%rax), %rdi
callq 0x9e80
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3070
leaq 0x10c50(%rip), %rax     # 0x19c58
movq %r14, (%rax)
movq $0x0, 0x8(%rax)
movl $0x1, 0x10(%rax)
jmp 0x9406
cmpl $0xa, %r14d
jne 0x9069
incl 0x10b6d(%rip)           # 0x19b98
movb $0x1, 0x10b62(%rip)     # 0x19b94
movl $0xa, %r14d
jmp 0x9069
cmpl $0x5e, %r14d
jmp 0x9069
xorl %r12d, %r12d
callq 0x8254
movl %eax, %r14d
xorl %r13d, %r13d
jmp 0x91db
cmpl $0x1, 0x10b42(%rip)     # 0x19b9c
movl $0x112, %eax            # imm = 0x112
movl $0x28, %r14d
cmovel %eax, %r14d
movl $0x0, 0x10b29(%rip)     # 0x19b9c
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x113, %r14d           # imm = 0x113
jmp 0x9073
movss 0x681f(%rip), %xmm0     # 0xf8b4
leaq 0x10bbc(%rip), %rbx     # 0x19c58
movlps %xmm0, (%rbx)
movl $0x0, 0x10af3(%rip)     # 0x19b9c
movl %eax, %edi
callq 0x943d
movl $0x118, %r14d           # imm = 0x118
cmpb $0x0, 0x10ad3(%rip)     # 0x19b90
jne 0x9073
movl 0x10adf(%rip), %ecx     # 0x19ba4
movl 0x10ad5(%rip), %eax     # 0x19ba0
cmpl $-0x9, %ecx
jne 0x90e4
cmpl $-0x9, %eax
jne 0x90f2
cmpl $0x2, (%rbx)
movl $0x111, %r14d           # imm = 0x111
sbbl $0x0, %r14d
jmp 0x9073
movl %eax, 0x4(%rbx)
movl %ecx, 0x8(%rbx)
movl $0x106, %r14d           # imm = 0x106
jmp 0x9073
movl %eax, 0x4(%rbx)
movl $0x111, %r14d           # imm = 0x111
jmp 0x9073
movl $0x0, 0x10a92(%rip)     # 0x19b9c
callq 0x8498
leaq 0x6bc5(%rip), %rdi      # 0xfcdb
callq 0x952f
movb $0x1, %al
movb %al, 0x10a85(%rip)      # 0x19ba8
movb %al, 0x10a67(%rip)      # 0x19b90
movl $0x118, %r14d           # imm = 0x118
jmp 0x9073
movl $0x105, %r14d           # imm = 0x105
jmp 0x9073
movl %eax, %edi
callq 0x8218
movl $0x24, %r14d
jmp 0x9073
incq %r12
movabsq $0x2000000200001, %rbp  # imm = 0x2000000200001
movq %r12, %rax
movq %rax, %r12
movb %r14b, -0x1(%rbx,%rax)
addl $-0x2a, %r14d
cmpl $0x31, %r14d
ja 0x917f
btq %r14, %rbp
jae 0x917f
movl $0x1, %r13d
movq 0x101ba(%rip), %rsi     # 0x19340
cmpq %rsi, %r12
jb 0x91a7
addq %rsi, %rsi
movq %rsi, 0x101ab(%rip)     # 0x19340
movq %rbx, %rdi
callq 0xa05a
movq %rax, %rbx
movq %rax, 0x109e1(%rip)     # 0x19b88
callq 0x8254
movl %eax, %r14d
cmpl $-0x1, %eax
je 0x91c4
movzbl %r14b, %ecx
leaq 0x1(%r12), %rax
cmpb $0x0, (%r15,%rcx)
je 0x9161
cmpl $0x5c, %r14d
jne 0x9245
callq 0x8254
cmpl $0xa, %eax
je 0x923a
movl %eax, %r14d
movb (%rsp), %bpl
testb %bpl, %bpl
movb %bpl, (%rsp)
jne 0x922a
movb $0x5c, (%rbx,%r12)
incq %r12
movq 0x1014d(%rip), %rsi     # 0x19340
cmpq %rsi, %r12
jb 0x9214
addq %rsi, %rsi
movq %rsi, 0x1013e(%rip)     # 0x19340
movq %rbx, %rdi
callq 0xa05a
movq %rax, %rbx
movq %rax, 0x10974(%rip)     # 0x19b88
movzbl %r14b, %eax
leaq 0x67a1(%rip), %rcx      # 0xf9c0
cmpb $0x0, (%rax,%rcx)
jne 0x91c4
jmp 0x9151
movl %r14d, %edi
callq 0x8218
movl $0x5c, %r14d
jmp 0x9245
callq 0x871a
movl $0x20, %r14d
movl %r14d, %edi
callq 0x8218
movb $0x0, (%rbx,%r12)
movl $0x2, 0x10940(%rip)     # 0x19b9c
movzbl (%rbx), %eax
cmpq $0x2, %r12
jne 0x9293
leal -0x63(%rax), %ecx
cmpl $0x6, %ecx
ja 0x9301
leaq 0x672c(%rip), %rax      # 0xf9a4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl $0x10a, %r14d           # imm = 0x10A
cmpb $0x6e, 0x1(%rbx)
je 0x9073
jmp 0x92af
cmpl $0x65, %eax
jle 0x92d1
cmpl $0x77, %eax
je 0x930b
cmpl $0x73, %eax
je 0x9347
cmpl $0x66, %eax
jne 0x9382
leaq 0x6a0a(%rip), %rsi      # 0xfcc0
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
jne 0x9382
movl $0x10b, %r14d           # imm = 0x10B
jmp 0x9073
cmpl $0x63, %eax
je 0x9329
cmpl $0x65, %eax
jne 0x9382
leaq 0x69de(%rip), %rsi      # 0xfcc4
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
jne 0x9382
movl $0x107, %r14d           # imm = 0x107
jmp 0x9073
cmpl $0x73, %eax
je 0x9347
cmpl $0x77, %eax
jne 0x9382
leaq 0x69be(%rip), %rsi      # 0xfcd0
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
jne 0x9382
movl $0x116, %r14d           # imm = 0x116
jmp 0x9073
leaq 0x69a6(%rip), %rsi      # 0xfcd6
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
jne 0x9382
movl $0x104, %r14d           # imm = 0x104
jmp 0x9073
leaq 0x697b(%rip), %rsi      # 0xfcc9
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
jne 0x9382
movl $0x114, %r14d           # imm = 0x114
jmp 0x9073
movzbl 0x1(%rbx), %eax
cmpl $0x66, %eax
je 0x9411
cmpl $0x6e, %eax
jne 0x9382
movl $0x10d, %r14d           # imm = 0x10D
jmp 0x9073
movl $0x1, 0x10810(%rip)     # 0x19b9c
movq %rbx, %rdi
callq 0x30f0
leaq 0x1(%rax), %rdi
callq 0x9e80
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3070
leaq 0x108a6(%rip), %r15     # 0x19c58
movq %r14, (%r15)
testl %r13d, %r13d
je 0x93f6
movq %rbx, %rdi
callq 0x30f0
leaq 0x1(%rax), %rdi
callq 0x9e80
movq %rax, 0x8(%r15)
xorl %ecx, %ecx
movzbl (%rbx,%rcx), %edx
movb $0x1, %sil
cmpl $0x3f, %edx
je 0x93ed
cmpl $0x5b, %edx
je 0x93ed
testl %edx, %edx
je 0x93fe
cmpb $0x2a, %dl
sete %sil
movb %sil, (%rax,%rcx)
incq %rcx
jmp 0x93d1
movq $0x0, 0x8(%r15)
movl $0x0, 0x10(%r15)
movl $0x117, %r14d           # imm = 0x117
jmp 0x9073
movl $0x10c, %r14d           # imm = 0x10C
jmp 0x9073