	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsu_send_msg
_rsu_send_msg:                          ## @rsu_send_msg
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r14
	callq	_mutex_lock
	leaq	16(%r14), %r15
	movq	%r15, %rdi
	callq	_reinit_completion
	movl	%ebx, 12(%r14)
	movl	%r12d, -48(%rbp)
	movl	4(%r14), %edi
	leaq	-48(%rbp), %rsi
	callq	_stratix10_svc_send
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_RSU_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_wait_for_completion_interruptible_timeout
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %r15d
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:
	movl	8(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r15d, %ebx
	jmp	LBB0_6
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_6
LBB0_3:
	movl	8(%r14), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_6:
	movl	4(%r14), %edi
	callq	_stratix10_svc_done
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RSU_TIMEOUT,4,2                ## @RSU_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout waiting for SMC call\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.1:                               ## @.str.1
	.asciz	"error %d waiting for SMC call\n"

	.no_dead_strip	_rsu_send_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsu_send_msg
_rsu_send_msg:                          ; @rsu_send_msg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x3
	mov	x22, x1
	mov	x19, x0
	bl	_mutex_lock
	add	x21, x19, #16
	mov	x0, x21
	bl	_reinit_completion
	str	w20, [x19, #12]
	str	w22, [sp, #16]
	ldr	w0, [x19, #4]
	add	x1, sp, #16
	bl	_stratix10_svc_send
	tbnz	w0, #31, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _RSU_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RSU_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_wait_for_completion_interruptible_timeout
	cbz	w0, LBB0_5
; %bb.2:
	mov	x20, x0
	tbnz	w0, #31, LBB0_6
; %bb.3:
	mov	w20, #0
	b	LBB0_7
LBB0_4:
	mov	x20, x0
	b	LBB0_7
LBB0_5:
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh5:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_6:
	ldr	w0, [x19, #8]
	str	x20, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_7:
	ldr	w0, [x19, #4]
	bl	_stratix10_svc_done
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_RSU_TIMEOUT,4,2                ; @RSU_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout waiting for SMC call\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.1:                               ; @.str.1
	.asciz	"error %d waiting for SMC call\n"

	.no_dead_strip	_rsu_send_msg
.subsections_via_symbols
