	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv_cesa_get_sram
_mv_cesa_get_sram:                      ## @mv_cesa_get_sram
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_platform_get_drvdata
	movq	%rax, %r15
	movq	8(%rax), %rax
	movq	24(%r15), %r12
	movslq	%ebx, %rdx
	leaq	(%rdx,%rdx,2), %r14
	leaq	(%r12,%r14,8), %r13
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_of_gen_pool_get
	movq	%rax, 16(%r12,%r14,8)
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	(%r15), %rsi
	movq	%rax, %rdi
	movq	%r13, %rdx
	callq	_gen_pool_dma_alloc
	movq	%rax, 8(%r12,%r14,8)
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.2:
	leaq	(%r12,%r14,8), %rax
	addq	$16, %rax
	movq	$0, (%rax)
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_3:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %rcx
	cmoveq	%rax, %rcx
	movq	16(%r15), %rax
	cmpl	$2, (%rax)
	leaq	L_.str(%rip), %rdx
	cmovgeq	%rcx, %rdx
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_platform_get_resource_byname
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_resource_size
	cmpq	(%r15), %rax
	jge	LBB0_6
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	8(%r15), %rdi
	movq	%rbx, %rsi
	callq	_devm_ioremap_resource
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%rax, 8(%r12,%r14,8)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.11:
	leaq	(%r12,%r14,8), %rax
	addq	$8, %rax
	movq	(%rax), %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_7:
	movq	(%r15), %rdx
	movq	8(%r15), %rdi
	movl	(%rbx), %esi
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%ebx, %ebx
	xorl	%r8d, %r8d
	callq	_dma_map_resource
	movl	%eax, (%r13)
	movq	8(%r15), %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_8
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sram"

L_.str.1:                               ## @.str.1
	.asciz	"marvell,crypto-srams"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"sram0"

L_.str.3:                               ## @.str.3
	.asciz	"sram1"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.no_dead_strip	_mv_cesa_get_sram
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv_cesa_get_sram
_mv_cesa_get_sram:                      ; @mv_cesa_get_sram
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x1
	mov	x21, x0
	bl	_platform_get_drvdata
	mov	x19, x0
	ldr	x23, [x0, #24]
	sxtw	x24, w22
	mov	w8, #24
	smaddl	x20, w22, w8, x23
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	bl	_of_gen_pool_get
	mov	x25, x20
	str	x0, [x25, #16]!
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x1, [x19]
	mov	x2, x20
	bl	_gen_pool_dma_alloc
	mov	w8, #24
	madd	x8, x24, x8, x23
	str	x0, [x8, #8]
	cbz	x0, LBB0_6
; %bb.2:
	mov	w0, #0
	b	LBB0_9
LBB0_3:
	ldr	x8, [x19, #16]
Lloh2:
	adrp	x9, l_.str.3@PAGE
Lloh3:
	add	x9, x9, l_.str.3@PAGEOFF
	ldr	w8, [x8]
Lloh4:
	adrp	x10, l_.str.2@PAGE
Lloh5:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w22, #0
Lloh6:
	adrp	x11, l_.str@PAGE
Lloh7:
	add	x11, x11, l_.str@PAGEOFF
	csel	x9, x10, x9, eq
	cmp	w8, #1
	csel	x2, x9, x11, gt
Lloh8:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_platform_get_resource_byname
	cbz	x0, LBB0_5
; %bb.4:
	mov	x21, x0
	bl	_resource_size
	ldr	x8, [x19]
	cmp	x0, x8
	b.ge	LBB0_10
LBB0_5:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	str	xzr, [x25]
LBB0_7:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_10:
	ldr	x0, [x19, #8]
	mov	x1, x21
	bl	_devm_ioremap_resource
	mov	w8, #24
	madd	x22, x24, x8, x23
	str	x0, [x22, #8]!
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.11:
	ldr	x0, [x22]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_12:
	ldr	w1, [x21]
	ldp	x2, x0, [x19]
Lloh15:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	mov	w4, #0
	bl	_dma_map_resource
	mov	x1, x0
	str	w0, [x20]
	ldr	x0, [x19, #8]
	bl	_dma_mapping_error
	cbnz	x0, LBB0_7
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sram"

l_.str.1:                               ; @.str.1
	.asciz	"marvell,crypto-srams"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"sram0"

l_.str.3:                               ; @.str.3
	.asciz	"sram1"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.no_dead_strip	_mv_cesa_get_sram
.subsections_via_symbols
