	.file	"extr_photo-data.c_tl_do_get_photo.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	tl_do_get_photo
	.type	tl_do_get_photo, @function
tl_do_get_photo:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rbx, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	edi, DWORD PTR 12[rbx]
	call	check_user_id@PLT
	xor	edi, edi
	test	rax, rax
	jne	.L14
.L2:
	call	assert@PLT
	mov	eax, DWORD PTR index_mode[rip]
	xor	edi, edi
	or	eax, DWORD PTR write_only[rip]
	sete	dil
	call	assert@PLT
	mov	edi, DWORD PTR 12[rbx]
	call	conv_uid_get@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L12
	mov	edx, DWORD PTR NOAIO[rip]
	mov	esi, DWORD PTR [rax]
	mov	rdi, rax
	call	load_user_metafile@PLT
	mov	rdi, rbp
	call	user_loaded@PLT
	test	eax, eax
	je	.L8
	lea	r12, 4[rsp]
	mov	edx, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR 8[rbx]
	mov	rdi, rbp
	mov	rcx, r12
	call	user_get_photo@PLT
	test	rax, rax
	js	.L12
	mov	edi, DWORD PTR TL_MAYBE_TRUE[rip]
	call	tl_store_int@PLT
	mov	edx, DWORD PTR [rbx]
	mov	esi, DWORD PTR PHOTO_TYPE[rip]
	mov	rdi, r12
	call	event_to_rpc@PLT
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L15
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	edi, DWORD PTR TL_MAYBE_FALSE[rip]
	call	tl_store_int@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edi, DWORD PTR 8[rbx]
	call	check_photo_id@PLT
	xor	edi, edi
	test	rax, rax
	setne	dil
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	mov	eax, -2
	jmp	.L1
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	tl_do_get_photo, .-tl_do_get_photo
	.comm	write_only,4,4
	.comm	index_mode,4,4
	.comm	TL_MAYBE_TRUE,4,4
	.comm	TL_MAYBE_FALSE,4,4
	.comm	PHOTO_TYPE,4,4
	.comm	NOAIO,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_photo-data.c_tl_do_get_photo.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	tl_do_get_photo
	.syntax unified
	.arm
	.fpu softvfp
	.type	tl_do_get_photo, %function
tl_do_get_photo:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r5, [r0]
	ldr	r3, .L16
	sub	sp, sp, #12
	ldr	r0, [r5, #12]
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	check_user_id
	cmp	r0, #0
	bne	.L14
.L2:
	bl	assert
	ldr	r2, .L16+4
	ldr	r3, .L16+8
	ldr	r2, [r2]
	ldr	r3, [r3]
	orrs	r3, r2, r3
	moveq	r0, #1
	movne	r0, #0
	bl	assert
	ldr	r0, [r5, #12]
	bl	conv_uid_get
	subs	r4, r0, #0
	beq	.L12
	ldr	r3, .L16+12
	ldr	r1, [r4]
	ldr	r2, [r3]
	bl	load_user_metafile
	mov	r0, r4
	bl	user_loaded
	cmp	r0, #0
	beq	.L7
	mov	r0, r4
	mov	r3, sp
	ldr	r2, [r5, #4]
	ldr	r1, [r5, #8]
	bl	user_get_photo
	cmp	r0, #0
	blt	.L12
	ldr	r3, .L16+16
	ldr	r0, [r3]
	bl	tl_store_int
	ldr	r3, .L16+20
	mov	r0, sp
	ldr	r2, [r5]
	ldr	r1, [r3]
	bl	event_to_rpc
	mov	r0, #0
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L12:
	ldr	r3, .L16+24
	ldr	r0, [r3]
	bl	tl_store_int
	mov	r0, #0
	b	.L1
.L14:
	ldr	r0, [r5, #8]
	bl	check_photo_id
	subs	r0, r0, #0
	movne	r0, #1
	b	.L2
.L7:
	mvn	r0, #1
	b	.L1
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	index_mode
	.word	write_only
	.word	NOAIO
	.word	TL_MAYBE_TRUE
	.word	PHOTO_TYPE
	.word	TL_MAYBE_FALSE
	.size	tl_do_get_photo, .-tl_do_get_photo
	.comm	write_only,4,4
	.comm	index_mode,4,4
	.comm	TL_MAYBE_TRUE,4,4
	.comm	TL_MAYBE_FALSE,4,4
	.comm	PHOTO_TYPE,4,4
	.comm	NOAIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
