	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alps_identify
_alps_identify:                         ## @alps_identify
	.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, %r12
	movq	_PSMOUSE_CMD_SETRES@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_PSMOUSE_CMD_SETSCALE11@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	callq	_alps_rpt_cmd
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_16
LBB0_2:
	cmpb	$7, -44(%rbp)
	ja	LBB0_15
## %bb.3:
	cmpb	$0, -43(%rbp)
	jne	LBB0_15
## %bb.4:
	movb	-42(%rbp), %al
	cmpb	$10, %al
	je	LBB0_6
## %bb.5:
	cmpb	$100, %al
	jne	LBB0_15
LBB0_6:
	movl	(%rbx), %esi
	movq	_PSMOUSE_CMD_SETSCALE21@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-40(%rbp), %rcx
	movq	%r12, %rdi
	callq	_alps_rpt_cmd
	testq	%rax, %rax
	jne	LBB0_1
## %bb.7:
	movl	(%rbx), %esi
	movq	_PSMOUSE_CMD_RESET_WRAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %rcx
	movq	%r12, %rdi
	callq	_alps_rpt_cmd
	testq	%rax, %rax
	jne	LBB0_1
## %bb.8:
	movq	%r12, %rdi
	callq	_alps_exit_command_mode
	testq	%rax, %rax
	jne	LBB0_1
## %bb.9:
	leaq	-40(%rbp), %rdi
	leaq	-36(%rbp), %rsi
	callq	_alps_match_table
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_36
## %bb.10:
	movb	-40(%rbp), %dl
	movb	-39(%rbp), %bl
	movb	-38(%rbp), %al
	movb	-34(%rbp), %r8b
	cmpb	$115, %dl
	jne	LBB0_18
## %bb.11:
	cmpb	$2, %bl
	jne	LBB0_18
## %bb.12:
	cmpb	$100, %al
	jne	LBB0_18
## %bb.13:
	cmpb	$-118, %r8b
	jne	LBB0_18
## %bb.14:
	movq	_alps_v4_protocol_data@GOTPCREL(%rip), %r15
	jmp	LBB0_36
LBB0_18:
	xorb	$115, %dl
	xorb	$3, %bl
	orb	%dl, %bl
	sete	%dil
	cmpb	$80, %al
	sete	%cl
	movb	-36(%rbp), %dl
	cmpb	$115, %dl
	sete	%bl
	andb	%cl, %bl
	andb	%dil, %bl
	cmpb	$1, %bl
	jne	LBB0_21
## %bb.19:
	movb	-35(%rbp), %sil
	leal	-1(%rsi), %ecx
	cmpb	$2, %cl
	jae	LBB0_26
## %bb.20:
	movq	_alps_v5_protocol_data@GOTPCREL(%rip), %r15
	jmp	LBB0_36
LBB0_21:
	cmpb	$-120, %dl
	jne	LBB0_31
## %bb.22:
	movb	-35(%rbp), %sil
	movl	%esi, %edx
	andb	$-16, %dl
	movq	_alps_v7_protocol_data@GOTPCREL(%rip), %r15
	cmpb	$-80, %dl
	je	LBB0_36
## %bb.23:
	cmpb	$-64, %dl
	je	LBB0_36
## %bb.24:
	cmpb	$8, %sil
	jne	LBB0_26
## %bb.25:
	movq	_alps_v3_rushmore_data@GOTPCREL(%rip), %r15
	jmp	LBB0_36
LBB0_26:
	testb	%bl, %bl
	jne	LBB0_31
## %bb.27:
	cmpb	$7, %sil
	jne	LBB0_31
## %bb.28:
	cmpb	$-112, %r8b
	jb	LBB0_31
## %bb.29:
	cmpb	$-98, %r8b
	jae	LBB0_31
## %bb.30:
	movq	_alps_v3_protocol_data@GOTPCREL(%rip), %r15
	jmp	LBB0_36
LBB0_31:
	testb	%dil, %dil
	je	LBB0_39
## %bb.32:
	movq	_alps_v8_protocol_data@GOTPCREL(%rip), %r15
	cmpb	$40, %al
	je	LBB0_36
## %bb.33:
	cmpb	$20, %al
	je	LBB0_36
## %bb.34:
	cmpb	$-56, %al
	jne	LBB0_39
## %bb.35:
	leaq	L_.str(%rip), %rsi
	leaq	-40(%rbp), %rdx
	leaq	-36(%rbp), %rcx
	movq	%r12, %rdi
	callq	_psmouse_warn
	jmp	LBB0_15
LBB0_36:
	testq	%r14, %r14
	je	LBB0_38
