	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdp_dma_68k_ext
_vdp_dma_68k_ext:                       ## @vdp_dma_68k_ext
	.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
	movl	%edi, %r14d
	movq	_reg@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	92(%rax), %eax
	shll	$17, %eax
	movq	_dma_src@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	addl	%ebx, %ebx
	orl	%eax, %ebx
	movq	_m68k@GOTPCREL(%rip), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rax,%rcx), %rax
	movzwl	%bx, %ecx
	movl	(%rax,%rcx), %edi
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %r15d
	addl	$2, %r15d
	movq	(%r12), %rax
	movl	92(%rax), %eax
	shll	$17, %eax
	movl	%r15d, %ebx
	andl	$131071, %ebx                   ## imm = 0x1FFFF
	orl	%eax, %ebx
	callq	_vdp_bus_w
	decl	%r14d
	je	LBB0_5
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movl	%ebx, %ecx
	sarl	$16, %ecx
	movslq	%ecx, %rcx
	shlq	$4, %rcx
	movq	8(%rax,%rcx), %rdx
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %edi
	callq	*%rdx
	movl	%eax, %edi
	jmp	LBB0_4
LBB0_5:
	shrl	%r15d
	movzwl	%r15w, %eax
	movq	_dma_src@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_reg,8,3                        ## @reg
	.comm	_dma_src,4,2                    ## @dma_src
	.comm	_m68k,8,3                       ## @m68k
	.no_dead_strip	_vdp_dma_68k_ext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vdp_dma_68k_ext
_vdp_dma_68k_ext:                       ; @vdp_dma_68k_ext
	.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
Lloh0:
	adrp	x21, _reg@GOTPAGE
Lloh1:
	ldr	x21, [x21, _reg@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh2:
	adrp	x22, _dma_src@GOTPAGE
Lloh3:
	ldr	x22, [x22, _dma_src@GOTPAGEOFF]
	ldr	w8, [x8, #92]
	ldr	w9, [x22]
	lsl	w9, w9, #1
	orr	w20, w9, w8, lsl #17
Lloh4:
	adrp	x23, _m68k@GOTPAGE
Lloh5:
	ldr	x23, [x23, _m68k@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	sbfx	x9, x20, #16, #16
	lsl	x9, x9, #4
	ldr	x8, [x8, x9]
	mov	x9, x20
	and	x9, x9, #0xffff
	ldr	w0, [x8, x9]
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w24, w20, #2
	ldr	x8, [x21]
	ldr	w8, [x8, #92]
	mov	x20, x24
	bfi	w20, w8, #17, #15
	bl	_vdp_bus_w
	subs	w19, w19, #1
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	asr	w9, w20, #16
	add	x9, x8, w9, sxtw #4
	ldr	x9, [x9, #8]
	cbz	x9, LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	blr	x9
	b	LBB0_2
LBB0_5:
	ubfx	w8, w24, #1, #16
	str	w8, [x22]
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_reg,8,3                        ; @reg
	.comm	_dma_src,4,2                    ; @dma_src
	.comm	_m68k,8,3                       ; @m68k
	.no_dead_strip	_vdp_dma_68k_ext
.subsections_via_symbols
