	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function validate_exec
_validate_exec:                         ## @validate_exec
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	leaq	-24(%rbp), %rsi
	callq	_stat
	movl	$-1, %ebx
	testq	%rax, %rax
	js	LBB0_3
## %bb.1:
	movl	-24(%rbp), %edi
	callq	_S_ISREG
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movq	_R_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_access
	movq	%rax, %rbx
	movq	_X_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_access
	xorl	%ecx, %ecx
	testq	%rbx, %rbx
	sete	%cl
	addl	%ecx, %ecx
	addl	$-2, %ecx
	xorl	%ebx, %ebx
	negq	%rax
	sbbl	%ebx, %ebx
	orl	%ecx, %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R_OK,4,2                       ## @R_OK
	.comm	_X_OK,4,2                       ## @X_OK
	.comm	_MAXPGPATH,4,2                  ## @MAXPGPATH
	.comm	_S_IRUSR,4,2                    ## @S_IRUSR
	.comm	_S_IXUSR,4,2                    ## @S_IXUSR
	.no_dead_strip	_validate_exec
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function validate_exec
_validate_exec:                         ; @validate_exec
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x1, sp, #8
	bl	_stat
	tbnz	x0, #63, LBB0_3
; %bb.1:
	ldr	w0, [sp, #8]
	bl	_S_ISREG
	cbz	w0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _R_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R_OK@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_access
	mov	x20, x0
Lloh3:
	adrp	x8, _X_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _X_OK@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_access
	cmp	x20, #0
	mov	w8, #-2
	csel	w8, wzr, w8, eq
	cmp	x0, #0
	csinv	w0, w8, wzr, eq
	b	LBB0_4
LBB0_3:
	mov	w0, #-1
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_R_OK,4,2                       ; @R_OK
	.comm	_X_OK,4,2                       ; @X_OK
	.comm	_MAXPGPATH,4,2                  ; @MAXPGPATH
	.comm	_S_IRUSR,4,2                    ; @S_IRUSR
	.comm	_S_IXUSR,4,2                    ; @S_IXUSR
	.no_dead_strip	_validate_exec
.subsections_via_symbols
