	.file	"extr_megaraid_mm.c_mraid_mm_attach_buf.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mraid_mm_attach_buf, @function
mraid_mm_attach_buf:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	eax, 4294967295
	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
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	QWORD PTR [rsi], rax
	mov	eax, DWORD PTR MAX_DMA_POOLS[rip]
	mov	DWORD PTR 8[rsp], edx
	mov	QWORD PTR 8[rsi], 0
	mov	DWORD PTR 16[rsi], 0
	test	eax, eax
	jle	.L2
	mov	r13, rdi
	mov	r12, rsi
	xor	ebp, ebp
	mov	r14d, -1
.L7:
	mov	rbx, rbp
	mov	eax, DWORD PTR 8[rsp]
	sal	rbx, 5
	add	rbx, QWORD PTR 0[r13]
	cmp	DWORD PTR [rbx], eax
	jl	.L3
	cmp	r14d, -1
	lea	rdi, 8[rbx]
	cmove	r14d, ebp
	xor	r15d, r15d
	mov	QWORD PTR [rsp], rdi
	mov	rsi, r15
	call	spin_lock_irqsave@PLT
	mov	r8d, DWORD PTR 4[rbx]
	mov	rdi, QWORD PTR [rsp]
	test	r8d, r8d
	mov	DWORD PTR 12[rsp], r8d
	jne	.L5
	mov	rax, QWORD PTR 24[rbx]
	mov	DWORD PTR 4[rbx], 1
	mov	rsi, r15
	mov	DWORD PTR [r12], ebp
	mov	QWORD PTR 8[r12], rax
	mov	eax, DWORD PTR 16[rbx]
	mov	DWORD PTR 16[r12], eax
	call	spin_unlock_irqrestore@PLT
	mov	r8d, DWORD PTR 12[rsp]
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	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
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	xor	r15d, r15d
	mov	rsi, r15
	call	spin_unlock_irqrestore@PLT
.L3:
	add	rbp, 1
	cmp	DWORD PTR MAX_DMA_POOLS[rip], ebp
	jg	.L7
	cmp	r14d, -1
	je	.L2
	movsx	rbx, r14d
	xor	r15d, r15d
	sal	rbx, 5
	add	rbx, QWORD PTR 0[r13]
	mov	rsi, r15
	lea	rbp, 8[rbx]
	mov	rdi, rbp
	call	spin_lock_irqsave@PLT
	mov	DWORD PTR [r12], r14d
	mov	edi, DWORD PTR 12[rbx]
	lea	rdx, 16[r12]
	mov	DWORD PTR 4[r12], 1
	mov	esi, DWORD PTR GFP_ATOMIC[rip]
	call	dma_pool_alloc@PLT
	mov	rsi, r15
	mov	rdi, rbp
	mov	QWORD PTR 8[r12], rax
	call	spin_unlock_irqrestore@PLT
	xor	r8d, r8d
	cmp	QWORD PTR 8[r12], 0
	jne	.L1
	mov	r8d, DWORD PTR ENOMEM[rip]
	neg	r8d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	r8d, DWORD PTR EINVAL[rip]
	neg	r8d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	mraid_mm_attach_buf, .-mraid_mm_attach_buf
	.comm	MAX_DMA_POOLS,4,4
	.comm	GFP_ATOMIC,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,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_megaraid_mm.c_mraid_mm_attach_buf.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mraid_mm_attach_buf, %function
mraid_mm_attach_buf:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, #0
	mvn	r7, #0
	ldr	fp, .L17
	sub	sp, sp, #12
	ldr	r3, [fp]
	str	r4, [r1, #8]
	cmp	r3, r4
	str	r7, [r1]
	str	r4, [r1, #12]
	str	r4, [r1, #4]
	ble	.L2
	mov	r6, r1
	mov	r10, r0
	mov	r9, r2
.L7:
	ldr	r5, [r10]
	add	r3, r4, r4, lsl #1
	ldr	r2, [r5, r3, lsl #3]
	add	r5, r5, r3, lsl #3
	cmp	r2, r9
	add	r8, r5, #8
	blt	.L3
	mov	r1, #0
	mov	r0, r8
	bl	spin_lock_irqsave
	ldr	r3, [r5, #4]
	cmn	r7, #1
	moveq	r7, r4
	cmp	r3, #0
	str	r3, [sp, #4]
	bne	.L5
	mov	r2, #1
	ldr	r1, [r5, #20]
	str	r2, [r5, #4]
	ldr	r2, [r5, #16]
	mov	r0, r8
	str	r1, [r6, #8]
	str	r4, [r6]
	mov	r1, #0
	str	r2, [r6, #12]
	bl	spin_unlock_irqrestore
	ldr	r3, [sp, #4]
.L1:
	mov	r0, r3
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	mov	r0, r8
	mov	r1, #0
	bl	spin_unlock_irqrestore
.L3:
	ldr	r3, [fp]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L7
	cmn	r7, #1
	beq	.L2
	mov	r8, #0
	ldr	r4, [r10]
	add	r3, r7, r7, lsl #1
	add	r4, r4, r3, lsl #3
	add	r5, r4, #8
	mov	r1, r8
	mov	r0, r5
	bl	spin_lock_irqsave
	mov	r2, #1
	ldr	r3, .L17+4
	ldr	r0, [r4, #12]
	ldr	r1, [r3]
	str	r2, [r6, #4]
	str	r7, [r6]
	add	r2, r6, #12
	bl	dma_pool_alloc
	mov	r3, r0
	mov	r1, r8
	str	r3, [r6, #8]
	mov	r0, r5
	bl	spin_unlock_irqrestore
	ldr	r3, [r6, #8]
	cmp	r3, r8
	ldreq	r3, .L17+8
	movne	r3, #0
	ldreq	r3, [r3]
	rsbeq	r3, r3, #0
	b	.L1
.L2:
	ldr	r3, .L17+12
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L1
.L18:
	.align	2
.L17:
	.word	MAX_DMA_POOLS
	.word	GFP_ATOMIC
	.word	ENOMEM
	.word	EINVAL
	.size	mraid_mm_attach_buf, .-mraid_mm_attach_buf
	.comm	MAX_DMA_POOLS,4,4
	.comm	GFP_ATOMIC,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
