	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_file_access
_check_file_access:                     ## @check_file_access
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	testq	%rsi, %rsi
	je	LBB0_24
## %bb.1:
	movq	%rcx, %r14
	movl	%edx, %r12d
	movq	%rsi, %r15
	movl	%edi, %r13d
	movq	_CHKACC_INLINE@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	je	LBB0_3
## %bb.2:
	movq	_INLINE_FILE_TAG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_streq
	testq	%rax, %rax
	jne	LBB0_24
LBB0_3:
	movq	_CHKACC_ACPTSTDIN@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_streq
	testq	%rax, %rax
	jne	LBB0_24
LBB0_5:
	movq	_CHKACC_DIRPATH@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_8
## %bb.6:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_string_alloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_dirname
	movq	_X_OK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	%r12d, %esi
	movq	%rax, %rdi
	callq	_platform_access
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %r14
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rbx, %rdi
	movl	%eax, %ebx
	callq	_free
	testq	%r14, %r14
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_8
## %bb.7:
	testl	%ebx, %ebx
	jne	LBB0_15
LBB0_8:
	movq	_CHKACC_FILE@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_11
## %bb.9:
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_platform_access
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jne	LBB0_15
LBB0_11:
	movq	_CHKACC_FILEXSTWR@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	testl	%r13d, (%rax)
	je	LBB0_15
## %bb.12:
	movq	_F_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_platform_access
	testq	%rax, %rax
	jne	LBB0_15
## %bb.13:
	movq	_W_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_platform_access
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_15:
	movq	_CHKACC_PRIVATE@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_21
## %bb.16:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_platform_stat
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	_M_WARN@GOTPCREL(%rip), %rax
	movq	_M_ERRNO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_20
LBB0_18:
	movq	_S_IRWXG@GOTPCREL(%rip), %rax
	movq	_S_IRWXO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, -48(%rbp)
	je	LBB0_21
## %bb.19:
	movq	_M_WARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_20:
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_msg
LBB0_21:
	movl	%ebx, %r12d
	testl	%ebx, %ebx
	jle	LBB0_23
## %bb.22:
	movq	_M_NOPREFIX@GOTPCREL(%rip), %rax
	movq	_M_OPTERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_M_ERRNO@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdx
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_msg
LBB0_23:
	xorl	%ebx, %ebx
	testl	%r12d, %r12d
	setne	%bl
LBB0_24:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHKACC_INLINE,4,2              ## @CHKACC_INLINE
	.comm	_INLINE_FILE_TAG,8,3            ## @INLINE_FILE_TAG
	.comm	_CHKACC_ACPTSTDIN,4,2           ## @CHKACC_ACPTSTDIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stdin"

	.comm	_CHKACC_DIRPATH,4,2             ## @CHKACC_DIRPATH
	.comm	_X_OK,4,2                       ## @X_OK
	.comm	_errno,4,2                      ## @errno
	.comm	_CHKACC_FILE,4,2                ## @CHKACC_FILE
	.comm	_CHKACC_FILEXSTWR,4,2           ## @CHKACC_FILEXSTWR
	.comm	_F_OK,4,2                       ## @F_OK
	.comm	_W_OK,4,2                       ## @W_OK
	.comm	_CHKACC_PRIVATE,4,2             ## @CHKACC_PRIVATE
	.comm	_M_WARN,4,2                     ## @M_WARN
	.comm	_M_ERRNO,4,2                    ## @M_ERRNO
L_.str.1:                               ## @.str.1
	.asciz	"WARNING: cannot stat file '%s'"

	.comm	_S_IRWXG,4,2                    ## @S_IRWXG
	.comm	_S_IRWXO,4,2                    ## @S_IRWXO
L_.str.2:                               ## @.str.2
	.asciz	"WARNING: file '%s' is group or others accessible"

	.comm	_M_NOPREFIX,4,2                 ## @M_NOPREFIX
	.comm	_M_OPTERR,4,2                   ## @M_OPTERR
L_.str.3:                               ## @.str.3
	.asciz	"%s fails with '%s'"

	.no_dead_strip	_check_file_access
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_file_access
_check_file_access:                     ; @check_file_access
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x1, LBB0_5
; %bb.1:
	mov	x19, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _CHKACC_INLINE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CHKACC_INLINE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _INLINE_FILE_TAG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INLINE_FILE_TAG@GOTPAGEOFF]
Lloh5:
	ldr	x1, [x8]
	mov	x0, x20
	bl	_streq
	cbnz	x0, LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _CHKACC_ACPTSTDIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CHKACC_ACPTSTDIN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_6
; %bb.4:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_streq
	cbz	x0, LBB0_6
LBB0_5:
	mov	w0, #0
	b	LBB0_24
LBB0_6:
Lloh11:
	adrp	x8, _CHKACC_DIRPATH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CHKACC_DIRPATH@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x26, _errno@GOTPAGE
Lloh15:
	ldr	x26, [x26, _errno@GOTPAGEOFF]
	tst	w8, w21
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x20
	mov	x1, #0
	bl	_string_alloc
	mov	x23, x0
	bl	_dirname
Lloh16:
	adrp	x8, _X_OK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _X_OK@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	orr	w1, w8, w22
	bl	_platform_access
	mov	x24, x0
	ldr	w25, [x26]
	mov	x0, x23
	bl	_free
	cmp	x24, #0
	ccmp	w25, #0, #4, ne
	b.ne	LBB0_15
