	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function oxnas_pcie_rd_conf
_oxnas_pcie_rd_conf:                    ## @oxnas_pcie_rd_conf
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	4(%rdi), %edi
	callq	_sys_to_pcie
	movq	%rax, %r13
	movl	%ebx, %edi
	callq	_PCI_SLOT
	movq	%rax, %rcx
	movq	_PCIBIOS_DEVICE_NOT_FOUND@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	testq	%rcx, %rcx
	jg	LBB0_3
## %bb.1:
	cmpl	$0, 8(%r13)
	je	LBB0_3
## %bb.2:
	movl	(%r14), %esi
	movl	4(%r14), %edi
	movl	%ebx, %edx
	movl	%r12d, %ecx
	callq	_oxnas_pcie_cfg_to_offset
	movl	%eax, %edi
	addq	(%r13), %rdi
	callq	_readl_relaxed
	andl	$3, %r12d
	addl	%r12d, %r15d
	movl	$4, %edx
	subl	%r15d, %edx
	leal	(,%rdx,8), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	addl	%r12d, %edx
	shll	$3, %edx
	movl	%edx, %ecx
	sarl	%cl, %eax
	movq	_PCIBIOS_SUCCESSFUL@GOTPCREL(%rip), %rdx
LBB0_3:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	(%rdx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIBIOS_DEVICE_NOT_FOUND,4,2   ## @PCIBIOS_DEVICE_NOT_FOUND
	.comm	_PCIBIOS_SUCCESSFUL,4,2         ## @PCIBIOS_SUCCESSFUL
	.no_dead_strip	_oxnas_pcie_rd_conf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function oxnas_pcie_rd_conf
_oxnas_pcie_rd_conf:                    ; @oxnas_pcie_rd_conf
	.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, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x24, x0
	ldr	w0, [x0, #4]
	bl	_sys_to_pcie
	mov	x23, x0
	mov	x0, x22
	bl	_PCI_SLOT
	cmp	x0, #0
	b.le	LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _PCIBIOS_DEVICE_NOT_FOUND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCIBIOS_DEVICE_NOT_FOUND@GOTPAGEOFF]
	mov	w9, #-1
	b	LBB0_4
LBB0_2:
	ldr	w8, [x23, #8]
	cbz	w8, LBB0_1
; %bb.3:
	ldp	w1, w0, [x24]
	mov	x2, x22
	mov	x3, x21
	bl	_oxnas_pcie_cfg_to_offset
	ldr	x8, [x23]
	add	x0, x8, w0, uxtw
	bl	_readl_relaxed
	and	w8, w21, #0x3
	mov	w9, #4
	add	w10, w8, w20
	sub	w9, w9, w10
	lsl	w10, w9, #3
	lsl	w10, w0, w10
	add	w8, w9, w8
	lsl	w8, w8, #3
	asr	w9, w10, w8
Lloh2:
	adrp	x8, _PCIBIOS_SUCCESSFUL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PCIBIOS_SUCCESSFUL@GOTPAGEOFF]
LBB0_4:
	str	w9, [x19]
	ldr	w0, [x8]
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIBIOS_DEVICE_NOT_FOUND,4,2   ; @PCIBIOS_DEVICE_NOT_FOUND
	.comm	_PCIBIOS_SUCCESSFUL,4,2         ; @PCIBIOS_SUCCESSFUL
	.no_dead_strip	_oxnas_pcie_rd_conf
.subsections_via_symbols
