	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_delta_ipc_set_stream           ## -- Begin function delta_ipc_set_stream
	.p2align	4, 0x90
_delta_ipc_set_stream:                  ## @delta_ipc_set_stream
	.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	$40, %rsp
	.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, %rbx
	callq	_to_ctx
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_to_pctx
	movq	%rax, %r14
	movq	8(%rax), %r13
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.1:
	movq	8(%r13), %rbx
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.2:
	testq	%r15, %r15
	je	LBB0_8
## %bb.3:
	movl	(%r15), %esi
	testl	%esi, %esi
	je	LBB0_8
## %bb.4:
	movq	8(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.5:
	movq	8(%r12), %rax
	movq	(%rax), %r8
	cmpq	%r8, %rcx
	jle	LBB0_14
## %bb.6:
	movl	(%r13), %edi
	movl	4(%r14), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_11
LBB0_7:
	movl	(%r13), %edi
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_10
LBB0_8:
	movl	(%r13), %edi
	movl	4(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
LBB0_9:
	movl	(%r13), %edi
	movl	4(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
LBB0_10:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_12:
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%r12, %rdi
	movq	%rcx, %rdx
	callq	_is_valid_data
	testl	%eax, %eax
	je	LBB0_17
## %bb.15:
	movq	_DELTA_IPC_SET_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	callq	_build_msg_header
	movq	8(%r15), %rax
	movq	%rax, -56(%rbp)
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_to_paddr
	movl	%eax, -64(%rbp)
	movl	(%rbx), %edi
	leaq	-64(%rbp), %rsi
	movl	$24, %edx
	callq	_rpmsg_send
	testl	%eax, %eax
	je	LBB0_18
## %bb.16:
	movl	%eax, %ebx
	movl	(%r13), %edi
	movl	4(%r14), %edx
	movq	8(%r15), %r8
	movl	(%r15), %r9d
	leaq	L_.str.5(%rip), %rsi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	incl	(%r14)
	jmp	LBB0_13
LBB0_17:
	movl	(%r13), %edi
	movl	4(%r14), %edx
	movq	8(%r15), %rcx
	movl	(%r15), %r8d
	movq	8(%r12), %rax
	movq	(%rax), %rsi
	movq	8(%rax), %r9
	leaq	(%r9,%rsi), %rax
	decq	%rax
	movq	%rax, (%rsp)
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_11
LBB0_18:
	movq	%r12, %rbx
	addq	$4, %rbx
	movq	_IPC_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	je	LBB0_21
## %bb.19:
	movl	(%r12), %ecx
	testl	%ecx, %ecx
	je	LBB0_22
## %bb.20:
	movl	(%r13), %edi
	movl	4(%r14), %edx
	movq	8(%r15), %r8
	movl	(%r15), %r9d
	leaq	L_.str.7(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	incl	(%r14)
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_21:
	movl	(%r13), %edi
	movl	4(%r14), %edx
	movq	8(%r15), %rcx
	movl	(%r15), %r8d
	leaq	L_.str.6(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	incl	(%r14)
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_22:
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s   ipc: failed to set stream, invalid ipc handle\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"%s   ipc: failed to set stream, rpmsg is not initialized\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s  ipc: failed to set stream, empty parameter\n"

L_.str.3:                               ## @.str.3
	.asciz	"%s   ipc: failed to set stream, too large ipc parameter(%d bytes while max %d expected)\n"

L_.str.4:                               ## @.str.4
	.asciz	"%s   ipc: failed to set stream, parameter is not in expected address range (size=%d, data=%p not in %p..%p)\n"

	.comm	_DELTA_IPC_SET_STREAM,4,2       ## @DELTA_IPC_SET_STREAM
L_.str.5:                               ## @.str.5
	.asciz	"%s   ipc: failed to set stream, rpmsg_send failed (%d) for DELTA_IPC_SET_STREAM (size=%d, data=%p)\n"

	.comm	_IPC_TIMEOUT,4,2                ## @IPC_TIMEOUT
L_.str.6:                               ## @.str.6
	.asciz	"%s   ipc: failed to set stream, timeout waiting for DELTA_IPC_SET_STREAM callback (size=%d, data=%p)\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.7:                               ## @.str.7
	.asciz	"%s   ipc: failed to set stream, DELTA_IPC_SET_STREAM completed but with error (%d) (size=%d, data=%p)\n"

	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_delta_ipc_set_stream           ; -- Begin function delta_ipc_set_stream
	.p2align	2
_delta_ipc_set_stream:                  ; @delta_ipc_set_stream
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x20, x1
	mov	x22, x0
	bl	_to_ctx
	mov	x21, x0
	bl	_to_pctx
	mov	x19, x0
	ldr	x23, [x0, #8]
	cbz	x22, LBB0_7
; %bb.1:
	ldr	x22, [x23, #8]
	cbz	x22, LBB0_9
; %bb.2:
	cbz	x20, LBB0_8
; %bb.3:
	ldr	w1, [x20]
	cbz	w1, LBB0_8
; %bb.4:
	ldr	x2, [x20, #8]
	cbz	x2, LBB0_8
; %bb.5:
	ldr	x8, [x21, #8]
	ldr	x9, [x8]
	cmp	x2, x9
	b.le	LBB0_13
; %bb.6:
	ldr	w0, [x23]
	ldr	w8, [x19, #4]
	stp	x2, x9, [sp]
Lloh0:
	adrp	x1, l_.str.3@PAGE
Lloh1:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x8
	b	LBB0_10
LBB0_7:
	ldr	w0, [x23]
	ldr	w2, [x19, #4]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_8:
	ldr	w0, [x23]
	ldr	w2, [x19, #4]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:
	ldr	w0, [x23]
	ldr	w2, [x19, #4]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_10:
	bl	_dev_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_12:
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_13:
	mov	x0, x21
	bl	_is_valid_data
	cbz	w0, LBB0_16
; %bb.14:
Lloh10:
	adrp	x8, _DELTA_IPC_SET_STREAM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DELTA_IPC_SET_STREAM@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	add	x8, sp, #40
	add	x2, x8, #16
	mov	x0, x21
	bl	_build_msg_header
	ldr	x8, [x20, #8]
	str	x8, [sp, #48]
	ldr	w1, [x20]
	mov	x0, x21
	bl	_to_paddr
	str	w0, [sp, #40]
	ldr	w0, [x22]
	add	x1, sp, #40
	mov	w2, #24
	bl	_rpmsg_send
	cbz	w0, LBB0_17
; %bb.15:
	mov	x22, x0
	ldr	w0, [x23]
	ldr	w2, [x19, #4]
	ldr	x8, [x20, #8]
	ldr	w9, [x20]
	stp	x8, x9, [sp, #8]
	str	x22, [sp]
Lloh13:
	adrp	x1, l_.str.5@PAGE
Lloh14:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_12
LBB0_16:
	ldr	w0, [x23]
	ldr	w2, [x19, #4]
	ldr	x8, [x20, #8]
	ldr	x9, [x21, #8]
	ldp	x9, x10, [x9]
	add	x9, x10, x9
	sub	x9, x9, #1
	ldr	w11, [x20]
	stp	x10, x9, [sp, #16]
	stp	x8, x11, [sp]
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_10
LBB0_17:
	add	x22, x21, #4
Lloh17:
	adrp	x8, _IPC_TIMEOUT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IPC_TIMEOUT@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x22
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_20
; %bb.18:
	ldr	w8, [x21]
	cbz	w8, LBB0_21
; %bb.19:
	ldr	w0, [x23]
	ldr	w2, [x19, #4]
	ldr	x9, [x20, #8]
	ldr	w10, [x20]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh20:
	adrp	x1, l_.str.7@PAGE
Lloh21:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_err
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
Lloh22:
	adrp	x8, _EIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_11
LBB0_20:
	ldr	w0, [x23]
	ldr	w2, [x19, #4]
	ldr	x8, [x20, #8]
	ldr	w9, [x20]
	stp	x8, x9, [sp]
Lloh24:
	adrp	x1, l_.str.6@PAGE
Lloh25:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_err
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
Lloh26:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_11
LBB0_21:
	mov	w22, #0
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s   ipc: failed to set stream, invalid ipc handle\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"%s   ipc: failed to set stream, rpmsg is not initialized\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s  ipc: failed to set stream, empty parameter\n"

l_.str.3:                               ; @.str.3
	.asciz	"%s   ipc: failed to set stream, too large ipc parameter(%d bytes while max %d expected)\n"

l_.str.4:                               ; @.str.4
	.asciz	"%s   ipc: failed to set stream, parameter is not in expected address range (size=%d, data=%p not in %p..%p)\n"

	.comm	_DELTA_IPC_SET_STREAM,4,2       ; @DELTA_IPC_SET_STREAM
l_.str.5:                               ; @.str.5
	.asciz	"%s   ipc: failed to set stream, rpmsg_send failed (%d) for DELTA_IPC_SET_STREAM (size=%d, data=%p)\n"

	.comm	_IPC_TIMEOUT,4,2                ; @IPC_TIMEOUT
l_.str.6:                               ; @.str.6
	.asciz	"%s   ipc: failed to set stream, timeout waiting for DELTA_IPC_SET_STREAM callback (size=%d, data=%p)\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.7:                               ; @.str.7
	.asciz	"%s   ipc: failed to set stream, DELTA_IPC_SET_STREAM completed but with error (%d) (size=%d, data=%p)\n"

	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
