	.file	"extr_command_buffer.c_hl_cb_pool_init.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	hl_cb_pool_init
	.type	hl_cb_pool_init, @function
hl_cb_pool_init:
.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
	xor	ebx, ebx
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	INIT_LIST_HEAD@PLT
	lea	rdi, 12[rbp]
	call	spin_lock_init@PLT
	mov	eax, DWORD PTR 4[rbp]
	test	eax, eax
	jg	.L2
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L12:
	mov	DWORD PTR [rax], 1
	lea	rdi, 4[rax]
	mov	rsi, rbp
	add	ebx, 1
	call	list_add@PLT
	cmp	DWORD PTR 4[rbp], ebx
	jle	.L5
.L2:
	mov	esi, DWORD PTR 8[rbp]
	mov	edx, DWORD PTR HL_KERNEL_ASID_ID[rip]
	mov	rdi, rbp
	call	hl_cb_alloc@PLT
	test	rax, rax
	jne	.L12
	mov	rdi, rbp
	call	hl_cb_pool_fini@PLT
	mov	eax, DWORD PTR ENOMEM[rip]
	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
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	hl_cb_pool_init, .-hl_cb_pool_init
	.comm	HL_KERNEL_ASID_ID,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_command_buffer.c_hl_cb_pool_init.c"
	.text
	.align	2
	.global	hl_cb_pool_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	hl_cb_pool_init, %function
hl_cb_pool_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	bl	INIT_LIST_HEAD
	add	r0, r4, #12
	bl	spin_lock_init
	ldr	r3, [r4, #4]
	cmp	r3, #0
	ble	.L5
	mov	r5, #0
	mov	r7, #1
	ldr	r6, .L11
	b	.L2
.L10:
	mov	r1, r4
	str	r7, [r0], #4
	bl	list_add
	ldr	r3, [r4, #4]
	cmp	r3, r5
	ble	.L5
.L2:
	mov	r0, r4
	ldr	r2, [r6]
	ldr	r1, [r4, #8]
	bl	hl_cb_alloc
	cmp	r0, #0
	add	r5, r5, #1
	bne	.L10
	mov	r0, r4
	bl	hl_cb_pool_fini
	ldr	r3, .L11+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	.align	2
.L11:
	.word	HL_KERNEL_ASID_ID
	.word	ENOMEM
	.size	hl_cb_pool_init, .-hl_cb_pool_init
	.comm	HL_KERNEL_ASID_ID,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
