	.file	"extr_ips.c_ips_cmdqueue_init.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ips_cmdqueue_init, @function
ips_cmdqueue_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	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 [rdi]
	mov	esi, DWORD PTR M_DEVBUF[rip]
	mov	edx, DWORD PTR M_NOWAIT[rip]
	or	edx, DWORD PTR M_ZERO[rip]
	sal	edi, 5
	call	malloc@PLT
	mov	QWORD PTR 32[r12], rax
	test	rax, rax
	je	.L13
	lea	r13, 16[r12]
	mov	rdi, r13
	call	SLIST_INIT@PLT
	mov	esi, DWORD PTR [r12]
	test	esi, esi
	jle	.L4
	xor	ebx, ebx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	mov	QWORD PTR 8[r12], rbp
	add	rbx, 1
	cmp	DWORD PTR [r12], ebx
	jle	.L4
.L10:
	mov	rbp, rbx
	mov	edi, DWORD PTR 24[r12]
	mov	edx, DWORD PTR BUS_DMA_NOWAIT[rip]
	sal	rbp, 5
	add	rbp, QWORD PTR 32[r12]
	mov	DWORD PTR 0[rbp], ebx
	lea	rcx, 12[rbp]
	lea	rsi, 16[rbp]
	mov	QWORD PTR 24[rbp], r12
	call	bus_dmamem_alloc@PLT
	test	rax, rax
	jne	.L7
	mov	eax, DWORD PTR BUS_DMA_NOWAIT[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	edx, DWORD PTR 16[rbp]
	mov	r9, rbp
	mov	esi, DWORD PTR 12[rbp]
	mov	ecx, DWORD PTR IPS_COMMAND_LEN[rip]
	mov	edi, DWORD PTR 24[r12]
	mov	r8d, DWORD PTR ips_cmd_dmaload[rip]
	push	rax
	.cfi_def_cfa_offset 64
	call	bus_dmamap_load@PLT
	mov	ecx, DWORD PTR 20[rbp]
	pop	rax
	.cfi_def_cfa_offset 56
	pop	rdx
	.cfi_def_cfa_offset 48
	test	ecx, ecx
	je	.L15
	test	rbx, rbx
	je	.L8
	mov	edi, DWORD PTR 20[r12]
	xor	esi, esi
	lea	rdx, 4[rbp]
	mov	DWORD PTR 8[rbp], edi
	call	bus_dmamap_create@PLT
	test	rax, rax
	jne	.L7
	mov	edx, DWORD PTR next[rip]
	mov	rsi, rbp
	mov	rdi, r13
	add	rbx, 1
	call	SLIST_INSERT_HEAD@PLT
	cmp	DWORD PTR [r12], ebx
	jg	.L10
.L4:
	mov	eax, DWORD PTR IPS_OFFLINE[rip]
	not	eax
	and	DWORD PTR 4[r12], eax
	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
.L15:
	.cfi_restore_state
	mov	edx, DWORD PTR 12[rbp]
	mov	esi, DWORD PTR 16[rbp]
	mov	edi, DWORD PTR 24[r12]
	call	bus_dmamem_free@PLT
.L7:
	mov	rdi, r12
	call	ips_cmdqueue_free@PLT
.L13:
	mov	eax, DWORD PTR ENOMEM[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	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
	.cfi_endproc
.LFE0:
	.size	ips_cmdqueue_init, .-ips_cmdqueue_init
	.comm	next,4,4
	.comm	ips_cmd_dmaload,4,4
	.comm	M_ZERO,4,4
	.comm	M_NOWAIT,4,4
	.comm	M_DEVBUF,4,4
	.comm	IPS_OFFLINE,4,4
	.comm	IPS_COMMAND_LEN,4,4
	.comm	ENOMEM,4,4
	.comm	BUS_DMA_NOWAIT,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_ips.c_ips_cmdqueue_init.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ips_cmdqueue_init, %function
ips_cmdqueue_init:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r2, .L18
	ldr	r3, .L18+4
	mov	r5, r0
	ldr	r0, [r0]
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, .L18+8
	rsb	r0, r0, r0, lsl #3
	orr	r2, r1, r2
	sub	sp, sp, #28
	ldr	r1, [r3]
	lsl	r0, r0, #2
	bl	malloc
	cmp	r0, #0
	str	r0, [r5, #24]
	beq	.L15
	add	r3, r5, #12
	mov	r0, r3
	str	r3, [sp, #20]
	bl	SLIST_INIT
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L4
	mov	r8, #0
	ldr	r9, .L18+12
	mov	r6, r8
	ldr	fp, .L18+16
	ldr	r10, .L18+20
	b	.L10
.L9:
	ldr	r3, [r5]
	add	r6, r6, #1
	cmp	r3, r6
	add	r8, r8, #28
	ble	.L4
.L10:
	ldr	r3, [r5, #24]
	ldr	r2, [r9]
	add	r4, r3, r8
	str	r6, [r3, r8]
	ldr	r0, [r5, #20]
	add	r3, r4, #12
	str	r5, [r4, #24]
	add	r1, r4, #16
	bl	bus_dmamem_alloc
	subs	r7, r0, #0
	bne	.L7
	ldr	r0, [r9]
	ldr	r3, [r10]
	ldr	r2, [r4, #16]
	ldr	r1, [r4, #12]
	str	r3, [sp]
	str	r4, [sp, #4]
	str	r0, [sp, #8]
	ldr	r3, [fp]
	ldr	r0, [r5, #20]
	bl	bus_dmamap_load
	ldr	r3, [r4, #20]
	cmp	r3, #0
	beq	.L17
	cmp	r6, #0
	streq	r4, [r5, #8]
	beq	.L9
	ldr	r0, [r5, #16]
	mov	r1, r7
	str	r0, [r4, #8]
	add	r2, r4, #4
	bl	bus_dmamap_create
	cmp	r0, #0
	bne	.L7
	ldr	r3, .L18+24
	mov	r1, r4
	ldr	r2, [r3]
	ldr	r0, [sp, #20]
	bl	SLIST_INSERT_HEAD
	b	.L9
.L17:
	ldr	r2, [r4, #12]
	ldr	r1, [r4, #16]
	ldr	r0, [r5, #20]
	bl	bus_dmamem_free
.L7:
	mov	r0, r5
	bl	ips_cmdqueue_free
.L15:
	ldr	r3, .L18+28
	ldr	r0, [r3]
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mov	r0, #0
	ldr	r2, .L18+32
	ldr	r3, [r5, #4]
	ldr	r2, [r2]
	bic	r3, r3, r2
	str	r3, [r5, #4]
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	.align	2
.L18:
	.word	M_NOWAIT
	.word	M_ZERO
	.word	M_DEVBUF
	.word	BUS_DMA_NOWAIT
	.word	IPS_COMMAND_LEN
	.word	ips_cmd_dmaload
	.word	next
	.word	ENOMEM
	.word	IPS_OFFLINE
	.size	ips_cmdqueue_init, .-ips_cmdqueue_init
	.comm	next,4,4
	.comm	ips_cmd_dmaload,4,4
	.comm	M_ZERO,4,4
	.comm	M_NOWAIT,4,4
	.comm	M_DEVBUF,4,4
	.comm	IPS_OFFLINE,4,4
	.comm	IPS_COMMAND_LEN,4,4
	.comm	ENOMEM,4,4
	.comm	BUS_DMA_NOWAIT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
