	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbbc_uart_bus_ipend
_sbbc_uart_bus_ipend:                   ## @sbbc_uart_bus_ipend
	.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, %rbx
	movl	(%rdi), %edi
	callq	_uart_lock
	movq	_SBBC_PCI_INT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SBBC_REGS_READ_4
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	leaq	4(%rbx), %r13
	movq	_sbbc_scsolir@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_SBBC_SRAM_READ_4
	movq	%rax, %r15
	movq	(%r14), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_SBBC_SRAM_WRITE_4
	movq	%r13, %rdi
	callq	_uart_barrier
	movq	_SBBC_PCI_INT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_SBBC_REGS_WRITE_4
	movq	%r13, %rdi
	callq	_uart_barrier
	movl	(%rbx), %edi
	callq	_uart_unlock
	movq	_SBBC_SRAM_CONS_IN@GOTPCREL(%rip), %rcx
	movl	$0, %eax
	testq	%r15, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	_SER_INT_RXREADY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	movq	_SBBC_SRAM_CONS_BRK@GOTPCREL(%rip), %rcx
	testq	%r15, (%rcx)
	je	LBB0_6
## %bb.5:
	movq	_SER_INT_BREAK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
LBB0_6:
	orl	%eax, %r14d
	movq	_SBBC_SRAM_CONS_SPACE_OUT@GOTPCREL(%rip), %rax
	testq	%r15, (%rax)
	je	LBB0_9
## %bb.7:
	movq	_sbbc_solcons@GOTPCREL(%rip), %r12
	movq	(%r12), %rbx
	movq	_cons_out_rdptr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SBBC_CONS_OFF
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_SBBC_SRAM_READ_4
	movq	%rax, %r15
	movq	(%r12), %rbx
	movq	_cons_out_wrptr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SBBC_CONS_OFF
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_SBBC_SRAM_READ_4
	cmpq	%rax, %r15
	jne	LBB0_9
## %bb.8:
	movq	_SER_INT_TXIDLE@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	jmp	LBB0_9
LBB0_1:
	movl	(%rbx), %edi
	callq	_uart_unlock
	xorl	%r14d, %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SBBC_PCI_INT_STATUS,4,2        ## @SBBC_PCI_INT_STATUS
	.comm	_sbbc_scsolir,8,3               ## @sbbc_scsolir
	.comm	_SBBC_SRAM_CONS_IN,8,3          ## @SBBC_SRAM_CONS_IN
	.comm	_SER_INT_RXREADY,4,2            ## @SER_INT_RXREADY
	.comm	_SBBC_SRAM_CONS_BRK,8,3         ## @SBBC_SRAM_CONS_BRK
	.comm	_SER_INT_BREAK,4,2              ## @SER_INT_BREAK
	.comm	_SBBC_SRAM_CONS_SPACE_OUT,8,3   ## @SBBC_SRAM_CONS_SPACE_OUT
	.comm	_sbbc_solcons,8,3               ## @sbbc_solcons
	.comm	_cons_out_rdptr,4,2             ## @cons_out_rdptr
	.comm	_cons_out_wrptr,4,2             ## @cons_out_wrptr
	.comm	_SER_INT_TXIDLE,4,2             ## @SER_INT_TXIDLE
	.no_dead_strip	_sbbc_uart_bus_ipend
.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_ipend
_sbbc_uart_bus_ipend:                   ; @sbbc_uart_bus_ipend
	.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
	ldr	w0, [x0]
	bl	_uart_lock
Lloh0:
	adrp	x23, _SBBC_PCI_INT_STATUS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SBBC_PCI_INT_STATUS@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_SBBC_REGS_READ_4
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	add	x21, x19, #4
Lloh2:
	adrp	x24, _sbbc_scsolir@GOTPAGE
Lloh3:
	ldr	x24, [x24, _sbbc_scsolir@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_SBBC_SRAM_READ_4
	mov	x22, x0
	ldr	x0, [x24]
	mov	w1, #0
	bl	_SBBC_SRAM_WRITE_4
	mov	x0, x21
	bl	_uart_barrier
	ldr	w0, [x23]
	mov	x1, x20
	bl	_SBBC_REGS_WRITE_4
	mov	x0, x21
	bl	_uart_barrier
	ldr	w0, [x19]
	bl	_uart_unlock
Lloh4:
	adrp	x8, _SBBC_SRAM_CONS_IN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SBBC_SRAM_CONS_IN@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
Lloh7:
	adrp	x9, _SER_INT_RXREADY@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SER_INT_RXREADY@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	x8, x22
Lloh10:
	adrp	x8, _SBBC_SRAM_CONS_BRK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SBBC_SRAM_CONS_BRK@GOTPAGEOFF]
	csel	w9, wzr, w9, eq
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x10, _SER_INT_BREAK@GOTPAGE
Lloh14:
	ldr	x10, [x10, _SER_INT_BREAK@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	tst	x8, x22
	csel	w8, wzr, w10, eq
	orr	w19, w8, w9
Lloh16:
	adrp	x8, _SBBC_SRAM_CONS_SPACE_OUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SBBC_SRAM_CONS_SPACE_OUT@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	tst	x8, x22
	b.eq	LBB0_5
; %bb.2:
Lloh19:
	adrp	x21, _sbbc_solcons@GOTPAGE
Lloh20:
	ldr	x21, [x21, _sbbc_solcons@GOTPAGEOFF]
	ldr	x20, [x21]
Lloh21:
	adrp	x8, _cons_out_rdptr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _cons_out_rdptr@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_SBBC_CONS_OFF
	add	x0, x0, x20
	bl	_SBBC_SRAM_READ_4
	mov	x20, x0
	ldr	x21, [x21]
Lloh24:
	adrp	x8, _cons_out_wrptr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _cons_out_wrptr@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_SBBC_CONS_OFF
	add	x0, x0, x21
	bl	_SBBC_SRAM_READ_4
	cmp	x20, x0
	b.ne	LBB0_5
; %bb.3:
Lloh27:
	adrp	x8, _SER_INT_TXIDLE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SER_INT_TXIDLE@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	orr	w19, w8, w19
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19]
	bl	_uart_unlock
	mov	w19, #0
LBB0_5:
	mov	x0, x19
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_SBBC_PCI_INT_STATUS,4,2        ; @SBBC_PCI_INT_STATUS
	.comm	_sbbc_scsolir,8,3               ; @sbbc_scsolir
	.comm	_SBBC_SRAM_CONS_IN,8,3          ; @SBBC_SRAM_CONS_IN
	.comm	_SER_INT_RXREADY,4,2            ; @SER_INT_RXREADY
	.comm	_SBBC_SRAM_CONS_BRK,8,3         ; @SBBC_SRAM_CONS_BRK
	.comm	_SER_INT_BREAK,4,2              ; @SER_INT_BREAK
	.comm	_SBBC_SRAM_CONS_SPACE_OUT,8,3   ; @SBBC_SRAM_CONS_SPACE_OUT
	.comm	_sbbc_solcons,8,3               ; @sbbc_solcons
	.comm	_cons_out_rdptr,4,2             ; @cons_out_rdptr
	.comm	_cons_out_wrptr,4,2             ; @cons_out_wrptr
	.comm	_SER_INT_TXIDLE,4,2             ; @SER_INT_TXIDLE
	.no_dead_strip	_sbbc_uart_bus_ipend
.subsections_via_symbols
