	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_friend
_add_friend:                            ## @add_friend
	.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
	movl	$-1, %r12d
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.1:
	movl	%esi, %r15d
	testl	%esi, %esi
	jle	LBB0_10
## %bb.2:
	movl	%edx, %r14d
	movq	%rdi, %rbx
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpl	$4, (%rax)
	jl	LBB0_4
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %ecx
	callq	_fprintf
LBB0_4:
	movl	24(%rbx), %edi
	movl	%r15d, %esi
	callq	_tree_lookup
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	orl	$1, %r14d
	movl	%r14d, (%rax)
	orl	%r14d, 4(%rbx)
LBB0_9:
	movl	%r14d, %r12d
LBB0_10:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	8(%rbx), %rax
	movq	_MAX_FRIENDS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_10
## %bb.7:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_delete_friend_request
	movq	_now@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%rbx), %rcx
	leaq	1(%rcx), %rdx
	cmpq	%rcx, %rax
	cmovgq	%rax, %rdx
	movq	%rdx, 16(%rbx)
	movl	24(%rbx), %r12d
	xorl	%eax, %eax
	callq	_lrand48
	orl	$1, %r14d
	movq	16(%rbx), %r8
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	movl	%r14d, %ecx
	callq	_tree_insert
	movl	%eax, 24(%rbx)
	incq	8(%rbx)
	movq	_reverse_friends_mode@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_rev_friends@GOTPCREL(%rip), %r13
	movl	(%r13), %r12d
	movl	(%rbx), %ebx
	xorl	%eax, %eax
	callq	_lrand48
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	callq	_rev_friends_insert
	movl	%eax, (%r13)
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_verbosity,4,2                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"add_friend. user_id = %d, friend_id = %d\n"

	.comm	_MAX_FRIENDS,8,3                ## @MAX_FRIENDS
	.comm	_now,8,3                        ## @now
	.comm	_reverse_friends_mode,8,3       ## @reverse_friends_mode
	.comm	_rev_friends,4,2                ## @rev_friends
	.no_dead_strip	_add_friend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_friend
_add_friend:                            ; @add_friend
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	w21, #-1
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x1
	cmp	w1, #1
	b.lt	LBB0_10
; %bb.2:
	mov	x22, x2
	mov	x20, x0
Lloh0:
	adrp	x8, _verbosity@GOTPAGE
Lloh1:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #4
	b.lt	LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _stderr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w2, [x20]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x19
	bl	_fprintf
LBB0_4:
	ldr	w0, [x20, #24]
	mov	x1, x19
	bl	_tree_lookup
	cbz	x0, LBB0_6
; %bb.5:
	orr	w21, w22, #0x1
	str	w21, [x0]
	ldr	w8, [x20, #4]
	orr	w8, w8, w21
	str	w8, [x20, #4]
	b	LBB0_10
LBB0_6:
	ldr	x8, [x20, #8]
Lloh8:
	adrp	x9, _MAX_FRIENDS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MAX_FRIENDS@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_9
; %bb.7:
	mov	x0, x20
	mov	x1, x19
	bl	_delete_friend_request
Lloh11:
	adrp	x8, _now@GOTPAGE
Lloh12:
	ldr	x8, [x8, _now@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	x9, [x20, #16]
	cmp	x8, x9
	csinc	x8, x8, x9, gt
	str	x8, [x20, #16]
	ldr	w23, [x20, #24]
	bl	_lrand48
	mov	x2, x0
	orr	w21, w22, #0x1
	ldr	x4, [x20, #16]
	mov	x0, x23
	mov	x1, x19
	mov	x3, x21
	bl	_tree_insert
	str	w0, [x20, #24]
	ldr	x8, [x20, #8]
	add	x8, x8, #1
	str	x8, [x20, #8]
Lloh14:
	adrp	x8, _reverse_friends_mode@GOTPAGE
Lloh15:
	ldr	x8, [x8, _reverse_friends_mode@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.8:
Lloh17:
	adrp	x23, _rev_friends@GOTPAGE
Lloh18:
	ldr	x23, [x23, _rev_friends@GOTPAGEOFF]
	ldr	w22, [x23]
	ldr	w20, [x20]
	bl	_lrand48
	mov	x3, x0
	mov	x0, x22
	mov	x1, x19
	mov	x2, x20
	mov	w4, #0
	bl	_rev_friends_insert
	str	w0, [x23]
	b	LBB0_10
LBB0_9:
	mov	w21, #-1
LBB0_10:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_verbosity,4,2                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"add_friend. user_id = %d, friend_id = %d\n"

	.comm	_MAX_FRIENDS,8,3                ; @MAX_FRIENDS
	.comm	_now,8,3                        ; @now
	.comm	_reverse_friends_mode,8,3       ; @reverse_friends_mode
	.comm	_rev_friends,4,2                ; @rev_friends
	.no_dead_strip	_add_friend
.subsections_via_symbols
