	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_user_friends_online            ## -- Begin function user_friends_online
	.p2align	4, 0x90
_user_friends_online:                   ## @user_friends_online
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	$-1, %r13d
	testl	%esi, %esi
	js	LBB0_10
## %bb.1:
	testl	%edi, %edi
	jle	LBB0_10
## %bb.2:
	movq	_MAX_USER_FRIENDS@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jl	LBB0_10
## %bb.3:
	testl	%esi, %esi
	je	LBB0_4
## %bb.5:
	movq	_FRIEND_MULT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	imull	%edi, %r12d
	negl	%edi
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r14d
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%r15
	cmpq	%r15, %r14
	je	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r15,4), %edi
	callq	_get_user_f
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rbx
	incl	%r13d
	movl	(%rax), %edi
	movl	%r12d, %esi
	callq	_stree_delete
	movq	_now@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_stree_insert
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_adjust_online_tree
	movq	_minsert_flag@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	xorl	%edx, %edx
	movl	$8, %ecx
	callq	_update_history
	jmp	LBB0_9
LBB0_4:
	xorl	%r13d, %r13d
LBB0_10:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FRIEND_MULT,4,2                ## @FRIEND_MULT
	.comm	_MAX_USER_FRIENDS,4,2           ## @MAX_USER_FRIENDS
	.comm	_now,4,2                        ## @now
	.comm	_minsert_flag,4,2               ## @minsert_flag
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_user_friends_online            ; -- Begin function user_friends_online
	.p2align	2
_user_friends_online:                   ; @user_friends_online
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	w19, #-1
	tbnz	w1, #31, LBB0_10
; %bb.1:
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.2:
Lloh0:
	adrp	x8, _MAX_USER_FRIENDS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_USER_FRIENDS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.lt	LBB0_10
; %bb.3:
	cbz	w1, LBB0_9
; %bb.4:
	mov	x20, x2
	mov	w19, #0
Lloh3:
	adrp	x8, _FRIEND_MULT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FRIEND_MULT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mul	w21, w8, w0
	neg	w22, w0
	mov	w24, w1
Lloh6:
	adrp	x25, _now@GOTPAGE
Lloh7:
	ldr	x25, [x25, _now@GOTPAGEOFF]
Lloh8:
	adrp	x26, _minsert_flag@GOTPAGE
Lloh9:
	ldr	x26, [x26, _minsert_flag@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x20, x20, #4
	subs	x24, x24, #1
	b.eq	LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	bl	_get_user_f
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x23, x0
	add	w19, w19, #1
	ldr	w0, [x0]
	mov	x1, x21
	bl	_stree_delete
	ldr	w2, [x25]
	mov	x1, x21
	bl	_stree_insert
	str	w0, [x23]
	mov	x0, x23
	bl	_adjust_online_tree
	ldr	w8, [x26]
	cbnz	w8, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	mov	x1, x22
	mov	w2, #0
	mov	w3, #8
	bl	_update_history
	b	LBB0_5
LBB0_9:
	mov	w19, #0
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FRIEND_MULT,4,2                ; @FRIEND_MULT
	.comm	_MAX_USER_FRIENDS,4,2           ; @MAX_USER_FRIENDS
	.comm	_now,4,2                        ; @now
	.comm	_minsert_flag,4,2               ; @minsert_flag
.subsections_via_symbols
