	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cc2520_rx
_cc2520_rx:                             ## @cc2520_rx
	.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
	movq	%rdi, %r14
	movl	$0, -36(%rbp)
	leaq	-36(%rbp), %rsi
	movl	$1, %edx
	callq	_cc2520_read_rxfifo
	movl	-36(%rbp), %edi
	callq	_ieee802154_is_valid_psdu_len
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	-36(%rbp), %edi
	jmp	LBB0_3
LBB0_2:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	_IEEE802154_MTU@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, -36(%rbp)
LBB0_3:
	callq	_dev_alloc_skb
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %r15
	movl	-36(%rbp), %esi
	movq	%rax, %rdi
	callq	_skb_put
	movl	-36(%rbp), %edx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_cc2520_read_rxfifo
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
LBB0_8:
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_kfree_skb
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_9:
	xorl	%ebx, %ebx
	cmpl	$0, 12(%r14)
	movl	$0, %r12d
	jne	LBB0_13
## %bb.10:
	movq	(%r15), %rax
	movslq	-36(%rbp), %rcx
	movl	-4(%rax,%rcx,4), %r12d
	movl	$7, %edi
	callq	_BIT
	testl	%r12d, %eax
	je	LBB0_11
## %bb.12:
	movq	(%r15), %rax
	movslq	-36(%rbp), %rcx
	movl	-4(%rax,%rcx,4), %eax
	andl	$127, %eax
	cmpl	$113, %eax
	movl	$113, %ecx
	cmovbl	%eax, %ecx
	xorl	%edx, %edx
	cmpl	$50, %eax
	leal	-200(,%rcx,4), %r12d
	cmovbl	%edx, %r12d
LBB0_13:
	movl	8(%r14), %edi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_ieee802154_rx_irqsafe
	movq	(%r14), %rdi
	movl	-36(%rbp), %edx
	leaq	L_.str.3(%rip), %rsi
	movl	%r12d, %ecx
	callq	_dev_vdbg
LBB0_14:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"corrupted frame received\n"

	.comm	_IEEE802154_MTU,4,2             ## @IEEE802154_MTU
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"frame reception failed\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"CRC check failed\n"

L_.str.3:                               ## @.str.3
	.asciz	"RXFIFO: %x %x\n"

	.no_dead_strip	_cc2520_rx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cc2520_rx
_cc2520_rx:                             ; @cc2520_rx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	str	wzr, [sp, #12]
	add	x1, sp, #12
	mov	w2, #1
	bl	_cc2520_read_rxfifo
	ldr	w0, [sp, #12]
	bl	_ieee802154_is_valid_psdu_len
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w0, [sp, #12]
	bl	_dev_alloc_skb
	cbz	x0, LBB0_6
LBB0_2:
	mov	x20, x0
	ldr	w1, [sp, #12]
	bl	_skb_put
	mov	x1, x0
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_cc2520_read_rxfifo
	cbz	x0, LBB0_8
; %bb.3:
	ldr	x0, [x19]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	bl	_dev_dbg
	mov	x0, x20
	bl	_kfree_skb
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	ldr	x0, [x19]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh6:
	adrp	x8, _IEEE802154_MTU@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IEEE802154_MTU@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	str	w0, [sp, #12]
	bl	_dev_alloc_skb
	cbnz	x0, LBB0_2
LBB0_6:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_8:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_10
; %bb.9:
	mov	w21, #0
	b	LBB0_12
LBB0_10:
	ldr	x8, [x20]
	ldrsw	x9, [sp, #12]
	add	x8, x8, x9, lsl #2
	ldur	w21, [x8, #-4]
	mov	w0, #7
	bl	_BIT
	tst	w0, w21
	b.eq	LBB0_14
; %bb.11:
	ldr	x8, [x20]
	ldrsw	x9, [sp, #12]
	add	x8, x8, x9, lsl #2
	ldur	w8, [x8, #-4]
	and	w8, w8, #0x7f
	mov	w9, #113
	cmp	w8, #113
	csel	w9, w8, w9, lo
	lsl	w9, w9, #2
	sub	w9, w9, #200
	cmp	w8, #50
	csel	w21, wzr, w9, lo
LBB0_12:
	ldr	w0, [x19, #8]
	mov	x1, x20
	mov	x2, x21
	bl	_ieee802154_rx_irqsafe
	ldr	x0, [x19]
	ldr	w2, [sp, #12]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x3, x21
	bl	_dev_vdbg
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_14:
	ldr	x0, [x19]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"corrupted frame received\n"

	.comm	_IEEE802154_MTU,4,2             ; @IEEE802154_MTU
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"frame reception failed\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"CRC check failed\n"

l_.str.3:                               ; @.str.3
	.asciz	"RXFIFO: %x %x\n"

	.no_dead_strip	_cc2520_rx
.subsections_via_symbols
