// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x96ed(%rip), %rax      # 0xca80
movq 0xb6f6(%rip), %rcx      # 0xea90
leaq 0x8(%rcx), %rdx
movq %rdx, 0xb6eb(%rip)      # 0xea90
movq %rax, (%rcx)
movabsq $0x100000200, %r14      # imm = 0x100000200
movabsq $0x8400000000, %r15     # imm = 0x8400000000
movabsq $0x5800034000000400, %r12 # imm = 0x5800034000000400
leaq 0x5ea5(%rip), %r13      # 0x9272
movl $0x1, %edi
callq 0x3dae
movl %eax, %ebx
cmpl $0x5b, %eax
jg 0x3475
cmpl $0x3e, %ebx
ja 0x34cc
movl %ebx, %eax
btq %rax, %r14
jb 0x33cd
btq %rax, %r15
jae 0x34c2
movq 0x967c(%rip), %rax      # 0xca80
leaq 0x1(%rax), %rcx
movq %rcx, 0x9671(%rip)      # 0xca80
movb %bl, (%rax)
xorl %edi, %edi
callq 0x3dae
cmpl %ebx, %eax
je 0x353a
cmpl $0x5c, %eax
je 0x3438
cmpl $-0x1, %eax
je 0x357f
cmpl $0xa, %eax
jne 0x345f
jmp 0x359d
xorl %edi, %edi
callq 0x3dae
movl %eax, %ecx
movl $0x20, %eax
cmpl $0xa, %ecx
je 0x345f
cmpl $-0x1, %ecx
je 0x35eb
movl %ecx, 0xb666(%rip)      # 0xeac0
movl $0x5c, %eax
movq 0x961a(%rip), %rcx      # 0xca80
leaq 0x1(%rcx), %rdx
movq %rdx, 0x960f(%rip)      # 0xca80
movb %al, (%rcx)
jmp 0x3411
cmpl $0x5c, %ebx
jne 0x34af
xorl %edi, %edi
callq 0x3dae
cmpl $0xa, %eax
je 0x33cd
movl %eax, %ebx
cmpl $-0x1, %eax
je 0x35df
movq 0x95e4(%rip), %rax      # 0xca80
movb $0x5c, (%rax)
leaq 0x2(%rax), %rcx
movq %rcx, 0x95d6(%rip)      # 0xca80
movb %bl, 0x1(%rax)
jmp 0x34db
cmpl $0x5e, %ebx
je 0x3583
cmpl $0x7c, %ebx
jne 0x34d5
jmp 0x3583
btq %rax, %r12
jb 0x3583
cmpl $-0x1, %ebx
je 0x35df
movl %ebx, 0xb5e5(%rip)      # 0xeac0
movl $0x1, %edi
callq 0x3dae
cmpl $0x5c, %eax
jne 0x351a
xorl %edi, %edi
callq 0x3dae
movl $0x20, %ebx
cmpl $0xa, %eax
je 0x3525
cmpl $-0x1, %eax
je 0x357f
movq 0x9579(%rip), %rcx      # 0xca80
movb $0x5c, (%rcx)
leaq 0x2(%rcx), %rdx
movq %rdx, 0x956b(%rip)      # 0xca80
movb %al, 0x1(%rcx)
jmp 0x34db
movl %eax, %ebx
cmpl $-0x1, %eax
je 0x35df
movq %r13, %rax
movsbl (%rax), %ecx
testl %ecx, %ecx
je 0x3536
incq %rax
cmpl %ecx, %ebx
jne 0x3528
testb %cl, %cl
jne 0x3550
movq 0x953f(%rip), %rax      # 0xca80
leaq 0x1(%rax), %rcx
movq %rcx, 0x9534(%rip)      # 0xca80
movb %bl, (%rax)
jmp 0x34db
movl %ebx, 0xb56a(%rip)      # 0xeac0
cmpl $0x22, %ebx
je 0x33cd
cmpl $0x27, %ebx
je 0x33cd
movq 0x9511(%rip), %rax      # 0xca80
leaq 0x1(%rax), %rcx
movq %rcx, 0x9506(%rip)      # 0xca80
movb $0x0, (%rax)
jmp 0x35da
movl %eax, %ebx
jmp 0x35df
movq 0x94f6(%rip), %rax      # 0xca80
movb %bl, (%rax)
leaq 0x2(%rax), %rcx
movq %rcx, 0x94e9(%rip)      # 0xca80
movb $0x0, 0x1(%rax)
jmp 0x35da
cmpb $0x0, 0xb4fc(%rip)      # 0xeaa0
jne 0x35b4
leaq 0x5cb8(%rip), %rax      # 0x9265
movq %rax, 0xb4f4(%rip)      # 0xeaa8
movl $0xa, 0xb502(%rip)      # 0xeac0
movq 0x94bb(%rip), %rax      # 0xca80
leaq 0x1(%rax), %rcx
movq %rcx, 0x94b0(%rip)      # 0xca80
movb $0x0, (%rax)
movb $0x1, 0xb4c6(%rip)      # 0xeaa0
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl %ecx, %ebx
jmp 0x35df