	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_stop                     ## -- Begin function ath5k_stop
	.p2align	4, 0x90
_ath5k_stop:                            ## @ath5k_stop
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rbx
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_ath5k_stop_locked
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	_ATH_STAT_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rbx), %esi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_ath5k_hw_on_hold
	movq	_ATH5K_DEBUG_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_ATH5K_DBG
LBB0_3:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	callq	_ath5k_stop_tasklets
	movq	_ATH_STAT_STARTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rbx), %esi
	callq	_clear_bit
	movq	%rbx, %rdi
	callq	_cancel_delayed_work_sync
	movq	_ath5k_modparam_no_hw_rfkill_switch@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_5
## %bb.4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ath5k_rfkill_hw_stop           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH_STAT_INVALID,4,2           ## @ATH_STAT_INVALID
	.comm	_ATH5K_DEBUG_RESET,4,2          ## @ATH5K_DEBUG_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"putting device to sleep\n"

	.comm	_ATH_STAT_STARTED,4,2           ## @ATH_STAT_STARTED
	.comm	_ath5k_modparam_no_hw_rfkill_switch,4,2 ## @ath5k_modparam_no_hw_rfkill_switch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_stop                     ; -- Begin function ath5k_stop
	.p2align	2
_ath5k_stop:                            ; @ath5k_stop
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x19, [x0]
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x19
	bl	_ath5k_stop_locked
	cbnz	w0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _ATH_STAT_INVALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH_STAT_INVALID@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	_test_bit
	cbnz	w0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_ath5k_hw_on_hold
Lloh3:
	adrp	x8, _ATH5K_DEBUG_RESET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATH5K_DEBUG_RESET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ATH5K_DBG
LBB0_3:
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	bl	_ath5k_stop_tasklets
Lloh8:
	adrp	x8, _ATH_STAT_STARTED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATH_STAT_STARTED@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	_clear_bit
	mov	x0, x19
	bl	_cancel_delayed_work_sync
Lloh11:
	adrp	x8, _ath5k_modparam_no_hw_rfkill_switch@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ath5k_modparam_no_hw_rfkill_switch@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cbz	w8, LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ath5k_rfkill_hw_stop
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH_STAT_INVALID,4,2           ; @ATH_STAT_INVALID
	.comm	_ATH5K_DEBUG_RESET,4,2          ; @ATH5K_DEBUG_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"putting device to sleep\n"

	.comm	_ATH_STAT_STARTED,4,2           ; @ATH_STAT_STARTED
	.comm	_ath5k_modparam_no_hw_rfkill_switch,4,2 ; @ath5k_modparam_no_hw_rfkill_switch
.subsections_via_symbols
