	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_beacon_setup
_ath9k_beacon_setup:                    ## @ath9k_beacon_setup
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rdx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %r15
	movq	%r15, %rdi
	callq	_ath9k_hw_common
	movl	(%r15), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	(%rax), %rax
	movq	8(%r12), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movslq	%ebx, %rcx
	movl	(%rax,%rcx,8), %r13d
	cmpq	$0, (%r14)
	je	LBB0_2
## %bb.1:
	orl	4(%rax,%rcx,8), %r13d
LBB0_2:
	leaq	-144(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$80, %edx
	callq	_memset
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	_FCS_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%rdi, %rax
	movq	%rax, -72(%rbp)
	movq	_ATH9K_PKT_TYPE_BEACON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movq	-88(%rbp), %rax
	movq	_MAX_RATE_POWER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, (%rax)
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	movl	%ecx, 8(%rax)
	movl	%ecx, 12(%rax)
	movq	_ATH9K_TXKEYIX_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -92(%rbp)
	movq	_ATH9K_KEY_TYPE_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movq	_ATH9K_TXDESC_NOACK@GOTPCREL(%rip), %rax
	movq	_ATH9K_TXDESC_CLRDMASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -144(%rbp)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	4(%rbx), %eax
	movq	-104(%rbp), %rcx
	movl	%eax, (%rcx)
	movl	$4, %esi
	callq	_roundup
	movq	-112(%rbp), %rcx
	movl	%eax, (%rcx)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, -140(%rbp)
	movl	(%r12), %eax
	movl	%eax, -120(%rbp)
	movq	-128(%rbp), %rax
	movl	$1, (%rax)
	movl	%r13d, 4(%rax)
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	callq	_ath_txchainmask_reduction
	movq	-128(%rbp), %rcx
	movl	%eax, 8(%rcx)
	movl	(%rbx), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_ath9k_hw_set_txdesc
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FCS_LEN,8,3                    ## @FCS_LEN
	.comm	_ATH9K_PKT_TYPE_BEACON,4,2      ## @ATH9K_PKT_TYPE_BEACON
	.comm	_MAX_RATE_POWER,4,2             ## @MAX_RATE_POWER
	.comm	_ATH9K_TXKEYIX_INVALID,4,2      ## @ATH9K_TXKEYIX_INVALID
	.comm	_ATH9K_KEY_TYPE_CLEAR,4,2       ## @ATH9K_KEY_TYPE_CLEAR
	.comm	_ATH9K_TXDESC_NOACK,4,2         ## @ATH9K_TXDESC_NOACK
	.comm	_ATH9K_TXDESC_CLRDMASK,4,2      ## @ATH9K_TXDESC_CLRDMASK
	.no_dead_strip	_ath9k_beacon_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_beacon_setup
_ath9k_beacon_setup:                    ; @ath9k_beacon_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x24, x3
	mov	x19, x2
	mov	x25, x1
	mov	x21, x0
	ldr	x26, [x2, #8]
	ldr	x20, [x0, #16]
	mov	x0, x20
	bl	_ath9k_hw_common
	ldr	w22, [x20]
	ldr	x8, [x0]
	ldr	x9, [x21, #8]
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	sbfiz	x9, x24, #3, #32
	ldr	w23, [x8, x9]
	ldr	x9, [x25]
	cbz	x9, LBB0_2
; %bb.1:
	sxtw	x9, w24
	add	x8, x8, x9, lsl #3
	ldr	w8, [x8, #4]
	orr	w23, w8, w23
LBB0_2:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #80
	bl	_memset
Lloh0:
	adrp	x8, _FCS_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FCS_LEN@GOTPAGEOFF]
	ldr	x0, [x26]
Lloh2:
	ldr	x8, [x8]
	add	x8, x8, x0
	str	x8, [sp, #72]
Lloh3:
	adrp	x8, _ATH9K_PKT_TYPE_BEACON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATH9K_PKT_TYPE_BEACON@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #64]
	ldr	x8, [sp, #56]
Lloh6:
	adrp	x9, _MAX_RATE_POWER@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MAX_RATE_POWER@GOTPAGEOFF]
	ldr	w10, [x9]
	str	w10, [x8]
	ldr	w9, [x9]
	stp	w9, w9, [x8, #4]
Lloh8:
	adrp	x10, _ATH9K_TXKEYIX_INVALID@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ATH9K_TXKEYIX_INVALID@GOTPAGEOFF]
	str	w9, [x8, #12]
Lloh10:
	ldr	w8, [x10]
	str	w8, [sp, #52]
Lloh11:
	adrp	x8, _ATH9K_KEY_TYPE_CLEAR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ATH9K_KEY_TYPE_CLEAR@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _ATH9K_TXDESC_NOACK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ATH9K_TXDESC_NOACK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _ATH9K_TXDESC_CLRDMASK@GOTPAGE
Lloh18:
	ldr	x10, [x10, _ATH9K_TXDESC_CLRDMASK@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w8, [sp, #48]
	str	w9, [sp]
	ldr	w8, [x19, #4]
	ldr	x9, [sp, #40]
	str	w8, [x9]
	mov	w1, #4
	bl	_roundup
	ldr	x8, [sp, #32]
	str	w0, [x8]
	movi.2s	v0, #1
	stur	d0, [sp, #4]
	ldr	w8, [x21]
	str	w8, [sp, #24]
	ldr	x8, [sp, #16]
	mov	w9, #1
	stp	w9, w23, [x8]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_ath_txchainmask_reduction
	ldr	x8, [sp, #16]
	str	w0, [x8, #8]
	ldr	w1, [x19]
	mov	x2, sp
	mov	x0, x20
	bl	_ath9k_hw_set_txdesc
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FCS_LEN,8,3                    ; @FCS_LEN
	.comm	_ATH9K_PKT_TYPE_BEACON,4,2      ; @ATH9K_PKT_TYPE_BEACON
	.comm	_MAX_RATE_POWER,4,2             ; @MAX_RATE_POWER
	.comm	_ATH9K_TXKEYIX_INVALID,4,2      ; @ATH9K_TXKEYIX_INVALID
	.comm	_ATH9K_KEY_TYPE_CLEAR,4,2       ; @ATH9K_KEY_TYPE_CLEAR
	.comm	_ATH9K_TXDESC_NOACK,4,2         ; @ATH9K_TXDESC_NOACK
	.comm	_ATH9K_TXDESC_CLRDMASK,4,2      ; @ATH9K_TXDESC_CLRDMASK
	.no_dead_strip	_ath9k_beacon_setup
.subsections_via_symbols
