	.file	"extr_libworker.c_add_bg_result.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"out of memory for async answer"
	.text
	.p2align 4
	.type	add_bg_result, @function
add_bg_result:
.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	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	cmp	QWORD PTR 16[rdi], 0
	mov	DWORD PTR 20[rsp], 0
	jne	.L24
	cmp	QWORD PTR 8[rdi], 0
	mov	rbx, rdi
	mov	r13, rdx
	mov	r15d, ecx
	mov	r12, r8
	mov	r14d, r9d
	jne	.L25
	mov	rdx, QWORD PTR 8[rsi]
	test	r8, r8
	je	.L11
	mov	rdi, r8
	mov	QWORD PTR 8[rsp], rdx
	call	strdup@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	QWORD PTR 8[rdx], rax
.L11:
	mov	DWORD PTR [rdx], r14d
	lea	rcx, 20[rsp]
	mov	rdx, r13
	mov	esi, r15d
	mov	rdi, rbp
	call	context_serialize_answer@PLT
	mov	esi, DWORD PTR 0[rbp]
	mov	r12, rax
	mov	rax, QWORD PTR [rbx]
	lea	rdi, 8[rax]
	call	rbtree_delete@PLT
	mov	rax, QWORD PTR [rbx]
	mov	rdi, rbp
	sub	DWORD PTR 4[rax], 1
	call	context_query_delete@PLT
.L10:
	test	r12, r12
	je	.L13
	mov	rax, QWORD PTR [rbx]
	mov	edx, DWORD PTR 20[rsp]
	mov	rsi, r12
	mov	edi, DWORD PTR [rax]
	call	tube_queue_item@PLT
	test	eax, eax
	je	.L13
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L26
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L13:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	call	log_err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	mov	rax, QWORD PTR [rdi]
	lea	rdi, 12[rax]
	call	lock_basic_lock@PLT
	mov	rdx, QWORD PTR 8[rbp]
	test	r12, r12
	je	.L6
	mov	rdi, r12
	mov	QWORD PTR 8[rsp], rdx
	call	strdup@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	QWORD PTR 8[rdx], rax
.L6:
	mov	DWORD PTR [rdx], r14d
	test	r13, r13
	je	.L7
	mov	rdi, r13
	call	sldns_buffer_remaining@PLT
	mov	rdi, r13
	mov	DWORD PTR 20[rbp], eax
	mov	r12d, eax
	call	sldns_buffer_begin@PLT
	mov	esi, r12d
	mov	edi, eax
	call	memdup@PLT
	lea	rcx, 20[rsp]
	xor	edx, edx
	mov	DWORD PTR 16[rbp], eax
	test	eax, eax
	jne	.L22
	mov	esi, DWORD PTR UB_NOMEM[rip]
	mov	rdi, rbp
	call	context_serialize_answer@PLT
	mov	r12, rax
.L9:
	mov	rax, QWORD PTR [rbx]
	lea	rdi, 12[rax]
	call	lock_basic_unlock@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rdi, rsi
	call	context_query_delete@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	lea	rcx, 20[rsp]
	xor	edx, edx
.L22:
	mov	esi, r15d
	mov	rdi, rbp
	call	context_serialize_answer@PLT
	mov	r12, rax
	jmp	.L9
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	add_bg_result, .-add_bg_result
	.comm	UB_NOMEM,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_libworker.c_add_bg_result.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"out of memory for async answer\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_bg_result, %function
add_bg_result:
	@ args = 8, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r0
	mov	r0, #0
	ldr	ip, [r4, #8]
	mov	r8, r3
	ldr	r3, .L27
	sub	sp, sp, #12
	cmp	ip, r0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r5, r1
	ldr	r7, [sp, #40]
	str	r0, [sp]
	bne	.L23
	ldr	r3, [r4, #4]
	mov	r6, r2
	cmp	r3, #0
	bne	.L24
	cmp	r7, #0
	ldr	r9, [r1, #4]
	beq	.L11
	mov	r0, r7
	bl	strdup
	str	r0, [r9, #4]
.L11:
	ldr	r3, [sp, #44]
	mov	r2, r6
	mov	r1, r8
	str	r3, [r9]
	mov	r0, r5
	mov	r3, sp
	bl	context_serialize_answer
	mov	r6, r0
	ldr	r0, [r4]
	ldr	r1, [r5]
	add	r0, r0, #8
	bl	rbtree_delete
	ldr	r2, [r4]
	mov	r0, r5
	ldr	r3, [r2, #4]
	sub	r3, r3, #1
	str	r3, [r2, #4]
	bl	context_query_delete
.L10:
	cmp	r6, #0
	beq	.L13
	ldr	r3, [r4]
	mov	r1, r6
	ldr	r0, [r3]
	ldr	r2, [sp]
	bl	tube_queue_item
	cmp	r0, #0
	beq	.L13
.L1:
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L13:
	ldr	r0, .L27+4
	bl	log_err
	b	.L1
.L24:
	ldr	r0, [r4]
	add	r0, r0, #12
	bl	lock_basic_lock
	cmp	r7, #0
	beq	.L26
	mov	r0, r7
	ldr	r7, [r5, #4]
	bl	strdup
	str	r0, [r7, #4]
.L6:
	ldr	r3, [sp, #44]
	cmp	r6, #0
	str	r3, [r7]
	beq	.L7
	mov	r0, r6
	bl	sldns_buffer_remaining
	mov	r3, r0
	mov	r0, r6
	str	r3, [r5, #12]
	bl	sldns_buffer_begin
	ldr	r1, [r5, #12]
	bl	memdup
	cmp	r0, #0
	ldreq	r3, .L27+8
	mov	r2, r0
	str	r0, [r5, #8]
	ldreq	r1, [r3]
	moveq	r0, r5
	moveq	r3, sp
	movne	r1, r8
	movne	r0, r5
	movne	r3, sp
	movne	r2, #0
	bl	context_serialize_answer
	mov	r6, r0
.L9:
	ldr	r0, [r4]
	add	r0, r0, #12
	bl	lock_basic_unlock
	b	.L10
.L23:
	mov	r0, r1
	bl	context_query_delete
	b	.L1
.L26:
	ldr	r7, [r5, #4]
	b	.L6
.L7:
	mov	r2, r6
	mov	r1, r8
	mov	r0, r5
	mov	r3, sp
	bl	context_serialize_answer
	mov	r6, r0
	b	.L9
.L25:
	bl	__stack_chk_fail
.L28:
	.align	2
.L27:
	.word	.LC1
	.word	.LC0
	.word	UB_NOMEM
	.size	add_bg_result, .-add_bg_result
	.comm	UB_NOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
