	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt73usb_set_state
_rt73usb_set_state:                     ## @rt73usb_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	%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
	movq	%rdi, %rbx
	movq	_STATE_AWAKE@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	cmpl	%esi, (%rax)
	setne	%r15b
	sete	%r14b
	movq	_MAC_CSR12@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_rt2x00usb_register_read
	movl	%eax, -44(%rbp)
	movq	_MAC_CSR12_FORCE_WAKEUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %r12
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_rt2x00_set_field32
	movq	_MAC_CSR12_PUT_TO_SLEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_rt2x00_set_field32
	movl	(%r13), %esi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2x00usb_register_write
	movq	_REGISTER_BUSY_COUNT@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	je	LBB0_5
## %bb.1:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_rt2x00usb_register_read
	movq	_MAC_CSR12_BBP_CURRENT_STATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_rt2x00_get_field32
	cmpl	%r14d, %eax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %esi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2x00usb_register_write
	movl	$10, %edi
	callq	_msleep
	incl	%r15d
	cmpl	(%r12), %r15d
	jb	LBB0_2
LBB0_5:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_3:
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STATE_AWAKE,4,2                ## @STATE_AWAKE
	.comm	_MAC_CSR12,4,2                  ## @MAC_CSR12
	.comm	_MAC_CSR12_FORCE_WAKEUP,4,2     ## @MAC_CSR12_FORCE_WAKEUP
	.comm	_MAC_CSR12_PUT_TO_SLEEP,4,2     ## @MAC_CSR12_PUT_TO_SLEEP
	.comm	_REGISTER_BUSY_COUNT,4,2        ## @REGISTER_BUSY_COUNT
	.comm	_MAC_CSR12_BBP_CURRENT_STATE,4,2 ## @MAC_CSR12_BBP_CURRENT_STATE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_rt73usb_set_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt73usb_set_state
_rt73usb_set_state:                     ; @rt73usb_set_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
Lloh0:
	adrp	x8, _STATE_AWAKE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STATE_AWAKE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	cset	w21, ne
	cset	w20, eq
Lloh3:
	adrp	x22, _MAC_CSR12@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MAC_CSR12@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_rt2x00usb_register_read
	str	w0, [sp, #12]
Lloh5:
	adrp	x8, _MAC_CSR12_FORCE_WAKEUP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAC_CSR12_FORCE_WAKEUP@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x20
	bl	_rt2x00_set_field32
Lloh8:
	adrp	x8, _MAC_CSR12_PUT_TO_SLEEP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAC_CSR12_PUT_TO_SLEEP@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x21
	bl	_rt2x00_set_field32
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2x00usb_register_write
Lloh11:
	adrp	x21, _REGISTER_BUSY_COUNT@GOTPAGE
Lloh12:
	ldr	x21, [x21, _REGISTER_BUSY_COUNT@GOTPAGEOFF]
	ldr	w8, [x21]
	cbz	w8, LBB0_4
; %bb.1:
	mov	w23, #0
Lloh13:
	adrp	x24, _MAC_CSR12_BBP_CURRENT_STATE@GOTPAGE
Lloh14:
	ldr	x24, [x24, _MAC_CSR12_BBP_CURRENT_STATE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rt2x00usb_register_read
	ldr	w1, [x24]
	bl	_rt2x00_get_field32
	cmp	w0, w20
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2x00usb_register_write
	mov	w0, #10
	bl	_msleep
	add	w23, w23, #1
	ldr	w8, [x21]
	cmp	w23, w8
	b.lo	LBB0_2
LBB0_4:
Lloh15:
	adrp	x8, _EBUSY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_STATE_AWAKE,4,2                ; @STATE_AWAKE
	.comm	_MAC_CSR12,4,2                  ; @MAC_CSR12
	.comm	_MAC_CSR12_FORCE_WAKEUP,4,2     ; @MAC_CSR12_FORCE_WAKEUP
	.comm	_MAC_CSR12_PUT_TO_SLEEP,4,2     ; @MAC_CSR12_PUT_TO_SLEEP
	.comm	_REGISTER_BUSY_COUNT,4,2        ; @REGISTER_BUSY_COUNT
	.comm	_MAC_CSR12_BBP_CURRENT_STATE,4,2 ; @MAC_CSR12_BBP_CURRENT_STATE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_rt73usb_set_state
.subsections_via_symbols
