	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __of_address_to_resource
___of_address_to_resource:              ## @__of_address_to_resource
	.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
	movq	%r9, %r12
	movl	%ecx, %r15d
	movq	%rdx, %r13
	movq	%rdi, %rbx
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_of_translate_address
	jmp	LBB0_4
LBB0_2:
	movq	_IORESOURCE_IO@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_5
## %bb.3:
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r13, %rdx
	callq	_of_translate_ioport
LBB0_4:
	movq	%rax, %r14
	movq	_OF_BAD_ADDR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_6
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_9
LBB0_6:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rbx
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	%r14, 24(%r12)
	leaq	(%rbx,%r14), %rax
	decq	%rax
	movq	%rax, 16(%r12)
	movl	%r15d, (%r12)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
LBB0_8:
	movq	%rax, 8(%r12)
LBB0_9:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_IORESOURCE_IO,4,2              ## @IORESOURCE_IO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_OF_BAD_ADDR,8,3                ## @OF_BAD_ADDR
	.no_dead_strip	___of_address_to_resource
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __of_address_to_resource
___of_address_to_resource:              ; @__of_address_to_resource
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x5
	mov	x20, x4
	mov	x22, x3
	mov	x23, x2
	mov	x21, x0
Lloh0:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w3
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_of_translate_address
	b	LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _IORESOURCE_IO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IORESOURCE_IO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_5
; %bb.3:
	mov	x0, x21
	mov	x2, x23
	bl	_of_translate_ioport
LBB0_4:
	mov	x24, x0
Lloh6:
	adrp	x8, _OF_BAD_ADDR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OF_BAD_ADDR@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_6:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	add	x8, x23, x24
	sub	x8, x8, #1
	stp	x8, x24, [x19, #16]
	str	w22, [x19]
	cbnz	x20, LBB0_8
; %bb.7:
	ldr	x20, [x21]
LBB0_8:
	mov	w0, #0
	str	x20, [x19, #8]
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_IORESOURCE_IO,4,2              ; @IORESOURCE_IO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_OF_BAD_ADDR,8,3                ; @OF_BAD_ADDR
	.no_dead_strip	___of_address_to_resource
.subsections_via_symbols
