	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btuart_receive
_btuart_receive:                        ## @btuart_receive
	.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
	testq	%rdi, %rdi
	je	LBB0_25
## %bb.1:
	movq	%rdi, %rbx
	movq	32(%rdi), %rax
	movl	(%rax), %r13d
	movl	$18, %r15d
	movq	_RECV_WAIT_PACKET_TYPE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %rax
	incl	8(%rax)
	movq	16(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %eax
	movl	%eax, (%rbx)
	movq	$0, 8(%rbx)
	movq	_HCI_MAX_FRAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bt_skb_alloc
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_26
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %ecx
	cmpl	(%r14), %ecx
	jne	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%rbx), %rcx
	movq	%rcx, (%rax)
	movq	_UART_RX@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r13, %rdi
	callq	_inb
	movl	%eax, %r12d
	movq	16(%rbx), %rdi
	callq	_bt_cb
	movl	%r12d, (%rax)
	movq	16(%rbx), %rdi
	callq	_bt_cb
	movl	(%rax), %eax
	cmpl	$132, %eax
	je	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$134, %eax
	je	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$133, %eax
	jne	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$129, (%rbx)
	movq	_HCI_EVENT_HDR_SIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_UART_RX@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r13, %rdi
	callq	_inb
	movl	%eax, %r12d
	movq	16(%rbx), %rdi
	movl	$1, %esi
	callq	_skb_put
	movl	%r12d, (%rax)
	decq	8(%rbx)
	jne	LBB0_21
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_21
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rdi
	callq	_hci_sco_hdr
	movl	$130, (%rbx)
	movslq	(%rax), %rax
	jmp	LBB0_18
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$128, (%rbx)
	movq	_HCI_SCO_HDR_SIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$131, (%rbx)
	movq	_HCI_ACL_HDR_SIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rdi
	callq	_bt_cb
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_BT_ERR
	movq	24(%rbx), %rsi
	incl	4(%rsi)
	movq	_HCI_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_clear_bit
	movq	16(%rbx), %rdi
	callq	_kfree_skb
	jmp	LBB0_20
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rdi
	callq	_hci_event_hdr
	movl	$130, (%rbx)
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rax), %rax
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, 8(%rbx)
	decl	%r15d
	jne	LBB0_22
	jmp	LBB0_24
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rdi
	callq	_hci_recv_frame
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, 16(%rbx)
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	decl	%r15d
	je	LBB0_24
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_UART_LSR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r13, %rdi
	callq	_inb
	movq	_UART_LSR_DR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_2
	jmp	LBB0_24
LBB0_23:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rdi
	callq	_hci_acl_hdr
	movl	(%rax), %edi
	callq	___le16_to_cpu
	movl	$130, (%rbx)
	cltq
	jmp	LBB0_18
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_27
LBB0_26:
	leaq	L_.str.1(%rip), %rdi
LBB0_27:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_BT_ERR                         ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_16
	.long	L0_0_set_19
	.long	L0_0_set_23
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown device"

	.comm	_RECV_WAIT_PACKET_TYPE,4,2      ## @RECV_WAIT_PACKET_TYPE
	.comm	_HCI_MAX_FRAME_SIZE,4,2         ## @HCI_MAX_FRAME_SIZE
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
L_.str.1:                               ## @.str.1
	.asciz	"Can't allocate mem for new packet"

	.comm	_UART_RX,8,3                    ## @UART_RX
	.comm	_HCI_EVENT_HDR_SIZE,8,3         ## @HCI_EVENT_HDR_SIZE
	.comm	_HCI_ACL_HDR_SIZE,8,3           ## @HCI_ACL_HDR_SIZE
	.comm	_HCI_SCO_HDR_SIZE,8,3           ## @HCI_SCO_HDR_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"Unknown HCI packet with type 0x%02x received"

	.comm	_HCI_RUNNING,4,2                ## @HCI_RUNNING
	.comm	_UART_LSR,8,3                   ## @UART_LSR
	.comm	_UART_LSR_DR,4,2                ## @UART_LSR_DR
	.no_dead_strip	_btuart_receive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btuart_receive
_btuart_receive:                        ; @btuart_receive
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	cbz	x0, LBB0_25
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #32]
Lloh0:
	adrp	x23, _RECV_WAIT_PACKET_TYPE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _RECV_WAIT_PACKET_TYPE@GOTPAGEOFF]
Lloh2:
	adrp	x24, _HCI_MAX_FRAME_SIZE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _HCI_MAX_FRAME_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x25, _GFP_ATOMIC@GOTPAGE
Lloh5:
	ldr	x25, [x25, _GFP_ATOMIC@GOTPAGEOFF]
	mov	w26, #18
Lloh6:
	adrp	x27, _UART_RX@GOTPAGE
Lloh7:
	ldr	x27, [x27, _UART_RX@GOTPAGEOFF]
Lloh8:
	adrp	x28, _UART_LSR@GOTPAGE
Lloh9:
	ldr	x28, [x28, _UART_LSR@GOTPAGEOFF]
	ldr	w21, [x8]
Lloh10:
	adrp	x20, _UART_LSR_DR@GOTPAGE
