	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function transmit_chars
_transmit_chars:                        ## @transmit_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	_IF_TBE@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	_custom@GOTPCREL(%rip), %r14
	movq	%rax, 16(%r14)
	xorl	%eax, %eax
	callq	_mb
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	orl	$256, %eax                      ## imm = 0x100
	movl	%eax, (%r14)
	xorl	%eax, %eax
	callq	_mb
	movq	24(%rbx), %rax
	incl	(%rax)
	movl	$0, (%rbx)
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movslq	12(%rbx), %rax
	cmpl	%eax, 8(%rbx)
	je	LBB0_10
## %bb.3:
	movq	32(%rbx), %rcx
	cmpq	$0, 8(%rcx)
	jne	LBB0_10
## %bb.4:
	cmpq	$0, (%rcx)
	je	LBB0_5
LBB0_10:
	movq	_UART_IER_THRI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 4(%rbx)
	movq	(%r15), %rax
	movq	%rax, 8(%r14)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mb                             ## TAILCALL
LBB0_5:
	movq	16(%rbx), %rcx
	leal	1(%rax), %edx
	movl	%edx, 12(%rbx)
	movl	$256, %edx                      ## imm = 0x100
	orl	(%rcx,%rax,4), %edx
	movl	%edx, (%r14)
	xorl	%eax, %eax
	callq	_mb
	movq	_SERIAL_XMIT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	decl	%esi
	andl	12(%rbx), %esi
	movl	%esi, 12(%rbx)
	movq	24(%rbx), %rcx
	incl	(%rcx)
	movl	8(%rbx), %edi
	movl	(%rax), %edx
	callq	_CIRC_CNT
	movq	_WAKEUP_CHARS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_7
## %bb.6:
	movq	_RS_EVENT_WRITE_WAKEUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rs_sched_event
LBB0_7:
	movl	8(%rbx), %eax
	cmpl	12(%rbx), %eax
	jne	LBB0_9
## %bb.8:
	movq	(%r15), %rax
	movq	%rax, 8(%r14)
	xorl	%eax, %eax
	callq	_mb
	movq	_UART_IER_THRI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 4(%rbx)
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_IF_TBE,8,3                     ## @IF_TBE
	.comm	_custom,24,3                    ## @custom
	.comm	_UART_IER_THRI,4,2              ## @UART_IER_THRI
	.comm	_SERIAL_XMIT_SIZE,4,2           ## @SERIAL_XMIT_SIZE
	.comm	_WAKEUP_CHARS,8,3               ## @WAKEUP_CHARS
	.comm	_RS_EVENT_WRITE_WAKEUP,4,2      ## @RS_EVENT_WRITE_WAKEUP
	.no_dead_strip	_transmit_chars
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function transmit_chars
_transmit_chars:                        ; @transmit_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	x19, x0
Lloh0:
	adrp	x21, _IF_TBE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _IF_TBE@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh2:
	adrp	x20, _custom@GOTPAGE
Lloh3:
	ldr	x20, [x20, _custom@GOTPAGEOFF]
	str	x8, [x20, #16]
	bl	_mb
	ldr	w8, [x19]
	cbz	w8, LBB0_3
; %bb.1:
	orr	w8, w8, #0x100
	str	w8, [x20]
	bl	_mb
	ldr	x8, [x19, #24]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	str	wzr, [x19]
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:
	ldp	w9, w8, [x19, #8]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	cmp	w9, w8
	b.eq	LBB0_6
; %bb.4:
	ldr	x9, [x19, #32]
	ldr	x10, [x9, #8]
	cbnz	x10, LBB0_6
; %bb.5:
	ldr	x9, [x9]
	cbz	x9, LBB0_7
LBB0_6:
Lloh4:
	adrp	x8, _UART_IER_THRI@GOTPAGE
Lloh5:
	ldr	x8, [x8, _UART_IER_THRI@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	bic	w8, w9, w8
	str	w8, [x19, #4]
	ldr	x8, [x21]
	str	x8, [x20, #8]
	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	_mb
LBB0_7:
	ldr	x9, [x19, #16]
	add	w10, w8, #1
	str	w10, [x19, #12]
	ldr	w8, [x9, x8, lsl #2]
	orr	w8, w8, #0x100
	str	w8, [x20]
	bl	_mb
Lloh7:
	adrp	x8, _SERIAL_XMIT_SIZE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SERIAL_XMIT_SIZE@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, #1
	ldp	w0, w10, [x19, #8]
	and	w1, w9, w10
	str	w1, [x19, #12]
	ldr	x9, [x19, #24]
	ldr	w10, [x9]
	add	w10, w10, #1
	str	w10, [x9]
	ldr	w2, [x8]
	bl	_CIRC_CNT
Lloh9:
	adrp	x8, _WAKEUP_CHARS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WAKEUP_CHARS@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_9
; %bb.8:
Lloh12:
	adrp	x8, _RS_EVENT_WRITE_WAKEUP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RS_EVENT_WRITE_WAKEUP@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rs_sched_event
LBB0_9:
	ldp	w8, w9, [x19, #8]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.10:
	ldr	x8, [x21]
	str	x8, [x20, #8]
	bl	_mb
Lloh15:
	adrp	x8, _UART_IER_THRI@GOTPAGE
Lloh16:
	ldr	x8, [x8, _UART_IER_THRI@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	bic	w8, w9, w8
	str	w8, [x19, #4]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_IF_TBE,8,3                     ; @IF_TBE
	.comm	_custom,24,3                    ; @custom
	.comm	_UART_IER_THRI,4,2              ; @UART_IER_THRI
	.comm	_SERIAL_XMIT_SIZE,4,2           ; @SERIAL_XMIT_SIZE
	.comm	_WAKEUP_CHARS,8,3               ; @WAKEUP_CHARS
	.comm	_RS_EVENT_WRITE_WAKEUP,4,2      ; @RS_EVENT_WRITE_WAKEUP
	.no_dead_strip	_transmit_chars
.subsections_via_symbols
