	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cyapa_pip_bl_enter             ## -- Begin function cyapa_pip_bl_enter
	.p2align	4, 0x90
_cyapa_pip_bl_enter:                    ## @cyapa_pip_bl_enter
	.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	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movups	l___const.cyapa_pip_bl_enter.cmd+12(%rip), %xmm0
	movups	%xmm0, -52(%rbp)
	movaps	l___const.cyapa_pip_bl_enter.cmd(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	movl	$500, %esi                      ## imm = 0x1F4
	callq	_cyapa_poll_state
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_cyapa_is_pip_bl_mode
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.3:
	movq	%r14, %rdi
	callq	_cyapa_is_pip_app_mode
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_cyapa_empty_pip_output_data
	movl	$8, -76(%rbp)
	leaq	-72(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_cyapa_sort_pip_application_launch_data@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	-64(%rbp), %rsi
	leaq	-76(%rbp), %r8
	movq	%r14, %rdi
	movl	$28, %edx
	movq	%r15, %rcx
	movl	$5000, %r9d                     ## imm = 0x1388
	pushq	$1
	pushq	%rax
	callq	_cyapa_i2c_pip_cmd_irq_sync
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	cmpl	$0, -72(%rbp)
	jne	LBB0_8
## %bb.7:
	cmpl	$0, -68(%rbp)
	jne	LBB0_8
## %bb.9:
	movl	$0, (%r14)
	movq	8(%r14), %rax
	movq	_CYAPA_GEN5@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:
	movq	_CYAPA_STATE_GEN5_BL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_1:
	movl	%eax, %ebx
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_8:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	subl	(%rcx), %ebx
	testl	%eax, %eax
	cmovsl	%eax, %ebx
	jmp	LBB0_13
LBB0_11:
	movq	_CYAPA_GEN6@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	movq	_CYAPA_STATE_GEN6_BL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	jmp	LBB0_13
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const.cyapa_pip_bl_enter.cmd
l___const.cyapa_pip_bl_enter.cmd:
	.long	4                               ## 0x4
	.long	0                               ## 0x0
	.long	5                               ## 0x5
	.long	0                               ## 0x0
	.long	47                              ## 0x2f
	.long	0                               ## 0x0
	.long	1                               ## 0x1

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_cyapa_sort_pip_application_launch_data,4,2 ## @cyapa_sort_pip_application_launch_data
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_CYAPA_GEN5,8,3                 ## @CYAPA_GEN5
	.comm	_CYAPA_STATE_GEN5_BL,4,2        ## @CYAPA_STATE_GEN5_BL
	.comm	_CYAPA_GEN6,8,3                 ## @CYAPA_GEN6
	.comm	_CYAPA_STATE_GEN6_BL,4,2        ## @CYAPA_STATE_GEN6_BL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cyapa_pip_bl_enter             ; -- Begin function cyapa_pip_bl_enter
	.p2align	2
_cyapa_pip_bl_enter:                    ; @cyapa_pip_bl_enter
	.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]
Lloh3:
	adrp	x8, l___const.cyapa_pip_bl_enter.cmd@PAGE
Lloh4:
	add	x8, x8, l___const.cyapa_pip_bl_enter.cmd@PAGEOFF
	ldr	q0, [x8]
	str	q0, [sp, #16]
	ldur	q0, [x8, #12]
	stur	q0, [sp, #28]
	mov	w1, #500
	bl	_cyapa_poll_state
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_cyapa_is_pip_bl_mode
	cbz	x0, LBB0_5
LBB0_2:
	mov	w0, #0
LBB0_3:
	ldur	x8, [x29, #-24]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.4:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_5:
	mov	x0, x19
	bl	_cyapa_is_pip_app_mode
	cbz	w0, LBB0_8
; %bb.6:
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	bl	_cyapa_empty_pip_output_data
	mov	w8, #8
	str	w8, [sp, #4]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh8:
	adrp	x8, _cyapa_sort_pip_application_launch_data@GOTPAGE
Lloh9:
	ldr	x8, [x8, _cyapa_sort_pip_application_launch_data@GOTPAGEOFF]
Lloh10:
	ldr	w6, [x8]
	add	x1, sp, #16
	add	x3, sp, #8
	add	x4, sp, #4
	mov	x0, x19
	mov	w2, #28
	mov	w5, #5000
	mov	w7, #1
	bl	_cyapa_i2c_pip_cmd_irq_sync
	ldp	w8, w9, [sp, #8]
	cmp	w0, #0
	ccmp	w8, #0, #0, eq
	ccmp	w9, #0, #0, eq
	b.eq	LBB0_9
; %bb.7:
Lloh11:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, w0, w8, lt
	b	LBB0_3
LBB0_8:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_9:
	str	wzr, [x19]
	ldr	x8, [x19, #8]
Lloh17:
	adrp	x9, _CYAPA_GEN5@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CYAPA_GEN5@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	mov	w0, #0
Lloh20:
	adrp	x8, _CYAPA_STATE_GEN5_BL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CYAPA_STATE_GEN5_BL@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
Lloh22:
	adrp	x9, _CYAPA_GEN6@GOTPAGE
Lloh23:
	ldr	x9, [x9, _CYAPA_GEN6@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.12:
	mov	w0, #0
Lloh25:
	adrp	x8, _CYAPA_STATE_GEN6_BL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CYAPA_STATE_GEN6_BL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	b	LBB0_3
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.cyapa_pip_bl_enter.cmd
l___const.cyapa_pip_bl_enter.cmd:
	.long	4                               ; 0x4
	.long	0                               ; 0x0
	.long	5                               ; 0x5
	.long	0                               ; 0x0
	.long	47                              ; 0x2f
	.long	0                               ; 0x0
	.long	1                               ; 0x1

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_cyapa_sort_pip_application_launch_data,4,2 ; @cyapa_sort_pip_application_launch_data
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_CYAPA_GEN5,8,3                 ; @CYAPA_GEN5
	.comm	_CYAPA_STATE_GEN5_BL,4,2        ; @CYAPA_STATE_GEN5_BL
	.comm	_CYAPA_GEN6,8,3                 ; @CYAPA_GEN6
	.comm	_CYAPA_STATE_GEN6_BL,4,2        ; @CYAPA_STATE_GEN6_BL
.subsections_via_symbols
