	.file	"extr_text-data.c_update_history_persistent.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	update_history_persistent, @function
update_history_persistent:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, ecx
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, edx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	test	rdi, rdi
	je	.L9
	test	esi, esi
	jle	.L9
	xor	edi, edi
	cmp	ecx, 5
	setbe	dil
	call	assert@PLT
	mov	eax, DWORD PTR persistent_history_enabled[rip]
	test	eax, eax
	jne	.L19
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	xor	edi, edi
	call	assert@PLT
	mov	eax, DWORD PTR persistent_history_enabled[rip]
	test	eax, eax
	je	.L1
.L19:
	mov	rdi, QWORD PTR 8[r13]
	test	rdi, rdi
	je	.L20
	mov	esi, DWORD PTR 4[rdi]
	cmp	esi, DWORD PTR [rdi]
	je	.L7
.L17:
	lea	eax, 1[rsi]
	add	esi, esi
	movsx	rsi, esi
	sal	rsi, 2
.L6:
	movzx	ebx, bx
	sal	ebp, 24
	add	rsi, QWORD PTR 8[rdi]
	mov	DWORD PTR 4[rdi], eax
	or	ebp, ebx
	mov	DWORD PTR [rsi], r12d
	mov	rbx, QWORD PTR 0[r13]
	mov	rdi, r13
	mov	DWORD PTR 4[rsi], ebp
	add	DWORD PTR incore_persistent_history_events[rip], 1
	call	USER_PCONN@PLT
	cmp	rbx, rax
	je	.L1
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, r13
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	process_user_persistent_query_queue2@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	sal	esi, 4
	add	esi, 16
	call	realloc@PLT
	mov	rdi, rax
	mov	QWORD PTR 8[r13], rax
	mov	eax, DWORD PTR [rax]
	mov	esi, DWORD PTR 4[rdi]
	lea	edx, 0[0+rax*8]
	add	eax, eax
	add	DWORD PTR incore_persistent_history_bytes[rip], edx
	mov	DWORD PTR [rdi], eax
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L20:
	mov	eax, DWORD PTR MIN_PERSISTENT_HISTORY_EVENTS[rip]
	lea	edi, 16[0+rax*8]
	call	malloc@PLT
	mov	edx, DWORD PTR incore_persistent_history_bytes[rip]
	xor	esi, esi
	mov	QWORD PTR 8[r13], rax
	mov	rdi, rax
	mov	eax, DWORD PTR MIN_PERSISTENT_HISTORY_EVENTS[rip]
	mov	DWORD PTR 4[rdi], 0
	mov	DWORD PTR [rdi], eax
	lea	eax, 16[rdx+rax*8]
	mov	DWORD PTR incore_persistent_history_bytes[rip], eax
	mov	eax, 1
	add	DWORD PTR incore_persistent_history_lists[rip], 1
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	update_history_persistent, .-update_history_persistent
	.comm	persistent_history_enabled,4,4
	.comm	incore_persistent_history_lists,4,4
	.comm	incore_persistent_history_events,4,4
	.comm	incore_persistent_history_bytes,4,4
	.comm	MIN_PERSISTENT_HISTORY_EVENTS,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_text-data.c_update_history_persistent.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	update_history_persistent, %function
update_history_persistent:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #0
	movle	ip, #0
	movgt	ip, #1
	cmp	r0, #0
	moveq	ip, #0
	cmp	ip, #0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	mov	r5, r2
	mov	r6, r3
	mov	r7, r1
	moveq	r0, ip
	beq	.L2
	cmp	r3, #5
	movhi	r0, #0
	movls	r0, #1
.L2:
	bl	assert
	ldr	r3, .L13
	ldr	r3, [r3]
	cmp	r3, #0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	ldr	r0, [r4, #4]
	cmp	r0, #0
	beq	.L12
	ldm	r0, {r3, ip}
	cmp	ip, r3
	beq	.L7
	add	r3, ip, #1
	lsl	ip, ip, #3
.L6:
	ldr	r1, [r0, #8]
	ldr	lr, .L13+4
	str	r3, [r0, #4]
	lsl	r2, r5, #16
	str	r7, [r1, ip]
	ldr	r3, [lr]
	lsr	r2, r2, #16
	orr	r2, r2, r6, lsl #24
	add	ip, r1, ip
	add	r3, r3, #1
	mov	r0, r4
	str	r2, [ip, #4]
	ldr	r5, [r4]
	str	r3, [lr]
	bl	USER_PCONN
	cmp	r5, r0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	process_user_persistent_query_queue2
.L7:
	lsl	r1, ip, #4
	add	r1, r1, #12
	bl	realloc
	ldr	lr, .L13+8
	ldr	r3, [r0]
	ldr	r1, [lr]
	ldr	ip, [r0, #4]
	add	r1, r1, r3, lsl #3
	lsl	r2, r3, #1
	str	r0, [r4, #4]
	str	r1, [lr]
	add	r3, ip, #1
	str	r2, [r0]
	lsl	ip, ip, #3
	b	.L6
.L12:
	ldr	r3, .L13+12
	ldr	r9, [r3]
	lsl	r8, r9, #3
	add	r0, r8, #12
	bl	malloc
	mov	ip, #0
	ldr	lr, .L13+8
	ldr	r1, .L13+16
	ldr	r3, [lr]
	ldr	r2, [r1]
	add	r3, r3, #12
	add	r3, r3, r8
	add	r2, r2, #1
	str	r3, [lr]
	str	r9, [r0]
	mov	r3, #1
	str	r0, [r4, #4]
	str	r2, [r1]
	str	ip, [r0, #4]
	b	.L6
.L14:
	.align	2
.L13:
	.word	persistent_history_enabled
	.word	incore_persistent_history_events
	.word	incore_persistent_history_bytes
	.word	MIN_PERSISTENT_HISTORY_EVENTS
	.word	incore_persistent_history_lists
	.size	update_history_persistent, .-update_history_persistent
	.comm	persistent_history_enabled,4,4
	.comm	incore_persistent_history_lists,4,4
	.comm	incore_persistent_history_events,4,4
	.comm	incore_persistent_history_bytes,4,4
	.comm	MIN_PERSISTENT_HISTORY_EVENTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
