	.file	"extr_friend-data.c_check_privacy.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	check_privacy
	.type	check_privacy, @function
check_privacy:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	test	esi, esi
	setle	dl
	test	ebp, ebp
	sete	al
	or	dl, al
	jne	.L6
	mov	r12d, edi
	test	edi, edi
	js	.L6
	mov	r13d, esi
	je	.L18
	mov	r8d, 3
	cmp	edi, esi
	je	.L1
.L5:
	mov	edi, r13d
	call	get_user@PLT
	mov	r15, rax
	test	rax, rax
	je	.L6
	mov	edi, DWORD PTR 12[rax]
	mov	esi, ebp
	call	privacy_lookup@PLT
	test	rax, rax
	je	.L6
	mov	r14, QWORD PTR [rax]
	movzx	ebx, BYTE PTR 8[rax]
	lea	rbp, 4[r14]
	cmp	ebx, 255
	je	.L42
.L7:
	xor	edi, edi
	cmp	DWORD PTR [r14+rbx*4], -1
	sete	dil
	call	assert@PLT
	mov	ebx, DWORD PTR [r14]
	cmp	ebx, -1
	je	.L21
	mov	edx, -1
	mov	r14d, 3
	xor	r8d, r8d
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L44:
	cmp	DWORD PTR CAT_FR_ALL[rip], eax
	je	.L11
	cmp	DWORD PTR CAT_FR_FR[rip], eax
	je	.L43
	mov	esi, eax
	mov	rcx, QWORD PTR [r15]
	mov	r9d, eax
	and	esi, 31
	and	r9d, 31
	cmp	DWORD PTR [rcx+rsi*4], eax
	je	.L15
	mov	DWORD PTR -4[rbp], 0
	.p2align 4,,10
	.p2align 3
.L9:
	mov	ebx, DWORD PTR 0[rbp]
	add	rbp, 4
	cmp	ebx, -1
	je	.L1
.L17:
	test	ebx, ebx
	je	.L9
	mov	eax, DWORD PTR PL_M_MASK[rip]
	and	eax, ebx
	test	DWORD PTR PL_M_CAT[rip], ebx
	jne	.L44
	cmp	eax, r12d
	jne	.L9
	.p2align 4,,10
	.p2align 3
.L11:
	or	r14d, r8d
	test	ebx, ebx
	cmovns	r8d, r14d
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	r12d, -1
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L43:
	cmp	edx, -1
	je	.L45
.L13:
	test	edx, edx
	jg	.L11
.L14:
	mov	esi, r12d
	mov	edi, r13d
	mov	DWORD PTR 12[rsp], r8d
	mov	DWORD PTR 8[rsp], edx
	call	is_friends_friend@PLT
	mov	edx, DWORD PTR 8[rsp]
	mov	r8d, DWORD PTR 12[rsp]
	test	eax, eax
	jg	.L11
	je	.L9
	test	ebx, ebx
	js	.L23
	and	r14d, 1
	or	r8d, r14d
	mov	r14d, 2
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L15:
	cmp	edx, -1
	je	.L46
.L16:
	bt	edx, r9d
	jnc	.L9
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L42:
	movsx	rbx, DWORD PTR [r14]
	xor	edi, edi
	cmp	ebx, 254
	jle	.L8
	xor	edi, edi
	cmp	DWORD PTR MAX_PRIVACY_LEN[rip], ebx
	setge	dil
.L8:
	call	assert@PLT
	lea	rax, 8[r14]
	mov	r14, rbp
	mov	rbp, rax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L45:
	mov	edi, DWORD PTR 8[r15]
	mov	esi, r12d
	mov	DWORD PTR 8[rsp], r8d
	call	tree_lookup@PLT
	mov	r8d, DWORD PTR 8[rsp]
	test	rax, rax
	je	.L22
	mov	edx, DWORD PTR [rax]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L46:
	mov	edi, DWORD PTR 8[r15]
	mov	esi, r12d
	mov	DWORD PTR 8[rsp], r8d
	mov	DWORD PTR 12[rsp], r9d
	call	tree_lookup@PLT
	mov	r8d, DWORD PTR 8[rsp]
	test	rax, rax
	je	.L24
	mov	edx, DWORD PTR [rax]
	mov	r9d, DWORD PTR 12[rsp]
	jmp	.L16
.L22:
	xor	edx, edx
	jmp	.L14
.L24:
	xor	edx, edx
	jmp	.L9
.L23:
	mov	r14d, 2
	jmp	.L9
.L6:
	mov	r8d, -1
	jmp	.L1
