	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wiimote_ext_unload
_wiimote_ext_unload:                    ## @wiimote_ext_unload
	.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, %rbx
	movq	_wiimod_ext_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rdi), %rcx
	movq	(%rax,%rcx,8), %r14
	leaq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_WIIMOTE_EXT_UNKNOWN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	_WIIPROTO_FLAG_EXT_USED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 12(%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wiimod_ext_table,8,3           ## @wiimod_ext_table
	.comm	_WIIMOTE_EXT_UNKNOWN,8,3        ## @WIIMOTE_EXT_UNKNOWN
	.comm	_WIIPROTO_FLAG_EXT_USED,4,2     ## @WIIPROTO_FLAG_EXT_USED
	.no_dead_strip	_wiimote_ext_unload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wiimote_ext_unload
_wiimote_ext_unload:                    ; @wiimote_ext_unload
	.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	x19, x0
Lloh0:
	adrp	x8, _wiimod_ext_table@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wiimod_ext_table@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x0]
	ldr	x20, [x8, x9, lsl #3]
	add	x21, x0, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh3:
	adrp	x8, _WIIMOTE_EXT_UNKNOWN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WIIMOTE_EXT_UNKNOWN@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh6:
	adrp	x8, _WIIPROTO_FLAG_EXT_USED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WIIPROTO_FLAG_EXT_USED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19, #12]
	bic	w8, w9, w8
	str	w8, [x19, #12]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	x2, [x20]
	cbz	x2, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, 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
	br	x2
LBB0_2:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_wiimod_ext_table,8,3           ; @wiimod_ext_table
	.comm	_WIIMOTE_EXT_UNKNOWN,8,3        ; @WIIMOTE_EXT_UNKNOWN
	.comm	_WIIPROTO_FLAG_EXT_USED,4,2     ; @WIIPROTO_FLAG_EXT_USED
	.no_dead_strip	_wiimote_ext_unload
.subsections_via_symbols
