	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __io_perms_to_prot
___io_perms_to_prot:                    ## @__io_perms_to_prot
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_R_PERM_RWX@GOTPCREL(%rip), %rdx
	movl	%edi, %ecx
	notl	%ecx
	movq	_PAGE_EXECUTE_READWRITE@GOTPCREL(%rip), %rax
	testl	%ecx, (%rdx)
	je	LBB0_11
## %bb.1:
	movq	_R_PERM_W@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	movq	_R_PERM_X@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	%esi, %edx
	orl	%r9d, %edx
	testl	%ecx, %edx
	je	LBB0_11
## %bb.2:
	movq	_R_PERM_R@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r8d, %eax
	orl	%esi, %eax
	testl	%ecx, %eax
	jne	LBB0_4
## %bb.3:
	movq	_PAGE_EXECUTE_READ@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_4:
	movq	_R_PERM_RW@GOTPCREL(%rip), %rdx
	movq	_PAGE_READWRITE@GOTPCREL(%rip), %rax
	testl	%ecx, (%rdx)
	je	LBB0_11
## %bb.5:
	andl	%edi, %r9d
	jne	LBB0_11
## %bb.6:
	testl	%edi, %esi
	je	LBB0_8
## %bb.7:
	movq	_PAGE_EXECUTE@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_8:
	testl	%edi, %r8d
	jne	LBB0_9
## %bb.10:
	movq	_PAGE_NOACCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	movq	_PAGE_READONLY@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R_PERM_RWX,4,2                 ## @R_PERM_RWX
	.comm	_PAGE_EXECUTE_READWRITE,4,2     ## @PAGE_EXECUTE_READWRITE
	.comm	_R_PERM_W,4,2                   ## @R_PERM_W
	.comm	_R_PERM_X,4,2                   ## @R_PERM_X
	.comm	_R_PERM_R,4,2                   ## @R_PERM_R
	.comm	_PAGE_EXECUTE_READ,4,2          ## @PAGE_EXECUTE_READ
	.comm	_R_PERM_RW,4,2                  ## @R_PERM_RW
	.comm	_PAGE_READWRITE,4,2             ## @PAGE_READWRITE
	.comm	_PAGE_EXECUTE,4,2               ## @PAGE_EXECUTE
	.comm	_PAGE_READONLY,4,2              ## @PAGE_READONLY
	.comm	_PAGE_NOACCESS,4,2              ## @PAGE_NOACCESS
	.no_dead_strip	___io_perms_to_prot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __io_perms_to_prot
___io_perms_to_prot:                    ; @__io_perms_to_prot
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _R_PERM_RWX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R_PERM_RWX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bics	wzr, w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _R_PERM_W@GOTPAGE
Lloh4:
	ldr	x8, [x8, _R_PERM_W@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
Lloh6:
	adrp	x8, _R_PERM_X@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R_PERM_X@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w10, w8, w9
	bics	wzr, w10, w0
	b.ne	LBB0_3
LBB0_2:
Lloh9:
	adrp	x8, _PAGE_EXECUTE_READWRITE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PAGE_EXECUTE_READWRITE@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ret
LBB0_3:
Lloh12:
	adrp	x10, _R_PERM_R@GOTPAGE
Lloh13:
	ldr	x10, [x10, _R_PERM_R@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w11, w10, w8
	bics	wzr, w11, w0
	b.ne	LBB0_5
; %bb.4:
Lloh15:
	adrp	x8, _PAGE_EXECUTE_READ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PAGE_EXECUTE_READ@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ret
LBB0_5:
Lloh18:
	adrp	x11, _R_PERM_RW@GOTPAGE
Lloh19:
	ldr	x11, [x11, _R_PERM_RW@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	bic	w11, w11, w0
Lloh21:
	adrp	x12, _PAGE_READWRITE@GOTPAGE
Lloh22:
	ldr	x12, [x12, _PAGE_READWRITE@GOTPAGEOFF]
Lloh23:
	adrp	x13, _PAGE_READONLY@GOTPAGE
Lloh24:
	ldr	x13, [x13, _PAGE_READONLY@GOTPAGEOFF]
	and	w9, w9, w0
Lloh25:
	adrp	x14, _PAGE_NOACCESS@GOTPAGE
Lloh26:
	ldr	x14, [x14, _PAGE_NOACCESS@GOTPAGEOFF]
	tst	w10, w0
	csel	x10, x14, x13, eq
	tst	w8, w0
Lloh27:
	adrp	x8, _PAGE_EXECUTE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PAGE_EXECUTE@GOTPAGEOFF]
	csel	x8, x8, x10, ne
	cmp	w11, #0
	ccmp	w9, #0, #0, ne
	csel	x8, x12, x8, ne
	ldr	w0, [x8]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_R_PERM_RWX,4,2                 ; @R_PERM_RWX
	.comm	_PAGE_EXECUTE_READWRITE,4,2     ; @PAGE_EXECUTE_READWRITE
	.comm	_R_PERM_W,4,2                   ; @R_PERM_W
	.comm	_R_PERM_X,4,2                   ; @R_PERM_X
	.comm	_R_PERM_R,4,2                   ; @R_PERM_R
	.comm	_PAGE_EXECUTE_READ,4,2          ; @PAGE_EXECUTE_READ
	.comm	_R_PERM_RW,4,2                  ; @R_PERM_RW
	.comm	_PAGE_READWRITE,4,2             ; @PAGE_READWRITE
	.comm	_PAGE_EXECUTE,4,2               ; @PAGE_EXECUTE
	.comm	_PAGE_READONLY,4,2              ; @PAGE_READONLY
	.comm	_PAGE_NOACCESS,4,2              ; @PAGE_NOACCESS
	.no_dead_strip	___io_perms_to_prot
.subsections_via_symbols
