	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt73usb_config_ps
_rt73usb_config_ps:                     ## @rt73usb_config_ps
	.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	%rsi, %r13
	movq	%rdi, %r15
	movq	(%rsi), %rax
	movq	_IEEE80211_CONF_PS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_STATE_SLEEP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	movl	%ebx, %r14d
	andl	(%rax), %ecx
	jne	LBB0_2
## %bb.1:
	movq	_STATE_AWAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_2:
	movq	_MAC_CSR11@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_rt2x00usb_register_read
	movl	%eax, -44(%rbp)
	movq	_MAC_CSR11_DELAY_AFTER_TBCN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	%ebx, %r14d
	jne	LBB0_4
## %bb.3:
	movl	(%r15), %edx
	addl	$-10, %edx
	leaq	-44(%rbp), %r14
	movq	%r14, %rdi
	callq	_rt2x00_set_field32
	movq	_MAC_CSR11_TBCN_BEFORE_WAKEUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r13), %rax
	movl	4(%rax), %edx
	decl	%edx
	movq	%r14, %rdi
	callq	_rt2x00_set_field32
	movq	_MAC_CSR11_WAKEUP_LATENCY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$5, %edx
	callq	_rt2x00_set_field32
	movq	_MAC_CSR11_AUTOWAKE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field32
	movl	(%r12), %esi
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	callq	_rt2x00usb_register_write
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
	movl	(%r12), %esi
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	callq	_rt2x00usb_register_write
	movq	_USB_MODE_SLEEP@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field32
	movq	_MAC_CSR11_TBCN_BEFORE_WAKEUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field32
	movq	_MAC_CSR11_AUTOWAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field32
	movq	_MAC_CSR11_WAKEUP_LATENCY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field32
	movl	(%r12), %esi
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	callq	_rt2x00usb_register_write
	movq	_USB_MODE_WAKEUP@GOTPCREL(%rip), %rax
LBB0_5:
	movq	_USB_DEVICE_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%rax), %ecx
	movq	_REGISTER_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00usb_vendor_request_sw
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_CONF_PS,4,2          ## @IEEE80211_CONF_PS
	.comm	_STATE_SLEEP,4,2                ## @STATE_SLEEP
	.comm	_STATE_AWAKE,4,2                ## @STATE_AWAKE
	.comm	_MAC_CSR11,4,2                  ## @MAC_CSR11
	.comm	_MAC_CSR11_DELAY_AFTER_TBCN,4,2 ## @MAC_CSR11_DELAY_AFTER_TBCN
	.comm	_MAC_CSR11_TBCN_BEFORE_WAKEUP,4,2 ## @MAC_CSR11_TBCN_BEFORE_WAKEUP
	.comm	_MAC_CSR11_WAKEUP_LATENCY,4,2   ## @MAC_CSR11_WAKEUP_LATENCY
	.comm	_MAC_CSR11_AUTOWAKE,4,2         ## @MAC_CSR11_AUTOWAKE
	.comm	_USB_DEVICE_MODE,4,2            ## @USB_DEVICE_MODE
	.comm	_USB_MODE_SLEEP,4,2             ## @USB_MODE_SLEEP
	.comm	_REGISTER_TIMEOUT,4,2           ## @REGISTER_TIMEOUT
	.comm	_USB_MODE_WAKEUP,4,2            ## @USB_MODE_WAKEUP
	.no_dead_strip	_rt73usb_config_ps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt73usb_config_ps
_rt73usb_config_ps:                     ; @rt73usb_config_ps
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x1]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _IEEE80211_CONF_PS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IEEE80211_CONF_PS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _STATE_SLEEP@GOTPAGE
Lloh4:
	ldr	x10, [x10, _STATE_SLEEP@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x10]
Lloh6:
	adrp	x10, _STATE_AWAKE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _STATE_AWAKE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w23, w10, w22, eq
Lloh9:
	adrp	x21, _MAC_CSR11@GOTPAGE
