	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_set_bitrate_mask64
_ath6kl_set_bitrate_mask64:             ## @ath6kl_set_bitrate_mask64
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movl	%esi, %r15d
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ATH6KL_NUM_BANDS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	leal	(,%rbx,4), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %r13
	movl	(%r13), %r9d
	testl	%r9d, %r9d
	js	LBB0_5
## %bb.1:
	movq	(%r12), %rcx
	leaq	4(,%r9,4), %r8
	shlq	$2, %r9
	xorl	%esi, %esi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rcx,%rsi,4), %rdx
	movl	(%rdx), %eax
	movl	4(%rdx), %edx
	shll	$20, %edx
	movl	%eax, %ebx
	shll	$12, %ebx
	orl	%edx, %ebx
	shll	$28, %eax
	orl	%edi, %eax
	orl	%ebx, %eax
	movl	%eax, (%r14,%rsi)
	addq	$4, %rsi
	cmpq	%rsi, %r8
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rsi,4), %edi
	movl	%edi, (%r14,%rsi)
	cmpq	%rsi, %r9
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rcx,%rsi,4), %edi
	shll	$4, %edi
	movl	%edi, (%r14,%rsi)
	jmp	LBB0_4
LBB0_5:
	movq	_ATH6KL_DBG_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %edx
	movl	4(%r14), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_ath6kl_dbg
	movq	_WMI_RATES_MODE_MAX@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	shll	$3, %edi
	callq	_ath6kl_wmi_get_new_buf
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	cmpl	$0, (%rbx)
	jle	LBB0_14
## %bb.8:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r15
	xorl	%r12d, %r12d
	movq	_WMI_RATES_MODE_11A_HT40@GOTPCREL(%rip), %rbx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	_WMI_RATES_MODE_11A@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpq	%rax, %r12
	cmoveq	%r13, %rcx
	movslq	(%rcx), %rax
	movl	(%r14,%rax,4), %edi
	callq	_cpu_to_le64
	movq	(%r15), %rcx
	movl	%eax, (%rcx,%r12,4)
	incq	%r12
	movq	_WMI_RATES_MODE_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r12
	jge	LBB0_14
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %ecx
	movq	%r13, %rax
	cmpq	%rcx, %r12
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_NL80211_BAND_2GHZ@GOTPCREL(%rip), %rax
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	_WMI_RATES_MODE_11A_HT20@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r13, %rcx
	cmpq	%rdx, %r12
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %rcx
	jmp	LBB0_13
LBB0_14:
	movq	_WMI_SET_TX_SELECT_RATES_CMDID@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_NO_SYNC_WMIFLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_ath6kl_wmi_cmd_send
	jmp	LBB0_15
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_17
## %bb.16:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH6KL_NUM_BANDS,4,2           ## @ATH6KL_NUM_BANDS
	.comm	_NL80211_BAND_5GHZ,4,2          ## @NL80211_BAND_5GHZ
	.comm	_ATH6KL_DBG_WMI,4,2             ## @ATH6KL_DBG_WMI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Ratemask 64 bit: 2.4:%llx 5:%llx\n"

	.comm	_WMI_RATES_MODE_MAX,4,2         ## @WMI_RATES_MODE_MAX
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_WMI_RATES_MODE_11A,4,2         ## @WMI_RATES_MODE_11A
	.comm	_WMI_RATES_MODE_11A_HT20,4,2    ## @WMI_RATES_MODE_11A_HT20
	.comm	_WMI_RATES_MODE_11A_HT40,4,2    ## @WMI_RATES_MODE_11A_HT40
	.comm	_NL80211_BAND_2GHZ,4,2          ## @NL80211_BAND_2GHZ
	.comm	_WMI_SET_TX_SELECT_RATES_CMDID,4,2 ## @WMI_SET_TX_SELECT_RATES_CMDID
	.comm	_NO_SYNC_WMIFLAG,4,2            ## @NO_SYNC_WMIFLAG
	.no_dead_strip	_ath6kl_set_bitrate_mask64
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_set_bitrate_mask64
_ath6kl_set_bitrate_mask64:             ; @ath6kl_set_bitrate_mask64
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _ATH6KL_NUM_BANDS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATH6KL_NUM_BANDS@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x8]
	lsl	x8, x12, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	lsl	w2, w12, #2
	mov	x0, x21
	mov	w1, #0
	bl	_memset
Lloh8:
	adrp	x23, _NL80211_BAND_5GHZ@GOTPAGE
Lloh9:
	ldr	x23, [x23, _NL80211_BAND_5GHZ@GOTPAGEOFF]
	ldr	w8, [x23]
	tbnz	w8, #31, LBB0_5
