	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function oxnas_pcie_wr_conf
_oxnas_pcie_wr_conf:                    ## @oxnas_pcie_wr_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
	movl	%r8d, %r15d
	movl	%ecx, %r14d
	movl	%edx, %r13d
	movl	%esi, %ebx
	movq	%rdi, %r12
	movl	4(%rdi), %edi
	callq	_sys_to_pcie
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, %edi
	callq	_PCI_SLOT
	movq	_PCIBIOS_DEVICE_NOT_FOUND@GOTPCREL(%rip), %rcx
	testq	%rax, %rax
	jg	LBB0_3
## %bb.1:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, 16(%rax)
	je	LBB0_3
## %bb.2:
	movl	(%r12), %esi
	movl	4(%r12), %edi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	callq	_oxnas_pcie_cfg_to_offset
	andl	$3, %r13d
	leal	(,%r13,8), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r15d
	movb	$4, %cl
	subb	%r14b, %cl
	movl	$15, %ebx
	shrl	%cl, %ebx
	movl	%eax, %r12d
	movl	%r13d, %ecx
	shll	%cl, %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_set_out_lanes
	movl	%r12d, %esi
	addq	8(%r14), %rsi
	movl	%r15d, %edi
	callq	_writel_relaxed
	movq	%r14, %rdi
	movl	$15, %esi
	callq	_set_out_lanes
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_PCIBIOS_SUCCESSFUL@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %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_wr_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_wr_conf
_oxnas_pcie_wr_conf:                    ; @oxnas_pcie_wr_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	x21, x4
	mov	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	ldr	w0, [x0, #4]
	bl	_sys_to_pcie
	mov	x19, x0
	mov	x0, x23
	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]
	b	LBB0_4
LBB0_2:
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_1
; %bb.3:
	ldp	w1, w0, [x24]
	mov	x2, x23
	mov	x3, x22
	bl	_oxnas_pcie_cfg_to_offset
	mov	x23, x0
	and	w8, w22, #0x3
	lsl	w9, w8, #3
	lsl	w21, w21, w9
	mov	w9, #4
	sub	w9, w9, w20
	mov	w10, #15
	lsr	w9, w10, w9
	lsl	w20, w9, w8
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	x1, x20
	bl	_set_out_lanes
	ldr	x8, [x19, #8]
	add	x1, x8, w23, uxtw
	mov	x0, x21
	bl	_writel_relaxed
	mov	x0, x19
	mov	w1, #15
	bl	_set_out_lanes
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh2:
	adrp	x8, _PCIBIOS_SUCCESSFUL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PCIBIOS_SUCCESSFUL@GOTPAGEOFF]
LBB0_4:
	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_wr_conf
.subsections_via_symbols
