	.file	"extr_isp1760-hcd.c_alloc_mem.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	alloc_mem, @function
alloc_mem:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	hcd_to_priv@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	rbp, rax
	call	WARN_ON@PLT
	mov	rdx, QWORD PTR [rbx]
	test	rdx, rdx
	je	.L1
	mov	ecx, DWORD PTR BLOCKS[rip]
	test	ecx, ecx
	jle	.L1
	mov	rax, QWORD PTR 0[rbp]
	sub	ecx, 1
	lea	rcx, 3[rcx+rcx*2]
	lea	rcx, [rax+rcx*8]
	.p2align 4,,10
	.p2align 3
.L4:
	cmp	rdx, QWORD PTR [rax]
	jg	.L3
	cmp	QWORD PTR 16[rax], 0
	jne	.L11
.L3:
	add	rax, 24
	cmp	rax, rcx
	jne	.L4
.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	QWORD PTR 16[rax], 0
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR 8[rbx], eax
	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	alloc_mem, .-alloc_mem
	.comm	BLOCKS,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_isp1760-hcd.c_alloc_mem.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	alloc_mem, %function
alloc_mem:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r1
	bl	hcd_to_priv
	mov	r5, r0
	ldr	r0, [r4, #4]
	bl	WARN_ON
	ldr	ip, [r4]
	cmp	ip, #0
	popeq	{r4, r5, r6, pc}
	ldr	r3, .L14
	ldr	lr, [r3]
	cmp	lr, #0
	pople	{r4, r5, r6, pc}
	mov	r2, #0
	ldr	r3, [r5]
	b	.L4
.L3:
	cmp	r2, lr
	add	r3, r3, #12
	popeq	{r4, r5, r6, pc}
.L4:
	ldr	r0, [r3]
	add	r2, r2, #1
	cmp	ip, r0
	bgt	.L3
	ldr	r0, [r3, #8]
	cmp	r0, #0
	beq	.L3
	mov	r1, #0
	ldr	r2, [r3, #4]
	str	r1, [r3, #8]
	str	r2, [r4, #4]
	pop	{r4, r5, r6, pc}
.L15:
	.align	2
.L14:
	.word	BLOCKS
	.size	alloc_mem, .-alloc_mem
	.comm	BLOCKS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
