	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rave_sp_receive_frame
_rave_sp_receive_frame:                 ## @rave_sp_receive_frame
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movq	(%rax), %rbx
	movq	_RAVE_SP_CHECKSUM_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r15, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	xorl	%edi, %edi
	cmpq	%r15, %rbx
	seta	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.2:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_3
LBB0_4:
	movq	%r12, %r15
	movq	_DUMP_PREFIX_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rdi
	movl	$16, %edx
	movl	$1, %ecx
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	%r14, %r9
	pushq	$0
	callq	_print_hex_dump_debug
	addq	$16, %rsp
	xorl	%edi, %edi
	cmpq	%r14, %rbx
	setae	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
LBB0_3:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_warn                       ## TAILCALL
LBB0_7:
	movq	%r14, %rsi
	subq	%rbx, %rsi
	movq	%r14, %r12
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	(%rdi,%rsi), %r14
	movq	(%r13), %rax
	movq	(%rax), %rax
	movq	%r15, %rdx
	callq	*8(%rax)
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_warn
	jmp	LBB0_12
LBB0_9:
	movq	%r12, %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movzbl	(%rax), %edi
	callq	_rave_sp_id_is_event
	movq	%r13, %rdi
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_rave_sp_receive_event
	jmp	LBB0_12
LBB0_11:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_rave_sp_receive_reply
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RAVE_SP_CHECKSUM_SIZE,4,2      ## @RAVE_SP_CHECKSUM_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Checksum too long, dropping\n"

L_.str.1:                               ## @.str.1
	.asciz	"rave-sp rx: "

	.comm	_DUMP_PREFIX_NONE,4,2           ## @DUMP_PREFIX_NONE
L_.str.2:                               ## @.str.2
	.asciz	"Dropping short frame\n"

L_.str.3:                               ## @.str.3
	.asciz	"Dropping bad frame\n"

	.no_dead_strip	_rave_sp_receive_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rave_sp_receive_frame
_rave_sp_receive_frame:                 ; @rave_sp_receive_frame
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldp	x8, x21, [x0]
	ldr	x8, [x8]
	ldr	x23, [x8]
Lloh3:
	adrp	x8, _RAVE_SP_CHECKSUM_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RAVE_SP_CHECKSUM_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x10, x10, #0x1fffffff0
	sub	x24, x9, x10
	mov	sp, x24
	cmp	x23, x8
	cset	w0, hi
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.1:
	ldur	x8, [x29, #-72]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.2:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh13:
	adrp	x8, _DUMP_PREFIX_NONE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DUMP_PREFIX_NONE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	w2, #16
	mov	w3, #1
	mov	x4, x20
	mov	x5, x19
	mov	w6, #0
	bl	_print_hex_dump_debug
	cmp	x23, x19
	cset	w0, hs
	bl	_unlikely
	cbz	x0, LBB0_7
; %bb.4:
	ldur	x8, [x29, #-72]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.5:
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	x0, x21
	sub	sp, x29, #64
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_dev_warn
LBB0_7:
	sub	x1, x19, x23
	add	x25, x20, x1
	ldr	x8, [x22]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	mov	x0, x20
	mov	x2, x24
	blr	x8
	mov	x0, x24
	mov	x1, x25
	mov	x2, x23
	bl	_memcmp
	cbz	x0, LBB0_9
; %bb.8:
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_dev_warn
	b	LBB0_12
LBB0_9:
	ldrb	w0, [x20]
	bl	_rave_sp_id_is_event
	cbz	x0, LBB0_11
; %bb.10:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x19
	bl	_rave_sp_receive_event
	b	LBB0_12
LBB0_11:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x19
	bl	_rave_sp_receive_reply
LBB0_12:
	ldur	x8, [x29, #-72]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	sub	sp, x29, #64
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_RAVE_SP_CHECKSUM_SIZE,4,2      ; @RAVE_SP_CHECKSUM_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Checksum too long, dropping\n"

l_.str.1:                               ; @.str.1
	.asciz	"rave-sp rx: "

	.comm	_DUMP_PREFIX_NONE,4,2           ; @DUMP_PREFIX_NONE
l_.str.2:                               ; @.str.2
	.asciz	"Dropping short frame\n"

l_.str.3:                               ; @.str.3
	.asciz	"Dropping bad frame\n"

	.no_dead_strip	_rave_sp_receive_frame
.subsections_via_symbols
