// File: /workspace/github_c_makefile_star2_O3/s3lase[P]v6shell/osh.c
// Function: xgetc
static int
xgetc(bool dolsub)
{
	int c;

	if (peekc != EOS) {
		c = peekc;
		peekc = EOS;
		return c;
	}

	if (wordp >= ewordp) {
		wordp -= 10;
		while ((c = xgetc(!DOLSUB)) != EOF && c != EOL)
			;	/* nothing */
		wordp += 10;
		error_message = ERR_TMARGS;
		goto geterr;
	}
	if (linep >= elinep) {
		linep -= 10;
		while ((c = xgetc(!DOLSUB)) != EOF && c != EOL)
			;	/* nothing */
		linep += 10;
		error_message = ERR_TMCHARS;
		goto geterr;
	}

getd:
	if (dolp != NULL) {
		c = *dolp++;
		if (c != EOS)
			return c;
		if (dolac > 0 && ++dolac < dolc) {
			dolp = dolv[dolac];
			return SPACE;
		}
		dolac = 0;
		dolp  = NULL;
	}
	c = readc();
	if (c == DOLLAR && dolsub) {
		c = readc();
		if (c == ASTERISK) {
			if (dolc > 1) {
				dolac = 1;
				dolp  = dolv[dolac];
			}
			goto getd;
		}
		if ((dolp = get_dolp(c)) != NULL)
			goto getd;
	}
	/* Ignore all EOS/NUL characters. */
	if (c == EOS) do {
		if (++nul_count >= LINEMAX) {
			error_message = ERR_TMCHARS;
			goto geterr;
		}
		c = readc();
	} while (c == EOS);
	return c;

geterr:
	error = true;
	return EOL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0xad00(%rip), %r15d     # 0xeac0
testl %r15d, %r15d
je 0x3dd4
movl $0x0, 0xacf1(%rip)      # 0xeac0
jmp 0x4094
movq 0xacb5(%rip), %rax      # 0xea90
cmpq 0xacb6(%rip), %rax      # 0xea98
jae 0x401d
movq 0x8c91(%rip), %rax      # 0xca80
cmpq 0x8c92(%rip), %rax      # 0xca88
jae 0x404e
movl %edi, %ebx
leaq 0x548e(%rip), %r13      # 0x9293
leaq 0xacd4(%rip), %r14      # 0xeae0
leaq 0x8415(%rip), %rbp      # 0xc228
leaq 0x5312(%rip), %r12      # 0x912c
movq 0xaca7(%rip), %rax      # 0xeac8
testq %rax, %rax
je 0x3e72
leaq 0x1(%rax), %rcx
movq %rcx, 0xac97(%rip)      # 0xeac8
movsbl (%rax), %r15d
testl %r15d, %r15d
jne 0x4094
movl 0xac8c(%rip), %eax      # 0xead0
testl %eax, %eax
jle 0x3e5d
leal 0x1(%rax), %ecx
movl %ecx, 0xac7f(%rip)      # 0xead0
cmpl 0x83e1(%rip), %ecx      # 0xc238
jl 0x40a6
movl $0x0, 0xac69(%rip)      # 0xead0
movq $0x0, 0xac56(%rip) # 0xeac8
callq 0x32da
movl %eax, %r15d
cmpl $0x24, %eax
jne 0x40cc
testb %bl, %bl
je 0x40cc
callq 0x32da
cmpl $0x2a, %eax
je 0x3fef
movl %eax, %r15d
movb $0x0, 0xac3d(%rip)      # 0xeae0
cmpl $0x63, %eax
jg 0x3ef0
leal -0x30(%r15), %ecx
cmpl $0xa, %ecx
jae 0x3f11
movsbl (%rcx,%r13), %edx
movq %r14, %rax
cmpl %edx, %r15d
jne 0x3fda
movq %r14, %rax
cmpl 0x836d(%rip), %ecx      # 0xc238
jge 0x3fda
leaq (,%rcx,8), %rax
addq 0x8350(%rip), %rax      # 0xc230
cmpl $0x31, %r15d
cmovbq %rbp, %rax
movq (%rax), %rax
jmp 0x3fda
movl %r15d, %eax
addl $-0x64, %eax
cmpl $0x12, %eax
ja 0x40c1
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
leaq 0x538f(%rip), %rdi      # 0x929e
jmp 0x3f7a
cmpl $0x23, %r15d
je 0x3f39
cmpl $0x24, %r15d
jne 0x40c1
callq 0x6a9d
movl $0x21, %esi
movq %r14, %rdi
leaq 0x5359(%rip), %rdx      # 0x928e
movl %eax, %ecx
jmp 0x3f9d
movl 0x82f9(%rip), %eax      # 0xc238
leal -0x1(%rax), %ecx
cmpl $0x2, %eax
movl $0x0, %eax
cmovll %eax, %ecx
jmp 0x3f8e
leaq 0x535e(%rip), %rdi      # 0x92b4
jmp 0x3f7a
leaq 0x5346(%rip), %rdi      # 0x92a5
jmp 0x3f7a
movq 0x82f8(%rip), %rax      # 0xc260
jmp 0x3fda
leaq 0x533e(%rip), %rdi      # 0x92af
jmp 0x3f7a
leaq 0x533d(%rip), %rdi      # 0x92b7
callq 0x2030
testq %rax, %rax
cmoveq %r14, %rax
jmp 0x3fda
movl 0x82da(%rip), %ecx      # 0xc268
movl $0x21, %esi
movq %r14, %rdi
leaq 0x54e7(%rip), %rdx      # 0x9484
xorl %eax, %eax
callq 0x2170
movl %eax, %ecx
movq %r14, %rax
cmpl $0x20, %ecx
jbe 0x3fda
jmp 0x40c1
movq 0x829e(%rip), %rax      # 0xc258
jmp 0x3fda
movabsq $0x727275632d68736f, %rax # imm = 0x727275632D68736F
movq %rax, 0xab13(%rip)      # 0xeae0
movl $0x746e65, 0xab11(%rip) # imm = 0x746E65
movq %r14, %rax
movq %rax, 0xaae7(%rip)      # 0xeac8
testq %rax, %rax
jne 0x3e21
jmp 0x4094
cmpl $0x2, 0x8242(%rip)      # 0xc238
jl 0x3e1a
movl $0x1, 0xaaca(%rip)      # 0xead0
movq 0x8223(%rip), %rax      # 0xc230
movq 0x8(%rax), %rax
movq %rax, 0xaab0(%rip)      # 0xeac8
jmp 0x3e1a
addq $-0x50, %rax
movq %rax, 0xaa68(%rip)      # 0xea90
xorl %edi, %edi
callq 0x3dae
cmpl $-0x1, %eax
je 0x4039
cmpl $0xa, %eax
jne 0x4028
leaq 0x5240(%rip), %rbx      # 0x9280
movl $0x50, %eax
leaq 0xaa44(%rip), %rcx      # 0xea90
jmp 0x407d
addq $-0xa, %rax
movq %rax, 0x8a27(%rip)      # 0xca80
xorl %edi, %edi
callq 0x3dae
cmpl $-0x1, %eax
je 0x406a
cmpl $0xa, %eax
jne 0x4059
leaq 0x51e0(%rip), %rbx      # 0x9251
movl $0xa, %eax
leaq 0x8a03(%rip), %rcx      # 0xca80
addq %rax, (%rcx)
movq %rbx, 0xaa21(%rip)      # 0xeaa8
movb $0x1, 0xaa12(%rip)      # 0xeaa0
movl $0xa, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8183(%rip), %rcx      # 0xc230
movq 0x8(%rcx,%rax,8), %rax
movq %rax, 0xaa0f(%rip)      # 0xeac8
movl $0x20, %r15d
jmp 0x4094
movq $0x0, 0xa9fc(%rip) # 0xeac8
testl %r15d, %r15d
jne 0x4094
leaq 0x5179(%rip), %rbx      # 0x9251
movl 0xa9d2(%rip), %eax      # 0xeab0
leal 0x1(%rax), %ecx
movl %ecx, 0xa9c9(%rip)      # 0xeab0
cmpl $0x7fe, %eax            # imm = 0x7FE
jg 0x4080
callq 0x32da
movl %eax, %r15d
testl %eax, %eax
je 0x40d8
jmp 0x4094