	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ti_emif_alloc_sram
_ti_emif_alloc_sram:                    ## @ti_emif_alloc_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %r12
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_of_gen_pool_get
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_ti_emif_sram_sz@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rax, %rdi
	callq	_gen_pool_alloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	8(%r15), %rdi
	movq	%rax, %rsi
	callq	_gen_pool_virt_to_phys
	movq	%rax, 104(%r15)
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_of_gen_pool_get
	movq	%rax, 96(%r15)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %rdi
	movl	$4, %esi
	callq	_gen_pool_alloc
	movq	%rax, 40(%r15)
	testq	%rax, %rax
	je	LBB0_7
## %bb.10:
	movq	96(%r15), %rdi
	movq	%rax, %rsi
	callq	_gen_pool_virt_to_phys
	movq	%rax, 16(%r15)
	movq	_ti_emif_save_context@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_sram_suspend_address
	movq	%rax, 88(%r15)
	movq	_ti_emif_enter_sr@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_sram_suspend_address
	movq	%rax, 80(%r15)
	movq	_ti_emif_abort_sr@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_sram_suspend_address
	movq	%rax, 72(%r15)
	movq	_ti_emif_restore_context@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_sram_resume_address
	movq	%rax, 64(%r15)
	movq	_ti_emif_exit_sr@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_sram_resume_address
	movq	%rax, 56(%r15)
	movq	_ti_emif_run_hw_leveling@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_sram_resume_address
	movq	%rax, 48(%r15)
	movq	16(%r15), %rax
	movq	40(%r15), %rcx
	movq	%rcx, 32(%r15)
	movq	%rax, 24(%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_3:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_5:
	movq	_ENODEV@GOTPCREL(%rip), %r12
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_8
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %r12
	leaq	L_.str.4(%rip), %rsi
LBB0_8:
	movq	%r14, %rdi
	callq	_dev_err
	xorl	%ebx, %ebx
	subl	(%r12), %ebx
	movq	(%r15), %rsi
	movq	8(%r15), %rdi
	movl	(%r13), %edx
	callq	_gen_pool_free
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sram"

L_.str.1:                               ## @.str.1
	.asciz	"Unable to get sram pool for ocmcram code\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ti_emif_sram_sz,4,2            ## @ti_emif_sram_sz
L_.str.2:                               ## @.str.2
	.asciz	"Unable to allocate code memory from ocmcram\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.3:                               ## @.str.3
	.asciz	"Unable to get sram pool for ocmcram data\n"

L_.str.4:                               ## @.str.4
	.asciz	"Unable to allocate data memory from ocmcram\n"

	.comm	_ti_emif_save_context,8,3       ## @ti_emif_save_context
	.comm	_ti_emif_enter_sr,8,3           ## @ti_emif_enter_sr
	.comm	_ti_emif_abort_sr,8,3           ## @ti_emif_abort_sr
	.comm	_ti_emif_restore_context,8,3    ## @ti_emif_restore_context
	.comm	_ti_emif_exit_sr,8,3            ## @ti_emif_exit_sr
	.comm	_ti_emif_run_hw_leveling,8,3    ## @ti_emif_run_hw_leveling
	.no_dead_strip	_ti_emif_alloc_sram
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ti_emif_alloc_sram
_ti_emif_alloc_sram:                    ; @ti_emif_alloc_sram
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	w2, #0
	bl	_of_gen_pool_get
	str	x0, [x19, #8]
	cbz	x0, LBB0_5
; %bb.1:
Lloh2:
	adrp	x22, _ti_emif_sram_sz@GOTPAGE
Lloh3:
	ldr	x22, [x22, _ti_emif_sram_sz@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_gen_pool_alloc
	str	x0, [x19]
	cbz	x0, LBB0_6
; %bb.2:
	mov	x1, x0
	ldr	x0, [x19, #8]
	bl	_gen_pool_virt_to_phys
	str	x0, [x19, #104]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	w2, #1
	bl	_of_gen_pool_get
	str	x0, [x19, #96]
	cbz	x0, LBB0_8
; %bb.3:
	mov	w1, #4
	bl	_gen_pool_alloc
	str	x0, [x19, #40]
	cbz	x0, LBB0_9
; %bb.4:
	mov	x1, x0
	ldr	x0, [x19, #96]
	bl	_gen_pool_virt_to_phys
	str	x0, [x19, #16]
Lloh6:
	adrp	x8, _ti_emif_save_context@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ti_emif_save_context@GOTPAGEOFF]
Lloh8:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_sram_suspend_address
	str	x0, [x19, #88]
Lloh9:
	adrp	x8, _ti_emif_enter_sr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ti_emif_enter_sr@GOTPAGEOFF]
Lloh11:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_sram_suspend_address
	str	x0, [x19, #80]
Lloh12:
	adrp	x8, _ti_emif_abort_sr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ti_emif_abort_sr@GOTPAGEOFF]
Lloh14:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_sram_suspend_address
	str	x0, [x19, #72]
Lloh15:
	adrp	x8, _ti_emif_restore_context@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ti_emif_restore_context@GOTPAGEOFF]
Lloh17:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_sram_resume_address
	str	x0, [x19, #64]
Lloh18:
	adrp	x8, _ti_emif_exit_sr@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ti_emif_exit_sr@GOTPAGEOFF]
Lloh20:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_sram_resume_address
	str	x0, [x19, #56]
Lloh21:
	adrp	x8, _ti_emif_run_hw_leveling@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ti_emif_run_hw_leveling@GOTPAGEOFF]
Lloh23:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_sram_resume_address
	mov	w20, #0
	str	x0, [x19, #48]
	ldr	x8, [x19, #40]
	ldr	x9, [x19, #16]
	stp	x9, x8, [x19, #24]
	b	LBB0_11
LBB0_5:
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh26:
	adrp	x8, _ENODEV@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh30:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_8:
Lloh32:
	adrp	x21, _ENODEV@GOTPAGE
Lloh33:
	ldr	x21, [x21, _ENODEV@GOTPAGEOFF]
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh36:
	adrp	x21, _ENOMEM@GOTPAGE
Lloh37:
	ldr	x21, [x21, _ENOMEM@GOTPAGEOFF]
Lloh38:
	adrp	x1, l_.str.4@PAGE
Lloh39:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_10:
	mov	x0, x20
	bl	_dev_err
	ldr	w8, [x21]
	neg	w20, w8
	ldp	x1, x0, [x19]
	ldr	w2, [x22]
	bl	_gen_pool_free
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sram"

l_.str.1:                               ; @.str.1
	.asciz	"Unable to get sram pool for ocmcram code\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ti_emif_sram_sz,4,2            ; @ti_emif_sram_sz
l_.str.2:                               ; @.str.2
	.asciz	"Unable to allocate code memory from ocmcram\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.3:                               ; @.str.3
	.asciz	"Unable to get sram pool for ocmcram data\n"

l_.str.4:                               ; @.str.4
	.asciz	"Unable to allocate data memory from ocmcram\n"

	.comm	_ti_emif_save_context,8,3       ; @ti_emif_save_context
	.comm	_ti_emif_enter_sr,8,3           ; @ti_emif_enter_sr
	.comm	_ti_emif_abort_sr,8,3           ; @ti_emif_abort_sr
	.comm	_ti_emif_restore_context,8,3    ; @ti_emif_restore_context
	.comm	_ti_emif_exit_sr,8,3            ; @ti_emif_exit_sr
	.comm	_ti_emif_run_hw_leveling,8,3    ; @ti_emif_run_hw_leveling
	.no_dead_strip	_ti_emif_alloc_sram
.subsections_via_symbols
