	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bt878_risc_program
_bt878_risc_program:                    ## @bt878_risc_program
	.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	%rsi, %rbx
	movq	%rdi, %r15
	xorl	%eax, %eax
	callq	_RISC_FLUSH
	movq	_RISC_SYNC@GOTPCREL(%rip), %rcx
	movq	_RISC_SYNC_FM1@GOTPCREL(%rip), %rax
	movq	(%rcx), %rdi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	orq	%rbx, %rdi
	orq	(%rax), %rdi
	callq	_RISC_INSTR
	xorl	%edi, %edi
	callq	_RISC_INSTR
	movq	(%r15), %rsi
	movq	8(%r15), %rdx
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	cmpq	$0, (%r15)
	jle	LBB0_11
## %bb.1:
	xorl	%r13d, %r13d
	movq	_RISC_WR_EOL@GOTPCREL(%rip), %r14
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	cqto
	idivq	%rcx
	movq	%rdx, %rdi
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	callq	_RISC_STATUS
	orq	%rax, %rbx
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	orq	8(%r15), %rbx
	movq	%rbx, %rdi
	callq	_RISC_INSTR
	movq	32(%r15), %rdi
	addq	%r12, %rdi
	callq	_RISC_INSTR
	addq	8(%r15), %r12
	incq	%r13
	cmpq	(%r15), %r13
	jge	LBB0_11
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rcx
	movq	%r12, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rax
	cqto
	idivq	%rcx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
                                        ## kill: def $eax killed $eax def $rax
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_RISC_WR_SOL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	movq	_RISC_WRITE@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rbx
	orq	(%r14), %rbx
	testq	%rdx, %rdx
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_RISC_IRQ@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rbx
	movslq	24(%r15), %rcx
	addq	%rcx, %rax
	decq	%rax
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %edi
	jmp	LBB0_9
LBB0_11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	_RISC_SYNC@GOTPCREL(%rip), %rax
	orq	(%rax), %rdi
	movq	_RISC_SYNC_VRO@GOTPCREL(%rip), %rax
	orq	(%rax), %rdi
	callq	_RISC_INSTR
	xorl	%edi, %edi
	callq	_RISC_INSTR
	movq	_RISC_JUMP@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_RISC_INSTR
	movq	40(%r15), %rdi
	callq	_RISC_INSTR
	movl	(%r15), %edi
	shll	$16, %edi
	orl	8(%r15), %edi
	movq	_BT878_APACK_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_btwrite                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RISC_SYNC,8,3                  ## @RISC_SYNC
	.comm	_RISC_SYNC_FM1,8,3              ## @RISC_SYNC_FM1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bt878: risc len lines %u, bytes per line %u\n"

	.comm	_RISC_WRITE,8,3                 ## @RISC_WRITE
	.comm	_RISC_WR_SOL,8,3                ## @RISC_WR_SOL
	.comm	_RISC_WR_EOL,8,3                ## @RISC_WR_EOL
	.comm	_RISC_IRQ,8,3                   ## @RISC_IRQ
	.comm	_RISC_SYNC_VRO,8,3              ## @RISC_SYNC_VRO
	.comm	_RISC_JUMP,8,3                  ## @RISC_JUMP
	.comm	_BT878_APACK_LEN,4,2            ## @BT878_APACK_LEN
	.no_dead_strip	_bt878_risc_program
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bt878_risc_program
_bt878_risc_program:                    ; @bt878_risc_program
	.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	x20, x1
	mov	x19, x0
	bl	_RISC_FLUSH
Lloh0:
	adrp	x21, _RISC_SYNC@GOTPAGE
Lloh1:
	ldr	x21, [x21, _RISC_SYNC@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _RISC_SYNC_FM1@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RISC_SYNC_FM1@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	orr	x8, x8, x20
	orr	x0, x8, x9
	bl	_RISC_INSTR
	mov	x0, #0
	bl	_RISC_INSTR
	ldp	x1, x2, [x19]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	ldr	x8, [x19]
	cmp	x8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, #0
	mov	x23, #0
Lloh7:
	adrp	x24, _RISC_WRITE@GOTPAGE
Lloh8:
	ldr	x24, [x24, _RISC_WRITE@GOTPAGEOFF]
Lloh9:
	adrp	x25, _RISC_WR_SOL@GOTPAGE
Lloh10:
	ldr	x25, [x25, _RISC_WR_SOL@GOTPAGEOFF]
Lloh11:
	adrp	x26, _RISC_WR_EOL@GOTPAGE
Lloh12:
	ldr	x26, [x26, _RISC_WR_EOL@GOTPAGEOFF]
Lloh13:
	adrp	x27, _RISC_IRQ@GOTPAGE
Lloh14:
	ldr	x27, [x27, _RISC_IRQ@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	orr	x0, x9, x8
	bl	_RISC_INSTR
	ldr	x8, [x19, #32]
	add	x0, x8, x23
	bl	_RISC_INSTR
	ldp	x9, x8, [x19]
	add	x23, x8, x23
	add	x22, x22, #1
	cmp	x22, x9
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #16]
	sdiv	x8, x23, x9
	msub	x10, x8, x9, x23
	ldr	x9, [x24]
	ldr	x11, [x25]
	orr	x9, x11, x9
	ldr	x11, [x26]
	orr	x9, x9, x11
	cbnz	x10, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x10, [x27]
	orr	x28, x9, x10
	ldrsw	x9, [x19, #24]
	add	x8, x9, x8
	sub	x8, x8, #1
	sdiv	x10, x8, x9
	msub	x0, x10, x9, x8
	bl	_RISC_STATUS
	orr	x9, x28, x0
	b	LBB0_2
LBB0_5:
	ldr	x8, [x21]
	orr	x8, x8, x20
Lloh15:
	adrp	x9, _RISC_SYNC_VRO@GOTPAGE
Lloh16:
	ldr	x9, [x9, _RISC_SYNC_VRO@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	orr	x0, x8, x9
	bl	_RISC_INSTR
	mov	x0, #0
	bl	_RISC_INSTR
Lloh18:
	adrp	x8, _RISC_JUMP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RISC_JUMP@GOTPAGEOFF]
Lloh20:
	ldr	x0, [x8]
	bl	_RISC_INSTR
	ldr	x0, [x19, #40]
	bl	_RISC_INSTR
	ldr	w8, [x19]
	ldr	w9, [x19, #8]
	orr	w0, w9, w8, lsl #16
Lloh21:
	adrp	x8, _BT878_APACK_LEN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BT878_APACK_LEN@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	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
	b	_btwrite
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_RISC_SYNC,8,3                  ; @RISC_SYNC
	.comm	_RISC_SYNC_FM1,8,3              ; @RISC_SYNC_FM1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bt878: risc len lines %u, bytes per line %u\n"

	.comm	_RISC_WRITE,8,3                 ; @RISC_WRITE
	.comm	_RISC_WR_SOL,8,3                ; @RISC_WR_SOL
	.comm	_RISC_WR_EOL,8,3                ; @RISC_WR_EOL
	.comm	_RISC_IRQ,8,3                   ; @RISC_IRQ
	.comm	_RISC_SYNC_VRO,8,3              ; @RISC_SYNC_VRO
	.comm	_RISC_JUMP,8,3                  ; @RISC_JUMP
	.comm	_BT878_APACK_LEN,4,2            ; @BT878_APACK_LEN
	.no_dead_strip	_bt878_risc_program
.subsections_via_symbols
