	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function winraw_init_devices
_winraw_init_devices:                   ## @winraw_init_devices
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	$0, -48(%rbp)
	xorl	%r12d, %r12d
	leaq	-48(%rbp), %rsi
	xorl	%edi, %edi
	movl	$24, %edx
	callq	_GetRawInputDeviceList
	cmpq	$-1, %rax
	je	LBB0_6
## %bb.1:
	movq	-48(%rbp), %rax
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %r12
	leaq	-48(%rbp), %rsi
	movq	%rax, %rdi
	movl	$24, %edx
	callq	_GetRawInputDeviceList
	movq	%rax, -48(%rbp)
	cmpq	$-1, %rax
	je	LBB0_6
## %bb.3:
	testq	%rax, %rax
	jle	LBB0_10
## %bb.4:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_RIM_TYPEMOUSE@GOTPCREL(%rip), %r10
	movq	(%r10), %rcx
	leaq	-1(%rax), %rsi
	movl	%eax, %r8d
	andl	$3, %r8d
	cmpq	$3, %rsi
	jae	LBB0_11
## %bb.5:
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	jmp	LBB0_13
LBB0_6:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_RARCH_ERR
	jmp	LBB0_8
LBB0_7:
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
LBB0_8:
	movq	%r12, %rdi
	callq	_free
	movq	%r13, %rdi
	callq	_free
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	xorl	%eax, %eax
LBB0_9:
	movq	%r13, (%r15)
	movl	%ebx, (%r14)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	jmp	LBB0_34
LBB0_11:
	movq	%rax, %r9
	andq	$-4, %r9
	xorl	%r14d, %r14d
	movq	%r12, %rbx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	xorl	%edx, %edx
	cmpq	%rcx, (%rbx)
	sete	%dl
	addl	%r14d, %edx
	xorl	%edi, %edi
	cmpq	%rcx, 24(%rbx)
	sete	%dil
	addl	%edx, %edi
	xorl	%edx, %edx
	cmpq	%rcx, 48(%rbx)
	sete	%dl
	addl	%edi, %edx
	xorl	%r14d, %r14d
	cmpq	%rcx, 72(%rbx)
	sete	%r14b
	addl	%edx, %r14d
	addq	$4, %rsi
	addq	$96, %rbx
	cmpq	%rsi, %r9
	jne	LBB0_12
LBB0_13:
	testq	%r8, %r8
	je	LBB0_16
## %bb.14:
	leaq	(%rsi,%rsi,2), %rdx
	leaq	(%r12,%rdx,8), %rsi
	shlq	$3, %r8
	leaq	(%r8,%r8,2), %rdx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	xorl	%ebx, %ebx
	cmpq	%rcx, (%rsi,%rdi)
	sete	%bl
	addl	%ebx, %r14d
	addq	$24, %rdi
	cmpq	%rdi, %rdx
	jne	LBB0_15
LBB0_16:
	xorl	%ebx, %ebx
	testl	%r14d, %r14d
	je	LBB0_21
## %bb.17:
	leal	(,%r14,8), %eax
	leal	(%rax,%rax,2), %esi
	movl	$1, %edi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_22
## %bb.18:
	movq	%rax, %r13
	leaq	-64(%rbp), %rdi
	callq	_GetCursorPos
	testl	%eax, %eax
	je	LBB0_23
## %bb.19:
	movl	%r14d, %r8d
	movl	-64(%rbp), %eax
	movl	-60(%rbp), %ecx
	cmpl	$1, %r14d
	jne	LBB0_24
## %bb.20:
	xorl	%esi, %esi
	movq	_RIM_TYPEMOUSE@GOTPCREL(%rip), %r10
	jmp	LBB0_26
LBB0_21:
	xorl	%r13d, %r13d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	testq	%rax, %rax
	jg	LBB0_29
	jmp	LBB0_34
LBB0_22:
	xorl	%r13d, %r13d
LBB0_23:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_8
LBB0_24:
	movl	%r8d, %edi
	andl	$-2, %edi
	movq	%r13, %rdx
	addq	$44, %rdx
	xorl	%esi, %esi
	movq	_RIM_TYPEMOUSE@GOTPCREL(%rip), %r10
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movl	%ecx, -24(%rdx)
	movl	%eax, -28(%rdx)
	movl	%ecx, (%rdx)
	movl	%eax, -4(%rdx)
	addq	$2, %rsi
	addq	$48, %rdx
	cmpq	%rsi, %rdi
	jne	LBB0_25
