	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sync_sh2s_normal               ## -- Begin function sync_sh2s_normal
	.p2align	4, 0x90
_sync_sh2s_normal:                      ## @sync_sh2s_normal
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r12d
	movq	_EL_32X@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_elprintf
	movq	_Pico32x@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_P32XS_nRES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_msh2@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	movq	_ssh2@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%r14d, %edi
	callq	_CYCLES_GT
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%rbx), %r14d
LBB0_4:
	movl	%r12d, %edi
	movl	%r14d, %esi
	callq	_CYCLES_GT
	testq	%rax, %rax
	je	LBB0_33
## %bb.5:
	movq	_SH2_IDLE_STATES@GOTPCREL(%rip), %r13
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%r14d, %edi
	subl	-48(%rbp), %edi                 ## 4-byte Folded Reload
	callq	_p32x_timers_do
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edi
	movl	%r14d, %esi
	callq	_CYCLES_GT
	testq	%rax, %rax
	je	LBB0_33
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	movq	_event_time_next@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%esi, %esi
	je	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%r14d, %edi
	callq	_CYCLES_GE
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%r14d, %edi
	callq	_p32x_run_events
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	_event_time_next@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	testl	%esi, %esi
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edi
	callq	_CYCLES_GT
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_event_time_next@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, %edi
	movl	%r14d, %esi
	callq	_CYCLES_GT
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	testq	%rax, %rax
	je	LBB0_32
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_14 Depth=2
	movl	%r12d, %edi
	movl	%r14d, %esi
	callq	_CYCLES_GT
	testq	%rax, %rax
	je	LBB0_32
LBB0_14:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_EL_32X@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r12d, %ecx
	subl	(%r15), %ecx
	movl	%r12d, %r8d
	subl	(%rbx), %r8d
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	subl	%r14d, %r9d
	movq	_Pico32x@GOTPCREL(%rip), %rax
	movl	8(%rax), %eax
	movl	%eax, (%rsp)
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_elprintf
	movl	(%r13), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_15
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=2
	movl	(%r13), %eax
	testl	%eax, 4(%r15)
	je	LBB0_20
LBB0_24:                                ##   in Loop: Header=BB0_14 Depth=2
	movl	(%r13), %eax
	movl	%r12d, %r14d
	testl	%eax, 4(%r15)
	je	LBB0_25
## %bb.28:                              ##   in Loop: Header=BB0_14 Depth=2
	testl	%eax, 4(%rbx)
	jne	LBB0_31
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_14 Depth=2
	movl	%r12d, %esi
	subl	(%rbx), %esi
	testl	%esi, %esi
	jle	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	%rbx, %rdi
	callq	_run_sh2
	movq	_event_time_next@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%esi, %esi
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=2
	movl	%r12d, %edi
	callq	_CYCLES_GT
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	_event_time_next@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_14 Depth=2
	movl	%r12d, %esi
	subl	(%r15), %esi
	testl	%esi, %esi
	jle	LBB0_24
## %bb.21:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	%r15, %rdi
	callq	_run_sh2
	movq	_event_time_next@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%esi, %esi
	je	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_14 Depth=2
	movl	%r12d, %edi
	callq	_CYCLES_GT
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	_event_time_next@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_14 Depth=2
	movl	(%r15), %esi
	movl	%r12d, %edi
	callq	_CYCLES_GT
	movl	%r12d, %r14d
	testq	%rax, %rax
	je	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_14 Depth=2
	movl	(%r15), %r14d
LBB0_27:                                ##   in Loop: Header=BB0_14 Depth=2
	movl	(%r13), %eax
	testl	%eax, 4(%rbx)
	jne	LBB0_31
LBB0_29:                                ##   in Loop: Header=BB0_14 Depth=2
	movl	(%rbx), %esi
	movl	%r14d, %edi
	callq	_CYCLES_GT
	testq	%rax, %rax
	je	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_14 Depth=2
	movl	(%rbx), %r14d
	jmp	LBB0_31
LBB0_33:
	movq	_SH2_IDLE_STATES@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, 4(%r15)
	je	LBB0_36
## %bb.34:
	movl	(%r15), %esi
	movl	%r12d, %edi
	callq	_CYCLES_GT
	testq	%rax, %rax
	je	LBB0_36
