	.file	"extr_cmd.c_lbs_free_cmd_buffer.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"FREE_CMD_BUF: cmd_array is NULL\n"
	.text
	.p2align 4
	.globl	lbs_free_cmd_buffer
	.type	lbs_free_cmd_buffer, @function
lbs_free_cmd_buffer:
.LFB0:
	.cfi_startproc
	endbr64
	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
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR LBS_DEB_HOST[rip]
	call	lbs_deb_enter@PLT
	mov	r12, QWORD PTR 0[r13]
	test	r12, r12
	je	.L2
	mov	eax, DWORD PTR LBS_NUM_CMD_BUFFERS[rip]
	xor	ebx, ebx
	test	eax, eax
	je	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	eax, ebx
	lea	rbp, [r12+rax*8]
	mov	rdi, QWORD PTR 0[rbp]
	test	rdi, rdi
	je	.L6
	call	kfree@PLT
	mov	QWORD PTR 0[rbp], 0
.L6:
	add	ebx, 1
	cmp	DWORD PTR LBS_NUM_CMD_BUFFERS[rip], ebx
	ja	.L3
	mov	r12, QWORD PTR 0[r13]
	test	r12, r12
	jne	.L4
.L5:
	mov	edi, DWORD PTR LBS_DEB_HOST[rip]
	call	lbs_deb_leave@PLT
	add	rsp, 8
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rdi, r12
	call	kfree@PLT
	mov	QWORD PTR 0[r13], 0
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	lea	rdi, .LC0[rip]
	call	lbs_deb_host@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	lbs_free_cmd_buffer, .-lbs_free_cmd_buffer
	.comm	LBS_NUM_CMD_BUFFERS,4,4
	.comm	LBS_DEB_HOST,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_cmd.c_lbs_free_cmd_buffer.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"FREE_CMD_BUF: cmd_array is NULL\012\000"
	.text
	.align	2
	.global	lbs_free_cmd_buffer
	.syntax unified
	.arm
	.fpu softvfp
	.type	lbs_free_cmd_buffer, %function
lbs_free_cmd_buffer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r0
	ldr	r8, .L17
	ldr	r0, [r8]
	bl	lbs_deb_enter
	ldr	r0, [r6]
	cmp	r0, #0
	beq	.L2
	ldr	r9, .L17+4
	ldr	r3, [r9]
	cmp	r3, #0
	movne	r5, #0
	subne	r4, r0, #4
	movne	r7, r5
	beq	.L4
.L7:
	ldr	r0, [r4, #4]!
	add	r5, r5, #1
	cmp	r0, #0
	beq	.L6
	bl	kfree
	str	r7, [r4]
.L6:
	ldr	r3, [r9]
	cmp	r3, r5
	bhi	.L7
	ldr	r0, [r6]
	cmp	r0, #0
	bne	.L4
.L5:
	ldr	r0, [r8]
	bl	lbs_deb_leave
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	bl	kfree
	mov	r3, #0
	str	r3, [r6]
	b	.L5
.L2:
	ldr	r0, .L17+8
	bl	lbs_deb_host
	b	.L5
.L18:
	.align	2
.L17:
	.word	LBS_DEB_HOST
	.word	LBS_NUM_CMD_BUFFERS
	.word	.LC0
	.size	lbs_free_cmd_buffer, .-lbs_free_cmd_buffer
	.comm	LBS_NUM_CMD_BUFFERS,4,4
	.comm	LBS_DEB_HOST,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
