	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmac_trigger
_dmac_trigger:                          ## @dmac_trigger
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_EL_32XP@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	(%rbx), %ecx
	movl	4(%rbx), %r8d
	movl	8(%rbx), %r9d
	movl	12(%rbx), %r10d
	movl	(%rdi), %eax
	leaq	L_.str(%rip), %rdx
	pushq	%rax
	pushq	%r10
	callq	_elprintf_sh2
	addq	$16, %rsp
	movl	$16777215, %r8d                 ## imm = 0xFFFFFF
	andl	8(%rbx), %r8d
	movl	%r8d, 8(%rbx)
	movl	12(%rbx), %r9d
	movq	_DMA_AR@GOTPCREL(%rip), %rax
	testl	%r9d, (%rax)
	je	LBB0_4
## %bb.1:
	testl	%r8d, %r8d
	je	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_dmac_transfer_one
	cmpl	$0, 8(%rbx)
	jg	LBB0_2
LBB0_3:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dmac_transfer_complete         ## TAILCALL
LBB0_4:
	movl	(%rbx), %edx
	movl	%edx, %eax
	andl	$-536870913, %eax               ## imm = 0xDFFFFFFF
	cmpl	$16402, %eax                    ## imm = 0x4012
	jne	LBB0_8
## %bb.5:
	movq	_Pico32x@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	andl	$3, %eax
	jne	LBB0_10
## %bb.7:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_elprintf
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_p32x_dreq0_trigger             ## TAILCALL
LBB0_8:
	movl	4(%rbx), %ecx
	movl	%ecx, %eax
	andl	$-939524112, %eax               ## imm = 0xC7FFFFF0
	cmpl	$16432, %eax                    ## imm = 0x4030
	jne	LBB0_9
LBB0_10:
	addq	$8, %rsp
	jmp	LBB0_11
LBB0_9:
	movq	_EL_ANOMALY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	(%r15), %edi
	movl	(%r14), %ebx
	subq	$8, %rsp
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	pushq	%rbx
	callq	_elprintf
	addq	$24, %rsp
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EL_32XP,4,2                    ## @EL_32XP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA %08x->%08x, cnt %d, chcr %04x @%06x"

	.comm	_DMA_AR,4,2                     ## @DMA_AR
	.comm	_Pico32x,4,2                    ## @Pico32x
L_.str.1:                               ## @.str.1
	.asciz	"68k -> sh2 DMA"

	.comm	_EL_ANOMALY,4,2                 ## @EL_ANOMALY
L_.str.2:                               ## @.str.2
	.asciz	"unhandled DMA: %08x->%08x, cnt %d, chcr %04x @%06x"

	.no_dead_strip	_dmac_trigger
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmac_trigger
_dmac_trigger:                          ; @dmac_trigger
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _EL_32XP@GOTPAGE
Lloh1:
	ldr	x21, [x21, _EL_32XP@GOTPAGEOFF]
	ldr	w1, [x21]
	ldp	w3, w4, [x20]
	ldp	w5, w6, [x20, #8]
	ldr	w7, [x0]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	bl	_elprintf_sh2
	ldp	w8, w9, [x20, #8]
	and	w8, w8, #0xffffff
	str	w8, [x20, #8]
Lloh4:
	adrp	x10, _DMA_AR@GOTPAGE
Lloh5:
	ldr	x10, [x10, _DMA_AR@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.1:
	cbz	w8, LBB0_3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_dmac_transfer_one
	ldr	w8, [x20, #8]
	cmp	w8, #0
	b.gt	LBB0_2
LBB0_3:
	mov	x0, x19
	mov	x1, x20
	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
	add	sp, sp, #96
	b	_dmac_transfer_complete
LBB0_4:
	ldr	w10, [x20]
	and	w11, w10, #0xdfffffff
	mov	w12, #16402
	cmp	w11, w12
	b.ne	LBB0_7
; %bb.5:
Lloh7:
	adrp	x8, _Pico32x@GOTPAGE
Lloh8:
	ldr	x8, [x8, _Pico32x@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	and	w9, w8, #0x3
	cmp	w8, #0
	ccmp	w9, #0, #0, ne
	b.ne	LBB0_9
; %bb.6:
	ldr	w0, [x21]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elprintf
	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
	add	sp, sp, #96
	b	_p32x_dreq0_trigger
LBB0_7:
	ldr	w11, [x20, #4]
	and	w12, w11, #0xfffffff0
	and	w12, w12, #0xc7ffffff
	mov	w13, #16432
	cmp	w12, w13
	b.eq	LBB0_9
; %bb.8:
	ldr	w12, [x21]
Lloh12:
	adrp	x13, _EL_ANOMALY@GOTPAGE
Lloh13:
	ldr	x13, [x13, _EL_ANOMALY@GOTPAGEOFF]
Lloh14:
	ldr	w13, [x13]
	orr	w0, w13, w12
	ldr	w12, [x19]
	stp	x9, x12, [sp, #24]
	stp	x11, x8, [sp, #8]
	str	x10, [sp]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_elprintf
LBB0_9:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EL_32XP,4,2                    ; @EL_32XP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA %08x->%08x, cnt %d, chcr %04x @%06x"

	.comm	_DMA_AR,4,2                     ; @DMA_AR
	.comm	_Pico32x,4,2                    ; @Pico32x
l_.str.1:                               ; @.str.1
	.asciz	"68k -> sh2 DMA"

	.comm	_EL_ANOMALY,4,2                 ; @EL_ANOMALY
l_.str.2:                               ; @.str.2
	.asciz	"unhandled DMA: %08x->%08x, cnt %d, chcr %04x @%06x"

	.no_dead_strip	_dmac_trigger
.subsections_via_symbols
