	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function svc_get_sh_memory
_svc_get_sh_memory:                     ## @svc_get_sh_memory
	.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
	leaq	16(%rsi), %r12
	movq	%r12, %rdi
	callq	_init_completion
	movq	_svc_normal_to_secure_shm_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	callq	_cpu_to_node
	leaq	L_.str(%rip), %rcx
	movl	%ebx, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_kthread_create_on_node
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	movq	%rbx, %rdi
	callq	_wake_up_process
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %esi
	movq	%r12, %rdi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movq	8(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.4:
	movq	(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.5:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_dev_dbg
	xorl	%r13d, %r13d
	jmp	LBB0_10
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%r13d, %r13d
LBB0_9:
	subl	(%rax), %r13d
LBB0_10:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_svc_normal_to_secure_shm_thread,4,2 ## @svc_normal_to_secure_shm_thread
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"svc_smc_hvc_shm_thread"

L_.str.1:                               ## @.str.1
	.asciz	"fail to create stratix10_svc_smc_shm_thread\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HZ,4,2                         ## @HZ
L_.str.2:                               ## @.str.2
	.asciz	"timeout to get sh-memory paras from secure world\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.3:                               ## @.str.3
	.asciz	"failed to get shared memory info from secure world\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.4:                               ## @.str.4
	.asciz	"SM software provides paddr: 0x%016x, size: 0x%08x\n"

	.no_dead_strip	_svc_get_sh_memory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function svc_get_sh_memory
_svc_get_sh_memory:                     ; @svc_get_sh_memory
	.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	x20, x1
	mov	x19, x0
	add	x21, x1, #16
	mov	x0, x21
	bl	_init_completion
Lloh0:
	adrp	x8, _svc_normal_to_secure_shm_thread@GOTPAGE
Lloh1:
	ldr	x8, [x8, _svc_normal_to_secure_shm_thread@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	mov	w0, #0
	bl	_cpu_to_node
	mov	x2, x0
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x22
	mov	x1, x20
	bl	_kthread_create_on_node
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.1:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
LBB0_4:
	mov	x0, x22
	bl	_wake_up_process
Lloh9:
	adrp	x8, _HZ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	add	w8, w8, w8, lsl #2
	lsl	w1, w8, #1
	mov	x0, x21
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_8
; %bb.5:
	ldr	x2, [x20, #8]
	cbz	x2, LBB0_9
; %bb.6:
	ldr	x3, [x20]
	cbz	x3, LBB0_9
; %bb.7:
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_dev_dbg
	mov	w0, #0
	b	LBB0_3
LBB0_8:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh16:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_2
LBB0_9:
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_svc_normal_to_secure_shm_thread,4,2 ; @svc_normal_to_secure_shm_thread
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"svc_smc_hvc_shm_thread"

l_.str.1:                               ; @.str.1
	.asciz	"fail to create stratix10_svc_smc_shm_thread\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HZ,4,2                         ; @HZ
l_.str.2:                               ; @.str.2
	.asciz	"timeout to get sh-memory paras from secure world\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.3:                               ; @.str.3
	.asciz	"failed to get shared memory info from secure world\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.4:                               ; @.str.4
	.asciz	"SM software provides paddr: 0x%016x, size: 0x%08x\n"

	.no_dead_strip	_svc_get_sh_memory
.subsections_via_symbols
