	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen5_hid_description_header_parse
_gen5_hid_description_header_parse:     ## @gen5_hid_description_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	%r12
	pushq	%rbx
	subq	$272, %rsp                      ## imm = 0x110
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_PIP_HID_DESCRIPTOR_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	-304(%rbp), %rsi
	callq	_cyapa_i2c_pip_read
	cmpl	(%r12), %eax
	jne	LBB0_1
## %bb.2:
	movq	_PIP_RESP_LENGTH_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	-304(,%rax,8), %rdi
	addq	%rbp, %rdi
	callq	_get_unaligned_le16
	movl	%eax, %ebx
	leaq	-176(%rbp), %rdi
	callq	_get_unaligned_le16
	movq	_PIP_RESP_LENGTH_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	jne	LBB0_5
## %bb.3:
	movq	_PIP_RESP_REPORT_ID_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r14,%rax,8), %rax
	movq	_PIP_HID_BL_REPORT_ID@GOTPCREL(%rip), %rcx
	movq	_CYAPA_GEN5@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	(%rcx), %rax
	movq	%rdx, 8(%r15)
	jne	LBB0_12
## %bb.4:
	movq	_CYAPA_STATE_GEN5_BL@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_1:
	movl	%eax, %ecx
	movq	_EIO@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	subl	(%rdx), %eax
	testl	%ecx, %ecx
	cmovsl	%ecx, %eax
	jmp	LBB0_15
LBB0_5:
	cmpl	(%r12), %ebx
	jne	LBB0_13
## %bb.6:
	movq	-288(%rbp), %rcx
	movq	_PIP_HID_BL_REPORT_ID@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_9
## %bb.7:
	movq	_GEN5_BL_MAX_OUTPUT_LENGTH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.8:
	movq	_CYAPA_GEN5@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
	movq	_CYAPA_STATE_GEN5_BL@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_9:
	movq	_PIP_RESP_REPORT_ID_OFFSET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	-304(%rbp,%rcx,8), %rcx
	movq	_PIP_HID_APP_REPORT_ID@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_13
## %bb.10:
	movq	_GEN5_APP_MAX_OUTPUT_LENGTH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.11:
	movq	_CYAPA_GEN5@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
LBB0_12:
	movq	_CYAPA_STATE_GEN5_APP@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_13:
	movq	_CYAPA_STATE_NO_DEVICE@GOTPCREL(%rip), %rax
LBB0_14:
	movq	(%rax), %rax
	movq	%rax, (%r15)
	xorl	%eax, %eax
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_17
## %bb.16:
	addq	$272, %rsp                      ## imm = 0x110
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PIP_HID_DESCRIPTOR_SIZE,4,2    ## @PIP_HID_DESCRIPTOR_SIZE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_PIP_RESP_LENGTH_OFFSET,8,3     ## @PIP_RESP_LENGTH_OFFSET
	.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_HID_BL_REPORT_ID,8,3       ## @PIP_HID_BL_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	_GEN5_BL_MAX_OUTPUT_LENGTH,4,2  ## @GEN5_BL_MAX_OUTPUT_LENGTH
	.comm	_PIP_HID_APP_REPORT_ID,8,3      ## @PIP_HID_APP_REPORT_ID
	.comm	_GEN5_APP_MAX_OUTPUT_LENGTH,4,2 ## @GEN5_APP_MAX_OUTPUT_LENGTH
	.comm	_CYAPA_STATE_NO_DEVICE,8,3      ## @CYAPA_STATE_NO_DEVICE
	.no_dead_strip	_gen5_hid_description_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_hid_description_header_parse
_gen5_hid_description_header_parse:     ; @gen5_hid_description_header_parse
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #336
	.cfi_def_cfa_offset 336
	stp	x24, x23, [sp, #272]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #288]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #304]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #320]            ; 16-byte Folded Spill
	add	x29, sp, #320
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	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, #-56]
Lloh3:
	adrp	x22, _PIP_HID_DESCRIPTOR_SIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PIP_HID_DESCRIPTOR_SIZE@GOTPAGEOFF]
	ldr	w2, [x22]
	add	x23, sp, #8
	add	x1, sp, #8
	bl	_cyapa_i2c_pip_read
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.1:
Lloh5:
	adrp	x8, _PIP_RESP_LENGTH_OFFSET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PIP_RESP_LENGTH_OFFSET@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	add	x0, x23, x8, lsl #3
	bl	_get_unaligned_le16
	mov	x21, x0
	add	x0, x23, #128
	bl	_get_unaligned_le16
Lloh8:
	adrp	x8, _PIP_RESP_LENGTH_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PIP_RESP_LENGTH_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_5
