	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cyapa_gen3_state_parse
_cyapa_gen3_state_parse:                ## @cyapa_gen3_state_parse
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_CYAPA_STATE_NO_DEVICE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rdi)
	movq	_REG_BL_FILE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rsi,%rax,4), %eax
	movq	_BL_FILE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.1:
	movq	_REG_BL_ERROR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rsi,%rax,4), %eax
	movq	_BL_ERROR_NO_ERR_IDLE@GOTPCREL(%rip), %rdi
	movq	_REG_BL_STATUS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rsi,%rcx,4), %ecx
	movq	_BL_STATUS_RUNNING@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	(%rdi), %eax
	jne	LBB0_4
## %bb.2:
	cmpl	%edx, %ecx
	je	LBB0_17
## %bb.3:
	movq	_BL_STATUS_CSUM_VALID@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	orl	%edx, %edi
	cmpl	%edi, %ecx
	je	LBB0_17
LBB0_4:
	movl	%ecx, %edi
	notl	%edi
	testl	%edi, %edx
	jne	LBB0_8
## %bb.5:
	movq	_CYAPA_GEN3@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, 8(%rbx)
	movq	_BL_STATUS_BUSY@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	jne	LBB0_16
## %bb.6:
	movq	_BL_ERROR_BOOTLOADING@GOTPCREL(%rip), %rcx
	notl	%eax
	testl	%eax, (%rcx)
	jne	LBB0_18
## %bb.7:
	movq	_CYAPA_STATE_BL_ACTIVE@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_8:
	movq	_REG_OP_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rsi,%rax,4), %eax
	movq	_OP_STATUS_SRC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.9:
	movq	_REG_OP_DATA1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rsi,%rcx,4), %edi
	movq	_OP_DATA_VALID@GOTPCREL(%rip), %rcx
	testl	%edi, (%rcx)
	je	LBB0_11
## %bb.10:
	callq	_GEN3_FINGER_NUM
	movq	_GEN3_MAX_FINGERS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_13
	jmp	LBB0_20
LBB0_11:
	cmpl	$12, %eax
	jne	LBB0_14
## %bb.12:
	movq	_REG_OP_DATA1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$8, (%rsi,%rax,4)
	jne	LBB0_14
LBB0_13:
	movq	_CYAPA_GEN3@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	_CYAPA_STATE_OP@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_14:
	movq	_REG_BL_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_BL_STATUS_RUNNING@GOTPCREL(%rip), %rcx
	movq	_BL_STATUS_BUSY@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%edx, (%rsi,%rax,4)
	je	LBB0_20
## %bb.15:
	movq	_CYAPA_GEN3@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
LBB0_16:
	movq	_CYAPA_STATE_BL_BUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_17:
	movq	_CYAPA_GEN3@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
LBB0_18:
	movq	_CYAPA_STATE_BL_IDLE@GOTPCREL(%rip), %rax
LBB0_19:
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_20:
	movq	8(%rbx), %rax
	movq	_CYAPA_GEN3@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_25
## %bb.21:
	movq	(%rbx), %rcx
	movq	_CYAPA_STATE_OP@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_26
## %bb.22:
	movq	_CYAPA_STATE_BL_IDLE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_26
## %bb.23:
	movq	_CYAPA_STATE_BL_ACTIVE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_26
## %bb.24:
	movq	_CYAPA_STATE_BL_BUSY@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_26
