	.file	"extr_alps.c_alps_update_device_area_ss4_v2.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	alps_update_device_area_ss4_v2, @function
alps_update_device_area_ss4_v2:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	edi, DWORD PTR 16[rsi]
	call	IS_SS4PLUS_DEV@PLT
	test	rax, rax
	je	.L2
	movzx	eax, BYTE PTR 2[rbp]
	movzx	esi, BYTE PTR SS4PLUS_NUMSENSOR_XOFFSET[rip]
	movzx	ecx, BYTE PTR SS4PLUS_NUMSENSOR_YOFFSET[rip]
	mov	r8d, DWORD PTR SS4PLUS_COUNT_PER_ELECTRODE[rip]
	mov	edx, eax
	and	eax, 15
	shr	dl, 4
	lea	r9d, -1[rsi+rax]
	movzx	edx, dl
	mov	r10d, r9d
	imul	r10d, r8d
	lea	esi, -1[rcx+rdx]
	imul	r8d, esi
	mov	DWORD PTR [rbx], r10d
	movzx	edx, BYTE PTR SS4PLUS_MIN_PITCH_MM[rip]
	mov	DWORD PTR 4[rbx], r8d
	movzx	eax, BYTE PTR 1[rbp]
	mov	edi, eax
	shr	al, 4
	and	edi, 15
	movzx	ecx, al
	add	edi, edx
	add	ecx, edx
.L3:
	imul	edi, r9d
	lea	eax, [r10+r10*4]
	add	eax, eax
	imul	ecx, esi
	cdq
	idiv	edi
	mov	DWORD PTR 8[rbx], eax
	lea	eax, [r8+r8*4]
	add	eax, eax
	cdq
	idiv	ecx
	mov	DWORD PTR 12[rbx], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	movzx	eax, BYTE PTR 4[rbp]
	movzx	esi, BYTE PTR SS4_NUMSENSOR_XOFFSET[rip]
	movzx	ecx, BYTE PTR SS4_NUMSENSOR_YOFFSET[rip]
	mov	r8d, DWORD PTR SS4_COUNT_PER_ELECTRODE[rip]
	mov	edx, eax
	and	eax, 15
	shr	dl, 4
	lea	r9d, -1[rsi+rax]
	movzx	edx, dl
	mov	r10d, r9d
	imul	r10d, r8d
	lea	esi, -1[rcx+rdx]
	imul	r8d, esi
	mov	DWORD PTR [rbx], r10d
	movzx	ecx, BYTE PTR SS4_MIN_PITCH_MM[rip]
	mov	DWORD PTR 4[rbx], r8d
	movzx	eax, BYTE PTR 6[rbp]
	mov	edi, eax
	shr	al, 5
	shr	dil, 2
	movzx	eax, al
	mov	edx, edi
	and	edx, 7
	lea	edi, [rdx+rcx]
	add	ecx, eax
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	alps_update_device_area_ss4_v2, .-alps_update_device_area_ss4_v2
	.comm	SS4_NUMSENSOR_YOFFSET,1,1
	.comm	SS4_NUMSENSOR_XOFFSET,1,1
	.comm	SS4_MIN_PITCH_MM,1,1
	.comm	SS4_COUNT_PER_ELECTRODE,4,4
	.comm	SS4PLUS_NUMSENSOR_YOFFSET,1,1
	.comm	SS4PLUS_NUMSENSOR_XOFFSET,1,1
	.comm	SS4PLUS_MIN_PITCH_MM,1,1
	.comm	SS4PLUS_COUNT_PER_ELECTRODE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_alps.c_alps_update_device_area_ss4_v2.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	alps_update_device_area_ss4_v2, %function
alps_update_device_area_ss4_v2:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r0
	ldr	r0, [r1, #16]
	mov	r5, r1
	bl	IS_SS4PLUS_DEV
	cmp	r0, #0
	beq	.L2
	ldr	r1, .L6
	ldr	r3, .L6+4
	ldrb	r2, [r7, #2]	@ zero_extendqisi2
	ldrb	r6, [r1]	@ zero_extendqisi2
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldr	r0, .L6+8
	and	r1, r2, #15
	ldr	r4, [r0]
	add	r6, r6, r2, lsr #4
	add	r3, r3, r1
	sub	r6, r6, #1
	sub	r3, r3, #1
	mul	r2, r4, r3
	mul	r4, r6, r4
	stm	r5, {r2, r4}
	ldr	r1, .L6+12
	ldrb	r0, [r7, #1]	@ zero_extendqisi2
	ldrb	r7, [r1]	@ zero_extendqisi2
	and	r1, r0, #15
	add	r1, r1, r7
	add	r7, r7, r0, lsr #4
.L3:
	add	r2, r2, r2, lsl #2
	mul	r1, r3, r1
	lsl	r0, r2, #1
	bl	__aeabi_idiv
	add	r4, r4, r4, lsl #2
	str	r0, [r5, #8]
	mul	r1, r6, r7
	lsl	r0, r4, #1
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r0, #0
	str	r3, [r5, #12]
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r1, .L6+16
	ldr	r3, .L6+20
	ldrb	r2, [r7, #4]	@ zero_extendqisi2
	ldrb	r6, [r1]	@ zero_extendqisi2
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldr	r0, .L6+24
	and	r1, r2, #15
	ldr	r4, [r0]
	add	r6, r6, r2, lsr #4
	add	r3, r3, r1
	sub	r6, r6, #1
	sub	r3, r3, #1
	mul	r2, r4, r3
	mul	r4, r6, r4
	stm	r5, {r2, r4}
	ldr	r1, .L6+28
	ldrb	r0, [r7, #6]	@ zero_extendqisi2
	ldrb	r7, [r1]	@ zero_extendqisi2
	lsl	r1, r0, #27
	add	r1, r7, r1, lsr #29
	add	r7, r7, r0, lsr #5
	b	.L3
.L7:
	.align	2
.L6:
	.word	SS4PLUS_NUMSENSOR_YOFFSET
	.word	SS4PLUS_NUMSENSOR_XOFFSET
	.word	SS4PLUS_COUNT_PER_ELECTRODE
	.word	SS4PLUS_MIN_PITCH_MM
	.word	SS4_NUMSENSOR_YOFFSET
	.word	SS4_NUMSENSOR_XOFFSET
	.word	SS4_COUNT_PER_ELECTRODE
	.word	SS4_MIN_PITCH_MM
	.size	alps_update_device_area_ss4_v2, .-alps_update_device_area_ss4_v2
	.comm	SS4_NUMSENSOR_YOFFSET,1,1
	.comm	SS4_NUMSENSOR_XOFFSET,1,1
	.comm	SS4_MIN_PITCH_MM,1,1
	.comm	SS4_COUNT_PER_ELECTRODE,4,4
	.comm	SS4PLUS_NUMSENSOR_YOFFSET,1,1
	.comm	SS4PLUS_NUMSENSOR_XOFFSET,1,1
	.comm	SS4PLUS_MIN_PITCH_MM,1,1
	.comm	SS4PLUS_COUNT_PER_ELECTRODE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
