	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2500pci_bbp_write
_rt2500pci_bbp_write:                   ## @rt2500pci_bbp_write
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_mutex_lock
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_WAIT_FOR_BBP
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	$0, -40(%rbp)
	movq	_BBPCSR_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %r12
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_rt2x00_set_field32
	movq	_BBPCSR_REGNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_rt2x00_set_field32
	movq	_BBPCSR_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
	movq	_BBPCSR_WRITE_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
	movq	_BBPCSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_rt2x00mmio_register_write
LBB0_2:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BBPCSR_VALUE,4,2               ## @BBPCSR_VALUE
	.comm	_BBPCSR_REGNUM,4,2              ## @BBPCSR_REGNUM
	.comm	_BBPCSR_BUSY,4,2                ## @BBPCSR_BUSY
	.comm	_BBPCSR_WRITE_CONTROL,4,2       ## @BBPCSR_WRITE_CONTROL
	.comm	_BBPCSR,4,2                     ## @BBPCSR
	.no_dead_strip	_rt2500pci_bbp_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2500pci_bbp_write
_rt2500pci_bbp_write:                   ; @rt2500pci_bbp_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_mutex_lock
	add	x1, sp, #8
	mov	x0, x19
	bl	_WAIT_FOR_BBP
	cbz	x0, LBB0_2
; %bb.1:
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _BBPCSR_VALUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BBPCSR_VALUE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	x2, x21
	bl	_rt2x00_set_field32
Lloh3:
	adrp	x8, _BBPCSR_REGNUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BBPCSR_REGNUM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	x2, x20
	bl	_rt2x00_set_field32
Lloh6:
	adrp	x8, _BBPCSR_BUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BBPCSR_BUSY@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #1
	bl	_rt2x00_set_field32
Lloh9:
	adrp	x8, _BBPCSR_WRITE_CONTROL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BBPCSR_WRITE_CONTROL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #1
	bl	_rt2x00_set_field32
Lloh12:
	adrp	x8, _BBPCSR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BBPCSR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	x2, [sp, #8]
	mov	x0, x19
	bl	_rt2x00mmio_register_write
LBB0_2:
	mov	x0, x19
	bl	_mutex_unlock
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BBPCSR_VALUE,4,2               ; @BBPCSR_VALUE
	.comm	_BBPCSR_REGNUM,4,2              ; @BBPCSR_REGNUM
	.comm	_BBPCSR_BUSY,4,2                ; @BBPCSR_BUSY
	.comm	_BBPCSR_WRITE_CONTROL,4,2       ; @BBPCSR_WRITE_CONTROL
	.comm	_BBPCSR,4,2                     ; @BBPCSR
	.no_dead_strip	_rt2500pci_bbp_write
.subsections_via_symbols
