// File: /workspace/github_c_makefile_star2_O1/s3lase[P]v6shell/pexec.c
// Function: err_pexec
void
err_pexec(const char *file, char *const *argv)
{
	const char *f, *n;

	(void)pexec(file, argv);

	f = (file == NULL) ? "(null)" : file;
	n = getmyname();

	if (EQUAL(n, "glob6")) {
		if (errno == ENOEXEC)
			err(SH_ERR, FMT1S, ERR_NOSHELL);
		if (errno == E2BIG)
			err(SH_ERR, FMT1S, ERR_E2BIG);
		err(SH_ERR, FMT1S, ERR_GNOTFOUND);
	} else if (EQUAL(n, "sh6")) {
		if (errno == ENOEXEC)
			err(125, FMT1S, ERR_NOSHELL);
		if (errno == E2BIG)
			err(126, FMT2S, f, ERR_E2BIG);
		if (errno != ENOENT && errno != ENOTDIR)
			err(126, FMT2S, f, ERR_EXEC);
		err(127, FMT2S, f, ERR_NOTFOUND);
	} else {
		if (errno == ENOEXEC)
			err(125, FMT3S, n, f, ERR_NOSHELL);
		if (errno == E2BIG)
			err(126, FMT3S, n, f, ERR_E2BIG);
		if (errno != ENOENT && errno != ENOTDIR)
			err(126, FMT3S, n, f, ERR_EXEC);
		err(127, FMT3S, n, f, ERR_NOTFOUND);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x1ccc
testq %r14, %r14
leaq 0x1200(%rip), %rbx      # 0x319a
cmovneq %r14, %rbx
callq 0x1c0f
movq %rax, %r14
movzbl (%rax), %ebp
cmpl $0x73, %ebp
je 0x1fd0
cmpl $0x67, %ebp
jne 0x1fe7
leaq 0x1227(%rip), %rsi      # 0x31e1
movq %r14, %rdi
callq 0x1140
testl %eax, %eax
je 0x212c
cmpb $0x73, %bpl
jne 0x1fe7
leaq 0x122d(%rip), %rsi      # 0x3204
movq %r14, %rdi
callq 0x1140
testl %eax, %eax
je 0x2091
callq 0x1060
movq %rax, %r15
cmpl $0x8, (%rax)
jne 0x2014
leaq 0x1226(%rip), %rsi      # 0x3221
leaq 0x11e5(%rip), %r8       # 0x31e7
movl $0x7d, %edi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x19c8
cmpl $0x7, (%r15)
jne 0x203a
leaq 0x1200(%rip), %rsi      # 0x3221
leaq 0x1138(%rip), %r8       # 0x3160
movl $0x7e, %edi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x19c8
movl (%r15), %eax
cmpl $0x2, %eax
je 0x2067
cmpl $0x14, %eax
je 0x2067
leaq 0x11d3(%rip), %rsi      # 0x3221
leaq 0x11b3(%rip), %r8       # 0x3208
movl $0x7e, %edi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x19c8
leaq 0x11b3(%rip), %rsi      # 0x3221
leaq 0x11a2(%rip), %r8       # 0x3217
movl $0x7f, %edi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x19c8
callq 0x1060
movq %rax, %r14
cmpl $0x8, (%rax)
jne 0x20b8
leaq 0x1184(%rip), %rsi      # 0x3229
leaq 0x113b(%rip), %rdx      # 0x31e7
movl $0x7d, %edi
xorl %eax, %eax
callq 0x19c8
cmpl $0x7, (%r14)
jne 0x20db
leaq 0x1160(%rip), %rsi      # 0x3225
leaq 0x1094(%rip), %rcx      # 0x3160
movl $0x7e, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x19c8
movl (%r14), %eax
cmpl $0x2, %eax
je 0x2105
cmpl $0x14, %eax
je 0x2105
leaq 0x1136(%rip), %rsi      # 0x3225
leaq 0x1112(%rip), %rcx      # 0x3208
movl $0x7e, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x19c8
leaq 0x1119(%rip), %rsi      # 0x3225
leaq 0x1104(%rip), %rcx      # 0x3217
movl $0x7f, %edi
movq %rbx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x19c8
callq 0x1060
movq %rax, %rbx
cmpl $0x8, (%rax)
jne 0x2153
leaq 0x10e9(%rip), %rsi      # 0x3229
leaq 0x10a0(%rip), %rdx      # 0x31e7
movl $0x2, %edi
xorl %eax, %eax
callq 0x19c8
cmpl $0x7, (%rbx)
jne 0x2172
leaq 0x10ca(%rip), %rsi      # 0x3229
leaq 0xffa(%rip), %rdx       # 0x3160
movl $0x2, %edi
xorl %eax, %eax
callq 0x19c8
leaq 0x10b0(%rip), %rsi      # 0x3229
leaq 0x1071(%rip), %rdx      # 0x31f1
movl $0x2, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x19c8