	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p32x_reg_write16
_p32x_reg_write16:                      ## @p32x_reg_write16
	.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	%esi, %r15d
	movl	%edi, %r13d
	movq	_Pico32x@GOTPCREL(%rip), %r12
	movq	(%r12), %r14
	movl	%edi, %ebx
	andl	$62, %ebx
	movq	_m68k_poll@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	cmpl	$48, %ebx
	ja	LBB0_12
## %bb.1:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_2:
	movl	(%r14), %ecx
	movl	%ecx, %edx
	notl	%edx
	andl	%r15d, %edx
	movq	_P32XS_nRES@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, %edx
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_p32x_reset_sh2s
	movl	(%rbx), %eax
	movl	(%r14), %ecx
LBB0_4:
	movq	_P32XS_FM@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movq	_P32XS_ADEN@GOTPCREL(%rip), %rsi
	orl	(%rsi), %eax
	notl	%eax
	andl	%ecx, %eax
	movl	%eax, (%r14)
	movl	(%rbx), %ecx
	orl	(%rdx), %ecx
	orl	(%rsi), %ecx
	andl	%r15d, %ecx
	orl	%eax, %ecx
	movl	%ecx, (%r14)
	jmp	LBB0_23
LBB0_22:
	movzbl	%r15b, %eax
	movl	%eax, 16(%r14)
	jmp	LBB0_23
LBB0_5:
	andl	$-2, %r15d
	movl	%r15d, 20(%r14)
	jmp	LBB0_23
LBB0_6:
	movzbl	%r15b, %eax
	movl	%eax, 24(%r14)
	jmp	LBB0_23
LBB0_7:
	movl	%r15d, 28(%r14)
	jmp	LBB0_23
LBB0_8:
	andl	$-4, %r15d
	movl	%r15d, 32(%r14)
	jmp	LBB0_23
LBB0_9:
	movq	%r14, %rdi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dreq0_write                    ## TAILCALL
LBB0_10:
	andl	$257, %r15d                     ## imm = 0x101
	movl	%r15d, 52(%r14)
LBB0_23:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	96(%r14), %eax
	andl	$-16, %eax
	andl	$15, %r15d
	orl	%eax, %r15d
	movl	%r15d, 96(%r14)
	xorl	%eax, %eax
	callq	_SekCyclesDone
	movl	$48, %edi
	jmp	LBB0_20
LBB0_12:
	movl	%r13d, %eax
	andl	$48, %eax
	cmpl	$48, %eax
	je	LBB0_19
## %bb.13:
	cmpl	$32, %eax
	jne	LBB0_21
## %bb.14:
	xorl	%eax, %eax
	callq	_SekCyclesDone
	shrl	%ebx
	cmpl	%r15d, (%r14,%rbx,4)
	je	LBB0_23
## %bb.15:
	movl	%eax, %edi
	shrb	%r13b
	andb	$7, %r13b
	movl	$1, %eax
	movl	%r13d, %ecx
	shll	%cl, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	8(%r12), %eax
	movzbl	%r13b, %ecx
	btl	%ecx, %eax
	movl	%edi, %r13d
	jae	LBB0_17
## %bb.16:
	callq	_p32x_sync_sh2s
LBB0_17:
	movl	%r15d, (%r14,%rbx,4)
	movq	_sh2s@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	_SH2_STATE_CPOLL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	%r13d, %edx
	callq	_p32x_sh2_poll_event
	movq	(%rbx), %rdi
	addq	$4, %rdi
	movl	(%r14), %esi
	movl	%r13d, %edx
	callq	_p32x_sh2_poll_event
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	orl	%eax, 8(%r12)
	movq	_msh2@GOTPCREL(%rip), %rax
	movl	%r13d, %ecx
	subl	(%rax), %ecx
	cmpl	$121, %ecx
	jl	LBB0_23
## %bb.18:
	movl	%r13d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_p32x_sync_sh2s                 ## TAILCALL
LBB0_19:
	xorl	%eax, %eax
	callq	_SekCyclesDone
	movl	%ebx, %edi
LBB0_20:
	movl	%r15d, %esi
	xorl	%edx, %edx
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_p32x_pwm_write16               ## TAILCALL
LBB0_21:
	orl	$1, %ebx
	movl	%ebx, %edi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_p32x_reg_write8                ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_22
	.long	L0_0_set_12
	.long	L0_0_set_5
	.long	L0_0_set_12
	.long	L0_0_set_6
	.long	L0_0_set_12
	.long	L0_0_set_7
	.long	L0_0_set_12
	.long	L0_0_set_8
	.long	L0_0_set_12
	.long	L0_0_set_9
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_10
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_Pico32x,16,3                   ## @Pico32x
	.comm	_m68k_poll,8,3                  ## @m68k_poll
	.comm	_P32XS_nRES,4,2                 ## @P32XS_nRES
	.comm	_P32XS_FM,4,2                   ## @P32XS_FM
	.comm	_P32XS_ADEN,4,2                 ## @P32XS_ADEN
	.comm	_sh2s,8,3                       ## @sh2s
	.comm	_SH2_STATE_CPOLL,4,2            ## @SH2_STATE_CPOLL
	.comm	_msh2,8,3                       ## @msh2
	.no_dead_strip	_p32x_reg_write16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p32x_reg_write16
_p32x_reg_write16:                      ; @p32x_reg_write16
	.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, x1
	mov	x22, x0
Lloh0:
	adrp	x24, _Pico32x@GOTPAGE
Lloh1:
	ldr	x24, [x24, _Pico32x@GOTPAGEOFF]
	ldr	x20, [x24]
	and	w23, w0, #0x3e
