	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_friend_list                ## -- Begin function set_friend_list
	.p2align	4, 0x90
_set_friend_list:                       ## @set_friend_list
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpl	$4, (%rax)
	jl	LBB0_4
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %edx
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
LBB0_4:
	movq	%r13, %rdi
	callq	_free_friend_list
	testq	%r14, %r14
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	je	LBB0_7
## %bb.5:
	testl	%ebx, %ebx
	jle	LBB0_6
## %bb.11:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	%ebx, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	$1, %r15d
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	%edx, %ecx
	orl	$1, %ecx
	movl	%ecx, (%rax)
	movl	%ebx, 4(%rax)
	movq	%rbx, %r13
LBB0_17:                                ##   in Loop: Header=BB0_12 Depth=1
	orl	%edx, %r15d
	cmpl	%r13d, -88(%rbp)                ## 4-byte Folded Reload
	je	LBB0_22
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	leaq	1(%r13), %rbx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14,%r13,8), %esi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	callq	_tree_lookup
	movl	4(%r14,%r13,8), %edx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	addq	%r13, %r13
	xorl	%eax, %eax
	callq	_lrand48
	movl	4(%r14,%r13,4), %ecx
	orl	$1, %ecx
	movq	%r12, %rdi
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %esi
	movl	%eax, %edx
	movl	%ebx, %r8d
	callq	_tree_insert
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	incl	4(%rcx)
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_reverse_friends_mode@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	%rbx, %r13
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_rev_friends@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	(%rcx), %ebx
	xorl	%eax, %eax
	callq	_lrand48
	movl	-72(%rbp), %edi                 ## 4-byte Reload
	movl	%r12d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	callq	_rev_friends_insert
	movl	%eax, (%r14)
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_17
LBB0_1:
	movl	$-1, %eax
	retq
LBB0_7:
	testl	%ebx, %ebx
	jle	LBB0_6
## %bb.8:
	movl	%ebx, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%ebx, 4(%rax)
	movl	$1, (%rax)
LBB0_20:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpl	%ebx, -48(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_21
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rbx,4), %r14d
	incq	%rbx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_tree_lookup
	testq	%rax, %rax
	jne	LBB0_10
## %bb.18:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%eax, %eax
	callq	_lrand48
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	movl	$1, %ecx
	movl	%ebx, %r8d
	callq	_tree_insert
	incl	4(%r13)
	movq	%rax, %r15
	movq	_reverse_friends_mode@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r15, %r12
	movq	_rev_friends@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	(%r13), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_lrand48
	movl	%r15d, %edi
	movq	%r12, %r15
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	%r14d, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	callq	_rev_friends_insert
	movq	_rev_friends@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_20
LBB0_6:
	movl	$1, %r15d
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_22
LBB0_21:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	$1, %r15d
LBB0_22:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 16(%rax)
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 8(%rax)
	movl	%r15d, 12(%rax)
	movl	4(%rax), %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_verbosity,4,2                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set_friend_list. user_id = %d\n"

	.comm	_reverse_friends_mode,8,3       ## @reverse_friends_mode
	.comm	_rev_friends,4,2                ## @rev_friends
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_friend_list                ; -- Begin function set_friend_list
	.p2align	2
_set_friend_list:                       ; @set_friend_list
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_11
; %bb.1:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_remember_state
	mov	x22, x3
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _verbosity@GOTPAGE
Lloh1:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #4
	b.lt	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _stderr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w2, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_3:
	mov	x0, x19
	bl	_free_friend_list
	cbz	x23, LBB0_12
; %bb.4:
	cmp	w20, #1
	b.lt	LBB0_19
; %bb.5:
	mov	w25, #0
	mov	x21, #0
	add	x27, x23, #4
	mov	w26, #1
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	orr	w8, w28, #0x1
	stp	w8, w23, [x0]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	orr	w26, w28, w26
	add	x27, x27, #8
	add	w25, w25, #1
	cmp	w20, w25
	b.eq	LBB0_22
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	w23, w25, #1
	ldur	w22, [x27, #-4]
	mov	x0, x21
	mov	x1, x22
	bl	_tree_lookup
	ldr	w28, [x27]
	cbnz	x0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	bl	_lrand48
	mov	x2, x0
	ldr	w8, [x27]
	orr	w3, w8, #0x1
	mov	x0, x21
	mov	x1, x22
	mov	x4, x23
	bl	_tree_insert
	mov	x21, x0
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
Lloh8:
	adrp	x8, _reverse_friends_mode@GOTPAGE
Lloh9:
	ldr	x8, [x8, _reverse_friends_mode@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh11:
	adrp	x8, _rev_friends@GOTPAGE
Lloh12:
	ldr	x8, [x8, _rev_friends@GOTPAGEOFF]
Lloh13:
	ldr	w23, [x8]
	ldr	w24, [x19]
	bl	_lrand48
	mov	x3, x0
	mov	x0, x23
	mov	x1, x22
	mov	x2, x24
	mov	w4, #0
	bl	_rev_friends_insert
Lloh14:
	adrp	x8, _rev_friends@GOTPAGE
Lloh15:
	ldr	x8, [x8, _rev_friends@GOTPAGEOFF]
Lloh16:
	str	w0, [x8]
	b	LBB0_7
LBB0_11:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	.cfi_same_value w25
	.cfi_same_value w26
	.cfi_same_value w27
	.cfi_same_value w28
	mov	w0, #-1
	ret
LBB0_12:
	.cfi_restore_state
	mov	w26, #1
	cmp	w20, #1
	b.lt	LBB0_21
; %bb.13:
	mov	x27, #0
	mov	x21, #0
	mov	w28, w20
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	stp	w26, w24, [x0]
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	add	x27, x27, #1
	cmp	w28, w27
	b.eq	LBB0_20
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	add	x24, x27, #1
	ldr	w23, [x22, x27, lsl #2]
	mov	x0, x21
	mov	x1, x23
	bl	_tree_lookup
	cbnz	x0, LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	bl	_lrand48
	mov	x2, x0
	mov	x0, x21
	mov	x1, x23
	mov	w3, #1
	mov	x4, x24
	bl	_tree_insert
	mov	x21, x0
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
Lloh17:
	adrp	x8, _reverse_friends_mode@GOTPAGE
Lloh18:
	ldr	x8, [x8, _reverse_friends_mode@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cbz	x8, LBB0_15
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
Lloh20:
	adrp	x8, _rev_friends@GOTPAGE
Lloh21:
	ldr	x8, [x8, _rev_friends@GOTPAGEOFF]
Lloh22:
	ldr	w24, [x8]
	ldr	w25, [x19]
	bl	_lrand48
	mov	x3, x0
	mov	x0, x24
	mov	x1, x23
	mov	x2, x25
	mov	w4, #0
	bl	_rev_friends_insert
Lloh23:
	adrp	x8, _rev_friends@GOTPAGE
Lloh24:
	ldr	x8, [x8, _rev_friends@GOTPAGEOFF]
Lloh25:
	str	w0, [x8]
	b	LBB0_15
LBB0_19:
	mov	x21, #0
LBB0_20:
	mov	w26, #1
	b	LBB0_22
LBB0_21:
	mov	x21, #0
LBB0_22:
	str	x21, [x19, #16]
	stp	w20, w26, [x19, #8]
	ldr	w0, [x19, #4]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 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 AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_verbosity,4,2                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set_friend_list. user_id = %d\n"

	.comm	_reverse_friends_mode,8,3       ; @reverse_friends_mode
	.comm	_rev_friends,4,2                ; @rev_friends
.subsections_via_symbols
