	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cypress_read_tp_metrics
_cypress_read_tp_metrics:               ## @cypress_read_tp_metrics
	.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	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	(%rdi), %rbx
	movq	_CYTP_DEFAULT_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, (%rbx)
	movq	_CYTP_DEFAULT_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 4(%rbx)
	movq	_CYTP_ABS_MAX_X@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	_CYTP_ABS_MAX_Y@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rbx)
	movq	_CYTP_MIN_PRESSURE@GOTPCREL(%rip), %rdx
	movb	(%rdx), %dl
	movb	%dl, 16(%rbx)
	movq	_CYTP_MAX_PRESSURE@GOTPCREL(%rip), %rdx
	movb	(%rdx), %dl
	movb	%dl, 17(%rbx)
	cltd
	idivl	%esi
	movl	%eax, 20(%rbx)
	movl	%ecx, %eax
	cltd
	idivl	%edi
	movl	%eax, 24(%rbx)
	cmpl	$0, 28(%rbx)
	je	LBB0_14
## %bb.1:
	leaq	-40(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_CYTP_CMD_READ_TP_METRICS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_cypress_send_ext_cmd
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movb	17(%rbx), %al
	testb	%al, %al
	jne	LBB0_5
	jmp	LBB0_12
LBB0_2:
	movzwl	-40(%rbp), %eax
	movl	%eax, 8(%rbx)
	movzwl	-38(%rbp), %eax
	movl	%eax, 12(%rbx)
	movb	-36(%rbp), %al
	movb	%al, 16(%rbx)
	movb	-35(%rbp), %al
	movb	%al, 17(%rbx)
	testb	%al, %al
	je	LBB0_12
LBB0_5:
	cmpb	16(%rbx), %al
	jb	LBB0_12
## %bb.6:
	movl	(%rbx), %esi
	testl	%esi, %esi
	je	LBB0_12
## %bb.7:
	movl	4(%rbx), %edi
	testl	%edi, %edi
	je	LBB0_12
## %bb.8:
	movl	8(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_12
## %bb.9:
	cmpl	%esi, %eax
	jl	LBB0_12
## %bb.10:
	movl	12(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_12
## %bb.11:
	cmpl	%edi, %ecx
	jl	LBB0_12
## %bb.13:
	cltd
	idivl	%esi
	movl	%eax, 20(%rbx)
	movl	%ecx, %eax
	cltd
	idivl	%edi
	movl	%eax, 24(%rbx)
LBB0_14:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_17
## %bb.16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CYTP_DEFAULT_WIDTH,4,2         ## @CYTP_DEFAULT_WIDTH
	.comm	_CYTP_DEFAULT_HIGH,4,2          ## @CYTP_DEFAULT_HIGH
	.comm	_CYTP_ABS_MAX_X,4,2             ## @CYTP_ABS_MAX_X
	.comm	_CYTP_ABS_MAX_Y,4,2             ## @CYTP_ABS_MAX_Y
	.comm	_CYTP_MIN_PRESSURE,1,0          ## @CYTP_MIN_PRESSURE
	.comm	_CYTP_MAX_PRESSURE,1,0          ## @CYTP_MAX_PRESSURE
	.comm	_CYTP_CMD_READ_TP_METRICS,4,2   ## @CYTP_CMD_READ_TP_METRICS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TP_METRICS_BIT_1F_JITTER,1,0   ## @TP_METRICS_BIT_1F_JITTER
	.comm	_TP_METRICS_BIT_1F_SPIKE,1,0    ## @TP_METRICS_BIT_1F_SPIKE
	.comm	_TP_METRICS_BIT_2F_JITTER,1,0   ## @TP_METRICS_BIT_2F_JITTER
	.comm	_TP_METRICS_BIT_2F_SPIKE,1,0    ## @TP_METRICS_BIT_2F_SPIKE
	.comm	_TP_METRICS_BIT_ABS_PKT_FORMAT_SET,1,0 ## @TP_METRICS_BIT_ABS_PKT_FORMAT_SET
	.comm	_TP_METRICS_BIT_APA,1,0         ## @TP_METRICS_BIT_APA
	.comm	_TP_METRICS_BIT_MTG,1,0         ## @TP_METRICS_BIT_MTG
	.comm	_TP_METRICS_BIT_PALM,1,0        ## @TP_METRICS_BIT_PALM
	.comm	_TP_METRICS_BIT_STUBBORN,1,0    ## @TP_METRICS_BIT_STUBBORN
	.no_dead_strip	_cypress_read_tp_metrics
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cypress_read_tp_metrics
_cypress_read_tp_metrics:               ; @cypress_read_tp_metrics
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	ldr	x20, [x0]
Lloh3:
	adrp	x8, _CYTP_DEFAULT_WIDTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CYTP_DEFAULT_WIDTH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _CYTP_DEFAULT_HIGH@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CYTP_DEFAULT_HIGH@GOTPAGEOFF]
	str	w8, [x20]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _CYTP_ABS_MAX_X@GOTPAGE
Lloh10:
	ldr	x10, [x10, _CYTP_ABS_MAX_X@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	stp	w9, w10, [x20, #4]
Lloh12:
	adrp	x11, _CYTP_ABS_MAX_Y@GOTPAGE
Lloh13:
	ldr	x11, [x11, _CYTP_ABS_MAX_Y@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
Lloh15:
	adrp	x12, _CYTP_MIN_PRESSURE@GOTPAGE
Lloh16:
	ldr	x12, [x12, _CYTP_MIN_PRESSURE@GOTPAGEOFF]
	str	w11, [x20, #12]
	ldrb	w12, [x12]
	strb	w12, [x20, #16]
Lloh17:
	adrp	x12, _CYTP_MAX_PRESSURE@GOTPAGE
Lloh18:
	ldr	x12, [x12, _CYTP_MAX_PRESSURE@GOTPAGEOFF]
	ldrb	w12, [x12]
	strb	w12, [x20, #17]
	sdiv	w8, w10, w8
	sdiv	w9, w11, w9
	stp	w8, w9, [x20, #20]
	ldr	w8, [x20, #28]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh19:
	adrp	x8, _CYTP_CMD_READ_TP_METRICS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CYTP_CMD_READ_TP_METRICS@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	bl	_cypress_send_ext_cmd
	cbz	x0, LBB0_4
; %bb.2:
	ldrb	w8, [x20, #17]
	cbnz	w8, LBB0_5
	b	LBB0_13
LBB0_3:
	mov	w0, #0
	b	LBB0_14
LBB0_4:
	ldrh	w8, [sp]
	ldrh	w9, [sp, #2]
	stp	w8, w9, [x20, #8]
	ldrb	w8, [sp, #4]
	strb	w8, [x20, #16]
	ldrb	w8, [sp, #5]
	strb	w8, [x20, #17]
	cbz	w8, LBB0_13
LBB0_5:
	ldrb	w9, [x20, #16]
	cmp	w8, w9
	b.lo	LBB0_13
; %bb.6:
	ldr	w8, [x20]
	cbz	w8, LBB0_13
; %bb.7:
	ldr	w9, [x20, #4]
	cbz	w9, LBB0_13
; %bb.8:
	ldr	w10, [x20, #8]
	cbz	w10, LBB0_13
; %bb.9:
	cmp	w10, w8
	b.lt	LBB0_13
; %bb.10:
	ldr	w11, [x20, #12]
	cbz	w11, LBB0_13
; %bb.11:
	cmp	w11, w9
	b.lt	LBB0_13
; %bb.12:
	mov	w0, #0
	sdiv	w8, w10, w8
	sdiv	w9, w11, w9
	stp	w8, w9, [x20, #20]
	b	LBB0_14
LBB0_13:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldr	x8, [sp, #8]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_CYTP_DEFAULT_WIDTH,4,2         ; @CYTP_DEFAULT_WIDTH
	.comm	_CYTP_DEFAULT_HIGH,4,2          ; @CYTP_DEFAULT_HIGH
	.comm	_CYTP_ABS_MAX_X,4,2             ; @CYTP_ABS_MAX_X
	.comm	_CYTP_ABS_MAX_Y,4,2             ; @CYTP_ABS_MAX_Y
	.comm	_CYTP_MIN_PRESSURE,1,0          ; @CYTP_MIN_PRESSURE
	.comm	_CYTP_MAX_PRESSURE,1,0          ; @CYTP_MAX_PRESSURE
	.comm	_CYTP_CMD_READ_TP_METRICS,4,2   ; @CYTP_CMD_READ_TP_METRICS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TP_METRICS_BIT_1F_JITTER,1,0   ; @TP_METRICS_BIT_1F_JITTER
	.comm	_TP_METRICS_BIT_1F_SPIKE,1,0    ; @TP_METRICS_BIT_1F_SPIKE
	.comm	_TP_METRICS_BIT_2F_JITTER,1,0   ; @TP_METRICS_BIT_2F_JITTER
	.comm	_TP_METRICS_BIT_2F_SPIKE,1,0    ; @TP_METRICS_BIT_2F_SPIKE
	.comm	_TP_METRICS_BIT_ABS_PKT_FORMAT_SET,1,0 ; @TP_METRICS_BIT_ABS_PKT_FORMAT_SET
	.comm	_TP_METRICS_BIT_APA,1,0         ; @TP_METRICS_BIT_APA
	.comm	_TP_METRICS_BIT_MTG,1,0         ; @TP_METRICS_BIT_MTG
	.comm	_TP_METRICS_BIT_PALM,1,0        ; @TP_METRICS_BIT_PALM
	.comm	_TP_METRICS_BIT_STUBBORN,1,0    ; @TP_METRICS_BIT_STUBBORN
	.no_dead_strip	_cypress_read_tp_metrics
.subsections_via_symbols