; %bb.2:
Lloh11:
	adrp	x8, _PIP_RESP_REPORT_ID_OFFSET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PIP_RESP_REPORT_ID_OFFSET@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	x8, [x20, x8, lsl #3]
Lloh14:
	adrp	x9, _PIP_HID_BL_REPORT_ID@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PIP_HID_BL_REPORT_ID@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
Lloh17:
	adrp	x10, _CYAPA_GEN5@GOTPAGE
Lloh18:
	ldr	x10, [x10, _CYAPA_GEN5@GOTPAGEOFF]
Lloh19:
	ldr	x10, [x10]
	str	x10, [x19, #8]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.3:
	mov	w0, #0
Lloh20:
	adrp	x8, _CYAPA_STATE_GEN5_BL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CYAPA_STATE_GEN5_BL@GOTPAGEOFF]
	b	LBB0_10
LBB0_4:
Lloh22:
	adrp	x8, _EIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, w0, w8, lt
	b	LBB0_11
LBB0_5:
	ldr	w8, [x22]
	cmp	w21, w8
	b.ne	LBB0_8
; %bb.6:
	ldr	x8, [sp, #24]
Lloh25:
	adrp	x9, _PIP_HID_BL_REPORT_ID@GOTPAGE
Lloh26:
	ldr	x9, [x9, _PIP_HID_BL_REPORT_ID@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
Lloh28:
	adrp	x10, _GEN5_BL_MAX_OUTPUT_LENGTH@GOTPAGE
Lloh29:
	ldr	x10, [x10, _GEN5_BL_MAX_OUTPUT_LENGTH@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	cmp	x8, x9
	ccmp	w0, w10, #0, eq
	b.eq	LBB0_13
; %bb.7:
Lloh31:
	adrp	x8, _PIP_RESP_REPORT_ID_OFFSET@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PIP_RESP_REPORT_ID_OFFSET@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	add	x9, sp, #8
	ldr	x8, [x9, x8, lsl #3]
Lloh34:
	adrp	x9, _PIP_HID_APP_REPORT_ID@GOTPAGE
Lloh35:
	ldr	x9, [x9, _PIP_HID_APP_REPORT_ID@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
Lloh37:
	adrp	x10, _GEN5_APP_MAX_OUTPUT_LENGTH@GOTPAGE
Lloh38:
	ldr	x10, [x10, _GEN5_APP_MAX_OUTPUT_LENGTH@GOTPAGEOFF]
Lloh39:
	ldr	w10, [x10]
	cmp	x8, x9
	ccmp	w0, w10, #0, eq
	b.eq	LBB0_14
LBB0_8:
	mov	w0, #0
Lloh40:
	adrp	x8, _CYAPA_STATE_NO_DEVICE@GOTPAGE
Lloh41:
	ldr	x8, [x8, _CYAPA_STATE_NO_DEVICE@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
	mov	w0, #0
Lloh42:
	adrp	x8, _CYAPA_STATE_GEN5_APP@GOTPAGE
Lloh43:
	ldr	x8, [x8, _CYAPA_STATE_GEN5_APP@GOTPAGEOFF]
LBB0_10:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_11:
	ldur	x8, [x29, #-56]
Lloh44:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh45:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.12:
	ldp	x29, x30, [sp, #320]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #304]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #288]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #272]            ; 16-byte Folded Reload
	add	sp, sp, #336
	ret
LBB0_13:
	mov	w0, #0
Lloh47:
	adrp	x8, _CYAPA_GEN5@GOTPAGE
Lloh48:
	ldr	x8, [x8, _CYAPA_GEN5@GOTPAGEOFF]
Lloh49:
	ldr	x8, [x8]
Lloh50:
	adrp	x9, _CYAPA_STATE_GEN5_BL@GOTPAGE
Lloh51:
	ldr	x9, [x9, _CYAPA_STATE_GEN5_BL@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
	mov	w0, #0
Lloh52:
	adrp	x8, _CYAPA_GEN5@GOTPAGE
Lloh53:
	ldr	x8, [x8, _CYAPA_GEN5@GOTPAGEOFF]
Lloh54:
	ldr	x8, [x8]
Lloh55:
	adrp	x9, _CYAPA_STATE_GEN5_APP@GOTPAGE
Lloh56:
	ldr	x9, [x9, _CYAPA_STATE_GEN5_APP@GOTPAGEOFF]
LBB0_15:
	ldr	x9, [x9]
	stp	x9, x8, [x19]
	b	LBB0_11
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.cfi_endproc
                                        ; -- End function
	.comm	_PIP_HID_DESCRIPTOR_SIZE,4,2    ; @PIP_HID_DESCRIPTOR_SIZE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_PIP_RESP_LENGTH_OFFSET,8,3     ; @PIP_RESP_LENGTH_OFFSET
	.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_HID_BL_REPORT_ID,8,3       ; @PIP_HID_BL_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	_GEN5_BL_MAX_OUTPUT_LENGTH,4,2  ; @GEN5_BL_MAX_OUTPUT_LENGTH
	.comm	_PIP_HID_APP_REPORT_ID,8,3      ; @PIP_HID_APP_REPORT_ID
	.comm	_GEN5_APP_MAX_OUTPUT_LENGTH,4,2 ; @GEN5_APP_MAX_OUTPUT_LENGTH
	.comm	_CYAPA_STATE_NO_DEVICE,8,3      ; @CYAPA_STATE_NO_DEVICE
	.no_dead_strip	_gen5_hid_description_header_parse
.subsections_via_symbols
