	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alps_dolphin_get_device_area
_alps_dolphin_get_device_area:          ## @alps_dolphin_get_device_area
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	$10, -36(%rbp)
	callq	_alps_enter_command_mode
	movl	$-1, %r15d
	testq	%rax, %rax
	jne	LBB0_8
## %bb.1:
	movq	_PSMOUSE_CMD_RESET_WRAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_8
## %bb.2:
	movq	_PSMOUSE_CMD_SETPOLL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_8
## %bb.3:
	movl	(%r12), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_8
## %bb.4:
	movq	_PSMOUSE_CMD_SETRATE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	-36(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movl	(%r12), %edx
	leaq	-36(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	_PSMOUSE_CMD_GETINFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ps2_command
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	_DOLPHIN_PROFILE_XOFFSET@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	movzbl	-34(%rbp), %ecx
	movl	%ecx, %edx
	andl	$15, %edx
	leal	(%rdx,%rax), %r8d
	movq	_DOLPHIN_PROFILE_YOFFSET@GOTPCREL(%rip), %rdi
	movzbl	(%rdi), %edi
	shrl	$4, %ecx
	leal	(%rcx,%rdi), %esi
	movl	%r8d, (%r14)
	movl	%esi, 4(%r14)
	addl	%edx, %eax
	decl	%eax
	movq	_DOLPHIN_COUNT_PER_ELECTRODE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	imull	%edx, %eax
	movl	%eax, 8(%r14)
	leal	(%rcx,%rdi), %eax
	decl	%eax
	imull	%edx, %eax
	movl	%eax, 12(%r14)
	movq	%rbx, %rdi
	callq	_alps_exit_command_mode
	xorl	%r15d, %r15d
	negq	%rax
	sbbl	%r15d, %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PSMOUSE_CMD_RESET_WRAP,4,2     ## @PSMOUSE_CMD_RESET_WRAP
	.comm	_PSMOUSE_CMD_SETPOLL,4,2        ## @PSMOUSE_CMD_SETPOLL
	.comm	_PSMOUSE_CMD_SETRATE,4,2        ## @PSMOUSE_CMD_SETRATE
	.comm	_PSMOUSE_CMD_GETINFO,4,2        ## @PSMOUSE_CMD_GETINFO
	.comm	_DOLPHIN_PROFILE_XOFFSET,1,0    ## @DOLPHIN_PROFILE_XOFFSET
	.comm	_DOLPHIN_PROFILE_YOFFSET,1,0    ## @DOLPHIN_PROFILE_YOFFSET
	.comm	_DOLPHIN_COUNT_PER_ELECTRODE,4,2 ## @DOLPHIN_COUNT_PER_ELECTRODE
	.no_dead_strip	_alps_dolphin_get_device_area
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alps_dolphin_get_device_area
_alps_dolphin_get_device_area:          ; @alps_dolphin_get_device_area
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	mov	w8, #10
	str	w8, [sp, #12]
	bl	_alps_enter_command_mode
	cbnz	x0, LBB0_7
; %bb.1:
Lloh0:
	adrp	x8, _PSMOUSE_CMD_RESET_WRAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PSMOUSE_CMD_RESET_WRAP@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_ps2_command
	cbnz	x0, LBB0_7
; %bb.2:
Lloh3:
	adrp	x21, _PSMOUSE_CMD_SETPOLL@GOTPAGE
Lloh4:
	ldr	x21, [x21, _PSMOUSE_CMD_SETPOLL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, #0
	bl	_ps2_command
	cbnz	x0, LBB0_7
; %bb.3:
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, #0
	bl	_ps2_command
	cbnz	x0, LBB0_7
; %bb.4:
Lloh5:
	adrp	x21, _PSMOUSE_CMD_SETRATE@GOTPAGE
Lloh6:
	ldr	x21, [x21, _PSMOUSE_CMD_SETRATE@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x1, sp, #12
	mov	x0, x19
	bl	_ps2_command
	cbnz	x0, LBB0_7
; %bb.5:
	ldr	w2, [x21]
	add	x1, sp, #12
	mov	x0, x19
	bl	_ps2_command
	cbnz	x0, LBB0_7
; %bb.6:
Lloh7:
	adrp	x8, _PSMOUSE_CMD_GETINFO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PSMOUSE_CMD_GETINFO@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	add	x1, sp, #12
	mov	x0, x19
	bl	_ps2_command
	cbz	x0, LBB0_9
LBB0_7:
	mov	w0, #-1
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_9:
Lloh10:
	adrp	x8, _DOLPHIN_PROFILE_XOFFSET@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DOLPHIN_PROFILE_XOFFSET@GOTPAGEOFF]
	ldrb	w8, [x8]
	ldrb	w9, [sp, #14]
	and	w10, w9, #0xf
	add	w8, w10, w8
Lloh12:
	adrp	x10, _DOLPHIN_PROFILE_YOFFSET@GOTPAGE
Lloh13:
	ldr	x10, [x10, _DOLPHIN_PROFILE_YOFFSET@GOTPAGEOFF]
	ldrb	w10, [x10]
	add	w9, w10, w9, lsr #4
	stp	w8, w9, [x20]
	sub	w8, w8, #1
Lloh14:
	adrp	x10, _DOLPHIN_COUNT_PER_ELECTRODE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _DOLPHIN_COUNT_PER_ELECTRODE@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	mul	w8, w8, w10
	sub	w9, w9, #1
	mul	w9, w9, w10
	stp	w8, w9, [x20, #8]
	mov	x0, x19
	bl	_alps_exit_command_mode
	cmp	x0, #0
	csetm	w0, ne
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PSMOUSE_CMD_RESET_WRAP,4,2     ; @PSMOUSE_CMD_RESET_WRAP
	.comm	_PSMOUSE_CMD_SETPOLL,4,2        ; @PSMOUSE_CMD_SETPOLL
	.comm	_PSMOUSE_CMD_SETRATE,4,2        ; @PSMOUSE_CMD_SETRATE
	.comm	_PSMOUSE_CMD_GETINFO,4,2        ; @PSMOUSE_CMD_GETINFO
	.comm	_DOLPHIN_PROFILE_XOFFSET,1,0    ; @DOLPHIN_PROFILE_XOFFSET
	.comm	_DOLPHIN_PROFILE_YOFFSET,1,0    ; @DOLPHIN_PROFILE_YOFFSET
	.comm	_DOLPHIN_COUNT_PER_ELECTRODE,4,2 ; @DOLPHIN_COUNT_PER_ELECTRODE
	.no_dead_strip	_alps_dolphin_get_device_area
.subsections_via_symbols
