// File: /workspace/github_c_makefile_star2_O3/s3lase[P]v6shell/util.c
// Function: doex
static void
doex(bool forked)
{
	enum sbikey xak;
	char **xap, **xav;

	if (iap < 2 || iap > iac)	/* should never (but can) be true */
		err(FC_ERR, FMT2S, getmyname(), ERR_AVIINVAL);

	xav = xap = &iav[iap];
	while (*xap != NULL) {
		if (forked && equal(*xap, "}"))
			break;
		xap++;
	}
	if (forked && xap - xav > 0 && !equal(*xap, "}"))
		err(FC_ERR, FMT3S, getmyname(), iav[iap - 1], ERR_BRACE);
	*xap = NULL;
	if (xav[0] == NULL) {
		if (forked)
			err(FC_ERR, FMT3S, getmyname(), iav[iap - 1], ERR_COMMAND);
		else
			/* Currently unreachable; do not remove. */
			err(FC_ERR, FMT2S, getmyname(), ERR_COMMAND);
	}

	/* Invoke the ":" or "exit" special command. */
	if (equal(xav[0], ":"))
		_exit(SH_TRUE);
	if (equal(xav[0], "exit")) {
		(void)lseek(FD0, (off_t)0, SEEK_END);
		_exit(SH_TRUE);
	}

	xak = cmd_lookup(xav[0]);
	if (IS_SBI(xak)) {
		if (forked)
			_exit(uexec(xak, (int)(xap - xav), xav));
		else
			(void)uexec(xak, (int)(xap - xav), xav);
		return;
	}

	(void)err_pexec(xav[0], xav);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movl 0xa1f4(%rip), %eax      # 0x113b8
cmpl $0x2, %eax
jl 0x71d1
cmpl 0xa1d9(%rip), %eax      # 0x113a8
jle 0x71f9
callq 0x6a87
leaq 0x215a(%rip), %rsi      # 0x9337
leaq 0x25c1(%rip), %rcx      # 0x97a5
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6840
movl 0xa1bf(%rip), %eax      # 0x113b8
movq 0xa1b0(%rip), %rcx      # 0x113b0
cltq
leaq (%rcx,%rax,8), %r14
movq (%r14), %rax
movq %r14, %r12
testq %rax, %rax
je 0x723b
xorl %r15d, %r15d
testb %bl, %bl
je 0x7227
cmpb $0x7d, (%rax)
jne 0x7227
cmpb $0x0, 0x1(%rax)
je 0x7382
movq 0x8(%r14,%r15), %rax
addq $0x8, %r15
testq %rax, %rax
jne 0x7214
addq %r14, %r15
movq %r15, %r12
movq %r12, %r15
subq %r14, %r15
testq %r15, %r15
setg %al
testb %bl, %al
je 0x7280
callq 0x6a87
movq 0xa159(%rip), %rcx      # 0x113b0
movslq 0xa15a(%rip), %rdx      # 0x113b8
movq -0x8(%rcx,%rdx,8), %rcx
leaq 0x20c9(%rip), %rsi      # 0x9333
leaq 0x2559(%rip), %r8       # 0x97ca
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6840
movq $0x0, (%r12)
movq (%r14), %r12
testq %r12, %r12
jne 0x72f0
callq 0x6a87
testb %bl, %bl
je 0x72cb
movq 0xa110(%rip), %rcx      # 0x113b0
movslq 0xa111(%rip), %rdx      # 0x113b8
movq -0x8(%rcx,%rdx,8), %rcx
leaq 0x2080(%rip), %rsi      # 0x9333
leaq 0x251b(%rip), %r8       # 0x97d5
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6840
jmp 0x72e8
leaq 0x2065(%rip), %rsi      # 0x9337
leaq 0x24fc(%rip), %rcx      # 0x97d5
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6840
movq (%r14), %r12
testq %r12, %r12
je 0x7331
movzbl (%r12), %eax
cmpl $0x65, %eax
je 0x7309
cmpl $0x3a, %eax
jne 0x7334
cmpb $0x0, 0x1(%r12)
jne 0x7334
jmp 0x732a
leaq 0x1efa(%rip), %rsi      # 0x920a
movq %r12, %rdi
callq 0x2230
testl %eax, %eax
jne 0x7334
xorl %edi, %edi
xorl %esi, %esi
movl $0x2, %edx
callq 0x21a0
xorl %edi, %edi
callq 0x2080
xorl %r12d, %r12d
movq %r12, %rdi
callq 0x326a
cmpl $0x9, %eax
ja 0x736c
movl $0x390, %ecx            # imm = 0x390
btl %eax, %ecx
jae 0x736c
shrq $0x3, %r15
movl %eax, %edi
movl %r15d, %esi
movq %r14, %rdx
callq 0x6b44
testb %bl, %bl
jne 0x739e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%r14), %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x7e21
leaq (%r14,%r15), %r12
testq %r15, %r15
jle 0x7280
cmpb $0x0, 0x1(%rax)
jne 0x724b
jmp 0x7280
movl %eax, %edi
callq 0x2080