	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cyapa_pip_state_parse          ## -- Begin function cyapa_pip_state_parse
	.p2align	4, 0x90
_cyapa_pip_state_parse:                 ## @cyapa_pip_state_parse
	.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	$40, %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	%rsp, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$1, -72(%rbp)
	movq	_PIP_HID_DESCRIPTOR_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	_CYAPA_STATE_NO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	_PIP_DEEP_SLEEP_STATE_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_cyapa_pip_deep_sleep
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_cyapa_empty_pip_output_data
	movl	(%r15), %eax
	movl	%eax, -56(%rbp)
	movq	_cyapa_sort_pip_hid_descriptor_data@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	-72(%rbp), %rsi
	leaq	-56(%rbp), %r8
	movq	%r14, %rdi
	movl	$8, %edx
	movq	%rbx, %rcx
	movl	$300, %r9d                      ## imm = 0x12C
	pushq	$0
	pushq	%rax
	callq	_cyapa_i2c_pip_cmd_irq_sync
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_17
## %bb.1:
	movq	_PIP_RESP_REPORT_ID_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %r13d
	movq	_PIP_HID_BL_REPORT_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$1, %ebx
	cmpl	%ecx, %r13d
	je	LBB0_4
## %bb.2:
	movq	_PIP_HID_APP_REPORT_ID@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	(%rax), %r13d
	jne	LBB0_3
LBB0_4:
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	leaq	-64(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_cyapa_get_pip_fixed_info
	testl	%eax, %eax
	jne	LBB0_17
## %bb.5:
	movl	-64(%rbp), %edx
	movl	-60(%rbp), %ecx
	cmpl	$155, %edx
	jne	LBB0_11
## %bb.6:
	cmpl	$11, %ecx
	jne	LBB0_11
## %bb.7:
	movq	_CYAPA_GEN6@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	cmpl	-52(%rbp), %r13d                ## 4-byte Folded Reload
	jne	LBB0_8
## %bb.9:
	movq	_CYAPA_STATE_GEN6_BL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_3:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_17
LBB0_11:
	xorl	%eax, %eax
	cmpl	$145, %edx
	jne	LBB0_17
## %bb.12:
	cmpl	$2, %ecx
	jne	LBB0_17
## %bb.13:
	movq	_CYAPA_GEN5@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%r14)
	cmpl	-52(%rbp), %r13d                ## 4-byte Folded Reload
	jne	LBB0_14
## %bb.15:
	movq	_CYAPA_STATE_GEN5_BL@GOTPCREL(%rip), %rcx
	jmp	LBB0_16
LBB0_8:
	movq	_CYAPA_STATE_GEN6_APP@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_14:
	movq	_CYAPA_STATE_GEN5_APP@GOTPCREL(%rip), %rcx
LBB0_16:
	movl	(%rcx), %ecx
	movl	%ecx, (%r14)
LBB0_17:
	movq	%r12, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_19
## %bb.18:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PIP_HID_DESCRIPTOR_SIZE,4,2    ## @PIP_HID_DESCRIPTOR_SIZE
	.comm	_CYAPA_STATE_NO_DEVICE,4,2      ## @CYAPA_STATE_NO_DEVICE
	.comm	_PIP_DEEP_SLEEP_STATE_ON,4,2    ## @PIP_DEEP_SLEEP_STATE_ON
	.comm	_cyapa_sort_pip_hid_descriptor_data,4,2 ## @cyapa_sort_pip_hid_descriptor_data
	.comm	_PIP_RESP_REPORT_ID_OFFSET,8,3  ## @PIP_RESP_REPORT_ID_OFFSET
	.comm	_PIP_HID_BL_REPORT_ID,4,2       ## @PIP_HID_BL_REPORT_ID
	.comm	_PIP_HID_APP_REPORT_ID,4,2      ## @PIP_HID_APP_REPORT_ID
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_CYAPA_GEN6,4,2                 ## @CYAPA_GEN6
	.comm	_CYAPA_STATE_GEN6_BL,4,2        ## @CYAPA_STATE_GEN6_BL
	.comm	_CYAPA_STATE_GEN6_APP,4,2       ## @CYAPA_STATE_GEN6_APP
	.comm	_CYAPA_GEN5,4,2                 ## @CYAPA_GEN5
	.comm	_CYAPA_STATE_GEN5_BL,4,2        ## @CYAPA_STATE_GEN5_BL
	.comm	_CYAPA_STATE_GEN5_APP,4,2       ## @CYAPA_STATE_GEN5_APP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cyapa_pip_state_parse          ; -- Begin function cyapa_pip_state_parse
	.p2align	2
_cyapa_pip_state_parse:                 ; @cyapa_pip_state_parse
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #32
	mov	x19, x0
	mov	x21, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	mov	w8, #1
	stur	x8, [x29, #-64]
Lloh3:
	adrp	x22, _PIP_HID_DESCRIPTOR_SIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PIP_HID_DESCRIPTOR_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
Lloh7:
	adrp	x8, _CYAPA_STATE_NO_DEVICE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CYAPA_STATE_NO_DEVICE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x0]
