// File: /workspace/github_c_makefile_star2_O1/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 0xacc5(%rip), %r15d     # 0xeac0
testl %r15d, %r15d
je 0x3e0f
movl $0x0, 0xacb6(%rip)      # 0xeac0
jmp 0x4104
movq 0xac7a(%rip), %rax      # 0xea90
cmpq 0xac7b(%rip), %rax      # 0xea98
jae 0x408d
movq 0x8c56(%rip), %rax      # 0xca80
cmpq 0x8c57(%rip), %rax      # 0xca88
jae 0x40be
movl %edi, %ebx
leaq 0xaca0(%rip), %r14      # 0xeae0
leaq 0x544f(%rip), %rbp      # 0x9296
leaq 0x5640(%rip), %r12      # 0x948e
leaq 0x52d7(%rip), %r13      # 0x912c
movq 0xac6c(%rip), %rax      # 0xeac8
testq %rax, %rax
je 0x3ead
leaq 0x1(%rax), %rcx
movq %rcx, 0xac5c(%rip)      # 0xeac8
movsbl (%rax), %r15d
testl %r15d, %r15d
jne 0x4104
movl 0xac51(%rip), %eax      # 0xead0
testl %eax, %eax
jle 0x3e98
leal 0x1(%rax), %ecx
movl %ecx, 0xac44(%rip)      # 0xead0
cmpl 0x83a6(%rip), %ecx      # 0xc238
jl 0x4116
movl $0x0, 0xac2e(%rip)      # 0xead0
movq $0x0, 0xac1b(%rip) # 0xeac8
callq 0x3296
movl %eax, %r15d
cmpl $0x24, %eax
jne 0x4059
testb %bl, %bl
je 0x4059
callq 0x3296
cmpl $0x2a, %eax
jne 0x3efe
cmpl $0x2, 0x8361(%rip)      # 0xc238
jl 0x3e55
movl $0x1, 0xabe9(%rip)      # 0xead0
movq 0x8342(%rip), %rax      # 0xc230
movq 0x8(%rax), %rax
movq %rax, 0xabcf(%rip)      # 0xeac8
jmp 0x3e55
movl %eax, %r15d
movb $0x0, 0xabd8(%rip)      # 0xeae0
xorl %eax, %eax
cmpl $0x63, %r15d
jg 0x3f65
leal -0x30(%r15), %edx
cmpl $0xa, %edx
jae 0x3f88
movq %r14, %rax
jae 0x4049
movl %edx, %ecx
movsbl (%rcx,%rbp), %esi
movq %r14, %rax
cmpl %esi, %r15d
jne 0x4049
movq %r14, %rax
cmpl 0x82fb(%rip), %edx      # 0xc238
jge 0x4049
shlq $0x3, %rcx
addq 0x82e2(%rip), %rcx      # 0xc230
cmpl $0x31, %r15d
leaq 0x82cf(%rip), %rax      # 0xc228
cmovlq %rax, %rcx
movq (%rcx), %rax
jmp 0x4049
leal -0x64(%r15), %ecx
cmpl $0x12, %ecx
ja 0x4049
movslq (%r13,%rcx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
leaq 0x531e(%rip), %rdi      # 0x92a1
jmp 0x403d
cmpl $0x23, %r15d
je 0x3fb0
cmpl $0x24, %r15d
jne 0x4049
callq 0x6b25
movl $0x21, %esi
movq %r14, %rdi
leaq 0x52e5(%rip), %rdx      # 0x9291
movl %eax, %ecx
jmp 0x4018
movl 0x8282(%rip), %eax      # 0xc238
leal -0x1(%rax), %ecx
cmpl $0x2, %eax
movl $0x0, %eax
cmovll %eax, %ecx
jmp 0x400d
movq 0x8293(%rip), %rax      # 0xc260
jmp 0x4049
movabsq $0x727275632d68736f, %rax # imm = 0x727275632D68736F
movq %rax, 0xab00(%rip)      # 0xeae0
movl $0x746e65, 0xaafe(%rip) # imm = 0x746E65
jmp 0x4024
leaq 0x52c4(%rip), %rdi      # 0x92b7
jmp 0x403d
leaq 0x52b6(%rip), %rdi      # 0x92b2
jmp 0x403d
leaq 0x52a3(%rip), %rdi      # 0x92a8
jmp 0x403d
movl 0x825b(%rip), %ecx      # 0xc268
movl $0x21, %esi
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2170
cmpl $0x21, %eax
jae 0x4029
movq %r14, %rax
jmp 0x4049
xorl %eax, %eax
jmp 0x4049
movq 0x8224(%rip), %rax      # 0xc258
jmp 0x4049
leaq 0x527d(%rip), %rdi      # 0x92ba
callq 0x2030
testq %rax, %rax
cmoveq %r14, %rax
movq %rax, 0xaa78(%rip)      # 0xeac8
testq %rax, %rax
jne 0x3e55
testl %r15d, %r15d
jne 0x4104
leaq 0x51e8(%rip), %rbx      # 0x9251
movl 0xaa41(%rip), %eax      # 0xeab0
leal 0x1(%rax), %ecx
movl %ecx, 0xaa38(%rip)      # 0xeab0
cmpl $0x7fe, %eax            # imm = 0x7FE
jg 0x40f0
callq 0x3296
movl %eax, %r15d
testl %eax, %eax
je 0x4069
jmp 0x4104
addq $-0x50, %rax
movq %rax, 0xa9f8(%rip)      # 0xea90
xorl %edi, %edi
callq 0x3de9
cmpl $-0x1, %eax
je 0x40a9
cmpl $0xa, %eax
jne 0x4098
leaq 0x51d3(%rip), %rbx      # 0x9283
movl $0x50, %eax
leaq 0xa9d4(%rip), %rcx      # 0xea90
jmp 0x40ed
addq $-0xa, %rax
movq %rax, 0x89b7(%rip)      # 0xca80
xorl %edi, %edi
callq 0x3de9
cmpl $-0x1, %eax
je 0x40da
cmpl $0xa, %eax
jne 0x40c9
leaq 0x5170(%rip), %rbx      # 0x9251
movl $0xa, %eax
leaq 0x8993(%rip), %rcx      # 0xca80
addq %rax, (%rcx)
movq %rbx, 0xa9b1(%rip)      # 0xeaa8
movb $0x1, 0xa9a2(%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 0x8113(%rip), %rcx      # 0xc230
movq 0x8(%rcx,%rax,8), %rax
movq %rax, 0xa99f(%rip)      # 0xeac8
movl $0x20, %r15d
jmp 0x4104