	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_arcofi_fsm                     ## -- Begin function arcofi_fsm
	.p2align	4, 0x90
_arcofi_fsm:                            ## @arcofi_fsm
	.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
	movq	%rdx, %r12
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_L1_DEB_MONITOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_2
## %bb.1:
	movl	8(%r15), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_debugl1
LBB0_2:
	movq	_ARCOFI_TIMEOUT@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_4
## %bb.3:
	movl	$130, 8(%r15)
	movq	_FLG_ARCOFI_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	32(%r15), %rsi
	callq	_test_and_set_bit
	addq	$12, %r15
	movq	%r15, %rdi
	callq	_wake_up
	movl	$1, %r14d
	jmp	LBB0_23
LBB0_4:
	movl	8(%r15), %edx
	cmpl	$128, %edx
	je	LBB0_11
## %bb.5:
	cmpl	$129, %edx
	je	LBB0_19
## %bb.6:
	cmpl	$130, %edx
	jne	LBB0_22
## %bb.7:
	movq	_ARCOFI_START@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpl	%ebx, (%rax)
	jne	LBB0_23
## %bb.8:
	movq	%r12, 24(%r15)
	jmp	LBB0_9
LBB0_11:
	movq	_ARCOFI_TX_END@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpl	%ebx, (%rax)
	jne	LBB0_23
## %bb.12:
	movq	24(%r15), %rax
	cmpl	$0, 8(%rax)
	je	LBB0_14
## %bb.13:
	movq	%r15, %rdi
	callq	_add_arcofi_timer
	movl	$129, 8(%r15)
	jmp	LBB0_23
LBB0_19:
	movq	_ARCOFI_RX_END@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpl	%ebx, (%rax)
	jne	LBB0_23
## %bb.20:
	movq	24(%r15), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.21:
	movq	%rax, 24(%r15)
LBB0_9:
	movl	$128, 8(%r15)
LBB0_10:
	movq	%r15, %rdi
	callq	_send_arcofi
	jmp	LBB0_23
LBB0_22:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_debugl1
	movl	$2, %r14d
	jmp	LBB0_23
LBB0_14:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	%rax, 24(%r15)
	jmp	LBB0_10
LBB0_16:
	movq	_FLG_ARCOFI_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	32(%r15), %rsi
	callq	_test_and_clear_bit
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	leaq	16(%r15), %rdi
	callq	_del_timer
LBB0_18:
	movl	$130, 8(%r15)
	addq	$12, %r15
	movq	%r15, %rdi
	callq	_wake_up
LBB0_23:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_L1_DEB_MONITOR,4,2             ## @L1_DEB_MONITOR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"arcofi state %d event %d"

	.comm	_ARCOFI_TIMEOUT,4,2             ## @ARCOFI_TIMEOUT
	.comm	_FLG_ARCOFI_ERROR,4,2           ## @FLG_ARCOFI_ERROR
	.comm	_ARCOFI_START,4,2               ## @ARCOFI_START
	.comm	_ARCOFI_TX_END,4,2              ## @ARCOFI_TX_END
	.comm	_FLG_ARCOFI_TIMER,4,2           ## @FLG_ARCOFI_TIMER
	.comm	_ARCOFI_RX_END,4,2              ## @ARCOFI_RX_END
L_.str.1:                               ## @.str.1
	.asciz	"Arcofi unknown state %x"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_arcofi_fsm                     ; -- Begin function arcofi_fsm
	.p2align	2
_arcofi_fsm:                            ; @arcofi_fsm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _L1_DEB_MONITOR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _L1_DEB_MONITOR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w2, [x19, #8]
	str	x20, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_debugl1
LBB0_2:
Lloh5:
	adrp	x8, _ARCOFI_TIMEOUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ARCOFI_TIMEOUT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_4
; %bb.3:
	mov	w8, #130
	str	w8, [x19, #8]
Lloh8:
	adrp	x8, _FLG_ARCOFI_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FLG_ARCOFI_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	add	x1, x19, #32
	bl	_test_and_set_bit
	add	x0, x19, #12
	bl	_wake_up
	mov	w0, #1
	b	LBB0_24
LBB0_4:
	ldr	w2, [x19, #8]
	cmp	w2, #128
	b.eq	LBB0_9
; %bb.5:
	cmp	w2, #129
	b.eq	LBB0_12
; %bb.6:
	cmp	w2, #130
	b.ne	LBB0_17
; %bb.7:
Lloh11:
	adrp	x8, _ARCOFI_START@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ARCOFI_START@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_23
; %bb.8:
	str	x21, [x19, #24]
	b	LBB0_15
LBB0_9:
Lloh14:
	adrp	x8, _ARCOFI_TX_END@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ARCOFI_TX_END@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_23
; %bb.10:
	ldr	x8, [x19, #24]
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_18
; %bb.11:
	mov	x0, x19
	bl	_add_arcofi_timer
	mov	w0, #0
	mov	w8, #129
	str	w8, [x19, #8]
	b	LBB0_24
LBB0_12:
Lloh17:
	adrp	x8, _ARCOFI_RX_END@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ARCOFI_RX_END@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_23
; %bb.13:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_20
; %bb.14:
	str	x8, [x19, #24]
LBB0_15:
	mov	w8, #128
	str	w8, [x19, #8]
LBB0_16:
	mov	x0, x19
	bl	_send_arcofi
	b	LBB0_23
LBB0_17:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_debugl1
	mov	w0, #2
	b	LBB0_24
LBB0_18:
	ldr	x8, [x8]
	cbz	x8, LBB0_20
; %bb.19:
	str	x8, [x19, #24]
	b	LBB0_16
LBB0_20:
Lloh22:
	adrp	x8, _FLG_ARCOFI_TIMER@GOTPAGE
Lloh23:
	ldr	x8, [x8, _FLG_ARCOFI_TIMER@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	add	x1, x19, #32
	bl	_test_and_clear_bit
	cbz	w0, LBB0_22
; %bb.21:
	add	x0, x19, #16
	bl	_del_timer
LBB0_22:
	mov	w8, #130
	str	w8, [x19, #8]
	add	x0, x19, #12
	bl	_wake_up
LBB0_23:
	mov	w0, #0
LBB0_24:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_L1_DEB_MONITOR,4,2             ; @L1_DEB_MONITOR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"arcofi state %d event %d"

	.comm	_ARCOFI_TIMEOUT,4,2             ; @ARCOFI_TIMEOUT
	.comm	_FLG_ARCOFI_ERROR,4,2           ; @FLG_ARCOFI_ERROR
	.comm	_ARCOFI_START,4,2               ; @ARCOFI_START
	.comm	_ARCOFI_TX_END,4,2              ; @ARCOFI_TX_END
	.comm	_FLG_ARCOFI_TIMER,4,2           ; @FLG_ARCOFI_TIMER
	.comm	_ARCOFI_RX_END,4,2              ; @ARCOFI_RX_END
l_.str.1:                               ; @.str.1
	.asciz	"Arcofi unknown state %x"

.subsections_via_symbols
