	.file	"extr_zstdmt_compress.c_ZSTDMT_createCCtx_advanced.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"ZSTDMT_createCCtx_advanced (nbWorkers = %u)"
	.align 8
.LC1:
	.string	"mt_cctx created, for %u threads"
	.text
	.p2align 4
	.globl	ZSTDMT_createCCtx_advanced
	.type	ZSTDMT_createCCtx_advanced, @function
ZSTDMT_createCCtx_advanced:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdx
	mov	edx, edi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	lea	rsi, .LC0[rip]
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	eax, 2[rdi]
	mov	edi, 3
	mov	DWORD PTR 4[rsp], eax
	call	DEBUGLOG@PLT
	test	r12d, r12d
	je	.L11
	mov	esi, DWORD PTR ZSTDMT_NBWORKERS_MAX[rip]
	mov	edi, r12d
	call	MIN@PLT
	test	r13, r13
	setne	dl
	test	rbp, rbp
	mov	r14d, eax
	setne	al
	cmp	dl, al
	jne	.L11
	mov	rsi, rbp
	mov	rdx, r13
	mov	edi, 64
	call	ZSTD_calloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L11
	lea	rdi, 56[rax]
	mov	esi, r14d
	call	ZSTDMT_CCtxParam_setNbWorkers@PLT
	mov	QWORD PTR 40[r12], rbp
	mov	rcx, r13
	xor	esi, esi
	mov	QWORD PTR 48[r12], r13
	mov	rdx, rbp
	mov	edi, r14d
	mov	DWORD PTR [r12], 1
	call	POOL_create_advanced@PLT
	mov	rsi, rbp
	mov	rdx, r13
	lea	rdi, 4[rsp]
	mov	DWORD PTR 24[r12], eax
	call	ZSTDMT_createJobsTable@PLT
	xor	edi, edi
	mov	DWORD PTR 20[r12], eax
	mov	eax, DWORD PTR 4[rsp]
	test	eax, eax
	setg	dil
	call	assert@PLT
	mov	eax, DWORD PTR 4[rsp]
	xor	edi, edi
	lea	edx, -1[rax]
	test	edx, eax
	sete	dil
	call	assert@PLT
	mov	eax, DWORD PTR 4[rsp]
	mov	rsi, rbp
	mov	rdx, r13
	mov	edi, r14d
	sub	eax, 1
	mov	DWORD PTR 4[r12], eax
	call	ZSTDMT_createBufferPool@PLT
	mov	rsi, rbp
	mov	rdx, r13
	mov	edi, r14d
	mov	DWORD PTR 16[r12], eax
	call	ZSTDMT_createCCtxPool@PLT
	mov	rsi, rbp
	mov	rdx, r13
	mov	edi, r14d
	mov	DWORD PTR 12[r12], eax
	call	ZSTDMT_createSeqPool@PLT
	lea	rdi, 32[r12]
	mov	DWORD PTR 8[r12], eax
	call	ZSTDMT_serialState_init@PLT
	mov	edx, DWORD PTR 24[r12]
	mov	ecx, DWORD PTR 20[r12]
	mov	r8d, eax
	mov	eax, DWORD PTR kNullRoundBuff[rip]
	mov	esi, DWORD PTR 16[r12]
	test	edx, edx
	mov	edi, DWORD PTR 12[r12]
	mov	r9d, DWORD PTR 8[r12]
	mov	DWORD PTR 28[r12], eax
	sete	al
	test	ecx, ecx
	sete	dl
	or	eax, edx
	test	esi, esi
	sete	dl
	or	eax, edx
	test	edi, edi
	sete	dl
	or	eax, edx
	test	r9d, r9d
	sete	dl
	or	eax, edx
	movzx	eax, al
	or	eax, r8d
	jne	.L13
	mov	edx, r14d
	lea	rsi, .LC1[rip]
	mov	edi, 3
	call	DEBUGLOG@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rdi, r12
	call	ZSTDMT_freeCCtx@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	xor	r12d, r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ZSTDMT_createCCtx_advanced, .-ZSTDMT_createCCtx_advanced
	.comm	kNullRoundBuff,4,4
	.comm	ZSTDMT_NBWORKERS_MAX,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_zstdmt_compress.c_ZSTDMT_createCCtx_advanced.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ZSTDMT_createCCtx_advanced (nbWorkers = %u)\000"
	.align	2
