	.file	"extr_sh.hist.c_enthist.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	enthist
	.type	enthist, @function
enthist:
.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
	mov	r12d, r8d
	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
	mov	ebx, edi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	edi, DWORD PTR STRhistdup[rip]
	mov	DWORD PTR 20[rsp], edx
	mov	DWORD PTR 8[rsp], ecx
	call	varval@PLT
	cmp	QWORD PTR STRNULL[rip], rax
	je	.L11
	mov	esi, DWORD PTR STRerase[rip]
	mov	rdi, rax
	mov	r14, rax
	call	eq@PLT
	test	rax, rax
	je	.L4
	mov	edi, r12d
	call	createHistHashTable@PLT
	mov	rdi, rbp
	call	hashhist@PLT
	xor	edi, edi
	test	eax, eax
	mov	r14d, eax
	setne	dil
	xor	r15d, r15d
	call	assert@PLT
	mov	esi, r14d
	mov	rdi, rbp
	call	findHistHashTable@PLT
	mov	r13, rax
	test	rax, rax
	je	.L3
	mov	rax, QWORD PTR Htime[rip]
	test	rax, rax
	je	.L5
	mov	rdx, QWORD PTR 0[r13]
	cmp	rax, rdx
	jl	.L65
	mov	edx, DWORD PTR 8[rsp]
	test	edx, edx
	je	.L5
	mov	rdx, rax
.L24:
	mov	r15, QWORD PTR 56[r13]
	cmp	QWORD PTR [r15], rdx
	jge	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	xor	r15d, r15d
.L7:
	mov	r8d, DWORD PTR fastMergeErase[rip]
	test	r8d, r8d
	je	.L66
.L8:
	mov	rdi, r13
	call	hremove@PLT
	mov	rdi, r13
	call	hfree@PLT
	mov	edi, 64
	call	xmalloc@PLT
	xor	edx, edx
	mov	r13, rax
.L10:
	mov	rax, QWORD PTR Htime[rip]
	test	rax, rax
	je	.L12
	mov	QWORD PTR 0[r13], rax
	mov	QWORD PTR Htime[rip], 0
.L13:
	cmp	r13, rdx
	je	.L1
	mov	edi, DWORD PTR 20[rsp]
	mov	DWORD PTR 12[r13], ebx
	mov	DWORD PTR 8[r13], ebx
	lea	rbx, 16[r13]
	test	edi, edi
	jne	.L67
	mov	rax, QWORD PTR 8[rbp]
	mov	QWORD PTR 24[r13], rax
	mov	rax, QWORD PTR 8[rbp]
	mov	QWORD PTR [rax], rbx
	mov	rax, QWORD PTR 0[rbp]
	mov	QWORD PTR 16[r13], rax
	mov	rax, QWORD PTR 0[rbp]
	mov	QWORD PTR [rax], rbx
.L63:
	mov	QWORD PTR 48[r13], 0
.L17:
	mov	esi, DWORD PTR 8[rsp]
	mov	QWORD PTR 40[r13], 0
	test	esi, esi
	je	.L28
	mov	rsi, r15
	mov	rdi, r13
	call	mergeInsertionPoint@PLT
	mov	rbp, QWORD PTR 32[rax]
	mov	rsi, rax
	test	rbp, rbp
	jne	.L19
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L22:
	lea	rdi, 16[rbp]
	mov	rsi, rbx
	call	heq@PLT
	test	rax, rax
	jne	.L68
	mov	rax, QWORD PTR 32[rbp]
	mov	rsi, rbp
	test	rax, rax
	je	.L20
	mov	rbp, rax
.L19:
	mov	rax, QWORD PTR 0[r13]
	cmp	QWORD PTR 0[rbp], rax
	je	.L22
.L20:
	mov	ecx, DWORD PTR fastMergeErase[rip]
	test	ecx, ecx
	jne	.L18
	mov	rdi, r13
	mov	QWORD PTR 8[rsp], rsi
	call	bubbleHnumHrefDown@PLT
	mov	rsi, QWORD PTR 8[rsp]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L4:
	mov	esi, DWORD PTR STRall[rip]
	mov	rdi, r14
	call	eq@PLT
	test	rax, rax
	jne	.L69
	mov	esi, DWORD PTR STRprev[rip]
	mov	rdi, r14
	call	eq@PLT
	test	rax, rax
	je	.L11
	mov	rax, QWORD PTR Histlist[rip+32]
	test	rax, rax
	jne	.L70
	.p2align 4,,10
	.p2align 3
.L11:
	xor	r14d, r14d
	xor	r15d, r15d
.L3:
	mov	edi, 64
	call	xmalloc@PLT
	xor	edx, edx
	mov	r13, rax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L28:
	lea	rsi, Histlist[rip]