## %bb.35:
	movl	%r12d, (%r15)
LBB0_36:
	movl	(%r14), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_39
## %bb.37:
	movl	(%rbx), %esi
	movl	%r12d, %edi
	callq	_CYCLES_GT
	testq	%rax, %rax
	jne	LBB0_38
	jmp	LBB0_39
LBB0_1:
	movq	_ssh2@GOTPCREL(%rip), %rax
	movl	%r12d, (%rax)
	movq	_msh2@GOTPCREL(%rip), %rbx
LBB0_38:
	movl	%r12d, (%rbx)
LBB0_39:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EL_32X,4,2                     ## @EL_32X
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sh2 sync to %u"

	.comm	_Pico32x,16,3                   ## @Pico32x
	.comm	_P32XS_nRES,4,2                 ## @P32XS_nRES
	.comm	_ssh2,8,2                       ## @ssh2
	.comm	_msh2,8,2                       ## @msh2
	.comm	_event_time_next,4,2            ## @event_time_next
L_.str.1:                               ## @.str.1
	.asciz	"sh2 exec to %u %d,%d/%d, flags %x"

	.comm	_SH2_IDLE_STATES,4,2            ## @SH2_IDLE_STATES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sync_sh2s_normal               ; -- Begin function sync_sh2s_normal
	.p2align	2
_sync_sh2s_normal:                      ; @sync_sh2s_normal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x26, _EL_32X@GOTPAGE
Lloh1:
	ldr	x26, [x26, _EL_32X@GOTPAGEOFF]
	ldr	w0, [x26]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_elprintf
Lloh4:
	adrp	x27, _Pico32x@GOTPAGE
