	.file	"extr_if_an.c_an_init_mpi350_desc.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"failed to allocate RX descriptor\n"
	.align 8
.LC1:
	.string	"failed to allocate TX descriptor\n"
	.align 8
.LC2:
	.string	"failed to allocate host descriptor\n"
	.text
	.p2align 4
	.globl	an_init_mpi350_desc
	.type	an_init_mpi350_desc, @function
an_init_mpi350_desc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 328
	.cfi_def_cfa_offset 384
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 312[rsp], rax
	xor	eax, eax
	call	AN_LOCK_ASSERT@PLT
	cmp	QWORD PTR [rbx], 0
	je	.L42
.L2:
	mov	esi, DWORD PTR AN_MAX_RX_DESC[rip]
	xor	ebp, ebp
	test	esi, esi
	jg	.L3
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	add	rbp, 1
	cmp	DWORD PTR AN_MAX_RX_DESC[rip], ebp
	jle	.L7
.L3:
	mov	rax, QWORD PTR 24[rbx]
	lea	rdx, [rax+rbp*8]
	cmp	QWORD PTR [rdx], 0
	jne	.L6
	mov	rsi, QWORD PTR AN_RX_BUFFER_SIZE[rip]
	xor	ecx, ecx
	mov	rdi, rbx
	add	rbp, 1
	call	an_dma_malloc@PLT
	cmp	DWORD PTR AN_MAX_RX_DESC[rip], ebp
	jg	.L3
.L7:
	mov	ecx, DWORD PTR AN_MAX_TX_DESC[rip]
	xor	ebp, ebp
	test	ecx, ecx
	jg	.L4
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	add	rbp, 1
	cmp	DWORD PTR AN_MAX_TX_DESC[rip], ebp
	jle	.L5
.L4:
	mov	rax, QWORD PTR 16[rbx]
	lea	rdx, [rax+rbp*8]
	cmp	QWORD PTR [rdx], 0
	jne	.L10
	mov	rsi, QWORD PTR AN_TX_BUFFER_SIZE[rip]
	xor	ecx, ecx
	mov	rdi, rbx
	add	rbp, 1
	call	an_dma_malloc@PLT
	cmp	DWORD PTR AN_MAX_TX_DESC[rip], ebp
	jg	.L4
.L5:
	lea	r14, 64[rsp]
	mov	esi, 56
	mov	rdi, r14
	mov	QWORD PTR 24[rsp], r14
	call	bzero@PLT
	lea	rsi, 32[rsp]
	mov	rdx, r14
	mov	rdi, rbx
	mov	rax, QWORD PTR AN_CMD_ALLOC_DESC[rip]
	mov	QWORD PTR 16[rsp], rsi
	mov	QWORD PTR 56[rsp], rax
	mov	eax, DWORD PTR AN_DESCRIPTOR_RX[rip]
	mov	DWORD PTR 48[rsp], eax
	mov	rax, QWORD PTR AN_RX_DESC_OFFSET[rip]
	mov	QWORD PTR 40[rsp], rax
	mov	eax, DWORD PTR AN_MAX_RX_DESC[rip]
	mov	DWORD PTR 32[rsp], eax
	call	an_cmd_struct@PLT
	test	rax, rax
	jne	.L43
	mov	edx, DWORD PTR AN_MAX_RX_DESC[rip]
	test	edx, edx
	jle	.L18
	lea	rax, 192[rsp]
	xor	r13d, r13d
	lea	r12, 248[rsp]
	mov	r14, rax
	mov	QWORD PTR [rsp], rax
	lea	rax, 196[rsp]
	mov	QWORD PTR 8[rsp], rax
	neg	r14
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, QWORD PTR [rsp]
	mov	esi, 56
	lea	rbp, -4[r14]
	call	bzero@PLT
	mov	r15, QWORD PTR 8[rsp]
	mov	edx, 1
	mov	rax, QWORD PTR AN_RX_BUFFER_SIZE[rip]
	mov	DWORD PTR 192[rsp], 1
	mov	QWORD PTR 216[rsp], rax
	mov	rax, QWORD PTR 24[rbx]
	mov	QWORD PTR 240[rsp], 0
	mov	rax, QWORD PTR [rax+r13*8]
	mov	QWORD PTR 200[rsp], rax
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L44:
	mov	edx, DWORD PTR [r15]
	add	r15, 4
