	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen5_cmd_resp_header_parse
_gen5_cmd_resp_header_parse:            ## @gen5_cmd_resp_header_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_PIP_RESP_LENGTH_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rsi,%rax,8), %rdi
	callq	_get_unaligned_le16
	movl	%eax, %ebx
	movq	16(%r14), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_cyapa_i2c_pip_read
	cmpl	%ebx, %eax
	jne	LBB0_1
## %bb.2:
	movq	_PIP_RESP_LENGTH_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_5
## %bb.3:
	movq	_PIP_RESP_REPORT_ID_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r15,%rax,8), %rax
	movq	_PIP_BL_RESP_REPORT_ID@GOTPCREL(%rip), %rcx
	movq	_CYAPA_GEN5@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	(%rcx), %rax
	movq	%rdx, 8(%r14)
	jne	LBB0_13
## %bb.4:
	movq	_CYAPA_STATE_GEN5_BL@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_1:
	movl	%eax, %ecx
	movq	_EIO@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	subl	(%rdx), %eax
	testl	%ecx, %ecx
	cmovsl	%ecx, %eax
	jmp	LBB0_16
LBB0_5:
	movq	16(%r14), %rax
	movq	_PIP_RESP_REPORT_ID_OFFSET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rcx
	movq	_PIP_BL_RESP_REPORT_ID@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_10
## %bb.6:
	movq	_PIP_RESP_RSVD_OFFSET@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	_PIP_RESP_RSVD_KEY@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_10
## %bb.7:
	movq	_PIP_RESP_BL_SOP_OFFSET@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	_PIP_SOP_KEY@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_10
## %bb.8:
	movslq	%ebx, %rdx
	movq	-8(%rax,%rdx,8), %rdx
	movq	_PIP_EOP_KEY@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_10
## %bb.9:
	movq	_CYAPA_GEN5@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	movq	_CYAPA_STATE_GEN5_BL@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_10:
	movq	_PIP_APP_RESP_REPORT_ID@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_14
## %bb.11:
	movq	_PIP_RESP_RSVD_OFFSET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	_PIP_RESP_RSVD_KEY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.12:
	movq	_CYAPA_GEN5@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
LBB0_13:
	movq	_CYAPA_STATE_GEN5_APP@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_14:
	movq	_CYAPA_STATE_NO_DEVICE@GOTPCREL(%rip), %rax
LBB0_15:
	movq	(%rax), %rax
	movq	%rax, (%r14)
	xorl	%eax, %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PIP_RESP_LENGTH_OFFSET,8,3     ## @PIP_RESP_LENGTH_OFFSET
	.comm	_EIO,4,2                        ## @EIO
	.comm	_PIP_RESP_LENGTH_SIZE,4,2       ## @PIP_RESP_LENGTH_SIZE
	.comm	_PIP_RESP_REPORT_ID_OFFSET,8,3  ## @PIP_RESP_REPORT_ID_OFFSET
	.comm	_PIP_BL_RESP_REPORT_ID,8,3      ## @PIP_BL_RESP_REPORT_ID
	.comm	_CYAPA_GEN5,8,3                 ## @CYAPA_GEN5
	.comm	_CYAPA_STATE_GEN5_BL,8,3        ## @CYAPA_STATE_GEN5_BL
	.comm	_CYAPA_STATE_GEN5_APP,8,3       ## @CYAPA_STATE_GEN5_APP
	.comm	_PIP_RESP_RSVD_OFFSET,8,3       ## @PIP_RESP_RSVD_OFFSET
	.comm	_PIP_RESP_RSVD_KEY,8,3          ## @PIP_RESP_RSVD_KEY
	.comm	_PIP_RESP_BL_SOP_OFFSET,8,3     ## @PIP_RESP_BL_SOP_OFFSET
	.comm	_PIP_SOP_KEY,8,3                ## @PIP_SOP_KEY
	.comm	_PIP_EOP_KEY,8,3                ## @PIP_EOP_KEY
	.comm	_PIP_APP_RESP_REPORT_ID,8,3     ## @PIP_APP_RESP_REPORT_ID
	.comm	_CYAPA_STATE_NO_DEVICE,8,3      ## @CYAPA_STATE_NO_DEVICE
	.no_dead_strip	_gen5_cmd_resp_header_parse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen5_cmd_resp_header_parse
