	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbbc_uart_bus_attach
_sbbc_uart_bus_attach:                  ## @sbbc_uart_bus_attach
	.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
	movl	(%rdi), %edi
	callq	_uart_lock
	movq	_sbbc_solcons@GOTPCREL(%rip), %r12
	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
	movl	%eax, %r15d
	movq	_cons_out_rdptr@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rbx
	movl	(%r13), %edi
	callq	_SBBC_CONS_OFF
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_SBBC_SRAM_READ_4
	cmpl	%r15d, %eax
	jne	LBB0_1
## %bb.2:
	leaq	4(%r14), %r15
	xorl	%eax, %eax
	callq	_cpu_spinwait
	movq	_sbbc_scsolir@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	xorl	%esi, %esi
	callq	_SBBC_SRAM_WRITE_4
	movq	%r15, %rdi
	callq	_uart_barrier
	movq	_SBBC_PCI_INT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	(%r12), %rdi
	callq	_SBBC_SRAM_READ_4
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_SBBC_REGS_WRITE_4
	movq	%r15, %rdi
	callq	_uart_barrier
	movq	_SBBC_PCI_INT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SBBC_PCI_ENABLE_INT_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_SBBC_REGS_WRITE_4
	movq	%r15, %rdi
	callq	_uart_barrier
	movq	_sbbc_scsolie@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_SBBC_SRAM_READ_4
	movq	_SBBC_SRAM_CONS_IN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_SBBC_SRAM_CONS_BRK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_SBBC_SRAM_CONS_SPACE_OUT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_SBBC_SRAM_WRITE_4
	movq	%r15, %rdi
	callq	_uart_barrier
	movl	(%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	_sbbc_solcons,8,3               ## @sbbc_solcons
	.comm	_cons_out_wrptr,4,2             ## @cons_out_wrptr
	.comm	_cons_out_rdptr,4,2             ## @cons_out_rdptr
	.comm	_sbbc_scsolir,8,3               ## @sbbc_scsolir
	.comm	_SBBC_PCI_INT_STATUS,4,2        ## @SBBC_PCI_INT_STATUS
	.comm	_SBBC_PCI_INT_ENABLE,4,2        ## @SBBC_PCI_INT_ENABLE
	.comm	_SBBC_PCI_ENABLE_INT_A,4,2      ## @SBBC_PCI_ENABLE_INT_A
	.comm	_sbbc_scsolie,8,3               ## @sbbc_scsolie
	.comm	_SBBC_SRAM_CONS_IN,4,2          ## @SBBC_SRAM_CONS_IN
	.comm	_SBBC_SRAM_CONS_BRK,4,2         ## @SBBC_SRAM_CONS_BRK
	.comm	_SBBC_SRAM_CONS_SPACE_OUT,4,2   ## @SBBC_SRAM_CONS_SPACE_OUT
	.no_dead_strip	_sbbc_uart_bus_attach
.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_attach
_sbbc_uart_bus_attach:                  ; @sbbc_uart_bus_attach
	.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	x21, _sbbc_solcons@GOTPAGE
Lloh1:
	ldr	x21, [x21, _sbbc_solcons@GOTPAGEOFF]
	ldr	x20, [x21]
Lloh2:
	adrp	x8, _cons_out_wrptr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _cons_out_wrptr@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_SBBC_CONS_OFF
	add	x0, x0, x20
	bl	_SBBC_SRAM_READ_4
	mov	x20, x0
Lloh5:
	adrp	x22, _cons_out_rdptr@GOTPAGE
Lloh6:
	ldr	x22, [x22, _cons_out_rdptr@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x23, [x21]
	ldr	w0, [x22]
	bl	_SBBC_CONS_OFF
	add	x0, x0, x23
	bl	_SBBC_SRAM_READ_4
	cmp	w0, w20
	b.ne	LBB0_1
; %bb.2:
	add	x20, x19, #4
	bl	_cpu_spinwait
Lloh7:
	adrp	x22, _sbbc_scsolir@GOTPAGE
Lloh8:
	ldr	x22, [x22, _sbbc_scsolir@GOTPAGEOFF]
	ldr	x0, [x22]
	mov	w1, #0
	bl	_SBBC_SRAM_WRITE_4
	mov	x0, x20
	bl	_uart_barrier
Lloh9:
	adrp	x8, _SBBC_PCI_INT_STATUS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SBBC_PCI_INT_STATUS@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	ldr	x0, [x22]
	bl	_SBBC_SRAM_READ_4
	mov	x1, x0
	mov	x0, x21
	bl	_SBBC_REGS_WRITE_4
	mov	x0, x20
	bl	_uart_barrier
Lloh12:
	adrp	x8, _SBBC_PCI_INT_ENABLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SBBC_PCI_INT_ENABLE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _SBBC_PCI_ENABLE_INT_A@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SBBC_PCI_ENABLE_INT_A@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_SBBC_REGS_WRITE_4
	mov	x0, x20
	bl	_uart_barrier
Lloh18:
	adrp	x8, _sbbc_scsolie@GOTPAGE
Lloh19:
	ldr	x8, [x8, _sbbc_scsolie@GOTPAGEOFF]
Lloh20:
	ldr	x21, [x8]
	mov	x0, x21
	bl	_SBBC_SRAM_READ_4
Lloh21:
	adrp	x8, _SBBC_SRAM_CONS_IN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SBBC_SRAM_CONS_IN@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh24:
	adrp	x9, _SBBC_SRAM_CONS_BRK@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SBBC_SRAM_CONS_BRK@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh27:
	adrp	x9, _SBBC_SRAM_CONS_SPACE_OUT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _SBBC_SRAM_CONS_SPACE_OUT@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x21
	bl	_SBBC_SRAM_WRITE_4
	mov	x0, x20
	bl	_uart_barrier
	ldr	w0, [x19]
	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	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_sbbc_solcons,8,3               ; @sbbc_solcons
	.comm	_cons_out_wrptr,4,2             ; @cons_out_wrptr
	.comm	_cons_out_rdptr,4,2             ; @cons_out_rdptr
	.comm	_sbbc_scsolir,8,3               ; @sbbc_scsolir
	.comm	_SBBC_PCI_INT_STATUS,4,2        ; @SBBC_PCI_INT_STATUS
	.comm	_SBBC_PCI_INT_ENABLE,4,2        ; @SBBC_PCI_INT_ENABLE
	.comm	_SBBC_PCI_ENABLE_INT_A,4,2      ; @SBBC_PCI_ENABLE_INT_A
	.comm	_sbbc_scsolie,8,3               ; @sbbc_scsolie
	.comm	_SBBC_SRAM_CONS_IN,4,2          ; @SBBC_SRAM_CONS_IN
	.comm	_SBBC_SRAM_CONS_BRK,4,2         ; @SBBC_SRAM_CONS_BRK
	.comm	_SBBC_SRAM_CONS_SPACE_OUT,4,2   ; @SBBC_SRAM_CONS_SPACE_OUT
	.no_dead_strip	_sbbc_uart_bus_attach
.subsections_via_symbols