## %bb.37:
	movl	4(%r14), %edi
	leaq	-40(%rbp), %rsi
	movl	$3, %edx
	callq	_memcpy
	movl	(%r14), %edi
	leaq	-36(%rbp), %rsi
	movl	$3, %edx
	callq	_memcpy
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_alps_set_protocol
	testl	%eax, %eax
	jne	LBB0_17
LBB0_38:
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_39:
	leaq	L_.str.1(%rip), %rsi
	leaq	-40(%rbp), %rdx
	leaq	-36(%rbp), %rcx
	movq	%r12, %rdi
	callq	_psmouse_dbg
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_16:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PSMOUSE_CMD_SETRES,4,2         ## @PSMOUSE_CMD_SETRES
	.comm	_PSMOUSE_CMD_SETSCALE11,4,2     ## @PSMOUSE_CMD_SETSCALE11
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PSMOUSE_CMD_SETSCALE21,4,2     ## @PSMOUSE_CMD_SETSCALE21
	.comm	_PSMOUSE_CMD_RESET_WRAP,4,2     ## @PSMOUSE_CMD_RESET_WRAP
	.comm	_alps_v4_protocol_data,4,2      ## @alps_v4_protocol_data
	.comm	_alps_v5_protocol_data,4,2      ## @alps_v5_protocol_data
	.comm	_alps_v7_protocol_data,4,2      ## @alps_v7_protocol_data
	.comm	_alps_v3_rushmore_data,4,2      ## @alps_v3_rushmore_data
	.comm	_alps_v3_protocol_data,4,2      ## @alps_v3_protocol_data
	.comm	_alps_v8_protocol_data,4,2      ## @alps_v8_protocol_data
	.comm	_alps_v9_protocol_data,4,2      ## @alps_v9_protocol_data
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported ALPS V9 touchpad: E7=%3ph, EC=%3ph\n"

L_.str.1:                               ## @.str.1
	.asciz	"Likely not an ALPS touchpad: E7=%3ph, EC=%3ph\n"

	.no_dead_strip	_alps_identify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alps_identify
_alps_identify:                         ; @alps_identify
	.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
Lloh0:
	adrp	x21, _PSMOUSE_CMD_SETRES@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PSMOUSE_CMD_SETRES@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x8, _PSMOUSE_CMD_SETSCALE11@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PSMOUSE_CMD_SETSCALE11@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	add	x3, sp, #12
	bl	_alps_rpt_cmd
	cbz	x0, LBB0_2
