	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mantis_risc_program
_mantis_risc_program:                   ## @mantis_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	_MANTIS_DEBUG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	callq	_RISC_FLUSH
	movl	(%rbx), %edi
	movq	_MANTIS_BLOCK_COUNT@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movq	_MANTIS_BLOCK_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MANTIS_DMA_TR_BYTES@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	jle	LBB0_9
## %bb.1:
	movq	_MANTIS_DMA_TR_UNITS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str.2(%rip), %rdx
	movq	_RISC_WRITE@GOTPCREL(%rip), %r13
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdx
	movq	_RISC_WRITE@GOTPCREL(%rip), %r15
	movq	-56(%rbp), %rax                 ## 8-byte Reload
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_MANTIS_BLOCK_COUNT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_MANTIS_DEBUG@GOTPCREL(%rip), %rbx
	movq	%r15, %r13
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rax
	cmpq	%rcx, %rax
	jge	LBB0_9
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	testq	%rsi, %rsi
	jle	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %edi
	movl	$1, %esi
	movq	%rdx, %r12
	movq	%rax, %rcx
	movq	%rax, %r15
	xorl	%r8d, %r8d
	xorl	%eax, %eax
	callq	_dprintk
	movq	_RISC_IRQ@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	orq	(%r13), %rbx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_RISC_STATUS
	orq	%rax, %rbx
	movq	_MANTIS_DMA_TR_BYTES@GOTPCREL(%rip), %r15
	orq	(%r15), %rbx
	movq	%rbx, %rsi
	callq	_RISC_INSTR
	movq	%r15, %rbx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rsi
	addq	%r14, %rsi
	callq	_RISC_INSTR
	movq	_MANTIS_DMA_TR_UNITS@GOTPCREL(%rip), %rax
	addq	(%r15), %r14
	movq	(%rax), %rsi
	cmpq	$2, %rsi
	jl	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rcx
	movl	$1, %ebx
	movq	%r15, %r13
	movq	_RISC_WRITE@GOTPCREL(%rip), %r15
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_MANTIS_DEBUG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	$1, %esi
	movq	%r12, %rdx
	movq	%rax, %rcx
	movq	%rbx, %r8
	xorl	%eax, %eax
	callq	_dprintk
	movq	(%r13), %rsi
	orq	(%r15), %rsi
	callq	_RISC_INSTR
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	addq	%r14, %rsi
	callq	_RISC_INSTR
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, %rdx
	addq	(%r13), %r14
	incq	%rbx
	movq	_MANTIS_DMA_TR_UNITS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	cmpq	%rsi, %rbx
	jl	LBB0_6
	jmp	LBB0_7
LBB0_9:
	movq	_RISC_JUMP@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	callq	_RISC_INSTR
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RISC_INSTR                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MANTIS_DEBUG,4,2               ## @MANTIS_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Mantis create RISC program"

L_.str.1:                               ## @.str.1
	.asciz	"risc len lines %u, bytes per line %u, bytes per DMA tr %u"

	.comm	_MANTIS_BLOCK_COUNT,8,3         ## @MANTIS_BLOCK_COUNT
	.comm	_MANTIS_BLOCK_BYTES,4,2         ## @MANTIS_BLOCK_BYTES
	.comm	_MANTIS_DMA_TR_BYTES,8,3        ## @MANTIS_DMA_TR_BYTES
	.comm	_MANTIS_DMA_TR_UNITS,8,3        ## @MANTIS_DMA_TR_UNITS
L_.str.2:                               ## @.str.2
	.asciz	"RISC PROG line=[%d], step=[%d]"

	.comm	_RISC_WRITE,8,3                 ## @RISC_WRITE
	.comm	_RISC_IRQ,8,3                   ## @RISC_IRQ
	.comm	_RISC_JUMP,8,3                  ## @RISC_JUMP
	.no_dead_strip	_mantis_risc_program
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mantis_risc_program
_mantis_risc_program:                   ; @mantis_risc_program
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x0
Lloh0:
	adrp	x22, _MANTIS_DEBUG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MANTIS_DEBUG@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	bl	_RISC_FLUSH
	ldr	w0, [x22]
Lloh4:
	adrp	x20, _MANTIS_BLOCK_COUNT@GOTPAGE
