	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p32x_vdp_write16
_p32x_vdp_write16:                      ## @p32x_vdp_write16
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	andl	$14, %edi
	cmpl	$8, %edi
	je	LBB0_3
## %bb.1:
	cmpl	$6, %edi
	jne	LBB0_11
## %bb.2:
	movq	_Pico32x@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%esi, 12(%rax)
	popq	%rbp
	retq
LBB0_3:
	movq	_Pico32x@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	movl	8(%r9), %r8d
	movl	%r8d, %r11d
	incl	%r11d
	jne	LBB0_4
## %bb.12:
	movl	%esi, 16(%r9)
	jmp	LBB0_13
LBB0_11:
	orl	$1, %edi
	popq	%rbp
	jmp	_p32x_vdp_write8                ## TAILCALL
LBB0_4:
	movq	_Pico32xMem@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_P32XV_FS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	20(%r9), %ecx
	movslq	%ecx, %rcx
	xorq	$1, %rcx
	movq	(%rax,%rcx,8), %r10
	movl	12(%r9), %ecx
	testb	$1, %r11b
	je	LBB0_6
## %bb.5:
	movslq	%ecx, %rcx
	movl	%esi, (%r10,%rcx,4)
	movl	%ecx, %edi
	andl	$65280, %edi                    ## imm = 0xFF00
	incl	%ecx
	movzbl	%cl, %ecx
	orl	%edi, %ecx
	movl	%r8d, %r11d
LBB0_6:
	testl	%r8d, %r8d
	je	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ecx, %rcx
	movl	%esi, (%r10,%rcx,4)
	movl	%ecx, %eax
	andl	$65280, %eax                    ## imm = 0xFF00
	leal	1(%rcx), %edi
	movzbl	%dil, %edi
	orl	%eax, %edi
	addl	$2, %ecx
	movzbl	%cl, %ecx
	orl	%eax, %ecx
	movl	%esi, (%r10,%rdi,4)
	addl	$-2, %r11d
	jne	LBB0_7
LBB0_8:
	movl	%ecx, 12(%r9)
	movl	%esi, 16(%r9)
	testq	%rdx, %rdx
	je	LBB0_13
## %bb.9:
	cmpl	$4, %r8d
	jl	LBB0_13
## %bb.10:
	movq	_P32XV_nFEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%r9)
	movq	_P32X_EVENT_FILLEND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	$4, %r8d
	movq	%rdx, %rdi
	movl	%r8d, %edx
	popq	%rbp
	jmp	_p32x_event_schedule_sh2        ## TAILCALL
LBB0_13:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Pico32x,8,3                    ## @Pico32x
	.comm	_Pico32xMem,8,3                 ## @Pico32xMem
	.comm	_P32XV_FS,4,2                   ## @P32XV_FS
	.comm	_P32XV_nFEN,4,2                 ## @P32XV_nFEN
	.comm	_P32X_EVENT_FILLEND,4,2         ## @P32X_EVENT_FILLEND
	.no_dead_strip	_p32x_vdp_write16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p32x_vdp_write16
_p32x_vdp_write16:                      ; @p32x_vdp_write16
	.cfi_startproc
; %bb.0:
	and	w8, w0, #0xe
	cmp	w8, #8
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #6
	b.ne	LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _Pico32x@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Pico32x@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	w1, [x8, #12]
	ret
LBB0_3:
Lloh3:
	adrp	x8, _Pico32x@GOTPAGE
Lloh4:
	ldr	x8, [x8, _Pico32x@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w9, [x8, #8]
	cmn	w9, #1
	b.lo	LBB0_6
; %bb.4:
	str	w1, [x8, #16]
	b	LBB0_11
LBB0_5:
	orr	w0, w8, #0x1
	b	_p32x_vdp_write8
LBB0_6:
Lloh6:
	adrp	x10, _Pico32xMem@GOTPAGE
Lloh7:
	ldr	x10, [x10, _Pico32xMem@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	ldr	x10, [x10]
	ldr	w11, [x8, #20]
Lloh9:
	adrp	x12, _P32XV_FS@GOTPAGE
Lloh10:
	ldr	x12, [x12, _P32XV_FS@GOTPAGEOFF]
Lloh11:
	ldr	w12, [x12]
	and	w11, w12, w11
	eor	w11, w11, #0x1
	ldr	x10, [x10, w11, sxtw #3]
	ldr	w11, [x8, #12]
	mov	w12, #-1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	str	w1, [x10, w11, sxtw #2]
	add	w13, w11, #1
	and	w11, w11, #0xff00
	bfxil	w11, w13, #0, #8
	add	w12, w12, #1
	cmp	w9, w12
	b.ne	LBB0_7
; %bb.8:
	stp	w11, w1, [x8, #12]
	cbz	x2, LBB0_11
; %bb.9:
	cmp	w9, #4
	b.lt	LBB0_11
; %bb.10:
Lloh12:
	adrp	x10, _P32XV_nFEN@GOTPAGE
Lloh13:
	ldr	x10, [x10, _P32XV_nFEN@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	ldr	w11, [x8, #20]
	orr	w10, w11, w10
Lloh15:
	adrp	x11, _P32X_EVENT_FILLEND@GOTPAGE
Lloh16:
	ldr	x11, [x11, _P32X_EVENT_FILLEND@GOTPAGEOFF]
	str	w10, [x8, #20]
Lloh17:
	ldr	w1, [x11]
	add	w8, w9, #4
	mov	x0, x2
	mov	x2, x8
	b	_p32x_event_schedule_sh2
LBB0_11:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_Pico32x,8,3                    ; @Pico32x
	.comm	_Pico32xMem,8,3                 ; @Pico32xMem
	.comm	_P32XV_FS,4,2                   ; @P32XV_FS
	.comm	_P32XV_nFEN,4,2                 ; @P32XV_nFEN
	.comm	_P32X_EVENT_FILLEND,4,2         ; @P32X_EVENT_FILLEND
	.no_dead_strip	_p32x_vdp_write16
.subsections_via_symbols
