	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function menu_loop_patches
_menu_loop_patches:                     ## @menu_loop_patches
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PBTN_DOWN@GOTPCREL(%rip), %rbx
	movq	_PBTN_MOK@GOTPCREL(%rip), %r15
	movq	_PBTN_MBACK@GOTPCREL(%rip), %r12
	movq	_PicoPatchCount@GOTPCREL(%rip), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_PicoPatches@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	xorl	%esi, %esi
	cmpl	$0, (%rdx,%rcx,4)
	sete	%sil
	movl	%esi, (%rdx,%rcx,4)
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, (%r12)
	jne	LBB0_14
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	_menu_loop_patches.menu_sel(%rip), %edi
	callq	_draw_patchlist
	movq	%rbx, %r14
	movl	(%rbx), %edi
	movq	_PBTN_UP@GOTPCREL(%rip), %rbx
	orl	(%rbx), %edi
	movq	_PBTN_LEFT@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_PBTN_RIGHT@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_PBTN_L@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_PBTN_R@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	orl	(%r15), %edi
	orl	(%r12), %edi
	xorl	%esi, %esi
	movl	$33, %edx
	callq	_in_menu_wait
	testl	%eax, (%rbx)
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	_menu_loop_patches.menu_sel(%rip), %ecx
	leal	-1(%rcx), %edx
	movl	%edx, _menu_loop_patches.menu_sel(%rip)
	testl	%ecx, %ecx
	jg	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r13), %ecx
	movl	%ecx, _menu_loop_patches.menu_sel(%rip)
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rbx
	testl	%eax, (%r14)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	_menu_loop_patches.menu_sel(%rip), %ecx
	cmpl	(%r13), %ecx
	leal	1(%rcx), %ecx
	movl	$0, %edx
	cmovgel	%edx, %ecx
	movl	%ecx, _menu_loop_patches.menu_sel(%rip)
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_PBTN_L@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_PBTN_LEFT@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	_menu_loop_patches.menu_sel(%rip), %ecx
	cmpl	$11, %ecx
	movl	$10, %edx
	cmovll	%edx, %ecx
	addl	$-10, %ecx
	movl	%ecx, _menu_loop_patches.menu_sel(%rip)
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_PBTN_R@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_PBTN_RIGHT@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	_menu_loop_patches.menu_sel(%rip), %ecx
	addl	$10, %ecx
	movl	(%r13), %edx
	cmpl	%edx, %ecx
	cmovgel	%edx, %ecx
	movl	%ecx, _menu_loop_patches.menu_sel(%rip)
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, (%r15)
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movslq	_menu_loop_patches.menu_sel(%rip), %rcx
	cmpl	(%r13), %ecx
	jl	LBB0_12
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_menu_loop_patches.menu_sel,4,2 ## @menu_loop_patches.menu_sel
	.comm	_PBTN_UP,4,2                    ## @PBTN_UP
	.comm	_PBTN_DOWN,4,2                  ## @PBTN_DOWN
	.comm	_PBTN_LEFT,4,2                  ## @PBTN_LEFT
	.comm	_PBTN_RIGHT,4,2                 ## @PBTN_RIGHT
	.comm	_PBTN_L,4,2                     ## @PBTN_L
	.comm	_PBTN_R,4,2                     ## @PBTN_R
	.comm	_PBTN_MOK,4,2                   ## @PBTN_MOK
	.comm	_PBTN_MBACK,4,2                 ## @PBTN_MBACK
	.comm	_PicoPatchCount,4,2             ## @PicoPatchCount
	.comm	_PicoPatches,8,3                ## @PicoPatches
	.no_dead_strip	_menu_loop_patches
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function menu_loop_patches
_menu_loop_patches:                     ; @menu_loop_patches
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x19, _PBTN_UP@GOTPAGE
Lloh1:
	ldr	x19, [x19, _PBTN_UP@GOTPAGEOFF]
Lloh2:
	adrp	x20, _PBTN_DOWN@GOTPAGE
Lloh3:
	ldr	x20, [x20, _PBTN_DOWN@GOTPAGEOFF]
Lloh4:
	adrp	x21, _PBTN_LEFT@GOTPAGE
Lloh5:
	ldr	x21, [x21, _PBTN_LEFT@GOTPAGEOFF]
Lloh6:
	adrp	x22, _PBTN_RIGHT@GOTPAGE
Lloh7:
	ldr	x22, [x22, _PBTN_RIGHT@GOTPAGEOFF]
