	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_htc_add_station
_ath9k_htc_add_station:                 ## @ath9k_htc_add_station
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	16(%rdi), %edi
	callq	_ath9k_hw_common
	movl	(%rbx), %ecx
	movq	_ATH9K_HTC_MAX_STA@GOTPCREL(%rip), %r12
	cmpl	(%r12), %ecx
	jge	LBB0_1
## %bb.2:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	4(%rbx), %edi
	callq	_ffz
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movl	%eax, %r15d
	cmpl	(%r12), %eax
	jg	LBB0_1
## %bb.4:
	leaq	-88(%rbp), %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	testq	%r14, %r14
	je	LBB0_6
## %bb.5:
	movq	(%r14), %rsi
	movq	16(%r14), %r12
	leaq	-64(%rbp), %rdi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	leaq	-60(%rbp), %rdi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rsi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	movl	%r15d, (%r12)
	movl	$0, -88(%rbp)
	movq	_IEEE80211_HT_MAX_AMPDU_FACTOR@GOTPCREL(%rip), %rax
	movl	8(%r14), %ecx
	addl	(%rax), %ecx
	movl	$1, %edi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edi
	leaq	L_.str.1(%rip), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
LBB0_1:
	movq	_ENOBUFS@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	-64(%rbp), %rdi
	movq	(%r13), %rsi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	movl	$1, -88(%rbp)
	movl	$65535, %edi                    ## imm = 0xFFFF
	leaq	L_.str.2(%rip), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %r13                 ## 8-byte Reload
LBB0_7:
	callq	_cpu_to_be16
	movq	%rax, -72(%rbp)
	movl	%r15d, -84(%rbp)
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %rax
	movq	%rax, -80(%rbp)
	movq	_WMI_NODE_CREATE_CMDID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-88(%rbp), %rsi
	callq	_WMI_CMD_BUF
	testq	%r14, %r14
	movq	_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rax
	cmoveq	%r12, %rax
	movq	(%rax), %rcx
	movl	-84(%rbp), %r8d
	movq	%r13, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_ath_dbg
	movl	$1, %eax
	movl	%r15d, %ecx
	shll	%cl, %eax
	orl	%eax, 4(%rbx)
	incl	(%rbx)
	xorl	%eax, %eax
	testq	%r14, %r14
	jne	LBB0_9
## %bb.8:
	movq	8(%rbx), %rcx
	movq	(%r12), %rdx
	movl	%r15d, (%rcx,%rdx,4)
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH9K_HTC_MAX_STA,4,2          ## @ATH9K_HTC_MAX_STA
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_IEEE80211_HT_MAX_AMPDU_FACTOR,4,2 ## @IEEE80211_HT_MAX_AMPDU_FACTOR
	.comm	_WMI_NODE_CREATE_CMDID,4,2      ## @WMI_NODE_CREATE_CMDID
	.comm	_CONFIG,4,2                     ## @CONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"Added a station entry for: %pM (idx: %d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"Added a station entry for VIF %d (idx: %d)\n"

	.no_dead_strip	_ath9k_htc_add_station
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_htc_add_station
_ath9k_htc_add_station:                 ; @ath9k_htc_add_station
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x2
	mov	x23, x1
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_ath9k_hw_common
	ldr	w8, [x19]
Lloh0:
	adrp	x25, _ATH9K_HTC_MAX_STA@GOTPAGE
Lloh1:
	ldr	x25, [x25, _ATH9K_HTC_MAX_STA@GOTPAGEOFF]
	ldr	w9, [x25]
	cmp	w8, w9
	b.ge	LBB0_5
; %bb.1:
	mov	x22, x0
	ldr	x24, [x23, #8]
	ldr	w0, [x19, #4]
	bl	_ffz
	tbnz	w0, #31, LBB0_5
; %bb.2:
	mov	x21, x0
	ldr	w8, [x25]
	cmp	w0, w8
	b.gt	LBB0_5
; %bb.3:
	mov	x25, sp
	mov	x0, sp
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	cbz	x20, LBB0_7
; %bb.4:
	ldr	x23, [x20, #16]
	add	x0, x25, #24
	ldr	x1, [x20]
Lloh2:
	adrp	x26, _ETH_ALEN@GOTPAGE
Lloh3:
	ldr	x26, [x26, _ETH_ALEN@GOTPAGEOFF]
	ldr	w2, [x26]
	bl	_memcpy
	add	x0, x25, #28
	ldr	x1, [x22]
	ldr	w2, [x26]
	bl	_memcpy
	str	w21, [x23]
	str	wzr, [sp]
Lloh4:
	adrp	x8, _IEEE80211_HT_MAX_AMPDU_FACTOR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IEEE80211_HT_MAX_AMPDU_FACTOR@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	add	w8, w9, w8
	mov	w9, #1
	lsl	w0, w9, w8
Lloh7:
	adrp	x23, l_.str.1@PAGE
Lloh8:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_5:
Lloh9:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	add	sp, sp, #112
	ret
LBB0_7:
	add	x0, x25, #24
	ldr	x1, [x23]
Lloh12:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	bl	_memcpy
	mov	w8, #1
	str	w8, [sp]
	mov	w0, #65535
Lloh15:
	adrp	x23, l_.str.2@PAGE
Lloh16:
	add	x23, x23, l_.str.2@PAGEOFF
LBB0_8:
	bl	_cpu_to_be16
	str	x0, [sp, #16]
	str	w21, [sp, #4]
	ldr	x8, [x24]
	str	x8, [sp, #8]
Lloh17:
	adrp	x8, _WMI_NODE_CREATE_CMDID@GOTPAGE
Lloh18:
	ldr	x8, [x8, _WMI_NODE_CREATE_CMDID@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	mov	x1, sp
	bl	_WMI_CMD_BUF
Lloh20:
	adrp	x8, _CONFIG@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CONFIG@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	cmp	x20, #0
	csel	x8, x24, x20, eq
	ldr	x3, [x8]
	ldr	w4, [sp, #4]
	mov	x0, x22
	mov	x2, x23
	bl	_ath_dbg
	mov	w8, #1
	lsl	w8, w8, w21
	ldp	w10, w9, [x19]
	orr	w8, w9, w8
	add	w9, w10, #1
	stp	w9, w8, [x19]
	mov	w0, #0
	cbnz	x20, LBB0_6
; %bb.9:
	ldr	x8, [x19, #8]
	ldr	x9, [x24]
	str	w21, [x8, x9, lsl #2]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH9K_HTC_MAX_STA,4,2          ; @ATH9K_HTC_MAX_STA
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_IEEE80211_HT_MAX_AMPDU_FACTOR,4,2 ; @IEEE80211_HT_MAX_AMPDU_FACTOR
	.comm	_WMI_NODE_CREATE_CMDID,4,2      ; @WMI_NODE_CREATE_CMDID
	.comm	_CONFIG,4,2                     ; @CONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"Added a station entry for: %pM (idx: %d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"Added a station entry for VIF %d (idx: %d)\n"

	.no_dead_strip	_ath9k_htc_add_station
.subsections_via_symbols
