	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bte_process_input
_bte_process_input:                     ## @bte_process_input
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_LOG
	movq	(%r14), %rax
	movq	_STATE_DISCONNECTING@GOTPCREL(%rip), %rcx
	movq	_ERR_CLSD@GOTPCREL(%rip), %r15
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.1:
	movq	_STATE_DISCONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.2:
	movq	(%rbx), %rdx
	movl	8(%rbx), %ecx
	decl	%ecx
	movl	(%rdx), %esi
	addq	$4, %rdx
	movq	_HIDP_HDR_TRANS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%esi, %eax
	movq	_HIDP_HDR_PARAM_MASK@GOTPCREL(%rip), %rdi
	andl	(%rdi), %esi
	movq	_ERR_OK@GOTPCREL(%rip), %r15
	cmpl	$130, %eax
	je	LBB0_5
## %bb.3:
	cmpl	$129, %eax
	jne	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	callq	_bte_process_handshake
	jmp	LBB0_6
LBB0_5:
	movq	%r14, %rdi
	callq	_bte_process_data
LBB0_6:
	movl	(%r15), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bte_process_input(%p,%p)\n"

	.comm	_STATE_DISCONNECTING,8,3        ## @STATE_DISCONNECTING
	.comm	_STATE_DISCONNECTED,8,3         ## @STATE_DISCONNECTED
	.comm	_ERR_CLSD,4,2                   ## @ERR_CLSD
	.comm	_HIDP_HDR_TRANS_MASK,4,2        ## @HIDP_HDR_TRANS_MASK
	.comm	_HIDP_HDR_PARAM_MASK,4,2        ## @HIDP_HDR_PARAM_MASK
	.comm	_ERR_OK,4,2                     ## @ERR_OK
	.no_dead_strip	_bte_process_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bte_process_input
_bte_process_input:                     ; @bte_process_input
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_LOG
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _STATE_DISCONNECTING@GOTPAGE
Lloh3:
	ldr	x9, [x9, _STATE_DISCONNECTING@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x10, _STATE_DISCONNECTED@GOTPAGE
Lloh6:
	ldr	x10, [x10, _STATE_DISCONNECTED@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _ERR_CLSD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERR_CLSD@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
	ldr	x2, [x20]
	ldr	w8, [x20, #8]
	sub	w3, w8, #1
	ldr	w9, [x2], #4
Lloh10:
	adrp	x8, _HIDP_HDR_TRANS_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HIDP_HDR_TRANS_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	and	w8, w8, w9
Lloh13:
	adrp	x10, _HIDP_HDR_PARAM_MASK@GOTPAGE
Lloh14:
	ldr	x10, [x10, _HIDP_HDR_PARAM_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	and	w1, w10, w9
	cmp	w8, #130
	b.eq	LBB0_5
; %bb.3:
	cmp	w8, #129
	b.ne	LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_bte_process_handshake
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_bte_process_data
LBB0_6:
Lloh16:
	adrp	x8, _ERR_OK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ERR_OK@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bte_process_input(%p,%p)\n"

	.comm	_STATE_DISCONNECTING,8,3        ; @STATE_DISCONNECTING
	.comm	_STATE_DISCONNECTED,8,3         ; @STATE_DISCONNECTED
	.comm	_ERR_CLSD,4,2                   ; @ERR_CLSD
	.comm	_HIDP_HDR_TRANS_MASK,4,2        ; @HIDP_HDR_TRANS_MASK
	.comm	_HIDP_HDR_PARAM_MASK,4,2        ; @HIDP_HDR_PARAM_MASK
	.comm	_ERR_OK,4,2                     ; @ERR_OK
	.no_dead_strip	_bte_process_input
.subsections_via_symbols
