	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2800pci_write_firmware
_rt2800pci_write_firmware:              ## @rt2800pci_write_firmware
	.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
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	$0, -36(%rbp)
	movq	_PBF_SYS_CTRL_HOST_RAM_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
	movq	_PBF_SYS_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	-36(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2x00mmio_register_write
	movq	_FIRMWARE_IMAGE_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_rt2x00mmio_register_multiwrite
	movl	(%r12), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rt2x00mmio_register_write
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_rt2x00mmio_register_write
	movq	_H2M_BBP_AGENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rt2x00mmio_register_write
	movq	_H2M_MAILBOX_CSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rt2x00mmio_register_write
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PBF_SYS_CTRL_HOST_RAM_WRITE,4,2 ## @PBF_SYS_CTRL_HOST_RAM_WRITE
	.comm	_PBF_SYS_CTRL,4,2               ## @PBF_SYS_CTRL
	.comm	_FIRMWARE_IMAGE_BASE,4,2        ## @FIRMWARE_IMAGE_BASE
	.comm	_H2M_BBP_AGENT,4,2              ## @H2M_BBP_AGENT
	.comm	_H2M_MAILBOX_CSR,4,2            ## @H2M_MAILBOX_CSR
	.no_dead_strip	_rt2800pci_write_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2800pci_write_firmware
_rt2800pci_write_firmware:              ; @rt2800pci_write_firmware
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, _PBF_SYS_CTRL_HOST_RAM_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PBF_SYS_CTRL_HOST_RAM_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #1
	bl	_rt2x00_set_field32
Lloh3:
	adrp	x22, _PBF_SYS_CTRL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PBF_SYS_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x21
	bl	_rt2x00mmio_register_write
Lloh5:
	adrp	x8, _FIRMWARE_IMAGE_BASE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FIRMWARE_IMAGE_BASE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x20
	mov	x3, x19
	bl	_rt2x00mmio_register_multiwrite
	ldr	w1, [x22]
	mov	x0, x21
	mov	w2, #0
	bl	_rt2x00mmio_register_write
	ldr	w1, [x22]
	mov	x0, x21
	mov	w2, #1
	bl	_rt2x00mmio_register_write
Lloh8:
	adrp	x8, _H2M_BBP_AGENT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _H2M_BBP_AGENT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_rt2x00mmio_register_write
Lloh11:
	adrp	x8, _H2M_MAILBOX_CSR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _H2M_MAILBOX_CSR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_rt2x00mmio_register_write
	mov	w0, #0
	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	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PBF_SYS_CTRL_HOST_RAM_WRITE,4,2 ; @PBF_SYS_CTRL_HOST_RAM_WRITE
	.comm	_PBF_SYS_CTRL,4,2               ; @PBF_SYS_CTRL
	.comm	_FIRMWARE_IMAGE_BASE,4,2        ; @FIRMWARE_IMAGE_BASE
	.comm	_H2M_BBP_AGENT,4,2              ; @H2M_BBP_AGENT
	.comm	_H2M_MAILBOX_CSR,4,2            ; @H2M_MAILBOX_CSR
	.no_dead_strip	_rt2800pci_write_firmware
.subsections_via_symbols