Lloh11:
	ldr	x20, [x20, _UART_LSR_DR@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x0, x8, [x19, #16]
	ldr	w9, [x8, #8]
	add	w9, w9, #1
	str	w9, [x8, #8]
	cbnz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x23]
	str	w8, [x19]
	str	xzr, [x19, #8]
	ldr	w0, [x24]
	ldr	w1, [x25]
	bl	_bt_skb_alloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_26
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x19]
	ldr	w9, [x23]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #24]
	str	x8, [x0]
	ldr	x8, [x27]
	add	x0, x8, x21
	bl	_inb
	mov	x22, x0
	ldr	x0, [x19, #16]
	bl	_bt_cb
	str	w22, [x0]
	ldr	x0, [x19, #16]
	bl	_bt_cb
	ldr	w8, [x0]
	cmp	w8, #132
	b.eq	LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w8, #134
	b.eq	LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w8, #133
	b.ne	LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w8, #129
	str	w8, [x19]
Lloh12:
	adrp	x8, _HCI_EVENT_HDR_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HCI_EVENT_HDR_SIZE@GOTPAGEOFF]
	b	LBB0_15
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x27]
	add	x0, x8, x21
	bl	_inb
	mov	x22, x0
	ldr	x0, [x19, #16]
	mov	w1, #1
	bl	_skb_put
	str	w22, [x0]
	ldr	x8, [x19, #8]
	subs	x8, x8, #1
	str	x8, [x19, #8]
	b.ne	LBB0_21
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_21
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
Lloh14:
	adrp	x11, lJTI0_0@PAGE
Lloh15:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x9, LBB0_12
	ldrb	w10, [x11, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, #16]
	bl	_hci_sco_hdr
	mov	w8, #130
	str	w8, [x19]
	ldrsw	x8, [x0]
	b	LBB0_16
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w8, #128
	str	w8, [x19]
Lloh16:
	adrp	x8, _HCI_SCO_HDR_SIZE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HCI_SCO_HDR_SIZE@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w8, #131
	str	w8, [x19]
Lloh18:
	adrp	x8, _HCI_ACL_HDR_SIZE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HCI_ACL_HDR_SIZE@GOTPAGEOFF]
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x8]
LBB0_16:                                ;   in Loop: Header=BB0_2 Depth=1
	str	x8, [x19, #8]
	subs	w26, w26, #1
	b.ne	LBB0_22
	b	LBB0_24
LBB0_17:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, #16]
	bl	_bt_cb
	ldr	w8, [x0]
	str	x8, [sp]
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_BT_ERR
	ldr	x1, [x19, #24]
	ldr	w8, [x1, #4]
	add	w8, w8, #1
	str	w8, [x1, #4]
Lloh22:
	adrp	x8, _HCI_RUNNING@GOTPAGE
Lloh23:
	ldr	x8, [x8, _HCI_RUNNING@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_clear_bit
	ldr	x0, [x19, #16]
	bl	_kfree_skb
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, #16]
	bl	_hci_event_hdr
	mov	w8, #130
	str	w8, [x19]
	ldr	x8, [x0]
	b	LBB0_16
LBB0_19:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, #16]
	bl	_hci_recv_frame
LBB0_20:                                ;   in Loop: Header=BB0_2 Depth=1
	str	xzr, [x19, #16]
LBB0_21:                                ;   in Loop: Header=BB0_2 Depth=1
	subs	w26, w26, #1
	b.eq	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x28]
	add	x0, x8, x21
	bl	_inb
	ldr	w8, [x20]
	tst	w8, w0
	b.ne	LBB0_2
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, #16]
	bl	_hci_acl_hdr
	ldr	w0, [x0]
	bl	___le16_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	mov	w8, #130
	str	w8, [x19]
	sxtw	x8, w0
	b	LBB0_16
LBB0_24:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_25:
Lloh25:
	adrp	x0, l_.str@PAGE
Lloh26:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_27
LBB0_26:
Lloh27:
	adrp	x0, l_.str.1@PAGE
Lloh28:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_27:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_BT_ERR
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_12-LBB0_12)>>2
	.byte	(LBB0_18-LBB0_12)>>2
	.byte	(LBB0_19-LBB0_12)>>2
	.byte	(LBB0_23-LBB0_12)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown device"

	.comm	_RECV_WAIT_PACKET_TYPE,4,2      ; @RECV_WAIT_PACKET_TYPE
	.comm	_HCI_MAX_FRAME_SIZE,4,2         ; @HCI_MAX_FRAME_SIZE
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
l_.str.1:                               ; @.str.1
	.asciz	"Can't allocate mem for new packet"

	.comm	_UART_RX,8,3                    ; @UART_RX
	.comm	_HCI_EVENT_HDR_SIZE,8,3         ; @HCI_EVENT_HDR_SIZE
	.comm	_HCI_ACL_HDR_SIZE,8,3           ; @HCI_ACL_HDR_SIZE
	.comm	_HCI_SCO_HDR_SIZE,8,3           ; @HCI_SCO_HDR_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"Unknown HCI packet with type 0x%02x received"

	.comm	_HCI_RUNNING,4,2                ; @HCI_RUNNING
	.comm	_UART_LSR,8,3                   ; @UART_LSR
	.comm	_UART_LSR_DR,4,2                ; @UART_LSR_DR
	.no_dead_strip	_btuart_receive
.subsections_via_symbols
