	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function transmit_chars_pio
_transmit_chars_pio:                    ## @transmit_chars_pio
	.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
	movl	%esi, %r15d
	movq	%rdi, %r13
	xorl	%eax, %eax
	callq	_get_pio_buffer
	testq	%rax, %rax
	je	LBB0_24
## %bb.1:
	movq	%rax, %r14
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.3:
	movl	(%r13), %eax
	movq	_ESP_XMIT_SIZE@GOTPCREL(%rip), %rbx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$0, (%r13)
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_UART_ESI_CMD1@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movq	_ESI_NO_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_serial_out
	movq	(%rbx), %rsi
	movq	_ESI_GET_TX_AVAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_serial_out
	movq	_UART_ESI_STAT1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_serial_in
	movl	%eax, %r12d
	shll	$8, %r12d
	movq	_UART_ESI_STAT2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_serial_in
	movl	%eax, %r15d
	orl	%r12d, %r15d
	movl	(%r13), %eax
	cmpl	%eax, %r15d
	cmovgel	%eax, %r15d
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_ESP_XMIT_SIZE@GOTPCREL(%rip), %rbx
	testl	%r15d, %r15d
	je	LBB0_18
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movslq	4(%r13), %rsi
	leal	(%rsi,%r15), %eax
	movl	(%rbx), %r12d
	cmpl	%r12d, %eax
	jle	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	subl	%esi, %r12d
	movq	(%r14), %rdi
	shlq	$2, %rsi
	addq	32(%r13), %rsi
	movl	%r12d, %edx
	callq	_memcpy
	movslq	%r12d, %rax
	leaq	(,%rax,4), %rdi
	addq	(%r14), %rdi
	movq	32(%r13), %rsi
	movl	%r15d, %edx
	subl	%eax, %edx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rdi
	shlq	$2, %rsi
	addq	32(%r13), %rsi
	movl	%r15d, %edx
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	callq	_memcpy
	subl	%r15d, (%r13)
	movl	4(%r13), %eax
	addl	%r15d, %eax
	movl	(%rbx), %ecx
	decl	%ecx
	andl	%eax, %ecx
	movl	%ecx, 4(%r13)
	leal	-1(%r15), %r12d
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	cmpl	$2, %r15d
	movq	_UART_ESI_TX@GOTPCREL(%rip), %r15
	jl	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r14), %rax
	movzwl	(%rax,%rbx,4), %edi
	movq	(%r15), %rsi
	addq	24(%r13), %rsi
	callq	_outw
	addq	$2, %rbx
	cmpl	%ebx, %r12d
	jg	LBB0_11
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	testb	$1, %r15b
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_UART_ESI_TX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	(%r14), %rax
	movslq	%r12d, %rcx
	movl	(%rax,%rcx,4), %edx
	movq	%r13, %rdi
	callq	_serial_out
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	(%r13), %eax
	jmp	LBB0_18
LBB0_5:
	xorl	%eax, %eax
LBB0_18:
	movq	_WAKEUP_CHARS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_23
