	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stli_flushbuffer
_stli_flushbuffer:                      ## @stli_flushbuffer
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.1:
	movq	(%rbx), %rax
	movq	_stli_nrbrds@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_11
## %bb.2:
	movq	_stli_brds@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rax,8), %r15
	testq	%r15, %r15
	je	LBB0_11
## %bb.3:
	movq	%rdi, %r14
	movq	_brd_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	_stli_txcooktty@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	$0, (%rax)
	movq	_stli_txcooksize@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_stli_txcookrealsize@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
LBB0_5:
	movq	_ST_CMDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%rbx), %r12
	movq	%r12, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_ST_DOFLUSHTX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_set_bit
	jmp	LBB0_10
LBB0_7:
	movq	_FLUSHTX@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	%r13, -48(%rbp)
	movq	_ST_DOFLUSHRX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_FLUSHRX@GOTPCREL(%rip), %rax
	orq	(%rax), %r13
	movq	%r13, -48(%rbp)
	movq	_ST_DOFLUSHRX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_clear_bit
LBB0_9:
	movq	_A_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rcx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$4, %r8d
	xorl	%r9d, %r9d
	callq	___stli_sendcmd
LBB0_10:
	movq	_brd_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rdi
	callq	_tty_wakeup
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stli_nrbrds,8,3                ## @stli_nrbrds
	.comm	_stli_brds,8,3                  ## @stli_brds
	.comm	_brd_lock,4,2                   ## @brd_lock
	.comm	_stli_txcooktty,8,3             ## @stli_txcooktty
	.comm	_stli_txcooksize,8,3            ## @stli_txcooksize
	.comm	_stli_txcookrealsize,8,3        ## @stli_txcookrealsize
	.comm	_ST_CMDING,4,2                  ## @ST_CMDING
	.comm	_ST_DOFLUSHTX,4,2               ## @ST_DOFLUSHTX
	.comm	_FLUSHTX,8,3                    ## @FLUSHTX
	.comm	_ST_DOFLUSHRX,4,2               ## @ST_DOFLUSHRX
	.comm	_FLUSHRX,8,3                    ## @FLUSHRX
	.comm	_A_FLUSH,4,2                    ## @A_FLUSH
	.no_dead_strip	_stli_flushbuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stli_flushbuffer
_stli_flushbuffer:                      ; @stli_flushbuffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x20, [x0]
	cbz	x20, LBB0_11
; %bb.1:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _stli_nrbrds@GOTPAGE
Lloh1:
	ldr	x9, [x9, _stli_nrbrds@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_11
; %bb.2:
Lloh3:
	adrp	x9, _stli_brds@GOTPAGE
Lloh4:
	ldr	x9, [x9, _stli_brds@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x21, [x9, x8, lsl #3]
	cbz	x21, LBB0_11
; %bb.3:
	mov	x19, x0
Lloh6:
	adrp	x0, _brd_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _brd_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
Lloh8:
	adrp	x8, _stli_txcooktty@GOTPAGE
Lloh9:
	ldr	x8, [x8, _stli_txcooktty@GOTPAGEOFF]
	ldr	x9, [x8]
	cmp	x9, x19
	b.ne	LBB0_5
; %bb.4:
	str	xzr, [x8]
Lloh10:
	adrp	x8, _stli_txcooksize@GOTPAGE
Lloh11:
	ldr	x8, [x8, _stli_txcooksize@GOTPAGEOFF]
Lloh12:
	str	xzr, [x8]
Lloh13:
	adrp	x8, _stli_txcookrealsize@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stli_txcookrealsize@GOTPAGEOFF]
Lloh15:
	str	xzr, [x8]
LBB0_5:
Lloh16:
	adrp	x8, _ST_CMDING@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ST_CMDING@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	add	x22, x20, #8
	mov	x1, x22
	bl	_test_bit
	cbz	x0, LBB0_7
; %bb.6:
Lloh19:
	adrp	x8, _ST_DOFLUSHTX@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ST_DOFLUSHTX@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_set_bit
	b	LBB0_10
LBB0_7:
Lloh22:
	adrp	x8, _FLUSHTX@GOTPAGE
Lloh23:
	ldr	x8, [x8, _FLUSHTX@GOTPAGEOFF]
Lloh24:
	ldr	x23, [x8]
	str	x23, [sp, #8]
Lloh25:
	adrp	x24, _ST_DOFLUSHRX@GOTPAGE
Lloh26:
	ldr	x24, [x24, _ST_DOFLUSHRX@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	x1, x22
	bl	_test_bit
	cbz	x0, LBB0_9
; %bb.8:
Lloh27:
	adrp	x8, _FLUSHRX@GOTPAGE
Lloh28:
	ldr	x8, [x8, _FLUSHRX@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	orr	x8, x23, x8
	str	x8, [sp, #8]
	ldr	w0, [x24]
	mov	x1, x22
	bl	_clear_bit
LBB0_9:
Lloh30:
	adrp	x8, _A_FLUSH@GOTPAGE
Lloh31:
	ldr	x8, [x8, _A_FLUSH@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	w4, #4
	mov	w5, #0
	bl	___stli_sendcmd
LBB0_10:
Lloh33:
	adrp	x0, _brd_lock@GOTPAGE
Lloh34:
	ldr	x0, [x0, _brd_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_tty_wakeup
LBB0_11:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_stli_nrbrds,8,3                ; @stli_nrbrds
	.comm	_stli_brds,8,3                  ; @stli_brds
	.comm	_brd_lock,4,2                   ; @brd_lock
	.comm	_stli_txcooktty,8,3             ; @stli_txcooktty
	.comm	_stli_txcooksize,8,3            ; @stli_txcooksize
	.comm	_stli_txcookrealsize,8,3        ; @stli_txcookrealsize
	.comm	_ST_CMDING,4,2                  ; @ST_CMDING
	.comm	_ST_DOFLUSHTX,4,2               ; @ST_DOFLUSHTX
	.comm	_FLUSHTX,8,3                    ; @FLUSHTX
	.comm	_ST_DOFLUSHRX,4,2               ; @ST_DOFLUSHRX
	.comm	_FLUSHRX,8,3                    ; @FLUSHRX
	.comm	_A_FLUSH,4,2                    ; @A_FLUSH
	.no_dead_strip	_stli_flushbuffer
.subsections_via_symbols
