	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function oxnas_pcie_map_registers
_oxnas_pcie_map_registers:              ## @oxnas_pcie_map_registers
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	leaq	-40(%rbp), %rdx
	movq	%rsi, %rdi
	xorl	%esi, %esi
	callq	_of_address_to_resource
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	_devm_ioremap_resource
	movq	%rax, 32(%r14)
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	leaq	-40(%rbp), %rdx
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_of_address_to_resource
	testl	%eax, %eax
	je	LBB0_11
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
LBB0_5:
	movq	%r15, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
LBB0_7:
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	_devm_ioremap_resource
	movq	%rax, 24(%r14)
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_devm_of_phy_get
	movq	%rax, 16(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_17
## %bb.13:
	movq	16(%r14), %rdi
	callq	_PTR_ERR
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_16
## %bb.14:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	16(%r14), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_15:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_7
LBB0_16:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_warn
	movq	$0, 16(%r14)
LBB0_17:
	leaq	L_.str.6(%rip), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	callq	_of_property_read_u32
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_5
LBB0_19:
	movq	-56(%rbp), %rax
	movq	%rax, 8(%r14)
	leaq	L_.str.8(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	callq	_of_property_read_u32
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	leaq	L_.str.9(%rip), %rsi
	jmp	LBB0_5
LBB0_21:
	movq	-48(%rbp), %rax
	movq	%rax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to parse base register space\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"failed to map base register space\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"failed to parse inbound register space\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to map inbound register space\n"

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
L_.str.4:                               ## @.str.4
	.asciz	"failed to probe phy\n"

L_.str.5:                               ## @.str.5
	.asciz	"phy not attached\n"

L_.str.6:                               ## @.str.6
	.asciz	"plxtech,pcie-outbound-offset"

L_.str.7:                               ## @.str.7
	.asciz	"failed to parse outbound register offset\n"

L_.str.8:                               ## @.str.8
	.asciz	"plxtech,pcie-ctrl-offset"

L_.str.9:                               ## @.str.9
	.asciz	"failed to parse pcie-ctrl register offset\n"

	.no_dead_strip	_oxnas_pcie_map_registers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function oxnas_pcie_map_registers
_oxnas_pcie_map_registers:              ; @oxnas_pcie_map_registers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	add	x2, sp, #24
	mov	x0, x1
	mov	w1, #0
	bl	_of_address_to_resource
	cbz	w0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	mov	x0, x19
	bl	_dev_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
	add	x1, sp, #24
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	x0, [x20, #32]
	cbz	x0, LBB0_8
; %bb.6:
	add	x2, sp, #24
	mov	x0, x21
	mov	w1, #1
	bl	_of_address_to_resource
	cbz	w0, LBB0_10
; %bb.7:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_8:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_dev_err
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_3
LBB0_10:
	add	x1, sp, #24
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	x0, [x20, #24]
	cbz	x0, LBB0_14
; %bb.11:
	mov	x0, x19
	mov	x1, x21
	mov	x2, #0
	bl	_devm_of_phy_get
	str	x0, [x20, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.12:
	ldr	x0, [x20, #16]
	bl	_PTR_ERR
Lloh10:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_15
; %bb.13:
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20, #16]
	bl	_PTR_ERR
	b	LBB0_4
LBB0_14:
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_9
LBB0_15:
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	str	xzr, [x20, #16]
LBB0_16:
Lloh19:
	adrp	x1, l_.str.6@PAGE
Lloh20:
	add	x1, x1, l_.str.6@PAGEOFF
	add	x2, sp, #16
	mov	x0, x21
	bl	_of_property_read_u32
	cbz	x0, LBB0_18
; %bb.17:
Lloh21:
	adrp	x1, l_.str.7@PAGE
Lloh22:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_2
LBB0_18:
	ldr	x8, [sp, #16]
	str	x8, [x20, #8]
Lloh23:
	adrp	x1, l_.str.8@PAGE
Lloh24:
	add	x1, x1, l_.str.8@PAGEOFF
	add	x2, sp, #8
	mov	x0, x21
	bl	_of_property_read_u32
	cbz	x0, LBB0_20
; %bb.19:
Lloh25:
	adrp	x1, l_.str.9@PAGE
Lloh26:
	add	x1, x1, l_.str.9@PAGEOFF
	b	LBB0_2
LBB0_20:
	ldr	x8, [sp, #8]
	str	x8, [x20]
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to parse base register space\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"failed to map base register space\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"failed to parse inbound register space\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to map inbound register space\n"

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
l_.str.4:                               ; @.str.4
	.asciz	"failed to probe phy\n"

l_.str.5:                               ; @.str.5
	.asciz	"phy not attached\n"

l_.str.6:                               ; @.str.6
	.asciz	"plxtech,pcie-outbound-offset"

l_.str.7:                               ; @.str.7
	.asciz	"failed to parse outbound register offset\n"

l_.str.8:                               ; @.str.8
	.asciz	"plxtech,pcie-ctrl-offset"

l_.str.9:                               ; @.str.9
	.asciz	"failed to parse pcie-ctrl register offset\n"

	.no_dead_strip	_oxnas_pcie_map_registers
.subsections_via_symbols