; %bb.1:
	ldr	x9, [x22]
	add	w10, w8, #1
	mov	x11, x21
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x13, [x9, #8]
	ldp	w13, w14, [x13]
	lsl	w15, w13, #12
	orr	w14, w15, w14, lsl #20
	orr	w12, w14, w12
	orr	w12, w12, w13, lsl #28
	str	w12, [x11], #4
	sub	x8, x8, #1
	add	x9, x9, #16
	subs	x10, x10, #1
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x9]
	str	w12, [x11]
	cbnz	x8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w12, [x9]
	lsl	w12, w12, #4
	str	w12, [x11]
	b	LBB0_2
LBB0_5:
Lloh10:
	adrp	x8, _ATH6KL_DBG_WMI@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ATH6KL_DBG_WMI@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldp	w2, w3, [x21]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ath6kl_dbg
Lloh15:
	adrp	x24, _WMI_RATES_MODE_MAX@GOTPAGE
Lloh16:
	ldr	x24, [x24, _WMI_RATES_MODE_MAX@GOTPAGEOFF]
	ldr	w8, [x24]
	lsl	w0, w8, #3
	bl	_ath6kl_wmi_get_new_buf
	cbz	x0, LBB0_10
; %bb.6:
	mov	x22, x0
	stur	x20, [x29, #-104]               ; 8-byte Folded Spill
	stur	w19, [x29, #-92]                ; 4-byte Folded Spill
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x25, #0
	ldr	x26, [x22]
Lloh17:
	adrp	x27, _WMI_RATES_MODE_11A@GOTPAGE
Lloh18:
	ldr	x27, [x27, _WMI_RATES_MODE_11A@GOTPAGEOFF]
Lloh19:
	adrp	x28, _WMI_RATES_MODE_11A_HT20@GOTPAGE
Lloh20:
	ldr	x28, [x28, _WMI_RATES_MODE_11A_HT20@GOTPAGEOFF]
Lloh21:
	adrp	x19, _WMI_RATES_MODE_11A_HT40@GOTPAGE
Lloh22:
	ldr	x19, [x19, _WMI_RATES_MODE_11A_HT40@GOTPAGEOFF]
Lloh23:
	adrp	x20, _NL80211_BAND_2GHZ@GOTPAGE
Lloh24:
	ldr	x20, [x20, _NL80211_BAND_2GHZ@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x27]
	ldr	w9, [x28]
	ldr	w10, [x19]
	cmp	x25, x10
	ccmp	x25, x9, #4, ne
	ccmp	x25, x8, #4, ne
	csel	x8, x23, x20, eq
	ldrsw	x8, [x8]
	ldr	w0, [x21, x8, lsl #2]
	bl	_cpu_to_le64
	ldr	x8, [x26]
	str	w0, [x8, x25, lsl #2]
	add	x25, x25, #1
	ldrsw	x8, [x24]
	cmp	x25, x8
	b.lt	LBB0_8
LBB0_9:
Lloh25:
	adrp	x8, _WMI_SET_TX_SELECT_RATES_CMDID@GOTPAGE
Lloh26:
	ldr	x8, [x8, _WMI_SET_TX_SELECT_RATES_CMDID@GOTPAGEOFF]
Lloh27:
	ldr	w3, [x8]
Lloh28:
	adrp	x8, _NO_SYNC_WMIFLAG@GOTPAGE
Lloh29:
	ldr	x8, [x8, _NO_SYNC_WMIFLAG@GOTPAGEOFF]
Lloh30:
	ldr	w4, [x8]
	ldur	x0, [x29, #-104]                ; 8-byte Folded Reload
	ldur	w1, [x29, #-92]                 ; 4-byte Folded Reload
	mov	x2, x22
	bl	_ath6kl_wmi_cmd_send
	b	LBB0_11
LBB0_10:
Lloh31:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldur	x8, [x29, #-88]
Lloh34:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh35:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH6KL_NUM_BANDS,4,2           ; @ATH6KL_NUM_BANDS
	.comm	_NL80211_BAND_5GHZ,4,2          ; @NL80211_BAND_5GHZ
	.comm	_ATH6KL_DBG_WMI,4,2             ; @ATH6KL_DBG_WMI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Ratemask 64 bit: 2.4:%llx 5:%llx\n"

	.comm	_WMI_RATES_MODE_MAX,4,2         ; @WMI_RATES_MODE_MAX
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_WMI_RATES_MODE_11A,4,2         ; @WMI_RATES_MODE_11A
	.comm	_WMI_RATES_MODE_11A_HT20,4,2    ; @WMI_RATES_MODE_11A_HT20
	.comm	_WMI_RATES_MODE_11A_HT40,4,2    ; @WMI_RATES_MODE_11A_HT40
	.comm	_NL80211_BAND_2GHZ,4,2          ; @NL80211_BAND_2GHZ
	.comm	_WMI_SET_TX_SELECT_RATES_CMDID,4,2 ; @WMI_SET_TX_SELECT_RATES_CMDID
	.comm	_NO_SYNC_WMIFLAG,4,2            ; @NO_SYNC_WMIFLAG
	.no_dead_strip	_ath6kl_set_bitrate_mask64
.subsections_via_symbols
