	.file	"extr_mon_bin.c_mon_alloc_buff.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mon_alloc_buff, @function
mon_alloc_buff:
.LFB0:
	.cfi_startproc
	endbr64
	test	esi, esi
	jle	.L14
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L3:
	mov	QWORD PTR [rbx], rax
	add	ebp, 1
	add	rbx, 16
	call	virt_to_page@PLT
	mov	DWORD PTR -8[rbx], eax
	cmp	r12d, ebp
	je	.L19
.L7:
	mov	edi, DWORD PTR GFP_KERNEL[rip]
	call	get_zeroed_page@PLT
	mov	rdi, rax
	test	rax, rax
	jne	.L3
	test	ebp, ebp
	je	.L4
	movsx	rax, ebp
	lea	edx, -1[rbp]
	sal	rax, 4
	sal	rdx, 4
	lea	rbx, 0[r13+rax]
	lea	rax, -16[r13+rax]
	sub	rax, rdx
	mov	rbp, rax
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, QWORD PTR -16[rbx]
	sub	rbx, 16
	call	free_page@PLT
	cmp	rbx, rbp
	jne	.L5
.L4:
	mov	eax, DWORD PTR ENOMEM[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	xor	eax, eax
	ret
	.cfi_endproc
.LFE0:
	.size	mon_alloc_buff, .-mon_alloc_buff
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,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_mon_bin.c_mon_alloc_buff.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mon_alloc_buff, %function
mon_alloc_buff:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	subs	r6, r1, #0
	ble	.L2
	mov	r5, r0
	mov	r4, #0
	ldr	r7, .L15
	add	r8, r0, #4
	b	.L7
.L3:
	str	r3, [r5, r4, lsl #3]
	bl	virt_to_page
	str	r0, [r8, r4, lsl #3]
	add	r4, r4, #1
	cmp	r6, r4
	beq	.L2
.L7:
	ldr	r0, [r7]
	bl	get_zeroed_page
	subs	r3, r0, #0
	bne	.L3
	cmp	r4, #0
	sub	r4, r4, #1
	beq	.L4
.L5:
	ldr	r0, [r5, r4, lsl #3]
	sub	r4, r4, #1
	bl	free_page
	cmn	r4, #1
	bne	.L5
.L4:
	ldr	r3, .L15+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	.align	2
.L15:
	.word	GFP_KERNEL
	.word	ENOMEM
	.size	mon_alloc_buff, .-mon_alloc_buff
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
