	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxser_put_char
_mxser_put_char:                        ## @mxser_put_char
	.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	8(%rdi), %rbx
	xorl	%r15d, %r15d
	cmpq	$0, 40(%rbx)
	je	LBB0_7
## %bb.1:
	movq	_SERIAL_XMIT_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	decl	%eax
	cmpl	%eax, (%rbx)
	jge	LBB0_7
## %bb.2:
	movl	%esi, %r12d
	movq	%rdi, %r13
	leaq	20(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	40(%rbx), %rax
	movslq	4(%rbx), %rcx
	leal	1(%rcx), %edx
	movl	%edx, 4(%rbx)
	movb	%r12b, (%rax,%rcx)
	movl	(%r14), %eax
	movq	%r15, %r14
	decl	%eax
	andl	%eax, 4(%rbx)
	incl	(%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movl	$1, %r15d
	cmpl	$0, 4(%r13)
	jne	LBB0_7
## %bb.3:
	cmpl	$0, (%r13)
	je	LBB0_6
## %bb.4:
	movq	8(%rbx), %rax
	movq	_PORT_16550A@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	32(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
LBB0_6:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %r13
	movq	_UART_IER_THRI@GOTPCREL(%rip), %r14
	movl	(%r14), %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	(%r14), %edi
	movl	%edi, 16(%rbx)
	movq	(%r12), %rsi
	addq	24(%rbx), %rsi
	callq	_outb
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SERIAL_XMIT_SIZE,4,2           ## @SERIAL_XMIT_SIZE
	.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_put_char
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxser_put_char
_mxser_put_char:                        ; @mxser_put_char
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x22, [x0, #8]
	ldr	x8, [x22, #40]
	cbz	x8, LBB0_8
; %bb.1:
	ldr	w8, [x22]
Lloh0:
	adrp	x23, _SERIAL_XMIT_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SERIAL_XMIT_SIZE@GOTPAGEOFF]
	ldr	w9, [x23]
	sub	w9, w9, #1
	cmp	w8, w9
	b.ge	LBB0_8
; %bb.2:
	mov	x21, x1
	mov	x20, x0
	add	x19, x22, #20
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x22, #40]
	ldrsw	x9, [x22, #4]
	add	w10, w9, #1
	str	w10, [x22, #4]
	strb	w21, [x8, x9]
	ldr	w8, [x23]
	sub	w8, w8, #1
	ldp	w10, w9, [x22]
	and	w8, w9, w8
	add	w9, w10, #1
	stp	w9, w8, [x22]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_7
; %bb.3:
	ldr	w8, [x20]
	cbz	w8, LBB0_6
; %bb.4:
	ldr	x8, [x22, #8]
Lloh2:
	adrp	x9, _PORT_16550A@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PORT_16550A@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.5:
	ldr	x8, [x22, #32]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x22, #16]
Lloh5:
	adrp	x20, _UART_IER_THRI@GOTPAGE
Lloh6:
	ldr	x20, [x20, _UART_IER_THRI@GOTPAGEOFF]
	ldr	w9, [x20]
	bic	w0, w8, w9
	ldr	x8, [x22, #24]
Lloh7:
	adrp	x21, _UART_IER@GOTPAGE
Lloh8:
	ldr	x21, [x21, _UART_IER@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_outb
	ldr	w8, [x20]
	ldr	w9, [x22, #16]
	orr	w0, w9, w8
	str	w0, [x22, #16]
	ldr	x8, [x22, #24]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_outb
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_7:
	mov	w0, #1
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SERIAL_XMIT_SIZE,4,2           ; @SERIAL_XMIT_SIZE
	.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_put_char
.subsections_via_symbols