.L18:
	mov	rdi, r13
	call	hinsert@PLT
	test	r14d, r14d
	je	.L23
	test	r12d, r12d
	je	.L23
	mov	esi, r14d
	mov	rdi, r13
	call	insertHistHashTable@PLT
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r13
	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
.L23:
	.cfi_restore_state
	xor	eax, eax
	call	discardHistHashTable@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdi, r13
	mov	QWORD PTR 24[rsp], rdx
	call	time@PLT
	mov	rdx, QWORD PTR 24[rsp]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L67:
	mov	rsi, rbp
	mov	rdi, rbx
	call	copylex@PLT
	cmp	QWORD PTR histvalid[rip], 0
	je	.L63
	mov	edi, DWORD PTR histline[rip]
	call	Strsave@PLT
	mov	QWORD PTR 48[r13], rax
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L69:
	mov	edi, r12d
	call	createHistHashTable@PLT
	mov	rdi, rbp
	call	hashhist@PLT
	xor	edi, edi
	test	eax, eax
	mov	r14d, eax
	setne	dil
	call	assert@PLT
	mov	esi, r14d
	mov	rdi, rbp
	call	findHistHashTable@PLT
	mov	rdx, rax
	test	rax, rax
	je	.L26
	sub	DWORD PTR eventno[rip], 1
	mov	r13, rax
	xor	r15d, r15d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L68:
	mov	rdi, r13
	sub	DWORD PTR eventno[rip], 1
	mov	r13, rbp
	call	hfree@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L66:
	mov	rdi, r13
	call	renumberHist@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L65:
	mov	r9d, DWORD PTR 8[rsp]
	mov	QWORD PTR Htime[rip], rdx
	test	r9d, r9d
	je	.L5
	test	rdx, rdx
	jne	.L24
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L70:
	lea	rsi, 16[rax]
	mov	rdi, rbp
	call	heq@PLT
	test	rax, rax
	je	.L11
	mov	rdx, QWORD PTR Histlist[rip+32]
	sub	DWORD PTR eventno[rip], 1
	test	rdx, rdx
	je	.L11
	mov	r13, rdx
	xor	r14d, r14d
	xor	r15d, r15d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L26:
	xor	r15d, r15d
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	enthist, .-enthist
	.comm	histvalid,8,8
	.comm	histline,4,4
	.comm	fastMergeErase,4,4
	.comm	eventno,4,4
	.comm	STRprev,4,4
	.comm	STRhistdup,4,4
	.comm	STRerase,4,4
	.comm	STRall,4,4
	.comm	STRNULL,8,8
	.comm	Htime,8,8
	.comm	Histlist,64,32
	.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_sh.hist.c_enthist.c"
	.text
	.align	2
	.global	enthist
	.syntax unified
	.arm
	.fpu softvfp
	.type	enthist, %function
