	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CheatSave                      ## -- Begin function CheatSave
	.p2align	4, 0x90
_CheatSave:                             ## @CheatSave
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, -80(%rbp)
	movl	$-1, %r14d
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %rbx
	leaq	L_.str.1(%rip), %rdi
	movl	$4, %esi
	movl	$1, %edx
	movq	%rax, %rcx
	callq	_fwrite
	movq	_numcheats@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	%edi, -68(%rbp)
	callq	_DoubleWordSwap
	leaq	-80(%rbp), %rdi
	leaq	-68(%rbp), %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	cmpl	$0, (%r15)
	jle	LBB0_5
## %bb.3:
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_cheatlist@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	leaq	-64(%rbp), %r15
	movq	%r15, %rdi
	movl	$16, %edx
	callq	_memcpy
	movl	-64(%rbp), %edi
	callq	_DoubleWordSwap
	movl	-60(%rbp), %edi
	callq	_DoubleWordSwap
	movl	-56(%rbp), %edi
	callq	_DoubleWordSwap
	movl	-52(%rbp), %edi
	callq	_DoubleWordSwap
	leaq	-80(%rbp), %r14
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	%r14, %rdi
	leaq	-60(%rbp), %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	%r14, %rdi
	leaq	-56(%rbp), %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	_cheatlist@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rax,%r12), %rdi
	callq	_strlen
	incl	%eax
	movl	%eax, -44(%rbp)
	movq	%r14, %rdi
	leaq	-44(%rbp), %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r15), %rax
	movq	(%rax,%r12), %rsi
	movl	-44(%rbp), %ecx
	movq	%r14, %rdi
	movl	$1, %edx
	movq	%rbx, %r8
	callq	_ywrite
	movq	%r14, %rdi
	leaq	-52(%rbp), %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	_numcheats@GOTPCREL(%rip), %rax
	incq	%r13
	movslq	(%rax), %rax
	addq	$8, %r12
	cmpq	%rax, %r13
	jl	LBB0_4
LBB0_5:
	movq	%rbx, %rdi
	callq	_fclose
	xorl	%r14d, %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wb"

L_.str.1:                               ## @.str.1
	.asciz	"YCHT"

	.comm	_numcheats,4,2                  ## @numcheats
	.comm	_cheatlist,8,3                  ## @cheatlist
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CheatSave                      ; -- Begin function CheatSave
	.p2align	2
_CheatSave:                             ; @CheatSave
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	str	xzr, [sp, #32]
	cbz	x0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_6
; %bb.2:
	mov	x19, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	w1, #4
	mov	w2, #1
	mov	x3, x19
	bl	_fwrite
Lloh4:
	adrp	x23, _numcheats@GOTPAGE
Lloh5:
	ldr	x23, [x23, _numcheats@GOTPAGEOFF]
	ldr	w0, [x23]
	str	w0, [sp, #44]
	bl	_DoubleWordSwap
	add	x0, sp, #32
	add	x1, sp, #44
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x24, #0
	mov	x25, #0
	add	x8, sp, #8
	orr	x20, x8, #0x4
	add	x21, x8, #8
	add	x22, x8, #12
Lloh6:
	adrp	x26, _cheatlist@GOTPAGE
Lloh7:
	ldr	x26, [x26, _cheatlist@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	add	x1, x8, x24
	add	x0, sp, #8
	mov	w2, #16
	bl	_memcpy
	ldr	w0, [sp, #8]
	bl	_DoubleWordSwap
	ldr	w0, [sp, #12]
	bl	_DoubleWordSwap
	ldr	w0, [sp, #16]
	bl	_DoubleWordSwap
	ldr	w0, [sp, #20]
	bl	_DoubleWordSwap
	add	x0, sp, #32
	add	x1, sp, #8
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	add	x0, sp, #32
	mov	x1, x20
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	add	x0, sp, #32
	mov	x1, x21
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x26]
	ldr	x0, [x8, x24]
	bl	_strlen
	add	w8, w0, #1
	str	w8, [sp, #28]
	add	x0, sp, #32
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x26]
	ldr	x1, [x8, x24]
	ldr	w3, [sp, #28]
	add	x0, sp, #32
	mov	w2, #1
	mov	x4, x19
	bl	_ywrite
	add	x0, sp, #32
	mov	x1, x22
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	add	x25, x25, #1
	ldrsw	x8, [x23]
	add	x24, x24, #8
	cmp	x25, x8
	b.lt	LBB0_4
LBB0_5:
	mov	x0, x19
	bl	_fclose
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wb"

l_.str.1:                               ; @.str.1
	.asciz	"YCHT"

	.comm	_numcheats,4,2                  ; @numcheats
	.comm	_cheatlist,8,3                  ; @cheatlist
.subsections_via_symbols