LBB0_26:
	testb	$1, %r8b
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_28
## %bb.27:
	leaq	(%rsi,%rsi,2), %rdx
	movl	%ecx, 20(%r13,%rdx,8)
	movl	%eax, 16(%r13,%rdx,8)
LBB0_28:
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	jle	LBB0_34
LBB0_29:
	movq	(%r10), %r9
	cmpq	$1, %rax
	jne	LBB0_35
## %bb.30:
	xorl	%ebx, %ebx
	xorl	%edx, %edx
LBB0_31:
	testb	$1, %al
	je	LBB0_34
## %bb.32:
	leaq	(%rdx,%rdx,2), %rax
	cmpq	%r9, (%r12,%rax,8)
	jne	LBB0_34
## %bb.33:
	movl	8(%r12,%rax,8), %eax
	movl	%ebx, %ecx
	incl	%ebx
	leaq	(%rcx,%rcx,2), %rcx
	movl	%eax, 12(%r13,%rcx,8)
LBB0_34:
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_winraw_log_mice_info
	movq	%r12, %rdi
	callq	_free
	movl	$1, %eax
	jmp	LBB0_9
LBB0_35:
	movq	%rax, %r8
	andq	$-2, %r8
	movq	%r12, %rdi
	addq	$32, %rdi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	jmp	LBB0_37
	.p2align	4, 0x90
LBB0_36:                                ##   in Loop: Header=BB0_37 Depth=1
	addq	$2, %rdx
	addq	$48, %rdi
	cmpq	%rdx, %r8
	je	LBB0_31
LBB0_37:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%r9, -32(%rdi)
	jne	LBB0_39
## %bb.38:                              ##   in Loop: Header=BB0_37 Depth=1
	movl	-24(%rdi), %esi
	movl	%ebx, %ecx
	incl	%ebx
	leaq	(%rcx,%rcx,2), %rcx
	movl	%esi, 12(%r13,%rcx,8)
LBB0_39:                                ##   in Loop: Header=BB0_37 Depth=1
	cmpq	%r9, -8(%rdi)
	jne	LBB0_36
## %bb.40:                              ##   in Loop: Header=BB0_37 Depth=1
	movl	(%rdi), %ecx
	movl	%ebx, %esi
	incl	%ebx
	leaq	(%rsi,%rsi,2), %rsi
	movl	%ecx, 12(%r13,%rsi,8)
	jmp	LBB0_36
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[WINRAW]: GetRawInputDeviceList failed with error %lu.\n"

	.comm	_RIM_TYPEMOUSE,8,3              ## @RIM_TYPEMOUSE
	.no_dead_strip	_winraw_init_devices
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function winraw_init_devices
_winraw_init_devices:                   ; @winraw_init_devices
	.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	x19, x1
	mov	x20, x0
	str	xzr, [sp]
	mov	x1, sp
	mov	x0, #0
	mov	w2, #24
	bl	_GetRawInputDeviceList
	cmn	x0, #1
	b.eq	LBB0_6
; %bb.1:
	ldr	x8, [sp]
	add	x8, x8, x8, lsl #1
	lsl	x0, x8, #3
	bl	_malloc
	mov	x21, x0
	cbz	x0, LBB0_8
; %bb.2:
	mov	x1, sp
	mov	x0, x21
	mov	w2, #24
	bl	_GetRawInputDeviceList
	str	x0, [sp]
	cmn	x0, #1
	b.eq	LBB0_7
; %bb.3:
	cmp	x0, #1
	b.lt	LBB0_11
; %bb.4:
Lloh0:
	adrp	x24, _RIM_TYPEMOUSE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _RIM_TYPEMOUSE@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, #9
	b.hs	LBB0_12
; %bb.5:
	mov	w23, #0
	mov	x9, #0
	b	LBB0_15
LBB0_6:
	mov	x21, #0
LBB0_7:
	bl	_GetLastError
	mov	x1, x0
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_ERR
LBB0_8:
	mov	x22, #0
LBB0_9:
	mov	x0, x21
	bl	_free
	mov	x0, x22
	bl	_free
	mov	x22, #0
	mov	w23, #0
	mov	w0, #0
LBB0_10:
	str	x22, [x20]
	str	w23, [x19]
	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_11:
	mov	x22, #0
	b	LBB0_33
