	.file	"extr_fore200e.c_fore200e_chunk_alloc.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	fore200e_chunk_alloc, @function
fore200e_chunk_alloc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, r8d
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rsi
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	cmp	ecx, 4
	jbe	.L2
	lea	edi, [rcx+rdx]
	mov	DWORD PTR 4[rbx], r8d
	mov	r13d, ecx
	mov	DWORD PTR [rbx], edi
	call	kzalloc@PLT
	mov	QWORD PTR 8[rbx], rax
	mov	r9, rax
	test	rax, rax
	je	.L13
	test	r13d, r13d
	jle	.L5
	mov	esi, r13d
	mov	rdi, rax
	call	FORE200E_ALIGN@PLT
	mov	rdx, QWORD PTR 8[rbx]
	lea	r9, [rdx+rax*4]
.L5:
	mov	QWORD PTR 24[rbx], r9
	mov	edi, DWORD PTR 0[rbp]
	mov	rsi, r9
	mov	ecx, r14d
	mov	edx, r12d
	call	dma_map_single@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	DWORD PTR 16[rbx], eax
	mov	esi, eax
	call	dma_mapping_error@PLT
	mov	r8, rax
	xor	eax, eax
	test	r8, r8
	jne	.L15
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rbx]
	call	kfree@PLT
.L13:
	mov	eax, DWORD PTR ENOMEM[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	DWORD PTR [rbx], edx
	mov	edi, edx
	mov	DWORD PTR 4[rbx], r8d
	call	kzalloc@PLT
	mov	QWORD PTR 8[rbx], rax
	mov	r9, rax
	test	rax, rax
	jne	.L5
	jmp	.L13
	.cfi_endproc
.LFE0:
	.size	fore200e_chunk_alloc, .-fore200e_chunk_alloc
	.comm	GFP_KERNEL,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_fore200e.c_fore200e_chunk_alloc.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fore200e_chunk_alloc, %function
fore200e_chunk_alloc:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r8, r3
	ldr	r3, .L16
	cmp	r8, #4
	mov	r4, r1
	mov	r6, r0
	mov	r5, r2
	ldr	r1, [r3]
	ldr	r7, [sp, #24]
	bls	.L2
	add	r0, r8, r2
	stm	r4, {r0, r7}
	bl	kzalloc
	cmp	r0, #0
	mov	r1, r0
	str	r0, [r4, #8]
	beq	.L14
	cmp	r8, #0
	ble	.L5
	mov	r1, r8
	bl	FORE200E_ALIGN
	ldr	r1, [r4, #8]
	add	r1, r1, r0, lsl #2
.L5:
	mov	r3, r7
	mov	r2, r5
	str	r1, [r4, #16]
	ldr	r0, [r6]
	bl	dma_map_single
	mov	r1, r0
	ldr	r0, [r6]
	str	r1, [r4, #12]
	bl	dma_mapping_error
	cmp	r0, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r0, [r4, #8]
	bl	kfree
.L14:
	ldr	r3, .L16+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r0, r2
	stm	r4, {r5, r7}
	bl	kzalloc
	cmp	r0, #0
	mov	r1, r0
	str	r0, [r4, #8]
	bne	.L5
	b	.L14
.L17:
	.align	2
.L16:
	.word	GFP_KERNEL
	.word	ENOMEM
	.size	fore200e_chunk_alloc, .-fore200e_chunk_alloc
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
