	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2800pci_set_state
_rt2800pci_set_state:                   ## @rt2800pci_set_state
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_STATE_AWAKE@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_MCU_WAKEUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TOKEN_WAKEUP@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	movl	$2, %r8d
	callq	_rt2800_mcu_request
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_rt2800pci_mcu_status
	jmp	LBB0_4
LBB0_2:
	movq	_STATE_SLEEP@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_4
## %bb.3:
	movq	_H2M_MAILBOX_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$-1, %edx
	callq	_rt2x00mmio_register_write
	movq	_H2M_MAILBOX_CID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$-1, %edx
	callq	_rt2x00mmio_register_write
	movq	_MCU_SLEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TOKEN_SLEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$255, %ecx
	movl	$1, %r8d
	callq	_rt2800_mcu_request
LBB0_4:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STATE_AWAKE,4,2                ## @STATE_AWAKE
	.comm	_MCU_WAKEUP,4,2                 ## @MCU_WAKEUP
	.comm	_TOKEN_WAKEUP,4,2               ## @TOKEN_WAKEUP
	.comm	_STATE_SLEEP,4,2                ## @STATE_SLEEP
	.comm	_H2M_MAILBOX_STATUS,4,2         ## @H2M_MAILBOX_STATUS
	.comm	_H2M_MAILBOX_CID,4,2            ## @H2M_MAILBOX_CID
	.comm	_MCU_SLEEP,4,2                  ## @MCU_SLEEP
	.comm	_TOKEN_SLEEP,4,2                ## @TOKEN_SLEEP
	.no_dead_strip	_rt2800pci_set_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2800pci_set_state
_rt2800pci_set_state:                   ; @rt2800pci_set_state
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _STATE_AWAKE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STATE_AWAKE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MCU_WAKEUP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MCU_WAKEUP@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x20, _TOKEN_WAKEUP@GOTPAGE
Lloh7:
	ldr	x20, [x20, _TOKEN_WAKEUP@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #2
	bl	_rt2800_mcu_request
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rt2800pci_mcu_status
	b	LBB0_4
LBB0_2:
Lloh8:
	adrp	x8, _STATE_SLEEP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _STATE_SLEEP@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_4
; %bb.3:
Lloh11:
	adrp	x8, _H2M_MAILBOX_STATUS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _H2M_MAILBOX_STATUS@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-1
	bl	_rt2x00mmio_register_write
Lloh14:
	adrp	x8, _H2M_MAILBOX_CID@GOTPAGE
Lloh15:
	ldr	x8, [x8, _H2M_MAILBOX_CID@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-1
	bl	_rt2x00mmio_register_write
Lloh17:
	adrp	x8, _MCU_SLEEP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MCU_SLEEP@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _TOKEN_SLEEP@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TOKEN_SLEEP@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #255
	mov	w4, #1
	bl	_rt2800_mcu_request
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_STATE_AWAKE,4,2                ; @STATE_AWAKE
	.comm	_MCU_WAKEUP,4,2                 ; @MCU_WAKEUP
	.comm	_TOKEN_WAKEUP,4,2               ; @TOKEN_WAKEUP
	.comm	_STATE_SLEEP,4,2                ; @STATE_SLEEP
	.comm	_H2M_MAILBOX_STATUS,4,2         ; @H2M_MAILBOX_STATUS
	.comm	_H2M_MAILBOX_CID,4,2            ; @H2M_MAILBOX_CID
	.comm	_MCU_SLEEP,4,2                  ; @MCU_SLEEP
	.comm	_TOKEN_SLEEP,4,2                ; @TOKEN_SLEEP
	.no_dead_strip	_rt2800pci_set_state
.subsections_via_symbols
