	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exec_check_perm
_exec_check_perm:                       ## @exec_check_perm
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.3:
	movq	%rdi, %rbx
	leaq	-24(%rbp), %rsi
	callq	_stat
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_XLOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_plog
	movq	_errno@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_dlog
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_5:
	movl	-24(%rbp), %edi
	callq	_S_ISREG
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	-16(%rbp), %rcx
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.8:
	movq	_XLOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_plog
	jmp	LBB0_17
LBB0_6:
	movq	_XLOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_plog
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_9:
	movl	-24(%rbp), %eax
	movq	_S_IXUSR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.11:
	movq	_S_ISUID@GOTPCREL(%rip), %rcx
	movq	_S_ISGID@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_13
## %bb.12:
	movq	_XLOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_16
LBB0_10:
	movq	_XLOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_16
LBB0_13:
	movq	_S_IWOTH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.15:
	movq	_XLOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
LBB0_16:
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_plog
LBB0_17:
	movq	_EACCES@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %eax
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_14:
	xorl	%eax, %eax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"exec_check_permission got a NULL map"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_XLOG_ERROR,4,2                 ## @XLOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"map \"%s\" stat failure: %m"

	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"map \"%s\" should be regular file"

L_.str.3:                               ## @.str.3
	.asciz	"map \"%s\" owned by uid %u (must be 0)"

	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_S_IXUSR,4,2                    ## @S_IXUSR
L_.str.4:                               ## @.str.4
	.asciz	"map \"%s\" should be executable"

	.comm	_S_ISUID,4,2                    ## @S_ISUID
	.comm	_S_ISGID,4,2                    ## @S_ISGID
L_.str.5:                               ## @.str.5
	.asciz	"map \"%s\" should not be setuid/setgid"

	.comm	_S_IWOTH,4,2                    ## @S_IWOTH
L_.str.6:                               ## @.str.6
	.asciz	"map \"%s\" should not be world writeable"

	.no_dead_strip	_exec_check_perm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exec_check_perm
_exec_check_perm:                       ; @exec_check_perm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	add	x1, sp, #16
	bl	_stat
	cbz	x0, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _XLOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XLOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_plog
Lloh5:
	adrp	x8, _errno@GOTPAGE
Lloh6:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
	b	LBB0_9
LBB0_3:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dlog
LBB0_4:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
	ldr	w0, [sp, #16]
	bl	_S_ISREG
	cbz	w0, LBB0_11
; %bb.6:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_12
; %bb.7:
Lloh11:
	adrp	x9, _XLOG_ERROR@GOTPAGE
Lloh12:
	ldr	x9, [x9, _XLOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x9]
	str	x8, [sp]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_8:
	mov	x2, x19
	bl	_plog
Lloh16:
	adrp	x8, _EACCES@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_11:
Lloh18:
	adrp	x8, _XLOG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _XLOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_plog
	b	LBB0_4
LBB0_12:
	ldr	w8, [sp, #16]
Lloh23:
	adrp	x9, _S_IXUSR@GOTPAGE
Lloh24:
	ldr	x9, [x9, _S_IXUSR@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.13:
Lloh26:
	adrp	x9, _S_ISUID@GOTPAGE
Lloh27:
	ldr	x9, [x9, _S_ISUID@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
Lloh29:
	adrp	x10, _S_ISGID@GOTPAGE
Lloh30:
	ldr	x10, [x10, _S_ISGID@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_16
; %bb.14:
Lloh32:
	adrp	x8, _XLOG_ERROR@GOTPAGE
Lloh33:
	ldr	x8, [x8, _XLOG_ERROR@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
Lloh35:
	adrp	x1, l_.str.5@PAGE
Lloh36:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_8
LBB0_15:
Lloh37:
	adrp	x8, _XLOG_ERROR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _XLOG_ERROR@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
Lloh40:
	adrp	x1, l_.str.4@PAGE
Lloh41:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_8
LBB0_16:
Lloh42:
	adrp	x9, _S_IWOTH@GOTPAGE
Lloh43:
	ldr	x9, [x9, _S_IWOTH@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.17:
Lloh45:
	adrp	x8, _XLOG_ERROR@GOTPAGE
Lloh46:
	ldr	x8, [x8, _XLOG_ERROR@GOTPAGEOFF]
Lloh47:
	ldr	w0, [x8]
Lloh48:
	adrp	x1, l_.str.6@PAGE
Lloh49:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_8
LBB0_18:
	mov	w0, #0
	b	LBB0_10
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"exec_check_permission got a NULL map"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_XLOG_ERROR,4,2                 ; @XLOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"map \"%s\" stat failure: %m"

	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"map \"%s\" should be regular file"

l_.str.3:                               ; @.str.3
	.asciz	"map \"%s\" owned by uid %u (must be 0)"

	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_S_IXUSR,4,2                    ; @S_IXUSR
l_.str.4:                               ; @.str.4
	.asciz	"map \"%s\" should be executable"

	.comm	_S_ISUID,4,2                    ; @S_ISUID
	.comm	_S_ISGID,4,2                    ; @S_ISGID
l_.str.5:                               ; @.str.5
	.asciz	"map \"%s\" should not be setuid/setgid"

	.comm	_S_IWOTH,4,2                    ; @S_IWOTH
l_.str.6:                               ; @.str.6
	.asciz	"map \"%s\" should not be world writeable"

	.no_dead_strip	_exec_check_perm
.subsections_via_symbols
