	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p32x_sh2reg_write16
_p32x_sh2reg_write16:                   ## @p32x_sh2reg_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
	movq	%rdx, %r15
	movl	%esi, %r14d
	movl	%edi, %ebx
	andl	$62, %ebx
	movq	$0, 16(%rdx)
	movl	%edi, %eax
	andl	$48, %eax
	cmpl	$48, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$32, %eax
	jne	LBB0_6
## %bb.2:
	movq	_Pico32x@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	shrl	%ebx
	cmpl	%r14d, (%rax,%rbx,4)
	je	LBB0_4
## %bb.3:
	movl	%edi, %r12d
	movl	%r14d, (%rax,%rbx,4)
	movq	_P32XF_68KCPOLL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_p32x_m68k_poll_event
	movl	8(%r15), %r14d
	movq	_SH2_STATE_CPOLL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_sh2_cycles_done_m68k
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_p32x_sh2_poll_event
	shrb	%r12b
	andb	$7, %r12b
	movl	$1, %eax
	movl	%r12d, %ecx
	shll	%cl, %eax
	orl	%eax, 8(%r13)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	callq	_sh2_cycles_done_m68k
	movl	%ebx, %edi
	movl	%r14d, %esi
	movq	%r15, %rdx
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_p32x_pwm_write16               ## TAILCALL
LBB0_6:
	movl	%ebx, %eax
	shrl	%eax
	cmpl	$14, %eax
	ja	LBB0_14
## %bb.7:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_13:
	movq	_P32XS_FM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	notl	%ecx
	movq	_Pico32x@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	andl	(%rdx), %ecx
	movl	%ecx, (%rdx)
	movl	(%rax), %eax
	andl	%r14d, %eax
	orl	%ecx, %eax
	movl	%eax, (%rdx)
LBB0_14:
	orl	$1, %ebx
	movl	%ebx, %edi
	movl	%r14d, %esi
	movq	%r15, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_p32x_sh2reg_write8             ## TAILCALL
LBB0_15:
	movq	_P32XI_VRES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	_Pico32x@GOTPCREL(%rip), %rcx
	andl	%eax, 24(%rcx)
	jmp	LBB0_16
LBB0_8:
	movq	_P32XI_VINT@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_10:
	movq	_P32XI_HINT@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	notl	%eax
	movq	_Pico32x@GOTPCREL(%rip), %rcx
	movq	16(%rcx), %rcx
	movq	(%r15), %rdx
	andl	%eax, (%rcx,%rdx,4)
	jmp	LBB0_16
LBB0_11:
	movb	(%r15), %cl
	movl	$-2, %eax
	roll	%cl, %eax
	movq	_Pico32x@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andl	%eax, 4(%rcx)
	movq	%r15, %rdi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_p32x_update_cmd_irq            ## TAILCALL
LBB0_12:
	movq	%r15, %rdi
	callq	_p32x_pwm_sync_to_sh2
	movq	_P32XI_PWM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	_Pico32x@GOTPCREL(%rip), %rcx
	movq	16(%rcx), %rcx
	movq	(%r15), %rdx
	andl	%eax, (%rcx,%rdx,4)
	movq	%r15, %rdi
	callq	_p32x_pwm_schedule_sh2
LBB0_16:
	movq	%r15, %rdi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_p32x_update_irls               ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_15
	.long	L0_0_set_8
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_12
	.end_data_region
                                        ## -- End function
	.comm	_Pico32x,32,3                   ## @Pico32x
	.comm	_P32XF_68KCPOLL,4,2             ## @P32XF_68KCPOLL
	.comm	_SH2_STATE_CPOLL,4,2            ## @SH2_STATE_CPOLL
	.comm	_P32XS_FM,4,2                   ## @P32XS_FM
	.comm	_P32XI_VRES,4,2                 ## @P32XI_VRES
	.comm	_P32XI_VINT,4,2                 ## @P32XI_VINT
	.comm	_P32XI_HINT,4,2                 ## @P32XI_HINT
	.comm	_P32XI_PWM,4,2                  ## @P32XI_PWM
	.no_dead_strip	_p32x_sh2reg_write16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p32x_sh2reg_write16
