	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_alps_detect                    ## -- Begin function alps_detect
	.p2align	4, 0x90
_alps_detect:                           ## @alps_detect
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	xorl	%esi, %esi
	callq	_alps_identify
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movq	%r12, %rdi
	callq	_alps_is_cs19_trackpoint
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_psmouse_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r12, %rdi
	callq	_psmouse_reset
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %r15
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_alps_identify
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_12
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_8:
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%r12)
	movq	_ALPS_DUALPOINT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r15), %eax
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rcx
	cmoveq	%rax, %rcx
	movq	%rcx, 8(%r12)
	movl	4(%r15), %eax
	movl	%eax, 24(%r12)
	jmp	LBB0_11
LBB0_10:
	movq	%r15, %rdi
	callq	_kfree
	movq	$0, 16(%r12)
LBB0_11:
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ALPS CS19 trackpoint-only device detected, ignoring\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"ALPS"

	.comm	_ALPS_DUALPOINT,4,2             ## @ALPS_DUALPOINT
L_.str.2:                               ## @.str.2
	.asciz	"DualPoint TouchPad"

L_.str.3:                               ## @.str.3
	.asciz	"GlidePoint"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_alps_detect                    ; -- Begin function alps_detect
	.p2align	2
_alps_detect:                           ; @alps_detect
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
	mov	x1, #0
	bl	_alps_identify
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_alps_is_cs19_trackpoint
	cbz	x0, LBB0_5
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_psmouse_dbg
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_4:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x0, x19
	bl	_psmouse_reset
Lloh4:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	cbz	x0, LBB0_8
; %bb.6:
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	bl	_alps_identify
	cbz	w0, LBB0_9
; %bb.7:
	mov	x21, x0
	mov	x0, x22
	bl	_kfree
	b	LBB0_4
LBB0_8:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_3
LBB0_9:
	cbz	w20, LBB0_11
; %bb.10:
	mov	w21, #0
Lloh9:
	adrp	x8, l_.str.1@PAGE
Lloh10:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh11:
	adrp	x9, _ALPS_DUALPOINT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ALPS_DUALPOINT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, l_.str.2@PAGE
Lloh15:
	add	x10, x10, l_.str.2@PAGEOFF
Lloh16:
	adrp	x11, l_.str.3@PAGE
Lloh17:
	add	x11, x11, l_.str.3@PAGEOFF
	ldp	w12, w13, [x22]
	tst	w9, w12
	csel	x9, x11, x10, eq
	stp	x8, x9, [x19]
	str	w13, [x19, #24]
	b	LBB0_4
LBB0_11:
	mov	x0, x22
	bl	_kfree
	mov	w21, #0
	str	xzr, [x19, #16]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ALPS CS19 trackpoint-only device detected, ignoring\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"ALPS"

	.comm	_ALPS_DUALPOINT,4,2             ; @ALPS_DUALPOINT
l_.str.2:                               ; @.str.2
	.asciz	"DualPoint TouchPad"

l_.str.3:                               ; @.str.3
	.asciz	"GlidePoint"

.subsections_via_symbols
