// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movl 0xa14e(%rip), %eax      # 0x113b8
cmpl $0x2, %eax
jl 0x7277
cmpl 0xa133(%rip), %eax      # 0x113a8
jle 0x7299
callq 0x6b0f
leaq 0x20ba(%rip), %rsi      # 0x933d
leaq 0x24fc(%rip), %rcx      # 0x9786
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x68c8
movq 0xa110(%rip), %rax      # 0x113b0
movslq 0xa111(%rip), %rcx      # 0x113b8
leaq (%rax,%rcx,8), %r14
movq (%r14), %r12
testq %r12, %r12
sete %bpl
je 0x72ee
leaq 0x245e(%rip), %r15      # 0x971c
movq %r14, %r13
testb %bl, %bl
je 0x72db
cmpb $0x7d, (%r12)
jne 0x72db
movq %r12, %rdi
movq %r15, %rsi
callq 0x2230
testl %eax, %eax
je 0x72f1
movq 0x8(%r13), %r12
addq $0x8, %r13
testq %r12, %r12
sete %bpl
jne 0x72c1
jmp 0x72f1
movq %r14, %r13
movq %r13, %r15
subq %r14, %r15
testq %r15, %r15
setle %al
movl %ebx, %ecx
xorb $0x1, %cl
orb %al, %cl
jne 0x735b
testb $0x1, %bpl
jne 0x7326
cmpb $0x7d, (%r12)
jne 0x7326
leaq 0x2402(%rip), %rsi      # 0x971c
movq %r12, %rdi
callq 0x2230
testl %eax, %eax
je 0x735b
callq 0x6b0f
movq 0xa07e(%rip), %rcx      # 0x113b0
movslq 0xa07f(%rip), %rdx      # 0x113b8
movq -0x8(%rcx,%rdx,8), %rcx
leaq 0x1ff4(%rip), %rsi      # 0x9339
leaq 0x245f(%rip), %r8       # 0x97ab
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x68c8
movq $0x0, (%r13)
cmpq $0x0, (%r14)
jne 0x73c1
callq 0x6b0f
testb %bl, %bl
je 0x73a4
movq 0xa037(%rip), %rcx      # 0x113b0
movslq 0xa038(%rip), %rdx      # 0x113b8
movq -0x8(%rcx,%rdx,8), %rcx
leaq 0x1fad(%rip), %rsi      # 0x9339
leaq 0x2423(%rip), %r8       # 0x97b6
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x68c8
jmp 0x73c1
leaq 0x1f92(%rip), %rsi      # 0x933d
leaq 0x2404(%rip), %rcx      # 0x97b6
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x68c8
movq (%r14), %r12
testq %r12, %r12
je 0x7406
cmpb $0x3a, (%r12)
jne 0x73e7
leaq 0x22be(%rip), %rsi      # 0x9695
movq %r12, %rdi
callq 0x2230
testl %eax, %eax
je 0x746f
testq %r12, %r12
je 0x7406
cmpb $0x65, (%r12)
jne 0x7406
leaq 0x1e10(%rip), %rsi      # 0x920a
movq %r12, %rdi
callq 0x2230
testl %eax, %eax
je 0x7461
movq %r12, %rdi
callq 0x3226
cmpl $0x9, %eax
ja 0x7441
movl $0x390, %ecx            # imm = 0x390
btl %eax, %ecx
jae 0x7441
shrq $0x3, %r15
movl %eax, %edi
movl %r15d, %esi
movq %r14, %rdx
callq 0x6bcc
testb %bl, %bl
jne 0x745a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7fd9
movl %eax, %edi
callq 0x2080
xorl %edi, %edi
xorl %esi, %esi
movl $0x2, %edx
callq 0x21a0
xorl %edi, %edi
callq 0x2080