.L16:
	lea	rsi, 0[rbp+r15]
	mov	rdi, rbx
	add	rsi, QWORD PTR AN_RX_DESC_OFFSET[rip]
	call	CSR_MEM_AUX_WRITE_4@PLT
	cmp	r12, r15
	jne	.L44
	add	r13, 1
	add	r14, 56
	cmp	DWORD PTR AN_MAX_RX_DESC[rip], r13d
	jg	.L17
.L18:
	mov	r14, QWORD PTR 24[rsp]
	mov	esi, 56
	mov	rdi, r14
	call	bzero@PLT
	mov	rsi, QWORD PTR 16[rsp]
	mov	rdx, r14
	mov	rdi, rbx
	mov	rax, QWORD PTR AN_CMD_ALLOC_DESC[rip]
	mov	QWORD PTR 56[rsp], rax
	mov	eax, DWORD PTR AN_DESCRIPTOR_TX[rip]
	mov	DWORD PTR 48[rsp], eax
	mov	rax, QWORD PTR AN_TX_DESC_OFFSET[rip]
	mov	QWORD PTR 40[rsp], rax
	mov	eax, DWORD PTR AN_MAX_TX_DESC[rip]
	mov	DWORD PTR 32[rsp], eax
	call	an_cmd_struct@PLT
	test	rax, rax
	jne	.L45
	mov	eax, DWORD PTR AN_MAX_TX_DESC[rip]
	test	eax, eax
	jle	.L25
	lea	rax, 256[rsp]
	xor	r13d, r13d
	lea	r12, 312[rsp]
	mov	r14, rax
	mov	QWORD PTR [rsp], rax
	lea	rax, 260[rsp]
	mov	QWORD PTR 8[rsp], rax
	neg	r14
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rdi, QWORD PTR [rsp]
	mov	esi, 56
	lea	rbp, -4[r14]
	call	bzero@PLT
	mov	rax, QWORD PTR 16[rbx]
	mov	r15, QWORD PTR 8[rsp]
	xor	edx, edx
	mov	QWORD PTR 296[rsp], 0
	mov	QWORD PTR 288[rsp], 0
	mov	rax, QWORD PTR [rax+r13*8]
	mov	DWORD PTR 256[rsp], 0
	mov	QWORD PTR 280[rsp], 0
	mov	QWORD PTR 264[rsp], rax
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L46:
	mov	edx, DWORD PTR [r15]
	add	r15, 4
.L23:
	lea	rsi, 0[rbp+r15]
	mov	rdi, rbx
	add	rsi, QWORD PTR AN_TX_DESC_OFFSET[rip]
	call	CSR_MEM_AUX_WRITE_4@PLT
	cmp	r15, r12
	jne	.L46
	add	r13, 1
	add	r14, 56
	cmp	DWORD PTR AN_MAX_TX_DESC[rip], r13d
	jg	.L24
.L25:
	mov	r14, QWORD PTR 24[rsp]
	mov	esi, 56
	mov	rdi, r14
	call	bzero@PLT
	mov	rsi, QWORD PTR 16[rsp]
	mov	rdx, r14
	mov	rdi, rbx
	mov	rax, QWORD PTR AN_CMD_ALLOC_DESC[rip]
	mov	DWORD PTR 32[rsp], 1
	mov	QWORD PTR 56[rsp], rax
	mov	eax, DWORD PTR AN_DESCRIPTOR_HOSTRW[rip]
	mov	DWORD PTR 48[rsp], eax
	mov	rax, QWORD PTR AN_HOST_DESC_OFFSET[rip]
	mov	QWORD PTR 40[rsp], rax
	call	an_cmd_struct@PLT
	test	rax, rax
	jne	.L47
	lea	r12, 128[rsp]
	mov	esi, 56
	xor	ebp, ebp
	mov	rdi, r12
	call	bzero@PLT
	mov	rax, QWORD PTR AN_RID_BUFFER_SIZE[rip]
	mov	edx, 1
	mov	DWORD PTR 128[rsp], 1
	mov	QWORD PTR 144[rsp], 0
	mov	QWORD PTR 152[rsp], rax
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR 136[rsp], rax
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L48:
	mov	edx, DWORD PTR [r12+rbp]
