	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_os_file_mode                   ## -- Begin function os_file_mode
	.p2align	4, 0x90
_os_file_mode:                          ## @os_file_mode
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_OPENFLAGS
	movl	%eax, (%r14)
	movq	_W_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_access
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_EACCES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_4
## %bb.2:
	negl	%eax
	jmp	LBB0_7
LBB0_3:
	movl	(%r14), %edi
	callq	_of_write
	movl	%eax, (%r14)
LBB0_4:
	movq	_R_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_access
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ecx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_EACCES@GOTPCREL(%rip), %rsi
	movl	%edx, %eax
	negl	%eax
	cmpl	(%rsi), %edx
	cmovel	%ecx, %eax
	jmp	LBB0_7
LBB0_6:
	movl	(%r14), %edi
	callq	_of_read
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_W_OK,4,2                       ## @W_OK
	.comm	_errno,4,2                      ## @errno
	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_R_OK,4,2                       ## @R_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_os_file_mode                   ; -- Begin function os_file_mode
	.p2align	2
_os_file_mode:                          ; @os_file_mode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
	bl	_OPENFLAGS
	str	w0, [x19]
Lloh0:
	adrp	x8, _W_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _W_OK@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_access
Lloh3:
	adrp	x21, _errno@GOTPAGE
Lloh4:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
Lloh5:
	adrp	x22, _EACCES@GOTPAGE
Lloh6:
	ldr	x22, [x22, _EACCES@GOTPAGEOFF]
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w8, [x21]
	ldr	w9, [x22]
	cmp	w8, w9
	b.eq	LBB0_4
; %bb.2:
	neg	w0, w8
	b	LBB0_7
LBB0_3:
	ldr	w0, [x19]
	bl	_of_write
	str	w0, [x19]
LBB0_4:
Lloh7:
	adrp	x8, _R_OK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _R_OK@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_access
	cbz	w0, LBB0_6
; %bb.5:
	ldr	w8, [x21]
	ldr	w9, [x22]
	cmp	w8, w9
	csneg	w0, w0, w8, eq
	b	LBB0_7
LBB0_6:
	ldr	w0, [x19]
	bl	_of_read
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_W_OK,4,2                       ; @W_OK
	.comm	_errno,4,2                      ; @errno
	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_R_OK,4,2                       ; @R_OK
.subsections_via_symbols
