	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl1271_init_ap_rates           ## -- Begin function wl1271_init_ap_rates
	.p2align	4, 0x90
_wl1271_init_ap_rates:                  ## @wl1271_init_ap_rates
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	_DEBUG_AP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rsi), %edx
	leaq	L_.str(%rip), %rsi
	callq	_wl1271_debug
	movl	(%r14), %eax
	testl	%eax, %eax
	je	LBB0_11
## %bb.1:
	movl	%eax, -64(%rbp)
	movabsq	$42949672970, %r15              ## imm = 0xA0000000A
	movq	%r15, -60(%rbp)
	movq	$0, -48(%rbp)
	movl	20(%r14), %edx
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_wl1271_acx_ap_rate_policy
	testl	%eax, %eax
	js	LBB0_13
## %bb.2:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_wl1271_tx_min_rate_get
	movl	%eax, -64(%rbp)
	movq	%r15, -60(%rbp)
	movq	$0, -48(%rbp)
	movl	16(%r14), %edx
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_wl1271_acx_ap_rate_policy
	testl	%eax, %eax
	js	LBB0_13
## %bb.3:
	cmpq	$0, 8(%rbx)
	je	LBB0_5
## %bb.4:
	movq	_CONF_TX_OFDM_RATES@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	testl	%r13d, (%r14)
	jne	LBB0_6
LBB0_5:
	movq	_CONF_TX_ENABLED_RATES@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_6:
	movq	_CONF_TX_MCS_RATES@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_wlcore_hw_ap_get_mimo_wide_rate_mask
	cmpl	$0, (%rbx)
	jle	LBB0_12
## %bb.7:
	orl	%eax, %r13d
	xorl	%r12d, %r12d
	leaq	-64(%rbp), %r15
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, -64(%rbp)
	movabsq	$42949672970, %rax              ## imm = 0xA0000000A
	movq	%rax, -60(%rbp)
	movq	$0, -48(%rbp)
	movq	8(%r14), %rax
	movl	(%rax,%r12,4), %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_wl1271_acx_ap_rate_policy
	testl	%eax, %eax
	js	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%r12
	movslq	(%rbx), %rax
	cmpq	%rax, %r12
	jl	LBB0_8
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_AP,4,2                   ## @DEBUG_AP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AP basic rate set: 0x%x"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CONF_TX_OFDM_RATES,4,2         ## @CONF_TX_OFDM_RATES
	.comm	_CONF_TX_ENABLED_RATES,4,2      ## @CONF_TX_ENABLED_RATES
	.comm	_CONF_TX_MCS_RATES,4,2          ## @CONF_TX_MCS_RATES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl1271_init_ap_rates           ; -- Begin function wl1271_init_ap_rates
	.p2align	2
_wl1271_init_ap_rates:                  ; @wl1271_init_ap_rates
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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 b8, -72
	.cfi_offset b9, -80
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _DEBUG_AP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEBUG_AP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w2, [x1]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wl1271_debug
	ldr	w8, [x19]
	cbz	w8, LBB0_11
; %bb.1:
	str	w8, [sp, #8]
	movi.2s	v8, #10
	stur	d8, [sp, #12]
	str	xzr, [sp, #24]
	ldr	w2, [x19, #20]
	add	x1, sp, #8
	mov	x0, x20
	bl	_wl1271_acx_ap_rate_policy
	tbnz	w0, #31, LBB0_12
; %bb.2:
	ldr	w1, [x19]
	mov	x0, x20
	bl	_wl1271_tx_min_rate_get
	str	w0, [sp, #8]
	stur	d8, [sp, #12]
	str	xzr, [sp, #24]
	ldr	w2, [x19, #16]
	add	x1, sp, #8
	mov	x0, x20
	bl	_wl1271_acx_ap_rate_policy
	tbnz	w0, #31, LBB0_12
; %bb.3:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	w8, [x19]
Lloh5:
	adrp	x9, _CONF_TX_OFDM_RATES@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CONF_TX_OFDM_RATES@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x9]
	tst	w22, w8
	b.ne	LBB0_6
LBB0_5:
Lloh8:
	adrp	x8, _CONF_TX_ENABLED_RATES@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CONF_TX_ENABLED_RATES@GOTPAGEOFF]
Lloh10:
	ldr	w22, [x8]
LBB0_6:
Lloh11:
	adrp	x8, _CONF_TX_MCS_RATES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CONF_TX_MCS_RATES@GOTPAGEOFF]
Lloh13:
	ldr	w23, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_wlcore_hw_ap_get_mimo_wide_rate_mask
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x21, #0
	orr	w8, w23, w22
	orr	w22, w8, w0
	movi.2s	v8, #10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	str	w22, [sp, #8]
	stur	d8, [sp, #12]
	str	xzr, [sp, #24]
	ldr	x8, [x19, #8]
	ldr	w2, [x8, x21, lsl #2]
	add	x1, sp, #8
	mov	x0, x20
	bl	_wl1271_acx_ap_rate_policy
	tbnz	w0, #31, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.lt	LBB0_8
LBB0_10:
	mov	w0, #0
	b	LBB0_12
LBB0_11:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_AP,4,2                   ; @DEBUG_AP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AP basic rate set: 0x%x"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CONF_TX_OFDM_RATES,4,2         ; @CONF_TX_OFDM_RATES
	.comm	_CONF_TX_ENABLED_RATES,4,2      ; @CONF_TX_ENABLED_RATES
	.comm	_CONF_TX_MCS_RATES,4,2          ; @CONF_TX_MCS_RATES
.subsections_via_symbols
