	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen5_idle_state_parse
_gen5_idle_state_parse:                 ## @gen5_idle_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	$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	_PIP_HID_DESCRIPTOR_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movq	%rbx, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	xorl	%r13d, %r13d
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_cyapa_empty_pip_output_data
	leal	(,%rbx,4), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$3, %edx
	callq	_cyapa_i2c_pip_read
	cmpl	$3, %eax
	jne	LBB0_1
## %bb.2:
	movq	_PIP_RESP_LENGTH_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%r15,%rax,4), %rdi
	callq	_get_unaligned_le16
	movq	_PIP_RESP_LENGTH_SIZE@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	jne	LBB0_14
## %bb.3:
	movq	_CYAPA_GEN5@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_cyapa_empty_pip_output_data
	movq	$1, -56(%rbp)
	movl	(%r12), %eax
	movl	%eax, -60(%rbp)
	movl	(%rbx), %edx
	movq	_cyapa_sort_gen5_hid_descriptor_data@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	-56(%rbp), %rsi
	leaq	-60(%rbp), %r8
	movq	%r14, %rdi
	movq	%r15, %rcx
	movl	$300, %r9d                      ## imm = 0x12C
	pushq	$0
	pushq	%rax
	callq	_cyapa_i2c_pip_cmd_irq_sync
	addq	$16, %rsp
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.4:
	movq	_PIP_RESP_LENGTH_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%r15,%rax,4), %rdi
	callq	_get_unaligned_le16
	movl	%eax, -60(%rbp)
	movq	%r15, %rdi
	addq	$64, %rdi
	callq	_get_unaligned_le16
	movl	-60(%rbp), %ecx
	cmpl	(%r12), %ecx
	je	LBB0_6
## %bb.5:
	cmpl	(%rbx), %ecx
	je	LBB0_6
LBB0_12:
	movq	_CYAPA_STATE_NO_DEVICE@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rcx
	subl	(%rcx), %r13d
	testl	%eax, %eax
	cmovsl	%eax, %r13d
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%r13d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_PIP_RESP_REPORT_ID_OFFSET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%r15,%rcx,4), %ecx
	movq	_PIP_HID_BL_REPORT_ID@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_9
## %bb.7:
	movq	_GEN5_BL_MAX_OUTPUT_LENGTH@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	jne	LBB0_9
## %bb.8:
	movq	_CYAPA_STATE_GEN5_BL@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_9:
	movq	_PIP_HID_APP_REPORT_ID@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_12
## %bb.10:
	movq	_GEN5_APP_MAX_OUTPUT_LENGTH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_12
## %bb.11:
	movq	_CYAPA_STATE_GEN5_APP@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%r13d, %r13d
	jmp	LBB0_14
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PIP_HID_DESCRIPTOR_SIZE,4,2    ## @PIP_HID_DESCRIPTOR_SIZE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_PIP_RESP_LENGTH_OFFSET,8,3     ## @PIP_RESP_LENGTH_OFFSET
	.comm	_PIP_RESP_LENGTH_SIZE,4,2       ## @PIP_RESP_LENGTH_SIZE
	.comm	_CYAPA_GEN5,4,2                 ## @CYAPA_GEN5
	.comm	_cyapa_sort_gen5_hid_descriptor_data,4,2 ## @cyapa_sort_gen5_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	_GEN5_BL_MAX_OUTPUT_LENGTH,4,2  ## @GEN5_BL_MAX_OUTPUT_LENGTH
	.comm	_CYAPA_STATE_GEN5_BL,4,2        ## @CYAPA_STATE_GEN5_BL
	.comm	_PIP_HID_APP_REPORT_ID,4,2      ## @PIP_HID_APP_REPORT_ID
	.comm	_GEN5_APP_MAX_OUTPUT_LENGTH,4,2 ## @GEN5_APP_MAX_OUTPUT_LENGTH
	.comm	_CYAPA_STATE_GEN5_APP,4,2       ## @CYAPA_STATE_GEN5_APP
	.comm	_CYAPA_STATE_NO_DEVICE,4,2      ## @CYAPA_STATE_NO_DEVICE
	.no_dead_strip	_gen5_idle_state_parse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function gen5_idle_state_parse
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_gen5_idle_state_parse:                 ; @gen5_idle_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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x21, _PIP_HID_DESCRIPTOR_SIZE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _PIP_HID_DESCRIPTOR_SIZE@GOTPAGEOFF]
	ldr	w22, [x21]
	lsl	x8, x22, #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
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	bl	_cyapa_empty_pip_output_data
	lsl	w2, w22, #2
	mov	x0, x20
	mov	w1, #0
	bl	_memset
	mov	x0, x19
	mov	x1, x20
	mov	w2, #3
	bl	_cyapa_i2c_pip_read
	cmp	w0, #3
	b.ne	LBB0_8
; %bb.1:
Lloh7:
	adrp	x23, _PIP_RESP_LENGTH_OFFSET@GOTPAGE
Lloh8:
	ldr	x23, [x23, _PIP_RESP_LENGTH_OFFSET@GOTPAGEOFF]
	ldr	x8, [x23]
	add	x0, x20, x8, lsl #2
	bl	_get_unaligned_le16
Lloh9:
	adrp	x22, _PIP_RESP_LENGTH_SIZE@GOTPAGE