LBB0_1:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_37
LBB0_2:
	ldrb	w8, [sp, #12]
	ldrb	w9, [sp, #13]
	cmp	w8, #7
	ccmp	w9, #0, #0, ls
	b.ne	LBB0_36
; %bb.3:
	ldrb	w8, [sp, #14]
	cmp	w8, #10
	b.eq	LBB0_5
; %bb.4:
	cmp	w8, #100
	b.ne	LBB0_36
LBB0_5:
	ldr	w1, [x21]
Lloh7:
	adrp	x8, _PSMOUSE_CMD_SETSCALE21@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PSMOUSE_CMD_SETSCALE21@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x19
	bl	_alps_rpt_cmd
	cbnz	x0, LBB0_1
; %bb.6:
	ldr	w1, [x21]
Lloh10:
	adrp	x8, _PSMOUSE_CMD_RESET_WRAP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PSMOUSE_CMD_RESET_WRAP@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	add	x3, sp, #4
	mov	x0, x19
	bl	_alps_rpt_cmd
	cbnz	x0, LBB0_1
; %bb.7:
	mov	x0, x19
	bl	_alps_exit_command_mode
	cbnz	x0, LBB0_1
; %bb.8:
	add	x0, sp, #8
	add	x1, sp, #4
	bl	_alps_match_table
	mov	x21, x0
	cbnz	x0, LBB0_32
; %bb.9:
	ldrb	w10, [sp, #8]
	ldrb	w11, [sp, #9]
	ldrb	w8, [sp, #10]
	ldrb	w9, [sp, #6]
	cmp	w10, #115
	b.ne	LBB0_14
; %bb.10:
	cmp	w11, #2
	b.ne	LBB0_14
; %bb.11:
	cmp	w8, #100
	b.ne	LBB0_14
; %bb.12:
	cmp	w9, #138
	b.ne	LBB0_14
; %bb.13:
Lloh13:
	adrp	x21, _alps_v4_protocol_data@GOTPAGE
Lloh14:
	ldr	x21, [x21, _alps_v4_protocol_data@GOTPAGEOFF]
	b	LBB0_32
LBB0_14:
	cmp	w10, #115
	ccmp	w11, #3, #0, eq
	cset	w10, eq
	cmp	w8, #80
	cset	w11, eq
	and	w11, w10, w11
	ldrb	w12, [sp, #4]
	cmp	w12, #115
	cset	w13, eq
	and	w11, w11, w13
	cmp	w11, #1
	b.ne	LBB0_17
; %bb.15:
	ldrb	w12, [sp, #5]
	sub	w13, w12, #1
	cmp	w13, #2
	b.hs	LBB0_22
; %bb.16:
Lloh15:
	adrp	x21, _alps_v5_protocol_data@GOTPAGE
Lloh16:
	ldr	x21, [x21, _alps_v5_protocol_data@GOTPAGEOFF]
	b	LBB0_32
LBB0_17:
	cmp	w12, #136
	b.ne	LBB0_27
; %bb.18:
	ldrb	w12, [sp, #5]
	and	w13, w12, #0xf0
Lloh17:
	adrp	x21, _alps_v7_protocol_data@GOTPAGE
Lloh18:
	ldr	x21, [x21, _alps_v7_protocol_data@GOTPAGEOFF]
	cmp	w13, #176
	b.eq	LBB0_32
; %bb.19:
	cmp	w13, #192
	b.eq	LBB0_32
; %bb.20:
	cmp	w12, #8
	b.ne	LBB0_22
; %bb.21:
Lloh19:
	adrp	x21, _alps_v3_rushmore_data@GOTPAGE
Lloh20:
	ldr	x21, [x21, _alps_v3_rushmore_data@GOTPAGEOFF]
	b	LBB0_32
LBB0_22:
	tbnz	w11, #0, LBB0_27
; %bb.23:
	cmp	w12, #7
	b.ne	LBB0_27
; %bb.24:
	cmp	w9, #144
	b.lo	LBB0_27
; %bb.25:
	cmp	w9, #158
	b.hs	LBB0_27
; %bb.26:
Lloh21:
	adrp	x21, _alps_v3_protocol_data@GOTPAGE
Lloh22:
	ldr	x21, [x21, _alps_v3_protocol_data@GOTPAGEOFF]
	b	LBB0_32
LBB0_27:
	cbz	w10, LBB0_35
; %bb.28:
Lloh23:
	adrp	x21, _alps_v8_protocol_data@GOTPAGE
Lloh24:
	ldr	x21, [x21, _alps_v8_protocol_data@GOTPAGEOFF]
	cmp	w8, #20
	b.eq	LBB0_32
; %bb.29:
	cmp	w8, #40
	b.eq	LBB0_32
; %bb.30:
	cmp	w8, #200
	b.ne	LBB0_35
; %bb.31:
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x0, x19
	bl	_psmouse_warn
	b	LBB0_36
LBB0_32:
	cbz	x20, LBB0_34
; %bb.33:
	ldr	w0, [x20, #4]
	add	x1, sp, #8
	mov	w2, #3
	bl	_memcpy
	ldr	w0, [x20]
	add	x1, sp, #4
	mov	w2, #3
	bl	_memcpy
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_alps_set_protocol
	cbnz	w0, LBB0_38
LBB0_34:
	mov	w0, #0
	b	LBB0_38
LBB0_35:
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x0, x19
	bl	_psmouse_dbg
LBB0_36:
Lloh29:
	adrp	x8, _EINVAL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_37:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_38:
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_PSMOUSE_CMD_SETRES,4,2         ; @PSMOUSE_CMD_SETRES
	.comm	_PSMOUSE_CMD_SETSCALE11,4,2     ; @PSMOUSE_CMD_SETSCALE11
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PSMOUSE_CMD_SETSCALE21,4,2     ; @PSMOUSE_CMD_SETSCALE21
	.comm	_PSMOUSE_CMD_RESET_WRAP,4,2     ; @PSMOUSE_CMD_RESET_WRAP
	.comm	_alps_v4_protocol_data,4,2      ; @alps_v4_protocol_data
	.comm	_alps_v5_protocol_data,4,2      ; @alps_v5_protocol_data
	.comm	_alps_v7_protocol_data,4,2      ; @alps_v7_protocol_data
	.comm	_alps_v3_rushmore_data,4,2      ; @alps_v3_rushmore_data
	.comm	_alps_v3_protocol_data,4,2      ; @alps_v3_protocol_data
	.comm	_alps_v8_protocol_data,4,2      ; @alps_v8_protocol_data
	.comm	_alps_v9_protocol_data,4,2      ; @alps_v9_protocol_data
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported ALPS V9 touchpad: E7=%3ph, EC=%3ph\n"

l_.str.1:                               ; @.str.1
	.asciz	"Likely not an ALPS touchpad: E7=%3ph, EC=%3ph\n"

	.no_dead_strip	_alps_identify
.subsections_via_symbols