.L26:
	mov	rsi, QWORD PTR AN_HOST_DESC_OFFSET[rip]
	mov	rdi, rbx
	add	rsi, rbp
	add	rbp, 4
	call	CSR_MEM_AUX_WRITE_4@PLT
	cmp	rbp, 56
	jne	.L48
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 312[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L49
	add	rsp, 328
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
.L47:
	.cfi_restore_state
	mov	edi, DWORD PTR 8[rbx]
	lea	rsi, .LC2[rip]
	call	if_printf@PLT
	mov	eax, DWORD PTR EIO[rip]
	jmp	.L1
.L42:
	mov	rsi, QWORD PTR AN_RID_BUFFER_SIZE[rip]
	xor	ecx, ecx
	mov	rdx, rbx
	mov	rdi, rbx
	call	an_dma_malloc@PLT
	jmp	.L2
.L43:
	mov	edi, DWORD PTR 8[rbx]
	lea	rsi, .LC0[rip]
	call	if_printf@PLT
	mov	eax, DWORD PTR EIO[rip]
	jmp	.L1
.L45:
	mov	edi, DWORD PTR 8[rbx]
	lea	rsi, .LC1[rip]
	call	if_printf@PLT
	mov	eax, DWORD PTR EIO[rip]
	jmp	.L1
.L49:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	an_init_mpi350_desc, .-an_init_mpi350_desc
	.comm	EIO,4,4
	.comm	AN_TX_DESC_OFFSET,8,8
	.comm	AN_TX_BUFFER_SIZE,8,8
	.comm	AN_RX_DESC_OFFSET,8,8
	.comm	AN_RX_BUFFER_SIZE,8,8
	.comm	AN_RID_BUFFER_SIZE,8,8
	.comm	AN_MAX_TX_DESC,4,4
	.comm	AN_MAX_RX_DESC,4,4
	.comm	AN_HOST_DESC_OFFSET,8,8
	.comm	AN_DESCRIPTOR_TX,4,4
	.comm	AN_DESCRIPTOR_RX,4,4
	.comm	AN_DESCRIPTOR_HOSTRW,4,4
	.comm	AN_CMD_ALLOC_DESC,8,8
	.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_if_an.c_an_init_mpi350_desc.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to allocate RX descriptor\012\000"
	.align	2
.LC1:
	.ascii	"failed to allocate TX descriptor\012\000"
	.align	2
.LC2:
	.ascii	"failed to allocate host descriptor\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	an_init_mpi350_desc
	.syntax unified
	.arm
	.fpu softvfp
	.type	an_init_mpi350_desc, %function
an_init_mpi350_desc:
	@ args = 0, pretend = 0, frame = 136
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r3, .L51
	sub	sp, sp, #140
	ldr	r3, [r3]
	str	r3, [sp, #132]
	mov	r3,#0
	bl	AN_LOCK_ASSERT
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L43
.L2:
	ldr	r9, .L51+4
	ldr	r3, [r9]
	cmp	r3, #0
	movgt	r5, #0
	ldrgt	r6, .L51+8
	bgt	.L3
	b	.L7
.L6:
	ldr	r3, [r9]
	add	r5, r5, #1
	cmp	r3, r5
	ble	.L7
.L3:
	ldr	r2, [r4, #12]
	ldr	r3, [r2, r5, lsl #2]
	add	r2, r2, r5, lsl #2
	cmp	r3, #0
	bne	.L6
	mov	r0, r4
	ldr	r1, [r6]
	bl	an_dma_malloc
	ldr	r3, [r9]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L3
.L7:
	ldr	r10, .L51+12
	ldr	r3, [r10]
	cmp	r3, #0
	movgt	r5, #0
	ldrgt	r6, .L51+16
	bgt	.L4
	b	.L5
.L10:
	ldr	r3, [r10]
	add	r5, r5, #1
	cmp	r3, r5
	ble	.L5
.L4:
	ldr	r2, [r4, #8]
	ldr	r3, [r2, r5, lsl #2]
	add	r2, r2, r5, lsl #2
	cmp	r3, #0
	bne	.L10
	mov	r0, r4
	ldr	r1, [r6]
	bl	an_dma_malloc
	ldr	r3, [r10]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L4
.L5:
	mov	r1, #28
	add	r0, sp, #20
	bl	bzero
	ldr	r6, .L51+20
	ldr	r3, .L51+24
	ldr	r2, .L51+28
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r0, [r6]
	ldr	r3, [r9]
	str	r2, [sp, #16]
	str	r1, [sp, #12]
	str	r0, [sp, #8]
	add	r2, sp, #20
	mov	r0, r4
	add	r1, sp, #4
	str	r3, [sp, #4]
	bl	an_cmd_struct
	subs	r8, r0, #0
	bne	.L44
	ldr	r3, [r9]
	cmp	r3, #0
	addgt	r3, sp, #136
	rsbgt	r5, r3, #60
	addgt	r7, sp, #100
	ble	.L18
.L17:
	mov	r1, #28
	add	r0, sp, #76
	bl	bzero
	mov	r2, #1
	mov	r0, #0
	ldr	r3, [r4, #12]
	add	fp, sp, #76
	ldr	r1, [r3, r8, lsl #2]
	ldr	r3, .L51+8
	str	r2, [sp, #76]
	ldr	r3, [r3]
	str	r0, [sp, #100]
	str	r1, [sp, #80]
	str	r3, [sp, #88]
	b	.L16
.L45:
	ldr	r2, [fp, #4]!
.L16:
	ldr	r3, [r6]
	add	r1, r5, fp
	mov	r0, r4
	add	r1, r3, r1
	bl	CSR_MEM_AUX_WRITE_4
	cmp	r7, fp
	bne	.L45
	ldr	r3, [r9]
	add	r8, r8, #1
	cmp	r3, r8
	add	r5, r5, #28
	bgt	.L17
.L18:
	mov	r1, #28
	add	r0, sp, #20
	bl	bzero
	ldr	r3, .L51+32
	ldr	r6, .L51+36
	ldr	r2, [r3]
	ldr	r3, .L51+28
	ldr	r1, [r6]
	ldr	r0, [r3]
	ldr	r3, [r10]
	str	r2, [sp, #12]
	str	r1, [sp, #8]
	str	r0, [sp, #16]
	add	r2, sp, #20
	mov	r0, r4
	add	r1, sp, #4
	str	r3, [sp, #4]
	bl	an_cmd_struct
	subs	r8, r0, #0
	bne	.L46
	ldr	r3, [r10]
	cmp	r3, #0
	addgt	r3, sp, #136
	movgt	r9, r8
	rsbgt	r5, r3, #32
	addgt	r7, sp, #128
	ble	.L25
.L24:
	mov	r1, #28
	add	r0, sp, #104
	bl	bzero
	ldr	r3, [r4, #8]
	mov	r2, #0
	ldr	r3, [r3, r8, lsl #2]
	add	fp, sp, #104
	str	r9, [sp, #124]
	str	r9, [sp, #120]
	str	r9, [sp, #104]
	str	r9, [sp, #116]
	str	r3, [sp, #108]
	b	.L23
.L47:
	ldr	r2, [fp, #4]!
.L23:
	ldr	r3, [r6]
	add	r1, r5, fp
	mov	r0, r4
	add	r1, r3, r1
	bl	CSR_MEM_AUX_WRITE_4
	cmp	r7, fp
	bne	.L47
	ldr	r3, [r10]
	add	r8, r8, #1
	cmp	r3, r8
	add	r5, r5, #28
	bgt	.L24
.L25:
	mov	r9, #1
	mov	r1, #28
	add	r0, sp, #20
	bl	bzero
	ldr	r3, .L51+28
	ldr	r2, .L51+40
	ldr	r3, [r3]
	ldr	r8, .L51+44
	ldr	r0, [r2]
	str	r3, [sp, #16]
	ldr	r3, [r8]
	str	r0, [sp, #12]
	add	r2, sp, #20
	mov	r0, r4
	add	r1, sp, #4
	str	r3, [sp, #8]
	str	r9, [sp, #4]
	bl	an_cmd_struct
	subs	r7, r0, #0
	bne	.L48
	mov	r1, #28
	add	r0, sp, #48
	mov	r6, r0
	bl	bzero
	ldr	r3, .L51+48
	mov	r5, r7
	ldr	r1, [r3]
	ldr	r3, [r4]
	mov	r2, r9
	str	r9, [sp, #48]
	str	r7, [sp, #56]
	str	r1, [sp, #60]
	str	r3, [sp, #52]
	b	.L26
.L49:
	ldr	r2, [r6, #4]!
.L26:
	ldr	r1, [r8]
	mov	r0, r4
	add	r1, r1, r5
	add	r5, r5, #4
	bl	CSR_MEM_AUX_WRITE_4
	cmp	r5, #28
	bne	.L49
.L1:
	ldr	r3, .L51
	ldr	r2, [r3]
	ldr	r3, [sp, #132]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L50
	mov	r0, r7
	add	sp, sp, #140
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L48:
	ldr	r0, [r4, #4]
	ldr	r1, .L51+52
	bl	if_printf
	ldr	r3, .L51+56
	ldr	r7, [r3]
	b	.L1
.L43:
	ldr	r2, .L51+48
	mov	r0, r4
	ldr	r1, [r2]
	mov	r2, r4
	bl	an_dma_malloc
	b	.L2
.L44:
	ldr	r0, [r4, #4]
	ldr	r1, .L51+60
	bl	if_printf
	ldr	r3, .L51+56
	ldr	r7, [r3]
	b	.L1
.L46:
	ldr	r0, [r4, #4]
	ldr	r1, .L51+64
	bl	if_printf
	ldr	r3, .L51+56
	ldr	r7, [r3]
	b	.L1
.L50:
	bl	__stack_chk_fail
.L52:
	.align	2
.L51:
	.word	.LC3
	.word	AN_MAX_RX_DESC
	.word	AN_RX_BUFFER_SIZE
	.word	AN_MAX_TX_DESC
	.word	AN_TX_BUFFER_SIZE
	.word	AN_RX_DESC_OFFSET
	.word	AN_DESCRIPTOR_RX
	.word	AN_CMD_ALLOC_DESC
	.word	AN_DESCRIPTOR_TX
	.word	AN_TX_DESC_OFFSET
	.word	AN_DESCRIPTOR_HOSTRW
	.word	AN_HOST_DESC_OFFSET
	.word	AN_RID_BUFFER_SIZE
	.word	.LC2
	.word	EIO
	.word	.LC0
	.word	.LC1
	.size	an_init_mpi350_desc, .-an_init_mpi350_desc
	.comm	EIO,4,4
	.comm	AN_TX_DESC_OFFSET,4,4
	.comm	AN_TX_BUFFER_SIZE,4,4
	.comm	AN_RX_DESC_OFFSET,4,4
	.comm	AN_RX_BUFFER_SIZE,4,4
	.comm	AN_RID_BUFFER_SIZE,4,4
	.comm	AN_MAX_TX_DESC,4,4
	.comm	AN_MAX_RX_DESC,4,4
	.comm	AN_HOST_DESC_OFFSET,4,4
	.comm	AN_DESCRIPTOR_TX,4,4
	.comm	AN_DESCRIPTOR_RX,4,4
	.comm	AN_DESCRIPTOR_HOSTRW,4,4
	.comm	AN_CMD_ALLOC_DESC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
