	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbbc_uart_bus_flush
_sbbc_uart_bus_flush:                   ## @sbbc_uart_bus_flush
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_UART_FLUSH_TRANSMITTER@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_4
LBB0_2:
	movq	_UART_FLUSH_RECEIVER@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	testl	%esi, (%rax)
	je	LBB0_4
## %bb.3:
	movq	%rdi, %r14
	movq	_sbbc_solcons@GOTPCREL(%rip), %r12
	movq	(%r12), %r15
	movq	_cons_in_rdptr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SBBC_CONS_OFF
	addq	%rax, %r15
	movq	(%r12), %r12
	movq	_cons_in_wrptr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SBBC_CONS_OFF
	addq	%rax, %r12
	movq	%r12, %rdi
	callq	_SBBC_SRAM_READ_4
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_SBBC_SRAM_WRITE_4
	movq	%r14, %rdi
	callq	_uart_barrier
LBB0_4:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UART_FLUSH_TRANSMITTER,4,2     ## @UART_FLUSH_TRANSMITTER
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_UART_FLUSH_RECEIVER,4,2        ## @UART_FLUSH_RECEIVER
	.comm	_sbbc_solcons,8,3               ## @sbbc_solcons
	.comm	_cons_in_rdptr,4,2              ## @cons_in_rdptr
	.comm	_cons_in_wrptr,4,2              ## @cons_in_wrptr
	.no_dead_strip	_sbbc_uart_bus_flush
.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_flush
_sbbc_uart_bus_flush:                   ; @sbbc_uart_bus_flush
	.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
Lloh0:
	adrp	x8, _UART_FLUSH_TRANSMITTER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UART_FLUSH_TRANSMITTER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_2:
Lloh6:
	adrp	x8, _UART_FLUSH_RECEIVER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UART_FLUSH_RECEIVER@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_4
; %bb.3:
	mov	x19, x0
Lloh9:
	adrp	x21, _sbbc_solcons@GOTPAGE
Lloh10:
	ldr	x21, [x21, _sbbc_solcons@GOTPAGEOFF]
	ldr	x20, [x21]
Lloh11:
	adrp	x8, _cons_in_rdptr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _cons_in_rdptr@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_SBBC_CONS_OFF
	add	x20, x0, x20
	ldr	x21, [x21]
Lloh14:
	adrp	x8, _cons_in_wrptr@GOTPAGE
Lloh15:
	ldr	x8, [x8, _cons_in_wrptr@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_SBBC_CONS_OFF
	add	x0, x0, x21
	bl	_SBBC_SRAM_READ_4
	mov	x1, x0
	mov	x0, x20
	bl	_SBBC_SRAM_WRITE_4
	mov	x0, x19
	bl	_uart_barrier
LBB0_4:
	mov	w0, #0
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_UART_FLUSH_TRANSMITTER,4,2     ; @UART_FLUSH_TRANSMITTER
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_UART_FLUSH_RECEIVER,4,2        ; @UART_FLUSH_RECEIVER
	.comm	_sbbc_solcons,8,3               ; @sbbc_solcons
	.comm	_cons_in_rdptr,4,2              ; @cons_in_rdptr
	.comm	_cons_in_wrptr,4,2              ; @cons_in_wrptr
	.no_dead_strip	_sbbc_uart_bus_flush
.subsections_via_symbols
