	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2800_config_ht_opmode
_rt2800_config_ht_opmode:               ## @rt2800_config_ht_opmode
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rsi), %eax
	movq	_IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_IEEE80211_HT_OP_MODE_PROTECTION@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%eax, %edx
	leal	-128(%rdx), %edi
	cmpl	$2, %edi
	jae	LBB0_1
## %bb.5:
	cmpl	$0, 4(%rsi)
	movl	$16388, %r15d                   ## imm = 0x4004
	movl	$3, %edx
	cmovnel	%edx, %r15d
	movl	$16516, %esi                    ## imm = 0x4084
	cmovnel	%edx, %esi
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movl	$1, %r12d
	movl	$1, %edx
	jmp	LBB0_6
LBB0_1:
	xorl	%r12d, %r12d
	cmpl	$131, %edx
	jne	LBB0_2
## %bb.3:
	movl	$1, %edx
	jmp	LBB0_4
LBB0_2:
	xorl	%edx, %edx
LBB0_4:
	movl	$16516, -48(%rbp)               ## 4-byte Folded Spill
                                        ## imm = 0x4084
	movl	$16388, %r15d                   ## imm = 0x4004
LBB0_6:
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	testl	%eax, %ecx
	movl	$1, %eax
	movl	$1, %r14d
	cmovel	%r12d, %r14d
	cmovel	%edx, %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_MM20_PROT_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2800_register_read
	movl	%eax, -44(%rbp)
	movq	_MM20_PROT_CFG_PROTECT_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %r13
	movq	%r13, %rdi
	movl	%r15d, %edx
	callq	_rt2x00_set_field32
	movq	_MM20_PROT_CFG_PROTECT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_rt2x00_set_field32
	movq	_MM20_PROT_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2800_register_write
	movq	_MM40_PROT_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2800_register_read
	movl	%eax, -44(%rbp)
	movq	_MM40_PROT_CFG_PROTECT_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edx
	callq	_rt2x00_set_field32
	movq	_MM40_PROT_CFG_PROTECT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_rt2x00_set_field32
	movq	_MM40_PROT_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2800_register_write
	movq	_GF20_PROT_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2800_register_read
	movl	%eax, -44(%rbp)
	movq	_GF20_PROT_CFG_PROTECT_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r15d, %edx
	callq	_rt2x00_set_field32
	movq	_GF20_PROT_CFG_PROTECT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_rt2x00_set_field32
	movq	_GF20_PROT_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2800_register_write
	movq	_GF40_PROT_CFG@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_rt2800_register_read
	movl	%eax, -44(%rbp)
	movq	_GF40_PROT_CFG_PROTECT_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_rt2x00_set_field32
	movq	_GF40_PROT_CFG_PROTECT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	callq	_rt2x00_set_field32
	movl	(%r14), %esi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2800_register_write
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT,4,2 ## @IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT
	.comm	_IEEE80211_HT_OP_MODE_PROTECTION,4,2 ## @IEEE80211_HT_OP_MODE_PROTECTION
	.comm	_MM20_PROT_CFG,4,2              ## @MM20_PROT_CFG
	.comm	_MM20_PROT_CFG_PROTECT_RATE,4,2 ## @MM20_PROT_CFG_PROTECT_RATE
	.comm	_MM20_PROT_CFG_PROTECT_CTRL,4,2 ## @MM20_PROT_CFG_PROTECT_CTRL
	.comm	_MM40_PROT_CFG,4,2              ## @MM40_PROT_CFG
	.comm	_MM40_PROT_CFG_PROTECT_RATE,4,2 ## @MM40_PROT_CFG_PROTECT_RATE
	.comm	_MM40_PROT_CFG_PROTECT_CTRL,4,2 ## @MM40_PROT_CFG_PROTECT_CTRL
	.comm	_GF20_PROT_CFG,4,2              ## @GF20_PROT_CFG
	.comm	_GF20_PROT_CFG_PROTECT_RATE,4,2 ## @GF20_PROT_CFG_PROTECT_RATE
	.comm	_GF20_PROT_CFG_PROTECT_CTRL,4,2 ## @GF20_PROT_CFG_PROTECT_CTRL
	.comm	_GF40_PROT_CFG,4,2              ## @GF40_PROT_CFG
	.comm	_GF40_PROT_CFG_PROTECT_RATE,4,2 ## @GF40_PROT_CFG_PROTECT_RATE
	.comm	_GF40_PROT_CFG_PROTECT_CTRL,4,2 ## @GF40_PROT_CFG_PROTECT_CTRL
	.no_dead_strip	_rt2800_config_ht_opmode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2800_config_ht_opmode
_rt2800_config_ht_opmode:               ; @rt2800_config_ht_opmode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _IEEE80211_HT_OP_MODE_PROTECTION@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IEEE80211_HT_OP_MODE_PROTECTION@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	and	w12, w10, w8
	mov	w10, #16516
	mov	w11, #16388
	sub	w13, w12, #128
	cmp	w13, #2
	b.hs	LBB0_2
