// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
cmpl $0x2, 0x9b41(%rip)      # 0x133b8
jl 0x9887
movl 0x9b39(%rip), %eax      # 0x133b8
cmpl 0x9b23(%rip), %eax      # 0x133a8
jle 0x98a9
callq 0x8df0
movq %rax, %rdx
movl $0x7c, %edi
leaq 0x1f06(%rip), %rsi      # 0xb7a1
leaq 0x2360(%rip), %rcx      # 0xbc02
movb $0x0, %al
callq 0x8af0
movq 0x9b00(%rip), %rax      # 0x133b0
movslq 0x9b01(%rip), %rcx      # 0x133b8
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x98ff
testb $0x1, -0x1(%rbp)
je 0x98f1
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x22b4(%rip), %rsi      # 0xbb98
callq 0x9b40
testb $0x1, %al
jne 0x98ef
jmp 0x98f1
jmp 0x98ff
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
jmp 0x98c6
testb $0x1, -0x1(%rbp)
je 0x996a
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
cmpq $0x0, %rax
jle 0x996a
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x2270(%rip), %rsi      # 0xbb98
callq 0x9b40
testb $0x1, %al
jne 0x996a
callq 0x8df0
movq %rax, %rdx
movq 0x9a70(%rip), %rax      # 0x133b0
movl 0x9a72(%rip), %ecx      # 0x133b8
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
movl $0x7c, %edi
leaq 0x1e41(%rip), %rsi      # 0xb79d
leaq 0x22c4(%rip), %r8       # 0xbc27
movb $0x0, %al
callq 0x8af0
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x99e4
testb $0x1, -0x1(%rbp)
je 0x99c0
callq 0x8df0
movq %rax, %rdx
movq 0x9a1c(%rip), %rax      # 0x133b0
movl 0x9a1e(%rip), %ecx      # 0x133b8
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rcx
movl $0x7c, %edi
leaq 0x1ded(%rip), %rsi      # 0xb79d
leaq 0x227b(%rip), %r8       # 0xbc32
movb $0x0, %al
callq 0x8af0
jmp 0x99e2
callq 0x8df0
movq %rax, %rdx
movl $0x7c, %edi
leaq 0x1dcd(%rip), %rsi      # 0xb7a1
leaq 0x2257(%rip), %rcx      # 0xbc32
movb $0x0, %al
callq 0x8af0
jmp 0x99e4
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0x211f(%rip), %rsi      # 0xbb11
callq 0x9b40
testb $0x1, %al
jne 0x99fd
jmp 0x9a04
xorl %edi, %edi
callq 0x2080
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0x1c5c(%rip), %rsi      # 0xb66e
callq 0x9b40
testb $0x1, %al
jne 0x9a1d
jmp 0x9a34
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x21a0
xorl %edi, %edi
callq 0x2080
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x3540
movl %eax, -0x8(%rbp)
cmpl $0x4, -0x8(%rbp)
je 0x9a5b
cmpl $0x7, -0x8(%rbp)
je 0x9a5b
cmpl $0x8, -0x8(%rbp)
je 0x9a5b
cmpl $0x9, -0x8(%rbp)
jne 0x9aa4
testb $0x1, -0x1(%rbp)
je 0x9a85
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movl %eax, %esi
movq -0x18(%rbp), %rdx
callq 0x8f80
movl %eax, %edi
callq 0x2080
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movl %eax, %esi
movq -0x18(%rbp), %rdx
callq 0x8f80
jmp 0x9ab4
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xaa10
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)