	.file	"extr_cesa.c_mv_cesa_get_sram.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"sram"
.LC1:
	.string	"sram0"
.LC2:
	.string	"sram1"
.LC3:
	.string	"marvell,crypto-srams"
	.text
	.p2align 4
	.type	mv_cesa_get_sram, @function
mv_cesa_get_sram:
.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
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	platform_get_drvdata@PLT
	lea	rsi, .LC3[rip]
	mov	rbx, rax
	movsx	rax, ebp
	lea	rdx, [rax+rax*2]
	mov	rax, QWORD PTR 24[rbx]
	lea	r13, [rax+rdx*8]
	mov	rax, QWORD PTR 8[rbx]
	mov	edx, ebp
	mov	edi, DWORD PTR [rax]
	call	of_gen_pool_get@PLT
	mov	QWORD PTR 16[r13], rax
	test	rax, rax
	je	.L2
	mov	rsi, QWORD PTR [rbx]
	mov	rdi, rax
	mov	rdx, r13
	call	gen_pool_dma_alloc@PLT
	mov	QWORD PTR 8[r13], rax
	test	rax, rax
	je	.L3
.L9:
	xor	eax, eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	eax, DWORD PTR ENOMEM[rip]
	mov	QWORD PTR 16[r13], 0
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rax, QWORD PTR 16[rbx]
	lea	rdx, .LC0[rip]
	cmp	DWORD PTR [rax], 1
	jle	.L5
	test	ebp, ebp
	lea	rdx, .LC1[rip]
	lea	rax, .LC2[rip]
	cmovne	rdx, rax
.L5:
	mov	esi, DWORD PTR IORESOURCE_MEM[rip]
	mov	rdi, r12
	call	platform_get_resource_byname@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L7
	mov	rdi, rax
	call	resource_size@PLT
	cmp	rax, QWORD PTR [rbx]
	jge	.L17
.L7:
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rbx]
	mov	rsi, rbp
	call	devm_ioremap_resource@PLT
	mov	QWORD PTR 8[r13], rax
	mov	rdi, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L18
	mov	rdi, QWORD PTR 8[rbx]
	mov	esi, DWORD PTR 0[rbp]
	xor	r8d, r8d
	mov	ecx, DWORD PTR DMA_BIDIRECTIONAL[rip]
	mov	rdx, QWORD PTR [rbx]
	call	dma_map_resource@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	DWORD PTR 0[r13], eax
	mov	esi, eax
	call	dma_mapping_error@PLT
	test	rax, rax
	je	.L9
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, QWORD PTR 8[r13]
	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
	jmp	PTR_ERR@PLT
	.cfi_endproc
.LFE0:
	.size	mv_cesa_get_sram, .-mv_cesa_get_sram
	.comm	IORESOURCE_MEM,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	DMA_BIDIRECTIONAL,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_cesa.c_mv_cesa_get_sram.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"sram\000"
	.align	2
.LC1:
	.ascii	"sram0\000"
	.align	2
.LC2:
	.ascii	"sram1\000"
	.align	2
.LC3:
	.ascii	"marvell,crypto-srams\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mv_cesa_get_sram, %function
mv_cesa_get_sram:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	sub	sp, sp, #12
	mov	r5, r1
	mov	r7, r0
	bl	platform_get_drvdata
	ldr	r3, [r0, #4]
	ldr	r8, [r0, #12]
	mov	r4, r0
	mov	r2, r5
	ldr	r0, [r3]
	ldr	r1, .L19
	add	r3, r5, r5, lsl #1
	add	r6, r8, r3, lsl #2
	lsl	r9, r3, #2
	bl	of_gen_pool_get
	subs	r3, r0, #0
	str	r0, [r6, #8]
	beq	.L2
	mov	r2, r6
	ldr	r1, [r4]
	bl	gen_pool_dma_alloc
	cmp	r0, #0
	str	r0, [r6, #4]
	beq	.L3
.L9:
	mov	r0, #0
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L3:
	ldr	r3, .L19+4
	str	r0, [r6, #8]
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L2:
	ldr	r3, [r4, #8]
	ldr	r3, [r3]
	cmp	r3, #1
	ble	.L10
	ldr	r1, .L19+8
	cmp	r5, #0
	ldr	r2, .L19+12
	movne	r2, r1
.L5:
	ldr	r3, .L19+16
	mov	r0, r7
	ldr	r1, [r3]
	bl	platform_get_resource_byname
	subs	r5, r0, #0
	beq	.L7
	bl	resource_size
	ldr	r3, [r4]
	cmp	r0, r3
	bge	.L17
.L7:
	ldr	r3, .L19+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L17:
	mov	r1, r5
	ldr	r0, [r4, #4]
	bl	devm_ioremap_resource
	str	r0, [r6, #4]
	bl	IS_ERR
	subs	ip, r0, #0
	bne	.L18
	ldr	r3, .L19+24
	ldr	r1, [r5]
	ldr	r2, [r4]
	ldr	r3, [r3]
	ldr	r0, [r4, #4]
	str	ip, [sp]
	bl	dma_map_resource
	mov	r1, r0
	ldr	r0, [r4, #4]
	str	r1, [r8, r9]
	bl	dma_mapping_error
	cmp	r0, #0
	beq	.L9
	ldr	r3, .L19+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L10:
	ldr	r2, .L19+28
	b	.L5
.L18:
	ldr	r0, [r6, #4]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, lr}
	b	PTR_ERR
.L20:
	.align	2
.L19:
	.word	.LC3
	.word	ENOMEM
	.word	.LC2
	.word	.LC1
	.word	IORESOURCE_MEM
	.word	EINVAL
	.word	DMA_BIDIRECTIONAL
	.word	.LC0
	.size	mv_cesa_get_sram, .-mv_cesa_get_sram
	.comm	IORESOURCE_MEM,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	DMA_BIDIRECTIONAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
