// File: /workspace/github_c_makefile_star2_O0/s3lase[P]v6shell/osh.c
// Function: execute2
static void
execute2(struct tnode *t, int *pin, int *pout)
{
	struct tnode *t1;
	enum tnflags f;
	int i;

	f = t->nflags;

	/*
	 * Redirect (read) input from pipe.
	 */
	if (pin != NULL && (f & FPIN) != 0) {
		if (dup2(pin[0], FD0) == -1)
			err(FC_ERR, FMT2S, getmyname(), strerror(errno));
		(void)close(pin[0]);
		(void)close(pin[1]);
	}
	/*
	 * Redirect (write) output to pipe.
	 */
	if (pout != NULL && (f & FPOUT) != 0) {
		if (dup2(pout[1], FD1) == -1)
			err(FC_ERR, FMT2S, getmyname(), strerror(errno));
		(void)close(pout[0]);
		(void)close(pout[1]);
	}
	/*
	 * Redirect (read) input from file.
	 */
	if (t->nfin != NULL && (f & FPIN) == 0) {
		f |= FFIN;
		i  = 0;
		if (*t->nfin == HYPHEN && *(t->nfin + 1) == EOS)
			i = 1;
		if (i != 0)
			i = dup(dupfd0);
		else
			i = open(atrim(UCPTR(t->nfin)), O_RDONLY);
		if (i == -1)
			err(FC_ERR, FMT3S, getmyname(), t->nfin, ERR_OPEN);
		if (dup2(i, FD0) == -1)
			err(FC_ERR, FMT2S, getmyname(), strerror(errno));
		(void)close(i);
	}
	/*
	 * Redirect (write) output to file.
	 */
	if (t->nfout != NULL && (f & FPOUT) == 0) {
		if ((f & FCAT) != 0)
			i = O_WRONLY | O_APPEND | O_CREAT;
		else
			i = O_WRONLY | O_TRUNC | O_CREAT;
		if ((i = open(atrim(UCPTR(t->nfout)), i, 0666)) == -1)
			err(FC_ERR, FMT3S, getmyname(), t->nfout, ERR_CREATE);
		if (dup2(i, FD1) == -1)
			err(FC_ERR, FMT2S, getmyname(), strerror(errno));
		(void)close(i);
	}
	/*
	 * Set the action for the SIGINT and SIGQUIT signals, and
	 * redirect input for `&' commands from `/dev/null' if needed.
	 */
	if ((f & FINTR) != 0) {
		(void)sasignal(SIGINT, SIG_IGN);
		(void)sasignal(SIGQUIT, SIG_IGN);
		if (t->nfin == NULL && (f & (FFIN|FPIN|FPRS)) == FPRS) {
			(void)close(FD0);
			if (open("/dev/null", O_RDONLY) != FD0)
				err(FC_ERR, FMT3S,
				    getmyname(), "/dev/null", ERR_OPEN);
		}
	} else {
		if ((sig_state&S_SIGINT) == 0 && (sig_child&S_SIGINT) != 0)
			(void)sasignal(SIGINT, SIG_DFL);
		if ((sig_state&S_SIGQUIT) == 0 && (sig_child&S_SIGQUIT) != 0)
			(void)sasignal(SIGQUIT, SIG_DFL);
	}
	/* Set the SIGTERM signal to its default action if needed. */
	if ((sig_state&S_SIGTERM) == 0 && (sig_child&S_SIGTERM) != 0)
		(void)sasignal(SIGTERM, SIG_DFL);
	if (t->ntype == TSUBSHELL) {
		if ((t1 = t->nsub) != NULL)
			t1->nflags |= (f & (FFIN | FPIN | FINTR));
		execute(t1, NULL, NULL);
		_exit(status);
	}
	if (t->nav == NULL || t->nav[0] == NULL) {
		/* should never (but can) be true */
		err(FC_ERR, FMT2S, getmyname(), "execute2: Invalid command");
		/*NOTREACHED*/
	}
	if (t->nkey == SBI_UNKNOWN)
		(void)err_pexec(t->nav[0], (char *const *)t->nav);
	else
		_exit(uexec(t->nkey, vacount((const char **)t->nav), t->nav));
	/*NOTREACHED*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x24(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x61c8
movl -0x24(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x61c8
movq -0x10(%rbp), %rax
movl (%rax), %edi
xorl %esi, %esi
callq 0x2160
cmpl $-0x1, %eax
jne 0x61b1
callq 0x8df0
movq %rax, -0x30(%rbp)
callq 0x2070
movl (%rax), %edi
callq 0x2380
movq -0x30(%rbp), %rdx
movq %rax, %rcx
movl $0x7c, %edi
leaq 0x55f7(%rip), %rsi      # 0xb7a1
movb $0x0, %al
callq 0x8af0
movq -0x10(%rbp), %rax
movl (%rax), %edi
callq 0x21d0
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x21d0
cmpq $0x0, -0x18(%rbp)
je 0x6236
movl -0x24(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x6236
movq -0x18(%rbp), %rax
movl 0x4(%rax), %edi
movl $0x1, %esi
callq 0x2160
cmpl $-0x1, %eax
jne 0x621f
callq 0x8df0
movq %rax, -0x38(%rbp)
callq 0x2070
movl (%rax), %edi
callq 0x2380
movq -0x38(%rbp), %rdx
movq %rax, %rcx
movl $0x7c, %edi
leaq 0x5589(%rip), %rsi      # 0xb7a1
movb $0x0, %al
callq 0x8af0
movq -0x18(%rbp), %rax
movl (%rax), %edi
callq 0x21d0
movq -0x18(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x21d0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x6334
movl -0x24(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x6334
movl -0x24(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x628c
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x628c
movl $0x1, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x62a2
movl 0xd0e4(%rip), %edi      # 0x1337c
callq 0x2190
movl %eax, -0x28(%rbp)
jmp 0x62be
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x6f20
movq %rax, %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x2320
movl %eax, -0x28(%rbp)
cmpl $-0x1, -0x28(%rbp)
jne 0x62ee
callq 0x8df0
movq %rax, %rdx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movl $0x7c, %edi
leaq 0x54bd(%rip), %rsi      # 0xb79d
leaq 0x5368(%rip), %r8       # 0xb64f
movb $0x0, %al
callq 0x8af0
movl -0x28(%rbp), %edi
xorl %esi, %esi
callq 0x2160
cmpl $-0x1, %eax
jne 0x632c
callq 0x8df0
movq %rax, -0x40(%rbp)
callq 0x2070
movl (%rax), %edi
callq 0x2380
movq -0x40(%rbp), %rdx
movq %rax, %rcx
movl $0x7c, %edi
leaq 0x547c(%rip), %rsi      # 0xb7a1
movb $0x0, %al
callq 0x8af0
movl -0x28(%rbp), %edi
callq 0x21d0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x6407
movl -0x24(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x6407
movl -0x24(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x6366
movl $0x441, -0x28(%rbp)     # imm = 0x441
jmp 0x636d
movl $0x241, -0x28(%rbp)     # imm = 0x241
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x6f20
movq %rax, %rdi
movl -0x28(%rbp), %esi
movl $0x1b6, %edx            # imm = 0x1B6
movb $0x0, %al
callq 0x2320
movl %eax, -0x28(%rbp)
cmpl $-0x1, %eax
jne 0x63be
callq 0x8df0
movq %rax, %rdx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
movl $0x7c, %edi
leaq 0x53ed(%rip), %rsi      # 0xb79d
leaq 0x5606(%rip), %r8       # 0xb9bd
movb $0x0, %al
callq 0x8af0
movl -0x28(%rbp), %edi
movl $0x1, %esi
callq 0x2160
cmpl $-0x1, %eax
jne 0x63ff
callq 0x8df0
movq %rax, -0x48(%rbp)
callq 0x2070
movl (%rax), %edi
callq 0x2380
movq -0x48(%rbp), %rdx
movq %rax, %rcx
movl $0x7c, %edi
leaq 0x53a9(%rip), %rsi      # 0xb7a1
movb $0x0, %al
callq 0x8af0
movl -0x28(%rbp), %edi
callq 0x21d0
movl -0x24(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x6497
movl $0x2, %edi
movl $0x1, %esi
callq 0xac70
movl $0x3, %edi
movl $0x1, %esi
callq 0xac70
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x6495
movl -0x24(%rbp), %eax
andl $0x8c, %eax
cmpl $0x80, %eax
jne 0x6495
xorl %edi, %edi
callq 0x21d0
leaq 0x556f(%rip), %rdi      # 0xb9cb
xorl %esi, %esi
movb $0x0, %al
callq 0x2320
cmpl $0x0, %eax
je 0x6493
callq 0x8df0
movq %rax, %rdx
movl $0x7c, %edi
leaq 0x531f(%rip), %rsi      # 0xb79d
leaq 0x5546(%rip), %rcx      # 0xb9cb
leaq 0x51c3(%rip), %r8       # 0xb64f
movb $0x0, %al
callq 0x8af0
jmp 0x6495
jmp 0x64ed
movl 0xced7(%rip), %eax      # 0x13374
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x64c1
movl 0x7da1(%rip), %eax      # 0xe24c
andl $0x1, %eax
cmpl $0x0, %eax
je 0x64c1
movl $0x2, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0xac70
movl 0xcead(%rip), %eax      # 0x13374
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x64eb
movl 0x7d77(%rip), %eax      # 0xe24c
andl $0x2, %eax
cmpl $0x0, %eax
je 0x64eb
movl $0x3, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0xac70
jmp 0x64ed
movl 0xce81(%rip), %eax      # 0x13374
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x6517
movl 0x7d4b(%rip), %eax      # 0xe24c
andl $0x4, %eax
cmpl $0x0, %eax
je 0x6517
movl $0xf, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0xac70
movq -0x8(%rbp), %rax
cmpl $0x4, 0x38(%rax)
jne 0x655e
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x6543
movl -0x24(%rbp), %ecx
andl $0x4c, %ecx
movq -0x20(%rbp), %rax
orl 0x34(%rax), %ecx
movl %ecx, 0x34(%rax)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x3cf0
movl 0x7d0f(%rip), %edi      # 0xe268
callq 0x2080
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x6577
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, (%rax)
jne 0x6599
callq 0x8df0
movq %rax, %rdx
movl $0x7c, %edi
leaq 0x5216(%rip), %rsi      # 0xb7a1
leaq 0x5443(%rip), %rcx      # 0xb9d5
movb $0x0, %al
callq 0x8af0
movq -0x8(%rbp), %rax
cmpl $0x14, 0x30(%rax)
jne 0x65bd
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0xaa10
jmp 0x65ed
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x53c0
movl -0x4c(%rbp), %edi
movl %eax, %esi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdx
callq 0x8f80
movl %eax, %edi
callq 0x2080
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)