	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_regwrite_buffer
_ath9k_regwrite_buffer:                 ## @ath9k_regwrite_buffer
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r15d
	callq	_ath9k_hw_common
	movq	%rax, %r14
	movq	(%rax), %rbx
	movq	(%rbx), %rdi
	addq	$8, %rdi
	callq	_mutex_lock
	movl	%r12d, %edi
	callq	_cpu_to_be32
	movq	(%rbx), %rcx
	movq	(%rcx), %rdx
	movq	16(%rcx), %rcx
	shlq	$4, %rdx
	movq	%rax, 8(%rcx,%rdx)
	movl	%r15d, %edi
	callq	_cpu_to_be32
	movq	(%rbx), %rdi
	movq	(%rdi), %rcx
	movq	16(%rdi), %rdx
	movq	%rcx, %rsi
	shlq	$4, %rsi
	movq	%rax, (%rdx,%rsi)
	incq	%rcx
	movq	%rcx, (%rdi)
	movq	_MAX_CMD_NUMBER@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_ath9k_regwrite_multi
	movq	(%rbx), %rdi
LBB0_2:
	addq	$8, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_CMD_NUMBER,8,3             ## @MAX_CMD_NUMBER
	.no_dead_strip	_ath9k_regwrite_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_regwrite_buffer
_ath9k_regwrite_buffer:                 ; @ath9k_regwrite_buffer
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x21, x1
	bl	_ath9k_hw_common
	mov	x19, x0
	ldr	x22, [x0]
	ldr	x8, [x22]
	add	x0, x8, #8
	bl	_mutex_lock
	mov	x0, x20
	bl	_cpu_to_be32
	ldr	x8, [x22]
	ldr	x9, [x8, #16]
	ldr	x8, [x8]
	add	x8, x9, x8, lsl #4
	str	x0, [x8, #8]
	mov	x0, x21
	bl	_cpu_to_be32
	ldr	x8, [x22]
	ldr	x9, [x8, #16]
	ldr	x10, [x8]
	lsl	x11, x10, #4
	str	x0, [x9, x11]
	add	x9, x10, #1
	str	x9, [x8]
Lloh0:
	adrp	x10, _MAX_CMD_NUMBER@GOTPAGE
Lloh1:
	ldr	x10, [x10, _MAX_CMD_NUMBER@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_ath9k_regwrite_multi
	ldr	x8, [x22]
LBB0_2:
	add	x0, x8, #8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_CMD_NUMBER,8,3             ; @MAX_CMD_NUMBER
	.no_dead_strip	_ath9k_regwrite_buffer
.subsections_via_symbols
