	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wiimote_hid_event
_wiimote_hid_event:                     ## @wiimote_hid_event
	.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	%ecx, %ebx
	movq	%rdx, %r12
	movq	%rdi, %r15
	callq	_hid_get_drvdata
	testl	%ebx, %ebx
	jle	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_spin_lock_irqsave
	movq	_handlers@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.4:
	movq	(%r12), %rdx
	leaq	32(%rax), %rsi
	xorl	%ecx, %ecx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rcx
	movq	(%rsi), %rdi
	addq	$24, %rsi
	testq	%rdi, %rdi
	je	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, %rdi
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%ebx, -32(%rsi)
	jge	LBB0_8
## %bb.7:
	movl	%ecx, %r13d
	leaq	(,%r13,2), %rcx
	addq	%r13, %rcx
	leaq	8(%r12), %rsi
	movq	%r14, %rdi
	callq	*16(%rax,%rcx,8)
	movq	_handlers@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_13
LBB0_9:
	movl	%ecx, %r13d
	jmp	LBB0_10
LBB0_3:
	xorl	%r13d, %r13d
LBB0_10:
	leaq	(,%r13,2), %rcx
	addq	%r13, %rcx
	cmpq	$0, 8(%rax,%rcx,8)
	jne	LBB0_12
## %bb.11:
	movq	(%r12), %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %ecx
	callq	_hid_warn
LBB0_12:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_handlers,8,3                   ## @handlers
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unhandled report %hhu size %d\n"

	.no_dead_strip	_wiimote_hid_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wiimote_hid_event
_wiimote_hid_event:                     ; @wiimote_hid_event
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x22, x2
	mov	x21, x0
	bl	_hid_get_drvdata
	cmp	w19, #0
	b.le	LBB0_7
; %bb.1:
	mov	x20, x0
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x23, _handlers@GOTPAGE
Lloh1:
	ldr	x23, [x23, _handlers@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x12, [x8, #8]
	cbz	x12, LBB0_9
; %bb.2:
	mov	x9, #0
	ldr	x10, [x22]
	add	x11, x8, #32
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #1
	ldr	x12, [x11], #24
	cbz	x12, LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x12, x10
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldur	w12, [x11, #-32]
	cmp	w12, w19
	b.ge	LBB0_3
; %bb.6:
	and	x24, x9, #0xffffffff
	mov	w9, #24
	madd	x8, x24, x9, x8
	ldr	x8, [x8, #16]
	add	x1, x22, #8
	mov	x0, x20
	blr	x8
	ldr	x8, [x23]
	b	LBB0_10
LBB0_7:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_8:
	and	x24, x9, #0xffffffff
	b	LBB0_10
LBB0_9:
	mov	x24, #0
LBB0_10:
	mov	w9, #24
	madd	x8, x24, x9, x8
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_12
; %bb.11:
	ldr	x2, [x22]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x3, x19
	bl	_hid_warn
LBB0_12:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w0, #0
LBB0_13:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_handlers,8,3                   ; @handlers
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unhandled report %hhu size %d\n"

	.no_dead_strip	_wiimote_hid_event
.subsections_via_symbols
