	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcsp_recv
_bcsp_recv:                             ## @bcsp_recv
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	8(%rdi), %rbx
	movl	(%rbx), %ecx
	movl	4(%rbx), %r8d
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	callq	_BT_DBG
	testl	%r14d, %r14d
	je	LBB0_28
## %bb.1:
	leaq	LJTI0_0(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movzbl	%al, %esi
	movq	%rbx, %rdi
	callq	_bcsp_unslip_one_byte
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	decl	%r14d
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%r14d, %r14d
	je	LBB0_28
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, 4(%rbx)
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movzbl	(%r15), %eax
	cmpb	$-64, %al
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_BT_ERR
	movq	16(%rbx), %rdi
	callq	_kfree_skb
	movq	$128, (%rbx)
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%r12,%rax,4), %rax
	addq	%r12, %rax
	jmpq	*%rax
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$-64, (%r15)
	je	LBB0_6
## %bb.26:                              ##   in Loop: Header=BB0_2 Depth=1
	movabsq	$17179869316, %rax              ## imm = 0x400000084
	movq	%rax, (%rbx)
	movq	_BCSP_ESCSTATE_NOESC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movl	24(%rbx), %edi
	callq	_BCSP_CRC_INIT
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4101, %edi                     ## imm = 0x1005
	callq	_bt_skb_alloc
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_27
## %bb.29:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rcx
	movq	%rcx, 8(%rax)
	jmp	LBB0_7
LBB0_23:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$-64, (%r15)
	jne	LBB0_6
## %bb.24:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	$128, (%rbx)
	jmp	LBB0_6
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	testb	$64, (%rax)
	jne	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_bcsp_complete_rx_pkt
	jmp	LBB0_7
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %r12
	movl	24(%rbx), %edi
	callq	_bitrev16
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_bscp_get_crc
	cmpl	%eax, %r13d
	jne	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rdi
	movl	16(%rdi), %esi
	addl	$-2, %esi
	callq	_skb_trim
	movq	%r12, %r13
	movq	%r12, %rdi
	callq	_bcsp_complete_rx_pkt
	leaq	LJTI0_0(%rip), %r12
	jmp	LBB0_7
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	movl	4(%rax), %ecx
	addl	%esi, %ecx
	addl	8(%rax), %ecx
	notl	%ecx
	movzbl	%cl, %ecx
	cmpl	12(%rax), %ecx
	jne	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	testb	$-128, %sil
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	andl	$7, %esi
	movl	8(%rbx), %edx
	cmpl	%edx, %esi
	jne	LBB0_15
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$130, (%rbx)
	movl	4(%rax), %ecx
	movl	8(%rax), %eax
	sarl	$4, %ecx
	shll	$4, %eax
	addl	%ecx, %eax
	movl	%eax, 4(%rbx)
	jmp	LBB0_7
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movabsq	$8589934723, %rax               ## imm = 0x200000083
	movq	%rax, (%rbx)
	jmp	LBB0_7
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	24(%rbx), %edi
	callq	_bitrev16
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_bscp_get_crc
	leaq	L_.str.4(%rip), %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_BT_ERR
	movq	16(%rbx), %rdi
	callq	_kfree_skb
	movq	$129, (%rbx)
	movq	%r12, %r13
	leaq	LJTI0_0(%rip), %r12
	jmp	LBB0_7
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_BT_ERR
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rdi
	callq	_kfree_skb
	movq	$129, (%rbx)
	jmp	LBB0_7
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_BT_ERR
	jmp	LBB0_12
LBB0_27:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_BT_ERR
	movq	$129, (%rbx)
LBB0_28:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_25, LBB0_25-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_25
	.long	L0_0_set_23
	.long	L0_0_set_17
	.long	L0_0_set_20
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hu %p count %d rx_state %d rx_count %ld"

L_.str.1:                               ## @.str.1
	.asciz	"Short BCSP packet"

L_.str.2:                               ## @.str.2
	.asciz	"Error in BCSP hdr checksum"

L_.str.3:                               ## @.str.3
	.asciz	"Out-of-order packet arrived, got %u expected %u"

L_.str.4:                               ## @.str.4
	.asciz	"Checksum failed: computed %04x received %04x"

	.comm	_BCSP_ESCSTATE_NOESC,4,2        ## @BCSP_ESCSTATE_NOESC
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
L_.str.5:                               ## @.str.5
	.asciz	"Can't allocate mem for new packet"

	.no_dead_strip	_bcsp_recv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function bcsp_recv
lCPI0_0:
	.long	128                             ; 0x80
	.long	0                               ; 0x0
lCPI0_1:
	.long	132                             ; 0x84
	.long	4                               ; 0x4
lCPI0_2:
	.long	129                             ; 0x81
	.long	0                               ; 0x0