Lloh2:
	adrp	x8, _m68k_poll@GOTPAGE
Lloh3:
	ldr	x8, [x8, _m68k_poll@GOTPAGEOFF]
Lloh4:
	str	xzr, [x8]
	cmp	w23, #48
	b.hi	LBB0_14
; %bb.1:
Lloh5:
	adrp	x8, lJTI0_0@PAGE
Lloh6:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x9, LBB0_2
	ldrb	w10, [x8, x23]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_2:
	ldr	w8, [x20]
	bic	w10, w19, w8
Lloh7:
	adrp	x21, _P32XS_nRES@GOTPAGE
Lloh8:
	ldr	x21, [x21, _P32XS_nRES@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.3:
	bl	_p32x_reset_sh2s
	ldr	w9, [x21]
	ldr	w8, [x20]
LBB0_4:
Lloh9:
	adrp	x10, _P32XS_FM@GOTPAGE
Lloh10:
	ldr	x10, [x10, _P32XS_FM@GOTPAGEOFF]
	ldr	w11, [x10]
	orr	w9, w9, w11
Lloh11:
	adrp	x11, _P32XS_ADEN@GOTPAGE
Lloh12:
	ldr	x11, [x11, _P32XS_ADEN@GOTPAGEOFF]
	ldr	w12, [x11]
	orr	w9, w9, w12
	bic	w8, w8, w9
	str	w8, [x20]
	ldr	w9, [x10]
	ldr	w10, [x21]
	orr	w9, w10, w9
	ldr	w10, [x11]
	orr	w9, w9, w10
	and	w9, w9, w19
	orr	w8, w9, w8
	str	w8, [x20]
	b	LBB0_12
LBB0_5:
	and	w8, w19, #0xff
	str	w8, [x20, #16]
	b	LBB0_12
LBB0_6:
	and	w8, w19, #0xfffffffe
	str	w8, [x20, #20]
	b	LBB0_12
LBB0_7:
	and	w8, w19, #0xff
	str	w8, [x20, #24]
	b	LBB0_12
LBB0_8:
	str	w19, [x20, #28]
	b	LBB0_12
LBB0_9:
	and	w8, w19, #0xfffffffc
	str	w8, [x20, #32]
	b	LBB0_12
LBB0_10:
	mov	x0, x20
	mov	x1, x19
	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
	b	_dreq0_write
LBB0_11:
	mov	w8, #257
	and	w8, w19, w8
	str	w8, [x20, #52]
LBB0_12:
	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
LBB0_13:
	ldr	w21, [x20, #96]
	bfxil	w21, w19, #0, #4
	str	w21, [x20, #96]
	bl	_SekCyclesDone
	mov	x3, x0
	mov	w0, #48
	mov	x1, x21
	b	LBB0_22
LBB0_14:
	and	w8, w22, #0x30
	cmp	w8, #48
	b.eq	LBB0_21
; %bb.15:
	cmp	w8, #32
	b.ne	LBB0_23
; %bb.16:
	bl	_SekCyclesDone
	lsr	w23, w23, #1
	ldr	w8, [x20, w23, uxtw #2]
	cmp	w8, w19
	b.eq	LBB0_12
; %bb.17:
	mov	x21, x0
	ubfx	w8, w22, #1, #3
	mov	w9, #1
	lsl	w22, w9, w8
	ldr	w8, [x24, #8]
	tst	w8, w22
	b.eq	LBB0_19
; %bb.18:
	mov	x0, x21
	bl	_p32x_sync_sh2s
LBB0_19:
	str	w19, [x20, x23, lsl #2]
Lloh13:
	adrp	x19, _sh2s@GOTPAGE
Lloh14:
	ldr	x19, [x19, _sh2s@GOTPAGEOFF]
	ldr	x0, [x19]
Lloh15:
	adrp	x20, _SH2_STATE_CPOLL@GOTPAGE
Lloh16:
	ldr	x20, [x20, _SH2_STATE_CPOLL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x2, x21
	bl	_p32x_sh2_poll_event
	ldr	x8, [x19]
	add	x0, x8, #4
	ldr	w1, [x20]
	mov	x2, x21
	bl	_p32x_sh2_poll_event
	ldr	w8, [x24, #8]
	orr	w8, w8, w22
	str	w8, [x24, #8]
Lloh17:
	adrp	x8, _msh2@GOTPAGE
Lloh18:
	ldr	x8, [x8, _msh2@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	sub	w8, w21, w8
	cmp	w8, #121
	b.lt	LBB0_12
; %bb.20:
	mov	x0, x21
	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
	b	_p32x_sync_sh2s
LBB0_21:
	bl	_SekCyclesDone
	mov	x3, x0
	mov	x0, x23
	mov	x1, x19
LBB0_22:
	mov	x2, #0
	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
	b	_p32x_pwm_write16
LBB0_23:
	orr	w0, w23, #0x1
	mov	x1, x19
	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
	b	_p32x_reg_write8
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_13-LBB0_2)>>2
                                        ; -- End function
	.comm	_Pico32x,16,3                   ; @Pico32x
	.comm	_m68k_poll,8,3                  ; @m68k_poll
	.comm	_P32XS_nRES,4,2                 ; @P32XS_nRES
	.comm	_P32XS_FM,4,2                   ; @P32XS_FM
	.comm	_P32XS_ADEN,4,2                 ; @P32XS_ADEN
	.comm	_sh2s,8,3                       ; @sh2s
	.comm	_SH2_STATE_CPOLL,4,2            ; @SH2_STATE_CPOLL
	.comm	_msh2,8,3                       ; @msh2
	.no_dead_strip	_p32x_reg_write16
.subsections_via_symbols
