	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar5523_create_rateset
_ar5523_create_rateset:                 ## @ar5523_create_rateset
	.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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movl	8(%rdi), %edi
	movl	4(%rsi), %esi
	callq	_ieee80211_find_sta
	movl	(%rbx), %r14d
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	(%r12), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rbx
	shlq	$2, %rbx
	addq	(%rax), %rbx
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_ar5523_info
LBB0_3:
	movl	(%rbx), %ebx
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_ar5523_dbg
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movq	(%rax), %rax
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r13
	cmpl	$0, (%r13)
	jle	LBB0_8
## %bb.4:
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	sarl	%ebx
	sarl	%r14d
	incq	%r12
	movslq	(%r13), %rax
	cmpq	%rax, %r12
	jge	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	movq	_AR5523_MAX_NRATES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	setge	%dil
	callq	_BUG_ON
	movq	8(%r13), %rax
	movl	(%rax,%r12,4), %edx
	movl	%ebx, %ecx
	andl	$1, %ecx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_ar5523_dbg
	movl	%ebx, %eax
	andl	$1, %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r13), %rax
	movl	(%rax,%r12,4), %eax
	movl	%eax, %ecx
	orl	$128, %ecx
	testb	$1, %r14b
	cmovel	%eax, %ecx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rdx
	movslq	%r15d, %rsi
	cmovel	%eax, %ecx
	movl	%ecx, (%rdx,%rsi,4)
	incl	%r15d
	jmp	LBB0_7
LBB0_8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, 8(%rax)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"STA not found. Cannot set rates\n"

L_.str.1:                               ## @.str.1
	.asciz	"sta rate_set = %08x\n"

	.comm	_AR5523_MAX_NRATES,4,2          ## @AR5523_MAX_NRATES
L_.str.2:                               ## @.str.2
	.asciz	"Considering rate %d : %d\n"

	.no_dead_strip	_ar5523_create_rateset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar5523_create_rateset
_ar5523_create_rateset:                 ; @ar5523_create_rateset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [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 w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	ldr	w0, [x0, #8]
	ldr	w1, [x1, #4]
	bl	_ieee80211_find_sta
	ldr	w24, [x22]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x0]
	ldr	x9, [x21]
	ldr	x9, [x9]
	ldr	x9, [x9]
	add	x22, x8, x9, lsl #2
	b	LBB0_3
LBB0_2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_ar5523_info
LBB0_3:
	ldr	w22, [x22]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_ar5523_dbg
	ldr	x8, [x21]
	ldp	x8, x9, [x8]
	ldr	x9, [x9]
	ldr	x8, [x8]
	ldr	x25, [x9, x8, lsl #3]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.4:
	mov	x27, #0
	mov	w26, #0
Lloh4:
	adrp	x28, _AR5523_MAX_NRATES@GOTPAGE
Lloh5:
	ldr	x28, [x28, _AR5523_MAX_NRATES@GOTPAGEOFF]
Lloh6:
	adrp	x23, l_.str.2@PAGE
Lloh7:
	add	x23, x23, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	asr	w22, w22, #1
	asr	w24, w24, #1
	add	x27, x27, #1
	ldrsw	x8, [x25]
	cmp	x27, x8
	b.ge	LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x28]
	cmp	w26, w8
	cset	w0, ge
	bl	_BUG_ON
	ldr	x8, [x25, #8]
	ldr	w2, [x8, x27, lsl #2]
	and	w8, w22, #0x1
	str	x8, [sp]
	mov	x0, x21
	mov	x1, x23
	bl	_ar5523_dbg
	tbz	w22, #0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w20, #0
	cset	w8, ne
	ldr	x9, [x25, #8]
	ldr	w9, [x9, x27, lsl #2]
	ldr	x10, [x19]
	orr	w11, w9, #0x80
	tst	w8, w24
	csel	w8, w11, w9, ne
	str	w8, [x10, w26, sxtw #2]
	add	w26, w26, #1
	b	LBB0_5
LBB0_8:
	mov	w26, #0
LBB0_9:
	str	w26, [x19, #8]
	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	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"STA not found. Cannot set rates\n"

l_.str.1:                               ; @.str.1
	.asciz	"sta rate_set = %08x\n"

	.comm	_AR5523_MAX_NRATES,4,2          ; @AR5523_MAX_NRATES
l_.str.2:                               ; @.str.2
	.asciz	"Considering rate %d : %d\n"

	.no_dead_strip	_ar5523_create_rateset
.subsections_via_symbols
