	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_regwrite_single
_ath9k_regwrite_single:                 ## @ath9k_regwrite_single
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	%esi, -52(%rbp)
	callq	_ath9k_hw_common
	movq	%rax, %r15
	movq	(%rax), %r12
	movl	%r14d, %edi
	callq	_cpu_to_be32
	movl	%eax, -48(%rbp)
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movl	%eax, -44(%rbp)
	movl	(%r12), %edi
	movq	_WMI_REG_WRITE_CMDID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$100, (%rsp)
	leaq	-48(%rbp), %rdx
	leaq	-52(%rbp), %r8
	movl	$8, %ecx
	movl	$4, %r9d
	callq	_ath9k_wmi_cmd
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%r14d, %ecx
	movl	%ebx, %r8d
	callq	_ath_dbg
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_WMI_REG_WRITE_CMDID,4,2        ## @WMI_REG_WRITE_CMDID
	.comm	_WMI,4,2                        ## @WMI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"REGISTER WRITE FAILED:(0x%04x, %d)\n"

	.no_dead_strip	_ath9k_regwrite_single
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_regwrite_single
_ath9k_regwrite_single:                 ; @ath9k_regwrite_single
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x2
	mov	x21, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	str	w1, [sp, #12]
	bl	_ath9k_hw_common
	mov	x20, x0
	ldr	x22, [x0]
	mov	x0, x19
	bl	_cpu_to_be32
	str	w0, [sp, #16]
	mov	x0, x21
	bl	_cpu_to_be32
	str	w0, [sp, #20]
	ldr	w0, [x22]
Lloh3:
	adrp	x8, _WMI_REG_WRITE_CMDID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WMI_REG_WRITE_CMDID@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #16
	add	x4, sp, #12
	mov	w3, #8
	mov	w5, #4
	mov	w6, #100
	bl	_ath9k_wmi_cmd
	mov	x21, x0
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _WMI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WMI@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x3, x19
	mov	x4, x21
	bl	_ath_dbg
LBB0_2:
	ldr	x8, [sp, #24]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	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
	add	sp, sp, #80
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_WMI_REG_WRITE_CMDID,4,2        ; @WMI_REG_WRITE_CMDID
	.comm	_WMI,4,2                        ; @WMI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"REGISTER WRITE FAILED:(0x%04x, %d)\n"

	.no_dead_strip	_ath9k_regwrite_single
.subsections_via_symbols
