	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function cyapa_gen6_change_power_state
LCPI0_0:
	.long	4                               ## 0x4
	.long	0                               ## 0x0
	.long	6                               ## 0x6
	.long	0                               ## 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_cyapa_gen6_change_power_state:         ## @cyapa_gen6_change_power_state
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$96, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [4,0,6,0]
	movaps	%xmm0, -64(%rbp)
	movq	$47, -48(%rbp)
	movl	$70, -40(%rbp)
	movl	%esi, -36(%rbp)
	movl	$24, -100(%rbp)
	movq	_cyapa_sort_tsg_pip_app_resp_data@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	-64(%rbp), %rsi
	leaq	-96(%rbp), %rcx
	leaq	-100(%rbp), %r8
	movl	$32, %edx
	movl	$500, %r9d                      ## imm = 0x1F4
	pushq	$0
	pushq	%rax
	callq	_cyapa_i2c_pip_cmd_irq_sync
	addq	$16, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testl	%ebx, %ebx
	cmovsl	%ebx, %eax
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	addq	$96, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	leaq	-96(%rbp), %rdi
	movl	$70, %esi
	callq	_VALID_CMD_RESP_HEADER
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	xorl	%eax, %eax
	cmpl	%r14d, -76(%rbp)
	je	LBB0_5
## %bb.4:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_cyapa_sort_tsg_pip_app_resp_data,4,2 ## @cyapa_sort_tsg_pip_app_resp_data
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_cyapa_gen6_change_power_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function cyapa_gen6_change_power_state
lCPI0_0:
	.long	4                               ; 0x4
	.long	0                               ; 0x0
	.long	6                               ; 0x6
	.long	0                               ; 0x0
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
lCPI0_1:
	.long	47                              ; 0x2f
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_cyapa_gen6_change_power_state:         ; @cyapa_gen6_change_power_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [sp, #32]
Lloh5:
	adrp	x8, lCPI0_1@PAGE
Lloh6:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [sp, #48]
	mov	w8, #70
	stp	w8, w1, [sp, #56]
	mov	w8, #24
	str	w8, [sp, #4]
Lloh7:
	adrp	x8, _cyapa_sort_tsg_pip_app_resp_data@GOTPAGE
Lloh8:
	ldr	x8, [x8, _cyapa_sort_tsg_pip_app_resp_data@GOTPAGEOFF]
Lloh9:
	ldr	w6, [x8]
	add	x1, sp, #32
	add	x3, sp, #8
	add	x4, sp, #4
	mov	w2, #32
	mov	w5, #500
	mov	w7, #0
	bl	_cyapa_i2c_pip_cmd_irq_sync
	mov	x20, x0
	cbz	w0, LBB0_4
LBB0_1:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w20, #0
	csneg	w0, w20, w8, lt
LBB0_2:
	ldur	x8, [x29, #-24]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.3:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_4:
	add	x0, sp, #8
	mov	w1, #70
	bl	_VALID_CMD_RESP_HEADER
	cbz	w0, LBB0_1
; %bb.5:
	ldr	w8, [sp, #28]
	cmp	w8, w19
	b.ne	LBB0_7
; %bb.6:
	mov	w0, #0
	b	LBB0_2
LBB0_7:
Lloh16:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_2
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpAdrp	Lloh3, Lloh5
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_cyapa_sort_tsg_pip_app_resp_data,4,2 ; @cyapa_sort_tsg_pip_app_resp_data
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_cyapa_gen6_change_power_state
.subsections_via_symbols