.LC1:
	.ascii	"mt_cctx created, for %u threads\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ZSTDMT_createCCtx_advanced
	.syntax unified
	.arm
	.fpu softvfp
	.type	ZSTDMT_createCCtx_advanced, %function
ZSTDMT_createCCtx_advanced:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	sub	sp, sp, #16
	mov	r5, sp
	mov	r4, r0
	stm	r5, {r1, r2}
	ldr	ip, .L15
	add	r3, r0, #2
	mov	r2, r4
	mov	r0, #3
	ldr	r1, .L15+4
	ldr	ip, [ip]
	str	ip, [sp, #12]
	mov	ip,#0
	str	r3, [sp, #8]
	bl	DEBUGLOG
	cmp	r4, #0
	beq	.L11
	ldr	r3, .L15+8
	mov	r0, r4
	ldr	r1, [r3]
	bl	MIN
	ldr	r2, [sp, #4]
	ldr	r3, [sp]
	subs	r2, r2, #0
	movne	r2, #1
	subs	r3, r3, #0
	movne	r3, #1
	cmp	r2, r3
	mov	r6, r0
	bne	.L11
	ldm	r5, {r1, r2}
	mov	r0, #48
	bl	ZSTD_calloc
	subs	r4, r0, #0
	beq	.L11
	mov	r1, r6
	add	r0, r4, #44
	bl	ZSTDMT_CCtxParam_setNbWorkers
	ldm	r5, {r0, r1}
	ldm	r5, {r2, r3}
	mov	lr, #1
	add	ip, r4, #36
	stm	ip, {r0, r1}
	str	lr, [r4]
	mov	r1, #0
	mov	r0, r6
	bl	POOL_create_advanced
	ldm	r5, {r1, r2}
	str	r0, [r4, #24]
	add	r0, sp, #8
	bl	ZSTDMT_createJobsTable
	ldr	r3, [sp, #8]
	str	r0, [r4, #20]
	cmp	r3, #0
	movle	r0, #0
	movgt	r0, #1
	bl	assert
	ldr	r3, [sp, #8]
	sub	r2, r3, #1
	tst	r2, r3
	moveq	r0, #1
	movne	r0, #0
	bl	assert
	ldm	r5, {r1, r2}
	ldr	r3, [sp, #8]
	mov	r0, r6
	sub	r3, r3, #1
	str	r3, [r4, #4]
	bl	ZSTDMT_createBufferPool
	ldm	r5, {r1, r2}
	str	r0, [r4, #16]
	mov	r0, r6
	bl	ZSTDMT_createCCtxPool
	ldm	r5, {r1, r2}
	str	r0, [r4, #12]
	mov	r0, r6
	bl	ZSTDMT_createSeqPool
	mov	r3, r0
	add	r0, r4, #32
	str	r3, [r4, #8]
	bl	ZSTDMT_serialState_init
	ldr	r2, [r4, #20]
	ldr	r1, [r4, #24]
	clz	r3, r2
	cmp	r1, #0
	ldr	r1, [r4, #16]
	ldr	r2, [r4, #12]
	lsr	r3, r3, #5
	moveq	r3, #1
	cmp	r1, #0
	ldr	r1, [r4, #8]
	moveq	r3, #1
	cmp	r2, #0
	moveq	r3, #1
	cmp	r1, #0
	moveq	r3, #1
	ldr	r2, .L15+12
	orrs	r3, r3, r0
	ldr	r2, [r2]
	str	r2, [r4, #28]
	bne	.L13
	mov	r2, r6
	ldr	r1, .L15+16
	mov	r0, #3
	bl	DEBUGLOG
	b	.L1
.L13:
	mov	r0, r4
	bl	ZSTDMT_freeCCtx
.L11:
	mov	r4, #0
.L1:
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r4
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC2
	.word	.LC0
	.word	ZSTDMT_NBWORKERS_MAX
	.word	kNullRoundBuff
	.word	.LC1
	.size	ZSTDMT_createCCtx_advanced, .-ZSTDMT_createCCtx_advanced
	.comm	kNullRoundBuff,4,4
	.comm	ZSTDMT_NBWORKERS_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