lCPI0_3:
	.long	131                             ; 0x83
	.long	2                               ; 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_bcsp_recv:                             ; @bcsp_recv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	d11, d10, [sp, #16]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	.cfi_offset b10, -120
	.cfi_offset b11, -128
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x19, [x0, #8]
	ldp	w3, w4, [x19]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_BT_DBG
	cbz	w20, LBB0_29
; %bb.1:
Lloh2:
	adrp	x28, lJTI0_0@PAGE
Lloh3:
	add	x28, x28, lJTI0_0@PAGEOFF
Lloh4:
	adrp	x8, lCPI0_1@PAGE
Lloh5:
	ldr	d8, [x8, lCPI0_1@PAGEOFF]
	mov	w24, #128
Lloh6:
	adrp	x23, l_.str.4@PAGE
Lloh7:
	add	x23, x23, l_.str.4@PAGEOFF
Lloh8:
	adrp	x8, lCPI0_3@PAGE
Lloh9:
	ldr	d10, [x8, lCPI0_3@PAGEOFF]
Lloh10:
	adrp	x8, lCPI0_2@PAGE
Lloh11:
	ldr	d9, [x8, lCPI0_2@PAGEOFF]
Lloh12:
	adrp	x25, l_.str.2@PAGE
Lloh13:
	add	x25, x25, l_.str.2@PAGEOFF
Lloh14:
	adrp	x8, lCPI0_0@PAGE
Lloh15:
	ldr	d11, [x8, lCPI0_0@PAGEOFF]
Lloh16:
	adrp	x26, l_.str.1@PAGE
Lloh17:
	add	x26, x26, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19, #16]
	ldr	w8, [x0, #16]
	sub	w1, w8, #2
	bl	_skb_trim
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_bcsp_complete_rx_pkt
	cbz	w20, LBB0_29
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w1, [x21]
	cmp	w1, #192
	b.ne	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x26
	bl	_BT_ERR
	ldr	x0, [x19, #16]
	bl	_kfree_skb
	str	d11, [x19]
	b	LBB0_13
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	adr	x9, LBB0_9
	ldrb	w10, [x28, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w8, [x21]
	cmp	w8, #192
	b.eq	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	str	d8, [x19]
Lloh18:
	adrp	x8, _BCSP_ESCSTATE_NOESC@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BCSP_ESCSTATE_NOESC@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x19, #28]
	ldr	w0, [x19, #24]
	bl	_BCSP_CRC_INIT
Lloh21:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh22:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	w0, #4101
	bl	_bt_skb_alloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_28
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x22]
	str	x8, [x0, #8]
	cbnz	w20, LBB0_4
	b	LBB0_29
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_bcsp_unslip_one_byte
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	sub	w20, w20, #1
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w20, LBB0_4
	b	LBB0_29
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w8, [x21]
	cmp	w8, #192
	b.ne	LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	str	w24, [x19]
	b	LBB0_13
LBB0_17:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldrb	w8, [x8]
	tbz	w8, #6, LBB0_3
; %bb.18:                               ;   in Loop: Header=BB0_4 Depth=1
	str	d10, [x19]
	cbnz	w20, LBB0_4
	b	LBB0_29
LBB0_19:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #24]
	bl	_bitrev16
	mov	x27, x0
	mov	x0, x19
	bl	_bscp_get_crc
	cmp	w27, w0
	b.eq	LBB0_2
; %bb.20:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #24]
	bl	_bitrev16
	mov	x27, x0
	mov	x0, x19
	bl	_bscp_get_crc
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x27, x0, [sp]
	mov	x0, x23
	b	LBB0_26
LBB0_21:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldp	w9, w10, [x8]
	ldp	w11, w12, [x8, #8]
	add	w10, w10, w9
	add	w10, w10, w11
	mvn	w10, w10
	cmp	w12, w10, uxtb
	b.ne	LBB0_25
; %bb.22:                               ;   in Loop: Header=BB0_4 Depth=1
	tbz	w9, #7, LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_4 Depth=1
	and	w9, w9, #0x7
	ldr	w10, [x19, #8]
	cmp	w9, w10
	b.ne	LBB0_27
LBB0_24:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #130
	str	w9, [x19]
	ldp	w9, w8, [x8, #4]
	lsl	w8, w8, #4
	add	w8, w8, w9, asr #4
	str	w8, [x19, #4]
	cbnz	w20, LBB0_4
	b	LBB0_29
LBB0_25:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x25
LBB0_26:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_BT_ERR
	ldr	x0, [x19, #16]
	bl	_kfree_skb
	str	d9, [x19]
	cbnz	w20, LBB0_4
	b	LBB0_29
LBB0_27:                                ;   in Loop: Header=BB0_4 Depth=1
	stp	x9, x10, [sp]
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_26
LBB0_28:
Lloh26:
	adrp	x0, l_.str.5@PAGE
Lloh27:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_BT_ERR
	str	d9, [x19]
LBB0_29:
	mov	w0, #0
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdr	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdrp	Lloh10, Lloh14
	.loh AdrpLdr	Lloh10, Lloh11
	.loh AdrpAdrp	Lloh8, Lloh10
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdrp	Lloh4, Lloh8
	.loh AdrpLdr	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_15-LBB0_9)>>2
	.byte	(LBB0_17-LBB0_9)>>2
	.byte	(LBB0_19-LBB0_9)>>2
	.byte	(LBB0_21-LBB0_9)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hu %p count %d rx_state %d rx_count %ld"

l_.str.1:                               ; @.str.1
	.asciz	"Short BCSP packet"

l_.str.2:                               ; @.str.2
	.asciz	"Error in BCSP hdr checksum"

l_.str.3:                               ; @.str.3
	.asciz	"Out-of-order packet arrived, got %u expected %u"

l_.str.4:                               ; @.str.4
	.asciz	"Checksum failed: computed %04x received %04x"

	.comm	_BCSP_ESCSTATE_NOESC,4,2        ; @BCSP_ESCSTATE_NOESC
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
l_.str.5:                               ; @.str.5
	.asciz	"Can't allocate mem for new packet"

	.no_dead_strip	_bcsp_recv
.subsections_via_symbols
