	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsl_pcib_cfgread
_fsl_pcib_cfgread:                      ## @fsl_pcib_cfgread
	.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
	movl	%r9d, %r15d
	movl	%r8d, %r14d
	movl	%ecx, %ebx
	movq	%rdi, %r12
	movq	_CONFIG_ACCESS_ENABLE@GOTPCREL(%rip), %r8
	movzbl	%sil, %ecx
	shll	$16, %ecx
	shll	$11, %edx
	movzwl	%dx, %edx
	andl	$7, %ebx
	shll	$8, %ebx
	movl	%r14d, %esi
	andl	$252, %esi
	movl	%r14d, %edi
	shll	$16, %edi
	andl	$251658240, %edi                ## imm = 0xF000000
	xorl	%eax, %eax
	cmpq	$0, 16(%r12)
	cmovnel	%edi, %eax
	orl	%ecx, %edx
	orl	%edx, %ebx
	orl	%esi, %ebx
	orl	(%r8), %ebx
	orl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mtx_lock_spin
	movl	4(%r12), %esi
	movl	8(%r12), %edi
	movq	_REG_CFG_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %ecx
	callq	_bus_space_write_4
	cmpl	$4, %r15d
	je	LBB0_5
## %bb.1:
	cmpl	$2, %r15d
	je	LBB0_4
## %bb.2:
	movl	$-1, %ebx
	cmpl	$1, %r15d
	jne	LBB0_7
## %bb.3:
	movl	4(%r12), %esi
	movl	8(%r12), %edi
	movq	_REG_CFG_DATA@GOTPCREL(%rip), %rax
	andl	$3, %r14d
	addl	(%rax), %r14d
	movl	%r14d, %edx
	callq	_bus_space_read_1
	jmp	LBB0_6
LBB0_5:
	movl	4(%r12), %esi
	movl	8(%r12), %edi
	movq	_REG_CFG_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_bus_space_read_4
	movl	%eax, %edi
	callq	_le32toh
	jmp	LBB0_6
LBB0_4:
	movl	4(%r12), %esi
	movl	8(%r12), %edi
	movq	_REG_CFG_DATA@GOTPCREL(%rip), %rax
	andl	$2, %r14d
	addl	(%rax), %r14d
	movl	%r14d, %edx
	callq	_bus_space_read_2
	movl	%eax, %edi
	callq	_le16toh
LBB0_6:
	movl	%eax, %ebx
LBB0_7:
	movq	%r12, %rdi
	callq	_mtx_unlock_spin
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_ACCESS_ENABLE,4,2       ## @CONFIG_ACCESS_ENABLE
	.comm	_REG_CFG_ADDR,4,2               ## @REG_CFG_ADDR
	.comm	_REG_CFG_DATA,4,2               ## @REG_CFG_DATA
	.no_dead_strip	_fsl_pcib_cfgread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsl_pcib_cfgread
_fsl_pcib_cfgread:                      ; @fsl_pcib_cfgread
	.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	x21, x5
	mov	x20, x4
	mov	x19, x0
Lloh0:
	adrp	x8, _CONFIG_ACCESS_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_ACCESS_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ubfiz	w9, w1, #16, #8
	and	w10, w4, #0xfc
	ldr	x11, [x0, #16]
	lsl	w12, w4, #16
	and	w12, w12, #0xf000000
	cmp	x11, #0
	csel	w11, wzr, w12, eq
	bfi	w9, w2, #11, #5
	bfi	w9, w3, #8, #3
	orr	w9, w9, w10
	orr	w8, w9, w8
	orr	w22, w8, w11
	bl	_mtx_lock_spin
	ldp	w1, w0, [x19, #4]
Lloh3:
	adrp	x8, _REG_CFG_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_CFG_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x3, x22
	bl	_bus_space_write_4
	cmp	w21, #4
	b.eq	LBB0_4
; %bb.1:
	cmp	w21, #2
	b.eq	LBB0_5
; %bb.2:
	cmp	w21, #1
	b.ne	LBB0_7
; %bb.3:
	ldp	w1, w0, [x19, #4]
Lloh6:
	adrp	x8, _REG_CFG_DATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_CFG_DATA@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w9, w20, #0x3
	add	w2, w8, w9
	bl	_bus_space_read_1
	b	LBB0_6
LBB0_4:
	ldp	w1, w0, [x19, #4]
Lloh9:
	adrp	x8, _REG_CFG_DATA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_CFG_DATA@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	bl	_bus_space_read_4
	bl	_le32toh
	b	LBB0_6
LBB0_5:
	ldp	w1, w0, [x19, #4]
Lloh12:
	adrp	x8, _REG_CFG_DATA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_CFG_DATA@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	and	w9, w20, #0x2
	add	w2, w8, w9
	bl	_bus_space_read_2
	bl	_le16toh
LBB0_6:
	mov	x20, x0
	b	LBB0_8
LBB0_7:
	mov	w20, #-1
LBB0_8:
	mov	x0, x19
	bl	_mtx_unlock_spin
	mov	x0, x20
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_ACCESS_ENABLE,4,2       ; @CONFIG_ACCESS_ENABLE
	.comm	_REG_CFG_ADDR,4,2               ; @REG_CFG_ADDR
	.comm	_REG_CFG_DATA,4,2               ; @REG_CFG_DATA
	.no_dead_strip	_fsl_pcib_cfgread
.subsections_via_symbols