Lloh10:
	ldr	x22, [x22, _PIP_RESP_LENGTH_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.2:
Lloh11:
	adrp	x8, _CYAPA_GEN5@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CYAPA_GEN5@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	bl	_cyapa_empty_pip_output_data
Lloh14:
	adrp	x8, lCPI0_0@PAGE
Lloh15:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x29, #-72]
	ldr	w8, [x21]
	stur	w8, [x29, #-60]
	ldr	w2, [x22]
Lloh16:
	adrp	x8, _cyapa_sort_gen5_hid_descriptor_data@GOTPAGE
Lloh17:
	ldr	x8, [x8, _cyapa_sort_gen5_hid_descriptor_data@GOTPAGEOFF]
Lloh18:
	ldr	w6, [x8]
	sub	x1, x29, #72
	sub	x4, x29, #60
	mov	x0, x19
	mov	x3, x20
	mov	w5, #300
	mov	w7, #0
	bl	_cyapa_i2c_pip_cmd_irq_sync
	cbnz	w0, LBB0_13
; %bb.3:
	ldr	x8, [x23]
	add	x0, x20, x8, lsl #2
	bl	_get_unaligned_le16
	stur	w0, [x29, #-60]
	add	x0, x20, #64
	bl	_get_unaligned_le16
	ldur	w8, [x29, #-60]
	ldr	w9, [x21]
	cmp	w8, w9
	b.eq	LBB0_5
; %bb.4:
	ldr	w9, [x22]
	cmp	w8, w9
	b.ne	LBB0_7
LBB0_5:
Lloh19:
	adrp	x8, _PIP_RESP_REPORT_ID_OFFSET@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PIP_RESP_REPORT_ID_OFFSET@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	ldr	w8, [x20, x8, lsl #2]
Lloh22:
	adrp	x9, _PIP_HID_BL_REPORT_ID@GOTPAGE
Lloh23:
	ldr	x9, [x9, _PIP_HID_BL_REPORT_ID@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
Lloh25:
	adrp	x10, _GEN5_BL_MAX_OUTPUT_LENGTH@GOTPAGE
Lloh26:
	ldr	x10, [x10, _GEN5_BL_MAX_OUTPUT_LENGTH@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w0, w10, #0, eq
	b.eq	LBB0_10
; %bb.6:
Lloh28:
	adrp	x9, _PIP_HID_APP_REPORT_ID@GOTPAGE
Lloh29:
	ldr	x9, [x9, _PIP_HID_APP_REPORT_ID@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
Lloh31:
	adrp	x10, _GEN5_APP_MAX_OUTPUT_LENGTH@GOTPAGE
Lloh32:
	ldr	x10, [x10, _GEN5_APP_MAX_OUTPUT_LENGTH@GOTPAGEOFF]
Lloh33:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w0, w10, #0, eq
	b.eq	LBB0_11
LBB0_7:
	mov	w0, #0
Lloh34:
	adrp	x8, _CYAPA_STATE_NO_DEVICE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _CYAPA_STATE_NO_DEVICE@GOTPAGEOFF]
	b	LBB0_12
LBB0_8:
Lloh36:
	adrp	x8, _EIO@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, w0, w8, lt
	b	LBB0_13
LBB0_9:
	mov	w0, #0
	b	LBB0_13
LBB0_10:
	mov	w0, #0
Lloh39:
	adrp	x8, _CYAPA_STATE_GEN5_BL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _CYAPA_STATE_GEN5_BL@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
	mov	w0, #0
Lloh41:
	adrp	x8, _CYAPA_STATE_GEN5_APP@GOTPAGE
Lloh42:
	ldr	x8, [x8, _CYAPA_STATE_GEN5_APP@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_13:
	ldur	x8, [x29, #-56]
Lloh43:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh44:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	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_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdr	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_PIP_HID_DESCRIPTOR_SIZE,4,2    ; @PIP_HID_DESCRIPTOR_SIZE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_PIP_RESP_LENGTH_OFFSET,8,3     ; @PIP_RESP_LENGTH_OFFSET
	.comm	_PIP_RESP_LENGTH_SIZE,4,2       ; @PIP_RESP_LENGTH_SIZE
	.comm	_CYAPA_GEN5,4,2                 ; @CYAPA_GEN5
	.comm	_cyapa_sort_gen5_hid_descriptor_data,4,2 ; @cyapa_sort_gen5_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	_GEN5_BL_MAX_OUTPUT_LENGTH,4,2  ; @GEN5_BL_MAX_OUTPUT_LENGTH
	.comm	_CYAPA_STATE_GEN5_BL,4,2        ; @CYAPA_STATE_GEN5_BL
	.comm	_PIP_HID_APP_REPORT_ID,4,2      ; @PIP_HID_APP_REPORT_ID
	.comm	_GEN5_APP_MAX_OUTPUT_LENGTH,4,2 ; @GEN5_APP_MAX_OUTPUT_LENGTH
	.comm	_CYAPA_STATE_GEN5_APP,4,2       ; @CYAPA_STATE_GEN5_APP
	.comm	_CYAPA_STATE_NO_DEVICE,4,2      ; @CYAPA_STATE_NO_DEVICE
	.no_dead_strip	_gen5_idle_state_parse
.subsections_via_symbols
