	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function im_explorer_detect
_im_explorer_detect:                    ## @im_explorer_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	leaq	32(%rdi), %rbx
	xorl	%esi, %esi
	callq	_intellimouse_detect
	movb	$-56, -42(%rbp)
	movq	_PSMOUSE_CMD_SETRATE@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	-42(%rbp), %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ps2_command
	movb	$-56, -42(%rbp)
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ps2_command
	movb	$80, -42(%rbp)
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ps2_command
	movq	_PSMOUSE_CMD_GETID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ps2_command
	movl	$-1, %eax
	cmpb	$4, -42(%rbp)
	jne	LBB0_8
## %bb.1:
	movb	$-56, -42(%rbp)
	movl	(%r13), %edx
	leaq	-42(%rbp), %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ps2_command
	movb	$80, -42(%rbp)
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ps2_command
	movb	$40, -42(%rbp)
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ps2_command
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.2:
	movq	_BTN_MIDDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%r15), %rax
	movl	(%rax), %esi
	callq	___set_bit
	movq	_REL_WHEEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%r15), %rax
	movl	4(%rax), %esi
	callq	___set_bit
	movq	_REL_HWHEEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%r15), %rax
	movl	4(%rax), %esi
	callq	___set_bit
	movq	_BTN_SIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%r15), %rax
	movl	(%rax), %esi
	callq	___set_bit
	movq	_BTN_EXTRA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%r15), %rax
	movl	(%rax), %esi
	callq	___set_bit
	cmpq	$0, (%r15)
	je	LBB0_3
## %bb.4:
	cmpq	$0, 8(%r15)
	je	LBB0_5
LBB0_6:
	movl	$4, 16(%r15)
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str(%rip), %rax
	movq	%rax, (%r15)
	cmpq	$0, 8(%r15)
	jne	LBB0_6
LBB0_5:
	leaq	L_.str.1(%rip), %rax
	movq	%rax, 8(%r15)
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_PSMOUSE_CMD_SETRATE,4,2        ## @PSMOUSE_CMD_SETRATE
	.comm	_PSMOUSE_CMD_GETID,4,2          ## @PSMOUSE_CMD_GETID
	.comm	_BTN_MIDDLE,4,2                 ## @BTN_MIDDLE
	.comm	_REL_WHEEL,4,2                  ## @REL_WHEEL
	.comm	_REL_HWHEEL,4,2                 ## @REL_HWHEEL
	.comm	_BTN_SIDE,4,2                   ## @BTN_SIDE
	.comm	_BTN_EXTRA,4,2                  ## @BTN_EXTRA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Generic"

L_.str.1:                               ## @.str.1
	.asciz	"Explorer Mouse"

	.no_dead_strip	_im_explorer_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function im_explorer_detect
_im_explorer_detect:                    ; @im_explorer_detect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	add	x21, x0, #32
	mov	w1, #0
	bl	_intellimouse_detect
	mov	w23, #200
	strb	w23, [sp, #14]
Lloh0:
	adrp	x22, _PSMOUSE_CMD_SETRATE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PSMOUSE_CMD_SETRATE@GOTPAGEOFF]
	ldr	w2, [x22]
	add	x1, sp, #14
	mov	x0, x21
	bl	_ps2_command
	strb	w23, [sp, #14]
	ldr	w2, [x22]
	add	x1, sp, #14
	mov	x0, x21
	bl	_ps2_command
	mov	w24, #80
	strb	w24, [sp, #14]
	ldr	w2, [x22]
	add	x1, sp, #14
	mov	x0, x21
	bl	_ps2_command
Lloh2:
	adrp	x8, _PSMOUSE_CMD_GETID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PSMOUSE_CMD_GETID@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	add	x1, sp, #14
	mov	x0, x21
	bl	_ps2_command
	ldrb	w8, [sp, #14]
	cmp	w8, #4
	b.ne	LBB0_5
; %bb.1:
	strb	w23, [sp, #14]
	ldr	w2, [x22]
	add	x1, sp, #14
	mov	x0, x21
	bl	_ps2_command
	strb	w24, [sp, #14]
	ldr	w2, [x22]
	add	x1, sp, #14
	mov	x0, x21
	bl	_ps2_command
	mov	w8, #40
	strb	w8, [sp, #14]
	ldr	w2, [x22]
	add	x1, sp, #14
	mov	x0, x21
	bl	_ps2_command
	cbz	w20, LBB0_6
; %bb.2:
Lloh5:
	adrp	x8, _BTN_MIDDLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BTN_MIDDLE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	x8, [x19, #24]
	ldr	w1, [x8]
	bl	___set_bit
Lloh8:
	adrp	x8, _REL_WHEEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REL_WHEEL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	x8, [x19, #24]
	ldr	w1, [x8, #4]
	bl	___set_bit
Lloh11:
	adrp	x8, _REL_HWHEEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REL_HWHEEL@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	x8, [x19, #24]
	ldr	w1, [x8, #4]
	bl	___set_bit
Lloh14:
	adrp	x8, _BTN_SIDE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BTN_SIDE@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	x8, [x19, #24]
	ldr	w1, [x8]
	bl	___set_bit
Lloh17:
	adrp	x8, _BTN_EXTRA@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BTN_EXTRA@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	x8, [x19, #24]
	ldr	w1, [x8]
	bl	___set_bit
	ldr	x8, [x19]
	cbz	x8, LBB0_8
; %bb.3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_9
LBB0_4:
	mov	w0, #0
	mov	w8, #4
	str	w8, [x19, #16]
	b	LBB0_7
LBB0_5:
	mov	w0, #-1
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
Lloh20:
	adrp	x8, l_.str@PAGE
Lloh21:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x19]
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_4
LBB0_9:
Lloh22:
	adrp	x8, l_.str.1@PAGE
Lloh23:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x19, #8]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_PSMOUSE_CMD_SETRATE,4,2        ; @PSMOUSE_CMD_SETRATE
	.comm	_PSMOUSE_CMD_GETID,4,2          ; @PSMOUSE_CMD_GETID
	.comm	_BTN_MIDDLE,4,2                 ; @BTN_MIDDLE
	.comm	_REL_WHEEL,4,2                  ; @REL_WHEEL
	.comm	_REL_HWHEEL,4,2                 ; @REL_HWHEEL
	.comm	_BTN_SIDE,4,2                   ; @BTN_SIDE
	.comm	_BTN_EXTRA,4,2                  ; @BTN_EXTRA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Generic"

l_.str.1:                               ; @.str.1
	.asciz	"Explorer Mouse"

	.no_dead_strip	_im_explorer_detect
.subsections_via_symbols