Lloh5:
	ldr	x20, [x20, _MANTIS_BLOCK_COUNT@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _MANTIS_BLOCK_BYTES@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MANTIS_BLOCK_BYTES@GOTPAGEOFF]
Lloh8:
	adrp	x24, _MANTIS_DMA_TR_BYTES@GOTPAGE
Lloh9:
	ldr	x24, [x24, _MANTIS_DMA_TR_BYTES@GOTPAGEOFF]
	ldr	x10, [x24]
Lloh10:
	ldr	w9, [x9]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	ldr	x9, [x20]
	cmp	x9, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x20, #0
	mov	x25, #0
Lloh13:
	adrp	x26, _MANTIS_DMA_TR_UNITS@GOTPAGE
Lloh14:
	ldr	x26, [x26, _MANTIS_DMA_TR_UNITS@GOTPAGEOFF]
	ldr	x8, [x26]
Lloh15:
	adrp	x21, l_.str.2@PAGE
Lloh16:
	add	x21, x21, l_.str.2@PAGEOFF
Lloh17:
	adrp	x27, _RISC_WRITE@GOTPAGE
Lloh18:
	ldr	x27, [x27, _RISC_WRITE@GOTPAGEOFF]
Lloh19:
	adrp	x28, _RISC_IRQ@GOTPAGE
Lloh20:
	ldr	x28, [x28, _RISC_IRQ@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh21:
	adrp	x9, _MANTIS_BLOCK_COUNT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MANTIS_BLOCK_COUNT@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	cmp	x20, x9
	b.ge	LBB0_8
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	cmp	x8, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x22]
	stp	x20, xzr, [sp]
	mov	w1, #1
	mov	x2, x21
	bl	_dprintk
	ldr	x8, [x27]
	ldr	x9, [x28]
	orr	x23, x9, x8
	mov	x0, x20
	bl	_RISC_STATUS
	orr	x8, x23, x0
	ldr	x9, [x24]
	orr	x1, x8, x9
	bl	_RISC_INSTR
	ldr	x8, [x19]
	add	x1, x8, x25
	bl	_RISC_INSTR
	ldr	x8, [x24]
	add	x25, x8, x25
	ldr	x8, [x26]
	cmp	x8, #2
	b.lt	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w23, #1
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x22]
	stp	x20, x23, [sp]
	mov	w1, #1
	mov	x2, x21
	bl	_dprintk
	ldr	x8, [x27]
	ldr	x9, [x24]
	orr	x1, x9, x8
	bl	_RISC_INSTR
	ldr	x8, [x19]
	add	x1, x8, x25
	bl	_RISC_INSTR
	ldr	x8, [x24]
	add	x25, x8, x25
	add	x23, x23, #1
	ldr	x8, [x26]
	cmp	x23, x8
	b.lt	LBB0_7
	b	LBB0_2
LBB0_8:
Lloh24:
	adrp	x8, _RISC_JUMP@GOTPAGE
Lloh25:
	ldr	x8, [x8, _RISC_JUMP@GOTPAGEOFF]
Lloh26:
	ldr	x1, [x8]
	bl	_RISC_INSTR
	ldr	x1, [x19, #8]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_RISC_INSTR
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MANTIS_DEBUG,4,2               ; @MANTIS_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Mantis create RISC program"

l_.str.1:                               ; @.str.1
	.asciz	"risc len lines %u, bytes per line %u, bytes per DMA tr %u"

	.comm	_MANTIS_BLOCK_COUNT,8,3         ; @MANTIS_BLOCK_COUNT
	.comm	_MANTIS_BLOCK_BYTES,4,2         ; @MANTIS_BLOCK_BYTES
	.comm	_MANTIS_DMA_TR_BYTES,8,3        ; @MANTIS_DMA_TR_BYTES
	.comm	_MANTIS_DMA_TR_UNITS,8,3        ; @MANTIS_DMA_TR_UNITS
l_.str.2:                               ; @.str.2
	.asciz	"RISC PROG line=[%d], step=[%d]"

	.comm	_RISC_WRITE,8,3                 ; @RISC_WRITE
	.comm	_RISC_IRQ,8,3                   ; @RISC_IRQ
	.comm	_RISC_JUMP,8,3                  ; @RISC_JUMP
	.no_dead_strip	_mantis_risc_program
.subsections_via_symbols
