	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CARTRIDGE_StateSave            ## -- Begin function CARTRIDGE_StateSave
	.p2align	4, 0x90
_CARTRIDGE_StateSave:                   ## @CARTRIDGE_StateSave
	.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	_CARTRIDGE_main@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movl	%eax, -28(%rbp)
	movq	_CARTRIDGE_piggyback@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movq	_CARTRIDGE_NONE@GOTPCREL(%rip), %r15
	cmpl	(%r15), %ecx
	je	LBB0_2
## %bb.1:
	negl	%eax
	movl	%eax, -28(%rbp)
LBB0_2:
	leaq	-28(%rbp), %rdi
	movl	$1, %esi
	callq	_StateSav_SaveINT
	movl	(%rbx), %eax
	cmpl	(%r15), %eax
	je	LBB0_4
## %bb.3:
	movl	8(%rbx), %edi
	callq	_StateSav_SaveFNAME
	addq	$4, %rbx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_StateSav_SaveINT
	movl	(%r15), %eax
LBB0_4:
	cmpl	%eax, (%r14)
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_StateSav_SaveINT
	movl	8(%r14), %edi
	callq	_StateSav_SaveFNAME
	addq	$4, %r14
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_StateSav_SaveINT
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CARTRIDGE_main,12,2            ## @CARTRIDGE_main
	.comm	_CARTRIDGE_piggyback,12,2       ## @CARTRIDGE_piggyback
	.comm	_CARTRIDGE_NONE,4,2             ## @CARTRIDGE_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CARTRIDGE_StateSave            ; -- Begin function CARTRIDGE_StateSave
	.p2align	2
_CARTRIDGE_StateSave:                   ; @CARTRIDGE_StateSave
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, _CARTRIDGE_main@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CARTRIDGE_main@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh2:
	adrp	x19, _CARTRIDGE_piggyback@GOTPAGE
Lloh3:
	ldr	x19, [x19, _CARTRIDGE_piggyback@GOTPAGEOFF]
	str	w8, [sp, #12]
	ldr	w9, [x19]
Lloh4:
	adrp	x20, _CARTRIDGE_NONE@GOTPAGE
Lloh5:
	ldr	x20, [x20, _CARTRIDGE_NONE@GOTPAGEOFF]
	ldr	w10, [x20]
	cmp	w9, w10
	b.eq	LBB0_2
; %bb.1:
	neg	w8, w8
	str	w8, [sp, #12]
LBB0_2:
	add	x0, sp, #12
	mov	w1, #1
	bl	_StateSav_SaveINT
	ldr	w8, [x21]
	ldr	w9, [x20]
	cmp	w8, w9
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x21, #8]
	bl	_StateSav_SaveFNAME
	add	x0, x21, #4
	mov	w1, #1
	bl	_StateSav_SaveINT
	ldr	w8, [x20]
LBB0_4:
	ldr	w9, [x19]
	cmp	w9, w8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	mov	w1, #1
	bl	_StateSav_SaveINT
	ldr	w0, [x19, #8]
	bl	_StateSav_SaveFNAME
	add	x0, x19, #4
	mov	w1, #1
	bl	_StateSav_SaveINT
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CARTRIDGE_main,12,2            ; @CARTRIDGE_main
	.comm	_CARTRIDGE_piggyback,12,2       ; @CARTRIDGE_piggyback
	.comm	_CARTRIDGE_NONE,4,2             ; @CARTRIDGE_NONE
.subsections_via_symbols
