	.file	"extr_hugetlb.c_return_unused_surplus_pages.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	return_unused_surplus_pages, @function
return_unused_surplus_pages:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	sub	QWORD PTR [rdi], rsi
	mov	rax, QWORD PTR MAX_ORDER[rip]
	cmp	QWORD PTR 8[rdi], rax
	jl	.L11
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rdi, rsi
	mov	esi, DWORD PTR 16[rbp]
	call	min@PLT
	mov	rbx, rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdx, QWORD PTR N_HIGH_MEMORY[rip]
	mov	rax, QWORD PTR node_states[rip]
	mov	rdi, rbp
	sub	rbx, 1
	lea	rsi, [rax+rdx*4]
	mov	edx, 1
	call	free_pool_huge_page@PLT
	test	eax, eax
	je	.L1
.L3:
	test	rbx, rbx
	jne	.L5
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	return_unused_surplus_pages, .-return_unused_surplus_pages
	.comm	node_states,8,8
	.comm	N_HIGH_MEMORY,8,8
	.comm	MAX_ORDER,8,8
	.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_hugetlb.c_return_unused_surplus_pages.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	return_unused_surplus_pages, %function
return_unused_surplus_pages:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r2, .L12
	ldr	r3, [r0]
	ldr	r2, [r2]
	ldr	r0, [r0, #4]
	sub	r3, r3, r1
	cmp	r0, r2
	str	r3, [r5]
	popge	{r4, r5, r6, r7, r8, pc}
	mov	r0, r1
	ldr	r1, [r5, #8]
	bl	min
	mov	r4, r0
	cmp	r4, #0
	ldr	r7, .L12+4
	ldr	r6, .L12+8
	popeq	{r4, r5, r6, r7, r8, pc}
.L11:
	ldr	r1, [r6]
	ldr	r3, [r7]
	mov	r2, #1
	mov	r0, r5
	add	r1, r3, r1, lsl #2
	bl	free_pool_huge_page
	cmp	r0, #0
	sub	r4, r4, #1
	popeq	{r4, r5, r6, r7, r8, pc}
	cmp	r4, #0
	bne	.L11
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	.align	2
.L12:
	.word	MAX_ORDER
	.word	node_states
	.word	N_HIGH_MEMORY
	.size	return_unused_surplus_pages, .-return_unused_surplus_pages
	.comm	node_states,4,4
	.comm	N_HIGH_MEMORY,4,4
	.comm	MAX_ORDER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