enthist:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	ip, .L63
	mov	r8, r0
	sub	sp, sp, #12
	ldr	r0, [ip]
	mov	r10, r3
	mov	r4, r1
	mov	r9, r2
	bl	varval
	ldr	r3, .L63+4
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L11
	ldr	r3, .L63+8
	mov	r5, r0
	ldr	r1, [r3]
	bl	eq
	subs	fp, r0, #0
	beq	.L4
	ldr	r0, [sp, #48]
	bl	createHistHashTable
	mov	r0, r4
	bl	hashhist
	mov	r6, r0
	subs	r0, r0, #0
	movne	r0, #1
	bl	assert
	mov	r1, r6
	mov	r0, r4
	bl	findHistHashTable
	subs	r5, r0, #0
	beq	.L25
	ldr	r7, .L63+12
	ldr	r3, [r7]
	cmp	r3, #0
	beq	.L5
	ldr	r2, [r5]
	cmp	r3, r2
	blt	.L57
	cmp	r10, #0
	beq	.L5
	mov	r2, r3
.L24:
	ldr	fp, [r5, #32]
	ldr	r3, [fp]
	cmp	r3, r2
	bge	.L7
.L5:
	mov	fp, #0
.L7:
	ldr	r3, .L63+16
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L58
.L8:
	mov	r0, r5
	bl	hremove
	mov	r0, r5
	bl	hfree
	mov	r0, #36
	bl	xmalloc
	mov	r2, #0
	mov	r5, r0
.L10:
	ldr	r3, [r7]
	cmp	r3, #0
	beq	.L12
	mov	r0, #0
	str	r3, [r5]
	str	r0, [r7]
.L13:
	cmp	r5, r2
	beq	.L1
	cmp	r9, #0
	str	r8, [r5, #8]
	str	r8, [r5, #4]
	add	r8, r5, #12
	bne	.L59
	ldr	r2, [r4, #4]
	ldr	r3, [r4]
	str	r2, [r5, #16]
	ldr	r2, [r4, #4]
	str	r8, [r2]
	str	r3, [r5, #12]
	ldr	r3, [r4]
	str	r8, [r3]
	str	r9, [r5, #28]
.L17:
	mov	r3, #0
	cmp	r10, r3
	str	r3, [r5, #24]
	beq	.L28
	mov	r1, fp
	mov	r0, r5
	bl	mergeInsertionPoint
	ldr	r4, [r0, #20]
	mov	r1, r0
	cmp	r4, #0
	bne	.L19
	b	.L20
.L22:
	mov	r1, r8
	bl	heq
	cmp	r0, #0
	bne	.L60
	ldr	r3, [r4, #20]
	mov	r1, r4
	cmp	r3, #0
	beq	.L20
	mov	r4, r3
.L19:
	ldr	r2, [r4]
	ldr	r3, [r5]
	add	r0, r4, #12
	cmp	r2, r3
	beq	.L22
.L20:
	ldr	r3, .L63+16
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L18
	mov	r0, r5
	str	r1, [sp, #4]
	bl	bubbleHnumHrefDown
	ldr	r1, [sp, #4]
	b	.L18
.L4:
	ldr	r3, .L63+20
	mov	r0, r5
	ldr	r1, [r3]
	bl	eq
	subs	r6, r0, #0
	bne	.L61
	ldr	r3, .L63+24
	mov	r0, r5
	ldr	r1, [r3]
	bl	eq
	cmp	r0, #0
	beq	.L11
	ldr	r5, .L63+28
	ldr	r1, [r5, #20]
	cmp	r1, #0
	bne	.L62
.L11:
	mov	r6, #0
	mov	fp, r6
	ldr	r7, .L63+12
.L3:
	mov	r0, #36
	bl	xmalloc
	mov	r2, #0
	mov	r5, r0
	b	.L10
.L28:
	ldr	r1, .L63+28
.L18:
	mov	r0, r5
	bl	hinsert
	ldr	r3, [sp, #48]
	cmp	r6, #0
	cmpne	r3, #0
	beq	.L23
	mov	r1, r6
	mov	r0, r5
	bl	insertHistHashTable
.L1:
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L23:
	bl	discardHistHashTable
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	mov	r0, r5
	str	r2, [sp, #4]
	bl	time
	ldr	r2, [sp, #4]
	b	.L13
.L59:
	mov	r1, r4
	mov	r0, r8
	bl	copylex
	ldr	r3, .L63+32
	ldr	r3, [r3]
	cmp	r3, #0
	streq	r3, [r5, #28]
	beq	.L17
	ldr	r3, .L63+36
	ldr	r0, [r3]
	bl	Strsave
	str	r0, [r5, #28]
	b	.L17
.L61:
	ldr	r0, [sp, #48]
	bl	createHistHashTable
	mov	r0, r4
	bl	hashhist
	mov	r6, r0
	subs	r0, r0, #0
	movne	r0, #1
	bl	assert
	mov	r1, r6
	mov	r0, r4
	bl	findHistHashTable
	subs	r2, r0, #0
	beq	.L26
	ldr	r1, .L63+40
	mov	r5, r2
	ldr	r3, [r1]
	ldr	r7, .L63+12
	sub	r3, r3, #1
	str	r3, [r1]
	b	.L10
.L25:
	mov	fp, r5
	ldr	r7, .L63+12
	b	.L3
.L60:
	mov	r0, r5
	mov	r5, r4
	ldr	r2, .L63+40
	ldr	r3, [r2]
	sub	r3, r3, #1
	str	r3, [r2]
	bl	hfree
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L58:
	mov	r0, r5
	bl	renumberHist
	b	.L8
.L57:
	cmp	r10, #0
	str	r2, [r7]
	beq	.L5
	cmp	r2, #0
	bne	.L24
	b	.L5
.L62:
	mov	r0, r4
	add	r1, r1, #12
	bl	heq
	cmp	r0, #0
	beq	.L11
	ldr	r1, .L63+40
	ldr	r2, [r5, #20]
	ldr	r3, [r1]
	cmp	r2, #0
	sub	r3, r3, #1
	str	r3, [r1]
	beq	.L11
	mov	r5, r2
	mov	fp, r6
	ldr	r7, .L63+12
	b	.L10
.L26:
	mov	fp, r2
	ldr	r7, .L63+12
	b	.L3
.L64:
	.align	2
.L63:
	.word	STRhistdup
	.word	STRNULL
	.word	STRerase
	.word	Htime
	.word	fastMergeErase
	.word	STRall
	.word	STRprev
	.word	Histlist
	.word	histvalid
	.word	histline
	.word	eventno
	.size	enthist, .-enthist
	.comm	histvalid,4,4
	.comm	histline,4,4
	.comm	fastMergeErase,4,4
	.comm	eventno,4,4
	.comm	STRprev,4,4
	.comm	STRhistdup,4,4
	.comm	STRerase,4,4
	.comm	STRall,4,4
	.comm	STRNULL,4,4
	.comm	Htime,4,4
	.comm	Histlist,36,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
