	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpc_uart_io_handler
_lpc_uart_io_handler:                   ## @lpc_uart_io_handler
	.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	%r9, %r14
	movl	%ecx, %ebx
	movq	16(%rbp), %r15
	subl	(%r15), %ebx
	cmpl	$2, %r8d
	je	LBB0_5
## %bb.1:
	movl	$-1, %eax
	cmpl	$1, %r8d
	jne	LBB0_10
## %bb.2:
	movl	4(%r15), %edi
	testl	%edx, %edx
	je	LBB0_4
## %bb.3:
	movl	%ebx, %esi
	callq	_uart_read
	movl	%eax, (%r14)
	jmp	LBB0_9
LBB0_5:
	movl	4(%r15), %edi
	testl	%edx, %edx
	je	LBB0_7
## %bb.6:
	movl	%ebx, %esi
	callq	_uart_read
	movl	%eax, (%r14)
	movl	4(%r15), %edi
	incl	%ebx
	movl	%ebx, %esi
	callq	_uart_read
	shll	$8, %eax
	orl	%eax, (%r14)
	jmp	LBB0_9
LBB0_4:
	movl	(%r14), %edx
	jmp	LBB0_8
LBB0_7:
	movl	(%r14), %edx
	movl	%ebx, %esi
	callq	_uart_write
	movl	4(%r15), %edi
	incl	%ebx
	movl	(%r14), %edx
	sarl	$8, %edx
LBB0_8:
	movl	%ebx, %esi
	callq	_uart_write
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_lpc_uart_io_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpc_uart_io_handler
_lpc_uart_io_handler:                   ; @lpc_uart_io_handler
	.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	x21, x6
	mov	x19, x5
	ldr	w8, [x6]
	sub	w20, w3, w8
	cmp	w4, #2
	b.eq	LBB0_4
; %bb.1:
	cmp	w4, #1
	b.ne	LBB0_6
; %bb.2:
	ldr	w0, [x21, #4]
	cbz	w2, LBB0_7
; %bb.3:
	mov	x1, x20
	bl	_uart_read
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_10
LBB0_4:
	ldr	w0, [x21, #4]
	cbz	w2, LBB0_8
; %bb.5:
	mov	x1, x20
	bl	_uart_read
	str	w0, [x19]
	ldr	w0, [x21, #4]
	add	w1, w20, #1
	bl	_uart_read
	mov	x8, x0
	mov	w0, #0
	ldr	w9, [x19]
	orr	w8, w9, w8, lsl #8
	str	w8, [x19]
	b	LBB0_10
LBB0_6:
	mov	w0, #-1
	b	LBB0_10
LBB0_7:
	ldr	w2, [x19]
	mov	x1, x20
	b	LBB0_9
LBB0_8:
	ldr	w2, [x19]
	mov	x1, x20
	bl	_uart_write
	ldr	w0, [x21, #4]
	add	w1, w20, #1
	ldr	w8, [x19]
	asr	w2, w8, #8
LBB0_9:
	bl	_uart_write
	mov	w0, #0
LBB0_10:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_lpc_uart_io_handler
.subsections_via_symbols
