	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2800_config_erp              ## -- Begin function rt2800_config_erp
	.p2align	4, 0x90
_rt2800_config_erp:                     ## @rt2800_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	%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
	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	_AUTO_RSP_CFG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_rt2800_register_read
	movl	%eax, -44(%rbp)
	movq	_AUTO_RSP_CFG_AR_PREAMBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpl	$0, 24(%r14)
	setne	%dl
	leaq	-44(%rbp), %rdi
	callq	_rt2x00_set_field32
	movl	(%r12), %esi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2800_register_write
LBB0_2:
	movq	_BSS_CHANGED_ERP_CTS_PROT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_OFDM_PROT_CFG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_rt2800_register_read
	movl	%eax, -44(%rbp)
	movq	_OFDM_PROT_CFG_PROTECT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpq	$0, 16(%r14)
	setne	%dl
	addl	%edx, %edx
	leaq	-44(%rbp), %rdi
	callq	_rt2x00_set_field32
	movl	(%r12), %esi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2800_register_write
LBB0_4:
	movq	_BSS_CHANGED_BASIC_RATES@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_LEGACY_BASIC_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4080, %edx                     ## imm = 0xFF0
	orl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_rt2800_register_write
	movq	_HT_BASIC_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$32771, %edx                    ## imm = 0x8003
	callq	_rt2800_register_write
LBB0_6:
	movq	_BSS_CHANGED_ERP_SLOT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_8
## %bb.7:
	movq	_BKOFF_SLOT_CFG@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_rt2800_register_read
	movl	%eax, -44(%rbp)
	movq	_BKOFF_SLOT_CFG_SLOT_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %edx
	leaq	-44(%rbp), %r12
	movq	%r12, %rdi
	callq	_rt2x00_set_field32
	movl	(%r13), %esi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2800_register_write
	movq	_XIFS_TIME_CFG@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_rt2800_register_read
	movl	%eax, -44(%rbp)
	movq	_XIFS_TIME_CFG_EIFS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	movq	%r12, %rdi
	callq	_rt2x00_set_field32
	movl	(%r13), %esi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2800_register_write
LBB0_8:
	movq	_BSS_CHANGED_BEACON_INT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_10
## %bb.9:
	movq	_BCN_TIME_CFG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_rt2800_register_read
	movl	%eax, -44(%rbp)
	movq	_BCN_TIME_CFG_BEACON_INTERVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r14), %edx
	shll	$4, %edx
	leaq	-44(%rbp), %rdi
	callq	_rt2x00_set_field32
	movl	(%r12), %esi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2800_register_write
LBB0_10:
	movq	_BSS_CHANGED_HT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_rt2800_config_ht_opmode
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BSS_CHANGED_ERP_PREAMBLE,4,2   ## @BSS_CHANGED_ERP_PREAMBLE
	.comm	_AUTO_RSP_CFG,4,2               ## @AUTO_RSP_CFG
	.comm	_AUTO_RSP_CFG_AR_PREAMBLE,4,2   ## @AUTO_RSP_CFG_AR_PREAMBLE
	.comm	_BSS_CHANGED_ERP_CTS_PROT,4,2   ## @BSS_CHANGED_ERP_CTS_PROT
	.comm	_OFDM_PROT_CFG,4,2              ## @OFDM_PROT_CFG
	.comm	_OFDM_PROT_CFG_PROTECT_CTRL,4,2 ## @OFDM_PROT_CFG_PROTECT_CTRL
	.comm	_BSS_CHANGED_BASIC_RATES,4,2    ## @BSS_CHANGED_BASIC_RATES
	.comm	_LEGACY_BASIC_RATE,4,2          ## @LEGACY_BASIC_RATE
	.comm	_HT_BASIC_RATE,4,2              ## @HT_BASIC_RATE
	.comm	_BSS_CHANGED_ERP_SLOT,4,2       ## @BSS_CHANGED_ERP_SLOT
	.comm	_BKOFF_SLOT_CFG,4,2             ## @BKOFF_SLOT_CFG
	.comm	_BKOFF_SLOT_CFG_SLOT_TIME,4,2   ## @BKOFF_SLOT_CFG_SLOT_TIME
	.comm	_XIFS_TIME_CFG,4,2              ## @XIFS_TIME_CFG
	.comm	_XIFS_TIME_CFG_EIFS,4,2         ## @XIFS_TIME_CFG_EIFS
	.comm	_BSS_CHANGED_BEACON_INT,4,2     ## @BSS_CHANGED_BEACON_INT
	.comm	_BCN_TIME_CFG,4,2               ## @BCN_TIME_CFG
	.comm	_BCN_TIME_CFG_BEACON_INTERVAL,4,2 ## @BCN_TIME_CFG_BEACON_INTERVAL
	.comm	_BSS_CHANGED_HT,4,2             ## @BSS_CHANGED_HT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2800_config_erp              ; -- Begin function rt2800_config_erp
	.p2align	2
