// File: /workspace/github_c_makefile_star2_O0/s3lase[P]v6shell/sh6.c
// Function: xgetc
static char
xgetc(bool dolsub)
{
	int n;
	char c;

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

	if (wordp >= &word[WORDMAX - 5]) {
		wordp -= 10;
		while (xgetc(!DOLSUB) != EOL)
			;	/* nothing */
		wordp += 10;
		error_message = ERR_TMARGS;
		goto geterr;
	}
	if (linep >= &line[LINEMAX - 5]) {
		linep -= 10;
		while (xgetc(!DOLSUB) != EOL)
			;	/* nothing */
		linep += 10;
		error_message = ERR_TMCHARS;
		goto geterr;
	}

getd:
	if (dolp != NULL) {
		c = *dolp++ & ASCII;
		if (c != EOS)
			return c;
		dolp = NULL;
	}
	c = readc();
	if (c == DOLLAR && dolsub) {
		c = readc();
		if (c >= '0' && c <= '9') {
			n = c - '0';
			if (IS_DIGIT(n, c) && n < dolc)
				dolp = (n > 0) ? dolv[n] : name;
			goto getd;
		}
		if (c == DOLLAR) {
			dolp = apid;
			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 $0x20, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x2(%rbp)
movsbl 0x7211(%rip), %eax      # 0xa9e8
cmpl $0x0, %eax
je 0x37f7
movb 0x7206(%rip), %al       # 0xa9e8
movb %al, -0x9(%rbp)
movb $0x0, 0x71fc(%rip)      # 0xa9e8
movb -0x9(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x3a26
leaq 0x51d2(%rip), %rax      # 0x89d0
addq $0x1fd8, %rax           # imm = 0x1FD8
cmpq %rax, 0x71c5(%rip)      # 0xa9d0
jb 0x3855
movq 0x71bc(%rip), %rax      # 0xa9d0
addq $-0x50, %rax
movq %rax, 0x71b1(%rip)      # 0xa9d0
xorl %edi, %edi
callq 0x37c0
movsbl %al, %eax
cmpl $0xa, %eax
je 0x3830
jmp 0x381f
movq 0x7199(%rip), %rax      # 0xa9d0
addq $0x50, %rax
movq %rax, 0x718e(%rip)      # 0xa9d0
leaq 0x2c0c(%rip), %rax      # 0x6455
movq %rax, 0x7190(%rip)      # 0xa9e0
jmp 0x3a1b
leaq 0x4964(%rip), %rax      # 0x81c0
addq $0x7fb, %rax            # imm = 0x7FB
cmpq %rax, 0x5157(%rip)      # 0x89c0
jb 0x38b3
movq 0x514e(%rip), %rax      # 0x89c0
addq $-0xa, %rax
movq %rax, 0x5143(%rip)      # 0x89c0
xorl %edi, %edi
callq 0x37c0
movsbl %al, %eax
cmpl $0xa, %eax
je 0x388e
jmp 0x387d
movq 0x512b(%rip), %rax      # 0x89c0
addq $0xa, %rax
movq %rax, 0x5120(%rip)      # 0x89c0
leaq 0x2bbc(%rip), %rax      # 0x6463
movq %rax, 0x7132(%rip)      # 0xa9e0
jmp 0x3a1b
jmp 0x38b5
cmpq $0x0, 0x7133(%rip)      # 0xa9f0
je 0x38fc
movq 0x712a(%rip), %rax      # 0xa9f0
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x711c(%rip)      # 0xa9f0
movsbl (%rax), %eax
andl $0x7f, %eax
movb %al, -0x9(%rbp)
movsbl -0x9(%rbp), %eax
cmpl $0x0, %eax
je 0x38f1
movb -0x9(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x3a26
movq $0x0, 0x70f4(%rip) # 0xa9f0
callq 0x3a80
movb %al, -0x9(%rbp)
movsbl -0x9(%rbp), %eax
cmpl $0x24, %eax
jne 0x39cf
testb $0x1, -0x2(%rbp)
je 0x39cf
callq 0x3a80
movb %al, -0x9(%rbp)
movsbl -0x9(%rbp), %eax
cmpl $0x30, %eax
jl 0x39b1
movsbl -0x9(%rbp), %eax
cmpl $0x39, %eax
jg 0x39b1
movsbl -0x9(%rbp), %eax
subl $0x30, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jl 0x39ac
cmpl $0x9, -0x8(%rbp)
jg 0x39ac
movl -0x8(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movslq %edx, %rcx
leaq 0x2b13(%rip), %rax      # 0x6477
movsbl (%rax,%rcx), %eax
movsbl -0x9(%rbp), %ecx
cmpl %ecx, %eax
jne 0x39ac
movl -0x8(%rbp), %eax
cmpl 0x4817(%rip), %eax      # 0x8190
jge 0x39ac
cmpl $0x0, -0x8(%rbp)
jle 0x3996
movq 0x4800(%rip), %rax      # 0x8188
movslq -0x8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
jmp 0x39a1
movq 0x47e3(%rip), %rax      # 0x8180
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, 0x7044(%rip)      # 0xa9f0
jmp 0x38b5
movsbl -0x9(%rbp), %eax
cmpl $0x24, %eax
jne 0x39cd
leaq 0x703f(%rip), %rax      # 0xaa00
movq %rax, 0x7028(%rip)      # 0xa9f0
jmp 0x38b5
jmp 0x39cf
movsbl -0x9(%rbp), %eax
cmpl $0x0, %eax
jne 0x3a13
jmp 0x39da
movl 0x6ffc(%rip), %eax      # 0xa9dc
addl $0x1, %eax
movl %eax, 0x6ff3(%rip)      # 0xa9dc
cmpl $0x800, %eax            # imm = 0x800
jl 0x3a00
leaq 0x2a6c(%rip), %rax      # 0x6463
movq %rax, 0x6fe2(%rip)      # 0xa9e0
jmp 0x3a1b
callq 0x3a80
movb %al, -0x9(%rbp)
movsbl -0x9(%rbp), %eax
cmpl $0x0, %eax
je 0x39da
jmp 0x3a13
movb -0x9(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x3a26
movb $0x1, 0x6fb6(%rip)      # 0xa9d8
movb $0xa, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nop