Lloh8:
	adrp	x23, _PBTN_L@GOTPAGE
Lloh9:
	ldr	x23, [x23, _PBTN_L@GOTPAGEOFF]
Lloh10:
	adrp	x24, _PBTN_R@GOTPAGE
Lloh11:
	ldr	x24, [x24, _PBTN_R@GOTPAGEOFF]
Lloh12:
	adrp	x25, _PBTN_MOK@GOTPAGE
Lloh13:
	ldr	x25, [x25, _PBTN_MOK@GOTPAGEOFF]
Lloh14:
	adrp	x26, _PBTN_MBACK@GOTPAGE
Lloh15:
	ldr	x26, [x26, _PBTN_MBACK@GOTPAGEOFF]
	adrp	x27, _menu_loop_patches.menu_sel@PAGE
Lloh16:
	adrp	x28, _PicoPatchCount@GOTPAGE
Lloh17:
	ldr	x28, [x28, _PicoPatchCount@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh18:
	adrp	x9, _PicoPatches@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PicoPatches@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	lsl	x8, x8, #2
	ldr	w10, [x9, x8]
	cmp	w10, #0
	cset	w10, eq
	str	w10, [x9, x8]
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x26]
	tst	w8, w0
	b.ne	LBB0_14
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x27, _menu_loop_patches.menu_sel@PAGEOFF]
	bl	_draw_patchlist
	ldr	w8, [x19]
	ldr	w9, [x20]
	orr	w8, w9, w8
	ldr	w9, [x21]
	orr	w8, w8, w9
	ldr	w9, [x22]
	orr	w8, w8, w9
	ldr	w9, [x23]
	orr	w8, w8, w9
	ldr	w9, [x24]
	orr	w8, w8, w9
	ldr	w9, [x25]
	orr	w8, w8, w9
	ldr	w9, [x26]
	orr	w0, w8, w9
	mov	x1, #0
	mov	w2, #33
	bl	_in_menu_wait
	ldr	w8, [x19]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x27, _menu_loop_patches.menu_sel@PAGEOFF]
	sub	w9, w8, #1
	str	w9, [x27, _menu_loop_patches.menu_sel@PAGEOFF]
	cmp	w8, #0
	b.gt	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x28]
	str	w8, [x27, _menu_loop_patches.menu_sel@PAGEOFF]
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x27, _menu_loop_patches.menu_sel@PAGEOFF]
	ldr	w9, [x28]
	cmp	w8, w9
	csinc	w8, wzr, w8, ge
	str	w8, [x27, _menu_loop_patches.menu_sel@PAGEOFF]
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21]
	ldr	w9, [x23]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x27, _menu_loop_patches.menu_sel@PAGEOFF]
	cmp	w8, #10
	mov	w9, #10
	csel	w8, w8, w9, gt
	sub	w8, w8, #10
	str	w8, [x27, _menu_loop_patches.menu_sel@PAGEOFF]
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x22]
	ldr	w9, [x24]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x27, _menu_loop_patches.menu_sel@PAGEOFF]
	add	w8, w8, #10
	ldr	w9, [x28]
	cmp	w8, w9
	csel	w8, w8, w9, lt
	str	w8, [x27, _menu_loop_patches.menu_sel@PAGEOFF]
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	ldrsw	x8, [x27, _menu_loop_patches.menu_sel@PAGEOFF]
	ldr	w9, [x28]
	cmp	w8, w9
	b.lt	LBB0_1
LBB0_14:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_menu_loop_patches.menu_sel,4,2 ; @menu_loop_patches.menu_sel
	.comm	_PBTN_UP,4,2                    ; @PBTN_UP
	.comm	_PBTN_DOWN,4,2                  ; @PBTN_DOWN
	.comm	_PBTN_LEFT,4,2                  ; @PBTN_LEFT
	.comm	_PBTN_RIGHT,4,2                 ; @PBTN_RIGHT
	.comm	_PBTN_L,4,2                     ; @PBTN_L
	.comm	_PBTN_R,4,2                     ; @PBTN_R
	.comm	_PBTN_MOK,4,2                   ; @PBTN_MOK
	.comm	_PBTN_MBACK,4,2                 ; @PBTN_MBACK
	.comm	_PicoPatchCount,4,2             ; @PicoPatchCount
	.comm	_PicoPatches,8,3                ; @PicoPatches
	.no_dead_strip	_menu_loop_patches
.subsections_via_symbols
