	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcd_state_loaded               ## -- Begin function pcd_state_loaded
	.p2align	4, 0x90
_pcd_state_loaded:                      ## @pcd_state_loaded
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	callq	_pcd_set_cycle_mult
	xorl	%eax, %eax
	callq	_pcd_state_loaded_mem
	movq	_Pico_mcd@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	40(%rax), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	(%r14), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rax)
	movl	$1, (%rax)
	movq	_SekCycleAim@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_pcd_cycles_m68k_to_s68k
	movl	%eax, %ebx
	movq	_SekCycleAimS68k@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	subl	%edi, %eax
	addl	$-1001, %eax                    ## imm = 0xFC17
	cmpl	$-2002, %eax                    ## imm = 0xF82E
	ja	LBB0_2
## %bb.1:
	movl	%ebx, (%r15)
	movq	_SekCycleCntS68k@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movl	%ebx, %edi
LBB0_2:
	movq	_pcd_event_times@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PCD_EVENT_CDC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	cmpq	$0, (%rax,%rsi,8)
	jne	LBB0_5
## %bb.3:
	movl	$166666, %edx                   ## imm = 0x28B0A
	callq	_pcd_event_schedule
	movq	(%r14), %rax
	movq	8(%rax), %rax
	movl	196(%rax), %eax
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	(%r15), %edi
	movq	_PCD_EVENT_TIMER3@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	shll	$7, %eax
	leal	(%rax,%rax,2), %edx
	callq	_pcd_event_schedule
LBB0_5:
	movq	(%r14), %rax
	movl	%ebx, %ecx
	subl	16(%rax), %ecx
	cmpl	$250001, %ecx                   ## imm = 0x3D091
	jb	LBB0_7
## %bb.6:
	movl	%ebx, 16(%rax)
LBB0_7:
	movq	_event_time_next@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_SekCycleCntS68k@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pcd_run_events                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_Pico_mcd,8,3                   ## @Pico_mcd
	.comm	_SekCycleAim,4,2                ## @SekCycleAim
	.comm	_SekCycleAimS68k,4,2            ## @SekCycleAimS68k
	.comm	_SekCycleCntS68k,4,2            ## @SekCycleCntS68k
	.comm	_pcd_event_times,8,3            ## @pcd_event_times
	.comm	_PCD_EVENT_CDC,8,3              ## @PCD_EVENT_CDC
	.comm	_PCD_EVENT_TIMER3,8,3           ## @PCD_EVENT_TIMER3
	.comm	_event_time_next,8,3            ## @event_time_next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcd_state_loaded               ; -- Begin function pcd_state_loaded
	.p2align	2
_pcd_state_loaded:                      ; @pcd_state_loaded
	.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
	bl	_pcd_set_cycle_mult
	bl	_pcd_state_loaded_mem
Lloh0:
	adrp	x20, _Pico_mcd@GOTPAGE
Lloh1:
	ldr	x20, [x20, _Pico_mcd@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	w0, [x8, #40]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x8, [x20]
	stp	xzr, xzr, [x8, #24]
	mov	w9, #1
	str	w9, [x8]
Lloh2:
	adrp	x8, _SekCycleAim@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SekCycleAim@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_pcd_cycles_m68k_to_s68k
	mov	x19, x0
Lloh5:
	adrp	x22, _SekCycleAimS68k@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SekCycleAimS68k@GOTPAGEOFF]
	ldr	w0, [x22]
	sub	w8, w19, w0
	sub	w8, w8, #1001
Lloh7:
	adrp	x21, _SekCycleCntS68k@GOTPAGE
Lloh8:
	ldr	x21, [x21, _SekCycleCntS68k@GOTPAGEOFF]
	cmn	w8, #2002
	b.hi	LBB0_2
; %bb.1:
	str	w19, [x22]
	str	w19, [x21]
	mov	x0, x19
LBB0_2:
Lloh9:
	adrp	x8, _pcd_event_times@GOTPAGE
Lloh10:
	ldr	x8, [x8, _pcd_event_times@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _PCD_EVENT_CDC@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PCD_EVENT_CDC@GOTPAGEOFF]
Lloh14:
	ldr	x1, [x9]
	ldr	x8, [x8, x1, lsl #3]
	cbnz	x8, LBB0_5
; %bb.3:
	mov	w2, #35594
	movk	w2, #2, lsl #16
	bl	_pcd_event_schedule
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	ldr	w8, [x8, #196]
	cbz	w8, LBB0_5
; %bb.4:
	ldr	w0, [x22]
Lloh15:
	adrp	x9, _PCD_EVENT_TIMER3@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PCD_EVENT_TIMER3@GOTPAGEOFF]
Lloh17:
	ldr	x1, [x9]
	add	w8, w8, w8, lsl #1
	lsl	w2, w8, #7
	bl	_pcd_event_schedule
LBB0_5:
	ldr	x8, [x20]
	ldr	w9, [x8, #16]
	mov	w10, #53393
	movk	w10, #3, lsl #16
	sub	w9, w19, w9
	cmp	w9, w10
	b.lo	LBB0_7
; %bb.6:
	str	w19, [x8, #16]
LBB0_7:
Lloh18:
	adrp	x8, _event_time_next@GOTPAGE
Lloh19:
	ldr	x8, [x8, _event_time_next@GOTPAGEOFF]
Lloh20:
	str	xzr, [x8]
	ldr	w0, [x21]
	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	_pcd_run_events
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_Pico_mcd,8,3                   ; @Pico_mcd
	.comm	_SekCycleAim,4,2                ; @SekCycleAim
	.comm	_SekCycleAimS68k,4,2            ; @SekCycleAimS68k
	.comm	_SekCycleCntS68k,4,2            ; @SekCycleCntS68k
	.comm	_pcd_event_times,8,3            ; @pcd_event_times
	.comm	_PCD_EVENT_CDC,8,3              ; @PCD_EVENT_CDC
	.comm	_PCD_EVENT_TIMER3,8,3           ; @PCD_EVENT_TIMER3
	.comm	_event_time_next,8,3            ; @event_time_next
.subsections_via_symbols
