	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btsdio_rx_packet
_btsdio_rx_packet:                      ## @btsdio_rx_packet
	.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	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rax
	movl	4(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_BT_DBG
	movl	(%r14), %edi
	movq	_REG_RDAT@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	-64(%rbp), %rsi
	movl	$4, %ecx
	callq	_sdio_readsb
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movl	-60(%rbp), %eax
	movl	-56(%rbp), %r13d
	shll	$8, %eax
	orl	-64(%rbp), %eax
	shll	$16, %r13d
	orl	%eax, %r13d
	leal	-65544(%r13), %eax
	cmpl	$-65541, %eax                   ## imm = 0xFFFEFFFB
	ja	LBB0_4
## %bb.2:
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	leal	-4(%r13), %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_bt_skb_alloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	%rax, %r15
	movq	%rax, %rdi
	movl	%ebx, %esi
	callq	_skb_put
	movl	(%r14), %edi
	movq	(%r15), %rsi
	movl	(%r12), %edx
	movl	%ebx, %ecx
	callq	_sdio_readsb
	testl	%eax, %eax
	js	LBB0_12
## %bb.6:
	movq	8(%r14), %rax
	addl	%r13d, (%rax)
	movq	%rax, 8(%r15)
	movl	-52(%rbp), %ebx
	movq	%r15, %rdi
	callq	_bt_cb
	movl	%ebx, (%rax)
	movq	%r15, %rdi
	callq	_hci_recv_frame
	testl	%eax, %eax
	js	LBB0_3
## %bb.7:
	movl	(%r14), %edi
	movq	_REG_PC_RRT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_sdio_writeb
	jmp	LBB0_10
LBB0_3:
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_kfree_skb
	jmp	LBB0_10
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_REG_RDAT,4,2                   ## @REG_RDAT
	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_REG_PC_RRT,4,2                 ## @REG_PC_RRT
	.no_dead_strip	_btsdio_rx_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btsdio_rx_packet
_btsdio_rx_packet:                      ; @btsdio_rx_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x8, [x0, #8]
	ldr	w1, [x8, #4]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BT_DBG
	ldr	w0, [x19]
Lloh5:
	adrp	x22, _REG_RDAT@GOTPAGE
Lloh6:
	ldr	x22, [x22, _REG_RDAT@GOTPAGEOFF]
	ldr	w2, [x22]
	add	x1, sp, #8
	mov	w3, #4
	bl	_sdio_readsb
	tbnz	w0, #31, LBB0_7
; %bb.1:
	ldp	w8, w9, [sp, #8]
	orr	w8, w8, w9, lsl #8
	ldr	w9, [sp, #16]
	orr	w23, w8, w9, lsl #16
	mov	w8, #65528
	movk	w8, #65534, lsl #16
	orr	w9, w8, #0x4
	add	w8, w23, w8
	cmp	w8, w9
	b.hs	LBB0_3
; %bb.2:
Lloh7:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
	b	LBB0_9
LBB0_3:
	sub	w21, w23, #4
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_bt_skb_alloc
	cbz	x0, LBB0_8
; %bb.4:
	mov	x20, x0
	mov	x1, x21
	bl	_skb_put
	ldr	w0, [x19]
	ldr	x1, [x20]
	ldr	w2, [x22]
	mov	x3, x21
	bl	_sdio_readsb
	tbnz	w0, #31, LBB0_12
; %bb.5:
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	add	w9, w9, w23
	str	w9, [x8]
	str	x8, [x20, #8]
	ldr	w21, [sp, #20]
	mov	x0, x20
	bl	_bt_cb
	str	w21, [x0]
	mov	x0, x20
	bl	_hci_recv_frame
	tbnz	w0, #31, LBB0_7
; %bb.6:
	ldr	w0, [x19]
Lloh12:
	adrp	x8, _REG_PC_RRT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_PC_RRT@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	w1, #0
	mov	x3, #0
	bl	_sdio_writeb
	mov	w21, #0
	b	LBB0_10
LBB0_7:
	mov	x21, x0
	b	LBB0_10
LBB0_8:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	ldr	x8, [sp, #24]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.11:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_12:
	mov	x21, x0
	mov	x0, x20
	bl	_kfree_skb
	b	LBB0_10
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_REG_RDAT,4,2                   ; @REG_RDAT
	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_REG_PC_RRT,4,2                 ; @REG_PC_RRT
	.no_dead_strip	_btsdio_rx_packet
.subsections_via_symbols
