	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nexus_map_resource
_nexus_map_resource:                    ## @nexus_map_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%r8, %r12
	movq	%rcx, %rbx
	movl	%edx, %r15d
	movq	%rcx, %rdi
	callq	_rman_get_flags
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.1:
	movl	%r15d, %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	jne	LBB0_8
## %bb.2:
	leaq	-72(%rbp), %rdi
	callq	_resource_init_map_request
	testq	%r12, %r12
	je	LBB0_4
## %bb.3:
	movl	20(%r12), %edi
	movl	-52(%rbp), %esi
	callq	_imin
                                        ## kill: def $eax killed $eax def $rax
	leaq	-72(%rbp), %rdi
	movq	%r12, %rsi
	movq	%rax, %rdx
	callq	_memcpy
LBB0_4:
	movq	%rbx, %rdi
	callq	_rman_get_start
	movq	%rax, %r13
	addq	-72(%rbp), %r13
	movq	-64(%rbp), %r12
	testq	%r12, %r12
	jne	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_rman_get_size
	movq	%rax, %r12
LBB0_6:
	movq	%rbx, %rdi
	callq	_rman_get_end
	cmpq	%rax, %r13
	jg	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_rman_get_start
	cmpq	%rax, %r13
	jge	LBB0_12
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	(%r12,%r13), %rax
	decq	%rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_rman_get_end
	cmpq	%rax, -48(%rbp)                 ## 8-byte Folded Reload
	jg	LBB0_8
## %bb.13:
	testq	%r12, %r12
	jle	LBB0_8
## %bb.14:
	xorl	%ebx, %ebx
	cmpl	$128, %r15d
	je	LBB0_17
## %bb.15:
	cmpl	$129, %r15d
	jne	LBB0_11
## %bb.16:
	movq	%r13, 8(%r14)
	movq	_X86_BUS_SPACE_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movq	%r12, 16(%r14)
	movq	$0, (%r14)
	jmp	LBB0_11
LBB0_17:
	movl	-56(%rbp), %edx
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_pmap_mapdev_attr
	movq	%rax, (%r14)
	movq	_X86_BUS_SPACE_MEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%r14)
	movq	%r12, 16(%r14)
	movq	%rax, 8(%r14)
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_X86_BUS_SPACE_IO,4,2           ## @X86_BUS_SPACE_IO
	.comm	_X86_BUS_SPACE_MEM,4,2          ## @X86_BUS_SPACE_MEM
	.no_dead_strip	_nexus_map_resource
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nexus_map_resource
_nexus_map_resource:                    ; @nexus_map_resource
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x5
	mov	x22, x4
	mov	x21, x3
	mov	x20, x2
	mov	x0, x3
	bl	_rman_get_flags
Lloh0:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_14
; %bb.1:
	and	w8, w20, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_13
; %bb.2:
	add	x0, sp, #8
	bl	_resource_init_map_request
	cbz	x22, LBB0_4
; %bb.3:
	ldr	w0, [x22, #20]
	ldr	w1, [sp, #28]
	bl	_imin
	mov	x2, x0
	add	x0, sp, #8
	mov	x1, x22
	bl	_memcpy
LBB0_4:
	mov	x0, x21
	bl	_rman_get_start
	ldp	x8, x22, [sp, #8]
	add	x23, x8, x0
	cbnz	x22, LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_rman_get_size
	mov	x22, x0
LBB0_6:
	mov	x0, x21
	bl	_rman_get_end
	cmp	x23, x0
	b.gt	LBB0_13
; %bb.7:
	mov	x0, x21
	bl	_rman_get_start
	cmp	x23, x0
	b.lt	LBB0_13
; %bb.8:
	add	x8, x23, x22
	sub	x24, x8, #1
	mov	x0, x21
	bl	_rman_get_end
	cmp	x24, x0
	b.gt	LBB0_13
; %bb.9:
	cmp	x22, #0
	b.le	LBB0_13
; %bb.10:
	cmp	w20, #128
	b.eq	LBB0_17
; %bb.11:
	cmp	w20, #129
	b.ne	LBB0_18
; %bb.12:
	mov	w0, #0
Lloh3:
	adrp	x8, _X86_BUS_SPACE_IO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _X86_BUS_SPACE_IO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	stp	x23, x22, [x19, #8]
	str	xzr, [x19]
	b	LBB0_16
LBB0_13:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh8:
	adrp	x8, _ENXIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_15:
	ldr	w0, [x8]
LBB0_16:
	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
	add	sp, sp, #96
	ret
LBB0_17:
	ldr	w2, [sp, #24]
	mov	x0, x23
	mov	x1, x22
	bl	_pmap_mapdev_attr
	mov	x8, x0
	mov	w0, #0
Lloh10:
	adrp	x9, _X86_BUS_SPACE_MEM@GOTPAGE
Lloh11:
	ldr	x9, [x9, _X86_BUS_SPACE_MEM@GOTPAGEOFF]
	stp	x8, x8, [x19]
Lloh12:
	ldr	w9, [x9]
	str	w9, [x19, #24]
	str	x22, [x19, #16]
	b	LBB0_16
LBB0_18:
	mov	w0, #0
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_X86_BUS_SPACE_IO,4,2           ; @X86_BUS_SPACE_IO
	.comm	_X86_BUS_SPACE_MEM,4,2          ; @X86_BUS_SPACE_MEM
	.no_dead_strip	_nexus_map_resource
.subsections_via_symbols
