	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stfsm_clear_fifo
_stfsm_clear_fifo:                      ## @stfsm_clear_fifo
	.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	%rdi, %r15
	callq	_stfsm_fifo_available
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movl	%eax, %r14d
	jle	LBB0_4
## %bb.2:
	movq	_SPI_FAST_SEQ_DATA_REG@GOTPCREL(%rip), %r12
	movl	%r14d, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	decl	%ebx
	jne	LBB0_3
LBB0_4:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_dbg
LBB0_5:
	xorl	%ebx, %ebx
	movq	_stfsm_seq_load_fifo_byte@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %r12d
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_stfsm_load_seq
	movq	%r15, %rdi
	callq	_stfsm_wait_seq
	movq	%r15, %rdi
	callq	_stfsm_fifo_available
	leal	1(%r12), %ebx
	cmpl	$2, %r12d
	ja	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	testl	%eax, %eax
	je	LBB0_6
LBB0_8:
	cmpl	$1, %eax
	jne	LBB0_9
## %bb.10:
	movq	_SPI_FAST_SEQ_DATA_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	movl	(%r15), %edi
	movl	$4, %edx
	subl	%ebx, %edx
	leaq	L_.str.2(%rip), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
LBB0_9:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_stfsm_seq_load_fifo_byte,4,2   ## @stfsm_seq_load_fifo_byte
	.comm	_SPI_FAST_SEQ_DATA_REG,8,3      ## @SPI_FAST_SEQ_DATA_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cleared %d words from FIFO\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to clear bytes from the data FIFO\n"

L_.str.2:                               ## @.str.2
	.asciz	"cleared %d byte(s) from the data FIFO\n"

	.no_dead_strip	_stfsm_clear_fifo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stfsm_clear_fifo
_stfsm_clear_fifo:                      ; @stfsm_clear_fifo
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x0
	bl	_stfsm_fifo_available
	cbz	w0, LBB0_5
; %bb.1:
	mov	x20, x0
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.2:
Lloh0:
	adrp	x21, _SPI_FAST_SEQ_DATA_REG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SPI_FAST_SEQ_DATA_REG@GOTPAGEOFF]
	mov	x22, x20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
	subs	w22, w22, #1
	b.ne	LBB0_3
LBB0_4:
	ldr	w0, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
LBB0_5:
Lloh4:
	adrp	x1, _stfsm_seq_load_fifo_byte@GOTPAGE
Lloh5:
	ldr	x1, [x1, _stfsm_seq_load_fifo_byte@GOTPAGEOFF]
	mov	x0, x19
	bl	_stfsm_load_seq
	mov	x0, x19
	bl	_stfsm_wait_seq
	mov	x0, x19
	bl	_stfsm_fifo_available
	cbz	w0, LBB0_7
; %bb.6:
	mov	w20, #3
	cmp	w0, #1
	b.eq	LBB0_11
	b	LBB0_13
LBB0_7:
Lloh6:
	adrp	x1, _stfsm_seq_load_fifo_byte@GOTPAGE
Lloh7:
	ldr	x1, [x1, _stfsm_seq_load_fifo_byte@GOTPAGEOFF]
	mov	x0, x19
	bl	_stfsm_load_seq
	mov	x0, x19
	bl	_stfsm_wait_seq
	mov	x0, x19
	bl	_stfsm_fifo_available
	cbz	w0, LBB0_9
; %bb.8:
	mov	w20, #2
	cmp	w0, #1
	b.eq	LBB0_11
	b	LBB0_13
LBB0_9:
Lloh8:
	adrp	x1, _stfsm_seq_load_fifo_byte@GOTPAGE
Lloh9:
	ldr	x1, [x1, _stfsm_seq_load_fifo_byte@GOTPAGEOFF]
	mov	x0, x19
	bl	_stfsm_load_seq
	mov	x0, x19
	bl	_stfsm_wait_seq
	mov	x0, x19
	bl	_stfsm_fifo_available
	cbz	w0, LBB0_12
; %bb.10:
	mov	w20, #1
	cmp	w0, #1
	b.ne	LBB0_13
LBB0_11:
	ldr	x8, [x19, #8]
Lloh10:
	adrp	x9, _SPI_FAST_SEQ_DATA_REG@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SPI_FAST_SEQ_DATA_REG@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	ldr	w0, [x19]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_dev_dbg
LBB0_12:
Lloh15:
	adrp	x1, _stfsm_seq_load_fifo_byte@GOTPAGE
Lloh16:
	ldr	x1, [x1, _stfsm_seq_load_fifo_byte@GOTPAGEOFF]
	mov	x0, x19
	bl	_stfsm_load_seq
	mov	x0, x19
	bl	_stfsm_wait_seq
	mov	x0, x19
	bl	_stfsm_fifo_available
	mov	w20, #0
	cmp	w0, #1
	b.eq	LBB0_11
LBB0_13:
	ldr	w0, [x19]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_dev_err
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_stfsm_seq_load_fifo_byte,4,2   ; @stfsm_seq_load_fifo_byte
	.comm	_SPI_FAST_SEQ_DATA_REG,8,3      ; @SPI_FAST_SEQ_DATA_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cleared %d words from FIFO\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to clear bytes from the data FIFO\n"

l_.str.2:                               ; @.str.2
	.asciz	"cleared %d byte(s) from the data FIFO\n"

	.no_dead_strip	_stfsm_clear_fifo
.subsections_via_symbols
