	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cypress_read_fw_version
_cypress_read_fw_version:               ## @cypress_read_fw_version
	.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	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	movq	_CYTP_CMD_READ_CYPRESS_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-19(%rbp), %rdx
	callq	_cypress_send_ext_cmd
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_2:
	cmpb	$51, -19(%rbp)
	jne	LBB0_1
## %bb.3:
	cmpb	$-52, -18(%rbp)
	jne	LBB0_1
## %bb.4:
	movq	_FW_VERSION_MASX@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	andb	-17(%rbp), %al
	movzbl	%al, %edx
	movb	%dl, (%r14)
	movq	_TP_METRICS_MASK@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	andb	-17(%rbp), %al
	setne	%al
	cmpb	$11, %dl
	setb	%cl
	andb	%al, %cl
	movzbl	%cl, %eax
	movl	%eax, 4(%r14)
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_psmouse_dbg
	movl	4(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_psmouse_dbg
	xorl	%eax, %eax
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CYTP_CMD_READ_CYPRESS_ID,4,2   ## @CYTP_CMD_READ_CYPRESS_ID
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_FW_VERSION_MASX,1,0            ## @FW_VERSION_MASX
	.comm	_TP_METRICS_MASK,1,0            ## @TP_METRICS_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cytp->fw_version = %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"cytp->tp_metrics_supported = %d\n"

	.no_dead_strip	_cypress_read_fw_version
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cypress_read_fw_version
_cypress_read_fw_version:               ; @cypress_read_fw_version
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _CYTP_CMD_READ_CYPRESS_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CYTP_CMD_READ_CYPRESS_ID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #13
	bl	_cypress_send_ext_cmd
	cbz	x0, LBB0_2
LBB0_1:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	ldrb	w8, [sp, #13]
	cmp	w8, #51
	b.ne	LBB0_1
; %bb.3:
	ldrb	w8, [sp, #14]
	cmp	w8, #204
	b.ne	LBB0_1
; %bb.4:
Lloh6:
	adrp	x8, _FW_VERSION_MASX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FW_VERSION_MASX@GOTPAGEOFF]
	ldrb	w9, [sp, #15]
	ldrb	w8, [x8]
	and	w2, w8, w9
	strb	w2, [x20]
Lloh8:
	adrp	x8, _TP_METRICS_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TP_METRICS_MASK@GOTPAGEOFF]
	ldrb	w9, [sp, #15]
	ldrb	w8, [x8]
	tst	w8, w9
	ccmp	w2, #11, #2, ne
	cset	w8, lo
	str	w8, [x20, #4]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_psmouse_dbg
	ldr	w2, [x20, #4]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_psmouse_dbg
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CYTP_CMD_READ_CYPRESS_ID,4,2   ; @CYTP_CMD_READ_CYPRESS_ID
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_FW_VERSION_MASX,1,0            ; @FW_VERSION_MASX
	.comm	_TP_METRICS_MASK,1,0            ; @TP_METRICS_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cytp->fw_version = %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"cytp->tp_metrics_supported = %d\n"

	.no_dead_strip	_cypress_read_fw_version
.subsections_via_symbols
