	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_delta_ipc_open                 ## -- Begin function delta_ipc_open
	.p2align	4, 0x90
_delta_ipc_open:                        ## @delta_ipc_open
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	56(%rdi), %r14
	movq	8(%r14), %r12
	testq	%r12, %r12
	je	LBB0_1
## %bb.2:
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.6:
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.7:
	cmpq	$0, (%rdx)
	je	LBB0_9
## %bb.8:
	movq	%rcx, %r13
	movq	8(%rdx), %rcx
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.10:
	testq	%r13, %r13
	je	LBB0_11
## %bb.12:
	cmpq	%r13, %rcx
	jle	LBB0_14
## %bb.13:
	movl	(%r14), %edi
	movl	4(%r15), %edx
	movq	16(%r15), %rax
	movl	16(%rax), %r8d
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_5
LBB0_1:
	movl	(%r14), %edi
	movl	4(%r15), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	incl	(%r15)
	jmp	LBB0_5
LBB0_9:
	movl	(%r14), %edi
	movl	4(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_4
LBB0_3:
	movl	(%r14), %edi
	movl	4(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	(%r14), %edi
	movl	4(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_4
LBB0_14:
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	leaq	32(%r15), %rbx
	leaq	24(%r15), %rdi
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	callq	_init_completion
	leaq	L_.str.5(%rip), %rdx
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rcx
	callq	_hw_alloc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.15:
	leaq	8(%r15), %rdi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r15)
	movq	_DELTA_IPC_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-96(%rbp), %rdx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_build_msg_header
	movq	%r13, -104(%rbp)
	movq	16(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, -112(%rbp)
	movq	-120(%rbp), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	$8, %edx
	callq	_memcpy
	movq	-120(%rbp), %rax
	movq	$0, 56(%rax)
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movl	8(%r13), %edx
	movl	%edx, -128(%rbp)
	movq	16(%r15), %rax
	movq	8(%rax), %rdi
	movq	(%r13), %rsi
	callq	_memcpy
	movq	16(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, -124(%rbp)
	movl	(%r12), %edi
	leaq	-128(%rbp), %rsi
	movl	$40, %edx
	callq	_rpmsg_send
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %ebx
	movl	(%r14), %edi
	movl	4(%r15), %edx
	movq	(%r13), %rax
	movq	8(%r13), %r9
	movq	%rax, (%rsp)
	leaq	L_.str.6(%rip), %rsi
	movl	%ebx, %ecx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_22
LBB0_17:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	_IPC_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	je	LBB0_18
## %bb.19:
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_24
## %bb.20:
	movl	(%r14), %edi
	movl	4(%r15), %edx
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	(%rsi), %rax
	movq	8(%rsi), %r9
	movq	%rax, (%rsp)
	leaq	L_.str.8(%rip), %rsi
	xorl	%ebx, %ebx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_18:
	movl	(%r14), %edi
	movl	4(%r15), %edx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r9
	movq	8(%rax), %r8
	leaq	L_.str.7(%rip), %rsi
	xorl	%ebx, %ebx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
LBB0_21:
	subl	(%rax), %ebx
LBB0_22:
	incl	(%r15)
	movq	16(%r15), %rsi
	movq	%r15, %rdi
	callq	_hw_free
	movq	$0, 16(%r15)
	jmp	LBB0_23
LBB0_24:
	movq	16(%r15), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	xorl	%ebx, %ebx
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s   ipc: failed to open, rpmsg is not initialized\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"%s   ipc: failed to open, no name given\n"

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

L_.str.3:                               ## @.str.3
	.asciz	"%s   ipc: failed to open, no size given for ipc buffer\n"

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

L_.str.5:                               ## @.str.5
	.asciz	"ipc data buffer"

	.comm	_DELTA_IPC_OPEN,4,2             ## @DELTA_IPC_OPEN
L_.str.6:                               ## @.str.6
	.asciz	"%s   ipc: failed to open, rpmsg_send failed (%d) for DELTA_IPC_OPEN (name=%s, size=%d, data=%p)\n"

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

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.8:                               ## @.str.8
	.asciz	"%s   ipc: failed to open, DELTA_IPC_OPEN completed but with error (%d) (name=%s, 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_open                 ; -- Begin function delta_ipc_open
	.p2align	2
_delta_ipc_open:                        ; @delta_ipc_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x26, [x0, #56]
	ldr	x24, [x26, #8]
	cbz	x24, LBB0_8
; %bb.1:
	mov	x20, x1
	cbz	x1, LBB0_10
; %bb.2:
	mov	x21, x2
	cbz	x2, LBB0_9
; %bb.3:
	ldr	x8, [x21]
	cbz	x8, LBB0_9
; %bb.4:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_9
; %bb.5:
	mov	x27, x3
	cbz	x3, LBB0_14
; %bb.6:
	cmp	x8, x27
	b.le	LBB0_15
; %bb.7:
	ldr	w0, [x26]
	ldr	w2, [x19, #4]
	ldr	x9, [x19, #16]
	ldr	w9, [x9, #16]
	stp	x8, x9, [sp]
Lloh0:
	adrp	x1, l_.str.4@PAGE
Lloh1:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_11
LBB0_8:
	ldr	w0, [x26]
	ldr	w2, [x19, #4]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_12
LBB0_9:
	ldr	w0, [x26]
	ldr	w2, [x19, #4]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_10:
	ldr	w0, [x26]
	ldr	w2, [x19, #4]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_11:
	bl	_dev_err
LBB0_12:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_13:
	mov	x0, x25
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_14:
	ldr	w0, [x26]
	ldr	w2, [x19, #4]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_11
LBB0_15:
	mov	x22, x5
	mov	x23, x4
	add	x25, x19, #32
	add	x28, x19, #24
	mov	x0, x28
	bl	_init_completion
Lloh13:
	adrp	x2, l_.str.5@PAGE
Lloh14:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x1, x27
	str	x25, [sp, #48]                  ; 8-byte Folded Spill
	mov	x3, x25
	bl	_hw_alloc
	mov	x25, x0
	cbnz	w0, LBB0_13
; %bb.16:
	str	x28, [sp, #40]                  ; 8-byte Folded Spill
	add	x28, x19, #8
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	str	x8, [x19, #16]
Lloh15:
	adrp	x8, _DELTA_IPC_OPEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DELTA_IPC_OPEN@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x8, sp, #56
	add	x2, x8, #32
	mov	x0, x28
	bl	_build_msg_header
	str	x27, [sp, #80]
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	str	w8, [sp, #72]
	ldr	x0, [sp, #64]
	mov	x1, x20
	mov	w2, #8
	bl	_memcpy
	ldr	x8, [sp, #64]
	str	xzr, [x8, #56]
	ldr	w2, [x21, #8]
	str	w2, [sp, #56]
	ldr	x8, [x19, #16]
	ldr	x0, [x8, #8]
	ldr	x1, [x21]
	bl	_memcpy
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	str	w8, [sp, #60]
	ldr	w0, [x24]
	add	x1, sp, #56
	mov	w2, #40
	bl	_rpmsg_send
	cbz	w0, LBB0_18
; %bb.17:
	mov	x25, x0
	ldr	w0, [x26]
	ldr	w2, [x19, #4]
	ldp	x9, x8, [x21]
	stp	x8, x9, [sp, #16]
	stp	x25, x20, [sp]
Lloh18:
	adrp	x1, l_.str.6@PAGE
Lloh19:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_err
	b	LBB0_23
LBB0_18:
Lloh20:
	adrp	x8, _IPC_TIMEOUT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IPC_TIMEOUT@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x1, x0
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_21
; %bb.19:
	ldr	w8, [x28]
	cbz	w8, LBB0_24
; %bb.20:
	ldr	w0, [x26]
	ldr	w2, [x19, #4]
	ldp	x10, x9, [x21]
	stp	x9, x10, [sp, #16]
	stp	x8, x20, [sp]
Lloh23:
	adrp	x1, l_.str.8@PAGE
Lloh24:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_dev_err
Lloh25:
	adrp	x8, _EIO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_22
LBB0_21:
	ldr	w0, [x26]
	ldr	w2, [x19, #4]
	ldp	x9, x8, [x21]
	stp	x8, x9, [sp, #8]
	str	x20, [sp]
Lloh27:
	adrp	x1, l_.str.7@PAGE
Lloh28:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_err
Lloh29:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_22:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_23:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	ldr	x1, [x19, #16]
	mov	x0, x19
	bl	_hw_free
	str	xzr, [x19, #16]
	b	LBB0_13
LBB0_24:
	mov	w25, #0
	ldr	x8, [x19, #16]
	str	x8, [x23]
	str	x28, [x22]
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s   ipc: failed to open, rpmsg is not initialized\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"%s   ipc: failed to open, no name given\n"

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

l_.str.3:                               ; @.str.3
	.asciz	"%s   ipc: failed to open, no size given for ipc buffer\n"

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

l_.str.5:                               ; @.str.5
	.asciz	"ipc data buffer"

	.comm	_DELTA_IPC_OPEN,4,2             ; @DELTA_IPC_OPEN
l_.str.6:                               ; @.str.6
	.asciz	"%s   ipc: failed to open, rpmsg_send failed (%d) for DELTA_IPC_OPEN (name=%s, size=%d, data=%p)\n"

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

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

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