	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prepare_recent_friends         ## -- Begin function prepare_recent_friends
	.p2align	4, 0x90
_prepare_recent_friends:                ## @prepare_recent_friends
	.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	%esi, %ebx
	callq	_get_user
	movq	%rax, %r14
	leal	-1001(%rbx), %ecx
	movl	$-1, %eax
	cmpl	$-1000, %ecx                    ## imm = 0xFC18
	jb	LBB0_6
## %bb.1:
	testq	%r14, %r14
	je	LBB0_6
## %bb.2:
	movq	_R_max@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movq	_HN@GOTPCREL(%rip), %r15
	movl	$0, (%r15)
	movl	4(%r14), %edi
	callq	_tree_fetch_recent
	xorl	%eax, %eax
	callq	_aux_heap_sort
	movq	_R@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_R_end@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	cmpl	$0, (%r15)
	jle	LBB0_5
## %bb.3:
	movq	_H@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rsi,8), %rdi
	movl	8(%rdi), %ebx
	movl	%ebx, (%rax)
	movl	4(%rdi), %ebx
	movl	%ebx, 4(%rax)
	movl	(%rdi), %edi
	movl	%edi, 8(%rax)
	addq	$12, %rax
	movq	%rax, (%rcx)
	incq	%rsi
	movslq	(%r15), %rdi
	cmpq	%rdi, %rsi
	jl	LBB0_4
LBB0_5:
	movl	(%r14), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R_max,4,2                      ## @R_max
	.comm	_HN,4,2                         ## @HN
	.comm	_R,8,3                          ## @R
	.comm	_R_end,8,3                      ## @R_end
	.comm	_H,8,3                          ## @H
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prepare_recent_friends         ; -- Begin function prepare_recent_friends
	.p2align	2
_prepare_recent_friends:                ; @prepare_recent_friends
	.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, x1
	bl	_get_user
	mov	x19, x0
	sub	w8, w20, #1001
	mov	w0, #-1
	cmn	w8, #1000
	b.lo	LBB0_6
; %bb.1:
	cbz	x19, LBB0_6
; %bb.2:
Lloh0:
	adrp	x8, _R_max@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R_max@GOTPAGEOFF]
Lloh2:
	str	w20, [x8]
Lloh3:
	adrp	x20, _HN@GOTPAGE
Lloh4:
	ldr	x20, [x20, _HN@GOTPAGEOFF]
	str	wzr, [x20]
	ldr	w0, [x19, #4]
	bl	_tree_fetch_recent
	bl	_aux_heap_sort
Lloh5:
	adrp	x8, _R@GOTPAGE
Lloh6:
	ldr	x8, [x8, _R@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _R_end@GOTPAGE
Lloh9:
	ldr	x9, [x9, _R_end@GOTPAGEOFF]
	str	x8, [x9]
	ldr	w10, [x20]
	cmp	w10, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x10, #0
Lloh10:
	adrp	x11, _H@GOTPAGE
Lloh11:
	ldr	x11, [x11, _H@GOTPAGEOFF]
Lloh12:
	ldr	x11, [x11]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11, x10, lsl #3]
	ldr	w13, [x12, #8]
	str	w13, [x8]
	ldr	w13, [x12, #4]
	str	w13, [x8, #4]
	ldr	w12, [x12]
	str	w12, [x8, #8]
	add	x8, x8, #12
	str	x8, [x9]
	add	x10, x10, #1
	ldrsw	x12, [x20]
	cmp	x10, x12
	b.lt	LBB0_4
LBB0_5:
	ldr	w0, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_R_max,4,2                      ; @R_max
	.comm	_HN,4,2                         ; @HN
	.comm	_R,8,3                          ; @R
	.comm	_R_end,8,3                      ; @R_end
	.comm	_H,8,3                          ; @H
.subsections_via_symbols
