	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_reg_rmw_buffer
_ath9k_reg_rmw_buffer:                  ## @ath9k_reg_rmw_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	%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, %r15d
	movl	%edx, %r12d
	movl	%esi, %r13d
	callq	_ath9k_hw_common
	movq	%rax, %r14
	movq	(%rax), %rbx
	movq	(%rbx), %rdi
	addq	$8, %rdi
	callq	_mutex_lock
	movl	%r13d, %edi
	callq	_cpu_to_be32
	movq	(%rbx), %rcx
	movq	(%rcx), %rdx
	movq	16(%rcx), %rcx
	leaq	(%rdx,%rdx,2), %rdx
	movq	%rax, 16(%rcx,%rdx,8)
	movl	%r12d, %edi
	callq	_cpu_to_be32
	movq	(%rbx), %rcx
	movq	(%rcx), %rdx
	movq	16(%rcx), %rcx
	leaq	(%rdx,%rdx,2), %rdx
	movq	%rax, 8(%rcx,%rdx,8)
	movl	%r15d, %edi
	callq	_cpu_to_be32
	movq	(%rbx), %rdi
	movq	(%rdi), %rcx
	movq	16(%rdi), %rdx
	leaq	(%rcx,%rcx,2), %rsi
	movq	%rax, (%rdx,%rsi,8)
	incq	%rcx
	movq	%rcx, (%rdi)
	movq	_MAX_RMW_CMD_NUMBER@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_4
## %bb.1:
	leaq	16(%rdi), %rdx
	movq	_WMI_REG_RMW_CMDID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$2, %ecx
	movl	$100, (%rsp)
	leaq	-44(%rbp), %r8
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	$4, %r9d
	callq	_ath9k_wmi_cmd
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_ath_dbg
LBB0_3:
	movq	(%rbx), %rdi
	movq	$0, (%rdi)
LBB0_4:
	addq	$8, %rdi
	callq	_mutex_unlock
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_RMW_CMD_NUMBER,8,3         ## @MAX_RMW_CMD_NUMBER
	.comm	_WMI_REG_RMW_CMDID,4,2          ## @WMI_REG_RMW_CMDID
	.comm	_WMI,4,2                        ## @WMI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"REGISTER RMW FAILED, multi len: %d\n"

	.no_dead_strip	_ath9k_reg_rmw_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_reg_rmw_buffer
_ath9k_reg_rmw_buffer:                  ; @ath9k_reg_rmw_buffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	bl	_ath9k_hw_common
	mov	x19, x0
	ldr	x23, [x0]
	ldr	x8, [x23]
	add	x0, x8, #8
	bl	_mutex_lock
	mov	x0, x22
	bl	_cpu_to_be32
	ldr	x8, [x23]
	ldr	x9, [x8, #16]
	ldr	x8, [x8]
	mov	w22, #24
	madd	x8, x8, x22, x9
	str	x0, [x8, #16]
	mov	x0, x21
	bl	_cpu_to_be32
	ldr	x8, [x23]
	ldr	x9, [x8, #16]
	ldr	x8, [x8]
	madd	x8, x8, x22, x9
	str	x0, [x8, #8]
	mov	x0, x20
	bl	_cpu_to_be32
	mov	x8, x0
	ldr	x0, [x23]
	mov	x2, x0
	ldr	x9, [x2, #16]!
	ldr	x10, [x0]
	mul	x11, x10, x22
	str	x8, [x9, x11]
	add	x8, x10, #1
	str	x8, [x0]
Lloh0:
	adrp	x9, _MAX_RMW_CMD_NUMBER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_RMW_CMD_NUMBER@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
Lloh3:
	adrp	x9, _WMI_REG_RMW_CMDID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WMI_REG_RMW_CMDID@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
	lsl	w3, w8, #2
	add	x4, sp, #12
	mov	w5, #4
	mov	w6, #100
	bl	_ath9k_wmi_cmd
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _WMI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WMI@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	x8, [x23]
	ldr	w3, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ath_dbg
LBB0_3:
	ldr	x0, [x23]
	str	xzr, [x0]
LBB0_4:
	add	x0, x0, #8
	bl	_mutex_unlock
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_RMW_CMD_NUMBER,8,3         ; @MAX_RMW_CMD_NUMBER
	.comm	_WMI_REG_RMW_CMDID,4,2          ; @WMI_REG_RMW_CMDID
	.comm	_WMI,4,2                        ; @WMI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"REGISTER RMW FAILED, multi len: %d\n"

	.no_dead_strip	_ath9k_reg_rmw_buffer
.subsections_via_symbols
