	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cn23xx_bar1_idx_setup
_cn23xx_bar1_idx_setup:                 ## @cn23xx_bar1_idx_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rdi, %r15
	testl	%ecx, %ecx
	je	LBB0_1
## %bb.2:
	movl	%esi, %ebx
	sarl	$18, %ebx
	andl	$-16, %ebx
	movq	_PCI_BAR1_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	jmp	LBB0_3
LBB0_1:
	movl	(%r15), %edi
	movl	%r14d, %esi
	callq	_CN23XX_PEM_BAR1_INDEX_REG
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_lio_pci_readq
	movl	%eax, %esi
	callq	_WRITE_ONCE
	callq	_READ_ONCE
	movl	%eax, %ebx
	andl	$-2, %ebx
LBB0_3:
	movl	(%r15), %edi
	movl	%r14d, %esi
	callq	_CN23XX_PEM_BAR1_INDEX_REG
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_lio_pci_writeq
	movl	(%r15), %edi
	movl	%r14d, %esi
	callq	_CN23XX_PEM_BAR1_INDEX_REG
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_lio_pci_readq
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WRITE_ONCE                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_BAR1_MASK,4,2              ## @PCI_BAR1_MASK
	.no_dead_strip	_cn23xx_bar1_idx_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cn23xx_bar1_idx_setup
_cn23xx_bar1_idx_setup:                 ; @cn23xx_bar1_idx_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, x2
	mov	x19, x0
	cbz	w3, LBB0_2
; %bb.1:
	asr	w8, w1, #18
	and	w8, w8, #0xfffffff0
Lloh0:
	adrp	x9, _PCI_BAR1_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCI_BAR1_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	orr	w21, w9, w8
	b	LBB0_3
LBB0_2:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_CN23XX_PEM_BAR1_INDEX_REG
	mov	x1, x0
	mov	x0, x19
	bl	_lio_pci_readq
	mov	x1, x0
	bl	_WRITE_ONCE
	bl	_READ_ONCE
	and	w21, w0, #0xfffffffe
LBB0_3:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_CN23XX_PEM_BAR1_INDEX_REG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_lio_pci_writeq
	ldr	w0, [x19]
	mov	x1, x20
	bl	_CN23XX_PEM_BAR1_INDEX_REG
	mov	x1, x0
	mov	x0, x19
	bl	_lio_pci_readq
	mov	x1, x0
	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
	b	_WRITE_ONCE
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_BAR1_MASK,4,2              ; @PCI_BAR1_MASK
	.no_dead_strip	_cn23xx_bar1_idx_setup
.subsections_via_symbols