; %bb.1:
	ldr	w12, [x1, #4]
	mov	w13, #3
	cmp	w12, #0
	csel	w22, w11, w13, eq
	csel	w20, w10, w13, eq
	mov	w25, #1
	mov	w24, #1
	b	LBB0_3
LBB0_2:
	mov	w13, #16516
	mov	w14, #16388
	mov	w15, #1
	cmp	w12, #131
	csel	w25, wzr, wzr, ne
	csel	w24, wzr, w15, ne
	csel	w22, w11, w14, ne
	csel	w20, w10, w13, ne
LBB0_3:
	tst	w9, w8
	csinc	w23, w25, wzr, eq
	csinc	w21, w24, wzr, eq
Lloh6:
	adrp	x26, _MM20_PROT_CFG@GOTPAGE
Lloh7:
	ldr	x26, [x26, _MM20_PROT_CFG@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x19
	bl	_rt2800_register_read
	str	w0, [sp, #12]
Lloh8:
	adrp	x8, _MM20_PROT_CFG_PROTECT_RATE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MM20_PROT_CFG_PROTECT_RATE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x22
	bl	_rt2x00_set_field32
Lloh11:
	adrp	x8, _MM20_PROT_CFG_PROTECT_CTRL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MM20_PROT_CFG_PROTECT_CTRL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x25
	bl	_rt2x00_set_field32
	ldr	w1, [x26]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2800_register_write
Lloh14:
	adrp	x25, _MM40_PROT_CFG@GOTPAGE
Lloh15:
	ldr	x25, [x25, _MM40_PROT_CFG@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_rt2800_register_read
	str	w0, [sp, #12]
Lloh16:
	adrp	x8, _MM40_PROT_CFG_PROTECT_RATE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MM40_PROT_CFG_PROTECT_RATE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x20
	bl	_rt2x00_set_field32
Lloh19:
	adrp	x8, _MM40_PROT_CFG_PROTECT_CTRL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MM40_PROT_CFG_PROTECT_CTRL@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x24
	bl	_rt2x00_set_field32
	ldr	w1, [x25]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2800_register_write
Lloh22:
	adrp	x24, _GF20_PROT_CFG@GOTPAGE
Lloh23:
	ldr	x24, [x24, _GF20_PROT_CFG@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_rt2800_register_read
	str	w0, [sp, #12]
Lloh24:
	adrp	x8, _GF20_PROT_CFG_PROTECT_RATE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _GF20_PROT_CFG_PROTECT_RATE@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x22
	bl	_rt2x00_set_field32
Lloh27:
	adrp	x8, _GF20_PROT_CFG_PROTECT_CTRL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _GF20_PROT_CFG_PROTECT_CTRL@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x23
	bl	_rt2x00_set_field32
	ldr	w1, [x24]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2800_register_write
Lloh30:
	adrp	x22, _GF40_PROT_CFG@GOTPAGE
Lloh31:
	ldr	x22, [x22, _GF40_PROT_CFG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rt2800_register_read
	str	w0, [sp, #12]
Lloh32:
	adrp	x8, _GF40_PROT_CFG_PROTECT_RATE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _GF40_PROT_CFG_PROTECT_RATE@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x20
	bl	_rt2x00_set_field32
Lloh35:
	adrp	x8, _GF40_PROT_CFG_PROTECT_CTRL@GOTPAGE
Lloh36:
	ldr	x8, [x8, _GF40_PROT_CFG_PROTECT_CTRL@GOTPAGEOFF]
Lloh37:
	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	_rt2800_register_write
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT,4,2 ; @IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT
	.comm	_IEEE80211_HT_OP_MODE_PROTECTION,4,2 ; @IEEE80211_HT_OP_MODE_PROTECTION
	.comm	_MM20_PROT_CFG,4,2              ; @MM20_PROT_CFG
	.comm	_MM20_PROT_CFG_PROTECT_RATE,4,2 ; @MM20_PROT_CFG_PROTECT_RATE
	.comm	_MM20_PROT_CFG_PROTECT_CTRL,4,2 ; @MM20_PROT_CFG_PROTECT_CTRL
	.comm	_MM40_PROT_CFG,4,2              ; @MM40_PROT_CFG
	.comm	_MM40_PROT_CFG_PROTECT_RATE,4,2 ; @MM40_PROT_CFG_PROTECT_RATE
	.comm	_MM40_PROT_CFG_PROTECT_CTRL,4,2 ; @MM40_PROT_CFG_PROTECT_CTRL
	.comm	_GF20_PROT_CFG,4,2              ; @GF20_PROT_CFG
	.comm	_GF20_PROT_CFG_PROTECT_RATE,4,2 ; @GF20_PROT_CFG_PROTECT_RATE
	.comm	_GF20_PROT_CFG_PROTECT_CTRL,4,2 ; @GF20_PROT_CFG_PROTECT_CTRL
	.comm	_GF40_PROT_CFG,4,2              ; @GF40_PROT_CFG
	.comm	_GF40_PROT_CFG_PROTECT_RATE,4,2 ; @GF40_PROT_CFG_PROTECT_RATE
	.comm	_GF40_PROT_CFG_PROTECT_CTRL,4,2 ; @GF40_PROT_CFG_PROTECT_CTRL
	.no_dead_strip	_rt2800_config_ht_opmode
.subsections_via_symbols
