	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p32x_sync_other_sh2            ## -- Begin function p32x_sync_other_sh2
	.p2align	4, 0x90
_p32x_sync_other_sh2:                   ## @p32x_sync_other_sh2
	.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
	movq	8(%rdi), %rbx
	movl	(%rbx), %eax
	movq	_SH2_STATE_RUN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_6
## %bb.1:
	movl	%esi, %r14d
	movl	%esi, %r12d
	subl	4(%rbx), %r12d
	cmpl	$200, %r12d
	jl	LBB0_6
## %bb.2:
	movq	_SH2_IDLE_STATES@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movl	%r14d, 4(%rbx)
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rdi, %r15
	movq	_EL_32X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r14d, %ecx
	movl	%r12d, %r8d
	callq	_elprintf_sh2
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_run_sh2
	movq	_event_time_next@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	subl	%r14d, %eax
	leal	(%rax,%rax,2), %ebx
	movq	%r15, %rdi
	callq	_sh2_cycles_left
	cmpl	%ebx, %eax
	jle	LBB0_6
## %bb.7:
	cmpl	$2, %ebx
	movl	$1, %esi
	cmovgel	%ebx, %esi
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sh2_end_run                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SH2_STATE_RUN,4,2              ## @SH2_STATE_RUN
	.comm	_SH2_IDLE_STATES,4,2            ## @SH2_IDLE_STATES
	.comm	_EL_32X,4,2                     ## @EL_32X
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sync to %u %d"

	.comm	_event_time_next,4,2            ## @event_time_next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p32x_sync_other_sh2            ; -- Begin function p32x_sync_other_sh2
	.p2align	2
_p32x_sync_other_sh2:                   ; @p32x_sync_other_sh2
	.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
	ldr	x21, [x0, #8]
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _SH2_STATE_RUN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SH2_STATE_RUN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.1:
	mov	x20, x1
	ldr	w9, [x21, #4]
	sub	w22, w1, w9
	cmp	w22, #200
	b.lt	LBB0_4
; %bb.2:
Lloh3:
	adrp	x9, _SH2_IDLE_STATES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SH2_IDLE_STATES@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
	str	w20, [x21, #4]
LBB0_4:
	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
LBB0_5:
	mov	x19, x0
Lloh6:
	adrp	x8, _EL_32X@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EL_32X@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	mov	x3, x20
	mov	x4, x22
	bl	_elprintf_sh2
	mov	x0, x21
	mov	x1, x22
	bl	_run_sh2
Lloh11:
	adrp	x8, _event_time_next@GOTPAGE
Lloh12:
	ldr	x8, [x8, _event_time_next@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.6:
	sub	w8, w8, w20
	add	w20, w8, w8, lsl #1
	mov	x0, x19
	bl	_sh2_cycles_left
	cmp	w0, w20
	b.le	LBB0_4
; %bb.7:
	cmp	w20, #1
	csinc	w1, w20, wzr, gt
	mov	x0, x19
	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	_sh2_end_run
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SH2_STATE_RUN,4,2              ; @SH2_STATE_RUN
	.comm	_SH2_IDLE_STATES,4,2            ; @SH2_IDLE_STATES
	.comm	_EL_32X,4,2                     ; @EL_32X
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sync to %u %d"

	.comm	_event_time_next,4,2            ; @event_time_next
.subsections_via_symbols
