	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dspio_send_scp_message
_dspio_send_scp_message:                ## @dspio_send_scp_message
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%r9, %r9
	je	LBB0_2
## %bb.1:
	movl	$0, (%r9)
LBB0_2:
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movl	(%rbx), %edi
	leaq	-76(%rbp), %rax
	movq	%rax, 16(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	xorl	%r14d, %r14d
	leaq	-68(%rbp), %rsi
	leaq	-72(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	leaq	-60(%rbp), %r9
	xorl	%r8d, %r8d
	callq	_extract_scp_header
	movl	-76(%rbp), %edx
	leal	4(,%rdx,4), %eax
	cmpl	%r15d, %eax
	jbe	LBB0_4
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_20
LBB0_4:
	incl	%edx
	movl	-64(%rbp), %eax
	orl	-60(%rbp), %eax
	je	LBB0_11
## %bb.5:
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_8
## %bb.6:
	cmpl	$4, %r12d
	jb	LBB0_8
## %bb.7:
	cmpq	$0, -88(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_8
## %bb.9:
	movzwl	2(%rbx), %eax
	shll	$16, %eax
	movl	-68(%rbp), %ecx
	shll	$8, %ecx
	orl	-72(%rbp), %eax
	orl	%ecx, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	%r12d, %eax
	shrl	$2, %eax
	decl	%eax
	movl	%eax, 4(%rcx)
	movl	$1, 8(%rcx)
	movq	%r13, %rdi
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dspio_write_multiple
	testl	%eax, %eax
	js	LBB0_10
## %bb.13:
	movq	_jiffies@GOTPCREL(%rip), %r14
	movq	(%r14), %r15
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	addq	%r15, %rbx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_memset
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	$20, %edi
	callq	_msleep
	cmpl	$0, 8(%r15)
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	jne	LBB0_14
## %bb.16:
	cmpl	$0, 8(%r15)
	je	LBB0_17
## %bb.18:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_19
LBB0_11:
	movq	%r13, %rdi
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dspio_write_multiple
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_20
	jmp	LBB0_12
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_20
LBB0_17:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	leaq	4(%rbx), %rdi
	leaq	24(%r15), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	16(%r15), %rsi
	movl	4(%r15), %edx
	movq	%rbx, %rdi
	callq	_memcpy
	movl	12(%r15), %eax
	leal	4(,%rax,4), %eax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%r14d, %r14d
LBB0_19:
	movl	$0, 8(%r15)
	jmp	LBB0_20
LBB0_10:
	movl	%eax, %r14d
LBB0_12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$0, 8(%rax)
LBB0_20:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_dspio_send_scp_message
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dspio_send_scp_message
_dspio_send_scp_message:                ; @dspio_send_scp_message
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x5
	mov	x21, x4
	mov	x20, x3
	mov	x24, x2
	mov	x22, x1
	mov	x23, x0
	ldr	x25, [x0]
	cbz	x5, LBB0_2
; %bb.1:
	str	wzr, [x19]
LBB0_2:
	ldr	w0, [x22]
	add	x8, sp, #28
	str	x8, [sp]
	add	x1, sp, #20
	add	x2, sp, #24
	add	x3, sp, #16
	add	x5, sp, #12
	mov	x4, #0
	mov	x6, #0
	mov	x7, #0
	bl	_extract_scp_header
	ldr	w8, [sp, #28]
	add	w2, w8, #1
	cmp	w24, w2, lsl #2
	b.hs	LBB0_4
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_4:
	ldp	w9, w8, [sp, #12]
	orr	w8, w8, w9
	cbz	w8, LBB0_14
; %bb.5:
	cbz	x20, LBB0_3
; %bb.6:
	cmp	w21, #4
	b.lo	LBB0_3
; %bb.7:
	cbz	x19, LBB0_3
; %bb.8:
	ldrh	w8, [x22, #2]
	ldp	w10, w9, [sp, #20]
	orr	w8, w9, w8, lsl #16
	orr	w8, w8, w10, lsl #8
	lsr	w9, w21, #2
	sub	w9, w9, #1
	stp	w8, w9, [x25]
	mov	w8, #1
	str	w8, [x25, #8]
	mov	x0, x23
	mov	x1, x22
	bl	_dspio_write_multiple
	tbnz	w0, #31, LBB0_16
; %bb.9:
Lloh3:
	adrp	x23, _jiffies@GOTPAGE
Lloh4:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x22, [x23]
	mov	w0, #1000
	bl	_msecs_to_jiffies
	add	x22, x0, x22
	mov	x0, x20
	mov	w1, #0
	mov	x2, x21
	bl	_memset
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #20
	bl	_msleep
	ldr	w8, [x25, #8]
	cbz	w8, LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x0, [x23]
	mov	x1, x22
	bl	_time_before
	cbnz	x0, LBB0_10
; %bb.12:
	ldr	w8, [x25, #8]
	cbz	w8, LBB0_15
; %bb.13:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_14:
	mov	x0, x23
	mov	x1, x22
	bl	_dspio_write_multiple
	tbz	w0, #31, LBB0_17
	b	LBB0_16
LBB0_15:
	add	x0, x20, #4
	add	x1, x25, #24
	mov	w2, #4
	bl	_memcpy
	ldr	x1, [x25, #16]
	ldr	w2, [x25, #4]
	mov	x0, x20
	bl	_memcpy
	mov	w0, #0
	ldr	w8, [x25, #12]
	lsl	w8, w8, #2
	add	w8, w8, #4
	str	w8, [x19]
LBB0_16:
	str	wzr, [x25, #8]
LBB0_17:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_dspio_send_scp_message
.subsections_via_symbols
