	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p32x_update_irls               ## -- Begin function p32x_update_irls
	.p2align	4, 0x90
_p32x_update_irls:                      ## @p32x_update_irls
	.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, %r13d
	movq	%rdi, %r14
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_sh2_cycles_done_m68k
	movl	%eax, %r13d
LBB0_2:
	movq	_Pico32x@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	movq	8(%rcx), %rcx
	movl	(%rcx), %edx
	orl	%eax, %edx
	xorl	%r12d, %r12d
	movl	$0, %ebx
	cmpl	$2, %edx
	jb	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	movl	%edx, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	sarl	%esi
	addl	$2, %ebx
	cmpl	$3, %edx
	movl	%esi, %edx
	ja	LBB0_4
LBB0_5:
	orl	4(%rcx), %eax
	cmpl	$2, %eax
	jb	LBB0_8
## %bb.6:
	xorl	%r12d, %r12d
	movl	%eax, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	sarl	%ecx
	addl	$2, %r12d
	cmpl	$3, %eax
	movl	%ecx, %eax
	ja	LBB0_7
LBB0_8:
	movq	_msh2@GOTPCREL(%rip), %r15
	xorl	%edx, %edx
	cmpq	%r15, %r14
	sete	%dl
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_sh2_irl_irq
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movq	_SH2_IDLE_STATES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_p32x_sh2_poll_event
	cmpq	%r15, %r14
	jne	LBB0_11
## %bb.10:
	movq	_msh2@GOTPCREL(%rip), %rdi
	movl	$1, %esi
	callq	_sh2_end_run
LBB0_11:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	_ssh2@GOTPCREL(%rip), %r13
	xorl	%edx, %edx
	cmpq	%r13, %r14
	sete	%dl
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_sh2_irl_irq
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_14
## %bb.12:
	movq	_SH2_IDLE_STATES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_p32x_sh2_poll_event
	cmpq	%r13, %r14
	jne	LBB0_14
## %bb.13:
	movq	_ssh2@GOTPCREL(%rip), %rdi
	movl	$1, %esi
	callq	_sh2_end_run
LBB0_14:
	movq	_EL_32X@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%r12d, %r8d
	movl	%r15d, %r9d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_elprintf                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_Pico32x,16,3                   ## @Pico32x
	.comm	_msh2,4,2                       ## @msh2
	.comm	_SH2_IDLE_STATES,4,2            ## @SH2_IDLE_STATES
	.comm	_ssh2,4,2                       ## @ssh2
	.comm	_EL_32X,4,2                     ## @EL_32X
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"update_irls: m %d/%d, s %d/%d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p32x_update_irls               ; -- Begin function p32x_update_irls
	.p2align	2
_p32x_update_irls:                      ; @p32x_update_irls
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_sh2_cycles_done_m68k
	mov	x20, x0
LBB0_2:
Lloh0:
	adrp	x9, _Pico32x@GOTPAGE
Lloh1:
	ldr	x9, [x9, _Pico32x@GOTPAGEOFF]
	ldr	w8, [x9]
	ldr	x9, [x9, #8]
	ldr	w10, [x9]
	orr	w10, w10, w8
	cmp	w10, #2
	b.hs	LBB0_4
; %bb.3:
	mov	w21, #0
	b	LBB0_6
LBB0_4:
	mov	w21, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	asr	w11, w10, #1
	add	w21, w21, #2
	cmp	w10, #3
	mov	x10, x11
	b.hi	LBB0_5
LBB0_6:
	ldr	w9, [x9, #4]
	orr	w8, w9, w8
	cmp	w8, #2
	b.hs	LBB0_8
; %bb.7:
	mov	w22, #0
	b	LBB0_10
LBB0_8:
	mov	w22, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	asr	w9, w8, #1
	add	w22, w22, #2
	cmp	w8, #3
	mov	x8, x9
	b.hi	LBB0_9
LBB0_10:
Lloh2:
	adrp	x24, _msh2@GOTPAGE
Lloh3:
	ldr	x24, [x24, _msh2@GOTPAGEOFF]
	cmp	x19, x24
	cset	w2, eq
	mov	x0, x24
	mov	x1, x21
	bl	_sh2_irl_irq
	mov	x23, x0
Lloh4:
	adrp	x26, _SH2_IDLE_STATES@GOTPAGE
Lloh5:
	ldr	x26, [x26, _SH2_IDLE_STATES@GOTPAGEOFF]
	cbz	w0, LBB0_13
; %bb.11:
	ldr	w1, [x26]
	mov	x0, x24
	mov	x2, x20
	bl	_p32x_sh2_poll_event
	cmp	x19, x24
	b.ne	LBB0_13
; %bb.12:
Lloh6:
	adrp	x0, _msh2@GOTPAGE
Lloh7:
	ldr	x0, [x0, _msh2@GOTPAGEOFF]
	mov	w1, #1
	bl	_sh2_end_run
LBB0_13:
Lloh8:
	adrp	x25, _ssh2@GOTPAGE
Lloh9:
	ldr	x25, [x25, _ssh2@GOTPAGEOFF]
	cmp	x19, x25
	cset	w2, eq
	mov	x0, x25
	mov	x1, x22
	bl	_sh2_irl_irq
	mov	x24, x0
	cbz	w0, LBB0_16
; %bb.14:
	ldr	w1, [x26]
	mov	x0, x25
	mov	x2, x20
	bl	_p32x_sh2_poll_event
	cmp	x19, x25
	b.ne	LBB0_16
; %bb.15:
Lloh10:
	adrp	x0, _ssh2@GOTPAGE
Lloh11:
	ldr	x0, [x0, _ssh2@GOTPAGEOFF]
	mov	w1, #1
	bl	_sh2_end_run
LBB0_16:
Lloh12:
	adrp	x8, _EL_32X@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EL_32X@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x23
	mov	x4, x22
	mov	x5, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_elprintf
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_Pico32x,16,3                   ; @Pico32x
	.comm	_msh2,4,2                       ; @msh2
	.comm	_SH2_IDLE_STATES,4,2            ; @SH2_IDLE_STATES
	.comm	_ssh2,4,2                       ; @ssh2
	.comm	_EL_32X,4,2                     ; @EL_32X
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"update_irls: m %d/%d, s %d/%d"

.subsections_via_symbols
