	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function PlayerModel_MenuKey
_PlayerModel_MenuKey:                   ## @PlayerModel_MenuKey
	.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
	movl	%edi, %ebx
	leal	-128(%rbx), %eax
	cmpl	$5, %eax
	ja	LBB0_18
## %bb.1:
	movl	$9, %ecx
	btl	%eax, %ecx
	jb	LBB0_11
## %bb.2:
	movl	$20, %ecx
	btl	%eax, %ecx
	jae	LBB0_17
## %bb.3:
	movq	_s_playermodel@GOTPCREL(%rip), %r15
	leaq	4(%r15), %r14
	movq	%r14, %rdi
	callq	_Menu_ItemAtCursor
	movl	(%rax), %eax
	movq	_ID_PLAYERPIC0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %edx
	subl	%ecx, %edx
	cmpl	$15, %edx
	ja	LBB0_18
## %bb.4:
	cmpl	%ecx, %eax
	jne	LBB0_5
## %bb.8:
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_19
## %bb.9:
	decl	%eax
	movl	%eax, (%r15)
	movl	4(%r15), %esi
	addl	$15, %esi
	jmp	LBB0_10
LBB0_11:
	movq	_s_playermodel@GOTPCREL(%rip), %r15
	leaq	4(%r15), %r14
	movq	%r14, %rdi
	callq	_Menu_ItemAtCursor
	movl	(%rax), %ecx
	movq	_ID_PLAYERPIC0@GOTPCREL(%rip), %rax
	subl	(%rax), %ecx
	cmpl	$15, %ecx
	ja	LBB0_18
## %bb.12:
	movl	(%r15), %eax
	jne	LBB0_13
## %bb.15:
	movl	8(%r15), %ecx
	decl	%ecx
	cmpl	%ecx, %eax
	jge	LBB0_19
## %bb.16:
	incl	%eax
	movl	%eax, (%r15)
	movl	4(%r15), %esi
	addl	$-15, %esi
LBB0_10:
	movq	%r14, %rdi
	callq	_Menu_SetCursor
	xorl	%eax, %eax
	callq	_PlayerModel_UpdateGrid
	movq	_menu_move_sound@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_17:
	xorl	%eax, %eax
	callq	_PlayerModel_SaveChanges
LBB0_18:
	movq	_s_playermodel@GOTPCREL(%rip), %rdi
	addq	$4, %rdi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Menu_DefaultKey                ## TAILCALL
LBB0_5:
	movl	4(%r15), %esi
	decl	%esi
	jmp	LBB0_6
LBB0_13:
	movq	_MAX_MODELSPERPAGE@GOTPCREL(%rip), %rdx
	imull	(%rdx), %eax
	addl	%ecx, %eax
	incl	%eax
	cmpl	12(%r15), %eax
	jge	LBB0_19
## %bb.14:
	movl	4(%r15), %esi
	incl	%esi
LBB0_6:
	movq	%r14, %rdi
	callq	_Menu_SetCursor
	movq	_menu_move_sound@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_19:
	movq	_menu_buzz_sound@GOTPCREL(%rip), %rax
LBB0_20:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_s_playermodel,16,2             ## @s_playermodel
	.comm	_ID_PLAYERPIC0,4,2              ## @ID_PLAYERPIC0
	.comm	_menu_move_sound,4,2            ## @menu_move_sound
	.comm	_menu_buzz_sound,4,2            ## @menu_buzz_sound
	.comm	_MAX_MODELSPERPAGE,4,2          ## @MAX_MODELSPERPAGE
	.no_dead_strip	_PlayerModel_MenuKey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PlayerModel_MenuKey
_PlayerModel_MenuKey:                   ; @PlayerModel_MenuKey
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	sub	w8, w0, #128
Lloh0:
	adrp	x19, _s_playermodel@GOTPAGE
Lloh1:
	ldr	x19, [x19, _s_playermodel@GOTPAGEOFF]
	cmp	w8, #5
	b.hi	LBB0_13
; %bb.1:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #9
	tst	w8, w9
	b.ne	LBB0_7
; %bb.2:
	mov	w9, #20
	tst	w8, w9
	b.eq	LBB0_12
; %bb.3:
	add	x0, x19, #4
	bl	_Menu_ItemAtCursor
	ldr	w8, [x0]
Lloh2:
	adrp	x9, _ID_PLAYERPIC0@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ID_PLAYERPIC0@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	sub	w10, w8, w9
	cmp	w10, #15
	b.hi	LBB0_13
; %bb.4:
	cmp	w8, w9
	b.ne	LBB0_14
; %bb.5:
	ldr	w8, [x19]
	subs	w8, w8, #1
	b.lt	LBB0_19
; %bb.6:
	str	w8, [x19]
	ldr	w8, [x19, #4]!
	add	w1, w8, #15
	b	LBB0_11
LBB0_7:
	add	x0, x19, #4
	bl	_Menu_ItemAtCursor
	ldr	w8, [x0]
Lloh5:
	adrp	x9, _ID_PLAYERPIC0@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ID_PLAYERPIC0@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	sub	w9, w8, w9
	cmp	w9, #15
	b.hi	LBB0_13
; %bb.8:
	ldr	w8, [x19]
	b.ne	LBB0_15
; %bb.9:
	ldr	w9, [x19, #8]
	sub	w9, w9, #1
	cmp	w8, w9
	b.ge	LBB0_19
; %bb.10:
	add	w8, w8, #1
	str	w8, [x19]
	ldr	w8, [x19, #4]!
	sub	w1, w8, #15
LBB0_11:
	mov	x0, x19
	bl	_Menu_SetCursor
	bl	_PlayerModel_UpdateGrid
	b	LBB0_18
LBB0_12:
	bl	_PlayerModel_SaveChanges
LBB0_13:
	add	x0, x19, #4
	mov	x1, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_Menu_DefaultKey
LBB0_14:
	ldr	w8, [x19, #4]!
	sub	w1, w8, #1
	b	LBB0_17
LBB0_15:
Lloh8:
	adrp	x10, _MAX_MODELSPERPAGE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MAX_MODELSPERPAGE@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	madd	w8, w10, w8, w9
	add	w8, w8, #1
	ldr	w9, [x19, #12]
	cmp	w8, w9
	b.ge	LBB0_19
; %bb.16:
	ldr	w8, [x19, #4]!
	add	w1, w8, #1
LBB0_17:
	mov	x0, x19
	bl	_Menu_SetCursor
LBB0_18:
Lloh11:
	adrp	x8, _menu_move_sound@GOTPAGE
Lloh12:
	ldr	x8, [x8, _menu_move_sound@GOTPAGEOFF]
	b	LBB0_20
LBB0_19:
Lloh13:
	adrp	x8, _menu_buzz_sound@GOTPAGE
Lloh14:
	ldr	x8, [x8, _menu_buzz_sound@GOTPAGEOFF]
LBB0_20:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_s_playermodel,16,2             ; @s_playermodel
	.comm	_ID_PLAYERPIC0,4,2              ; @ID_PLAYERPIC0
	.comm	_menu_move_sound,4,2            ; @menu_move_sound
	.comm	_menu_buzz_sound,4,2            ; @menu_buzz_sound
	.comm	_MAX_MODELSPERPAGE,4,2          ; @MAX_MODELSPERPAGE
	.no_dead_strip	_PlayerModel_MenuKey
.subsections_via_symbols
