	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_add_friend                  ## -- Begin function do_add_friend
	.p2align	4, 0x90
_do_add_friend:                         ## @do_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	%r8d, %r14d
	movl	%ecx, %r13d
	movl	%edx, %ebx
	movl	%esi, %r15d
	movl	%edi, %r12d
	callq	_conv_uid
	movq	%rbx, %rdx
	movl	$-1, %ebx
	testl	%edx, %edx
	js	LBB0_25
## %bb.1:
	testl	%r15d, %r15d
	jle	LBB0_25
## %bb.2:
	testq	%rax, %rax
	js	LBB0_25
## %bb.3:
	testl	%r14d, %r14d
	setne	%al
	testl	%r13d, %r13d
	setne	%cl
	testl	%edx, %r13d
	jne	LBB0_25
## %bb.4:
	andb	%al, %cl
	jne	LBB0_25
## %bb.5:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.26:
	movq	_LEV_FR_ADD_FRIEND@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	$16, %esi
	movq	%rdx, %rbx
	movl	%r12d, %edx
	callq	_alloc_log_event
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	orl	$1, %ebx
	movl	%ebx, 4(%rax)
	movq	%rax, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_change_friend_logevent         ## TAILCALL
LBB0_6:
	movl	%r13d, %r14d
	andl	$2147483646, %r14d              ## imm = 0x7FFFFFFE
	testl	%edx, %edx
	movl	%r12d, %r15d
	jne	LBB0_8
## %bb.7:
	cmpl	$2147483646, %r14d              ## imm = 0x7FFFFFFE
	jne	LBB0_8
## %bb.27:
	movl	%r15d, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_get_friend_cat                 ## TAILCALL
LBB0_8:
	movq	%rdx, %r12
	movl	%r15d, %edi
	callq	_get_user
	testl	%eax, %eax
	je	LBB0_25
## %bb.9:
	movl	%r13d, %edi
	movq	%r12, %rcx
	orl	%ecx, %edi
	notl	%edi
	andl	$2147483646, %edi               ## imm = 0x7FFFFFFE
	je	LBB0_10
## %bb.11:
	leal	-1(%rdi), %eax
	testl	%eax, %edi
	jne	LBB0_14
## %bb.12:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_b_log2
	movq	_LEV_FR_REMFROM_CAT@GOTPCREL(%rip), %rcx
	movslq	%eax, %rdi
	addq	(%rcx), %rdi
	movl	$12, %esi
	movl	%r15d, %edx
	callq	_alloc_log_event
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	movq	%rax, %rdi
	callq	_change_friend_logevent
	movq	%r12, %rcx
	movl	%eax, %ebx
	jmp	LBB0_13
LBB0_10:
	movl	$-1, %ebx
LBB0_13:
	andl	$2147483646, %ecx               ## imm = 0x7FFFFFFE
	testl	%r14d, %r14d
	jne	LBB0_18
	jmp	LBB0_16
LBB0_14:
	testl	%r14d, %r14d
	je	LBB0_15
## %bb.17:
	movq	_LEV_FR_EDIT_FRIEND_AND@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	$16, %esi
	movl	%r15d, %edx
	callq	_alloc_log_event
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	orl	$1, %r13d
	movl	%r13d, 4(%rax)
	movq	%rax, %rdi
	callq	_change_friend_logevent
	movq	%r12, %rcx
	movl	%eax, %ebx
	andl	$2147483646, %ecx               ## imm = 0x7FFFFFFE
LBB0_18:
	testl	%ecx, %ecx
	je	LBB0_24
## %bb.19:
	leal	-1(%rcx), %eax
	testl	%eax, %ecx
	jne	LBB0_21
## %bb.20:
	movl	%ecx, %edi
	callq	_b_log2
	movq	_LEV_FR_ADDTO_CAT@GOTPCREL(%rip), %rcx
	movslq	%eax, %rdi
	addq	(%rcx), %rdi
	movl	$12, %esi
	movl	%r15d, %edx
	callq	_alloc_log_event
	movq	%rax, %rdi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_23
LBB0_21:
	movq	_LEV_FR_EDIT_FRIEND_OR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	$16, %esi
	movq	%rcx, %rbx
	movl	%r15d, %edx
	callq	_alloc_log_event
	movq	%rax, %rdi
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rdi)
	jmp	LBB0_22
LBB0_15:
	andl	$2147483646, %ecx               ## imm = 0x7FFFFFFE
LBB0_16:
	movq	_LEV_FR_EDIT_FRIEND@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	$16, %esi
	movq	%rcx, %rbx
	movl	%r15d, %edx
	callq	_alloc_log_event
	movq	%rax, %rdi
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rdi)
	orl	$1, %ebx
LBB0_22:
	movq	%rdi, %rax
	addq	$4, %rax
	movl	%ebx, %ecx
LBB0_23:
	movl	%ecx, (%rax)
	callq	_change_friend_logevent
	movl	%eax, %ebx
LBB0_24:
	xorl	%edi, %edi
	cmpl	$-1, %ebx
	setne	%dil
	callq	_assert
LBB0_25:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LEV_FR_ADD_FRIEND,8,3          ## @LEV_FR_ADD_FRIEND
	.comm	_LEV_FR_REMFROM_CAT,8,3         ## @LEV_FR_REMFROM_CAT
	.comm	_LEV_FR_EDIT_FRIEND_AND,8,3     ## @LEV_FR_EDIT_FRIEND_AND
	.comm	_LEV_FR_EDIT_FRIEND,8,3         ## @LEV_FR_EDIT_FRIEND
	.comm	_LEV_FR_ADDTO_CAT,8,3           ## @LEV_FR_ADDTO_CAT
	.comm	_LEV_FR_EDIT_FRIEND_OR,8,3      ## @LEV_FR_EDIT_FRIEND_OR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_add_friend                  ; -- Begin function do_add_friend
	.p2align	2