.L21:
	xor	r8d, r8d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	check_privacy, .-check_privacy
	.comm	PL_M_MASK,4,4
	.comm	PL_M_CAT,4,4
	.comm	MAX_PRIVACY_LEN,4,4
	.comm	CAT_FR_FR,4,4
	.comm	CAT_FR_ALL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_friend-data.c_check_privacy.c"
	.text
	.align	2
	.global	check_privacy
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_privacy, %function
check_privacy:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r2, #0
	cmpne	r1, #0
	movle	r3, #1
	movgt	r3, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	orrs	r3, r3, r0, lsr #31
	sub	sp, sp, #20
	str	r1, [sp, #4]
	bne	.L5
	cmp	r0, #0
	mov	r6, r0
	mov	r4, r2
	beq	.L17
	ldr	r3, [sp, #4]
	cmp	r0, r3
	beq	.L40
.L4:
	ldr	r0, [sp, #4]
	bl	get_user
	subs	r3, r0, #0
	mov	r10, r3
	beq	.L5
	mov	r1, r4
	ldr	r0, [r3, #8]
	bl	privacy_lookup
	cmp	r0, #0
	beq	.L5
	ldrb	r7, [r0, #4]	@ zero_extendqisi2
	ldr	r4, [r0]
	cmp	r7, #255
	add	r5, r4, #4
	beq	.L41
.L6:
	ldr	r0, [r4, r7, lsl #2]
	mov	fp, #0
	cmn	r0, #1
	movne	r0, #0
	moveq	r0, #1
	bl	assert
	ldr	r4, [r4]
	cmn	r4, #1
	beq	.L1
	mov	r3, #3
	str	fp, [sp, #8]
	str	r3, [sp, #12]
	mov	fp, r6
	mvn	r7, #0
	mov	r6, r10
	ldr	r9, .L47
	ldr	r8, .L47+4
	ldr	r3, .L47+8
	ldr	r2, .L47+12
	b	.L16
.L45:
	ldr	ip, [r3]
	cmp	ip, r0
	beq	.L37
	ldr	ip, [r2]
	cmp	ip, r0
	beq	.L42
	ldr	ip, [r6]
	and	r10, r0, #31
	ldr	ip, [ip, r10, lsl #2]
	cmp	ip, r0
	movne	r1, #0
	strne	r1, [r5, #-4]
	bne	.L8
	cmn	r7, #1
	beq	.L43
.L15:
	asr	r10, r7, r10
	tst	r10, #1
	bne	.L37
.L8:
	ldr	r4, [r5], #4
	cmn	r4, #1
	beq	.L44
.L16:
	cmp	r4, #0
	beq	.L8
	ldr	ip, [r8]
	ldr	r0, [r9]
	tst	r4, ip
	and	r0, r0, r4
	bne	.L45
	cmp	r0, fp
	bne	.L8
.L37:
	cmp	r4, #0
	ldr	fp, [sp, #8]
	ldrge	r3, [sp, #12]
	orrge	fp, fp, r3
.L1:
	mov	r0, fp
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	mvn	r6, #0
	b	.L4
.L42:
	cmn	r7, #1
	beq	.L46
.L12:
	cmp	r7, #0
	bgt	.L37
.L13:
	mov	r1, fp
	ldr	r0, [sp, #4]
	bl	is_friends_friend
	cmp	r0, #0
	ldr	r3, .L47+8
	ldr	r2, .L47+12
	bgt	.L37
	beq	.L8
	cmp	r4, #0
	movlt	r1, #2
	strlt	r1, [sp, #12]
	blt	.L8
	ldr	r1, [sp, #12]
	and	r0, r1, #1
	ldr	r1, [sp, #8]
	orr	r1, r1, r0
	str	r1, [sp, #8]
	mov	r1, #2
	str	r1, [sp, #12]
	b	.L8
.L41:
	ldr	r7, [r4]
	cmp	r7, #254
	movle	r0, #0
	ble	.L7
	ldr	r3, .L47+16
	ldr	r0, [r3]
	cmp	r0, r7
	movlt	r0, #0
	movge	r0, #1
.L7:
	bl	assert
	add	r3, r4, #8
	mov	r4, r5
	mov	r5, r3
	b	.L6
.L40:
	mov	fp, #3
	mov	r0, fp
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L46:
	mov	r1, fp
	ldr	r0, [r6, #4]
	bl	tree_lookup
	subs	r7, r0, #0
	beq	.L13
	ldr	r7, [r7]
	b	.L12
.L43:
	mov	r1, fp
	ldr	r0, [r6, #4]
	bl	tree_lookup
	subs	r7, r0, #0
	ldr	r3, .L47+8
	ldr	r2, .L47+12
	beq	.L8
	ldr	r7, [r7]
	b	.L15
.L44:
	ldr	fp, [sp, #8]
	mov	r0, fp
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	mvn	fp, #0
	b	.L1
.L48:
	.align	2
.L47:
	.word	PL_M_MASK
	.word	PL_M_CAT
	.word	CAT_FR_ALL
	.word	CAT_FR_FR
	.word	MAX_PRIVACY_LEN
	.size	check_privacy, .-check_privacy
	.comm	PL_M_MASK,4,4
	.comm	PL_M_CAT,4,4
	.comm	MAX_PRIVACY_LEN,4,4
	.comm	CAT_FR_FR,4,4
	.comm	CAT_FR_ALL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