LBB0_25:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_26:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CYAPA_STATE_NO_DEVICE,8,3      ## @CYAPA_STATE_NO_DEVICE
	.comm	_REG_BL_FILE,8,3                ## @REG_BL_FILE
	.comm	_BL_FILE,4,2                    ## @BL_FILE
	.comm	_REG_BL_ERROR,8,3               ## @REG_BL_ERROR
	.comm	_BL_ERROR_NO_ERR_IDLE,4,2       ## @BL_ERROR_NO_ERR_IDLE
	.comm	_REG_BL_STATUS,8,3              ## @REG_BL_STATUS
	.comm	_BL_STATUS_RUNNING,4,2          ## @BL_STATUS_RUNNING
	.comm	_BL_STATUS_CSUM_VALID,4,2       ## @BL_STATUS_CSUM_VALID
	.comm	_CYAPA_GEN3,8,3                 ## @CYAPA_GEN3
	.comm	_CYAPA_STATE_BL_IDLE,8,3        ## @CYAPA_STATE_BL_IDLE
	.comm	_BL_STATUS_BUSY,4,2             ## @BL_STATUS_BUSY
	.comm	_CYAPA_STATE_BL_BUSY,8,3        ## @CYAPA_STATE_BL_BUSY
	.comm	_BL_ERROR_BOOTLOADING,4,2       ## @BL_ERROR_BOOTLOADING
	.comm	_CYAPA_STATE_BL_ACTIVE,8,3      ## @CYAPA_STATE_BL_ACTIVE
	.comm	_REG_OP_STATUS,8,3              ## @REG_OP_STATUS
	.comm	_OP_STATUS_SRC,4,2              ## @OP_STATUS_SRC
	.comm	_REG_OP_DATA1,8,3               ## @REG_OP_DATA1
	.comm	_OP_DATA_VALID,4,2              ## @OP_DATA_VALID
	.comm	_GEN3_MAX_FINGERS,8,3           ## @GEN3_MAX_FINGERS
	.comm	_CYAPA_STATE_OP,8,3             ## @CYAPA_STATE_OP
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_cyapa_gen3_state_parse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cyapa_gen3_state_parse
_cyapa_gen3_state_parse:                ; @cyapa_gen3_state_parse
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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, _CYAPA_STATE_NO_DEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CYAPA_STATE_NO_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [x0]
Lloh3:
	adrp	x8, _REG_BL_FILE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_BL_FILE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w8, [x1, x8, lsl #2]
Lloh6:
	adrp	x9, _BL_FILE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BL_FILE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x20, _CYAPA_GEN3@GOTPAGE
Lloh10:
	ldr	x20, [x20, _CYAPA_GEN3@GOTPAGEOFF]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.1:
Lloh11:
	adrp	x8, _REG_BL_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REG_BL_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	w8, [x1, x8, lsl #2]
Lloh14:
	adrp	x9, _BL_ERROR_NO_ERR_IDLE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BL_ERROR_NO_ERR_IDLE@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x9]
Lloh17:
	adrp	x9, _REG_BL_STATUS@GOTPAGE
Lloh18:
	ldr	x9, [x9, _REG_BL_STATUS@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	ldr	w9, [x1, x9, lsl #2]
Lloh20:
	adrp	x10, _BL_STATUS_RUNNING@GOTPAGE
Lloh21:
	ldr	x10, [x10, _BL_STATUS_RUNNING@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	cmp	w8, w11
	b.ne	LBB0_4
; %bb.2:
Lloh23:
	adrp	x11, _BL_STATUS_CSUM_VALID@GOTPAGE
Lloh24:
	ldr	x11, [x11, _BL_STATUS_CSUM_VALID@GOTPAGEOFF]
Lloh25:
	ldr	w11, [x11]
	orr	w11, w11, w10
	cmp	w9, w10
	ccmp	w9, w11, #4, ne
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x20]
	str	x8, [x19, #8]
Lloh26:
	adrp	x8, _CYAPA_STATE_BL_IDLE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CYAPA_STATE_BL_IDLE@GOTPAGEOFF]
	b	LBB0_16
LBB0_4:
	bics	wzr, w10, w9
	b.ne	LBB0_7
; %bb.5:
	ldr	x10, [x20]
	str	x10, [x19, #8]
Lloh28:
	adrp	x10, _BL_STATUS_BUSY@GOTPAGE
Lloh29:
	ldr	x10, [x10, _BL_STATUS_BUSY@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_15
; %bb.6:
Lloh31:
	adrp	x9, _BL_ERROR_BOOTLOADING@GOTPAGE
Lloh32:
	ldr	x9, [x9, _BL_ERROR_BOOTLOADING@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
Lloh34:
	adrp	x10, _CYAPA_STATE_BL_IDLE@GOTPAGE
Lloh35:
	ldr	x10, [x10, _CYAPA_STATE_BL_IDLE@GOTPAGEOFF]
Lloh36:
	adrp	x11, _CYAPA_STATE_BL_ACTIVE@GOTPAGE
Lloh37:
	ldr	x11, [x11, _CYAPA_STATE_BL_ACTIVE@GOTPAGEOFF]
	bics	wzr, w9, w8
	csel	x8, x11, x10, eq
	b	LBB0_16
LBB0_7:
Lloh38:
	adrp	x8, _REG_OP_STATUS@GOTPAGE
Lloh39:
	ldr	x8, [x8, _REG_OP_STATUS@GOTPAGEOFF]
Lloh40:
	ldr	x8, [x8]
	ldr	w8, [x1, x8, lsl #2]
Lloh41:
	adrp	x9, _OP_STATUS_SRC@GOTPAGE
Lloh42:
	ldr	x9, [x9, _OP_STATUS_SRC@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.8:
Lloh44:
	adrp	x9, _REG_OP_DATA1@GOTPAGE
Lloh45:
	ldr	x9, [x9, _REG_OP_DATA1@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	ldr	w0, [x1, x9, lsl #2]
Lloh47:
	adrp	x9, _OP_DATA_VALID@GOTPAGE
Lloh48:
	ldr	x9, [x9, _OP_DATA_VALID@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	tst	w9, w0
	b.eq	LBB0_10
; %bb.9:
	bl	_GEN3_FINGER_NUM
Lloh50:
	adrp	x8, _GEN3_MAX_FINGERS@GOTPAGE
Lloh51:
	ldr	x8, [x8, _GEN3_MAX_FINGERS@GOTPAGEOFF]
Lloh52:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_12
	b	LBB0_17
LBB0_10:
	cmp	w8, #12
	b.ne	LBB0_13
; %bb.11:
Lloh53:
	adrp	x8, _REG_OP_DATA1@GOTPAGE
Lloh54:
	ldr	x8, [x8, _REG_OP_DATA1@GOTPAGEOFF]
Lloh55:
	ldr	x8, [x8]
	ldr	w8, [x1, x8, lsl #2]
	cmp	w8, #8
	b.ne	LBB0_13
LBB0_12:
	ldr	x8, [x20]
	str	x8, [x19, #8]
Lloh56:
	adrp	x8, _CYAPA_STATE_OP@GOTPAGE
Lloh57:
	ldr	x8, [x8, _CYAPA_STATE_OP@GOTPAGEOFF]
	b	LBB0_16
LBB0_13:
Lloh58:
	adrp	x8, _REG_BL_STATUS@GOTPAGE
Lloh59:
	ldr	x8, [x8, _REG_BL_STATUS@GOTPAGEOFF]
Lloh60:
	ldr	x8, [x8]
	ldr	w8, [x1, x8, lsl #2]
Lloh61:
	adrp	x9, _BL_STATUS_RUNNING@GOTPAGE
Lloh62:
	ldr	x9, [x9, _BL_STATUS_RUNNING@GOTPAGEOFF]
Lloh63:
	ldr	w9, [x9]
Lloh64:
	adrp	x10, _BL_STATUS_BUSY@GOTPAGE
Lloh65:
	ldr	x10, [x10, _BL_STATUS_BUSY@GOTPAGEOFF]
Lloh66:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_17
; %bb.14:
	ldr	x8, [x20]
	str	x8, [x19, #8]
LBB0_15:
Lloh67:
	adrp	x8, _CYAPA_STATE_BL_BUSY@GOTPAGE
Lloh68:
	ldr	x8, [x8, _CYAPA_STATE_BL_BUSY@GOTPAGEOFF]
LBB0_16:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_17:
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_22
; %bb.18:
	mov	w0, #0
	ldr	x8, [x19]
Lloh69:
	adrp	x9, _CYAPA_STATE_OP@GOTPAGE
Lloh70:
	ldr	x9, [x9, _CYAPA_STATE_OP@GOTPAGEOFF]
Lloh71:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_23
; %bb.19:
Lloh72:
	adrp	x9, _CYAPA_STATE_BL_IDLE@GOTPAGE
Lloh73:
	ldr	x9, [x9, _CYAPA_STATE_BL_IDLE@GOTPAGEOFF]
Lloh74:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_23
; %bb.20:
Lloh75:
	adrp	x9, _CYAPA_STATE_BL_ACTIVE@GOTPAGE
Lloh76:
	ldr	x9, [x9, _CYAPA_STATE_BL_ACTIVE@GOTPAGEOFF]
Lloh77:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_23
; %bb.21:
Lloh78:
	adrp	x9, _CYAPA_STATE_BL_BUSY@GOTPAGE
Lloh79:
	ldr	x9, [x9, _CYAPA_STATE_BL_BUSY@GOTPAGEOFF]
Lloh80:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_23
LBB0_22:
Lloh81:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh82:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh83:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_23:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGot	Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.cfi_endproc
                                        ; -- End function
	.comm	_CYAPA_STATE_NO_DEVICE,8,3      ; @CYAPA_STATE_NO_DEVICE
	.comm	_REG_BL_FILE,8,3                ; @REG_BL_FILE
	.comm	_BL_FILE,4,2                    ; @BL_FILE
	.comm	_REG_BL_ERROR,8,3               ; @REG_BL_ERROR
	.comm	_BL_ERROR_NO_ERR_IDLE,4,2       ; @BL_ERROR_NO_ERR_IDLE
	.comm	_REG_BL_STATUS,8,3              ; @REG_BL_STATUS
	.comm	_BL_STATUS_RUNNING,4,2          ; @BL_STATUS_RUNNING
	.comm	_BL_STATUS_CSUM_VALID,4,2       ; @BL_STATUS_CSUM_VALID
	.comm	_CYAPA_GEN3,8,3                 ; @CYAPA_GEN3
	.comm	_CYAPA_STATE_BL_IDLE,8,3        ; @CYAPA_STATE_BL_IDLE
	.comm	_BL_STATUS_BUSY,4,2             ; @BL_STATUS_BUSY
	.comm	_CYAPA_STATE_BL_BUSY,8,3        ; @CYAPA_STATE_BL_BUSY
	.comm	_BL_ERROR_BOOTLOADING,4,2       ; @BL_ERROR_BOOTLOADING
	.comm	_CYAPA_STATE_BL_ACTIVE,8,3      ; @CYAPA_STATE_BL_ACTIVE
	.comm	_REG_OP_STATUS,8,3              ; @REG_OP_STATUS
	.comm	_OP_STATUS_SRC,4,2              ; @OP_STATUS_SRC
	.comm	_REG_OP_DATA1,8,3               ; @REG_OP_DATA1
	.comm	_OP_DATA_VALID,4,2              ; @OP_DATA_VALID
	.comm	_GEN3_MAX_FINGERS,8,3           ; @GEN3_MAX_FINGERS
	.comm	_CYAPA_STATE_OP,8,3             ; @CYAPA_STATE_OP
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_cyapa_gen3_state_parse
.subsections_via_symbols
