	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdp_dma_68k_io
_vdp_dma_68k_io:                        ## @vdp_dma_68k_io
	.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, %r13d
	movq	_reg@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	92(%rax), %eax
	shll	$17, %eax
	movq	_dma_src@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	addl	%r12d, %r12d
	orl	%eax, %r12d
	movq	_work_ram@GOTPCREL(%rip), %r14
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r14), %rax
	movzwl	%bx, %ecx
	movl	(%rax,%rcx), %edi
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	addl	$2, %ebx
	movq	(%r15), %rax
	movl	92(%rax), %eax
	shll	$17, %eax
	movl	%ebx, %r12d
	andl	$131071, %r12d                  ## imm = 0x1FFFF
	orl	%eax, %r12d
	callq	_vdp_bus_w
	decl	%r13d
	je	LBB0_7
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %ebx
	cmpl	$10551295, %r12d                ## imm = 0xA0FFFF
	jg	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$65535, %edi                    ## imm = 0xFFFF
	movq	_zstate@GOTPCREL(%rip), %rax
	cmpl	$3, (%rax)
	jne	LBB0_3
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$10551327, %ebx                 ## imm = 0xA1001F
	ja	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %edi
	shrl	%edi
	andl	$15, %edi
	callq	_io_68k_read
	movl	%eax, %edi
	shll	$8, %edi
	orl	%eax, %edi
	jmp	LBB0_6
LBB0_7:
	shrl	%ebx
	movzwl	%bx, %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	_zstate,4,2                     ## @zstate
	.comm	_work_ram,8,3                   ## @work_ram
	.no_dead_strip	_vdp_dma_68k_io
.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_io
_vdp_dma_68k_io:                        ; @vdp_dma_68k_io
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _reg@GOTPAGE
Lloh1:
	ldr	x20, [x20, _reg@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	w8, [x8, #92]
Lloh2:
	adrp	x21, _dma_src@GOTPAGE
Lloh3:
	ldr	x21, [x21, _dma_src@GOTPAGEOFF]
	ldr	w9, [x21]
	lsl	w9, w9, #1
	orr	w24, w9, w8, lsl #17
Lloh4:
	adrp	x22, _zstate@GOTPAGE
Lloh5:
	ldr	x22, [x22, _zstate@GOTPAGEOFF]
Lloh6:
	adrp	x23, _work_ram@GOTPAGE
Lloh7:
	ldr	x23, [x23, _work_ram@GOTPAGEOFF]
	mov	w25, #31
	movk	w25, #161, lsl #16
	b	LBB0_4
LBB0_1:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x23]
	mov	x9, x24
	and	x9, x9, #0xffff
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x8, x9]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w26, w24, #2
	ldr	x8, [x20]
	ldr	w8, [x8, #92]
	mov	x24, x26
	bfi	w24, w8, #17, #15
	bl	_vdp_bus_w
	subs	w19, w19, #1
	b.eq	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w24, #2576, lsl #12             ; =10551296
	b.ge	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x22]
	cmp	w8, #3
	b.ne	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #65535
	b	LBB0_3
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	w24, w25
	b.hi	LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ubfx	w0, w24, #1, #4
	bl	_io_68k_read
	orr	w0, w0, w0, lsl #8
	b	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x23]
	and	x9, x24, #0xffff
	b	LBB0_2
LBB0_10:
	ubfx	w8, w26, #1, #16
	str	w8, [x21]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.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	_zstate,4,2                     ; @zstate
	.comm	_work_ram,8,3                   ; @work_ram
	.no_dead_strip	_vdp_dma_68k_io
.subsections_via_symbols
