	.file	"extr_zdict.c_ZDICT_finalizeDictionary.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"ZDICT_finalizeDictionary"
.LC1:
	.string	""
.LC2:
	.string	"\r%70s\r"
.LC3:
	.string	"statistics ... \n"
	.text
	.p2align 4
	.globl	ZDICT_finalizeDictionary
	.type	ZDICT_finalizeDictionary, @function
ZDICT_finalizeDictionary:
.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
	mov	r13, rdi
	mov	edi, 4
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	lea	rsi, .LC0[rip]
	sub	rsp, 1080
	.cfi_def_cfa_offset 1136
	mov	QWORD PTR 8[rsp], r8
	mov	r14d, DWORD PTR 1144[rsp]
	mov	QWORD PTR 16[rsp], r9
	mov	r15d, DWORD PTR 1152[rsp]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 1064[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR 1148[rsp]
	test	r14d, r14d
	cmove	r14d, DWORD PTR g_compressionLevel_default[rip]
	mov	DWORD PTR 4[rsp], eax
	call	DEBUGLOG@PLT
	cmp	rbx, r12
	jb	.L6
	cmp	QWORD PTR ZDICT_CONTENTSIZE_MIN[rip], r12
	ja	.L12
	cmp	QWORD PTR ZDICT_DICTSIZE_MIN[rip], rbx
	ja	.L6
	mov	esi, DWORD PTR ZSTD_MAGIC_DICTIONARY[rip]
	lea	rdi, 32[rsp]
	mov	QWORD PTR 24[rsp], rdi
	call	MEM_writeLE32@PLT
	xor	edx, edx
	mov	rsi, r12
	mov	rdi, rbp
	call	XXH64@PLT
	test	r15d, r15d
	jne	.L7
	mov	ecx, eax
	mov	rdx, rcx
	sal	rdx, 16
	add	rdx, rcx
	sal	rdx, 15
	add	rdx, rcx
	shr	rdx, 62
	imul	edx, edx, 2147450880
	sub	eax, edx
	lea	r15d, 32768[rax]
.L7:
	lea	rdi, 48[rsp]
	mov	esi, r15d
	call	MEM_writeLE32@PLT
	lea	rdx, .LC1[rip]
	lea	rsi, .LC2[rip]
	xor	eax, eax
	mov	edi, 2
	call	DISPLAYLEVEL@PLT
	lea	rsi, .LC3[rip]
	mov	edi, 2
	xor	eax, eax
	call	DISPLAYLEVEL@PLT
	lea	rdi, 64[rsp]
	sub	rsp, 8
	.cfi_def_cfa_offset 1144
	mov	edx, r14d
	mov	eax, DWORD PTR 12[rsp]
	mov	esi, 248
	push	rax
	.cfi_def_cfa_offset 1152
	push	r12
	.cfi_def_cfa_offset 1160
	push	rbp
	.cfi_def_cfa_offset 1168
	mov	r9d, DWORD PTR 1168[rsp]
	mov	r8, QWORD PTR 48[rsp]
	mov	rcx, QWORD PTR 40[rsp]
	call	ZDICT_analyzeEntropy@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 1136
	mov	rdi, rax
	mov	r14, rax
	call	ZDICT_isError@PLT
	test	rax, rax
	jne	.L1
	lea	r15, 8[r14]
	lea	r14, [r12+r15]
	cmp	r14, rbx
	jbe	.L8
	mov	r12, rbx
	mov	r14, rbx
	sub	r12, r15
.L8:
	lea	rdi, 0[r13+r15]
	mov	rdx, r12
	mov	rsi, rbp
	call	memmove@PLT
	mov	rsi, QWORD PTR 24[rsp]
	mov	rdx, r15
	mov	rdi, r13
	call	memcpy@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edi, DWORD PTR dstSize_tooSmall[rip]
	call	ERROR@PLT
	mov	r14, rax
.L1:
	mov	rax, QWORD PTR 1064[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 1080
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r14
	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
.L12:
	.cfi_restore_state
	mov	edi, DWORD PTR srcSize_wrong[rip]
	call	ERROR@PLT
	mov	r14, rax
	jmp	.L1
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ZDICT_finalizeDictionary, .-ZDICT_finalizeDictionary
	.comm	srcSize_wrong,4,4
	.comm	g_compressionLevel_default,4,4
	.comm	dstSize_tooSmall,4,4
	.comm	ZSTD_MAGIC_DICTIONARY,4,4
	.comm	ZDICT_DICTSIZE_MIN,8,8
	.comm	ZDICT_CONTENTSIZE_MIN,8,8
	.comm	HBUFFSIZE,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_zdict.c_ZDICT_finalizeDictionary.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ZDICT_finalizeDictionary\000"
	.align	2
.LC1:
	.ascii	"\000"
	.align	2
.LC2:
	.ascii	"\015%70s\015\000"
	.align	2
.LC3:
	.ascii	"statistics ... \012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ZDICT_finalizeDictionary
	.syntax unified
	.arm
	.fpu softvfp
	.type	ZDICT_finalizeDictionary, %function
ZDICT_finalizeDictionary:
	@ args = 24, pretend = 0, frame = 1040
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r1
	mov	r4, r3
	sub	sp, sp, #1056
	sub	sp, sp, #12
	ldr	r3, .L14
	ldr	r8, [sp, #1116]
	ldr	r3, [r3]
	str	r3, [sp, #1060]
	mov	r3,#0
	ldr	r3, [sp, #1108]
	cmp	r8, #0
	str	r3, [sp, #28]
	ldreq	r3, .L14+4
	mov	r7, r0
	ldr	r1, .L14+8
	mov	r0, #4
	ldreq	r8, [r3]
	mov	r6, r2
	ldr	r10, [sp, #1104]
	ldr	r9, [sp, #1124]
	ldr	fp, [sp, #1120]
	bl	DEBUGLOG
	cmp	r5, r4
	bcc	.L6
	ldr	r3, .L14+12
	ldr	r3, [r3]
	cmp	r3, r4
	bhi	.L12
	ldr	r3, .L14+16
	ldr	r3, [r3]
	cmp	r3, r5
	bhi	.L6
	ldr	r3, .L14+20
	add	r0, sp, #36
	ldr	r1, [r3]
	bl	MEM_writeLE32
	mov	r2, #0
	mov	r1, r4
	mov	r0, r6
	bl	XXH64
	cmp	r9, #0
	bne	.L7
	ldr	r9, .L14+24
	umull	r3, r9, r0, r9
	lsr	r9, r9, #30
	rsb	r9, r9, r9, lsl #16
	sub	r0, r0, r9, lsl #15
	add	r9, r0, #32768
.L7:
	mov	r1, r9
	add	r0, sp, #52
	bl	MEM_writeLE32
	ldr	r2, .L14+28
	ldr	r1, .L14+32
	mov	r0, #2
	bl	DISPLAYLEVEL
	ldr	r1, .L14+36
	mov	r0, #2
	bl	DISPLAYLEVEL
	ldr	r3, [sp, #1112]
	mov	r2, r8
	str	r3, [sp, #4]
	ldr	r3, [sp, #28]
	mov	r1, #248
	str	r3, [sp]
	str	fp, [sp, #16]
	mov	r3, r10
	str	r4, [sp, #12]
	str	r6, [sp, #8]
	add	r0, sp, #68
	bl	ZDICT_analyzeEntropy
	mov	r8, r0
	bl	ZDICT_isError
	cmp	r0, #0
	bne	.L1
	add	r9, r8, #8
	add	r8, r4, r9
	cmp	r8, r5
	subhi	r4, r5, r9
	mov	r2, r4
	mov	r1, r6
	add	r0, r7, r9
	movhi	r8, r5
	bl	memmove
	mov	r2, r9
	mov	r0, r7
	add	r1, sp, #36
	bl	memcpy
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #1060]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, r8
	add	sp, sp, #1056
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	ldr	r3, .L14+40
	ldr	r0, [r3]
	bl	ERROR
	mov	r8, r0
	b	.L1
.L12:
	ldr	r3, .L14+44
	ldr	r0, [r3]
	bl	ERROR
	mov	r8, r0
	b	.L1
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC4
	.word	g_compressionLevel_default
	.word	.LC0
	.word	ZDICT_CONTENTSIZE_MIN
	.word	ZDICT_DICTSIZE_MIN
	.word	ZSTD_MAGIC_DICTIONARY
	.word	-2147450879
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	dstSize_tooSmall
	.word	srcSize_wrong
	.size	ZDICT_finalizeDictionary, .-ZDICT_finalizeDictionary
	.comm	srcSize_wrong,4,4
	.comm	g_compressionLevel_default,4,4
	.comm	dstSize_tooSmall,4,4
	.comm	ZSTD_MAGIC_DICTIONARY,4,4
	.comm	ZDICT_DICTSIZE_MIN,4,4
	.comm	ZDICT_CONTENTSIZE_MIN,4,4
	.comm	HBUFFSIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
