	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_carl9170_restart               ## -- Begin function carl9170_restart
	.p2align	4, 0x90
_carl9170_restart:                      ## @carl9170_restart
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_CARL9170_STARTED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CARL9170_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_carl9170_set_state_when
	leaq	40(%rbx), %rdi
	callq	_atomic_inc_return
	cmpl	$2, %eax
	jl	LBB0_1
## %bb.10:
	movq	32(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
LBB0_1:
	movl	12(%rbx), %edi
	callq	_ieee80211_stop_queues
	movq	32(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
	movq	_CARL9170_RR_NO_REASON@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%r14d, (%rax)
	sete	%dil
	callq	_WARN_ON
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movq	___CARL9170_RR_LAST@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%r14d, (%rax)
	setbe	%dil
	callq	_WARN_ON
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	cmpl	$0, 24(%rbx)
	je	LBB0_9
LBB0_5:
	movq	%rbx, %rdi
	callq	_IS_ACCEPTING_CMD
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	cmpq	$0, 16(%rbx)
	je	LBB0_8
LBB0_7:
	movl	$1, 4(%rbx)
LBB0_8:
	movl	12(%rbx), %edi
	addq	$8, %rbx
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ieee80211_queue_work           ## TAILCALL
LBB0_3:
	movl	%r14d, (%rbx)
	cmpl	$0, 24(%rbx)
	jne	LBB0_5
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CARL9170_STARTED,4,2           ## @CARL9170_STARTED
	.comm	_CARL9170_IDLE,4,2              ## @CARL9170_IDLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ignoring restart (%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"restart device (%d)\n"

	.comm	_CARL9170_RR_NO_REASON,4,2      ## @CARL9170_RR_NO_REASON
	.comm	___CARL9170_RR_LAST,4,2         ## @__CARL9170_RR_LAST
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_carl9170_restart               ; -- Begin function carl9170_restart
	.p2align	2
_carl9170_restart:                      ; @carl9170_restart
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _CARL9170_STARTED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CARL9170_STARTED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _CARL9170_IDLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CARL9170_IDLE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_carl9170_set_state_when
	add	x0, x19, #40
	bl	_atomic_inc_return
	cmp	w0, #2
	b.lt	LBB0_2
; %bb.1:
	ldr	x0, [x19, #32]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dev_dbg
LBB0_2:
	ldr	w0, [x19, #12]
	bl	_ieee80211_stop_queues
	ldr	x0, [x19, #32]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_err
Lloh10:
	adrp	x8, _CARL9170_RR_NO_REASON@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CARL9170_RR_NO_REASON@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w8, w20
	cset	w0, eq
	bl	_WARN_ON
	cbz	w0, LBB0_9
; %bb.3:
Lloh13:
	adrp	x8, ___CARL9170_RR_LAST@GOTPAGE
Lloh14:
	ldr	x8, [x8, ___CARL9170_RR_LAST@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w8, w20
	cset	w0, ls
	bl	_WARN_ON
	cbz	w0, LBB0_9
; %bb.4:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_10
LBB0_5:
	mov	x0, x19
	bl	_IS_ACCEPTING_CMD
	cbz	w0, LBB0_7
; %bb.6:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
LBB0_7:
	mov	w8, #1
	str	w8, [x19, #4]
LBB0_8:
	ldr	w0, [x19, #12]
	add	x1, x19, #8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ieee80211_queue_work
LBB0_9:
	str	w20, [x19]
	ldr	w8, [x19, #24]
	cbnz	w8, LBB0_5
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_CARL9170_STARTED,4,2           ; @CARL9170_STARTED
	.comm	_CARL9170_IDLE,4,2              ; @CARL9170_IDLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ignoring restart (%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"restart device (%d)\n"

	.comm	_CARL9170_RR_NO_REASON,4,2      ; @CARL9170_RR_NO_REASON
	.comm	___CARL9170_RR_LAST,4,2         ; @__CARL9170_RR_LAST
.subsections_via_symbols
