	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Pico32xStartup                 ## -- Begin function Pico32xStartup
	.p2align	4, 0x90
_Pico32xStartup:                        ## @Pico32xStartup
	.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
	movq	_EL_STATUS@GOTPCREL(%rip), %rax
	movq	_EL_32X@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elprintf
	movq	_PAHW_32X@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PicoAHW@GOTPCREL(%rip), %rcx
	orl	%eax, (%rcx)
	movq	_msh2@GOTPCREL(%rip), %rbx
	movq	_ssh2@GOTPCREL(%rip), %r14
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_sh2_init
	movq	_sh2_irq_cb@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rax, (%rbx)
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	callq	_sh2_init
	movq	(%r15), %rax
	movq	%rax, (%r14)
	xorl	%eax, %eax
	callq	_PicoMemSetup32x
	xorl	%eax, %eax
	callq	_p32x_pwm_ctl_changed
	xorl	%eax, %eax
	callq	_p32x_timers_recalc
	movq	_P32XS2_ADEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_Pico32x@GOTPCREL(%rip), %rax
	movq	8(%rax), %rdx
	movl	%ecx, (%rdx)
	movq	_Pico@GOTPCREL(%rip), %rsi
	cmpq	$0, 8(%rsi)
	je	LBB0_2
## %bb.1:
	movq	_P32XS_nCART@GOTPCREL(%rip), %rdi
	orl	(%rdi), %ecx
	movl	%ecx, (%rdx)
LBB0_2:
	cmpl	$0, (%rsi)
	jne	LBB0_4
## %bb.3:
	movq	_P32XV_nPAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	(%rax), %rax
	orl	%ecx, (%rax)
LBB0_4:
	movq	_rendstatus_old@GOTPCREL(%rip), %rax
	movl	$-1, (%rax)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_emu_32x_startup                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EL_STATUS,4,2                  ## @EL_STATUS
	.comm	_EL_32X,4,2                     ## @EL_32X
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"32X startup"

	.comm	_PAHW_32X,4,2                   ## @PAHW_32X
	.comm	_PicoAHW,4,2                    ## @PicoAHW
	.comm	_msh2,8,3                       ## @msh2
	.comm	_ssh2,8,3                       ## @ssh2
	.comm	_sh2_irq_cb,8,3                 ## @sh2_irq_cb
	.comm	_P32XS2_ADEN,4,2                ## @P32XS2_ADEN
	.comm	_Pico32x,16,3                   ## @Pico32x
	.comm	_Pico,16,3                      ## @Pico
	.comm	_P32XS_nCART,4,2                ## @P32XS_nCART
	.comm	_P32XV_nPAL,4,2                 ## @P32XV_nPAL
	.comm	_rendstatus_old,4,2             ## @rendstatus_old
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Pico32xStartup                 ; -- Begin function Pico32xStartup
	.p2align	2
_Pico32xStartup:                        ; @Pico32xStartup
	.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
Lloh0:
	adrp	x8, _EL_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EL_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _EL_32X@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EL_32X@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w0, w9, w8
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elprintf
Lloh8:
	adrp	x8, _PAHW_32X@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PAHW_32X@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _PicoAHW@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PicoAHW@GOTPAGEOFF]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
Lloh13:
	adrp	x19, _msh2@GOTPAGE
Lloh14:
	ldr	x19, [x19, _msh2@GOTPAGEOFF]
Lloh15:
	adrp	x20, _ssh2@GOTPAGE
Lloh16:
	ldr	x20, [x20, _ssh2@GOTPAGEOFF]
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_sh2_init
Lloh17:
	adrp	x21, _sh2_irq_cb@GOTPAGE
Lloh18:
	ldr	x21, [x21, _sh2_irq_cb@GOTPAGEOFF]
	ldr	x8, [x21]
	str	x8, [x19]
	mov	x0, x20
	mov	w1, #1
	mov	x2, x19
	bl	_sh2_init
	ldr	x8, [x21]
	str	x8, [x20]
	bl	_PicoMemSetup32x
	bl	_p32x_pwm_ctl_changed
	bl	_p32x_timers_recalc
Lloh19:
	adrp	x9, _P32XS2_ADEN@GOTPAGE
Lloh20:
	ldr	x9, [x9, _P32XS2_ADEN@GOTPAGEOFF]
Lloh21:
	adrp	x8, _Pico32x@GOTPAGE
Lloh22:
	ldr	x8, [x8, _Pico32x@GOTPAGEOFF]
Lloh23:
	ldr	w11, [x9]
	ldr	x9, [x8, #8]
	str	w11, [x9]
Lloh24:
	adrp	x10, _Pico@GOTPAGE
Lloh25:
	ldr	x10, [x10, _Pico@GOTPAGEOFF]
	ldr	x12, [x10, #8]
	cbz	x12, LBB0_2
; %bb.1:
Lloh26:
	adrp	x12, _P32XS_nCART@GOTPAGE
Lloh27:
	ldr	x12, [x12, _P32XS_nCART@GOTPAGEOFF]
Lloh28:
	ldr	w12, [x12]
	orr	w11, w12, w11
	str	w11, [x9]
LBB0_2:
	ldr	w9, [x10]
	cbnz	w9, LBB0_4
; %bb.3:
Lloh29:
	adrp	x9, _P32XV_nPAL@GOTPAGE
Lloh30:
	ldr	x9, [x9, _P32XV_nPAL@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	ldr	x8, [x8]
	ldr	w10, [x8]
	orr	w9, w10, w9
	str	w9, [x8]
LBB0_4:
Lloh32:
	adrp	x8, _rendstatus_old@GOTPAGE
Lloh33:
	ldr	x8, [x8, _rendstatus_old@GOTPAGEOFF]
	mov	w9, #-1
Lloh34:
	str	w9, [x8]
	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	_emu_32x_startup
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh23
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotStr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_EL_STATUS,4,2                  ; @EL_STATUS
	.comm	_EL_32X,4,2                     ; @EL_32X
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"32X startup"

	.comm	_PAHW_32X,4,2                   ; @PAHW_32X
	.comm	_PicoAHW,4,2                    ; @PicoAHW
	.comm	_msh2,8,3                       ; @msh2
	.comm	_ssh2,8,3                       ; @ssh2
	.comm	_sh2_irq_cb,8,3                 ; @sh2_irq_cb
	.comm	_P32XS2_ADEN,4,2                ; @P32XS2_ADEN
	.comm	_Pico32x,16,3                   ; @Pico32x
	.comm	_Pico,16,3                      ; @Pico
	.comm	_P32XS_nCART,4,2                ; @P32XS_nCART
	.comm	_P32XV_nPAL,4,2                 ; @P32XV_nPAL
	.comm	_rendstatus_old,4,2             ; @rendstatus_old
.subsections_via_symbols
