	.file	"extr_main.c_ensure_chunks.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ensure_chunks
	.type	ensure_chunks, @function
ensure_chunks:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	eax, eax
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	check_workers@PLT
	mov	rdi, r13
	call	force_chunks@PLT
	mov	eax, DWORD PTR WORKERS[rip]
	test	eax, eax
	jle	.L1
	xor	ebx, ebx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdi, r12
	add	rbx, 1
	call	mtx_unlock@PLT
	cmp	DWORD PTR WORKERS[rip], ebx
	jle	.L1
.L4:
	mov	rax, QWORD PTR g[rip]
	mov	rbp, rbx
	sal	rbp, 4
	add	rbp, QWORD PTR [rax]
	lea	r12, 8[rbp]
	mov	rdi, r12
	call	mtx_lock@PLT
	mov	rax, QWORD PTR WORKER_IDLE[rip]
	cmp	QWORD PTR 0[rbp], rax
	jne	.L3
	mov	rsi, rbp
	mov	rdi, r13
	call	ensure_chunks_worker@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L1:
	add	rsp, 8
	.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
	.cfi_endproc
.LFE0:
	.size	ensure_chunks, .-ensure_chunks
	.comm	g,8,8
	.comm	WORKER_IDLE,8,8
	.comm	WORKERS,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_main.c_ensure_chunks.c"
	.text
	.align	2
	.global	ensure_chunks
	.syntax unified
	.arm
	.fpu softvfp
	.type	ensure_chunks, %function
ensure_chunks:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	fp, r0
	ldr	r8, .L8
	bl	check_workers
	mov	r0, fp
	bl	force_chunks
	ldr	r3, [r8]
	cmp	r3, #0
	pople	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	mov	r4, #0
	ldr	r10, .L8+4
	ldr	r9, .L8+8
	b	.L4
.L3:
	mov	r0, r5
	bl	mtx_unlock
	ldr	r3, [r8]
	cmp	r3, r4
	pople	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	ldr	r3, [r10]
	ldr	r6, [r3]
	add	r7, r6, r4, lsl #3
	add	r5, r7, #4
	mov	r0, r5
	bl	mtx_lock
	ldr	r2, [r6, r4, lsl #3]
	ldr	r3, [r9]
	add	r4, r4, #1
	cmp	r2, r3
	bne	.L3
	mov	r1, r7
	mov	r0, fp
	bl	ensure_chunks_worker
	b	.L3
.L9:
	.align	2
.L8:
	.word	WORKERS
	.word	g
	.word	WORKER_IDLE
	.size	ensure_chunks, .-ensure_chunks
	.comm	g,4,4
	.comm	WORKER_IDLE,4,4
	.comm	WORKERS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
