	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl18xx_get_last_tx_rate
_wl18xx_get_last_tx_rate:               ## @wl18xx_get_last_tx_rate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rcx, %rbx
	movq	%rsi, %rax
	movq	(%rdi), %rcx
	movq	(%rcx,%r8,8), %rsi
	movq	_CONF_HW_RATE_INDEX_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rsi
	jbe	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_wl1271_error
	movq	$0, (%rbx)
	jmp	LBB0_17
LBB0_2:
	movq	_CONF_HW_RATE_INDEX_54MBPS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rsi
	jbe	LBB0_15
## %bb.3:
	movq	_IEEE80211_TX_RC_MCS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	%r8d, 8(%rbx)
	movq	_CONF_HW_RATE_INDEX_MCS0@GOTPCREL(%rip), %rcx
	movq	%rsi, %rdi
	subq	(%rcx), %rdi
	movq	%rdi, (%rbx)
	movq	_CONF_HW_RATE_INDEX_MCS7_SGI@GOTPCREL(%rip), %r9
	cmpq	(%r9), %rsi
	jb	LBB0_5
## %bb.4:
	decq	%rdi
	movq	%rdi, (%rbx)
LBB0_5:
	movq	_CONF_HW_RATE_INDEX_MCS15_SGI@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rcx
	cmpq	%rcx, %rsi
	jne	LBB0_7
## %bb.6:
	decq	%rdi
	movq	%rdi, (%rbx)
	movq	(%rdx), %rcx
LBB0_7:
	movq	(%r9), %rdx
	cmpq	%rdx, %rsi
	je	LBB0_9
## %bb.8:
	cmpq	%rcx, %rsi
	jne	LBB0_10
LBB0_9:
	movq	_IEEE80211_TX_RC_SHORT_GI@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r8d
	movl	%r8d, 8(%rbx)
LBB0_10:
	testq	%rax, %rax
	je	LBB0_18
## %bb.11:
	cmpq	%rdx, %rsi
	jbe	LBB0_18
## %bb.12:
	movq	%rax, %rdi
	callq	_wl12xx_vif_to_data
	movq	(%rax), %rax
	movq	_NL80211_CHAN_HT40MINUS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.13:
	movq	_NL80211_CHAN_HT40PLUS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
LBB0_14:
	addq	$-8, (%rbx)
	movq	_IEEE80211_TX_RC_40_MHZ_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%rbx)
	jmp	LBB0_18
LBB0_15:
	movq	%rsi, (%rbx)
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	jne	LBB0_17
## %bb.16:
	movq	_CONF_HW_RATE_INDEX_6MBPS@GOTPCREL(%rip), %rax
	subq	(%rax), %rsi
	movq	%rsi, (%rbx)
LBB0_17:
	movl	$0, 8(%rbx)
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONF_HW_RATE_INDEX_MAX,8,3     ## @CONF_HW_RATE_INDEX_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"last Tx rate invalid: %d"

	.comm	_CONF_HW_RATE_INDEX_54MBPS,8,3  ## @CONF_HW_RATE_INDEX_54MBPS
	.comm	_NL80211_BAND_5GHZ,8,3          ## @NL80211_BAND_5GHZ
	.comm	_CONF_HW_RATE_INDEX_6MBPS,8,3   ## @CONF_HW_RATE_INDEX_6MBPS
	.comm	_IEEE80211_TX_RC_MCS,4,2        ## @IEEE80211_TX_RC_MCS
	.comm	_CONF_HW_RATE_INDEX_MCS0,8,3    ## @CONF_HW_RATE_INDEX_MCS0
	.comm	_CONF_HW_RATE_INDEX_MCS7_SGI,8,3 ## @CONF_HW_RATE_INDEX_MCS7_SGI
	.comm	_CONF_HW_RATE_INDEX_MCS15_SGI,8,3 ## @CONF_HW_RATE_INDEX_MCS15_SGI
	.comm	_IEEE80211_TX_RC_SHORT_GI,4,2   ## @IEEE80211_TX_RC_SHORT_GI
	.comm	_NL80211_CHAN_HT40MINUS,8,3     ## @NL80211_CHAN_HT40MINUS
	.comm	_NL80211_CHAN_HT40PLUS,8,3      ## @NL80211_CHAN_HT40PLUS
	.comm	_IEEE80211_TX_RC_40_MHZ_WIDTH,4,2 ## @IEEE80211_TX_RC_40_MHZ_WIDTH
	.no_dead_strip	_wl18xx_get_last_tx_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl18xx_get_last_tx_rate