_rt2800_config_erp:                     ; @rt2800_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	x19, x1
	mov	x20, 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, _AUTO_RSP_CFG@GOTPAGE
Lloh4:
	ldr	x22, [x22, _AUTO_RSP_CFG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_rt2800_register_read
	str	w0, [sp, #12]
Lloh5:
	adrp	x8, _AUTO_RSP_CFG_AR_PREAMBLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AUTO_RSP_CFG_AR_PREAMBLE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w8, [x19, #24]
	cmp	w8, #0
	cset	w2, ne
	add	x0, sp, #12
	bl	_rt2x00_set_field32
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_rt2800_register_write
LBB0_2:
Lloh8:
	adrp	x8, _BSS_CHANGED_ERP_CTS_PROT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BSS_CHANGED_ERP_CTS_PROT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_4
; %bb.3:
Lloh11:
	adrp	x22, _OFDM_PROT_CFG@GOTPAGE
Lloh12:
	ldr	x22, [x22, _OFDM_PROT_CFG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_rt2800_register_read
Lloh13:
	adrp	x8, _OFDM_PROT_CFG_PROTECT_CTRL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _OFDM_PROT_CFG_PROTECT_CTRL@GOTPAGEOFF]
	str	w0, [sp, #12]
Lloh15:
	ldr	w1, [x8]
	ldr	x8, [x19, #16]
	cmp	x8, #0
	cset	w8, ne
	lsl	w2, w8, #1
	add	x0, sp, #12
	bl	_rt2x00_set_field32
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_rt2800_register_write
LBB0_4:
Lloh16:
	adrp	x8, _BSS_CHANGED_BASIC_RATES@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BSS_CHANGED_BASIC_RATES@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_6
; %bb.5:
Lloh19:
	adrp	x8, _LEGACY_BASIC_RATE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LEGACY_BASIC_RATE@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	w8, [x19]
	orr	w2, w8, #0xff0
	mov	x0, x20
	bl	_rt2800_register_write
Lloh22:
	adrp	x8, _HT_BASIC_RATE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _HT_BASIC_RATE@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #32771
	bl	_rt2800_register_write
LBB0_6:
Lloh25:
	adrp	x8, _BSS_CHANGED_ERP_SLOT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BSS_CHANGED_ERP_SLOT@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_8
; %bb.7:
Lloh28:
	adrp	x22, _BKOFF_SLOT_CFG@GOTPAGE
Lloh29:
	ldr	x22, [x22, _BKOFF_SLOT_CFG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_rt2800_register_read
	str	w0, [sp, #12]
Lloh30:
	adrp	x8, _BKOFF_SLOT_CFG_SLOT_TIME@GOTPAGE
Lloh31:
	ldr	x8, [x8, _BKOFF_SLOT_CFG_SLOT_TIME@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
	add	x0, sp, #12
	bl	_rt2x00_set_field32
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_rt2800_register_write
Lloh33:
	adrp	x22, _XIFS_TIME_CFG@GOTPAGE
Lloh34:
	ldr	x22, [x22, _XIFS_TIME_CFG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_rt2800_register_read
	str	w0, [sp, #12]
Lloh35:
	adrp	x8, _XIFS_TIME_CFG_EIFS@GOTPAGE
Lloh36:
	ldr	x8, [x8, _XIFS_TIME_CFG_EIFS@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
	add	x0, sp, #12
	bl	_rt2x00_set_field32
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_rt2800_register_write
LBB0_8:
Lloh38:
	adrp	x8, _BSS_CHANGED_BEACON_INT@GOTPAGE
Lloh39:
	ldr	x8, [x8, _BSS_CHANGED_BEACON_INT@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_10
; %bb.9:
Lloh41:
	adrp	x22, _BCN_TIME_CFG@GOTPAGE
Lloh42:
	ldr	x22, [x22, _BCN_TIME_CFG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_rt2800_register_read
	str	w0, [sp, #12]
Lloh43:
	adrp	x8, _BCN_TIME_CFG_BEACON_INTERVAL@GOTPAGE
Lloh44:
	ldr	x8, [x8, _BCN_TIME_CFG_BEACON_INTERVAL@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	ldr	w8, [x19, #12]
	lsl	w2, w8, #4
	add	x0, sp, #12
	bl	_rt2x00_set_field32
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_rt2800_register_write
LBB0_10:
Lloh46:
	adrp	x8, _BSS_CHANGED_HT@GOTPAGE
Lloh47:
	ldr	x8, [x8, _BSS_CHANGED_HT@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_12
; %bb.11:
	mov	x0, x20
	mov	x1, x19
	bl	_rt2800_config_ht_opmode
LBB0_12:
	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	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_BSS_CHANGED_ERP_PREAMBLE,4,2   ; @BSS_CHANGED_ERP_PREAMBLE
	.comm	_AUTO_RSP_CFG,4,2               ; @AUTO_RSP_CFG
	.comm	_AUTO_RSP_CFG_AR_PREAMBLE,4,2   ; @AUTO_RSP_CFG_AR_PREAMBLE
	.comm	_BSS_CHANGED_ERP_CTS_PROT,4,2   ; @BSS_CHANGED_ERP_CTS_PROT
	.comm	_OFDM_PROT_CFG,4,2              ; @OFDM_PROT_CFG
	.comm	_OFDM_PROT_CFG_PROTECT_CTRL,4,2 ; @OFDM_PROT_CFG_PROTECT_CTRL
	.comm	_BSS_CHANGED_BASIC_RATES,4,2    ; @BSS_CHANGED_BASIC_RATES
	.comm	_LEGACY_BASIC_RATE,4,2          ; @LEGACY_BASIC_RATE
	.comm	_HT_BASIC_RATE,4,2              ; @HT_BASIC_RATE
	.comm	_BSS_CHANGED_ERP_SLOT,4,2       ; @BSS_CHANGED_ERP_SLOT
	.comm	_BKOFF_SLOT_CFG,4,2             ; @BKOFF_SLOT_CFG
	.comm	_BKOFF_SLOT_CFG_SLOT_TIME,4,2   ; @BKOFF_SLOT_CFG_SLOT_TIME
	.comm	_XIFS_TIME_CFG,4,2              ; @XIFS_TIME_CFG
	.comm	_XIFS_TIME_CFG_EIFS,4,2         ; @XIFS_TIME_CFG_EIFS
	.comm	_BSS_CHANGED_BEACON_INT,4,2     ; @BSS_CHANGED_BEACON_INT
	.comm	_BCN_TIME_CFG,4,2               ; @BCN_TIME_CFG
	.comm	_BCN_TIME_CFG_BEACON_INTERVAL,4,2 ; @BCN_TIME_CFG_BEACON_INTERVAL
	.comm	_BSS_CHANGED_HT,4,2             ; @BSS_CHANGED_HT
.subsections_via_symbols
