	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsl_pcib_cfgwrite
_fsl_pcib_cfgwrite:                     ## @fsl_pcib_cfgwrite
	.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	%r9d, %r14d
	movl	%r8d, %r15d
	movl	%ecx, %ebx
	movq	%rdi, %r12
	movl	16(%rbp), %r13d
	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	%r15d, %esi
	andl	$252, %esi
	movl	%r15d, %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, %r13d
	je	LBB0_5
## %bb.1:
	cmpl	$2, %r13d
	je	LBB0_4
## %bb.2:
	cmpl	$1, %r13d
	jne	LBB0_6
## %bb.3:
	movl	4(%r12), %esi
	movl	8(%r12), %edi
	movq	_REG_CFG_DATA@GOTPCREL(%rip), %rax
	andl	$3, %r15d
	addl	(%rax), %r15d
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_bus_space_write_1
	jmp	LBB0_6
LBB0_5:
	movl	4(%r12), %r15d
	movl	8(%r12), %ebx
	movq	_REG_CFG_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r14d, %edi
	callq	_htole32
	movl	%ebx, %edi
	movl	%r15d, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_bus_space_write_4
	jmp	LBB0_6
LBB0_4:
	movl	4(%r12), %r13d
	movl	8(%r12), %ebx
	movq	_REG_CFG_DATA@GOTPCREL(%rip), %rax
	andl	$2, %r15d
	addl	(%rax), %r15d
	movl	%r14d, %edi
	callq	_htole16
	movl	%ebx, %edi
	movl	%r13d, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_bus_space_write_2
LBB0_6:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtx_unlock_spin                ## TAILCALL
	.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_cfgwrite
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsl_pcib_cfgwrite
_fsl_pcib_cfgwrite:                     ; @fsl_pcib_cfgwrite
	.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	x22, x6
	mov	x20, x5
	mov	x21, 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	w23, 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, x23
	bl	_bus_space_write_4
	cmp	w22, #4
	b.eq	LBB0_4
; %bb.1:
	cmp	w22, #2
	b.eq	LBB0_5
; %bb.2:
	cmp	w22, #1
	b.ne	LBB0_6
; %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, w21, #0x3
	add	w2, w8, w9
	mov	x3, x20
	bl	_bus_space_write_1
	b	LBB0_6
LBB0_4:
	ldp	w22, w21, [x19, #4]
Lloh9:
	adrp	x8, _REG_CFG_DATA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_CFG_DATA@GOTPAGEOFF]
Lloh11:
	ldr	w23, [x8]
	mov	x0, x20
	bl	_htole32
	mov	x3, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_bus_space_write_4
	b	LBB0_6
LBB0_5:
	ldp	w23, w22, [x19, #4]
Lloh12:
	adrp	x8, _REG_CFG_DATA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_CFG_DATA@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	and	w9, w21, #0x2
	add	w21, w8, w9
	mov	x0, x20
	bl	_htole16
	mov	x3, x0
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	bl	_bus_space_write_2
LBB0_6:
	mov	x0, x19
	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
	b	_mtx_unlock_spin
	.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_cfgwrite
.subsections_via_symbols
