	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p32x_reg_read16
_p32x_reg_read16:                       ## @p32x_reg_read16
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	andl	$62, %r15d
	movl	%edi, %eax
	andl	$48, %eax
	cmpl	$32, %eax
	jne	LBB0_8
## %bb.1:
	movl	%edi, %ebx
	xorl	%eax, %eax
	callq	_SekCyclesDone
	movl	%eax, %r14d
	shrb	%bl
	andb	$7, %bl
	movl	$1, %r12d
	movl	%ebx, %ecx
	shll	%cl, %r12d
	movq	_msh2@GOTPCREL(%rip), %rax
	movl	%r14d, %ecx
	subl	(%rax), %ecx
	cmpl	$244, %ecx
	ja	LBB0_3
## %bb.2:
	movq	_Pico32x@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_4
LBB0_3:
	movl	%r14d, %edi
	callq	_p32x_sync_sh2s
LBB0_4:
	movq	_Pico32x@GOTPCREL(%rip), %rax
	movl	4(%rax), %ecx
	testl	%r12d, %ecx
	je	LBB0_6
## %bb.5:
	notl	%r12d
	andl	%r12d, %ecx
	movl	%ecx, 4(%rax)
	jmp	LBB0_12
LBB0_8:
	cmpl	$2, %r15d
	jne	LBB0_11
## %bb.9:
	xorl	%eax, %eax
	callq	_SekCyclesDone
	movq	_msh2@GOTPCREL(%rip), %rcx
	movl	%eax, %edx
	subl	(%rcx), %edx
	cmpl	$65, %edx
	jb	LBB0_12
## %bb.10:
	movl	%eax, %edi
	callq	_p32x_sync_sh2s
	jmp	LBB0_12
LBB0_11:
	cmpl	$48, %eax
	jne	LBB0_12
## %bb.13:
	xorl	%eax, %eax
	callq	_SekCyclesDone
	movl	%r15d, %edi
	xorl	%esi, %esi
	movl	%eax, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_p32x_pwm_read16                ## TAILCALL
LBB0_6:
	movq	_P32XF_68KCPOLL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_m68k_poll_detect
	testq	%rax, %rax
	je	LBB0_12
## %bb.7:
	movl	$1, %edi
	callq	_SekSetStop
	movl	$16, %edi
	callq	_SekEndRun
LBB0_12:
	movq	_Pico32x@GOTPCREL(%rip), %rax
	movq	8(%rax), %rax
	shrl	%r15d
	movl	(%rax,%r15,4), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_msh2,4,2                       ## @msh2
	.comm	_Pico32x,16,3                   ## @Pico32x
	.comm	_P32XF_68KCPOLL,4,2             ## @P32XF_68KCPOLL
	.no_dead_strip	_p32x_reg_read16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p32x_reg_read16
_p32x_reg_read16:                       ; @p32x_reg_read16
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	and	w19, w0, #0x3e
	and	w8, w0, #0x30
Lloh0:
	adrp	x22, _Pico32x@GOTPAGE
Lloh1:
	ldr	x22, [x22, _Pico32x@GOTPAGEOFF]
	cmp	w8, #32
	b.ne	LBB0_6
; %bb.1:
	mov	x21, x0
	bl	_SekCyclesDone
	mov	x20, x0
	ubfx	w8, w21, #1, #3
	mov	w9, #1
	lsl	w21, w9, w8
Lloh2:
	adrp	x8, _msh2@GOTPAGE
Lloh3:
	ldr	x8, [x8, _msh2@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	sub	w8, w0, w8
	cmp	w8, #244
	b.hi	LBB0_3
; %bb.2:
	ldr	w8, [x22]
	tst	w8, w21
	b.eq	LBB0_4
LBB0_3:
	mov	x0, x20
	bl	_p32x_sync_sh2s
LBB0_4:
	ldr	w8, [x22, #4]
	tst	w8, w21
	b.eq	LBB0_11
; %bb.5:
	bic	w8, w8, w21
	str	w8, [x22, #4]
	b	LBB0_13
LBB0_6:
	cmp	w19, #2
	b.ne	LBB0_9
; %bb.7:
	bl	_SekCyclesDone
Lloh5:
	adrp	x8, _msh2@GOTPAGE
Lloh6:
	ldr	x8, [x8, _msh2@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	sub	w8, w0, w8
	cmp	w8, #65
	b.lo	LBB0_13
; %bb.8:
	bl	_p32x_sync_sh2s
	b	LBB0_13
LBB0_9:
	cmp	w8, #48
	b.ne	LBB0_13
; %bb.10:
	bl	_SekCyclesDone
	mov	x2, x0
	mov	x0, x19
	mov	x1, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_p32x_pwm_read16
LBB0_11:
Lloh8:
	adrp	x8, _P32XF_68KCPOLL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _P32XF_68KCPOLL@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_m68k_poll_detect
	cbz	x0, LBB0_13
; %bb.12:
	mov	w0, #1
	bl	_SekSetStop
	mov	w0, #16
	bl	_SekEndRun
LBB0_13:
	ldr	x8, [x22, #8]
	lsr	w9, w19, #1
	ldr	w0, [x8, w9, uxtw #2]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_msh2,4,2                       ; @msh2
	.comm	_Pico32x,16,3                   ; @Pico32x
	.comm	_P32XF_68KCPOLL,4,2             ; @P32XF_68KCPOLL
	.no_dead_strip	_p32x_reg_read16
.subsections_via_symbols
