	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cyapa_gen5_execute_panel_scan
_cyapa_gen5_execute_panel_scan:         ## @cyapa_gen5_execute_panel_scan
	.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	%r12
	pushq	%rbx
	subq	$96, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	-80(%rbp), %r14
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$28, %edx
	callq	_memset
	movq	_PIP_OUTPUT_REPORT_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-68(%rbp), %rsi
	callq	_put_unaligned_le16
	leaq	-72(%rbp), %rsi
	movl	$26, %edi
	callq	_put_unaligned_le16
	movq	_PIP_APP_CMD_REPORT_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)
	movq	_GEN5_CMD_EXECUTE_PANEL_SCAN@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%eax, -80(%rbp)
	movl	$24, -116(%rbp)
	movq	_cyapa_sort_tsg_pip_app_resp_data@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	-112(%rbp), %rcx
	leaq	-116(%rbp), %r8
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$28, %edx
	movl	$500, %r9d                      ## imm = 0x1F4
	pushq	$1
	pushq	%rax
	callq	_cyapa_i2c_pip_cmd_irq_sync
	addq	$16, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	cmpl	$24, -116(%rbp)
	jne	LBB0_4
## %bb.2:
	movl	(%r12), %esi
	leaq	-112(%rbp), %rdi
	callq	_VALID_CMD_RESP_HEADER
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	-112(%rbp), %rdi
	callq	_PIP_CMD_COMPLETE_SUCCESS
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_5
LBB0_4:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	testl	%ebx, %ebx
	cmovnel	%ebx, %r15d
	movl	%r15d, %eax
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.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_CMD_EXECUTE_PANEL_SCAN,4,2 ## @GEN5_CMD_EXECUTE_PANEL_SCAN
	.comm	_cyapa_sort_tsg_pip_app_resp_data,4,2 ## @cyapa_sort_tsg_pip_app_resp_data
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_cyapa_gen5_execute_panel_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cyapa_gen5_execute_panel_scan
_cyapa_gen5_execute_panel_scan:         ; @cyapa_gen5_execute_panel_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	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, #-24]
	add	x20, sp, #28
	add	x0, sp, #28
	mov	w1, #0
	mov	w2, #28
	bl	_memset
Lloh3:
	adrp	x8, _PIP_OUTPUT_REPORT_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PIP_OUTPUT_REPORT_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, x20, #12
	bl	_put_unaligned_le16
	add	x1, x20, #8
	mov	w0, #26
	bl	_put_unaligned_le16
Lloh6:
	adrp	x8, _PIP_APP_CMD_REPORT_ID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PIP_APP_CMD_REPORT_ID@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x20, _GEN5_CMD_EXECUTE_PANEL_SCAN@GOTPAGE
Lloh10:
	ldr	x20, [x20, _GEN5_CMD_EXECUTE_PANEL_SCAN@GOTPAGEOFF]
	ldr	w9, [x20]
	stp	w9, w8, [sp, #28]
	mov	w8, #24
	str	w8, [sp]
Lloh11:
	adrp	x8, _cyapa_sort_tsg_pip_app_resp_data@GOTPAGE
Lloh12:
	ldr	x8, [x8, _cyapa_sort_tsg_pip_app_resp_data@GOTPAGEOFF]
Lloh13:
	ldr	w6, [x8]
	add	x1, sp, #28
	add	x3, sp, #4
	mov	x4, sp
	mov	x0, x19
	mov	w2, #28
	mov	w5, #500
	mov	w7, #1
	bl	_cyapa_i2c_pip_cmd_irq_sync
	mov	x19, x0
	ldr	w8, [sp]
	cmp	w0, #0
	ccmp	w8, #24, #0, eq
	b.ne	LBB0_4
; %bb.1:
	ldr	w1, [x20]
	add	x0, sp, #4
	bl	_VALID_CMD_RESP_HEADER
	cbz	w0, LBB0_4
; %bb.2:
	add	x0, sp, #4
	bl	_PIP_CMD_COMPLETE_SUCCESS
	cbz	w0, LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh14:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w19, #0
	csneg	w0, w19, w8, ne
LBB0_5:
	ldur	x8, [x29, #-24]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.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_CMD_EXECUTE_PANEL_SCAN,4,2 ; @GEN5_CMD_EXECUTE_PANEL_SCAN
	.comm	_cyapa_sort_tsg_pip_app_resp_data,4,2 ; @cyapa_sort_tsg_pip_app_resp_data
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_cyapa_gen5_execute_panel_scan
.subsections_via_symbols
