	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alps_update_device_area_ss4_v2
_alps_update_device_area_ss4_v2:        ## @alps_update_device_area_ss4_v2
	.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
	movl	16(%rsi), %edi
	callq	_IS_SS4PLUS_DEV
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_SS4PLUS_NUMSENSOR_XOFFSET@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	movzbl	2(%r14), %edx
	movl	%edx, %ecx
	andl	$15, %ecx
	movq	_SS4PLUS_NUMSENSOR_YOFFSET@GOTPCREL(%rip), %rsi
	movzbl	(%rsi), %esi
	shrl	$4, %edx
	leal	(%rcx,%rax), %r8d
	decl	%r8d
	movq	_SS4PLUS_COUNT_PER_ELECTRODE@GOTPCREL(%rip), %rdi
	movl	(%rdi), %eax
	imull	%r8d, %eax
	movl	%eax, (%r15)
	addl	%edx, %esi
	decl	%esi
	movl	(%rdi), %edi
	imull	%esi, %edi
	movl	%edi, 4(%r15)
	movzbl	1(%r14), %edx
	movl	%edx, %ebx
	andl	$15, %ebx
	movq	_SS4PLUS_MIN_PITCH_MM@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	addl	%ecx, %ebx
	shrl	$4, %edx
	jmp	LBB0_3
LBB0_2:
	movq	_SS4_NUMSENSOR_XOFFSET@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	movzbl	4(%r14), %ecx
	movl	%ecx, %edx
	andl	$15, %edx
	movq	_SS4_NUMSENSOR_YOFFSET@GOTPCREL(%rip), %rsi
	movzbl	(%rsi), %esi
	shrl	$4, %ecx
	leal	(%rdx,%rax), %r8d
	decl	%r8d
	movq	_SS4_COUNT_PER_ELECTRODE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %eax
	imull	%r8d, %eax
	movl	%eax, (%r15)
	addl	%ecx, %esi
	decl	%esi
	movl	(%rdx), %edi
	imull	%esi, %edi
	movl	%edi, 4(%r15)
	movzbl	6(%r14), %edx
	movl	%edx, %ebx
	shrl	$2, %ebx
	andl	$7, %ebx
	movq	_SS4_MIN_PITCH_MM@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	addl	%ecx, %ebx
	shrl	$5, %edx
LBB0_3:
	addl	%ecx, %edx
	imull	%edx, %esi
	imull	%ebx, %r8d
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	cltd
	idivl	%r8d
	movl	%eax, 8(%r15)
	addl	%edi, %edi
	leal	(%rdi,%rdi,4), %eax
	cltd
	idivl	%esi
	movl	%eax, 12(%r15)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SS4PLUS_NUMSENSOR_XOFFSET,1,0  ## @SS4PLUS_NUMSENSOR_XOFFSET
	.comm	_SS4PLUS_NUMSENSOR_YOFFSET,1,0  ## @SS4PLUS_NUMSENSOR_YOFFSET
	.comm	_SS4PLUS_COUNT_PER_ELECTRODE,4,2 ## @SS4PLUS_COUNT_PER_ELECTRODE
	.comm	_SS4PLUS_MIN_PITCH_MM,1,0       ## @SS4PLUS_MIN_PITCH_MM
	.comm	_SS4_NUMSENSOR_XOFFSET,1,0      ## @SS4_NUMSENSOR_XOFFSET
	.comm	_SS4_NUMSENSOR_YOFFSET,1,0      ## @SS4_NUMSENSOR_YOFFSET
	.comm	_SS4_COUNT_PER_ELECTRODE,4,2    ## @SS4_COUNT_PER_ELECTRODE
	.comm	_SS4_MIN_PITCH_MM,1,0           ## @SS4_MIN_PITCH_MM
	.no_dead_strip	_alps_update_device_area_ss4_v2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alps_update_device_area_ss4_v2