Lloh10:
	ldr	x21, [x21, _MAC_CSR11@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_rt2x00usb_register_read
	str	w0, [sp, #12]
Lloh11:
	adrp	x8, _MAC_CSR11_DELAY_AFTER_TBCN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MAC_CSR11_DELAY_AFTER_TBCN@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	cmp	w23, w22
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x19]
	sub	w2, w8, #10
	add	x0, sp, #12
	bl	_rt2x00_set_field32
Lloh14:
	adrp	x8, _MAC_CSR11_TBCN_BEFORE_WAKEUP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MAC_CSR11_TBCN_BEFORE_WAKEUP@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	x8, [x20]
	ldr	w8, [x8, #4]
	sub	w2, w8, #1
	add	x0, sp, #12
	bl	_rt2x00_set_field32
Lloh17:
	adrp	x8, _MAC_CSR11_WAKEUP_LATENCY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MAC_CSR11_WAKEUP_LATENCY@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #5
	bl	_rt2x00_set_field32
Lloh20:
	adrp	x20, _MAC_CSR11_AUTOWAKE@GOTPAGE
Lloh21:
	ldr	x20, [x20, _MAC_CSR11_AUTOWAKE@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field32
	ldr	w1, [x21]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2x00usb_register_write
	ldr	w1, [x20]
	add	x0, sp, #12
	mov	w2, #1
	bl	_rt2x00_set_field32
	ldr	w1, [x21]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2x00usb_register_write
Lloh22:
	adrp	x8, _USB_MODE_SLEEP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _USB_MODE_SLEEP@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field32
Lloh24:
	adrp	x8, _MAC_CSR11_TBCN_BEFORE_WAKEUP@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MAC_CSR11_TBCN_BEFORE_WAKEUP@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field32
Lloh27:
	adrp	x8, _MAC_CSR11_AUTOWAKE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MAC_CSR11_AUTOWAKE@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field32
Lloh30:
	adrp	x8, _MAC_CSR11_WAKEUP_LATENCY@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MAC_CSR11_WAKEUP_LATENCY@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field32
	ldr	w1, [x21]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2x00usb_register_write
Lloh33:
	adrp	x8, _USB_MODE_WAKEUP@GOTPAGE
Lloh34:
	ldr	x8, [x8, _USB_MODE_WAKEUP@GOTPAGEOFF]
LBB0_3:
Lloh35:
	adrp	x9, _USB_DEVICE_MODE@GOTPAGE
Lloh36:
	ldr	x9, [x9, _USB_DEVICE_MODE@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x9]
	ldr	w3, [x8]
Lloh38:
	adrp	x8, _REGISTER_TIMEOUT@GOTPAGE
Lloh39:
	ldr	x8, [x8, _REGISTER_TIMEOUT@GOTPAGEOFF]
Lloh40:
	ldr	w4, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_rt2x00usb_vendor_request_sw
	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 AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_CONF_PS,4,2          ; @IEEE80211_CONF_PS
	.comm	_STATE_SLEEP,4,2                ; @STATE_SLEEP
	.comm	_STATE_AWAKE,4,2                ; @STATE_AWAKE
	.comm	_MAC_CSR11,4,2                  ; @MAC_CSR11
	.comm	_MAC_CSR11_DELAY_AFTER_TBCN,4,2 ; @MAC_CSR11_DELAY_AFTER_TBCN
	.comm	_MAC_CSR11_TBCN_BEFORE_WAKEUP,4,2 ; @MAC_CSR11_TBCN_BEFORE_WAKEUP
	.comm	_MAC_CSR11_WAKEUP_LATENCY,4,2   ; @MAC_CSR11_WAKEUP_LATENCY
	.comm	_MAC_CSR11_AUTOWAKE,4,2         ; @MAC_CSR11_AUTOWAKE
	.comm	_USB_DEVICE_MODE,4,2            ; @USB_DEVICE_MODE
	.comm	_USB_MODE_SLEEP,4,2             ; @USB_MODE_SLEEP
	.comm	_REGISTER_TIMEOUT,4,2           ; @REGISTER_TIMEOUT
	.comm	_USB_MODE_WAKEUP,4,2            ; @USB_MODE_WAKEUP
	.no_dead_strip	_rt73usb_config_ps
.subsections_via_symbols
