	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbbc_uart_bus_receive
_sbbc_uart_bus_receive:                 ## @sbbc_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	24(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	28(%rdi), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	8(%rdi), %edi
	movl	24(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	callq	_uart_lock
	movq	_sbbc_solcons@GOTPCREL(%rip), %rbx
	movq	(%rbx), %r14
	movq	_cons_in_end@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SBBC_CONS_OFF
	addq	%rax, %r14
	movq	%r14, %rdi
	callq	_SBBC_SRAM_READ_4
	movq	%rax, %r13
	movq	(%rbx), %r14
	movq	_cons_in_rdptr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SBBC_CONS_OFF
	addq	%rax, %r14
	movq	%r14, %rdi
	callq	_SBBC_SRAM_READ_4
	movq	%rax, %r14
	movq	(%rbx), %r15
	movq	_cons_in_wrptr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SBBC_CONS_OFF
	addq	%rax, %r15
	movq	%r15, %rdi
	callq	_SBBC_SRAM_READ_4
	cmpq	%rax, %r14
	je	LBB0_8
## %bb.1:
	movq	%rax, %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r15, %r14
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_uart_rx_full
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rdi
	addq	%r14, %rdi
	callq	_SBBC_SRAM_READ_1
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_uart_rx_put
	incq	%r14
	cmpq	%r13, %r14
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %r14
	movq	(%rbx), %rbx
	movq	_cons_in_begin@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SBBC_CONS_OFF
	addq	%rax, %rbx
	movq	%rbx, %rdi
	movq	%r14, %rbx
	callq	_SBBC_SRAM_READ_4
	movq	%rax, %r14
	jmp	LBB0_6
LBB0_7:
	movq	%r15, %r14
	jmp	LBB0_8
LBB0_3:
	movq	_UART_STAT_OVERRUN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r12), %rcx
	movq	16(%r12), %rdx
	movl	%eax, (%rdx,%rcx,4)
LBB0_8:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_uart_barrier
	movq	(%rbx), %rbx
	movq	_cons_in_rdptr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SBBC_CONS_OFF
	addq	%rax, %rbx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_SBBC_SRAM_WRITE_4
	movq	%r15, %rdi
	callq	_uart_barrier
	movq	_sbbc_solscir@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_SBBC_SRAM_READ_4
	movq	_SBBC_SRAM_CONS_SPACE_IN@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_SBBC_SRAM_WRITE_4
	movq	%r15, %rdi
	callq	_uart_barrier
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_sbbc_send_intr
	movl	8(%r12), %edi
	callq	_uart_unlock
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sbbc_solcons,8,3               ## @sbbc_solcons
	.comm	_cons_in_end,4,2                ## @cons_in_end
	.comm	_cons_in_rdptr,4,2              ## @cons_in_rdptr
	.comm	_cons_in_wrptr,4,2              ## @cons_in_wrptr
	.comm	_UART_STAT_OVERRUN,4,2          ## @UART_STAT_OVERRUN
	.comm	_cons_in_begin,4,2              ## @cons_in_begin
	.comm	_sbbc_solscir,8,3               ## @sbbc_solscir
	.comm	_SBBC_SRAM_CONS_SPACE_IN,8,3    ## @SBBC_SRAM_CONS_SPACE_IN
	.no_dead_strip	_sbbc_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 sbbc_uart_bus_receive