_alps_update_device_area_ss4_v2:        ; @alps_update_device_area_ss4_v2
	.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, x1
	mov	x20, x0
	ldr	w0, [x1, #16]
	bl	_IS_SS4PLUS_DEV
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _SS4PLUS_NUMSENSOR_XOFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SS4PLUS_NUMSENSOR_XOFFSET@GOTPAGEOFF]
	ldrb	w8, [x8]
	ldrb	w9, [x20, #2]
	and	w10, w9, #0xf
	add	w8, w10, w8
Lloh2:
	adrp	x10, _SS4PLUS_NUMSENSOR_YOFFSET@GOTPAGE
Lloh3:
	ldr	x10, [x10, _SS4PLUS_NUMSENSOR_YOFFSET@GOTPAGEOFF]
	ldrb	w10, [x10]
	add	w10, w10, w9, lsr #4
	sub	w8, w8, #1
Lloh4:
	adrp	x11, _SS4PLUS_COUNT_PER_ELECTRODE@GOTPAGE
Lloh5:
	ldr	x11, [x11, _SS4PLUS_COUNT_PER_ELECTRODE@GOTPAGEOFF]
	ldr	w9, [x11]
	mul	w9, w8, w9
	str	w9, [x19]
	sub	w10, w10, #1
	ldr	w11, [x11]
	mul	w11, w10, w11
	str	w11, [x19, #4]
	ldrb	w13, [x20, #1]
	and	w12, w13, #0xf
Lloh6:
	adrp	x14, _SS4PLUS_MIN_PITCH_MM@GOTPAGE
Lloh7:
	ldr	x14, [x14, _SS4PLUS_MIN_PITCH_MM@GOTPAGEOFF]
	ldrb	w14, [x14]
	add	w12, w12, w14
	add	w13, w14, w13, lsr #4
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x8, _SS4_NUMSENSOR_XOFFSET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SS4_NUMSENSOR_XOFFSET@GOTPAGEOFF]
	ldrb	w8, [x8]
	ldrb	w9, [x20, #4]
	and	w10, w9, #0xf
	add	w8, w10, w8
Lloh10:
	adrp	x10, _SS4_NUMSENSOR_YOFFSET@GOTPAGE
Lloh11:
	ldr	x10, [x10, _SS4_NUMSENSOR_YOFFSET@GOTPAGEOFF]
	ldrb	w10, [x10]
	add	w10, w10, w9, lsr #4
	sub	w8, w8, #1
Lloh12:
	adrp	x11, _SS4_COUNT_PER_ELECTRODE@GOTPAGE
Lloh13:
	ldr	x11, [x11, _SS4_COUNT_PER_ELECTRODE@GOTPAGEOFF]
	ldr	w9, [x11]
	mul	w9, w8, w9
	str	w9, [x19]
	sub	w10, w10, #1
	ldr	w11, [x11]
	mul	w11, w10, w11
	str	w11, [x19, #4]
	ldrb	w13, [x20, #6]
	ubfx	w12, w13, #2, #3
Lloh14:
	adrp	x14, _SS4_MIN_PITCH_MM@GOTPAGE
Lloh15:
	ldr	x14, [x14, _SS4_MIN_PITCH_MM@GOTPAGEOFF]
	ldrb	w14, [x14]
	add	w12, w12, w14
	add	w13, w14, w13, lsr #5
LBB0_3:
	mul	w8, w8, w12
	mul	w10, w10, w13
	add	w9, w9, w9, lsl #2
	lsl	w9, w9, #1
	sdiv	w8, w9, w8
	add	w9, w11, w11, lsl #2
	lsl	w9, w9, #1
	sdiv	w9, w9, w10
	stp	w8, w9, [x19, #8]
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SS4PLUS_NUMSENSOR_XOFFSET,1,0  ; @SS4PLUS_NUMSENSOR_XOFFSET
	.comm	_SS4PLUS_NUMSENSOR_YOFFSET,1,0  ; @SS4PLUS_NUMSENSOR_YOFFSET
	.comm	_SS4PLUS_COUNT_PER_ELECTRODE,4,2 ; @SS4PLUS_COUNT_PER_ELECTRODE
	.comm	_SS4PLUS_MIN_PITCH_MM,1,0       ; @SS4PLUS_MIN_PITCH_MM
	.comm	_SS4_NUMSENSOR_XOFFSET,1,0      ; @SS4_NUMSENSOR_XOFFSET
	.comm	_SS4_NUMSENSOR_YOFFSET,1,0      ; @SS4_NUMSENSOR_YOFFSET
	.comm	_SS4_COUNT_PER_ELECTRODE,4,2    ; @SS4_COUNT_PER_ELECTRODE
	.comm	_SS4_MIN_PITCH_MM,1,0           ; @SS4_MIN_PITCH_MM
	.no_dead_strip	_alps_update_device_area_ss4_v2
.subsections_via_symbols