_do_add_friend:                         ; @do_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	x24, x4
	mov	x22, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_conv_uid
	mov	w23, #-1
	tbnz	w21, #31, LBB0_27
; %bb.1:
	cmp	w19, #1
	b.lt	LBB0_27
; %bb.2:
	tbnz	x0, #63, LBB0_27
; %bb.3:
	cmp	w22, #0
	ccmp	w24, #0, #4, ne
	cset	w8, ne
	mov	w23, #-1
	tst	w22, w21
	b.ne	LBB0_27
; %bb.4:
	tbnz	w8, #0, LBB0_27
; %bb.5:
	cbz	w24, LBB0_7
; %bb.6:
Lloh0:
	adrp	x8, _LEV_FR_ADD_FRIEND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LEV_FR_ADD_FRIEND@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	mov	w1, #16
	mov	x2, x20
	bl	_alloc_log_event
	orr	w8, w21, #0x1
	stp	w19, w8, [x0]
	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
	b	_change_friend_logevent
LBB0_7:
	and	w24, w22, #0x7ffffffe
	cbnz	w21, LBB0_10
; %bb.8:
	mov	w8, #2147483646
	cmp	w24, w8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x20
	mov	x1, x19
	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
	b	_get_friend_cat
LBB0_10:
	mov	x0, x20
	bl	_get_user
	cbz	w0, LBB0_14
; %bb.11:
	orr	w8, w22, w21
	mvn	w8, w8
	ands	w0, w8, #0x7ffffffe
	b.eq	LBB0_15
; %bb.12:
	sub	w8, w0, #1
	tst	w0, w8
	b.ne	LBB0_17
; %bb.13:
	bl	_b_log2
Lloh3:
	adrp	x8, _LEV_FR_REMFROM_CAT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LEV_FR_REMFROM_CAT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x0, x8, w0, sxtw
	mov	w1, #12
	mov	x2, x20
	bl	_alloc_log_event
	str	w19, [x0]
	bl	_change_friend_logevent
	mov	x23, x0
	b	LBB0_16
LBB0_14:
	mov	w23, #-1
	b	LBB0_27
LBB0_15:
	mov	w23, #-1
LBB0_16:
	and	w21, w21, #0x7ffffffe
	cbnz	w24, LBB0_19
	b	LBB0_24
LBB0_17:
	cbz	w24, LBB0_23
; %bb.18:
Lloh6:
	adrp	x8, _LEV_FR_EDIT_FRIEND_AND@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LEV_FR_EDIT_FRIEND_AND@GOTPAGEOFF]
Lloh8:
	ldr	x0, [x8]
	mov	w1, #16
	mov	x2, x20
	bl	_alloc_log_event
	orr	w8, w22, #0x1
	stp	w19, w8, [x0]
	bl	_change_friend_logevent
	mov	x23, x0
	and	w21, w21, #0x7ffffffe
LBB0_19:
	cbz	w21, LBB0_26
; %bb.20:
	sub	w8, w21, #1
	tst	w21, w8
	b.ne	LBB0_22
; %bb.21:
	mov	x0, x21
	bl	_b_log2
Lloh9:
	adrp	x8, _LEV_FR_ADDTO_CAT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LEV_FR_ADDTO_CAT@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	add	x0, x8, w0, sxtw
	mov	w1, #12
	mov	x2, x20
	bl	_alloc_log_event
	mov	x8, x0
	b	LBB0_25
LBB0_22:
Lloh12:
	adrp	x8, _LEV_FR_EDIT_FRIEND_OR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LEV_FR_EDIT_FRIEND_OR@GOTPAGEOFF]
Lloh14:
	ldr	x0, [x8]
	mov	w1, #16
	mov	x2, x20
	bl	_alloc_log_event
	mov	x8, x0
	str	w19, [x8], #4
	mov	x19, x21
	b	LBB0_25
LBB0_23:
	and	w21, w21, #0x7ffffffe
LBB0_24:
Lloh15:
	adrp	x8, _LEV_FR_EDIT_FRIEND@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LEV_FR_EDIT_FRIEND@GOTPAGEOFF]
Lloh17:
	ldr	x0, [x8]
	mov	w1, #16
	mov	x2, x20
	bl	_alloc_log_event
	mov	x8, x0
	str	w19, [x8], #4
	orr	w19, w21, #0x1
LBB0_25:
	str	w19, [x8]
	bl	_change_friend_logevent
	mov	x23, x0
LBB0_26:
	cmn	w23, #1
	cset	w0, ne
	bl	_assert
LBB0_27:
	mov	x0, x23
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_LEV_FR_ADD_FRIEND,8,3          ; @LEV_FR_ADD_FRIEND
	.comm	_LEV_FR_REMFROM_CAT,8,3         ; @LEV_FR_REMFROM_CAT
	.comm	_LEV_FR_EDIT_FRIEND_AND,8,3     ; @LEV_FR_EDIT_FRIEND_AND
	.comm	_LEV_FR_EDIT_FRIEND,8,3         ; @LEV_FR_EDIT_FRIEND
	.comm	_LEV_FR_ADDTO_CAT,8,3           ; @LEV_FR_ADDTO_CAT
	.comm	_LEV_FR_EDIT_FRIEND_OR,8,3      ; @LEV_FR_EDIT_FRIEND_OR
.subsections_via_symbols
