	.file	"extr_hugetlb.c_hugepage_subpool_get_pages.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	hugepage_subpool_get_pages, @function
hugepage_subpool_get_pages:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	test	rdi, rdi
	je	.L1
	lea	rbp, 32[rdi]
	mov	rbx, rdi
	mov	rdi, rbp
	call	spin_lock@PLT
	movsx	rax, DWORD PTR [rbx]
	cmp	eax, -1
	je	.L3
	mov	rdx, QWORD PTR 8[rbx]
	add	rdx, r12
	cmp	rdx, rax
	jg	.L4
	mov	QWORD PTR 8[rbx], rdx
.L3:
	cmp	DWORD PTR 16[rbx], -1
	je	.L5
	mov	rax, QWORD PTR 24[rbx]
	test	rax, rax
	je	.L5
	cmp	rax, r12
	jge	.L6
	mov	QWORD PTR 24[rbx], 0
	sub	r12, rax
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, rbp
	call	spin_unlock@PLT
.L1:
	mov	rax, r12
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	r12, QWORD PTR ENOMEM[rip]
	neg	r12
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	sub	rax, r12
	xor	r12d, r12d
	mov	QWORD PTR 24[rbx], rax
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	hugepage_subpool_get_pages, .-hugepage_subpool_get_pages
	.comm	ENOMEM,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_hugepage_subpool_get_pages.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hugepage_subpool_get_pages, %function
hugepage_subpool_get_pages:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	subs	r4, r0, #0
	mov	r5, r1
	beq	.L1
	add	r6, r4, #16
	mov	r0, r6
	bl	spin_lock
	ldr	r2, [r4]
	cmn	r2, #1
	beq	.L3
	ldr	r3, [r4, #4]
	add	r3, r5, r3
	cmp	r2, r3
	strge	r3, [r4, #4]
	blt	.L20
.L3:
	ldr	r3, [r4, #8]
	cmn	r3, #1
	beq	.L5
	ldr	r3, [r4, #12]
	cmp	r3, #0
	bne	.L21
.L5:
	mov	r0, r6
	bl	spin_unlock
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L21:
	cmp	r3, r5
	movlt	r2, #0
	subge	r3, r3, r5
	sublt	r5, r5, r3
	movge	r5, #0
	strlt	r2, [r4, #12]
	strge	r3, [r4, #12]
	b	.L5
.L20:
	ldr	r3, .L22
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L5
.L23:
	.align	2
.L22:
	.word	ENOMEM
	.size	hugepage_subpool_get_pages, .-hugepage_subpool_get_pages
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
