	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cyapa_gen5_read_idac_data
_cyapa_gen5_read_idac_data:             ## @cyapa_gen5_read_idac_data
	.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	$2264, %rsp                     ## imm = 0x8D8
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -2256(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PIP_RETRIEVE_DATA_STRUCTURE@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_47
## %bb.1:
	movq	%r8, %rbx
	movq	%rcx, %r12
	movq	%rdi, %r15
	movq	_GEN5_RETRIEVE_MUTUAL_PWC_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rdx, %rax
	jne	LBB0_3
## %bb.2:
	testq	%r12, %r12
	jne	LBB0_5
	jmp	LBB0_47
LBB0_3:
	testq	%r12, %r12
	je	LBB0_47
## %bb.4:
	movq	_GEN5_RETRIEVE_SELF_CAP_PWC_DATA@GOTPCREL(%rip), %rcx
	cmpq	%rdx, (%rcx)
	jne	LBB0_47
LBB0_5:
	testq	%rbx, %rbx
	je	LBB0_47
## %bb.6:
	cmpq	$0, -2256(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_47
## %bb.7:
	cmpq	$0, 16(%rbp)
	je	LBB0_47
## %bb.8:
	movq	%rsi, -2304(%rbp)               ## 8-byte Spill
	movq	_INT_MIN@GOTPCREL(%rip), %r8
	movl	(%r8), %esi
	movl	%esi, (%rbx)
	movq	_INT_MAX@GOTPCREL(%rip), %rdi
	movl	(%rdi), %esi
	movq	-2256(%rbp), %rcx               ## 8-byte Reload
	movl	%esi, (%rcx)
	movl	$0, -2236(%rbp)
	movl	$0, -2220(%rbp)
	movl	(%r12), %r14d
	testl	%r14d, %r14d
	movq	%rdx, -2288(%rbp)               ## 8-byte Spill
	movq	%rbx, -2280(%rbp)               ## 8-byte Spill
	movq	%r15, -2248(%rbp)               ## 8-byte Spill
	movl	%r14d, -2232(%rbp)              ## 4-byte Spill
	je	LBB0_15
## %bb.9:
	movl	%r14d, %ecx
	cmpl	$5, %r14d
	jl	LBB0_11
## %bb.10:
	movl	$4, (%r12)
	movl	$4, %ecx
LBB0_11:
	cmpq	%rdx, %rax
	jne	LBB0_19
## %bb.12:
	movl	(%r15), %r13d
	movl	8(%r15), %eax
	cmpl	%eax, 4(%r15)
	jne	LBB0_14
## %bb.13:
	movl	12(%r15), %eax
LBB0_14:
	imull	%r13d, %ecx
	movl	%ecx, -2204(%rbp)               ## 4-byte Spill
	movl	%eax, -2236(%rbp)
	addl	$7, %r13d
	andl	$-8, %r13d
	imull	%eax, %r13d
	jmp	LBB0_20
LBB0_15:
	movl	$0, -2204(%rbp)                 ## 4-byte Folded Spill
	movl	$4, (%r12)
	movl	(%r8), %ecx
	movl	%ecx, -2200(%rbp)               ## 4-byte Spill
	movl	(%rdi), %ecx
	movl	%ecx, -2196(%rbp)               ## 4-byte Spill
	movl	$2, %r13d
	cmpq	%rdx, %rax
	jne	LBB0_21
## %bb.16:
	movl	(%r15), %r13d
	testl	%r13d, %r13d
	jne	LBB0_18
## %bb.17:
	leaq	-2220(%rbp), %rsi
	leaq	-2236(%rbp), %rdx
	movq	%r15, %rdi
	callq	_cyapa_gen5_guess_electrodes
	movl	-2220(%rbp), %r13d
	addl	$3, %r13d
	andl	$-4, %r13d
	movl	%r13d, (%r15)
LBB0_18:
	addl	$7, %r13d
	andl	$-8, %r13d
	jmp	LBB0_21
LBB0_19:
	movl	8(%r15), %eax
	movl	12(%r15), %ecx
	leal	(%rax,%rcx), %r13d
	addl	$3, %r13d
	andl	$-4, %r13d
	movl	$2, -2204(%rbp)                 ## 4-byte Folded Spill
LBB0_20:
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
LBB0_21:
	leaq	-144(%rbp), %rdi
	movl	$0, -2212(%rbp)                 ## 4-byte Folded Spill
	xorl	%esi, %esi
	movl	$96, %edx
	callq	_memset
	movq	_PIP_OUTPUT_REPORT_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-112(%rbp), %rsi
	callq	_put_unaligned_le16
	leaq	-120(%rbp), %rsi
	movl	$94, %edi
	callq	_put_unaligned_le16
	movq	_PIP_APP_CMD_REPORT_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -128(%rbp)
	movq	-2304(%rbp), %rax               ## 8-byte Reload
	movq	%rax, -136(%rbp)
	movq	_GEN5_RESP_DATA_STRUCTURE_OFFSET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r12, -2296(%rbp)               ## 8-byte Spill
	movl	(%r12), %ecx
	xorl	%eax, %eax
	movl	$0, -2224(%rbp)                 ## 4-byte Folded Spill
	movl	$0, -2260(%rbp)                 ## 4-byte Folded Spill
	movl	$0, -2208(%rbp)                 ## 4-byte Folded Spill
	movl	%r13d, -2228(%rbp)              ## 4-byte Spill
LBB0_22:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_24 Depth 2
                                        ##     Child Loop BB0_34 Depth 2
	movq	%rax, -2272(%rbp)               ## 8-byte Spill
	subl	%eax, %r13d
	movl	%r13d, -2216(%rbp)              ## 4-byte Spill
	movl	-2204(%rbp), %r13d              ## 4-byte Reload
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_24 Depth=2
	movl	%r15d, %r13d
	addl	%r12d, %r13d
	movl	(%rbx), %edx
	leal	(%rdx,%r12), %eax
	cmpl	$11, %eax
	jge	LBB0_33
LBB0_24:                                ##   Parent Loop BB0_22 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	$256, %eax                      ## imm = 0x100
	subl	%edx, %eax
	cltd
	idivl	%ecx
	movl	%eax, %edi
	movl	-2216(%rbp), %esi               ## 4-byte Reload
	callq	_min
	movq	%rbx, %r14
	movl	%eax, %ebx
	movq	-2296(%rbp), %rax               ## 8-byte Reload
	imull	(%rax), %ebx
	movq	-144(%rbp), %rsi
	movl	%r13d, %r15d
	movl	%r13d, %edi
	callq	_put_unaligned_le16
	movq	-144(%rbp), %rsi
	addq	$16, %rsi
	movl	%ebx, %edi
	callq	_put_unaligned_le16
	movq	-144(%rbp), %rax
	movq	-2288(%rbp), %r12               ## 8-byte Reload
	movq	%r12, 32(%rax)
	addl	(%r14), %ebx
	movl	%ebx, -2264(%rbp)
	movq	_cyapa_sort_tsg_pip_app_resp_data@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-2248(%rbp), %r13               ## 8-byte Reload
	movq	%r13, %rdi
	leaq	-144(%rbp), %rsi
	movl	$96, %edx
	leaq	-2192(%rbp), %rcx
	leaq	-2264(%rbp), %r8
	movl	$500, %r9d                      ## imm = 0x1F4
	pushq	$1
	pushq	%rax
	callq	_cyapa_i2c_pip_cmd_irq_sync
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_52
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=2
	movl	-2264(%rbp), %eax
	cmpl	(%r14), %eax
	jl	LBB0_51
## %bb.26:                              ##   in Loop: Header=BB0_24 Depth=2
	movq	%r14, %rbx
	leaq	-2192(%rbp), %rdi
	movq	-2304(%rbp), %rsi               ## 8-byte Reload
	callq	_VALID_CMD_RESP_HEADER
	testl	%eax, %eax
	je	LBB0_51
## %bb.27:                              ##   in Loop: Header=BB0_24 Depth=2
	leaq	-2192(%rbp), %rdi
	callq	_PIP_CMD_COMPLETE_SUCCESS
	testl	%eax, %eax
	je	LBB0_51
## %bb.28:                              ##   in Loop: Header=BB0_24 Depth=2
	cmpq	%r12, -2144(%rbp)
	jne	LBB0_51
## %bb.29:                              ##   in Loop: Header=BB0_24 Depth=2
	leaq	-2136(%rbp), %rdi
	callq	_get_unaligned_le16
	testl	%eax, %eax
	je	LBB0_53
## %bb.30:                              ##   in Loop: Header=BB0_24 Depth=2
	movl	%eax, %r12d
	movq	-2120(%rbp), %rdi
	movq	_GEN5_PWC_DATA_ELEMENT_SIZE_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	andq	%rdi, %rcx
	movq	-2296(%rbp), %rax               ## 8-byte Reload
	movl	%ecx, (%rax)
	cmpl	%ecx, %r12d
	jl	LBB0_47
## %bb.31:                              ##   in Loop: Header=BB0_24 Depth=2
	cmpl	$0, -2232(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_23
## %bb.32:                              ##   in Loop: Header=BB0_24 Depth=2
	movq	-2288(%rbp), %rax               ## 8-byte Reload
	movq	_GEN5_RETRIEVE_SELF_CAP_PWC_DATA@GOTPCREL(%rip), %rdx
	cmpq	%rax, (%rdx)
	jne	LBB0_23
	jmp	LBB0_54
LBB0_33:                                ##   in Loop: Header=BB0_22 Depth=1
	movl	%r13d, -2204(%rbp)              ## 4-byte Spill
	movq	-2272(%rbp), %rax               ## 8-byte Reload
	incl	%eax
	movl	%eax, -2216(%rbp)               ## 4-byte Spill
	movl	$10, %r14d
	.p2align	4, 0x90
LBB0_34:                                ##   Parent Loop BB0_22 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	%r14d, %rax
	leaq	-2192(,%rax,8), %rsi
	addq	%rbp, %rsi
	movl	%ecx, %edx
	callq	_cyapa_parse_structure_data
	movl	%eax, %r15d
	movq	-2256(%rbp), %rbx               ## 8-byte Reload
	movl	(%rbx), %esi
	movl	%eax, %edi
	callq	_min
	movl	%eax, (%rbx)
	movq	-2280(%rbp), %r13               ## 8-byte Reload
	movl	(%r13), %esi
	movl	%r15d, %edi
	callq	_max
	movl	%eax, (%r13)
	movq	-2288(%rbp), %rax               ## 8-byte Reload
	movq	_GEN5_RETRIEVE_MUTUAL_PWC_DATA@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_40
## %bb.35:                              ##   in Loop: Header=BB0_34 Depth=2
	movq	-2248(%rbp), %rax               ## 8-byte Reload
	movl	-2208(%rbp), %ecx               ## 4-byte Reload
	cmpl	(%rax), %ecx
	movq	_GEN5_RESP_DATA_STRUCTURE_OFFSET@GOTPCREL(%rip), %rbx
	jge	LBB0_42
## %bb.36:                              ##   in Loop: Header=BB0_34 Depth=2
	cmpl	$0, -2232(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_42
## %bb.37:                              ##   in Loop: Header=BB0_34 Depth=2
	movl	-2224(%rbp), %ecx               ## 4-byte Reload
	testl	%ecx, %ecx
	movq	-2248(%rbp), %r13               ## 8-byte Reload
	je	LBB0_39
## %bb.38:                              ##   in Loop: Header=BB0_34 Depth=2
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	cmpl	%eax, %r15d
	jle	LBB0_43
LBB0_39:                                ##   in Loop: Header=BB0_34 Depth=2
	movl	%r15d, %edi
	movl	-2196(%rbp), %esi               ## 4-byte Reload
	callq	_min
	movl	%eax, -2196(%rbp)               ## 4-byte Spill
	movl	%r15d, %edi
	movl	-2200(%rbp), %esi               ## 4-byte Reload
	callq	_max
	movl	%eax, -2200(%rbp)               ## 4-byte Spill
	movl	-2260(%rbp), %eax               ## 4-byte Reload
	addl	%r15d, %eax
	movl	-2208(%rbp), %ecx               ## 4-byte Reload
	incl	%ecx
	movl	%eax, -2260(%rbp)               ## 4-byte Spill
	cltd
	movl	%ecx, -2208(%rbp)               ## 4-byte Spill
	idivl	%ecx
	movl	%eax, -2224(%rbp)               ## 4-byte Spill
	jmp	LBB0_43
LBB0_40:                                ##   in Loop: Header=BB0_34 Depth=2
	movq	-2248(%rbp), %r13               ## 8-byte Reload
	movq	_GEN5_RESP_DATA_STRUCTURE_OFFSET@GOTPCREL(%rip), %rbx
	jmp	LBB0_43
LBB0_42:                                ##   in Loop: Header=BB0_34 Depth=2
	movq	-2248(%rbp), %r13               ## 8-byte Reload
LBB0_43:                                ##   in Loop: Header=BB0_34 Depth=2
	movl	-2212(%rbp), %edi               ## 4-byte Reload
	addl	%r15d, %edi
	movl	-2216(%rbp), %esi               ## 4-byte Reload
	cmpl	-2228(%rbp), %esi               ## 4-byte Folded Reload
	jge	LBB0_67
## %bb.44:                              ##   in Loop: Header=BB0_34 Depth=2
	movq	-2296(%rbp), %rax               ## 8-byte Reload
	movl	(%rax), %ecx
	addl	%ecx, %r14d
	movl	(%rbx), %edx
	leal	(%rdx,%r12), %eax
	cmpl	%eax, %r14d
	movl	%edi, -2212(%rbp)               ## 4-byte Spill
	jge	LBB0_46
## %bb.45:                              ##   in Loop: Header=BB0_34 Depth=2
	movq	-2120(%rbp), %rdi
	incl	%esi
	movl	%esi, -2216(%rbp)               ## 4-byte Spill
	jmp	LBB0_34
LBB0_46:                                ##   in Loop: Header=BB0_22 Depth=1
	movl	%esi, %eax
	movl	-2228(%rbp), %r13d              ## 4-byte Reload
	jmp	LBB0_22
LBB0_47:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_48:
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
LBB0_49:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_72
## %bb.50:
	movl	%ecx, %eax
	addq	$2264, %rsp                     ## imm = 0x8D8
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_51:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_48
LBB0_52:
	movq	_EAGAIN@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	testl	%eax, %eax
	cmovsl	%eax, %ecx
	jmp	LBB0_49
LBB0_53:
	movq	-2280(%rbp), %r14               ## 8-byte Reload
	jmp	LBB0_55
LBB0_54:
	movslq	(%rbx), %rax
	leaq	-2192(,%rax,8), %rsi
	addq	%rbp, %rsi
	movl	%ecx, %edx
	callq	_cyapa_parse_structure_data
	movq	-2280(%rbp), %r14               ## 8-byte Reload
	movl	%eax, (%r14)
	movq	-2120(%rbp), %rdi
	movslq	(%rbx), %rax
	movq	-2296(%rbp), %rcx               ## 8-byte Reload
	movslq	(%rcx), %rdx
	addq	%rdx, %rax
	leaq	-2192(,%rax,8), %rsi
	addq	%rbp, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_cyapa_parse_structure_data
	movq	-2256(%rbp), %rcx               ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_55:
	movl	-2212(%rbp), %edi               ## 4-byte Reload
	movq	-2272(%rbp), %r10               ## 8-byte Reload
LBB0_56:
	xorl	%ecx, %ecx
	movl	$0, %eax
	testl	%r10d, %r10d
	movq	16(%rbp), %r8
	movq	-2288(%rbp), %r9                ## 8-byte Reload
	movq	_GEN5_RETRIEVE_MUTUAL_PWC_DATA@GOTPCREL(%rip), %rbx
	movl	-2232(%rbp), %esi               ## 4-byte Reload
	je	LBB0_58
## %bb.57:
	movl	%edi, %eax
	cltd
	idivl	%r10d
LBB0_58:
	movl	%eax, (%r8)
	testl	%esi, %esi
	jne	LBB0_49
## %bb.59:
	cmpq	%r9, (%rbx)
	jne	LBB0_49
## %bb.60:
	movl	-2208(%rbp), %edi               ## 4-byte Reload
	testl	%edi, %edi
	je	LBB0_49
## %bb.61:
	cmpl	(%r13), %edi
	jne	LBB0_65
## %bb.62:
	movl	4(%r13), %eax
	testl	%eax, %eax
	movl	-2200(%rbp), %edx               ## 4-byte Reload
	movl	-2196(%rbp), %esi               ## 4-byte Reload
	jne	LBB0_64
## %bb.63:
	movl	-2220(%rbp), %eax
LBB0_64:
	movl	%eax, 4(%r13)
	jmp	LBB0_71
LBB0_65:
	movl	4(%r13), %eax
	cmpl	-2220(%rbp), %edi
	movl	-2200(%rbp), %edx               ## 4-byte Reload
	movl	-2196(%rbp), %esi               ## 4-byte Reload
	jne	LBB0_68
## %bb.66:
	testl	%eax, %eax
	cmovel	%edi, %eax
	jmp	LBB0_70
LBB0_67:
	movq	-2272(%rbp), %r10               ## 8-byte Reload
	incl	%r10d
	movl	-2228(%rbp), %eax               ## 4-byte Reload
	cmpl	%r10d, %eax
	cmovgl	%eax, %r10d
	movq	-2280(%rbp), %r14               ## 8-byte Reload
	jmp	LBB0_56
LBB0_68:
	testl	%eax, %eax
	jne	LBB0_70
## %bb.69:
	movl	-2236(%rbp), %eax
LBB0_70:
	movl	%eax, 4(%r13)
	movl	%edi, (%r13)
LBB0_71:
	movq	-2256(%rbp), %rax               ## 8-byte Reload
	movl	%esi, (%rax)
	movl	%edx, (%r14)
	movl	-2224(%rbp), %eax               ## 4-byte Reload
	movl	%eax, (%r8)
	jmp	LBB0_49
LBB0_72:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PIP_RETRIEVE_DATA_STRUCTURE,8,3 ## @PIP_RETRIEVE_DATA_STRUCTURE
	.comm	_GEN5_RETRIEVE_MUTUAL_PWC_DATA,8,3 ## @GEN5_RETRIEVE_MUTUAL_PWC_DATA
	.comm	_GEN5_RETRIEVE_SELF_CAP_PWC_DATA,8,3 ## @GEN5_RETRIEVE_SELF_CAP_PWC_DATA
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_INT_MIN,4,2                    ## @INT_MIN
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_PIP_OUTPUT_REPORT_ADDR,4,2     ## @PIP_OUTPUT_REPORT_ADDR
	.comm	_PIP_APP_CMD_REPORT_ID,4,2      ## @PIP_APP_CMD_REPORT_ID
	.comm	_GEN5_RESP_DATA_STRUCTURE_OFFSET,4,2 ## @GEN5_RESP_DATA_STRUCTURE_OFFSET
	.comm	_cyapa_sort_tsg_pip_app_resp_data,4,2 ## @cyapa_sort_tsg_pip_app_resp_data
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_GEN5_PWC_DATA_ELEMENT_SIZE_MASK,8,3 ## @GEN5_PWC_DATA_ELEMENT_SIZE_MASK
	.no_dead_strip	_cyapa_gen5_read_idac_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cyapa_gen5_read_idac_data
_cyapa_gen5_read_idac_data:             ; @cyapa_gen5_read_idac_data
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #2240
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
Lloh3:
	adrp	x8, _PIP_RETRIEVE_DATA_STRUCTURE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PIP_RETRIEVE_DATA_STRUCTURE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_45
; %bb.1:
	mov	x22, x5
	mov	x24, x3
	mov	x23, x2
	mov	x25, x1
	mov	x26, x0
Lloh6:
	adrp	x8, _GEN5_RETRIEVE_MUTUAL_PWC_DATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GEN5_RETRIEVE_MUTUAL_PWC_DATA@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, x2
	b.ne	LBB0_3
; %bb.2:
	cbnz	x24, LBB0_5
	b	LBB0_45
LBB0_3:
	cbz	x24, LBB0_45
; %bb.4:
Lloh9:
	adrp	x9, _GEN5_RETRIEVE_SELF_CAP_PWC_DATA@GOTPAGE
Lloh10:
	ldr	x9, [x9, _GEN5_RETRIEVE_SELF_CAP_PWC_DATA@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x23
	b.ne	LBB0_45
LBB0_5:
	cbz	x4, LBB0_45
; %bb.6:
	cbz	x22, LBB0_45
; %bb.7:
	cbz	x6, LBB0_45
; %bb.8:
	sub	x27, x29, #192
Lloh12:
	adrp	x9, _INT_MIN@GOTPAGE
Lloh13:
	ldr	x9, [x9, _INT_MIN@GOTPAGEOFF]
	ldr	w11, [x9]
Lloh14:
	adrp	x10, _INT_MAX@GOTPAGE
Lloh15:
	ldr	x10, [x10, _INT_MAX@GOTPAGEOFF]
	str	w11, [x4]
	ldr	w11, [x10]
	str	w11, [x22]
	stp	wzr, wzr, [sp, #68]
	ldr	w19, [x24]
	str	x6, [sp, #8]                    ; 8-byte Folded Spill
	str	x4, [sp, #40]                   ; 8-byte Folded Spill
	str	w19, [sp, #64]                  ; 4-byte Folded Spill
	cbz	w19, LBB0_15
; %bb.9:
	mov	x9, x19
	cmp	w19, #5
	b.lt	LBB0_11
; %bb.10:
	mov	w9, #4
	str	w9, [x24]
LBB0_11:
	cmp	x8, x23
	b.ne	LBB0_19
; %bb.12:
	ldp	w8, w10, [x26]
	mul	w28, w9, w8
	ldr	w9, [x26, #8]
	cmp	w10, w9
	b.ne	LBB0_14
; %bb.13:
	ldr	w9, [x26, #12]
LBB0_14:
	str	w9, [sp, #68]
	add	w8, w8, #7
	and	w8, w8, #0xfffffff8
	mul	w8, w9, w8
	str	w8, [sp, #48]                   ; 4-byte Folded Spill
	b	LBB0_20
LBB0_15:
	mov	w11, #4
	str	w11, [x24]
	ldr	w11, [x9]
	ldr	w9, [x10]
	stp	w9, w11, [sp]                   ; 8-byte Folded Spill
	cmp	x8, x23
	b.ne	LBB0_21
; %bb.16:
	ldr	w8, [x26]
	cbnz	w8, LBB0_18
; %bb.17:
	add	x1, sp, #72
	add	x2, sp, #68
	mov	x0, x26
	bl	_cyapa_gen5_guess_electrodes
	ldr	w8, [sp, #72]
	add	w8, w8, #3
	and	w8, w8, #0xfffffffc
	str	w8, [x26]
LBB0_18:
	mov	w28, #0
	add	w8, w8, #7
	and	w8, w8, #0xfffffff8
	b	LBB0_22
LBB0_19:
	ldp	w8, w9, [x26, #8]
	add	w8, w8, w9
	add	w8, w8, #3
	and	w8, w8, #0xfffffffc
	str	w8, [sp, #48]                   ; 4-byte Folded Spill
	mov	w28, #2
LBB0_20:
                                        ; implicit-def: $w8
                                        ; kill: killed $w8
                                        ; implicit-def: $w8
                                        ; kill: killed $w8
	b	LBB0_23
LBB0_21:
	mov	w28, #0
	mov	w8, #2
LBB0_22:
	str	w8, [sp, #48]                   ; 4-byte Folded Spill
LBB0_23:
	sub	x19, x29, #192
	sub	x0, x29, #192
	mov	w1, #0
	mov	w2, #96
	bl	_memset
Lloh16:
	adrp	x8, _PIP_OUTPUT_REPORT_ADDR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PIP_OUTPUT_REPORT_ADDR@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	add	x1, x19, #32
	bl	_put_unaligned_le16
	add	x1, x19, #24
	mov	w0, #94
	bl	_put_unaligned_le16
	str	wzr, [sp, #52]                  ; 4-byte Folded Spill
	mov	w20, #0
	str	xzr, [sp, #24]                  ; 8-byte Folded Spill
	str	wzr, [sp, #16]                  ; 4-byte Folded Spill
	str	x25, [x27, #8]
Lloh19:
	adrp	x8, _PIP_APP_CMD_REPORT_ID@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PIP_APP_CMD_REPORT_ID@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	stur	w8, [x29, #-176]
	add	x8, sp, #80
	add	x8, x8, #56
	str	x8, [sp, #56]                   ; 8-byte Folded Spill
Lloh22:
	adrp	x8, _GEN5_RESP_DATA_STRUCTURE_OFFSET@GOTPAGE
Lloh23:
	ldr	x8, [x8, _GEN5_RESP_DATA_STRUCTURE_OFFSET@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	w2, [x24]
LBB0_24:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_26 Depth 2
                                        ;     Child Loop BB0_36 Depth 2
	ldr	w9, [sp, #48]                   ; 4-byte Folded Reload
	str	w20, [sp, #20]                  ; 4-byte Folded Spill
	sub	w19, w9, w20
Lloh25:
	adrp	x20, _GEN5_RESP_DATA_STRUCTURE_OFFSET@GOTPAGE
Lloh26:
	ldr	x20, [x20, _GEN5_RESP_DATA_STRUCTURE_OFFSET@GOTPAGEOFF]
	b	LBB0_26
LBB0_25:                                ;   in Loop: Header=BB0_26 Depth=2
	add	w28, w27, w28
	ldr	w8, [x20]
	add	w9, w8, w27
	cmp	w9, #11
	b.ge	LBB0_35
LBB0_26:                                ;   Parent Loop BB0_24 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	w9, #256
	sub	w8, w9, w8
	sdiv	w0, w8, w2
	mov	x1, x19
	bl	_min
	ldr	w8, [x24]
	mul	w27, w8, w0
	sub	x21, x29, #192
	ldr	x1, [x21]
	mov	x0, x28
	bl	_put_unaligned_le16
	ldr	x8, [x21]
	add	x1, x8, #16
	mov	x0, x27
	bl	_put_unaligned_le16
	ldr	x8, [x21]
	str	x23, [x8, #32]
	ldr	w8, [x20]
	add	w8, w8, w27
	str	w8, [sp, #76]
Lloh27:
	adrp	x8, _cyapa_sort_tsg_pip_app_resp_data@GOTPAGE
Lloh28:
	ldr	x8, [x8, _cyapa_sort_tsg_pip_app_resp_data@GOTPAGEOFF]
Lloh29:
	ldr	w6, [x8]
	sub	x1, x29, #192
	add	x3, sp, #80
	add	x4, sp, #76
	mov	x0, x26
	mov	w2, #96
	mov	w5, #500
	mov	w7, #1
	bl	_cyapa_i2c_pip_cmd_irq_sync
	cbnz	w0, LBB0_50
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=2
	ldr	w8, [sp, #76]
	ldr	w9, [x20]
	cmp	w8, w9
	b.lt	LBB0_49
; %bb.28:                               ;   in Loop: Header=BB0_26 Depth=2
	add	x0, sp, #80
	mov	x1, x25
	bl	_VALID_CMD_RESP_HEADER
	cbz	w0, LBB0_49
; %bb.29:                               ;   in Loop: Header=BB0_26 Depth=2
	add	x0, sp, #80
	bl	_PIP_CMD_COMPLETE_SUCCESS
	cbz	w0, LBB0_49
; %bb.30:                               ;   in Loop: Header=BB0_26 Depth=2
	ldr	x8, [sp, #128]
	cmp	x8, x23
	b.ne	LBB0_49
; %bb.31:                               ;   in Loop: Header=BB0_26 Depth=2
	ldr	x0, [sp, #56]                   ; 8-byte Folded Reload
	bl	_get_unaligned_le16
	cbz	w0, LBB0_51
; %bb.32:                               ;   in Loop: Header=BB0_26 Depth=2
	mov	x27, x0
	ldr	x0, [sp, #152]
Lloh30:
	adrp	x8, _GEN5_PWC_DATA_ELEMENT_SIZE_MASK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _GEN5_PWC_DATA_ELEMENT_SIZE_MASK@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	and	x2, x8, x0
	str	w2, [x24]
	cmp	w27, w2
	b.lt	LBB0_45
; %bb.33:                               ;   in Loop: Header=BB0_26 Depth=2
	ldr	w8, [sp, #64]                   ; 4-byte Folded Reload
	cbnz	w8, LBB0_25
; %bb.34:                               ;   in Loop: Header=BB0_26 Depth=2
Lloh33:
	adrp	x8, _GEN5_RETRIEVE_SELF_CAP_PWC_DATA@GOTPAGE
Lloh34:
	ldr	x8, [x8, _GEN5_RETRIEVE_SELF_CAP_PWC_DATA@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	cmp	x8, x23
	b.ne	LBB0_25
	b	LBB0_52
LBB0_35:                                ;   in Loop: Header=BB0_24 Depth=1
	str	x26, [sp, #32]                  ; 8-byte Folded Spill
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	add	w20, w8, #1
	mov	w21, #10
LBB0_36:                                ;   Parent Loop BB0_24 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x8, sp, #80
	add	x1, x8, w21, sxtw #3
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_cyapa_parse_structure_data
	mov	x19, x0
	ldr	w1, [x22]
	bl	_min
	mov	x26, x22
	str	w0, [x22]
	ldr	x22, [sp, #40]                  ; 8-byte Folded Reload
	ldr	w1, [x22]
	mov	x0, x19
	bl	_max
	str	w0, [x22]
Lloh36:
	adrp	x8, _GEN5_RETRIEVE_MUTUAL_PWC_DATA@GOTPAGE
Lloh37:
	ldr	x8, [x8, _GEN5_RETRIEVE_MUTUAL_PWC_DATA@GOTPAGEOFF]
Lloh38:
	ldr	x8, [x8]
	cmp	x8, x23
	b.ne	LBB0_38
; %bb.37:                               ;   in Loop: Header=BB0_36 Depth=2
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldr	w8, [x8]
	ldr	w9, [sp, #28]                   ; 4-byte Folded Reload
	cmp	w9, w8
	ldr	w8, [sp, #64]                   ; 4-byte Folded Reload
	ccmp	w8, #0, #0, lt
	b.eq	LBB0_42
LBB0_38:                                ;   in Loop: Header=BB0_36 Depth=2
	mov	x22, x26
LBB0_39:                                ;   in Loop: Header=BB0_36 Depth=2
	ldr	x26, [sp, #32]                  ; 8-byte Folded Reload
	ldp	w8, w14, [sp, #48]              ; 8-byte Folded Reload
	add	w14, w19, w14
	cmp	w20, w8
	b.ge	LBB0_53
; %bb.40:                               ;   in Loop: Header=BB0_36 Depth=2
	ldr	w2, [x24]
	add	w21, w2, w21
Lloh39:
	adrp	x8, _GEN5_RESP_DATA_STRUCTURE_OFFSET@GOTPAGE
Lloh40:
	ldr	x8, [x8, _GEN5_RESP_DATA_STRUCTURE_OFFSET@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	add	w9, w8, w27
	cmp	w21, w9
	str	w14, [sp, #52]                  ; 4-byte Folded Spill
	b.ge	LBB0_24
; %bb.41:                               ;   in Loop: Header=BB0_36 Depth=2
	ldr	x0, [sp, #152]
	add	w20, w20, #1
	b	LBB0_36
LBB0_42:                                ;   in Loop: Header=BB0_36 Depth=2
	ldr	w9, [sp, #24]                   ; 4-byte Folded Reload
	cmp	w9, #0
	cinc	w8, w9, lt
	mov	x22, x26
	cbz	w9, LBB0_44
; %bb.43:                               ;   in Loop: Header=BB0_36 Depth=2
	asr	w8, w8, #1
	cmp	w19, w8
	b.le	LBB0_39
LBB0_44:                                ;   in Loop: Header=BB0_36 Depth=2
	mov	x0, x19
	ldr	w1, [sp]                        ; 4-byte Folded Reload
	bl	_min
	str	w0, [sp]                        ; 4-byte Folded Spill
	mov	x0, x19
	ldr	w1, [sp, #4]                    ; 4-byte Folded Reload
	bl	_max
	str	w0, [sp, #4]                    ; 4-byte Folded Spill
	ldr	w9, [sp, #16]                   ; 4-byte Folded Reload
	add	w9, w19, w9
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	add	w8, w8, #1
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	str	w9, [sp, #16]                   ; 4-byte Folded Spill
	sdiv	w8, w9, w8
	str	w8, [sp, #24]                   ; 4-byte Folded Spill
	b	LBB0_39
LBB0_45:
Lloh42:
	adrp	x8, _EINVAL@GOTPAGE
Lloh43:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_46:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_47:
	ldur	x8, [x29, #-96]
Lloh44:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh45:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_63
; %bb.48:
	add	sp, sp, #2240
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_49:
Lloh47:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh48:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_46
LBB0_50:
Lloh49:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh50:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, w0, w8, lt
	b	LBB0_47
LBB0_51:
Lloh52:
	adrp	x9, _GEN5_RETRIEVE_MUTUAL_PWC_DATA@GOTPAGE
Lloh53:
	ldr	x9, [x9, _GEN5_RETRIEVE_MUTUAL_PWC_DATA@GOTPAGEOFF]
	ldr	w10, [sp, #64]                  ; 4-byte Folded Reload
	ldp	w12, w11, [sp]                  ; 8-byte Folded Reload
	ldr	x13, [sp, #8]                   ; 8-byte Folded Reload
	ldr	w14, [sp, #52]                  ; 4-byte Folded Reload
	ldr	w15, [sp, #20]                  ; 4-byte Folded Reload
	ldr	x21, [sp, #40]                  ; 8-byte Folded Reload
	b	LBB0_54
LBB0_52:
	ldrsw	x8, [x20]
	add	x19, sp, #80
	add	x1, x19, x8, lsl #3
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_cyapa_parse_structure_data
	ldr	x21, [sp, #40]                  ; 8-byte Folded Reload
	str	w0, [x21]
	ldr	x0, [sp, #152]
	ldr	w8, [x20]
	ldr	w2, [x24]
	add	w8, w2, w8
	add	x1, x19, w8, sxtw #3
	bl	_cyapa_parse_structure_data
	str	w0, [x22]
Lloh54:
	adrp	x9, _GEN5_RETRIEVE_MUTUAL_PWC_DATA@GOTPAGE
Lloh55:
	ldr	x9, [x9, _GEN5_RETRIEVE_MUTUAL_PWC_DATA@GOTPAGEOFF]
	ldr	w10, [sp, #64]                  ; 4-byte Folded Reload
	ldp	w12, w11, [sp]                  ; 8-byte Folded Reload
	ldr	x13, [sp, #8]                   ; 8-byte Folded Reload
	ldr	w14, [sp, #52]                  ; 4-byte Folded Reload
	ldr	w15, [sp, #20]                  ; 4-byte Folded Reload
	b	LBB0_54
LBB0_53:
	ldr	w15, [sp, #20]                  ; 4-byte Folded Reload
	add	w8, w15, #1
	ldr	w9, [sp, #48]                   ; 4-byte Folded Reload
	cmp	w9, w8
	csinc	w15, w9, w15, gt
	ldr	x13, [sp, #8]                   ; 8-byte Folded Reload
	ldr	x21, [sp, #40]                  ; 8-byte Folded Reload
Lloh56:
	adrp	x9, _GEN5_RETRIEVE_MUTUAL_PWC_DATA@GOTPAGE
Lloh57:
	ldr	x9, [x9, _GEN5_RETRIEVE_MUTUAL_PWC_DATA@GOTPAGEOFF]
	ldr	w10, [sp, #64]                  ; 4-byte Folded Reload
	ldp	w12, w11, [sp]                  ; 8-byte Folded Reload
LBB0_54:
	mov	w0, #0
	sdiv	w8, w14, w15
	cmp	w15, #0
	csel	w8, wzr, w8, eq
	str	w8, [x13]
	cbnz	w10, LBB0_47
; %bb.55:
	ldr	x8, [x9]
	cmp	x8, x23
	ldr	w10, [sp, #28]                  ; 4-byte Folded Reload
	ccmp	w10, #0, #4, eq
	b.eq	LBB0_47
; %bb.56:
	ldr	w8, [x26]
	cmp	w10, w8
	b.ne	LBB0_58
; %bb.57:
	ldr	w8, [x26, #4]
	ldr	w9, [sp, #72]
	cmp	w8, #0
	csel	w8, w9, w8, eq
	str	w8, [x26, #4]
	b	LBB0_62
LBB0_58:
	ldr	w9, [sp, #72]
	ldr	w8, [x26, #4]
	cmp	w10, w9
	b.ne	LBB0_60
; %bb.59:
	cmp	w8, #0
	csel	w8, w10, w8, eq
	b	LBB0_61
LBB0_60:
	ldr	w9, [sp, #68]
	cmp	w8, #0
	csel	w8, w9, w8, eq
LBB0_61:
	stp	w10, w8, [x26]
LBB0_62:
	mov	w0, #0
	str	w12, [x22]
	str	w11, [x21]
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	str	w8, [x13]
	b	LBB0_47
LBB0_63:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh56, Lloh57
	.cfi_endproc
                                        ; -- End function
	.comm	_PIP_RETRIEVE_DATA_STRUCTURE,8,3 ; @PIP_RETRIEVE_DATA_STRUCTURE
	.comm	_GEN5_RETRIEVE_MUTUAL_PWC_DATA,8,3 ; @GEN5_RETRIEVE_MUTUAL_PWC_DATA
	.comm	_GEN5_RETRIEVE_SELF_CAP_PWC_DATA,8,3 ; @GEN5_RETRIEVE_SELF_CAP_PWC_DATA
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_INT_MIN,4,2                    ; @INT_MIN
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_PIP_OUTPUT_REPORT_ADDR,4,2     ; @PIP_OUTPUT_REPORT_ADDR
	.comm	_PIP_APP_CMD_REPORT_ID,4,2      ; @PIP_APP_CMD_REPORT_ID
	.comm	_GEN5_RESP_DATA_STRUCTURE_OFFSET,4,2 ; @GEN5_RESP_DATA_STRUCTURE_OFFSET
	.comm	_cyapa_sort_tsg_pip_app_resp_data,4,2 ; @cyapa_sort_tsg_pip_app_resp_data
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_GEN5_PWC_DATA_ELEMENT_SIZE_MASK,8,3 ; @GEN5_PWC_DATA_ELEMENT_SIZE_MASK
	.no_dead_strip	_cyapa_gen5_read_idac_data
.subsections_via_symbols
