	.file	"extr_buffering.c_pool_push.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	pool_push
	.type	pool_push, @function
pool_push:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	rax, 32[rdi]
	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, esi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	mov	rdi, rax
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	QWORD PTR [rsp], rax
	call	pthread_mutex_lock@PLT
	xor	edi, edi
	test	r12d, r12d
	js	.L2
	xor	edi, edi
	cmp	DWORD PTR 0[rbp], r12d
	setg	dil
.L2:
	call	assert@PLT
	mov	edx, DWORD PTR 48[rbp]
	mov	rcx, QWORD PTR 56[rbp]
	movsx	rax, r12d
	xor	edi, edi
	lea	r13, 0[0+rax*8]
	mov	DWORD PTR [rcx+rax*4], edx
	add	edx, 1
	mov	DWORD PTR 48[rbp], edx
	mov	rdx, QWORD PTR 8[rbp]
	cmp	QWORD PTR [rdx+rax*8], 0
	setg	dil
	call	assert@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	ecx, DWORD PTR 16[rbp]
	add	rax, r13
	movsx	rdx, ecx
	mov	rcx, QWORD PTR [rax]
	mov	DWORD PTR 12[rsp], edx
	lea	rdx, -1[rcx+rdx]
	mov	QWORD PTR [rax], rdx
	mov	edx, DWORD PTR POOL_MAX_QUEUES[rip]
	test	edx, edx
	jle	.L3
	xor	r14d, r14d
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdx, QWORD PTR 40[rbp]
	lea	rax, [r14+r14*4]
	lea	rbx, [rdx+rax*8]
	mov	eax, DWORD PTR 36[rbx]
	test	eax, eax
	je	.L4
	lea	r15, 32[rbx]
	mov	rdi, r15
	call	pthread_mutex_lock@PLT
	movsx	rsi, DWORD PTR [rbx]
	lea	eax, 1[rsi]
	cdq
	idiv	DWORD PTR 4[rbx]
	cmp	edx, DWORD PTR 8[rbx]
	je	.L15
	mov	rax, QWORD PTR 8[rbp]
	xor	edi, edi
	add	rax, r13
	add	QWORD PTR [rax], 1
	mov	rax, QWORD PTR 16[rbx]
	mov	DWORD PTR [rax+rsi*4], r12d
	mov	eax, DWORD PTR [rbx]
	add	eax, 1
	cdq
	idiv	DWORD PTR 4[rbx]
	cmp	DWORD PTR 8[rbx], edx
	setne	dil
	mov	DWORD PTR [rbx], edx
	call	assert@PLT
	mov	rdi, r15
	call	pthread_mutex_unlock@PLT
	mov	edi, DWORD PTR 28[rbx]
	call	efd_write@PLT
	lea	rdi, 24[rbx]
	call	pthread_cond_signal@PLT
.L4:
	add	r14, 1
	cmp	DWORD PTR POOL_MAX_QUEUES[rip], r14d
	jg	.L6
.L3:
	mov	rdi, QWORD PTR [rsp]
	call	pthread_mutex_unlock@PLT
	mov	eax, DWORD PTR 12[rsp]
	test	eax, eax
	jle	.L1
	sub	eax, 1
	xor	ebx, ebx
	lea	r13, 4[0+rax*4]
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, QWORD PTR 24[rbp]
	mov	esi, r12d
	add	rdi, rbx
	add	rbx, 4
	call	tbuffer_dispatch@PLT
	cmp	r13, rbx
	jne	.L8
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L15:
	.cfi_restore_state
	mov	rdi, r15
	call	pthread_mutex_unlock@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	pool_push, .-pool_push
	.comm	POOL_MAX_QUEUES,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_buffering.c_pool_push.c"
	.text
	.global	__aeabi_idivmod
	.align	2
	.global	pool_push
	.syntax unified
	.arm
	.fpu softvfp
	.type	pool_push, %function
pool_push:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r8, r1
	add	r3, r0, #16
	sub	sp, sp, #20
	mov	r6, r0
	mov	r0, r3
	str	r3, [sp, #8]
	bl	pthread_mutex_lock
	cmp	r8, #0
	movlt	r0, #0
	blt	.L2
	ldr	r0, [r6]
	cmp	r0, r8
	movle	r0, #0
	movgt	r0, #1
.L2:
	bl	assert
	ldr	r2, [r6, #4]
	ldr	r3, [r6, #24]
	ldr	r0, [r2, r8, lsl #2]
	ldr	r1, [r6, #28]
	add	r2, r3, #1
	cmp	r0, #0
	str	r3, [r1, r8, lsl #2]
	movle	r0, #0
	movgt	r0, #1
	str	r2, [r6, #24]
	bl	assert
	ldr	r1, [r6, #4]
	ldr	fp, .L18
	ldr	r3, [r1, r8, lsl #2]
	ldr	r2, [r6, #8]
	ldr	r0, [fp]
	sub	r3, r3, #1
	add	r3, r3, r2
	cmp	r0, #0
	str	r3, [r1, r8, lsl #2]
	str	r2, [sp, #12]
	lsl	r3, r8, #2
	ble	.L3
	mov	r5, #0
	mov	r9, r3
	str	r8, [sp, #4]
.L6:
	ldr	r7, [r6, #20]
	lsl	r8, r5, #5
	add	r4, r7, r5, lsl #5
	ldr	r3, [r4, #28]
	add	r10, r4, #24
	cmp	r3, #0
	beq	.L4
	mov	r0, r10
	bl	pthread_mutex_lock
	ldr	r3, [r7, r5, lsl #5]
	ldr	r1, [r4, #4]
	add	r0, r3, #1
	str	r3, [sp]
	bl	__aeabi_idivmod
	ldr	r0, [r4, #8]
	ldr	r3, [sp]
	cmp	r1, r0
	beq	.L17
	ldr	r0, [r6, #4]
	ldr	ip, [r4, #12]
	ldr	r1, [r0, r9]
	ldr	r2, [sp, #4]
	add	r1, r1, #1
	str	r1, [r0, r9]
	str	r2, [ip, r3, lsl #2]
	ldr	r0, [r7, r8]
	ldr	r1, [r4, #4]
	add	r0, r0, #1
	bl	__aeabi_idivmod
	ldr	r0, [r4, #8]
	str	r1, [r7, r8]
	subs	r0, r0, r1
	movne	r0, #1
	bl	assert
	mov	r0, r10
	bl	pthread_mutex_unlock
	ldr	r0, [r4, #20]
	bl	efd_write
	add	r0, r4, #16
	bl	pthread_cond_signal
.L4:
	ldr	r3, [fp]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L6
	ldr	r8, [sp, #4]
.L3:
	ldr	r0, [sp, #8]
	bl	pthread_mutex_unlock
	ldr	r5, [sp, #12]
	cmp	r5, #0
	ble	.L1
	mov	r4, #0
.L8:
	ldr	r0, [r6, #12]
	mov	r1, r8
	add	r0, r0, r4, lsl #2
	add	r4, r4, #1
	bl	tbuffer_dispatch
	cmp	r5, r4
	bne	.L8
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	mov	r0, r10
	bl	pthread_mutex_unlock
	b	.L4
.L19:
	.align	2
.L18:
	.word	POOL_MAX_QUEUES
	.size	pool_push, .-pool_push
	.comm	POOL_MAX_QUEUES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
