	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CheatLoad                      ## -- Begin function CheatLoad
	.p2align	4, 0x90
_CheatLoad:                             ## @CheatLoad
	.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	$280, %rsp                      ## imm = 0x118
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -312(%rbp)
	movl	$-1, %r12d
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.1:
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	movq	%rax, %rbx
	leaq	-312(%rbp), %rdi
	leaq	-320(%rbp), %r14
	movq	%r14, %rsi
	movl	$1, %edx
	movl	$4, %ecx
	movq	%rax, %r8
	callq	_yread
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_strncmp
	movl	$-2, %r12d
	testq	%rax, %rax
	jne	LBB0_9
## %bb.3:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_CheatClearCodes
	movq	_numcheats@GOTPCREL(%rip), %r13
	leaq	-312(%rbp), %rdi
	movq	%r13, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_yread
	movl	(%r13), %edi
	callq	_DoubleWordSwap
	movl	(%r13), %eax
	movq	_cheatsize@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	cmpl	%esi, %eax
	jl	LBB0_5
## %bb.4:
	movq	_cheatlist@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	shll	$3, %esi
	callq	_realloc
	movq	%rax, (%r15)
	movl	(%r14), %edx
	shll	$3, %edx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_memset
	shll	(%r14)
	movl	(%r13), %eax
LBB0_5:
	testl	%eax, %eax
	jle	LBB0_9
## %bb.6:
	movq	%rbx, %r13
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	_cheatlist@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rax, %r12
	addq	%r15, %rsi
	leaq	-312(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r13, %r8
	callq	_yread
	movq	(%r12), %rax
	leaq	(%rax,%r15), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r13, %r8
	callq	_yread
	movq	(%r12), %rax
	leaq	(%rax,%r15), %rsi
	addq	$8, %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r13, %r8
	callq	_yread
	movq	%rbx, %rdi
	leaq	-316(%rbp), %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r13, %r8
	callq	_yread
	movl	-316(%rbp), %ecx
	movq	%rbx, %rdi
	leaq	-304(%rbp), %r12
	movq	%r12, %rsi
	movl	$1, %edx
	movq	%r13, %r8
	callq	_yread
	movl	%r14d, %edi
	movq	%r12, %rsi
	callq	_CheatChangeDescriptionByIndex
	movq	_cheatlist@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	leaq	(%rax,%r15), %rsi
	addq	$12, %rsi
	leaq	-312(%rbp), %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r13, %r8
	callq	_yread
	movq	(%rbx), %rax
	movl	(%rax,%r15), %edi
	callq	_DoubleWordSwap
	movq	(%rbx), %rax
	movl	4(%rax,%r15), %edi
	callq	_DoubleWordSwap
	movq	(%rbx), %rax
	movl	8(%rax,%r15), %edi
	callq	_DoubleWordSwap
	movq	(%rbx), %rax
	movl	12(%rax,%r15), %edi
	callq	_DoubleWordSwap
	incq	%r14
	movq	_numcheats@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$16, %r15
	cmpq	%rax, %r14
	jl	LBB0_7
## %bb.8:
	xorl	%r12d, %r12d
	movq	%r13, %rbx
LBB0_9:
	movq	%rbx, %rdi
	callq	_fclose
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%r12d, %eax
	addq	$280, %rsp                      ## imm = 0x118
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

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

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CheatLoad                      ; -- Begin function CheatLoad
	.p2align	2
_CheatLoad:                             ; @CheatLoad
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #352
	.cfi_def_cfa_offset 352
	stp	x24, x23, [sp, #288]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #304]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #320]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #336]            ; 16-byte Folded Spill
	add	x29, sp, #336
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	str	xzr, [sp, #8]
	cbz	x0, LBB0_4
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_4
; %bb.2:
	mov	x19, x0
	add	x0, sp, #8
	add	x1, sp, #20
	mov	w2, #1
	mov	w3, #4
	mov	x4, x19
	bl	_yread
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #20
	mov	w2, #4
	bl	_strncmp
	cbz	x0, LBB0_5
; %bb.3:
	mov	w20, #-2
	b	LBB0_11
LBB0_4:
	mov	w20, #-1
	b	LBB0_12
LBB0_5:
	bl	_CheatClearCodes
Lloh7:
	adrp	x20, _numcheats@GOTPAGE
Lloh8:
	ldr	x20, [x20, _numcheats@GOTPAGEOFF]
	add	x0, sp, #8
	mov	x1, x20
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	ldr	w0, [x20]
	bl	_DoubleWordSwap
	ldr	w8, [x20]
Lloh9:
	adrp	x21, _cheatsize@GOTPAGE
Lloh10:
	ldr	x21, [x21, _cheatsize@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh11:
	adrp	x22, _cheatlist@GOTPAGE
Lloh12:
	ldr	x22, [x22, _cheatlist@GOTPAGEOFF]
	cmp	w8, w9
	b.lt	LBB0_7
; %bb.6:
	ldr	x0, [x22]
	lsl	w1, w9, #3
	bl	_realloc
	str	x0, [x22]
	ldr	w8, [x21]
	lsl	w2, w8, #3
	mov	w1, #0
	bl	_memset
	ldr	w8, [x21]
	lsl	w8, w8, #1
	str	w8, [x21]
	ldr	w8, [x20]
LBB0_7:
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x23, #0
	mov	x21, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	add	x1, x8, x23
	add	x0, sp, #8
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	ldr	x8, [x22]
	add	x8, x8, x23
	add	x1, x8, #4
	add	x0, sp, #8
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	ldr	x8, [x22]
	add	x8, x8, x23
	add	x1, x8, #8
	add	x0, sp, #8
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	add	x0, sp, #8
	add	x1, sp, #4
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	ldr	w3, [sp, #4]
	add	x0, sp, #8
	add	x1, sp, #24
	mov	w2, #1
	mov	x4, x19
	bl	_yread
	add	x1, sp, #24
	mov	x0, x21
	bl	_CheatChangeDescriptionByIndex
	ldr	x8, [x22]
	add	x8, x8, x23
	add	x1, x8, #12
	add	x0, sp, #8
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	ldr	x8, [x22]
	ldr	w0, [x8, x23]
	bl	_DoubleWordSwap
	ldr	x8, [x22]
	add	x8, x8, x23
	ldr	w0, [x8, #4]
	bl	_DoubleWordSwap
	ldr	x8, [x22]
	add	x8, x8, x23
	ldr	w0, [x8, #8]
	bl	_DoubleWordSwap
	ldr	x8, [x22]
	add	x8, x8, x23
	ldr	w0, [x8, #12]
	bl	_DoubleWordSwap
	add	x21, x21, #1
	ldrsw	x8, [x20]
	add	x23, x23, #16
	cmp	x21, x8
	b.lt	LBB0_9
LBB0_10:
	mov	w20, #0
LBB0_11:
	mov	x0, x19
	bl	_fclose
LBB0_12:
	ldur	x8, [x29, #-56]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x20
	ldp	x29, x30, [sp, #336]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #320]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #304]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #288]            ; 16-byte Folded Reload
	add	sp, sp, #352
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

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

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