	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wiimote_init_poll_mp
_wiimote_init_poll_mp:                  ## @wiimote_init_poll_mp
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	callq	_wiimote_cmd_acquire_noint
	movq	%rbx, %rdi
	callq	_wiimote_cmd_init_mp
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_wiimote_cmd_read_mp
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_wiimote_cmd_release
	movq	8(%rbx), %rax
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.1:
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_hid_info
	movq	%rbx, %rdi
	callq	_wiimote_mp_load
	jmp	LBB0_5
LBB0_3:
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_wiimote_mp_unload
LBB0_5:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rsi
	shlq	$2, %rsi
	addq	(%rax), %rsi
	movq	%rbx, %rdi
	callq	_mod_timer
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"detected extension: Nintendo Wii Motion Plus\n"

	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_wiimote_init_poll_mp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wiimote_init_poll_mp
_wiimote_init_poll_mp:                  ; @wiimote_init_poll_mp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_wiimote_cmd_acquire_noint
	mov	x0, x19
	bl	_wiimote_cmd_init_mp
	mov	x1, sp
	mov	x0, x19
	bl	_wiimote_cmd_read_mp
	mov	x20, x0
	mov	x0, x19
	bl	_wiimote_cmd_release
	ldr	x8, [x19, #8]
	cbz	w20, LBB0_3
; %bb.1:
	cbnz	x8, LBB0_5
; %bb.2:
	ldr	w0, [x19, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_hid_info
	mov	x0, x19
	bl	_wiimote_mp_load
	b	LBB0_5
LBB0_3:
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_wiimote_mp_unload
LBB0_5:
Lloh5:
	adrp	x8, _jiffies@GOTPAGE
Lloh6:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _HZ@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh10:
	ldrsw	x9, [x9]
	add	x1, x8, x9, lsl #2
	mov	x0, x19
	bl	_mod_timer
	ldr	x8, [sp, #24]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"detected extension: Nintendo Wii Motion Plus\n"

	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_wiimote_init_poll_mp
.subsections_via_symbols
