	.file	"extr_cmm.c_cmm_free_pages.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cmm_free_pages, @function
cmm_free_pages:
.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
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	lea	rdi, cmm_lock[rip]
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	spin_lock@PLT
	mov	rbx, QWORD PTR 0[r13]
	test	rbp, rbp
	je	.L7
	test	rbx, rbx
	je	.L11
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR [rbx]
	test	rax, rax
	je	.L11
	mov	rdx, QWORD PTR 8[rbx]
	sub	rax, 1
	sub	rbp, 1
	mov	QWORD PTR [rbx], rax
	mov	r14, QWORD PTR [rdx+rax*8]
	test	rax, rax
	je	.L16
	mov	rdi, r14
	call	free_page@PLT
	sub	QWORD PTR [r12], 1
	test	rbp, rbp
	jne	.L4
.L7:
	xor	r12d, r12d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rbx, QWORD PTR 16[rbx]
	mov	rdi, QWORD PTR 0[r13]
	call	free_page@PLT
	mov	QWORD PTR 0[r13], rbx
	mov	rdi, r14
	call	free_page@PLT
	sub	QWORD PTR [r12], 1
	test	rbp, rbp
	je	.L7
	test	rbx, rbx
	jne	.L4
.L11:
	mov	r12, rbp
.L3:
	lea	rdi, cmm_lock[rip]
	call	spin_unlock@PLT
	pop	rbx
	.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
	.cfi_endproc
.LFE0:
	.size	cmm_free_pages, .-cmm_free_pages
	.comm	cmm_lock,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_cmm.c_cmm_free_pages.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmm_free_pages, %function
cmm_free_pages:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	mov	r7, r2
	ldr	r0, .L16
	mov	r6, r1
	bl	spin_lock
	cmp	r5, #0
	ldr	r4, [r7]
	beq	.L7
.L6:
	cmp	r4, #0
	beq	.L3
.L4:
	ldr	r0, [r4]
	cmp	r0, #0
	sub	r3, r0, #1
	beq	.L3
	ldr	r2, [r4, #4]
	str	r3, [r4]
	cmp	r3, #0
	ldr	r8, [r2, r3, lsl #2]
	sub	r5, r5, #1
	beq	.L15
	mov	r0, r8
	bl	free_page
	ldr	r3, [r6]
	cmp	r5, #0
	sub	r3, r3, #1
	str	r3, [r6]
	bne	.L4
.L7:
	mov	r5, #0
.L3:
	ldr	r0, .L16
	bl	spin_unlock
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	ldr	r4, [r4, #8]
	ldr	r0, [r7]
	bl	free_page
	mov	r0, r8
	str	r4, [r7]
	bl	free_page
	ldr	r3, [r6]
	cmp	r5, #0
	sub	r3, r3, #1
	str	r3, [r6]
	bne	.L6
	mov	r5, #0
	b	.L3
.L17:
	.align	2
.L16:
	.word	cmm_lock
	.size	cmm_free_pages, .-cmm_free_pages
	.comm	cmm_lock,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
