	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rs_flush_chars
_rs_flush_chars:                        ## @rs_flush_chars
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	movl	8(%rdi), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_serial_paranoia_check
	testq	%rax, %rax
	je	LBB0_1
## %bb.7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	12(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, (%r15)
	jle	LBB0_6
## %bb.2:
	cmpq	$0, (%rbx)
	je	LBB0_3
LBB0_6:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_3:
	cmpl	$0, 16(%r15)
	je	LBB0_6
## %bb.4:
	movl	8(%r15), %eax
	movq	_UART_IER_THRI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	jne	LBB0_6
## %bb.5:
	orl	%eax, %ecx
	movl	%ecx, 8(%r15)
	movq	_UART_ESI_CMD1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ESI_SET_SRV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_serial_out
	movq	_UART_ESI_CMD2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r15), %edx
	movq	%r15, %rdi
	callq	_serial_out
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rs_flush_chars"

	.comm	_UART_IER_THRI,4,2              ## @UART_IER_THRI
	.comm	_UART_ESI_CMD1,4,2              ## @UART_ESI_CMD1
	.comm	_ESI_SET_SRV_MASK,4,2           ## @ESI_SET_SRV_MASK
	.comm	_UART_ESI_CMD2,4,2              ## @UART_ESI_CMD2
	.no_dead_strip	_rs_flush_chars
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rs_flush_chars
_rs_flush_chars:                        ; @rs_flush_chars
	.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	x21, x0
	ldr	x19, [x0, #16]
	ldr	w1, [x0, #8]
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_serial_paranoia_check
	cbz	x0, LBB0_2
; %bb.1:
	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
	ret
LBB0_2:
	add	x20, x19, #12
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x19]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.3:
	ldr	x8, [x21]
	cbz	x8, LBB0_5
LBB0_4:
	mov	x0, 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	_spin_unlock_irqrestore
LBB0_5:
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_4
; %bb.6:
	ldr	w8, [x19, #8]
Lloh2:
	adrp	x9, _UART_IER_THRI@GOTPAGE
Lloh3:
	ldr	x9, [x9, _UART_IER_THRI@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.7:
	orr	w8, w9, w8
	str	w8, [x19, #8]
Lloh5:
	adrp	x8, _UART_ESI_CMD1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _UART_ESI_CMD1@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _ESI_SET_SRV_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ESI_SET_SRV_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_serial_out
Lloh11:
	adrp	x8, _UART_ESI_CMD2@GOTPAGE
Lloh12:
	ldr	x8, [x8, _UART_ESI_CMD2@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
	mov	x0, x19
	bl	_serial_out
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rs_flush_chars"

	.comm	_UART_IER_THRI,4,2              ; @UART_IER_THRI
	.comm	_UART_ESI_CMD1,4,2              ; @UART_ESI_CMD1
	.comm	_ESI_SET_SRV_MASK,4,2           ; @ESI_SET_SRV_MASK
	.comm	_UART_ESI_CMD2,4,2              ; @UART_ESI_CMD2
	.no_dead_strip	_rs_flush_chars
.subsections_via_symbols
