	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cyapa_gen5_set_interval_time
_cyapa_gen5_set_interval_time:          ## @cyapa_gen5_set_interval_time
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_CYAPA_TSG_MAX_CMD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r14, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	leal	-128(%r12), %eax
	cmpl	$3, %eax
	jae	LBB0_1
## %bb.2:
	movq	16(%r13), %rbx
	cltq
	leaq	l_switch.table.cyapa_gen5_set_interval_time(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	%r15, %r14
	movl	(%rax), %r15d
	movq	_PIP_OUTPUT_REPORT_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%r13), %rsi
	callq	_put_unaligned_le16
	leal	30(%r15), %edi
	movq	%r13, %rsi
	addq	$8, %rsi
	callq	_put_unaligned_le16
	movq	_PIP_APP_CMD_REPORT_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r13)
	movq	_GEN5_CMD_SET_PARAMETER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	movl	%r12d, (%rbx)
	movl	%r15d, 4(%rbx)
	addq	$8, %rbx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	movq	%rbx, %rsi
	callq	_put_unaligned_le32
	movl	$28, -84(%rbp)
	movq	_cyapa_sort_tsg_pip_app_resp_data@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	-80(%rbp), %rcx
	leaq	-84(%rbp), %r8
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	$36, %edx
	movl	$500, %r9d                      ## imm = 0x1F4
	pushq	$0
	pushq	%rax
	callq	_cyapa_i2c_pip_cmd_irq_sync
	addq	$16, %rsp
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	cmpl	%r12d, -60(%rbp)
	jne	LBB0_6
## %bb.4:
	cmpl	%r15d, -56(%rbp)
	jne	LBB0_6
## %bb.5:
	movq	_GEN5_CMD_SET_PARAMETER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %rdi
	callq	_VALID_CMD_RESP_HEADER
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_7
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testl	%r14d, %r14d
	cmovsl	%r14d, %ebx
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CYAPA_TSG_MAX_CMD_SIZE,4,2     ## @CYAPA_TSG_MAX_CMD_SIZE
	.comm	_GEN5_PARAMETER_ACT_INTERVL_SIZE,4,2 ## @GEN5_PARAMETER_ACT_INTERVL_SIZE
	.comm	_GEN5_PARAMETER_ACT_LFT_INTERVL_SIZE,4,2 ## @GEN5_PARAMETER_ACT_LFT_INTERVL_SIZE
	.comm	_GEN5_PARAMETER_LP_INTRVL_SIZE,4,2 ## @GEN5_PARAMETER_LP_INTRVL_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.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_SET_PARAMETER,4,2     ## @GEN5_CMD_SET_PARAMETER
	.comm	_cyapa_sort_tsg_pip_app_resp_data,4,2 ## @cyapa_sort_tsg_pip_app_resp_data
	.no_dead_strip	_cyapa_gen5_set_interval_time
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.cyapa_gen5_set_interval_time
l_switch.table.cyapa_gen5_set_interval_time:
	.quad	_GEN5_PARAMETER_LP_INTRVL_SIZE
	.quad	_GEN5_PARAMETER_ACT_LFT_INTERVL_SIZE
	.quad	_GEN5_PARAMETER_ACT_INTERVL_SIZE

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cyapa_gen5_set_interval_time
_cyapa_gen5_set_interval_time:          ; @cyapa_gen5_set_interval_time
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #48
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _CYAPA_TSG_MAX_CMD_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CYAPA_TSG_MAX_CMD_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	lsl	x8, x2, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	mov	x0, x21
	mov	w1, #0
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memset
	sub	w8, w19, #128
	cmp	w8, #3
	b.hs	LBB0_4
; %bb.1:
Lloh8:
	adrp	x9, l_switch.table.cyapa_gen5_set_interval_time@PAGE
Lloh9:
	add	x9, x9, l_switch.table.cyapa_gen5_set_interval_time@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	x24, [x21, #16]
	ldr	w25, [x8]
Lloh10:
	adrp	x8, _PIP_OUTPUT_REPORT_ADDR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PIP_OUTPUT_REPORT_ADDR@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	add	x1, x21, #12
	bl	_put_unaligned_le16
	add	w0, w25, #30
	add	x1, x21, #8
	bl	_put_unaligned_le16
Lloh13:
	adrp	x8, _PIP_APP_CMD_REPORT_ID@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PIP_APP_CMD_REPORT_ID@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x23, _GEN5_CMD_SET_PARAMETER@GOTPAGE
Lloh17:
	ldr	x23, [x23, _GEN5_CMD_SET_PARAMETER@GOTPAGEOFF]
	ldr	w9, [x23]
	stp	w9, w8, [x21]
	stp	w19, w25, [x24]
	add	x1, x24, #8
	mov	x0, x22
	bl	_put_unaligned_le32
	mov	w8, #28
	stur	w8, [x29, #-104]
Lloh18:
	adrp	x8, _cyapa_sort_tsg_pip_app_resp_data@GOTPAGE
Lloh19:
	ldr	x8, [x8, _cyapa_sort_tsg_pip_app_resp_data@GOTPAGEOFF]
Lloh20:
	ldr	w6, [x8]
	sub	x3, x29, #100
	sub	x4, x29, #104
	mov	x0, x20
	mov	x1, x21
	mov	w2, #36
	mov	w5, #500
	mov	w7, #0
	bl	_cyapa_i2c_pip_cmd_irq_sync
	mov	x20, x0
	ldp	w8, w9, [x29, #-80]
	cmp	w0, #0
	ccmp	w8, w19, #0, eq
	ccmp	w9, w25, #0, eq
	b.ne	LBB0_5
; %bb.2:
	ldr	w1, [x23]
	sub	x0, x29, #100
	bl	_VALID_CMD_RESP_HEADER
	cbz	w0, LBB0_5
; %bb.3:
	mov	w0, #0
	b	LBB0_6
LBB0_4:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmp	w20, #0
	csneg	w0, w20, w8, lt
LBB0_6:
	ldur	x8, [x29, #-72]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_CYAPA_TSG_MAX_CMD_SIZE,4,2     ; @CYAPA_TSG_MAX_CMD_SIZE
	.comm	_GEN5_PARAMETER_ACT_INTERVL_SIZE,4,2 ; @GEN5_PARAMETER_ACT_INTERVL_SIZE
	.comm	_GEN5_PARAMETER_ACT_LFT_INTERVL_SIZE,4,2 ; @GEN5_PARAMETER_ACT_LFT_INTERVL_SIZE
	.comm	_GEN5_PARAMETER_LP_INTRVL_SIZE,4,2 ; @GEN5_PARAMETER_LP_INTRVL_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.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_SET_PARAMETER,4,2     ; @GEN5_CMD_SET_PARAMETER
	.comm	_cyapa_sort_tsg_pip_app_resp_data,4,2 ; @cyapa_sort_tsg_pip_app_resp_data
	.no_dead_strip	_cyapa_gen5_set_interval_time
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.cyapa_gen5_set_interval_time
l_switch.table.cyapa_gen5_set_interval_time:
	.quad	_GEN5_PARAMETER_LP_INTRVL_SIZE
	.quad	_GEN5_PARAMETER_ACT_LFT_INTERVL_SIZE
	.quad	_GEN5_PARAMETER_ACT_INTERVL_SIZE

.subsections_via_symbols