LBB0_12:
	ands	x9, x0, #0x7
	mov	w10, #8
	csel	x9, x10, x9, eq
	sub	x9, x0, x9
	dup.2d	v1, x8
	movi.2d	v0, #0000000000000000
	add	x10, x21, #96
	mov	x11, x9
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
	movi.2d	v4, #0000000000000000
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	sub	x12, x10, #96
	sub	x13, x10, #48
	ld3.2d	{ v5, v6, v7 }, [x12]
	ld3.2d	{ v16, v17, v18 }, [x13]
	mov	x12, x10
	ld3.2d	{ v19, v20, v21 }, [x12], #48
	ld3.2d	{ v22, v23, v24 }, [x12]
	cmeq.2d	v5, v5, v1
	xtn.2s	v5, v5
	cmeq.2d	v6, v16, v1
	xtn.2s	v6, v6
	cmeq.2d	v7, v19, v1
	xtn.2s	v7, v7
	cmeq.2d	v16, v22, v1
	xtn.2s	v16, v16
	sub.2s	v0, v0, v5
	sub.2s	v2, v2, v6
	sub.2s	v3, v3, v7
	sub.2s	v4, v4, v16
	add	x10, x10, #192
	subs	x11, x11, #8
	b.ne	LBB0_13
; %bb.14:
	add.2s	v0, v2, v0
	add.2s	v0, v3, v0
	add.2s	v0, v4, v0
	addp.2s	v0, v0, v0
	fmov	w23, s0
LBB0_15:
	add	x10, x9, x9, lsl #1
	lsl	x10, x10, #3
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x21, x10]
	cmp	x11, x8
	cinc	w23, w23, eq
	add	x9, x9, #1
	add	x10, x10, #24
	cmp	x0, x9
	b.ne	LBB0_16
; %bb.17:
	cbz	w23, LBB0_22
; %bb.18:
	add	w8, w23, w23, lsl #1
	lsl	w1, w8, #3
	mov	w0, #1
	bl	_calloc
	mov	x22, x0
	cbz	x0, LBB0_9
; %bb.19:
	add	x0, sp, #8
	bl	_GetCursorPos
	cbz	w0, LBB0_9
; %bb.20:
	ldp	w9, w8, [sp, #8]
	cmp	w23, #4
	b.hs	LBB0_27
; %bb.21:
	mov	x10, #0
	b	LBB0_30
LBB0_22:
	mov	x22, #0
	cmp	x0, #1
	b.lt	LBB0_33
LBB0_23:
	mov	w23, #0
	ldr	x8, [x24]
	add	x9, x21, #8
	mov	w10, #24
	b	LBB0_25
LBB0_24:                                ;   in Loop: Header=BB0_25 Depth=1
	add	x9, x9, #24
	subs	x0, x0, #1
	b.eq	LBB0_34
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldur	x11, [x9, #-8]
	cmp	x11, x8
	b.ne	LBB0_24
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	ldr	w11, [x9]
	umaddl	x12, w23, w10, x22
	add	w23, w23, #1
	str	w11, [x12, #12]
	b	LBB0_24
LBB0_27:
	and	x10, x23, #0xfffffffc
	add	x11, x22, #64
	mov	x12, x10
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	stp	w9, w8, [x11, #-48]
	stp	w9, w8, [x11, #-24]
	stp	w9, w8, [x11]
	stp	w9, w8, [x11, #24]
	add	x11, x11, #96
	subs	x12, x12, #4
	b.ne	LBB0_28
; %bb.29:
	cmp	x10, x23
	b.eq	LBB0_32
LBB0_30:
	sub	x11, x23, x10
	mov	w12, #24
	madd	x10, x10, x12, x22
	add	x10, x10, #20
LBB0_31:                                ; =>This Inner Loop Header: Depth=1
	stp	w9, w8, [x10, #-4]
	add	x10, x10, #24
	subs	x11, x11, #1
	b.ne	LBB0_31
LBB0_32:
	ldr	x0, [sp]
	cmp	x0, #1
	b.ge	LBB0_23
LBB0_33:
	mov	w23, #0
LBB0_34:
	mov	x0, x22
	mov	x1, x23
	bl	_winraw_log_mice_info
	mov	x0, x21
	bl	_free
	mov	w0, #1
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[WINRAW]: GetRawInputDeviceList failed with error %lu.\n"

	.comm	_RIM_TYPEMOUSE,8,3              ; @RIM_TYPEMOUSE
	.no_dead_strip	_winraw_init_devices
.subsections_via_symbols
