	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vf_uart_bus_receive
_vf_uart_bus_receive:                   ## @vf_uart_bus_receive
	.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	%rdi, %r14
	leaq	24(%rdi), %rbx
	movl	8(%rdi), %edi
	callq	_uart_lock
	movq	_UART_S1@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_uart_getreg
	movq	_UART_S1_RDRF@GOTPCREL(%rip), %r12
	testl	%eax, (%r12)
	je	LBB0_5
## %bb.1:
	movq	_UART_D@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_uart_rx_full
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_uart_getreg
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_uart_rx_put
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_uart_getreg
	testl	%eax, (%r12)
	jne	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movq	_UART_STAT_OVERRUN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r14), %rcx
	movq	16(%r14), %rdx
	movl	%eax, (%rdx,%rcx,4)
LBB0_5:
	movq	_UART_C2@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_uart_getreg
	movq	_UART_C2_RIE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_uart_setreg
	movl	8(%r14), %edi
	callq	_uart_unlock
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UART_S1,4,2                    ## @UART_S1
	.comm	_UART_S1_RDRF,4,2               ## @UART_S1_RDRF
	.comm	_UART_STAT_OVERRUN,4,2          ## @UART_STAT_OVERRUN
	.comm	_UART_D,4,2                     ## @UART_D
	.comm	_UART_C2,4,2                    ## @UART_C2
	.comm	_UART_C2_RIE,4,2                ## @UART_C2_RIE
	.no_dead_strip	_vf_uart_bus_receive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vf_uart_bus_receive
_vf_uart_bus_receive:                   ; @vf_uart_bus_receive
	.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	x19, x0
	add	x20, x0, #24
	ldr	w0, [x0, #8]
	bl	_uart_lock
Lloh0:
	adrp	x21, _UART_S1@GOTPAGE
Lloh1:
	ldr	x21, [x21, _UART_S1@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_uart_getreg
Lloh2:
	adrp	x22, _UART_S1_RDRF@GOTPAGE
Lloh3:
	ldr	x22, [x22, _UART_S1_RDRF@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.1:
Lloh4:
	adrp	x23, _UART_D@GOTPAGE
Lloh5:
	ldr	x23, [x23, _UART_D@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_uart_rx_full
	cbnz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x23]
	mov	x0, x20
	bl	_uart_getreg
	mov	x1, x0
	mov	x0, x19
	bl	_uart_rx_put
	ldr	w1, [x21]
	mov	x0, x20
	bl	_uart_getreg
	ldr	w8, [x22]
	tst	w8, w0
	b.ne	LBB0_2
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _UART_STAT_OVERRUN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UART_STAT_OVERRUN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	x9, [x19, #16]
	ldr	x10, [x19]
	str	w8, [x9, x10, lsl #2]
LBB0_5:
Lloh9:
	adrp	x21, _UART_C2@GOTPAGE
Lloh10:
	ldr	x21, [x21, _UART_C2@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_uart_getreg
Lloh11:
	adrp	x8, _UART_C2_RIE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _UART_C2_RIE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x21]
	mov	x0, x20
	bl	_uart_setreg
	ldr	w0, [x19, #8]
	bl	_uart_unlock
	mov	w0, #0
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_UART_S1,4,2                    ; @UART_S1
	.comm	_UART_S1_RDRF,4,2               ; @UART_S1_RDRF
	.comm	_UART_STAT_OVERRUN,4,2          ; @UART_STAT_OVERRUN
	.comm	_UART_D,4,2                     ; @UART_D
	.comm	_UART_C2,4,2                    ; @UART_C2
	.comm	_UART_C2_RIE,4,2                ; @UART_C2_RIE
	.no_dead_strip	_vf_uart_bus_receive
.subsections_via_symbols
