	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rcheevos_fixup_find            ## -- Begin function rcheevos_fixup_find
	.p2align	4, 0x90
_rcheevos_fixup_find:                   ## @rcheevos_fixup_find
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	cmpl	$0, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	16(%rbx), %rdi
	movl	4(%rbx), %esi
	movq	_rcheevos_cmpaddr@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$16, %edx
	callq	_qsort
	movl	$0, (%rbx)
LBB0_2:
	movl	%r15d, -48(%rbp)
	movq	16(%rbx), %rsi
	movl	4(%rbx), %edx
	movq	_rcheevos_cmpaddr@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-48(%rbp), %rdi
	movl	$16, %ecx
	callq	_bsearch
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	8(%rax), %rax
	jmp	LBB0_10
LBB0_4:
	movl	4(%rbx), %ecx
	cmpl	8(%rbx), %ecx
	jne	LBB0_5
## %bb.6:
	leal	(%rcx,%rcx), %eax
	testl	%ecx, %ecx
	movl	$16, %r12d
	cmovnel	%eax, %r12d
	movq	16(%rbx), %rdi
	movl	%r12d, %esi
	shll	$4, %esi
	callq	_realloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, 16(%rbx)
	movl	%r12d, 8(%rbx)
	movl	4(%rbx), %ecx
	jmp	LBB0_9
LBB0_5:
	movq	16(%rbx), %rax
LBB0_9:
	movslq	%ecx, %rcx
	shlq	$4, %rcx
	movl	%r15d, (%rax,%rcx)
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_rcheevos_patch_address
	movq	16(%rbx), %rcx
	movslq	4(%rbx), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 4(%rbx)
	shlq	$4, %rdx
	movq	%rax, 8(%rcx,%rdx)
	movl	$1, (%rbx)
	jmp	LBB0_10
LBB0_7:
	xorl	%eax, %eax
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rcheevos_cmpaddr,4,2           ## @rcheevos_cmpaddr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rcheevos_fixup_find            ; -- Begin function rcheevos_fixup_find
	.p2align	2
_rcheevos_fixup_find:                   ; @rcheevos_fixup_find
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x22, _rcheevos_cmpaddr@GOTPAGE
Lloh1:
	ldr	x22, [x22, _rcheevos_cmpaddr@GOTPAGEOFF]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	x0, [x19, #16]
	ldr	w1, [x19, #4]
	ldr	w3, [x22]
	mov	w2, #16
	bl	_qsort
	str	wzr, [x19]
LBB0_2:
	str	w21, [sp]
	ldr	x1, [x19, #16]
	ldr	w2, [x19, #4]
	ldr	w4, [x22]
	mov	x0, sp
	mov	w3, #16
	bl	_bsearch
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x0, [x0, #8]
	b	LBB0_9
LBB0_4:
	ldp	w8, w9, [x19, #4]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.5:
	lsl	w9, w8, #1
	mov	w10, #16
	cmp	w8, #0
	csel	w22, w10, w9, eq
	ldr	x0, [x19, #16]
	lsl	w1, w22, #4
	bl	_realloc
	cbz	x0, LBB0_9
; %bb.6:
	str	x0, [x19, #16]
	str	w22, [x19, #8]
	ldr	w8, [x19, #4]
	b	LBB0_8
LBB0_7:
	ldr	x0, [x19, #16]
LBB0_8:
	sbfiz	x8, x8, #4, #32
	str	w21, [x0, x8]
	mov	x0, x21
	mov	x1, x20
	bl	_rcheevos_patch_address
	ldr	x8, [x19, #16]
	ldrsw	x9, [x19, #4]
	add	w10, w9, #1
	str	w10, [x19, #4]
	add	x8, x8, x9, lsl #4
	str	x0, [x8, #8]
	mov	w8, #1
	str	w8, [x19]
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_rcheevos_cmpaddr,4,2           ; @rcheevos_cmpaddr
.subsections_via_symbols
