	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function clear_cheats
_clear_cheats:                          ## @clear_cheats
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_maxcheats@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.1:
	movq	_cart@GOTPCREL(%rip), %r14
	movq	8(%r14), %r11
	incq	%rax
	movq	_cheatlist@GOTPCREL(%rip), %rsi
	movq	_system_hw@GOTPCREL(%rip), %r8
	movq	_SYSTEM_PBC@GOTPCREL(%rip), %r9
	movq	_SYSTEM_MD@GOTPCREL(%rip), %r10
	jmp	LBB0_2
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	16(%rdi,%rdx), %ecx
	andl	$16777214, %ebx                 ## imm = 0xFFFFFE
	movl	%ecx, (%r11,%rbx)
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	decq	%rax
	cmpq	$1, %rax
	jbe	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rsi), %rdi
	leal	-2(%rax), %edx
	shlq	$5, %rdx
	cmpq	$0, 24(%rdi,%rdx)
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rdi,%rdx), %ebx
	cmpl	(%r14), %ebx
	jge	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r9), %ecx
	andl	(%r8), %ecx
	cmpl	(%r10), %ecx
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rdi,%rdx), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rdi,%rdx), %rcx
	addq	$8, %rcx
	movl	16(%rdi,%rdx), %edx
	movl	%edx, (%rbx)
	movq	$0, (%rcx)
	jmp	LBB0_8
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_maxcheats,4,2                  ## @maxcheats
	.comm	_cheatlist,8,3                  ## @cheatlist
	.comm	_cart,16,3                      ## @cart
	.comm	_system_hw,4,2                  ## @system_hw
	.comm	_SYSTEM_PBC,4,2                 ## @SYSTEM_PBC
	.comm	_SYSTEM_MD,4,2                  ## @SYSTEM_MD
	.no_dead_strip	_clear_cheats
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function clear_cheats
_clear_cheats:                          ; @clear_cheats
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _maxcheats@GOTPAGE
Lloh1:
	ldr	x8, [x8, _maxcheats@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x8]
	cmp	w10, #1
	b.lt	LBB0_9
; %bb.1:
Lloh3:
	adrp	x8, _cart@GOTPAGE
Lloh4:
	ldr	x8, [x8, _cart@GOTPAGEOFF]
	ldr	x9, [x8, #8]
	add	x10, x10, #1
Lloh5:
	adrp	x11, _cheatlist@GOTPAGE
Lloh6:
	ldr	x11, [x11, _cheatlist@GOTPAGEOFF]
Lloh7:
	adrp	x12, _system_hw@GOTPAGE
Lloh8:
	ldr	x12, [x12, _system_hw@GOTPAGEOFF]
Lloh9:
	adrp	x13, _SYSTEM_PBC@GOTPAGE
Lloh10:
	ldr	x13, [x13, _SYSTEM_PBC@GOTPAGEOFF]
Lloh11:
	adrp	x14, _SYSTEM_MD@GOTPAGE
Lloh12:
	ldr	x14, [x14, _SYSTEM_MD@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x15, x15, x16, lsl #5
	ldr	w15, [x15, #16]
	and	x16, x17, #0xfffffe
	str	w15, [x9, x16]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	x10, x10, #1
	cmp	x10, #1
	b.ls	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x15, [x11]
	sub	w16, w10, #2
	add	x17, x15, x16, lsl #5
	ldr	x17, [x17, #24]
	cbz	x17, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	lsl	x17, x16, #5
	ldr	w17, [x15, x17]
	ldr	w0, [x8]
	cmp	w17, w0
	b.ge	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x12]
	ldr	w1, [x13]
	and	w0, w1, w0
	ldr	w1, [x14]
	cmp	w0, w1
	b.eq	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x16, x15, x16, lsl #5
	mov	x15, x16
	ldr	x17, [x15, #8]!
	cbz	x17, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w16, [x16, #16]
	str	w16, [x17]
	str	xzr, [x15]
	b	LBB0_3
LBB0_9:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_maxcheats,4,2                  ; @maxcheats
	.comm	_cheatlist,8,3                  ; @cheatlist
	.comm	_cart,16,3                      ; @cart
	.comm	_system_hw,4,2                  ; @system_hw
	.comm	_SYSTEM_PBC,4,2                 ; @SYSTEM_PBC
	.comm	_SYSTEM_MD,4,2                  ; @SYSTEM_MD
	.no_dead_strip	_clear_cheats
.subsections_via_symbols
