	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uart_readable
_uart_readable:                         ## @uart_readable
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_buffer_valid@GOTPCREL(%rip), %r14
	movl	$1, %ebx
	cmpl	$0, (%r14)
	jne	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_uart_data_read
	movq	_ALTERA_JTAG_UART_DATA_RVALID@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.2:
	movl	$1, (%r14)
	movq	_ALTERA_JTAG_UART_DATA_DATA@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_buffer_data@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_3:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_buffer_valid,4,2               ## @buffer_valid
	.comm	_ALTERA_JTAG_UART_DATA_RVALID,4,2 ## @ALTERA_JTAG_UART_DATA_RVALID
	.comm	_ALTERA_JTAG_UART_DATA_DATA,4,2 ## @ALTERA_JTAG_UART_DATA_DATA
	.comm	_buffer_data,4,2                ## @buffer_data
	.no_dead_strip	_uart_readable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uart_readable
_uart_readable:                         ; @uart_readable
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _buffer_valid@GOTPAGE
Lloh1:
	ldr	x19, [x19, _buffer_valid@GOTPAGEOFF]
	ldr	w8, [x19]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_5
LBB0_2:
	bl	_uart_data_read
Lloh2:
	adrp	x9, _ALTERA_JTAG_UART_DATA_RVALID@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ALTERA_JTAG_UART_DATA_RVALID@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w0
	b.eq	LBB0_4
; %bb.3:
	mov	x8, x0
	mov	w0, #0
	mov	w9, #1
Lloh5:
	adrp	x10, _ALTERA_JTAG_UART_DATA_DATA@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ALTERA_JTAG_UART_DATA_DATA@GOTPAGEOFF]
	str	w9, [x19]
Lloh7:
	ldr	w9, [x10]
	and	w8, w9, w8
Lloh8:
	adrp	x9, _buffer_data@GOTPAGE
Lloh9:
	ldr	x9, [x9, _buffer_data@GOTPAGEOFF]
Lloh10:
	str	w8, [x9]
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_buffer_valid,4,2               ; @buffer_valid
	.comm	_ALTERA_JTAG_UART_DATA_RVALID,4,2 ; @ALTERA_JTAG_UART_DATA_RVALID
	.comm	_ALTERA_JTAG_UART_DATA_DATA,4,2 ; @ALTERA_JTAG_UART_DATA_DATA
	.comm	_buffer_data,4,2                ; @buffer_data
	.no_dead_strip	_uart_readable
.subsections_via_symbols
