	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function l2cap_data_channel
_l2cap_data_channel:                    ## @l2cap_data_channel
	.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
	movq	%rdx, %r14
	movl	%esi, %ebx
	callq	_l2cap_get_chan_by_scid
	testq	%rax, %rax
	je	LBB0_23
## %bb.1:
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_l2cap_pi
	movq	%rax, %r15
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_BT_DBG
	movq	(%r13), %rax
	movq	_BT_CONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.2:
	movl	(%r15), %eax
	cmpl	$128, %eax
	je	LBB0_13
## %bb.3:
	cmpl	$129, %eax
	je	LBB0_7
## %bb.4:
	cmpl	$130, %eax
	jne	LBB0_19
## %bb.5:
	movl	4(%r15), %eax
	cmpl	(%r14), %eax
	jl	LBB0_20
## %bb.6:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_sock_queue_rcv_skb
LBB0_12:
	testl	%eax, %eax
	jne	LBB0_20
	jmp	LBB0_21
LBB0_23:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_BT_DBG
	movq	%r14, %rdi
	callq	_kfree_skb
	jmp	LBB0_22
LBB0_13:
	movl	4(%r14), %edi
	callq	_get_unaligned_le16
	movl	%eax, %r12d
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_skb_pull
	movl	(%r14), %ebx
	movl	%r12d, %edi
	callq	___is_sar_start
	leal	-2(%rbx), %ecx
	testl	%eax, %eax
	cmovel	%ebx, %ecx
	movl	12(%r15), %eax
	movq	_L2CAP_FCS_CRC16@GOTPCREL(%rip), %rdx
	leal	-2(%rcx), %esi
	cmpl	(%rdx), %eax
	cmovnel	%ecx, %esi
	movq	_L2CAP_DEFAULT_MAX_PDU_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jg	LBB0_20
## %bb.14:
	movl	%r12d, %edi
	callq	___is_sframe
	testl	%eax, %eax
	jne	LBB0_20
## %bb.15:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_l2cap_check_fcs
	testl	%eax, %eax
	jne	LBB0_20
## %bb.16:
	movl	%r12d, %edi
	callq	___get_txseq
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %ecx
	cmpl	%eax, 8(%r15)
	jne	LBB0_18
