// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: get_word
static int
get_word(void)
{
	int c, c1;

	*wordp++ = linep;

	for (;;) {
		switch (c = xgetc(DOLSUB)) {
		case EOF:
			return EOF;

		case SPACE:
		case TAB:
			continue;

		case DQUOT:
		case SQUOT:
			c1 = c;
			*linep++ = c;
			while ((c = xgetc(!DOLSUB)) != c1) {
				if (c == EOF)
					return EOF;
				if (c == EOL) {
					if (!error)
						error_message = ERR_SYNTAX;
					peekc = c;
					*linep++ = EOS;
					error = true;
					return 1;
				}
				if (c == BQUOT) {
					if ((c = xgetc(!DOLSUB)) == EOF)
						return EOF;
					if (c == EOL)
						c = SPACE;
					else {
						peekc = c;
						c = BQUOT;
					}
				}
				*linep++ = c;
			}
			*linep++ = c;
			break;

		case BQUOT:
			if ((c = xgetc(!DOLSUB)) == EOF)
				return EOF;
			if (c == EOL)
				continue;
			*linep++ = BQUOT;
			*linep++ = c;
			break;

		case LPARENTHESIS: case RPARENTHESIS:
		case SEMICOLON:    case AMPERSAND:
		case VERTICALBAR:  case CARET:
		case LESSTHAN:     case GREATERTHAN:
		case EOL:
			*linep++ = c;
			*linep++ = EOS;
			return 1;

		default:
			peekc = c;
		}

		for (;;) {
			if ((c = xgetc(DOLSUB)) == EOF)
				return EOF;
			if (c == BQUOT) {
				if ((c = xgetc(!DOLSUB)) == EOF)
					return EOF;
				if (c == EOL)
					c = SPACE;
				else {
					*linep++ = BQUOT;
					*linep++ = c;
					continue;
				}
			}
			if (any(c, WORDPACK)) {
				peekc = c;
				if (any(c, QUOTPACK))
					break;
				*linep++ = EOS;
				return 1;
			}
			*linep++ = c;
		}
	}
	/*NOTREACHED*/
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x97b3(%rip), %rax      # 0xca80
movq 0xb7bc(%rip), %rcx      # 0xea90
leaq 0x8(%rcx), %rdx
movq %rdx, 0xb7b1(%rip)      # 0xea90
movq %rax, (%rcx)
pushq $0x1
popq %rbx
pushq $0x20
popq %r12
leaq 0x4f82(%rip), %r14      # 0x8272
movabsq $0x100000200, %r13      # imm = 0x100000200
pushq $0x5c
popq %r15
movl %ebx, %edi
callq 0x4a3c
movl %eax, %ebp
cmpl $0x3e, %eax
ja 0x339e
movl %ebp, %eax
btq %rax, %r13
jb 0x32fe
movabsq $0x8400000000, %rcx     # imm = 0x8400000000
btq %rax, %rcx
jae 0x338a
movl %ebp, %eax
movq 0x974f(%rip), %rcx      # 0xca80
leaq 0x1(%rcx), %rdx
movq %rdx, 0x9744(%rip)      # 0xca80
movb %al, (%rcx)
xorl %edi, %edi
callq 0x4a3c
cmpl %ebp, %eax
je 0x344d
cmpl $0x5c, %eax
je 0x3365
cmpl $-0x1, %eax
je 0x3497
cmpl $0xa, %eax
jne 0x332a
jmp 0x349b
xorl %edi, %edi
callq 0x4a3c
movl %eax, %ecx
movl %r12d, %eax
cmpl $0xa, %ecx
je 0x332a
cmpl $-0x1, %ecx
je 0x34f7
movl %ecx, 0xb73b(%rip)      # 0xeac0
movl %r15d, %eax
jmp 0x332a
movabsq $0x5800034000000400, %rcx # imm = 0x5800034000000400
btq %rax, %rcx
jb 0x34da
cmpl $0x5c, %ebp
je 0x33c6
cmpl $-0x1, %ebp
je 0x34f9
cmpl $0x5e, %ebp
je 0x34da
cmpl $0x7c, %ebp
je 0x34da
movl %ebp, 0xb6fc(%rip)      # 0xeac0
jmp 0x33fa
xorl %edi, %edi
callq 0x4a3c
cmpl $0xa, %eax
je 0x32fe
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x34f9
movq 0x9698(%rip), %rax      # 0xca80
movb $0x5c, (%rax)
leaq 0x2(%rax), %rcx
movq %rcx, 0x968a(%rip)      # 0xca80
movb %bpl, 0x1(%rax)
movl %ebx, %edi
callq 0x4a3c
cmpl $0x5c, %eax
jne 0x3434
xorl %edi, %edi
callq 0x4a3c
movl %r12d, %ebp
cmpl $0xa, %eax
je 0x343f
cmpl $-0x1, %eax
je 0x3497
movq 0x965f(%rip), %rcx      # 0xca80
movb $0x5c, (%rcx)
leaq 0x2(%rcx), %rdx
movq %rdx, 0x9651(%rip)      # 0xca80
movb %al, 0x1(%rcx)
jmp 0x33fa
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x34f9
movl %ebp, %edi
movq %r14, %rsi
callq 0x4d6a
testb %al, %al
jne 0x3464
movq 0x962c(%rip), %rax      # 0xca80
leaq 0x1(%rax), %rcx
movq %rcx, 0x9621(%rip)      # 0xca80
movb %bpl, (%rax)
jmp 0x33fa
movl %ebp, 0xb656(%rip)      # 0xeac0
movl %ebp, %edi
leaq 0x4e0d(%rip), %rsi      # 0x8280
callq 0x4d6a
testb %al, %al
jne 0x32fe
movq 0x95f9(%rip), %rax      # 0xca80
leaq 0x1(%rax), %rcx
movq %rcx, 0x95ee(%rip)      # 0xca80
movb $0x0, (%rax)
jmp 0x34f3
movl %eax, %ebp
jmp 0x34f9
cmpb $0x0, 0xb5fe(%rip)      # 0xeaa0
jne 0x34b2
leaq 0x4dba(%rip), %rax      # 0x8265
movq %rax, 0xb5f6(%rip)      # 0xeaa8
movl $0xa, 0xb604(%rip)      # 0xeac0
movq 0x95bd(%rip), %rax      # 0xca80
leaq 0x1(%rax), %rcx
movq %rcx, 0x95b2(%rip)      # 0xca80
movb $0x0, (%rax)
movb $0x1, 0xb5c8(%rip)      # 0xeaa0
jmp 0x34f3
movq 0x959f(%rip), %rax      # 0xca80
movb %bpl, (%rax)
leaq 0x2(%rax), %rcx
movq %rcx, 0x9591(%rip)      # 0xca80
movb $0x0, 0x1(%rax)
movl %ebx, %ebp
jmp 0x34f9
movl %ecx, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq