// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2290
cmpq $0x0, -0x8(%rbp)
jne 0x26d1
leaq 0xacf(%rip), %rax       # 0x319a
movq %rax, -0x28(%rbp)
jmp 0x26d9
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
callq 0x2100
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
movsbl 0xae9(%rip), %ecx       # 0x31e1
cmpl %ecx, %eax
jne 0x2778
movq -0x20(%rbp), %rdi
leaq 0xada(%rip), %rsi       # 0x31e1
callq 0x1140
cmpl $0x0, %eax
jne 0x2778
callq 0x1060
cmpl $0x8, (%rax)
jne 0x2735
movl $0x2, %edi
leaq 0xb02(%rip), %rsi       # 0x3229
leaq 0xab9(%rip), %rdx       # 0x31e7
movb $0x0, %al
callq 0x1e00
callq 0x1060
cmpl $0x7, (%rax)
jne 0x2759
movl $0x2, %edi
leaq 0xade(%rip), %rsi       # 0x3229
leaq 0xa0e(%rip), %rdx       # 0x3160
movb $0x0, %al
callq 0x1e00
movl $0x2, %edi
leaq 0xac4(%rip), %rsi       # 0x3229
leaq 0xa85(%rip), %rdx       # 0x31f1
movb $0x0, %al
callq 0x1e00
jmp 0x28fa
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
movsbl 0xa7e(%rip), %ecx       # 0x3204
cmpl %ecx, %eax
jne 0x2848
movq -0x20(%rbp), %rdi
leaq 0xa6b(%rip), %rsi       # 0x3204
callq 0x1140
cmpl $0x0, %eax
jne 0x2848
callq 0x1060
cmpl $0x8, (%rax)
jne 0x27cb
movl $0x7d, %edi
leaq 0xa6c(%rip), %rsi       # 0x3229
leaq 0xa23(%rip), %rdx       # 0x31e7
movb $0x0, %al
callq 0x1e00
callq 0x1060
cmpl $0x7, (%rax)
jne 0x27f3
movq -0x18(%rbp), %rdx
movl $0x7e, %edi
leaq 0xa40(%rip), %rsi       # 0x3225
leaq 0x974(%rip), %rcx       # 0x3160
movb $0x0, %al
callq 0x1e00
callq 0x1060
cmpl $0x2, (%rax)
je 0x2825
callq 0x1060
cmpl $0x14, (%rax)
je 0x2825
movq -0x18(%rbp), %rdx
movl $0x7e, %edi
leaq 0xa0e(%rip), %rsi       # 0x3225
leaq 0x9ea(%rip), %rcx       # 0x3208
movb $0x0, %al
callq 0x1e00
movq -0x18(%rbp), %rdx
movl $0x7f, %edi
leaq 0x9f0(%rip), %rsi       # 0x3225
leaq 0x9db(%rip), %rcx       # 0x3217
movb $0x0, %al
callq 0x1e00
jmp 0x28f8
callq 0x1060
cmpl $0x8, (%rax)
jne 0x2874
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x7d, %edi
leaq 0x9bb(%rip), %rsi       # 0x3221
leaq 0x97a(%rip), %r8        # 0x31e7
movb $0x0, %al
callq 0x1e00
callq 0x1060
cmpl $0x7, (%rax)
jne 0x28a0
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x7e, %edi
leaq 0x98f(%rip), %rsi       # 0x3221
leaq 0x8c7(%rip), %r8        # 0x3160
movb $0x0, %al
callq 0x1e00
callq 0x1060
cmpl $0x2, (%rax)
je 0x28d6
callq 0x1060
cmpl $0x14, (%rax)
je 0x28d6
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x7e, %edi
leaq 0x959(%rip), %rsi       # 0x3221
leaq 0x939(%rip), %r8        # 0x3208
movb $0x0, %al
callq 0x1e00
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x7f, %edi
leaq 0x937(%rip), %rsi       # 0x3221
leaq 0x926(%rip), %r8        # 0x3217
movb $0x0, %al
callq 0x1e00
jmp 0x28fa
addq $0x30, %rsp
popq %rbp
retq