	.file	"extr_search-data.c_delete_item.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	delete_item, @function
delete_item:
.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
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	esi, DWORD PTR ONLY_FIND[rip]
	call	get_item_f@PLT
	mov	rdi, rbp
	mov	r12, rax
	call	get_idx_item@PLT
	test	rax, rax
	jne	.L8
	test	r12, r12
	je	.L4
	mov	edx, DWORD PTR [r12]
	xor	eax, eax
	test	DWORD PTR FLAG_DELETED[rip], edx
	je	.L9
	add	rsp, 8
	.cfi_remember_state
	.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
.L9:
	.cfi_restore_state
	mov	rdi, r12
	call	delete_item_rates@PLT
	lea	rsi, 4[r12]
	mov	rdi, r12
	call	item_clear_wordlist@PLT
	add	DWORD PTR del_items[rip], 1
	mov	eax, 1
	add	DWORD PTR del_item_instances[rip], 1
	add	rsp, 8
	.cfi_remember_state
	.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
.L8:
	.cfi_restore_state
	mov	rbp, rax
	mov	eax, DWORD PTR FLAG_DELETED[rip]
	xor	edi, edi
	or	DWORD PTR 0[rbp], eax
	add	DWORD PTR mod_items[rip], 1
	test	r12, r12
	sete	dil
	call	assert@PLT
	mov	rdi, rbp
	xor	esi, esi
	call	get_index_item_words_ptr@PLT
	mov	rdi, rbp
	mov	rsi, rax
	call	item_clear_wordlist@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, 1
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	delete_item, .-delete_item
	.comm	mod_items,4,4
	.comm	del_items,4,4
	.comm	del_item_instances,4,4
	.comm	ONLY_FIND,4,4
	.comm	FLAG_DELETED,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_search-data.c_delete_item.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	delete_item, %function
delete_item:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L10
	push	{r4, r5, r6, lr}
	ldr	r2, [r3]
	mov	r5, r0
	mov	r6, r1
	bl	get_item_f
	mov	r1, r6
	mov	r4, r0
	mov	r0, r5
	bl	get_idx_item
	subs	r5, r0, #0
	bne	.L8
	cmp	r4, #0
	beq	.L4
	ldr	r3, .L10+4
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L9
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L9:
	mov	r0, r4
	bl	delete_item_rates
	add	r1, r4, #4
	mov	r0, r4
	bl	item_clear_wordlist
	ldr	r0, .L10+8
	ldr	r1, .L10+12
	ldr	r2, [r0]
	ldr	r3, [r1]
	add	r2, r2, #1
	add	r3, r3, #1
	str	r2, [r0]
	str	r3, [r1]
	mov	r0, #1
	pop	{r4, r5, r6, pc}
.L8:
	clz	r0, r4
	ldr	r2, .L10+4
	ldr	r3, [r5]
	ldr	r1, [r2]
	ldr	r2, .L10+16
	orr	r3, r3, r1
	str	r3, [r5]
	ldr	r3, [r2]
	lsr	r0, r0, #5
	add	r3, r3, #1
	str	r3, [r2]
	bl	assert
	mov	r1, #0
	mov	r0, r5
	bl	get_index_item_words_ptr
	mov	r1, r0
	mov	r0, r5
	bl	item_clear_wordlist
	mov	r0, #1
	pop	{r4, r5, r6, pc}
.L4:
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L11:
	.align	2
.L10:
	.word	ONLY_FIND
	.word	FLAG_DELETED
	.word	del_items
	.word	del_item_instances
	.word	mod_items
	.size	delete_item, .-delete_item
	.comm	mod_items,4,4
	.comm	del_items,4,4
	.comm	del_item_instances,4,4
	.comm	ONLY_FIND,4,4
	.comm	FLAG_DELETED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
