	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbbc_uart_getc
_sbbc_uart_getc:                        ## @sbbc_uart_getc
	.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	%rsi, %rbx
	movq	%rdi, %r12
	movl	(%rdi), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	4(%rdi), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rdi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	callq	_uart_lock
	movq	%r12, %rdi
	callq	_sbbc_uart_rxready
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_uart_unlock
	movl	$4, %edi
	callq	_DELAY
	movq	%rbx, %rdi
	jmp	LBB0_2
LBB0_3:
	movq	_sbbc_solcons@GOTPCREL(%rip), %r13
	movl	(%r13), %r14d
	movq	_cons_in_rdptr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SBBC_CONS_OFF
	addl	%eax, %r14d
	movl	%r14d, %edi
	callq	_SBBC_SRAM_READ_4
	movl	%eax, %r14d
	movl	(%r13), %edi
	addl	%eax, %edi
	callq	_SBBC_SRAM_READ_1
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_uart_barrier
	incl	%r14d
	movl	(%r13), %r15d
	movq	_cons_in_end@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SBBC_CONS_OFF
	addl	%eax, %r15d
	movl	%r15d, %edi
	callq	_SBBC_SRAM_READ_4
	cmpl	%eax, %r14d
	jne	LBB0_5
## %bb.4:
	movl	(%r13), %r14d
	movq	_cons_in_begin@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SBBC_CONS_OFF
	addl	%eax, %r14d
	movl	%r14d, %edi
	callq	_SBBC_SRAM_READ_4
	movl	%eax, %r14d
LBB0_5:
	movl	(%r13), %r15d
	movq	_cons_in_rdptr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SBBC_CONS_OFF
	addl	%eax, %r15d
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_SBBC_SRAM_WRITE_4
	movq	%r12, %rdi
	callq	_uart_barrier
	movq	_sbbc_solscir@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r14d, %edi
	callq	_SBBC_SRAM_READ_4
	movq	_SBBC_SRAM_CONS_SPACE_IN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_SBBC_SRAM_WRITE_4
	movq	%r12, %rdi
	callq	_uart_barrier
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_sbbc_send_intr
	movq	%rbx, %rdi
	callq	_uart_unlock
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sbbc_solcons,4,2               ## @sbbc_solcons
	.comm	_cons_in_rdptr,4,2              ## @cons_in_rdptr
	.comm	_cons_in_end,4,2                ## @cons_in_end
	.comm	_cons_in_begin,4,2              ## @cons_in_begin
	.comm	_sbbc_solscir,4,2               ## @sbbc_solscir
	.comm	_SBBC_SRAM_CONS_SPACE_IN,4,2    ## @SBBC_SRAM_CONS_SPACE_IN
	.no_dead_strip	_sbbc_uart_getc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbbc_uart_getc
_sbbc_uart_getc:                        ; @sbbc_uart_getc
	.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, x1
	mov	x22, x0
	ldp	w21, w20, [x0]
	mov	x0, x1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	bl	_uart_lock
	mov	x0, x22
	bl	_sbbc_uart_rxready
	cbnz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_uart_unlock
	mov	w0, #4
	bl	_DELAY
	mov	x0, x19
	b	LBB0_1
LBB0_3:
Lloh0:
	adrp	x25, _sbbc_solcons@GOTPAGE
Lloh1:
	ldr	x25, [x25, _sbbc_solcons@GOTPAGEOFF]
	ldr	w23, [x25]
Lloh2:
	adrp	x26, _cons_in_rdptr@GOTPAGE
Lloh3:
	ldr	x26, [x26, _cons_in_rdptr@GOTPAGEOFF]
	ldr	w0, [x26]
	bl	_SBBC_CONS_OFF
	add	w0, w0, w23
	bl	_SBBC_SRAM_READ_4
	mov	x24, x0
	ldr	w8, [x25]
	add	w0, w8, w0
	bl	_SBBC_SRAM_READ_1
	mov	x23, x0
	mov	x0, x22
	bl	_uart_barrier
	add	w24, w24, #1
	ldr	w27, [x25]
Lloh4:
	adrp	x8, _cons_in_end@GOTPAGE
Lloh5:
	ldr	x8, [x8, _cons_in_end@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_SBBC_CONS_OFF
	add	w0, w0, w27
	bl	_SBBC_SRAM_READ_4
	cmp	w24, w0
	b.ne	LBB0_5
; %bb.4:
	ldr	w24, [x25]
Lloh7:
	adrp	x8, _cons_in_begin@GOTPAGE
Lloh8:
	ldr	x8, [x8, _cons_in_begin@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_SBBC_CONS_OFF
	add	w0, w0, w24
	bl	_SBBC_SRAM_READ_4
	mov	x24, x0
LBB0_5:
	ldr	w25, [x25]
	ldr	w0, [x26]
	bl	_SBBC_CONS_OFF
	add	w0, w0, w25
	mov	x1, x24
	bl	_SBBC_SRAM_WRITE_4
	mov	x0, x22
	bl	_uart_barrier
Lloh10:
	adrp	x8, _sbbc_solscir@GOTPAGE
Lloh11:
	ldr	x8, [x8, _sbbc_solscir@GOTPAGEOFF]
Lloh12:
	ldr	w24, [x8]
	mov	x0, x24
	bl	_SBBC_SRAM_READ_4
Lloh13:
	adrp	x8, _SBBC_SRAM_CONS_SPACE_IN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SBBC_SRAM_CONS_SPACE_IN@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	orr	w1, w8, w0
	mov	x0, x24
	bl	_SBBC_SRAM_WRITE_4
	mov	x0, x22
	bl	_uart_barrier
	mov	x0, x20
	mov	x1, x21
	bl	_sbbc_send_intr
	mov	x0, x19
	bl	_uart_unlock
	mov	x0, x23
	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	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_sbbc_solcons,4,2               ; @sbbc_solcons
	.comm	_cons_in_rdptr,4,2              ; @cons_in_rdptr
	.comm	_cons_in_end,4,2                ; @cons_in_end
	.comm	_cons_in_begin,4,2              ; @cons_in_begin
	.comm	_sbbc_solscir,4,2               ; @sbbc_solscir
	.comm	_SBBC_SRAM_CONS_SPACE_IN,4,2    ; @SBBC_SRAM_CONS_SPACE_IN
	.no_dead_strip	_sbbc_uart_getc
.subsections_via_symbols