## %bb.17:
	leal	63(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	andl	$-64, %eax
	subl	%eax, %ecx
LBB0_18:
	movl	%ecx, 8(%r15)
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_l2cap_sar_reassembly_sdu
	jmp	LBB0_21
LBB0_7:
	movl	4(%r14), %edi
	callq	_get_unaligned_le16
	movl	%eax, %r12d
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_skb_pull
	movl	(%r14), %ebx
	movl	%r12d, %edi
	callq	___is_sar_start
	leal	-2(%rbx), %ecx
	testl	%eax, %eax
	cmovel	%ebx, %ecx
	movl	12(%r15), %eax
	movq	_L2CAP_FCS_CRC16@GOTPCREL(%rip), %rdx
	leal	-2(%rcx), %esi
	cmpl	(%rdx), %eax
	cmovnel	%ecx, %esi
	movq	_L2CAP_DEFAULT_MAX_PDU_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jg	LBB0_20
## %bb.8:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_l2cap_check_fcs
	testl	%eax, %eax
	jne	LBB0_20
## %bb.9:
	movl	%r12d, %edi
	callq	___is_iframe
	movq	%r13, %rdi
	movl	%r12d, %esi
	movq	%r14, %rdx
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	callq	_l2cap_data_channel_iframe
	jmp	LBB0_12
LBB0_19:
	movq	%r13, %rdi
	callq	_l2cap_pi
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_BT_DBG
LBB0_20:
	movq	%r14, %rdi
	callq	_kfree_skb
LBB0_21:
	movq	%r13, %rdi
	callq	_bh_unlock_sock
LBB0_22:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	_l2cap_data_channel_sframe
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown cid 0x%4.4x"

L_.str.1:                               ## @.str.1
	.asciz	"sk %p, len %d"

	.comm	_BT_CONNECTED,8,3               ## @BT_CONNECTED
	.comm	_L2CAP_FCS_CRC16,4,2            ## @L2CAP_FCS_CRC16
	.comm	_L2CAP_DEFAULT_MAX_PDU_SIZE,4,2 ## @L2CAP_DEFAULT_MAX_PDU_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"sk %p: bad mode 0x%2.2x"

	.no_dead_strip	_l2cap_data_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function l2cap_data_channel
_l2cap_data_channel:                    ; @l2cap_data_channel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x2
	mov	x21, x1
	bl	_l2cap_get_chan_by_scid
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	bl	_l2cap_pi
	mov	x21, x0
	ldr	w8, [x19]
	stp	x20, x8, [sp]
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_BT_DBG
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _BT_CONNECTED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BT_CONNECTED@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.2:
	ldr	w8, [x21]
	cmp	w8, #128
	b.eq	LBB0_8
; %bb.3:
	cmp	w8, #129
	b.eq	LBB0_12
; %bb.4:
	cmp	w8, #130
	b.ne	LBB0_16
; %bb.5:
	ldr	w8, [x21, #4]
	ldr	w9, [x19]
	cmp	w8, w9
	b.lt	LBB0_17
; %bb.6:
	mov	x0, x20
	mov	x1, x19
	bl	_sock_queue_rcv_skb
	cbnz	w0, LBB0_17
	b	LBB0_18
LBB0_7:
	str	x21, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BT_DBG
	mov	x0, x19
	bl	_kfree_skb
	b	LBB0_19
LBB0_8:
	ldr	w0, [x19, #4]
	bl	_get_unaligned_le16
	mov	x22, x0
	mov	x0, x19
	mov	w1, #2
	bl	_skb_pull
	ldr	w23, [x19]
	mov	x0, x22
	bl	___is_sar_start
	sub	w8, w23, #2
	cmp	w0, #0
	csel	w8, w23, w8, eq
	ldr	w9, [x21, #12]
Lloh7:
	adrp	x10, _L2CAP_FCS_CRC16@GOTPAGE
Lloh8:
	ldr	x10, [x10, _L2CAP_FCS_CRC16@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	sub	w11, w8, #2
	cmp	w9, w10
	csel	w8, w11, w8, eq
Lloh10:
	adrp	x9, _L2CAP_DEFAULT_MAX_PDU_SIZE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _L2CAP_DEFAULT_MAX_PDU_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	w8, w9
	b.gt	LBB0_17
; %bb.9:
	mov	x0, x22
	bl	___is_sframe
	cbnz	w0, LBB0_17
; %bb.10:
	mov	x0, x21
	mov	x1, x19
	bl	_l2cap_check_fcs
	cbnz	w0, LBB0_17
; %bb.11:
	mov	x0, x22
	bl	___get_txseq
	ldr	w8, [x21, #8]
	add	w9, w0, #1
	negs	w10, w9
	and	w10, w10, #0x3f
	and	w9, w9, #0x3f
	csneg	w9, w9, w10, mi
	cmp	w8, w0
	csinc	w8, w9, w0, eq
	str	w8, [x21, #8]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	bl	_l2cap_sar_reassembly_sdu
	b	LBB0_18
LBB0_12:
	ldr	w0, [x19, #4]
	bl	_get_unaligned_le16
	mov	x22, x0
	mov	x0, x19
	mov	w1, #2
	bl	_skb_pull
	ldr	w23, [x19]
	mov	x0, x22
	bl	___is_sar_start
	sub	w8, w23, #2
	cmp	w0, #0
	csel	w8, w23, w8, eq
	ldr	w9, [x21, #12]
Lloh13:
	adrp	x10, _L2CAP_FCS_CRC16@GOTPAGE
Lloh14:
	ldr	x10, [x10, _L2CAP_FCS_CRC16@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	sub	w11, w8, #2
	cmp	w9, w10
	csel	w8, w11, w8, eq
Lloh16:
	adrp	x9, _L2CAP_DEFAULT_MAX_PDU_SIZE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _L2CAP_DEFAULT_MAX_PDU_SIZE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w8, w9
	b.gt	LBB0_17
; %bb.13:
	mov	x0, x21
	mov	x1, x19
	bl	_l2cap_check_fcs
	cbnz	w0, LBB0_17
; %bb.14:
	mov	x0, x22
	bl	___is_iframe
	cbz	w0, LBB0_20
; %bb.15:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	bl	_l2cap_data_channel_iframe
	cbnz	w0, LBB0_17
	b	LBB0_18
LBB0_16:
	mov	x0, x20
	bl	_l2cap_pi
	ldr	w8, [x0]
	stp	x20, x8, [sp]
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_BT_DBG
LBB0_17:
	mov	x0, x19
	bl	_kfree_skb
LBB0_18:
	mov	x0, x20
	bl	_bh_unlock_sock
LBB0_19:
	mov	w0, #0
	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
	add	sp, sp, #80
	ret
LBB0_20:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	bl	_l2cap_data_channel_sframe
	cbnz	w0, LBB0_17
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown cid 0x%4.4x"

l_.str.1:                               ; @.str.1
	.asciz	"sk %p, len %d"

	.comm	_BT_CONNECTED,8,3               ; @BT_CONNECTED
	.comm	_L2CAP_FCS_CRC16,4,2            ; @L2CAP_FCS_CRC16
	.comm	_L2CAP_DEFAULT_MAX_PDU_SIZE,4,2 ; @L2CAP_DEFAULT_MAX_PDU_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"sk %p: bad mode 0x%2.2x"

	.no_dead_strip	_l2cap_data_channel
.subsections_via_symbols