Lloh10:
	adrp	x8, _PIP_DEEP_SLEEP_STATE_ON@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PIP_DEEP_SLEEP_STATE_ON@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_cyapa_pip_deep_sleep
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	bl	_cyapa_empty_pip_output_data
	ldr	w8, [x22]
	stur	w8, [x29, #-76]
Lloh13:
	adrp	x8, _cyapa_sort_pip_hid_descriptor_data@GOTPAGE
Lloh14:
	ldr	x8, [x8, _cyapa_sort_pip_hid_descriptor_data@GOTPAGEOFF]
Lloh15:
	ldr	w6, [x8]
	sub	x1, x29, #64
	sub	x4, x29, #76
	mov	x0, x19
	mov	w2, #8
	mov	x3, x20
	mov	w5, #300
	mov	w7, #0
	bl	_cyapa_i2c_pip_cmd_irq_sync
	cbnz	w0, LBB0_14
; %bb.1:
Lloh16:
	adrp	x8, _PIP_RESP_REPORT_ID_OFFSET@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PIP_RESP_REPORT_ID_OFFSET@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	ldr	w22, [x20, x8, lsl #2]
Lloh19:
	adrp	x8, _PIP_HID_BL_REPORT_ID@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PIP_HID_BL_REPORT_ID@GOTPAGEOFF]
Lloh21:
	ldr	w23, [x8]
	cmp	w22, w23
	b.ne	LBB0_3
; %bb.2:
	mov	w20, #1
	b	LBB0_5
LBB0_3:
Lloh22:
	adrp	x8, _PIP_HID_APP_REPORT_ID@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PIP_HID_APP_REPORT_ID@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_9
; %bb.4:
	mov	w20, #0
LBB0_5:
	sub	x0, x29, #72
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	sub	x1, x29, #72
	mov	x0, x19
	mov	x2, x20
	bl	_cyapa_get_pip_fixed_info
	cbnz	w0, LBB0_14
; %bb.6:
	ldp	w9, w8, [x29, #-72]
	cmp	w9, #155
	b.ne	LBB0_10
; %bb.7:
	cmp	w8, #11
	b.ne	LBB0_10
; %bb.8:
	mov	w0, #0
Lloh25:
	adrp	x8, _CYAPA_GEN6@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CYAPA_GEN6@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	str	w8, [x19, #4]
Lloh28:
	adrp	x8, _CYAPA_STATE_GEN6_BL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CYAPA_STATE_GEN6_BL@GOTPAGEOFF]
Lloh30:
	adrp	x9, _CYAPA_STATE_GEN6_APP@GOTPAGE
Lloh31:
	ldr	x9, [x9, _CYAPA_STATE_GEN6_APP@GOTPAGEOFF]
	b	LBB0_13
LBB0_9:
Lloh32:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_10:
	mov	w0, #0
	cmp	w9, #145
	b.ne	LBB0_14
; %bb.11:
	cmp	w8, #2
	b.ne	LBB0_14
; %bb.12:
	mov	w0, #0
Lloh35:
	adrp	x8, _CYAPA_GEN5@GOTPAGE
Lloh36:
	ldr	x8, [x8, _CYAPA_GEN5@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	str	w8, [x19, #4]
Lloh38:
	adrp	x8, _CYAPA_STATE_GEN5_BL@GOTPAGE
Lloh39:
	ldr	x8, [x8, _CYAPA_STATE_GEN5_BL@GOTPAGEOFF]
Lloh40:
	adrp	x9, _CYAPA_STATE_GEN5_APP@GOTPAGE
Lloh41:
	ldr	x9, [x9, _CYAPA_STATE_GEN5_APP@GOTPAGEOFF]
LBB0_13:
	cmp	w22, w23
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_14:
	mov	sp, x21
	ldur	x8, [x29, #-56]
Lloh42:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh43:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_PIP_HID_DESCRIPTOR_SIZE,4,2    ; @PIP_HID_DESCRIPTOR_SIZE
	.comm	_CYAPA_STATE_NO_DEVICE,4,2      ; @CYAPA_STATE_NO_DEVICE
	.comm	_PIP_DEEP_SLEEP_STATE_ON,4,2    ; @PIP_DEEP_SLEEP_STATE_ON
	.comm	_cyapa_sort_pip_hid_descriptor_data,4,2 ; @cyapa_sort_pip_hid_descriptor_data
	.comm	_PIP_RESP_REPORT_ID_OFFSET,8,3  ; @PIP_RESP_REPORT_ID_OFFSET
	.comm	_PIP_HID_BL_REPORT_ID,4,2       ; @PIP_HID_BL_REPORT_ID
	.comm	_PIP_HID_APP_REPORT_ID,4,2      ; @PIP_HID_APP_REPORT_ID
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_CYAPA_GEN6,4,2                 ; @CYAPA_GEN6
	.comm	_CYAPA_STATE_GEN6_BL,4,2        ; @CYAPA_STATE_GEN6_BL
	.comm	_CYAPA_STATE_GEN6_APP,4,2       ; @CYAPA_STATE_GEN6_APP
	.comm	_CYAPA_GEN5,4,2                 ; @CYAPA_GEN5
	.comm	_CYAPA_STATE_GEN5_BL,4,2        ; @CYAPA_STATE_GEN5_BL
	.comm	_CYAPA_STATE_GEN5_APP,4,2       ; @CYAPA_STATE_GEN5_APP
.subsections_via_symbols
