	.file	"extr_dm-cache-policy-smq.c_q_redistribute.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	q_redistribute, @function
q_redistribute:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, 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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	q_set_targets@PLT
	cmp	DWORD PTR [r15], 1
	je	.L1
	xor	ebp, ebp
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, ebp
	mov	rdx, QWORD PTR 24[r15]
	mov	rcx, QWORD PTR 8[r15]
	mov	r13d, ebp
	lea	r14, 0[0+rax*4]
	add	ebp, 1
	lea	rbx, [rdx+r14]
	mov	r12d, DWORD PTR [rcx+rax*4]
	mov	eax, DWORD PTR [rbx]
	cmp	r12d, eax
	ja	.L5
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	DWORD PTR [rax], r13d
	mov	edi, DWORD PTR 16[r15]
	mov	rsi, rbx
	call	l_add_tail@PLT
	mov	eax, DWORD PTR [rbx]
	cmp	eax, r12d
	jnb	.L20
.L5:
	mov	esi, ebp
	mov	rdi, r15
	call	__redist_pop_from@PLT
	mov	rdx, rax
	test	rax, rax
	jne	.L4
	mov	rdx, QWORD PTR 24[r15]
	mov	eax, DWORD PTR [rbx]
.L3:
	lea	r13, 4[rdx+r14]
	cmp	r12d, eax
	jb	.L6
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L21:
	mov	DWORD PTR [rax], ebp
	mov	edi, DWORD PTR 16[r15]
	mov	rsi, r13
	call	l_add_tail@PLT
	cmp	DWORD PTR [rbx], r12d
	jbe	.L8
.L6:
	mov	edi, DWORD PTR 16[r15]
	mov	rsi, rbx
	call	l_pop_tail@PLT
	mov	rdx, rax
	test	rax, rax
	jne	.L21
.L8:
	mov	eax, DWORD PTR [r15]
	sub	eax, 1
	cmp	eax, ebp
	ja	.L2
.L1:
	add	rsp, 8
	.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
.L20:
	.cfi_restore_state
	mov	rdx, QWORD PTR 24[r15]
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	q_redistribute, .-q_redistribute
	.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_dm-cache-policy-smq.c_q_redistribute.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	q_redistribute, %function
q_redistribute:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	bl	q_set_targets
	ldr	r3, [r4]
	cmp	r3, #1
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r6, #0
.L2:
	ldr	r2, [r4, #12]
	ldr	r1, [r4, #4]
	ldr	r3, [r2, r6, lsl #2]
	ldr	r7, [r1, r6, lsl #2]
	mov	r8, r6
	cmp	r7, r3
	add	r5, r2, r6, lsl #2
	lsl	r9, r6, #2
	add	r6, r6, #1
	bhi	.L5
	b	.L3
.L4:
	mov	r1, r5
	ldr	r0, [r4, #8]
	str	r8, [r2]
	bl	l_add_tail
	ldr	r3, [r5]
	cmp	r3, r7
	bcs	.L20
.L5:
	mov	r1, r6
	mov	r0, r4
	bl	__redist_pop_from
	subs	r2, r0, #0
	bne	.L4
	ldr	r2, [r4, #12]
	ldr	r3, [r5]
.L3:
	add	r9, r9, #4
	cmp	r7, r3
	add	r9, r2, r9
	bcc	.L6
	b	.L8
.L21:
	mov	r1, r9
	ldr	r0, [r4, #8]
	str	r6, [r2]
	bl	l_add_tail
	ldr	r3, [r5]
	cmp	r3, r7
	bls	.L8
.L6:
	mov	r1, r5
	ldr	r0, [r4, #8]
	bl	l_pop_tail
	subs	r2, r0, #0
	bne	.L21
.L8:
	ldr	r3, [r4]
	sub	r3, r3, #1
	cmp	r3, r6
	bhi	.L2
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L20:
	ldr	r2, [r4, #12]
	b	.L3
	.size	q_redistribute, .-q_redistribute
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
