	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ati_remote2_input_mouse
_ati_remote2_input_mouse:               ## @ati_remote2_input_mouse
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	movl	(%rbx), %r9d
	movl	%r9d, %eax
	shrl	$4, %eax
	movl	8(%rdi), %ecx
	btl	%eax, %ecx
	jae	LBB0_3
## %bb.1:
	movl	%r9d, %eax
	andl	$15, %eax
	movq	_ATI_REMOTE2_PC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_2
## %bb.4:
	movq	16(%rdi), %rax
	movq	(%rax), %rdi
	movl	12(%rbx), %edx
	movl	4(%rbx), %r8d
	movl	8(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_2:
	movl	12(%rdi), %ecx
	btl	%eax, %ecx
	jae	LBB0_3
## %bb.5:
	movq	24(%rdi), %r14
	movq	_EV_REL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_REL_X@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	4(%rbx), %ecx
	movq	%r14, %rdi
	callq	_input_event
	movl	(%r15), %esi
	movq	_REL_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	8(%rbx), %ecx
	movq	%r14, %rdi
	callq	_input_event
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATI_REMOTE2_PC,4,2             ## @ATI_REMOTE2_PC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown mode byte (%02x %02x %02x %02x)\n"

	.comm	_EV_REL,4,2                     ## @EV_REL
	.comm	_REL_X,4,2                      ## @REL_X
	.comm	_REL_Y,4,2                      ## @REL_Y
	.no_dead_strip	_ati_remote2_input_mouse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ati_remote2_input_mouse
_ati_remote2_input_mouse:               ; @ati_remote2_input_mouse
	.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
	ldr	x8, [x0]
	ldr	x20, [x8]
	ldr	w5, [x20]
	asr	w8, w5, #4
	ldr	w9, [x0, #8]
	lsr	w8, w9, w8
	tbz	w8, #0, LBB0_5
; %bb.1:
	and	w8, w5, #0xf
Lloh0:
	adrp	x9, _ATI_REMOTE2_PC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATI_REMOTE2_PC@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_3
; %bb.2:
	ldr	x8, [x0, #16]
	ldr	x0, [x8]
	ldp	w3, w2, [x20, #8]
	ldr	w4, [x20, #4]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	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
	b	_dev_err
LBB0_3:
	ldr	w9, [x0, #12]
	lsr	w8, w9, w8
	tbz	w8, #0, LBB0_5
; %bb.4:
Lloh5:
	adrp	x21, _EV_REL@GOTPAGE
Lloh6:
	ldr	x21, [x21, _EV_REL@GOTPAGEOFF]
	ldr	x19, [x0, #24]
	ldr	w1, [x21]
Lloh7:
	adrp	x8, _REL_X@GOTPAGE
Lloh8:
	ldr	x8, [x8, _REL_X@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	ldr	w3, [x20, #4]
	mov	x0, x19
	bl	_input_event
	ldr	w1, [x21]
Lloh10:
	adrp	x8, _REL_Y@GOTPAGE
Lloh11:
	ldr	x8, [x8, _REL_Y@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	ldr	w3, [x20, #8]
	mov	x0, x19
	bl	_input_event
	mov	x0, x19
	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
	b	_input_sync
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ATI_REMOTE2_PC,4,2             ; @ATI_REMOTE2_PC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown mode byte (%02x %02x %02x %02x)\n"

	.comm	_EV_REL,4,2                     ; @EV_REL
	.comm	_REL_X,4,2                      ; @REL_X
	.comm	_REL_Y,4,2                      ; @REL_Y
	.no_dead_strip	_ati_remote2_input_mouse
.subsections_via_symbols