Lloh5:
	ldr	x27, [x27, _Pico32x@GOTPAGEOFF]
	ldr	x8, [x27]
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _P32XS_nRES@GOTPAGE
Lloh7:
	ldr	x9, [x9, _P32XS_nRES@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_29
; %bb.1:
Lloh9:
	adrp	x21, _msh2@GOTPAGE
Lloh10:
	ldr	x21, [x21, _msh2@GOTPAGEOFF]
	ldr	w22, [x21]
Lloh11:
	adrp	x20, _ssh2@GOTPAGE
Lloh12:
	ldr	x20, [x20, _ssh2@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x22
	bl	_CYCLES_GT
	ldr	w8, [x20]
	cmp	x0, #0
	csel	w25, w22, w8, eq
	mov	x0, x19
	mov	x1, x25
	bl	_CYCLES_GT
Lloh13:
	adrp	x28, _SH2_IDLE_STATES@GOTPAGE
Lloh14:
	ldr	x28, [x28, _SH2_IDLE_STATES@GOTPAGEOFF]
	cbz	x0, LBB0_24
; %bb.2:
Lloh15:
	adrp	x22, _event_time_next@GOTPAGE
Lloh16:
	ldr	x22, [x22, _event_time_next@GOTPAGEOFF]
Lloh17:
	adrp	x23, l_.str.1@PAGE
Lloh18:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	sub	w0, w25, w8
	bl	_p32x_timers_do
	mov	x0, x19
	mov	x1, x25
	bl	_CYCLES_GT
	cbz	x0, LBB0_24
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	ldr	w1, [x22]
	mov	x24, x19
	cbz	w1, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x25
	bl	_CYCLES_GE
	cbz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x25
	bl	_p32x_run_events
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x22]
	mov	x24, x19
	cbz	w1, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_CYCLES_GT
	ldr	w8, [x22]
	cmp	x0, #0
	csel	w24, w19, w8, eq
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	mov	x1, x25
	bl	_CYCLES_GT
	str	w25, [sp, #44]                  ; 4-byte Folded Spill
	cbz	x0, LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w25, [sp, #44]                  ; 4-byte Folded Reload
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=2
	mov	x0, x24
	mov	x1, x25
	bl	_CYCLES_GT
	cbz	x0, LBB0_3
LBB0_12:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x26]
	ldr	w8, [x21]
	sub	w8, w24, w8
	ldr	w9, [x20]
	sub	w9, w24, w9
	sub	w10, w19, w25
	ldr	w11, [x27, #8]
	stp	x10, x11, [sp, #16]
	stp	x8, x9, [sp]
	mov	x1, x23
	mov	x2, x24
	bl	_elprintf
	ldr	w8, [x20, #4]
	ldr	w9, [x28]
	tst	w9, w8
	b.eq	LBB0_18
LBB0_13:                                ;   in Loop: Header=BB0_12 Depth=2
	ldr	w8, [x21, #4]
	ldr	w9, [x28]
	tst	w9, w8
	b.eq	LBB0_21
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=2
	ldr	w9, [x21, #4]
	ldr	w8, [x28]
	mov	x25, x24
	tst	w8, w9
	b.ne	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	w1, [x21]
	mov	x0, x24
	bl	_CYCLES_GT
	ldr	w8, [x21]
	cmp	x0, #0
	csel	w25, w24, w8, eq
	ldr	w8, [x28]
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=2
	ldr	w9, [x20, #4]
	tst	w8, w9
	b.ne	LBB0_11
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	w1, [x20]
	mov	x0, x25
	bl	_CYCLES_GT
	ldr	w8, [x20]
	cmp	x0, #0
	csel	w25, w25, w8, eq
	b	LBB0_11
LBB0_18:                                ;   in Loop: Header=BB0_12 Depth=2
	ldr	w8, [x20]
	sub	w1, w24, w8
	cmp	w1, #1
	b.lt	LBB0_13
; %bb.19:                               ;   in Loop: Header=BB0_12 Depth=2
	mov	x0, x20
	bl	_run_sh2
	ldr	w1, [x22]
	cbz	w1, LBB0_13
; %bb.20:                               ;   in Loop: Header=BB0_12 Depth=2
	mov	x0, x24
	bl	_CYCLES_GT
	ldr	w8, [x22]
	cmp	x0, #0
	csel	w24, w24, w8, eq
	b	LBB0_13
LBB0_21:                                ;   in Loop: Header=BB0_12 Depth=2
	ldr	w8, [x21]
	sub	w1, w24, w8
	cmp	w1, #1
	b.lt	LBB0_14
; %bb.22:                               ;   in Loop: Header=BB0_12 Depth=2
	mov	x0, x21
	bl	_run_sh2
	ldr	w1, [x22]
	cbz	w1, LBB0_14
; %bb.23:                               ;   in Loop: Header=BB0_12 Depth=2
	mov	x0, x24
	bl	_CYCLES_GT
	ldr	w8, [x22]
	cmp	x0, #0
	csel	w24, w24, w8, eq
	b	LBB0_14
LBB0_24:
	ldr	w8, [x21, #4]
	ldr	w9, [x28]
	tst	w9, w8
	b.eq	LBB0_27
; %bb.25:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_CYCLES_GT
	cbz	x0, LBB0_27
; %bb.26:
	str	w19, [x21]
LBB0_27:
	ldr	w8, [x20, #4]
	ldr	w9, [x28]
	tst	w9, w8
	b.eq	LBB0_31
; %bb.28:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_CYCLES_GT
	cbnz	x0, LBB0_30
	b	LBB0_31
LBB0_29:
Lloh19:
	adrp	x8, _ssh2@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ssh2@GOTPAGEOFF]
Lloh21:
	str	w19, [x8]
Lloh22:
	adrp	x20, _msh2@GOTPAGE
Lloh23:
	ldr	x20, [x20, _msh2@GOTPAGEOFF]
LBB0_30:
	str	w19, [x20]
LBB0_31:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EL_32X,4,2                     ; @EL_32X
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sh2 sync to %u"

	.comm	_Pico32x,16,3                   ; @Pico32x
	.comm	_P32XS_nRES,4,2                 ; @P32XS_nRES
	.comm	_ssh2,8,2                       ; @ssh2
	.comm	_msh2,8,2                       ; @msh2
	.comm	_event_time_next,4,2            ; @event_time_next
l_.str.1:                               ; @.str.1
	.asciz	"sh2 exec to %u %d,%d/%d, flags %x"

	.comm	_SH2_IDLE_STATES,4,2            ; @SH2_IDLE_STATES
.subsections_via_symbols
