// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x5(%rbp)
cmpl $0x0, 0xc8c9(%rip)      # 0x10ac0
je 0x4217
movl 0xc8c1(%rip), %eax      # 0x10ac0
movl %eax, -0xc(%rbp)
movl $0x0, 0xc8b4(%rip)      # 0x10ac0
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4454
movq 0xc872(%rip), %rax      # 0x10a90
cmpq 0xc873(%rip), %rax      # 0x10a98
jb 0x4289
movq 0xc862(%rip), %rax      # 0x10a90
addq $-0x50, %rax
movq %rax, 0xc857(%rip)      # 0x10a90
xorl %edi, %edi
callq 0x41e0
movl %eax, %ecx
movl %ecx, -0xc(%rbp)
xorl %eax, %eax
cmpl $-0x1, %ecx
movb %al, -0xd(%rbp)
je 0x4259
cmpl $0xa, -0xc(%rbp)
setne %al
movb %al, -0xd(%rbp)
movb -0xd(%rbp), %al
testb $0x1, %al
jne 0x4262
jmp 0x4264
jmp 0x4239
movq 0xc825(%rip), %rax      # 0x10a90
addq $0x50, %rax
movq %rax, 0xc81a(%rip)      # 0x10a90
leaq 0x746a(%rip), %rax      # 0xb6e7
movq %rax, 0xc824(%rip)      # 0x10aa8
jmp 0x4446
movq 0xa7f0(%rip), %rax      # 0xea80
cmpq 0xa7f1(%rip), %rax      # 0xea88
jb 0x42fb
movq 0xa7e0(%rip), %rax      # 0xea80
addq $-0xa, %rax
movq %rax, 0xa7d5(%rip)      # 0xea80
xorl %edi, %edi
callq 0x41e0
movl %eax, %ecx
movl %ecx, -0xc(%rbp)
xorl %eax, %eax
cmpl $-0x1, %ecx
movb %al, -0xe(%rbp)
je 0x42cb
cmpl $0xa, -0xc(%rbp)
setne %al
movb %al, -0xe(%rbp)
movb -0xe(%rbp), %al
testb $0x1, %al
jne 0x42d4
jmp 0x42d6
jmp 0x42ab
movq 0xa7a3(%rip), %rax      # 0xea80
addq $0xa, %rax
movq %rax, 0xa798(%rip)      # 0xea80
leaq 0x73c6(%rip), %rax      # 0xb6b5
movq %rax, 0xc7b2(%rip)      # 0x10aa8
jmp 0x4446
jmp 0x42fd
cmpq $0x0, 0xc7c3(%rip)      # 0x10ac8
je 0x4391
movq 0xc7b6(%rip), %rax      # 0x10ac8
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xc7a8(%rip)      # 0x10ac8
movsbl (%rax), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x4337
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4454
cmpl $0x0, 0xc792(%rip)      # 0x10ad0
jle 0x437c
movl 0xc78a(%rip), %eax      # 0x10ad0
addl $0x1, %eax
movl %eax, 0xc781(%rip)      # 0x10ad0
cmpl 0x9ee3(%rip), %eax      # 0xe238
jge 0x437c
movq 0x9ed2(%rip), %rax      # 0xe230
movslq 0xc76b(%rip), %rcx      # 0x10ad0
movq (%rax,%rcx,8), %rax
movq %rax, 0xc758(%rip)      # 0x10ac8
movl $0x20, -0x4(%rbp)
jmp 0x4454
movl $0x0, 0xc74a(%rip)      # 0x10ad0
movq $0x0, 0xc737(%rip) # 0x10ac8
callq 0x36c0
movl %eax, -0xc(%rbp)
cmpl $0x24, -0xc(%rbp)
jne 0x4400
testb $0x1, -0x5(%rbp)
je 0x4400
callq 0x36c0
movl %eax, -0xc(%rbp)
cmpl $0x2a, -0xc(%rbp)
jne 0x43e4
cmpl $0x1, 0x9e7e(%rip)      # 0xe238
jle 0x43df
movl $0x1, 0xc70a(%rip)      # 0x10ad0
movq 0x9e63(%rip), %rax      # 0xe230
movslq 0xc6fc(%rip), %rcx      # 0x10ad0
movq (%rax,%rcx,8), %rax
movq %rax, 0xc6e9(%rip)      # 0x10ac8
jmp 0x42fd
movl -0xc(%rbp), %edi
callq 0x44b0
movq %rax, 0xc6d5(%rip)      # 0x10ac8
cmpq $0x0, %rax
je 0x43fe
jmp 0x42fd
jmp 0x4400
cmpl $0x0, -0xc(%rbp)
jne 0x443e
jmp 0x4408
movl 0xc6a2(%rip), %eax      # 0x10ab0
addl $0x1, %eax
movl %eax, 0xc699(%rip)      # 0x10ab0
cmpl $0x800, %eax            # imm = 0x800
jl 0x442e
leaq 0x7290(%rip), %rax      # 0xb6b5
movq %rax, 0xc67c(%rip)      # 0x10aa8
jmp 0x4446
callq 0x36c0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x4408
jmp 0x443e
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4454
movb $0x1, 0xc653(%rip)      # 0x10aa0
movl $0xa, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)