	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x02_tx_get_max_txpwr_adj   ## -- Begin function mt76x02_tx_get_max_txpwr_adj
	.p2align	4, 0x90
_mt76x02_tx_get_max_txpwr_adj:          ## @mt76x02_tx_get_max_txpwr_adj
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rsi), %eax
	movq	_IEEE80211_TX_RC_VHT_MCS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	callq	_ieee80211_rate_get_vht_mcs
	movl	%eax, %r15d
	andl	$-2, %eax
	cmpl	$8, %eax
	jne	LBB0_3
## %bb.2:
	movq	24(%r14), %rax
	addq	$32, %rax
	jmp	LBB0_13
LBB0_4:
	movq	_IEEE80211_TX_RC_MCS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.5:
	movl	4(%rbx), %eax
	jmp	LBB0_6
LBB0_3:
	movq	%rbx, %rdi
	callq	_ieee80211_rate_get_vht_nss
                                        ## kill: def $eax killed $eax def $rax
	leal	(%r15,%rax,8), %eax
	addl	$8, %eax
LBB0_6:
	andl	$15, %eax
	shlq	$2, %rax
	addq	16(%r14), %rax
LBB0_13:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	40(%r14), %rax
	movl	(%rax), %eax
	movq	_NL80211_BAND_2GHZ@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.8:
	movq	32(%r14), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	(%rax), %rax
	movslq	4(%rbx), %rcx
	movq	_IEEE80211_RATE_SHORT_PREAMBLE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rax,%rcx,8)
	je	LBB0_10
## %bb.9:
	movl	4(%rax,%rcx,8), %eax
	andl	$3, %eax
	shlq	$2, %rax
	addq	8(%r14), %rax
	jmp	LBB0_13
LBB0_11:
	movl	4(%rbx), %eax
	jmp	LBB0_12
LBB0_10:
	movl	4(%rax,%rcx,8), %eax
LBB0_12:
	andl	$7, %eax
	shlq	$2, %rax
	addq	(%r14), %rax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_TX_RC_VHT_MCS,4,2    ## @IEEE80211_TX_RC_VHT_MCS
	.comm	_IEEE80211_TX_RC_MCS,4,2        ## @IEEE80211_TX_RC_MCS
	.comm	_NL80211_BAND_2GHZ,4,2          ## @NL80211_BAND_2GHZ
	.comm	_IEEE80211_RATE_SHORT_PREAMBLE,4,2 ## @IEEE80211_RATE_SHORT_PREAMBLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x02_tx_get_max_txpwr_adj   ; -- Begin function mt76x02_tx_get_max_txpwr_adj
	.p2align	2
_mt76x02_tx_get_max_txpwr_adj:          ; @mt76x02_tx_get_max_txpwr_adj
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x1
	mov	x19, x0
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _IEEE80211_TX_RC_VHT_MCS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IEEE80211_TX_RC_VHT_MCS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_ieee80211_rate_get_vht_mcs
	and	w8, w0, #0xfffffffe
	cmp	w8, #8
	b.ne	LBB0_5
; %bb.2:
	ldr	x8, [x19, #24]
	add	x8, x8, #32
	b	LBB0_11
LBB0_3:
Lloh3:
	adrp	x9, _IEEE80211_TX_RC_MCS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IEEE80211_TX_RC_MCS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
	ldr	x8, [x19, #16]
	ldr	w9, [x20, #4]
	and	x9, x9, #0xf
	b	LBB0_10
LBB0_5:
	mov	x21, x0
	mov	x0, x20
	bl	_ieee80211_rate_get_vht_nss
	add	w8, w21, w0, lsl #3
	add	w8, w8, #8
	ldr	x9, [x19, #16]
	and	w8, w8, #0xf
	add	x8, x9, w8, uxtw #2
	b	LBB0_11
LBB0_6:
	ldr	x8, [x19, #40]
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _NL80211_BAND_2GHZ@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NL80211_BAND_2GHZ@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.7:
	ldr	x9, [x19, #32]
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldr	x8, [x9, x8, lsl #3]
	ldr	x8, [x8]
	ldrsw	x9, [x20, #4]
	lsl	x10, x9, #3
	ldr	w10, [x8, x10]
Lloh9:
	adrp	x11, _IEEE80211_RATE_SHORT_PREAMBLE@GOTPAGE
Lloh10:
	ldr	x11, [x11, _IEEE80211_RATE_SHORT_PREAMBLE@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_12
; %bb.8:
	ldr	x10, [x19, #8]
	add	x8, x8, x9, lsl #3
	ldr	w8, [x8, #4]
	and	x8, x8, #0x3
	add	x8, x10, x8, lsl #2
	b	LBB0_11
LBB0_9:
	ldr	x8, [x19]
	ldr	w9, [x20, #4]
	and	x9, x9, #0x7
LBB0_10:
	add	x8, x8, x9, lsl #2
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_12:
	ldr	x10, [x19]
	add	x8, x8, x9, lsl #3
	ldr	w8, [x8, #4]
	and	x8, x8, #0x7
	add	x8, x10, x8, lsl #2
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_TX_RC_VHT_MCS,4,2    ; @IEEE80211_TX_RC_VHT_MCS
	.comm	_IEEE80211_TX_RC_MCS,4,2        ; @IEEE80211_TX_RC_MCS
	.comm	_NL80211_BAND_2GHZ,4,2          ; @NL80211_BAND_2GHZ
	.comm	_IEEE80211_RATE_SHORT_PREAMBLE,4,2 ; @IEEE80211_RATE_SHORT_PREAMBLE
.subsections_via_symbols
