// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x1c44
testq %r14, %r14
leaq 0x125b(%rip), %rbx      # 0x319a
cmovneq %r14, %rbx
callq 0x1b89
movq %rax, %r14
movzbl (%rax), %eax
cmpl $0x73, %eax
je 0x1fd2
cmpl $0x67, %eax
jne 0x1fe9
leaq 0x127e(%rip), %rsi      # 0x31e1
movq %r14, %rdi
callq 0x1140
testl %eax, %eax
jne 0x1fe9
callq 0x1060
movq %rax, %rbx
movl (%rax), %eax
cmpl $0x8, %eax
jne 0x1f98
leaq 0x12a4(%rip), %rsi      # 0x3229
leaq 0x125b(%rip), %rdx      # 0x31e7
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x194c
movl (%rbx), %eax
cmpl $0x7, %eax
jne 0x1fb5
leaq 0x1285(%rip), %rsi      # 0x3229
leaq 0x11b5(%rip), %rdx      # 0x3160
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x194c
leaq 0x126d(%rip), %rsi      # 0x3229
leaq 0x122e(%rip), %rdx      # 0x31f1
pushq $0x2
popq %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x194c
leaq 0x122b(%rip), %rsi      # 0x3204
movq %r14, %rdi
callq 0x1140
testl %eax, %eax
je 0x208a
callq 0x1060
movq %rax, %r15
movl (%rax), %eax
cmpl $0x8, %eax
jne 0x2019
leaq 0x1222(%rip), %rsi      # 0x3221
leaq 0x11e1(%rip), %r8       # 0x31e7
pushq $0x7d
popq %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x194c
movl (%r15), %eax
cmpl $0x7, %eax
jne 0x203f
leaq 0x11fc(%rip), %rsi      # 0x3221
leaq 0x1134(%rip), %r8       # 0x3160
pushq $0x7e
popq %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x194c
movl (%r15), %eax
cmpl $0x2, %eax
je 0x2067
cmpl $0x14, %eax
je 0x2067
leaq 0x11d1(%rip), %rsi      # 0x3221
leaq 0x11b1(%rip), %r8       # 0x3208
pushq $0x7e
popq %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x194c
leaq 0x11b3(%rip), %rsi      # 0x3221
leaq 0x11a2(%rip), %r8       # 0x3217
pushq $0x7f
popq %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x194c
callq 0x1060
movq %rax, %r14
movl (%rax), %eax
cmpl $0x8, %eax
jne 0x20b4
leaq 0x1189(%rip), %rsi      # 0x3229
leaq 0x1140(%rip), %rdx      # 0x31e7
pushq $0x7d
popq %rdi
xorl %eax, %eax
callq 0x194c
movl (%r14), %eax
cmpl $0x7, %eax
jne 0x20d7
leaq 0x1165(%rip), %rsi      # 0x3225
leaq 0x1099(%rip), %rcx      # 0x3160
pushq $0x7e
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x194c
movl (%r14), %eax
cmpl $0x2, %eax
je 0x20fc
cmpl $0x14, %eax
je 0x20fc
leaq 0x113d(%rip), %rsi      # 0x3225
leaq 0x1119(%rip), %rcx      # 0x3208
pushq $0x7e
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x194c
leaq 0x1122(%rip), %rsi      # 0x3225
leaq 0x110d(%rip), %rcx      # 0x3217
pushq $0x7f
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x194c