LBB0_8:
Lloh19:
	adrp	x8, _CHKACC_FILE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CHKACC_FILE@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_11
; %bb.9:
	mov	x0, x20
	mov	x1, x22
	bl	_platform_access
	cbz	x0, LBB0_11
; %bb.10:
	ldr	w25, [x26]
	cbnz	w25, LBB0_15
LBB0_11:
Lloh22:
	adrp	x8, _CHKACC_FILEXSTWR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CHKACC_FILEXSTWR@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_13
; %bb.12:
Lloh25:
	adrp	x8, _F_OK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _F_OK@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_platform_access
	cbz	x0, LBB0_14
LBB0_13:
	mov	w25, #0
	b	LBB0_15
LBB0_14:
Lloh28:
	adrp	x8, _W_OK@GOTPAGE
Lloh29:
	ldr	x8, [x8, _W_OK@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_platform_access
	ldr	w8, [x26]
	cmp	x0, #0
	csel	w25, wzr, w8, eq
LBB0_15:
Lloh31:
	adrp	x8, _CHKACC_PRIVATE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CHKACC_PRIVATE@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	adrp	x22, _M_ERRNO@GOTPAGE
Lloh35:
	ldr	x22, [x22, _M_ERRNO@GOTPAGEOFF]
	tst	w8, w21
	b.eq	LBB0_21
; %bb.16:
	add	x1, sp, #8
	mov	x0, x20
	bl	_platform_stat
	cbz	x0, LBB0_18
; %bb.17:
Lloh36:
	adrp	x8, _M_WARN@GOTPAGE
Lloh37:
	ldr	x8, [x8, _M_WARN@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w0, w9, w8
Lloh39:
	adrp	x1, l_.str.1@PAGE
Lloh40:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_20
LBB0_18:
	ldr	w8, [sp, #8]
Lloh41:
	adrp	x9, _S_IRWXG@GOTPAGE
Lloh42:
	ldr	x9, [x9, _S_IRWXG@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
Lloh44:
	adrp	x10, _S_IRWXO@GOTPAGE
Lloh45:
	ldr	x10, [x10, _S_IRWXO@GOTPAGEOFF]
Lloh46:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_21
; %bb.19:
Lloh47:
	adrp	x8, _M_WARN@GOTPAGE
Lloh48:
	ldr	x8, [x8, _M_WARN@GOTPAGEOFF]
Lloh49:
	ldr	w0, [x8]
Lloh50:
	adrp	x1, l_.str.2@PAGE
Lloh51:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_20:
	mov	x2, x20
	bl	_msg
LBB0_21:
	cmp	w25, #1
	b.lt	LBB0_23
; %bb.22:
Lloh52:
	adrp	x8, _M_NOPREFIX@GOTPAGE
Lloh53:
	ldr	x8, [x8, _M_NOPREFIX@GOTPAGEOFF]
Lloh54:
	ldr	w8, [x8]
Lloh55:
	adrp	x9, _M_OPTERR@GOTPAGE
Lloh56:
	ldr	x9, [x9, _M_OPTERR@GOTPAGEOFF]
Lloh57:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x22]
	orr	w0, w8, w9
	str	x20, [sp]
Lloh58:
	adrp	x1, l_.str.3@PAGE
Lloh59:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x19
	bl	_msg
LBB0_23:
	cmp	w25, #0
	cset	w0, ne
LBB0_24:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.cfi_endproc
                                        ; -- End function
	.comm	_CHKACC_INLINE,4,2              ; @CHKACC_INLINE
	.comm	_INLINE_FILE_TAG,8,3            ; @INLINE_FILE_TAG
	.comm	_CHKACC_ACPTSTDIN,4,2           ; @CHKACC_ACPTSTDIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stdin"

	.comm	_CHKACC_DIRPATH,4,2             ; @CHKACC_DIRPATH
	.comm	_X_OK,4,2                       ; @X_OK
	.comm	_errno,4,2                      ; @errno
	.comm	_CHKACC_FILE,4,2                ; @CHKACC_FILE
	.comm	_CHKACC_FILEXSTWR,4,2           ; @CHKACC_FILEXSTWR
	.comm	_F_OK,4,2                       ; @F_OK
	.comm	_W_OK,4,2                       ; @W_OK
	.comm	_CHKACC_PRIVATE,4,2             ; @CHKACC_PRIVATE
	.comm	_M_WARN,4,2                     ; @M_WARN
	.comm	_M_ERRNO,4,2                    ; @M_ERRNO
l_.str.1:                               ; @.str.1
	.asciz	"WARNING: cannot stat file '%s'"

	.comm	_S_IRWXG,4,2                    ; @S_IRWXG
	.comm	_S_IRWXO,4,2                    ; @S_IRWXO
l_.str.2:                               ; @.str.2
	.asciz	"WARNING: file '%s' is group or others accessible"

	.comm	_M_NOPREFIX,4,2                 ; @M_NOPREFIX
	.comm	_M_OPTERR,4,2                   ; @M_OPTERR
l_.str.3:                               ; @.str.3
	.asciz	"%s fails with '%s'"

	.no_dead_strip	_check_file_access
.subsections_via_symbols
