// File: /workspace/github_c_makefile_star2_O1/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
pushq %rax
cmpb $0x1, 0x10fb4(%rip)     # 0x19b90
jne 0x8bf0
movb $0x0, 0x10fab(%rip)     # 0x19b90
movl $0xa, %r14d
jmp 0x94a0
movq 0x10f91(%rip), %rbx     # 0x19b88
movb 0x10f82(%rip), %bpl     # 0x19b80
leaq 0x6e6b(%rip), %rax      # 0xfa70
leaq 0x6d64(%rip), %r12      # 0xf970
testb %bpl, %bpl
cmovneq %rax, %r12
cmpb $0x1, 0x10f7a(%rip)     # 0x19b94
jne 0x8c2e
decl 0x10f76(%rip)           # 0x19b98
callq 0x87b7
movb $0x0, 0x10f66(%rip)     # 0x19b94
leaq 0x6c4b(%rip), %r15      # 0xf880
leaq 0x6cb4(%rip), %r13      # 0xf8f0
callq 0x82e4
cmpl $0x9, %eax
je 0x8c54
movl %eax, %r14d
cmpl $0x28, %eax
je 0x8c71
cmpl $0x20, %r14d
jne 0x8c60
movl $0x0, 0x10f3e(%rip)     # 0x19b9c
jmp 0x8c3c
movb $0x0, 0x10f19(%rip)     # 0x19b80
cmpl $-0x1, %r14d
je 0x8f11
movzbl %r14b, %eax
cmpb $0x0, (%r12,%rax)
je 0x8ef2
cmpl $0x3a, %r14d
jle 0x8ca9
cmpl $0x5d, %r14d
jg 0x8cbf
leal -0x3b(%r14), %eax
cmpl $0x5, %eax
ja 0x8d62
leaq 0x6c04(%rip), %rcx      # 0xf8a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leal -0x21(%r14), %eax
cmpl $0x8, %eax
ja 0x8f1c
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
leal -0x7b(%r14), %eax
cmpl $0x3, %eax
ja 0x8cd8
leaq 0x6bed(%rip), %rcx      # 0xf8bc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x60, %r14d
jne 0x91be
cmpl $0x0, 0x10eb3(%rip)     # 0x19b9c
jne 0x8eff
cmpl $0x5b, %r14d
jg 0x8d08
leal -0x3b(%r14), %eax
cmpl $0x5, %eax
ja 0x8d2b
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
cmpl $0x7a, %r14d
jle 0x8d6d
leal -0x7b(%r14), %eax
cmpl $0x3, %eax
ja 0x8f71
leaq 0x6be6(%rip), %rcx      # 0xf908
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leal -0x21(%r14), %eax
cmpl $0x8, %eax
ja 0x8f1c
leaq 0x6b8d(%rip), %rcx      # 0xf8cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x2, 0x10e4a(%rip)     # 0x19b9c
cmpl $0x5b, %r14d
jle 0x8d8f
cmpl $0x5d, %r14d
jg 0x8e18
cmpl $0x5c, %r14d
je 0x8d77
jmp 0x8f71
cmpl $0x5c, %r14d
jne 0x8eb8
callq 0x82e4
cmpl $0xa, %eax
jne 0x8fa9
callq 0x87b7
jmp 0x8c3c
leal -0x21(%r14), %eax
cmpl $0x8, %eax
ja 0x8dce
leaq 0x6b79(%rip), %rcx      # 0xf918
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x103, %r14d           # imm = 0x103
jmp 0x94a0
callq 0x82e4
cmpl $-0x1, %eax
je 0x8f11
movl %eax, %r14d
cmpl $0xa, %eax
jne 0x8db3
jmp 0x8f22
leal -0x3b(%r14), %eax
cmpl $0x5, %eax
ja 0x8f1c
leaq 0x6b5a(%rip), %rcx      # 0xf93c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x82e4
cmpl $0x3c, %eax
jne 0x90ab
callq 0x82e4
xorl %ebx, %ebx
movl $0x4, %ebp
cmpl $0x3c, %eax
je 0x8f9d
movl $0x3, %ecx
jmp 0x90af
leal -0x7b(%r14), %eax
cmpl $0x3, %eax
ja 0x8eb8
leaq 0x6b28(%rip), %rcx      # 0xf954
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, 0x10d5d(%rip)     # 0x19b9c
callq 0x82e4
movl $0x10e, %r14d           # imm = 0x10E
cmpl $0x7c, %eax
je 0x94a0
movl %eax, %edi
callq 0x94eb
movl $0x118, %r14d           # imm = 0x118
cmpb $0x0, 0x10d29(%rip)     # 0x19b90
jne 0x94a0
movl 0x10d2d(%rip), %eax     # 0x19ba0
cmpl $-0x9, %eax
movl $0x1, %ecx
cmovnel %eax, %ecx
movl 0x10d20(%rip), %eax     # 0x19ba4
xorl %edx, %edx
cmpl $-0x9, %eax
cmovnel %eax, %edx
leaq 0x10dc5(%rip), %rax     # 0x19c58
movl %ecx, (%rax)
movl %edx, 0x4(%rax)
movl $0x10f, %r14d           # imm = 0x10F
cmpl $-0x1, %edx
jne 0x94a0
callq 0x8532
leaq 0x6ded(%rip), %rdi      # 0xfca0
jmp 0x917e
cmpl $0x5e, %r14d
je 0x8f71
cmpl $0x60, %r14d
jne 0x8f71
callq 0x82e4
movl $0x102, %r14d           # imm = 0x102
cmpl $0x60, %eax
je 0x94a0
movl %eax, %edi
callq 0x82a8
movl $0x60, %r14d
jmp 0x94a0
cmpl $0x0, 0x10ca3(%rip)     # 0x19b9c
je 0x907b
movl $0x0, 0x10c93(%rip)     # 0x19b9c
movl %r14d, %edi
jmp 0x8fcc
movl $0x108, %r14d           # imm = 0x108
jmp 0x94a0
cmpl $0xa, %r14d
jne 0x8f71
incl 0x10c70(%rip)           # 0x19b98
movb $0x1, 0x10c65(%rip)     # 0x19b94
jmp 0x8f71
movl $0x0, 0x10c61(%rip)     # 0x19b9c
callq 0x82e4
movl $0x101, %r14d           # imm = 0x101
cmpl $0x26, %eax
je 0x94a0
movl %eax, %edi
callq 0x82a8
movl $0x26, %r14d
jmp 0x94a0
cmpl $0x1, 0x10c34(%rip)     # 0x19b9c
movl $0x112, %eax            # imm = 0x112
cmovel %eax, %r14d
movl $0x0, 0x10c21(%rip)     # 0x19b9c
jmp 0x94a0
callq 0x82e4
movl $0x1, %ebx
movl $0x2, %ebp
movl $0x1, %ecx
cmpl $0x3e, %eax
jne 0x90af
callq 0x82e4
movl %ebp, %ecx
jmp 0x90af
movl %eax, %edi
callq 0x82a8
cmpl $0x0, 0x10be5(%rip)     # 0x19b9c
je 0x919c
movl $0x0, 0x10bd5(%rip)     # 0x19b9c
movl $0x5c, %edi
callq 0x82a8
movl $0x5e, %r14d
jmp 0x94a0
movb $0x1, 0x10b9d(%rip)     # 0x19b80
callq 0x82e4
cmpl $0x22, %eax
je 0x8fff
cmpl $0x23, %eax
je 0x91c7
cmpl $0x5e, %eax
jne 0x91d2
movl $0x109, %r14d           # imm = 0x109
jmp 0x94a0
movl $0x1, 0x10b88(%rip)     # 0x19b9c
xorl %r14d, %r14d
callq 0x82e4
cmpl $0x27, %eax
jne 0x9036
callq 0x82e4
movl %eax, %edi
movl $0x27, %eax
cmpl $0x27, %edi
jne 0x9121
movb %al, (%rbx,%r14)
cmpl $0xa, %eax
je 0x9049
cmpl $-0x1, %eax
jne 0x904e
jmp 0x9168
callq 0x87b7
incq %r14
movq 0x102e8(%rip), %rsi     # 0x19340
cmpq %rsi, %r14
jb 0x9017
addq %rsi, %rsi
movq %rsi, 0x102d9(%rip)     # 0x19340
movq %rbx, %rdi
callq 0xa111
movq %rax, %rbx
movq %rax, 0x10b0f(%rip)     # 0x19b88
jmp 0x9017
movb %bpl, 0x7(%rsp)
movl $0x1, 0x10b12(%rip)     # 0x19b9c
xorl %r13d, %r13d
xorl %r15d, %r15d
jmp 0x91e4
movl $0x113, %r14d           # imm = 0x113
jmp 0x94a0
movl $0x115, %r14d           # imm = 0x115
jmp 0x94a0
xorl %ecx, %ecx
xorl %ebx, %ebx
leaq 0x10ba2(%rip), %r15     # 0x19c58
movl %ecx, (%r15)
movl %ebx, 0x4(%r15)
movl $0x0, 0x10ad5(%rip)     # 0x19b9c
movl %eax, %edi
callq 0x94eb
movl $0x118, %r14d           # imm = 0x118
cmpb $0x0, 0x10ab5(%rip)     # 0x19b90
jne 0x94a0
movl 0x10abd(%rip), %ecx     # 0x19ba4
movl 0x10ab3(%rip), %eax     # 0x19ba0
cmpl $-0x9, %ecx
jne 0x910e
cmpl $-0x9, %eax
jne 0x91af
cmpl $0x2, (%r15)
movl $0x111, %r14d           # imm = 0x111
sbbl $0x0, %r14d
jmp 0x94a0
movl %eax, 0x4(%r15)
movl %ecx, 0x8(%r15)
movl $0x106, %r14d           # imm = 0x106
jmp 0x94a0
callq 0x82a8
movb $0x0, (%rbx,%r14)
movq %rbx, %rdi
callq 0x30f0
leaq 0x1(%rax), %rdi
callq 0x9f28
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3070
leaq 0x10b07(%rip), %rax     # 0x19c58
movq %r14, (%rax)
movq $0x0, 0x8(%rax)
movl $0x1, 0x10(%rax)
jmp 0x949a
movl $0x0, 0x10a2a(%rip)     # 0x19b9c
callq 0x8532
leaq 0x6b0d(%rip), %rdi      # 0xfc8b
callq 0x95dd
movb $0x1, %al
movb %al, 0x10a1d(%rip)      # 0x19ba8
movb %al, 0x109ff(%rip)      # 0x19b90
movl $0x118, %r14d           # imm = 0x118
jmp 0x94a0
xorl %r13d, %r13d
callq 0x82e4
movl %eax, %r14d
xorl %r15d, %r15d
jmp 0x9276
movl %eax, 0x4(%r15)
movl $0x111, %r14d           # imm = 0x111
jmp 0x94a0
cmpl $0x5e, %r14d
jmp 0x8f71
movl $0x105, %r14d           # imm = 0x105
jmp 0x94a0
movl %eax, %edi
callq 0x82a8
movl $0x24, %r14d
jmp 0x94a0
incq %r13
movabsq $0x2000000200001, %rbp  # imm = 0x2000000200001
movq %r13, %rax
movq %rax, %r13
movb %r14b, -0x1(%rbx,%rax)
addl $-0x2a, %r14d
cmpl $0x31, %r14d
ja 0x9212
btq %r14, %rbp
jae 0x9212
movl $0x1, %r15d
movq 0x10127(%rip), %rsi     # 0x19340
cmpq %rsi, %r13
jb 0x923a
addq %rsi, %rsi
movq %rsi, 0x10118(%rip)     # 0x19340
movq %rbx, %rdi
callq 0xa111
movq %rax, %rbx
movq %rax, 0x1094e(%rip)     # 0x19b88
callq 0x82e4
cmpl $-0x1, %eax
je 0x9258
movl %eax, %r14d
movzbl %r14b, %ecx
leaq 0x1(%r13), %rax
cmpb $0x0, (%r12,%rcx)
je 0x91f4
jmp 0x925e
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl $0x5c, %r14d
jne 0x92db
callq 0x82e4
cmpl $0xa, %eax
je 0x92d0
movl %eax, %r14d
movb 0x7(%rsp), %bpl
testb %bpl, %bpl
movb %bpl, 0x7(%rsp)
jne 0x92c0
movb $0x5c, (%rbx,%r13)
incq %r13
movq 0x100b1(%rip), %rsi     # 0x19340
cmpq %rsi, %r13
jb 0x92b0
addq %rsi, %rsi
movq %rsi, 0x100a2(%rip)     # 0x19340
movq %rbx, %rdi
callq 0xa111
movq %rax, %rbx
movq %rax, 0x108d8(%rip)     # 0x19b88
movzbl %r14b, %eax
cmpb $0x0, (%r12,%rax)
jne 0x925e
jmp 0x91e4
movl %r14d, %edi
callq 0x82a8
movl $0x5c, %r14d
jmp 0x92db
callq 0x87b7
movl $0x20, %r14d
movl %r14d, %edi
callq 0x82a8
movb $0x0, (%rbx,%r13)
movl $0x2, 0x108aa(%rip)     # 0x19b9c
cmpq $0x2, %r13
jne 0x9336
movb (%rbx), %al
cmpb $0x69, %al
jne 0x930e
movl $0x10c, %r14d           # imm = 0x10C
cmpb $0x66, 0x1(%rbx)
je 0x94a0
cmpb $0x66, %al
jne 0x9322
movl $0x10a, %r14d           # imm = 0x10A
cmpb $0x6e, 0x1(%rbx)
je 0x94a0
cmpb $0x69, %al
jne 0x9336
movl $0x10d, %r14d           # imm = 0x10D
cmpb $0x6e, 0x1(%rbx)
je 0x94a0
movzbl (%rbx), %ebp
cmpl $0x65, %ebp
jle 0x936d
cmpl $0x77, %ebp
je 0x93df
cmpl $0x73, %ebp
je 0x93be
cmpl $0x66, %ebp
jne 0x9412
leaq 0x6914(%rip), %rsi      # 0xfc70
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
je 0x93ae
cmpl $0x72, %ebp
jg 0x93b9
cmpl $0x63, %ebp
je 0x93fb
cmpl $0x65, %ebp
jne 0x9412
leaq 0x68ee(%rip), %rsi      # 0xfc74
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
je 0x93a3
cmpl $0x63, %ebp
je 0x93fb
cmpl $0x77, %ebp
je 0x93df
cmpl $0x73, %ebp
je 0x93be
jmp 0x9412
movl $0x107, %r14d           # imm = 0x107
jmp 0x94a0
movl $0x10b, %r14d           # imm = 0x10B
jmp 0x94a0
cmpl $0x73, %ebp
jne 0x93da
leaq 0x68b4(%rip), %rsi      # 0xfc79
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
je 0x94c2
cmpl $0x63, %ebp
je 0x93fb
cmpl $0x77, %ebp
jne 0x9412
leaq 0x689a(%rip), %rsi      # 0xfc80
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
je 0x94ba
cmpl $0x63, %ebp
jne 0x9412
leaq 0x6884(%rip), %rsi      # 0xfc86
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
je 0x94b2
movl $0x1, 0x10780(%rip)     # 0x19b9c
movq %rbx, %rdi
callq 0x30f0
leaq 0x1(%rax), %rdi
callq 0x9f28
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3070
leaq 0x10816(%rip), %r12     # 0x19c58
movq %r14, (%r12)
testl %r15d, %r15d
je 0x9488
movq %rbx, %rdi
callq 0x30f0
leaq 0x1(%rax), %rdi
callq 0x9f28
movq %rax, 0x8(%r12)
xorl %ecx, %ecx
movzbl (%rbx,%rcx), %edx
movb $0x1, %sil
cmpl $0x3f, %edx
je 0x947f
cmpl $0x5b, %edx
je 0x947f
testl %edx, %edx
je 0x9491
cmpb $0x2a, %dl
sete %sil
movb %sil, (%rax,%rcx)
incq %rcx
jmp 0x9463
movq $0x0, 0x8(%r12)
movl $0x0, 0x10(%r12)
movl $0x117, %r14d           # imm = 0x117
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x104, %r14d           # imm = 0x104
jmp 0x94a0
movl $0x116, %r14d           # imm = 0x116
jmp 0x94a0
movl $0x114, %r14d           # imm = 0x114
jmp 0x94a0