	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cyapa_pip_deep_sleep           ## -- Begin function cyapa_pip_deep_sleep
	.p2align	4, 0x90
_cyapa_pip_deep_sleep:                  ## @cyapa_pip_deep_sleep
	.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	$80, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movaps	L___const.cyapa_pip_deep_sleep.cmd(%rip), %xmm0
	movaps	%xmm0, -48(%rbp)
	movq	_PIP_DEEP_SLEEP_STATE_MASK@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	andl	%esi, %eax
	movl	%eax, -40(%rbp)
	movl	$20, -84(%rbp)
	movq	_cyapa_sort_pip_deep_sleep_data@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	-48(%rbp), %rsi
	leaq	-80(%rbp), %rcx
	leaq	-84(%rbp), %r8
	movl	$16, %edx
	movl	$500, %r9d                      ## imm = 0x1F4
	pushq	$0
	pushq	%rax
	callq	_cyapa_i2c_pip_cmd_irq_sync
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	(%r14), %ecx
	andl	-68(%rbp), %ecx
	xorl	%eax, %eax
	cmpl	%ebx, %ecx
	je	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$80, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @__const.cyapa_pip_deep_sleep.cmd
L___const.cyapa_pip_deep_sleep.cmd:
	.long	5                               ## 0x5
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	8                               ## 0x8

	.comm	_PIP_DEEP_SLEEP_STATE_MASK,4,2  ## @PIP_DEEP_SLEEP_STATE_MASK
	.comm	_cyapa_sort_pip_deep_sleep_data,4,2 ## @cyapa_sort_pip_deep_sleep_data
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cyapa_pip_deep_sleep           ; -- Begin function cyapa_pip_deep_sleep
	.p2align	2
_cyapa_pip_deep_sleep:                  ; @cyapa_pip_deep_sleep
	.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, 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, l___const.cyapa_pip_deep_sleep.cmd@PAGE
Lloh4:
	add	x8, x8, l___const.cyapa_pip_deep_sleep.cmd@PAGEOFF
Lloh5:
	ldr	q0, [x8]
	str	q0, [sp, #32]
Lloh6:
	adrp	x20, _PIP_DEEP_SLEEP_STATE_MASK@GOTPAGE
Lloh7:
	ldr	x20, [x20, _PIP_DEEP_SLEEP_STATE_MASK@GOTPAGEOFF]
	ldr	w8, [x20]
	and	w8, w8, w1
	str	w8, [sp, #40]
	mov	w8, #20
	str	w8, [sp, #8]
Lloh8:
	adrp	x8, _cyapa_sort_pip_deep_sleep_data@GOTPAGE
Lloh9:
	ldr	x8, [x8, _cyapa_sort_pip_deep_sleep_data@GOTPAGEOFF]
Lloh10:
	ldr	w6, [x8]
	add	x1, sp, #32
	add	x3, sp, #12
	add	x4, sp, #8
	mov	w2, #16
	mov	w5, #500
	mov	w7, #0
	bl	_cyapa_i2c_pip_cmd_irq_sync
	cbnz	w0, LBB0_3
; %bb.1:
	ldr	w8, [sp, #24]
	ldr	w9, [x20]
	and	w8, w9, w8
	cmp	w8, w19
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldur	x8, [x29, #-24]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAddLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @__const.cyapa_pip_deep_sleep.cmd
l___const.cyapa_pip_deep_sleep.cmd:
	.long	5                               ; 0x5
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	8                               ; 0x8

	.comm	_PIP_DEEP_SLEEP_STATE_MASK,4,2  ; @PIP_DEEP_SLEEP_STATE_MASK
	.comm	_cyapa_sort_pip_deep_sleep_data,4,2 ; @cyapa_sort_pip_deep_sleep_data
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
