	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxser_flush_chars
_mxser_flush_chars:                     ## @mxser_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %rbx
	cmpq	$0, (%rbx)
	jle	LBB0_6
## %bb.1:
	cmpq	$0, 8(%rdi)
	je	LBB0_2
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	cmpl	$0, 40(%rbx)
	je	LBB0_6
## %bb.3:
	cmpq	$0, (%rdi)
	je	LBB0_7
## %bb.4:
	movq	8(%rbx), %rax
	movq	_PORT_16550A@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.5:
	movq	32(%rbx), %rax
	cmpl	$0, (%rax)
	je	LBB0_6
LBB0_7:
	leaq	20(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_UART_IER_THRI@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	notl	%edi
	andl	16(%rbx), %edi
	movq	_UART_IER@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	24(%rbx), %rsi
	callq	_outb
	movl	16(%rbx), %edi
	orl	(%r15), %edi
	movl	%edi, 16(%rbx)
	movq	(%r12), %rsi
	addq	24(%rbx), %rsi
	callq	_outb
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PORT_16550A,8,3                ## @PORT_16550A
	.comm	_UART_IER_THRI,4,2              ## @UART_IER_THRI
	.comm	_UART_IER,8,3                   ## @UART_IER
	.no_dead_strip	_mxser_flush_chars
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxser_flush_chars
_mxser_flush_chars:                     ; @mxser_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
	ldr	x20, [x0, #16]
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.1:
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_3
LBB0_2:
	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_3:
	ldr	w8, [x20, #40]
	cbz	w8, LBB0_2
; %bb.4:
	ldr	x8, [x0]
	cbz	x8, LBB0_7
; %bb.5:
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x9, _PORT_16550A@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PORT_16550A@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.6:
	ldr	x8, [x20, #32]
	ldr	w8, [x8]
	cbz	w8, LBB0_2
LBB0_7:
	add	x19, x20, #20
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x20, #16]
Lloh3:
	adrp	x21, _UART_IER_THRI@GOTPAGE
Lloh4:
	ldr	x21, [x21, _UART_IER_THRI@GOTPAGEOFF]
	ldr	w9, [x21]
	bic	w0, w8, w9
	ldr	x8, [x20, #24]
Lloh5:
	adrp	x22, _UART_IER@GOTPAGE
Lloh6:
	ldr	x22, [x22, _UART_IER@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_outb
	ldr	w8, [x21]
	ldr	w9, [x20, #16]
	orr	w0, w9, w8
	str	w0, [x20, #16]
	ldr	x8, [x20, #24]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_outb
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PORT_16550A,8,3                ; @PORT_16550A
	.comm	_UART_IER_THRI,4,2              ; @UART_IER_THRI
	.comm	_UART_IER,8,3                   ; @UART_IER
	.no_dead_strip	_mxser_flush_chars
.subsections_via_symbols