_gen5_cmd_resp_header_parse:            ; @gen5_cmd_resp_header_parse
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PIP_RESP_LENGTH_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PIP_RESP_LENGTH_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x0, x1, x8, lsl #3
	bl	_get_unaligned_le16
	mov	x20, x0
	ldr	x1, [x19, #16]
	mov	x0, x19
	mov	x2, x20
	bl	_cyapa_i2c_pip_read
	cmp	w0, w20
	b.ne	LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _PIP_RESP_LENGTH_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PIP_RESP_LENGTH_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_5
; %bb.2:
Lloh6:
	adrp	x8, _PIP_RESP_REPORT_ID_OFFSET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PIP_RESP_REPORT_ID_OFFSET@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x8, [x21, x8, lsl #3]
Lloh9:
	adrp	x9, _PIP_BL_RESP_REPORT_ID@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PIP_BL_RESP_REPORT_ID@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, _CYAPA_GEN5@GOTPAGE
Lloh13:
	ldr	x10, [x10, _CYAPA_GEN5@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	str	x10, [x19, #8]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.3:
	mov	w0, #0
Lloh15:
	adrp	x8, _CYAPA_STATE_GEN5_BL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CYAPA_STATE_GEN5_BL@GOTPAGEOFF]
	b	LBB0_16
LBB0_4:
Lloh17:
	adrp	x8, _EIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, w0, w8, lt
	b	LBB0_17
LBB0_5:
	ldr	x8, [x19, #16]
Lloh20:
	adrp	x9, _PIP_RESP_REPORT_ID_OFFSET@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PIP_RESP_REPORT_ID_OFFSET@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	ldr	x9, [x8, x9, lsl #3]
Lloh23:
	adrp	x10, _PIP_BL_RESP_REPORT_ID@GOTPAGE
Lloh24:
	ldr	x10, [x10, _PIP_BL_RESP_REPORT_ID@GOTPAGEOFF]
Lloh25:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_10
; %bb.6:
Lloh26:
	adrp	x10, _PIP_RESP_RSVD_OFFSET@GOTPAGE
Lloh27:
	ldr	x10, [x10, _PIP_RESP_RSVD_OFFSET@GOTPAGEOFF]
Lloh28:
	ldr	x10, [x10]
	ldr	x10, [x8, x10, lsl #3]
Lloh29:
	adrp	x11, _PIP_RESP_RSVD_KEY@GOTPAGE
Lloh30:
	ldr	x11, [x11, _PIP_RESP_RSVD_KEY@GOTPAGEOFF]
Lloh31:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_10
; %bb.7:
Lloh32:
	adrp	x10, _PIP_RESP_BL_SOP_OFFSET@GOTPAGE
Lloh33:
	ldr	x10, [x10, _PIP_RESP_BL_SOP_OFFSET@GOTPAGEOFF]
Lloh34:
	ldr	x10, [x10]
	ldr	x10, [x8, x10, lsl #3]
Lloh35:
	adrp	x11, _PIP_SOP_KEY@GOTPAGE
Lloh36:
	ldr	x11, [x11, _PIP_SOP_KEY@GOTPAGEOFF]
Lloh37:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_10
; %bb.8:
	sub	w10, w20, #1
	ldr	x10, [x8, w10, sxtw #3]
Lloh38:
	adrp	x11, _PIP_EOP_KEY@GOTPAGE
Lloh39:
	ldr	x11, [x11, _PIP_EOP_KEY@GOTPAGEOFF]
Lloh40:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_10
; %bb.9:
	mov	w0, #0
Lloh41:
	adrp	x8, _CYAPA_GEN5@GOTPAGE
Lloh42:
	ldr	x8, [x8, _CYAPA_GEN5@GOTPAGEOFF]
Lloh43:
	ldr	x8, [x8]
Lloh44:
	adrp	x9, _CYAPA_STATE_GEN5_BL@GOTPAGE
Lloh45:
	ldr	x9, [x9, _CYAPA_STATE_GEN5_BL@GOTPAGEOFF]
	b	LBB0_13
LBB0_10:
Lloh46:
	adrp	x10, _PIP_APP_RESP_REPORT_ID@GOTPAGE
Lloh47:
	ldr	x10, [x10, _PIP_APP_RESP_REPORT_ID@GOTPAGEOFF]
Lloh48:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_14
; %bb.11:
Lloh49:
	adrp	x9, _PIP_RESP_RSVD_OFFSET@GOTPAGE
Lloh50:
	ldr	x9, [x9, _PIP_RESP_RSVD_OFFSET@GOTPAGEOFF]
Lloh51:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
Lloh52:
	adrp	x9, _PIP_RESP_RSVD_KEY@GOTPAGE
Lloh53:
	ldr	x9, [x9, _PIP_RESP_RSVD_KEY@GOTPAGEOFF]
Lloh54:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.12:
	mov	w0, #0
Lloh55:
	adrp	x8, _CYAPA_GEN5@GOTPAGE
Lloh56:
	ldr	x8, [x8, _CYAPA_GEN5@GOTPAGEOFF]
Lloh57:
	ldr	x8, [x8]
Lloh58:
	adrp	x9, _CYAPA_STATE_GEN5_APP@GOTPAGE
Lloh59:
	ldr	x9, [x9, _CYAPA_STATE_GEN5_APP@GOTPAGEOFF]
LBB0_13:
	ldr	x9, [x9]
	stp	x9, x8, [x19]
	b	LBB0_17
LBB0_14:
	mov	w0, #0
Lloh60:
	adrp	x8, _CYAPA_STATE_NO_DEVICE@GOTPAGE
Lloh61:
	ldr	x8, [x8, _CYAPA_STATE_NO_DEVICE@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
	mov	w0, #0
Lloh62:
	adrp	x8, _CYAPA_STATE_GEN5_APP@GOTPAGE
Lloh63:
	ldr	x8, [x8, _CYAPA_STATE_GEN5_APP@GOTPAGEOFF]
LBB0_16:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_17:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh60, Lloh61
	.loh AdrpLdrGot	Lloh62, Lloh63
	.cfi_endproc
                                        ; -- End function
	.comm	_PIP_RESP_LENGTH_OFFSET,8,3     ; @PIP_RESP_LENGTH_OFFSET
	.comm	_EIO,4,2                        ; @EIO
	.comm	_PIP_RESP_LENGTH_SIZE,4,2       ; @PIP_RESP_LENGTH_SIZE
	.comm	_PIP_RESP_REPORT_ID_OFFSET,8,3  ; @PIP_RESP_REPORT_ID_OFFSET
	.comm	_PIP_BL_RESP_REPORT_ID,8,3      ; @PIP_BL_RESP_REPORT_ID
	.comm	_CYAPA_GEN5,8,3                 ; @CYAPA_GEN5
	.comm	_CYAPA_STATE_GEN5_BL,8,3        ; @CYAPA_STATE_GEN5_BL
	.comm	_CYAPA_STATE_GEN5_APP,8,3       ; @CYAPA_STATE_GEN5_APP
	.comm	_PIP_RESP_RSVD_OFFSET,8,3       ; @PIP_RESP_RSVD_OFFSET
	.comm	_PIP_RESP_RSVD_KEY,8,3          ; @PIP_RESP_RSVD_KEY
	.comm	_PIP_RESP_BL_SOP_OFFSET,8,3     ; @PIP_RESP_BL_SOP_OFFSET
	.comm	_PIP_SOP_KEY,8,3                ; @PIP_SOP_KEY
	.comm	_PIP_EOP_KEY,8,3                ; @PIP_EOP_KEY
	.comm	_PIP_APP_RESP_REPORT_ID,8,3     ; @PIP_APP_RESP_REPORT_ID
	.comm	_CYAPA_STATE_NO_DEVICE,8,3      ; @CYAPA_STATE_NO_DEVICE
	.no_dead_strip	_gen5_cmd_resp_header_parse
.subsections_via_symbols