## %bb.19:
	movq	16(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.20:
	callq	_tty_wakeup
	movl	(%r13), %eax
LBB0_21:
	testl	%eax, %eax
	jg	LBB0_23
## %bb.22:
	movq	_UART_IER_THRI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 8(%r13)
	movq	_UART_ESI_CMD1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_ESI_SET_SRV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_serial_out
	movq	_UART_ESI_CMD2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	8(%r13), %edx
	movq	%r13, %rdi
	callq	_serial_out
LBB0_23:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_release_pio_buffer             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ESP_XMIT_SIZE,4,2              ## @ESP_XMIT_SIZE
	.comm	_UART_ESI_TX,8,3                ## @UART_ESI_TX
	.comm	_UART_ESI_CMD1,8,3              ## @UART_ESI_CMD1
	.comm	_ESI_NO_COMMAND,4,2             ## @ESI_NO_COMMAND
	.comm	_ESI_GET_TX_AVAIL,4,2           ## @ESI_GET_TX_AVAIL
	.comm	_UART_ESI_STAT1,4,2             ## @UART_ESI_STAT1
	.comm	_UART_ESI_STAT2,4,2             ## @UART_ESI_STAT2
	.comm	_WAKEUP_CHARS,4,2               ## @WAKEUP_CHARS
	.comm	_UART_IER_THRI,4,2              ## @UART_IER_THRI
	.comm	_ESI_SET_SRV_MASK,4,2           ## @ESI_SET_SRV_MASK
	.comm	_UART_ESI_CMD2,8,3              ## @UART_ESI_CMD2
	.no_dead_strip	_transmit_chars_pio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function transmit_chars_pio
_transmit_chars_pio:                    ; @transmit_chars_pio
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x20, x0
	bl	_get_pio_buffer
	cbz	x0, LBB0_15
; %bb.1:
	mov	x19, x0
	cbz	w21, LBB0_16
; %bb.2:
	ldr	w8, [x20]
Lloh0:
	adrp	x23, _ESP_XMIT_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ESP_XMIT_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x24, _UART_ESI_TX@GOTPAGE
Lloh3:
	ldr	x24, [x24, _UART_ESI_TX@GOTPAGEOFF]
Lloh4:
	adrp	x25, _UART_ESI_CMD1@GOTPAGE
Lloh5:
	ldr	x25, [x25, _UART_ESI_CMD1@GOTPAGEOFF]
Lloh6:
	adrp	x26, _UART_ESI_STAT2@GOTPAGE
Lloh7:
	ldr	x26, [x26, _UART_ESI_STAT2@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	cbz	w21, LBB0_17
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	cbz	w8, LBB0_17
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrsw	x8, [x20, #4]
	ldr	w9, [x23]
	add	w10, w8, w21
	cmp	w10, w9
	b.le	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w22, w9, w8
	ldr	x0, [x19]
	ldr	x9, [x20, #32]
	add	x1, x9, x8, lsl #2
	mov	x2, x22
	bl	_memcpy
	ldr	x8, [x19]
	add	x0, x8, w22, sxtw #2
	ldr	x1, [x20, #32]
	sub	w2, w21, w22
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19]
	ldr	x9, [x20, #32]
	add	x1, x9, x8, lsl #2
	mov	x2, x21
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_memcpy
	ldp	w8, w9, [x20]
	sub	w8, w8, w21
	str	w8, [x20]
	ldr	w8, [x23]
	sub	w8, w8, #1
	add	w9, w9, w21
	and	w8, w8, w9
	str	w8, [x20, #4]
	sub	w22, w21, #1
	cmp	w21, #2
	b.lt	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w27, #0
	mov	x28, #0
LBB0_10:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19]
	ldrh	w0, [x8, x28]
	ldr	x8, [x20, #24]
	ldr	x9, [x24]
	add	x1, x9, x8
	bl	_outw
	add	x28, x28, #8
	add	w27, w27, #2
	cmp	w22, w27
	b.gt	LBB0_10
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	tbz	w21, #0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [x24]
	ldr	x8, [x19]
	ldr	w2, [x8, w22, sxtw #2]
	mov	x0, x20
	bl	_serial_out
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x20]
	cbz	w8, LBB0_3
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [x25]
Lloh8:
	adrp	x8, _ESI_NO_COMMAND@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ESI_NO_COMMAND@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_serial_out
	ldr	x1, [x25]
Lloh11:
	adrp	x8, _ESI_GET_TX_AVAIL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ESI_GET_TX_AVAIL@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_serial_out
Lloh14:
	adrp	x8, _UART_ESI_STAT1@GOTPAGE
Lloh15:
	ldr	x8, [x8, _UART_ESI_STAT1@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_serial_in
	mov	x21, x0
	ldr	w1, [x26]
	mov	x0, x20
	bl	_serial_in
	orr	w9, w0, w21, lsl #8
	ldr	w8, [x20]
	cmp	w9, w8
	csel	w21, w9, w8, lt
	b	LBB0_3
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_16:
	ldr	w8, [x20]
LBB0_17:
Lloh17:
	adrp	x9, _WAKEUP_CHARS@GOTPAGE
Lloh18:
	ldr	x9, [x9, _WAKEUP_CHARS@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_22
; %bb.18:
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_20
; %bb.19:
	bl	_tty_wakeup
	ldr	w8, [x20]
LBB0_20:
	cmp	w8, #0
	b.gt	LBB0_22
; %bb.21:
Lloh20:
	adrp	x8, _UART_IER_THRI@GOTPAGE
Lloh21:
	ldr	x8, [x8, _UART_IER_THRI@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	bic	w8, w9, w8
	str	w8, [x20, #8]
Lloh23:
	adrp	x8, _UART_ESI_CMD1@GOTPAGE
Lloh24:
	ldr	x8, [x8, _UART_ESI_CMD1@GOTPAGEOFF]
Lloh25:
	ldr	x1, [x8]
Lloh26:
	adrp	x8, _ESI_SET_SRV_MASK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ESI_SET_SRV_MASK@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_serial_out
Lloh29:
	adrp	x8, _UART_ESI_CMD2@GOTPAGE
Lloh30:
	ldr	x8, [x8, _UART_ESI_CMD2@GOTPAGEOFF]
Lloh31:
	ldr	x1, [x8]
	ldr	w2, [x20, #8]
	mov	x0, x20
	bl	_serial_out
LBB0_22:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_release_pio_buffer
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ESP_XMIT_SIZE,4,2              ; @ESP_XMIT_SIZE
	.comm	_UART_ESI_TX,8,3                ; @UART_ESI_TX
	.comm	_UART_ESI_CMD1,8,3              ; @UART_ESI_CMD1
	.comm	_ESI_NO_COMMAND,4,2             ; @ESI_NO_COMMAND
	.comm	_ESI_GET_TX_AVAIL,4,2           ; @ESI_GET_TX_AVAIL
	.comm	_UART_ESI_STAT1,4,2             ; @UART_ESI_STAT1
	.comm	_UART_ESI_STAT2,4,2             ; @UART_ESI_STAT2
	.comm	_WAKEUP_CHARS,4,2               ; @WAKEUP_CHARS
	.comm	_UART_IER_THRI,4,2              ; @UART_IER_THRI
	.comm	_ESI_SET_SRV_MASK,4,2           ; @ESI_SET_SRV_MASK
	.comm	_UART_ESI_CMD2,8,3              ; @UART_ESI_CMD2
	.no_dead_strip	_transmit_chars_pio
.subsections_via_symbols
