	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function oxnas_pcie_setup
_oxnas_pcie_setup:                      ## @oxnas_pcie_setup
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rsi, %rdi
	callq	_sys_to_pcie
	movq	%rax, %rbx
	leaq	4(%r14), %r12
	leaq	28(%rax), %rsi
	movl	12(%r14), %edx
	movq	%r12, %rdi
	callq	_pci_add_resource_offset
	leaq	24(%rbx), %rsi
	movl	12(%r14), %edx
	movq	%r12, %rdi
	callq	_pci_add_resource_offset
	leaq	20(%rbx), %rsi
	movl	8(%r14), %edx
	movq	%r12, %rdi
	callq	_pci_add_resource_offset
	leaq	16(%rbx), %r15
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_pci_add_resource
	cmpl	$0, (%r14)
	jne	LBB0_2
## %bb.1:
	movl	(%r15), %eax
	movl	%eax, (%r14)
LBB0_2:
	movq	8(%rbx), %r14
	movq	%rbx, %rdi
	addq	$4, %rdi
	movl	4(%rbx), %r15d
	callq	_resource_size
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_devm_ioremap
	movl	%eax, (%rbx)
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	callq	_oxnas_pcie_setup_hw
	movl	$1, %eax
	jmp	LBB0_5
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_oxnas_pcie_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function oxnas_pcie_setup
_oxnas_pcie_setup:                      ; @oxnas_pcie_setup
	.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	x20, x1
	mov	x0, x1
	bl	_sys_to_pcie
	mov	x19, x0
	add	x22, x20, #4
	add	x1, x0, #28
	ldr	w2, [x20, #12]
	mov	x0, x22
	bl	_pci_add_resource_offset
	add	x1, x19, #24
	ldr	w2, [x20, #12]
	mov	x0, x22
	bl	_pci_add_resource_offset
	add	x1, x19, #20
	ldr	w2, [x20, #8]
	mov	x0, x22
	bl	_pci_add_resource_offset
	add	x21, x19, #16
	mov	x0, x22
	mov	x1, x21
	bl	_pci_add_resource
	ldr	w8, [x20]
	cbnz	w8, LBB0_2
; %bb.1:
	ldr	w8, [x21]
	str	w8, [x20]
LBB0_2:
	ldr	x20, [x19, #8]
	mov	x0, x19
	ldr	w21, [x0, #4]!
	bl	_resource_size
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_devm_ioremap
	str	w0, [x19]
	cbz	w0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_oxnas_pcie_setup_hw
	mov	w0, #1
	b	LBB0_5
LBB0_4:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_oxnas_pcie_setup
.subsections_via_symbols
