	.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	%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	%rsi, %r14
	movq	%rdi, %r13
	movq	(%rdi), %rdx
	movq	8(%rdi), %rcx
	leaq	L_.str(%rip), %rsi
	callq	_debugl1
	cmpq	$0, 8(%r13)
	jle	LBB0_13
## %bb.1:
	movq	(%r13), %rax
	movl	$16, %ebx
	movq	_UART_TX@GOTPCREL(%rip), %r15
	movq	_MAX_MODEM_BUF@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	32(%r13), %rcx
	leaq	1(%rax), %rdx
	movq	%rdx, (%r13)
	movl	(%rcx,%rax,4), %edx
	movq	%r13, %rdi
	callq	_serial_outp
	movq	(%r13), %rax
	cmpq	(%r12), %rax
	jl	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, (%r13)
	xorl	%eax, %eax
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r13), %rcx
	leaq	-1(%rcx), %rdx
	movq	%rdx, 8(%r13)
	cmpq	$2, %rcx
	jl	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	-1(%rbx), %edx
	cmpl	$1, %ebx
	movl	%edx, %ebx
	ja	LBB0_2
LBB0_6:
	movq	_WAKEUP_CHARS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jg	LBB0_9
## %bb.7:
	cmpl	$2, 16(%r13)
	jne	LBB0_9
## %bb.8:
	movl	24(%r13), %edi
	callq	_modem_fill
LBB0_9:
	testq	%r14, %r14
	je	LBB0_11
## %bb.10:
	movl	$0, (%r14)
LBB0_11:
	cmpq	$0, 8(%r13)
	jle	LBB0_14
## %bb.12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_UART_IER_THRI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	20(%r13), %edx
	movl	%edx, 20(%r13)
	movq	_UART_IER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_serial_out                     ## TAILCALL
LBB0_14:
	movq	_UART_IER_THRI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	20(%r13), %edx
	movl	%edx, 20(%r13)
	movq	_UART_IER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_serial_outp                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"transmit_chars: p(%x) cnt(%x)"

	.comm	_UART_IER_THRI,4,2              ## @UART_IER_THRI
	.comm	_UART_IER,4,2                   ## @UART_IER
	.comm	_UART_TX,4,2                    ## @UART_TX
	.comm	_MAX_MODEM_BUF,8,3              ## @MAX_MODEM_BUF
	.comm	_WAKEUP_CHARS,8,3               ## @WAKEUP_CHARS
	.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	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
	mov	x20, x1
	mov	x19, x0
	ldp	x2, x3, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_debugl1
	ldr	x8, [x19, #8]
	cmp	x8, #1
	b.lt	LBB0_12
; %bb.1:
	ldr	x8, [x19]
	mov	w21, #16
Lloh2:
	adrp	x22, _UART_TX@GOTPAGE
Lloh3:
	ldr	x22, [x22, _UART_TX@GOTPAGEOFF]
Lloh4:
	adrp	x23, _MAX_MODEM_BUF@GOTPAGE
Lloh5:
	ldr	x23, [x23, _MAX_MODEM_BUF@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x19, #8]
	sub	x10, x9, #1
	str	x10, [x19, #8]
	cmp	x9, #2
	ccmp	w21, #1, #0, ge
	sub	w21, w21, #1
	b.ls	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	ldr	x9, [x19, #32]
	add	x10, x8, #1
	str	x10, [x19]
	ldr	w2, [x9, x8, lsl #2]
	mov	x0, x19
	bl	_serial_outp
	ldr	x8, [x19]
	ldr	x9, [x23]
	cmp	x8, x9
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x8, #0
	str	xzr, [x19]
	b	LBB0_2
LBB0_5:
Lloh6:
	adrp	x8, _WAKEUP_CHARS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WAKEUP_CHARS@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x9, x8
	b.gt	LBB0_8
; %bb.6:
	ldr	w8, [x19, #16]
	cmp	w8, #2
	b.ne	LBB0_8
; %bb.7:
	ldr	w0, [x19, #24]
	bl	_modem_fill
LBB0_8:
	cbz	x20, LBB0_10
; %bb.9:
	str	wzr, [x20]
LBB0_10:
	ldr	x8, [x19, #8]
	cmp	x8, #0
	b.le	LBB0_13
; %bb.11:
	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
LBB0_12:
Lloh9:
	adrp	x8, _UART_IER_THRI@GOTPAGE
Lloh10:
	ldr	x8, [x8, _UART_IER_THRI@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x19, #20]
	bic	w2, w9, w8
	str	w2, [x19, #20]
Lloh12:
	adrp	x8, _UART_IER@GOTPAGE
Lloh13:
	ldr	x8, [x8, _UART_IER@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	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
	b	_serial_out
LBB0_13:
Lloh15:
	adrp	x8, _UART_IER_THRI@GOTPAGE
Lloh16:
	ldr	x8, [x8, _UART_IER_THRI@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x19, #20]
	bic	w2, w9, w8
	str	w2, [x19, #20]
Lloh18:
	adrp	x8, _UART_IER@GOTPAGE
Lloh19:
	ldr	x8, [x8, _UART_IER@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	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
	b	_serial_outp
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"transmit_chars: p(%x) cnt(%x)"

	.comm	_UART_IER_THRI,4,2              ; @UART_IER_THRI
	.comm	_UART_IER,4,2                   ; @UART_IER
	.comm	_UART_TX,4,2                    ; @UART_TX
	.comm	_MAX_MODEM_BUF,8,3              ; @MAX_MODEM_BUF
	.comm	_WAKEUP_CHARS,8,3               ; @WAKEUP_CHARS
	.no_dead_strip	_transmit_chars
.subsections_via_symbols