_sbbc_uart_bus_receive:                 ; @sbbc_uart_bus_receive
	.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	x19, x0
	mov	x22, x0
	ldp	w20, w21, [x22, #24]!
	ldur	w0, [x22, #-16]
	bl	_uart_lock
Lloh0:
	adrp	x26, _sbbc_solcons@GOTPAGE
Lloh1:
	ldr	x26, [x26, _sbbc_solcons@GOTPAGEOFF]
	ldr	x23, [x26]
Lloh2:
	adrp	x8, _cons_in_end@GOTPAGE
Lloh3:
	ldr	x8, [x8, _cons_in_end@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_SBBC_CONS_OFF
	add	x0, x0, x23
	bl	_SBBC_SRAM_READ_4
	mov	x24, x0
	ldr	x23, [x26]
Lloh5:
	adrp	x27, _cons_in_rdptr@GOTPAGE
Lloh6:
	ldr	x27, [x27, _cons_in_rdptr@GOTPAGEOFF]
	ldr	w0, [x27]
	bl	_SBBC_CONS_OFF
	add	x0, x0, x23
	bl	_SBBC_SRAM_READ_4
	mov	x23, x0
	ldr	x25, [x26]
Lloh7:
	adrp	x8, _cons_in_wrptr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _cons_in_wrptr@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_SBBC_CONS_OFF
	add	x0, x0, x25
	bl	_SBBC_SRAM_READ_4
	cmp	x23, x0
	b.eq	LBB0_8
; %bb.1:
	mov	x25, x0
Lloh10:
	adrp	x28, _cons_in_begin@GOTPAGE
Lloh11:
	ldr	x28, [x28, _cons_in_begin@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x23, x25
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_uart_rx_full
	cbnz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x26]
	add	x0, x8, x23
	bl	_SBBC_SRAM_READ_1
	mov	x1, x0
	mov	x0, x19
	bl	_uart_rx_put
	add	x23, x23, #1
	cmp	x23, x24
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x23, [x26]
	ldr	w0, [x28]
	bl	_SBBC_CONS_OFF
	add	x0, x0, x23
	bl	_SBBC_SRAM_READ_4
	mov	x23, x0
	b	LBB0_2
LBB0_6:
	mov	x23, x25
	b	LBB0_8
LBB0_7:
Lloh12:
	adrp	x8, _UART_STAT_OVERRUN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _UART_STAT_OVERRUN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	x9, [x19, #16]
	ldr	x10, [x19]
	str	w8, [x9, x10, lsl #2]
LBB0_8:
	mov	x0, x22
	bl	_uart_barrier
	ldr	x24, [x26]
	ldr	w0, [x27]
	bl	_SBBC_CONS_OFF
	add	x0, x0, x24
	mov	x1, x23
	bl	_SBBC_SRAM_WRITE_4
	mov	x0, x22
	bl	_uart_barrier
Lloh15:
	adrp	x8, _sbbc_solscir@GOTPAGE
Lloh16:
	ldr	x8, [x8, _sbbc_solscir@GOTPAGEOFF]
Lloh17:
	ldr	x23, [x8]
	mov	x0, x23
	bl	_SBBC_SRAM_READ_4
Lloh18:
	adrp	x8, _SBBC_SRAM_CONS_SPACE_IN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SBBC_SRAM_CONS_SPACE_IN@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	orr	x1, x8, x0
	mov	x0, x23
	bl	_SBBC_SRAM_WRITE_4
	mov	x0, x22
	bl	_uart_barrier
	mov	x0, x21
	mov	x1, x20
	bl	_sbbc_send_intr
	ldr	w0, [x19, #8]
	bl	_uart_unlock
	mov	w0, #0
	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
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_sbbc_solcons,8,3               ; @sbbc_solcons
	.comm	_cons_in_end,4,2                ; @cons_in_end
	.comm	_cons_in_rdptr,4,2              ; @cons_in_rdptr
	.comm	_cons_in_wrptr,4,2              ; @cons_in_wrptr
	.comm	_UART_STAT_OVERRUN,4,2          ; @UART_STAT_OVERRUN
	.comm	_cons_in_begin,4,2              ; @cons_in_begin
	.comm	_sbbc_solscir,8,3               ; @sbbc_solscir
	.comm	_SBBC_SRAM_CONS_SPACE_IN,8,3    ; @SBBC_SRAM_CONS_SPACE_IN
	.no_dead_strip	_sbbc_uart_bus_receive
.subsections_via_symbols