_wl18xx_get_last_tx_rate:               ; @wl18xx_get_last_tx_rate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x3
	mov	x8, x1
	ldr	x9, [x0]
	ldr	x1, [x9, x4, lsl #3]
Lloh0:
	adrp	x9, _CONF_HW_RATE_INDEX_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CONF_HW_RATE_INDEX_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x1, x9
	b.ls	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_wl1271_error
	str	xzr, [x19]
	b	LBB0_16
LBB0_2:
Lloh5:
	adrp	x9, _CONF_HW_RATE_INDEX_54MBPS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CONF_HW_RATE_INDEX_54MBPS@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x1, x9
	b.ls	LBB0_14
; %bb.3:
Lloh8:
	adrp	x9, _IEEE80211_TX_RC_MCS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IEEE80211_TX_RC_MCS@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	str	w9, [x19, #8]
Lloh11:
	adrp	x10, _CONF_HW_RATE_INDEX_MCS0@GOTPAGE
Lloh12:
	ldr	x10, [x10, _CONF_HW_RATE_INDEX_MCS0@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	sub	x11, x1, x10
	str	x11, [x19]
Lloh14:
	adrp	x10, _CONF_HW_RATE_INDEX_MCS7_SGI@GOTPAGE
Lloh15:
	ldr	x10, [x10, _CONF_HW_RATE_INDEX_MCS7_SGI@GOTPAGEOFF]
	ldr	x12, [x10]
	cmp	x1, x12
	b.lo	LBB0_5
; %bb.4:
	sub	x11, x11, #1
	str	x11, [x19]
LBB0_5:
Lloh16:
	adrp	x13, _CONF_HW_RATE_INDEX_MCS15_SGI@GOTPAGE
Lloh17:
	ldr	x13, [x13, _CONF_HW_RATE_INDEX_MCS15_SGI@GOTPAGEOFF]
	ldr	x12, [x13]
	cmp	x1, x12
	b.ne	LBB0_7
; %bb.6:
	sub	x11, x11, #1
	str	x11, [x19]
	ldr	x12, [x13]
LBB0_7:
	ldr	x10, [x10]
	cmp	x1, x10
	ccmp	x1, x12, #4, ne
	b.ne	LBB0_9
; %bb.8:
Lloh18:
	adrp	x11, _IEEE80211_TX_RC_SHORT_GI@GOTPAGE
Lloh19:
	ldr	x11, [x11, _IEEE80211_TX_RC_SHORT_GI@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	orr	w9, w11, w9
	str	w9, [x19, #8]
LBB0_9:
	cbz	x8, LBB0_17
; %bb.10:
	cmp	x1, x10
	b.ls	LBB0_17
; %bb.11:
	mov	x0, x8
	bl	_wl12xx_vif_to_data
	ldr	x8, [x0]
Lloh21:
	adrp	x9, _NL80211_CHAN_HT40MINUS@GOTPAGE
Lloh22:
	ldr	x9, [x9, _NL80211_CHAN_HT40MINUS@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_13
; %bb.12:
Lloh24:
	adrp	x9, _NL80211_CHAN_HT40PLUS@GOTPAGE
Lloh25:
	ldr	x9, [x9, _NL80211_CHAN_HT40PLUS@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
LBB0_13:
	ldr	x8, [x19]
	sub	x8, x8, #8
	str	x8, [x19]
Lloh27:
	adrp	x8, _IEEE80211_TX_RC_40_MHZ_WIDTH@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IEEE80211_TX_RC_40_MHZ_WIDTH@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	b	LBB0_17
LBB0_14:
	str	x1, [x19]
Lloh30:
	adrp	x8, _NL80211_BAND_5GHZ@GOTPAGE
Lloh31:
	ldr	x8, [x8, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	cmp	x8, x2
	b.ne	LBB0_16
; %bb.15:
Lloh33:
	adrp	x8, _CONF_HW_RATE_INDEX_6MBPS@GOTPAGE
Lloh34:
	ldr	x8, [x8, _CONF_HW_RATE_INDEX_6MBPS@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	sub	x8, x1, x8
	str	x8, [x19]
LBB0_16:
	str	wzr, [x19, #8]
LBB0_17:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_CONF_HW_RATE_INDEX_MAX,8,3     ; @CONF_HW_RATE_INDEX_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"last Tx rate invalid: %d"

	.comm	_CONF_HW_RATE_INDEX_54MBPS,8,3  ; @CONF_HW_RATE_INDEX_54MBPS
	.comm	_NL80211_BAND_5GHZ,8,3          ; @NL80211_BAND_5GHZ
	.comm	_CONF_HW_RATE_INDEX_6MBPS,8,3   ; @CONF_HW_RATE_INDEX_6MBPS
	.comm	_IEEE80211_TX_RC_MCS,4,2        ; @IEEE80211_TX_RC_MCS
	.comm	_CONF_HW_RATE_INDEX_MCS0,8,3    ; @CONF_HW_RATE_INDEX_MCS0
	.comm	_CONF_HW_RATE_INDEX_MCS7_SGI,8,3 ; @CONF_HW_RATE_INDEX_MCS7_SGI
	.comm	_CONF_HW_RATE_INDEX_MCS15_SGI,8,3 ; @CONF_HW_RATE_INDEX_MCS15_SGI
	.comm	_IEEE80211_TX_RC_SHORT_GI,4,2   ; @IEEE80211_TX_RC_SHORT_GI
	.comm	_NL80211_CHAN_HT40MINUS,8,3     ; @NL80211_CHAN_HT40MINUS
	.comm	_NL80211_CHAN_HT40PLUS,8,3      ; @NL80211_CHAN_HT40PLUS
	.comm	_IEEE80211_TX_RC_40_MHZ_WIDTH,4,2 ; @IEEE80211_TX_RC_40_MHZ_WIDTH
	.no_dead_strip	_wl18xx_get_last_tx_rate
.subsections_via_symbols
