// File: /workspace/github_c_makefile_star2_O2/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 0xa072(%rip), %r15d     # 0xeac0
testl %r15d, %r15d
je 0x4a5f
andl $0x0, 0xa066(%rip)      # 0xeac0
jmp 0x4d09
movq 0xa02a(%rip), %rax      # 0xea90
cmpq 0xa02b(%rip), %rax      # 0xea98
jae 0x4c98
movq 0x8006(%rip), %rax      # 0xca80
cmpq 0x8007(%rip), %rax      # 0xca88
jae 0x4cc7
movl %edi, %ebx
leaq 0x3806(%rip), %rbp      # 0x8296
leaq 0xa049(%rip), %r14      # 0xeae0
leaq 0x778a(%rip), %r13      # 0xc228
leaq 0x36d7(%rip), %r12      # 0x817c
movq 0xa01c(%rip), %rax      # 0xeac8
testq %rax, %rax
je 0x4af7
leaq 0x1(%rax), %rcx
movq %rcx, 0xa00c(%rip)      # 0xeac8
movsbl (%rax), %r15d
testl %r15d, %r15d
jne 0x4d09
movl 0xa001(%rip), %eax      # 0xead0
testl %eax, %eax
jle 0x4ae8
leal 0x1(%rax), %ecx
movl %ecx, 0x9ff4(%rip)      # 0xead0
cmpl 0x7756(%rip), %ecx      # 0xc238
jl 0x4d1b
andl $0x0, 0x9fe1(%rip)      # 0xead0
andq $0x0, 0x9fd1(%rip)      # 0xeac8
callq 0x3218
movl %eax, %r15d
cmpl $0x24, %eax
jne 0x4d3a
testb %bl, %bl
je 0x4d3a
callq 0x3218
cmpl $0x2a, %eax
je 0x4c6a
movl %eax, %r15d
movb $0x0, 0x9fb8(%rip)      # 0xeae0
leal -0x30(%r15), %ecx
cmpl $0xa, %ecx
jb 0x4b4f
leal -0x64(%r15), %eax
cmpl $0x12, %eax
ja 0x4b8d
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
leaq 0x3757(%rip), %rdi      # 0x82a1
jmp 0x4c49
movsbl (%rcx,%rbp), %edx
movq %r14, %rax
cmpl %edx, %r15d
jne 0x4c55
movq %r14, %rax
cmpl 0x76d0(%rip), %ecx      # 0xc238
jge 0x4c55
leaq (,%rcx,8), %rax
addq 0x76b3(%rip), %rax      # 0xc230
cmpl $0x31, %r15d
cmovbq %r13, %rax
movq (%rax), %rax
jmp 0x4c55
cmpl $0x23, %r15d
je 0x4bb3
cmpl $0x24, %r15d
jne 0x4d32
callq 0x646b
movq %r14, %rdi
pushq $0x21
popq %rsi
leaq 0x36e2(%rip), %rdx      # 0x8291
movl %eax, %ecx
jmp 0x4c08
movl 0x767f(%rip), %eax      # 0xc238
leal -0x1(%rax), %ecx
cmpl $0x2, %eax
movl $0x0, %eax
cmovll %eax, %ecx
jmp 0x4bfb
movq 0x7688(%rip), %rax      # 0xc258
jmp 0x4c55
movabsq $0x727275632d68736f, %rax # imm = 0x727275632D68736F
movq %rax, 0x9efa(%rip)      # 0xeae0
movl $0x746e65, 0x9ef8(%rip) # imm = 0x746E65
movq %r14, %rax
jmp 0x4c55
movl 0x766d(%rip), %ecx      # 0xc268
movq %r14, %rdi
pushq $0x21
popq %rsi
leaq 0x3882(%rip), %rdx      # 0x848a
xorl %eax, %eax
callq 0x2170
movl %eax, %ecx
movq %r14, %rax
cmpl $0x20, %ecx
jbe 0x4c55
jmp 0x4d32
movq 0x763b(%rip), %rax      # 0xc260
jmp 0x4c55
leaq 0x368c(%rip), %rdi      # 0x82ba
jmp 0x4c49
leaq 0x3680(%rip), %rdi      # 0x82b7
jmp 0x4c49
leaq 0x3672(%rip), %rdi      # 0x82b2
jmp 0x4c49
leaq 0x365f(%rip), %rdi      # 0x82a8
callq 0x2030
testq %rax, %rax
cmoveq %r14, %rax
movq %rax, 0x9e6c(%rip)      # 0xeac8
testq %rax, %rax
jne 0x4aac
jmp 0x4d09
cmpl $0x2, 0x75c7(%rip)      # 0xc238
jl 0x4aa5
movl $0x1, 0x9e4f(%rip)      # 0xead0
movq 0x75a8(%rip), %rax      # 0xc230
movq 0x8(%rax), %rax
movq %rax, 0x9e35(%rip)      # 0xeac8
jmp 0x4aa5
addq $-0x50, %rax
movq %rax, 0x9ded(%rip)      # 0xea90
xorl %edi, %edi
callq 0x4a3c
cmpl $-0x1, %eax
je 0x4cb4
cmpl $0xa, %eax
jne 0x4ca3
leaq 0x35c8(%rip), %rbx      # 0x8283
pushq $0x50
popq %rax
leaq 0x9dcb(%rip), %rcx      # 0xea90
jmp 0x4cf4
addq $-0xa, %rax
movq %rax, 0x7dae(%rip)      # 0xca80
xorl %edi, %edi
callq 0x4a3c
cmpl $-0x1, %eax
je 0x4ce3
cmpl $0xa, %eax
jne 0x4cd2
leaq 0x3567(%rip), %rbx      # 0x8251
pushq $0xa
popq %rax
leaq 0x7d8c(%rip), %rcx      # 0xca80
addq %rax, (%rcx)
movq %rbx, 0x9daa(%rip)      # 0xeaa8
movb $0x1, 0x9d9b(%rip)      # 0xeaa0
pushq $0xa
popq %r15
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x750e(%rip), %rcx      # 0xc230
movq 0x8(%rcx,%rax,8), %rax
movq %rax, 0x9d9a(%rip)      # 0xeac8
pushq $0x20
jmp 0x4d07
andq $0x0, 0x9d8e(%rip)      # 0xeac8
testl %r15d, %r15d
jne 0x4d09
leaq 0x350b(%rip), %rbx      # 0x8251
movl 0x9d64(%rip), %eax      # 0xeab0
leal 0x1(%rax), %ecx
movl %ecx, 0x9d5b(%rip)      # 0xeab0
cmpl $0x7fe, %eax            # imm = 0x7FE
jg 0x4cf7
callq 0x3218
movl %eax, %r15d
testl %eax, %eax
je 0x4d46
jmp 0x4d09