	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2500usb_config_erp
_rt2500usb_config_erp:                  ## @rt2500usb_config_erp
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_BSS_CHANGED_ERP_PREAMBLE@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_TXRX_CSR10@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_rt2500usb_register_read
	movl	%eax, -36(%rbp)
	movq	_TXRX_CSR10_AUTORESPOND_PREAMBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpl	$0, 20(%r14)
	setne	%dl
	leaq	-36(%rbp), %rdi
	callq	_rt2x00_set_field16
	movl	(%r12), %esi
	movl	-36(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2500usb_register_write
LBB0_2:
	movq	_BSS_CHANGED_BASIC_RATES@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_TXRX_CSR11@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r14), %edx
	movq	%rbx, %rdi
	callq	_rt2500usb_register_write
LBB0_4:
	movq	_BSS_CHANGED_BEACON_INT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_TXRX_CSR18@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_rt2500usb_register_read
	movl	%eax, -36(%rbp)
	movq	_TXRX_CSR18_INTERVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	shll	$2, %edx
	leaq	-36(%rbp), %rdi
	callq	_rt2x00_set_field16
	movl	(%r12), %esi
	movl	-36(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2500usb_register_write
LBB0_6:
	movq	_BSS_CHANGED_ERP_SLOT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_8
## %bb.7:
	movq	_MAC_CSR10@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r14), %edx
	movq	%rbx, %rdi
	callq	_rt2500usb_register_write
	movq	_MAC_CSR11@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	movq	%rbx, %rdi
	callq	_rt2500usb_register_write
	movq	_MAC_CSR12@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %edx
	movq	%rbx, %rdi
	callq	_rt2500usb_register_write
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BSS_CHANGED_ERP_PREAMBLE,4,2   ## @BSS_CHANGED_ERP_PREAMBLE
	.comm	_TXRX_CSR10,4,2                 ## @TXRX_CSR10
	.comm	_TXRX_CSR10_AUTORESPOND_PREAMBLE,4,2 ## @TXRX_CSR10_AUTORESPOND_PREAMBLE
	.comm	_BSS_CHANGED_BASIC_RATES,4,2    ## @BSS_CHANGED_BASIC_RATES
	.comm	_TXRX_CSR11,4,2                 ## @TXRX_CSR11
	.comm	_BSS_CHANGED_BEACON_INT,4,2     ## @BSS_CHANGED_BEACON_INT
	.comm	_TXRX_CSR18,4,2                 ## @TXRX_CSR18
	.comm	_TXRX_CSR18_INTERVAL,4,2        ## @TXRX_CSR18_INTERVAL
	.comm	_BSS_CHANGED_ERP_SLOT,4,2       ## @BSS_CHANGED_ERP_SLOT
	.comm	_MAC_CSR10,4,2                  ## @MAC_CSR10
	.comm	_MAC_CSR11,4,2                  ## @MAC_CSR11
	.comm	_MAC_CSR12,4,2                  ## @MAC_CSR12
	.no_dead_strip	_rt2500usb_config_erp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2500usb_config_erp
_rt2500usb_config_erp:                  ; @rt2500usb_config_erp
	.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
Lloh0:
	adrp	x8, _BSS_CHANGED_ERP_PREAMBLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BSS_CHANGED_ERP_PREAMBLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x22, _TXRX_CSR10@GOTPAGE
Lloh4:
	ldr	x22, [x22, _TXRX_CSR10@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rt2500usb_register_read
	str	w0, [sp, #12]
Lloh5:
	adrp	x8, _TXRX_CSR10_AUTORESPOND_PREAMBLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TXRX_CSR10_AUTORESPOND_PREAMBLE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w8, [x20, #20]
	cmp	w8, #0
	cset	w2, ne
	add	x0, sp, #12
	bl	_rt2x00_set_field16
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2500usb_register_write
LBB0_2:
Lloh8:
	adrp	x8, _BSS_CHANGED_BASIC_RATES@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BSS_CHANGED_BASIC_RATES@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_4
; %bb.3:
Lloh11:
	adrp	x8, _TXRX_CSR11@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TXRX_CSR11@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w2, [x20, #16]
	mov	x0, x19
	bl	_rt2500usb_register_write
LBB0_4:
Lloh14:
	adrp	x8, _BSS_CHANGED_BEACON_INT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BSS_CHANGED_BEACON_INT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_6
; %bb.5:
Lloh17:
	adrp	x22, _TXRX_CSR18@GOTPAGE
Lloh18:
	ldr	x22, [x22, _TXRX_CSR18@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rt2500usb_register_read
	str	w0, [sp, #12]
Lloh19:
	adrp	x8, _TXRX_CSR18_INTERVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _TXRX_CSR18_INTERVAL@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	w8, [x20]
	lsl	w2, w8, #2
	add	x0, sp, #12
	bl	_rt2x00_set_field16
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2500usb_register_write
LBB0_6:
Lloh22:
	adrp	x8, _BSS_CHANGED_ERP_SLOT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _BSS_CHANGED_ERP_SLOT@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_8
; %bb.7:
Lloh25:
	adrp	x8, _MAC_CSR10@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MAC_CSR10@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	ldr	w2, [x20, #12]
	mov	x0, x19
	bl	_rt2500usb_register_write
Lloh28:
	adrp	x8, _MAC_CSR11@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MAC_CSR11@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	ldr	w2, [x20, #8]
	mov	x0, x19
	bl	_rt2500usb_register_write
Lloh31:
	adrp	x8, _MAC_CSR12@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MAC_CSR12@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	ldr	w2, [x20, #4]
	mov	x0, x19
	bl	_rt2500usb_register_write
LBB0_8:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_BSS_CHANGED_ERP_PREAMBLE,4,2   ; @BSS_CHANGED_ERP_PREAMBLE
	.comm	_TXRX_CSR10,4,2                 ; @TXRX_CSR10
	.comm	_TXRX_CSR10_AUTORESPOND_PREAMBLE,4,2 ; @TXRX_CSR10_AUTORESPOND_PREAMBLE
	.comm	_BSS_CHANGED_BASIC_RATES,4,2    ; @BSS_CHANGED_BASIC_RATES
	.comm	_TXRX_CSR11,4,2                 ; @TXRX_CSR11
	.comm	_BSS_CHANGED_BEACON_INT,4,2     ; @BSS_CHANGED_BEACON_INT
	.comm	_TXRX_CSR18,4,2                 ; @TXRX_CSR18
	.comm	_TXRX_CSR18_INTERVAL,4,2        ; @TXRX_CSR18_INTERVAL
	.comm	_BSS_CHANGED_ERP_SLOT,4,2       ; @BSS_CHANGED_ERP_SLOT
	.comm	_MAC_CSR10,4,2                  ; @MAC_CSR10
	.comm	_MAC_CSR11,4,2                  ; @MAC_CSR11
	.comm	_MAC_CSR12,4,2                  ; @MAC_CSR12
	.no_dead_strip	_rt2500usb_config_erp
.subsections_via_symbols