_p32x_sh2reg_write16:                   ; @p32x_sh2reg_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, x2
	mov	x20, x1
	and	w21, w0, #0x3e
	str	xzr, [x2, #16]
	and	w8, w0, #0x30
	cmp	w8, #48
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #32
	b.ne	LBB0_6
; %bb.2:
Lloh0:
	adrp	x23, _Pico32x@GOTPAGE
Lloh1:
	ldr	x23, [x23, _Pico32x@GOTPAGEOFF]
	ldr	x8, [x23]
	lsr	w9, w21, #1
	ldr	w10, [x8, w9, uxtw #2]
	cmp	w10, w20
	b.eq	LBB0_4
; %bb.3:
	mov	x22, x0
	str	w20, [x8, x9, lsl #2]
Lloh2:
	adrp	x8, _P32XF_68KCPOLL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _P32XF_68KCPOLL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_p32x_m68k_poll_event
	ldr	w20, [x19, #8]
Lloh5:
	adrp	x8, _SH2_STATE_CPOLL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SH2_STATE_CPOLL@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
	mov	x0, x19
	bl	_sh2_cycles_done_m68k
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_p32x_sh2_poll_event
	ubfx	w8, w22, #1, #3
	mov	w9, #1
	lsl	w8, w9, w8
	ldr	w9, [x23, #8]
	orr	w8, w9, w8
	str	w8, [x23, #8]
LBB0_4:
	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_5:
	mov	x0, x19
	bl	_sh2_cycles_done_m68k
	mov	x3, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, 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_pwm_write16
LBB0_6:
	lsr	w8, w21, #1
	cmp	w8, #14
	b.hi	LBB0_9
; %bb.7:
Lloh8:
	adrp	x9, lJTI0_0@PAGE
Lloh9:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_8
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_8:
Lloh10:
	adrp	x8, _P32XS_FM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _P32XS_FM@GOTPAGEOFF]
	ldr	w9, [x8]
Lloh12:
	adrp	x10, _Pico32x@GOTPAGE
Lloh13:
	ldr	x10, [x10, _Pico32x@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	ldr	w11, [x10]
	bic	w9, w11, w9
	str	w9, [x10]
	ldr	w8, [x8]
	and	w8, w8, w20
	orr	w8, w8, w9
	str	w8, [x10]
LBB0_9:
	orr	w0, w21, #0x1
	mov	x1, x20
	mov	x2, 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_sh2reg_write8
LBB0_10:
Lloh15:
	adrp	x8, _P32XI_VRES@GOTPAGE
Lloh16:
	ldr	x8, [x8, _P32XI_VRES@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _Pico32x@GOTPAGE
Lloh19:
	ldr	x9, [x9, _Pico32x@GOTPAGEOFF]
	ldr	w10, [x9, #24]
	bic	w8, w10, w8
	str	w8, [x9, #24]
	b	LBB0_16
LBB0_11:
Lloh20:
	adrp	x8, _P32XI_VINT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _P32XI_VINT@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh22:
	adrp	x8, _P32XI_HINT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _P32XI_HINT@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _Pico32x@GOTPAGE
Lloh25:
	ldr	x9, [x9, _Pico32x@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9, #16]
	ldr	x10, [x19]
	lsl	x10, x10, #2
	ldr	w11, [x9, x10]
	bic	w8, w11, w8
	str	w8, [x9, x10]
	b	LBB0_16
LBB0_14:
	ldr	w8, [x19]
	mov	w9, #1
	lsl	w8, w9, w8
Lloh27:
	adrp	x9, _Pico32x@GOTPAGE
Lloh28:
	ldr	x9, [x9, _Pico32x@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	ldr	w10, [x9, #4]
	bic	w8, w10, w8
	str	w8, [x9, #4]
	mov	x0, x19
	mov	w1, #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_update_cmd_irq
LBB0_15:
	mov	x0, x19
	bl	_p32x_pwm_sync_to_sh2
Lloh30:
	adrp	x8, _P32XI_PWM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _P32XI_PWM@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	adrp	x9, _Pico32x@GOTPAGE
Lloh34:
	ldr	x9, [x9, _Pico32x@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9, #16]
	ldr	x10, [x19]
	lsl	x10, x10, #2
	ldr	w11, [x9, x10]
	bic	w8, w11, w8
	str	w8, [x9, x10]
	mov	x0, x19
	bl	_p32x_pwm_schedule_sh2
LBB0_16:
	mov	x0, x19
	mov	w1, #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_update_irls
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_10-LBB0_8)>>2
	.byte	(LBB0_11-LBB0_8)>>2
	.byte	(LBB0_12-LBB0_8)>>2
	.byte	(LBB0_14-LBB0_8)>>2
	.byte	(LBB0_15-LBB0_8)>>2
                                        ; -- End function
	.comm	_Pico32x,32,3                   ; @Pico32x
	.comm	_P32XF_68KCPOLL,4,2             ; @P32XF_68KCPOLL
	.comm	_SH2_STATE_CPOLL,4,2            ; @SH2_STATE_CPOLL
	.comm	_P32XS_FM,4,2                   ; @P32XS_FM
	.comm	_P32XI_VRES,4,2                 ; @P32XI_VRES
	.comm	_P32XI_VINT,4,2                 ; @P32XI_VINT
	.comm	_P32XI_HINT,4,2                 ; @P32XI_HINT
	.comm	_P32XI_PWM,4,2                  ; @P32XI_PWM
	.no_dead_strip	_p32x_sh2reg_write16
.subsections_via_symbols
