	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wiiproto_req_drm               ## -- Begin function wiiproto_req_drm
	.p2align	4, 0x90
_wiiproto_req_drm:                      ## @wiiproto_req_drm
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	_WIIPROTO_FLAG_DRM_LOCKED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	8(%rbx), %rsi
	jmp	LBB0_4
LBB0_2:
	movq	_WIIPROTO_REQ_NULL@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_select_drm
	movq	%rax, %rsi
LBB0_4:
	movq	_WIIPROTO_REQ_DRM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-40(%rbp), %rax
	movq	$0, -40(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rsi, 8(%rbx)
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_wiiproto_keep_rumble
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$24, %edx
	callq	_wiimote_queue
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-16(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_WIIPROTO_FLAG_DRM_LOCKED,4,2   ## @WIIPROTO_FLAG_DRM_LOCKED
	.comm	_WIIPROTO_REQ_NULL,8,3          ## @WIIPROTO_REQ_NULL
	.comm	_WIIPROTO_REQ_DRM,8,3           ## @WIIPROTO_REQ_DRM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wiiproto_req_drm               ; -- Begin function wiiproto_req_drm
	.p2align	2
_wiiproto_req_drm:                      ; @wiiproto_req_drm
	.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]
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _WIIPROTO_FLAG_DRM_LOCKED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WIIPROTO_FLAG_DRM_LOCKED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	x1, [x19, #8]
	b	LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _WIIPROTO_REQ_NULL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WIIPROTO_REQ_NULL@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_select_drm
	mov	x1, x0
LBB0_4:
Lloh9:
	adrp	x8, _WIIPROTO_REQ_DRM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WIIPROTO_REQ_DRM@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x8]
	mov	x8, sp
	add	x8, x8, #8
	stp	x9, xzr, [sp]
	str	x1, [sp, #16]
	str	x1, [x19, #8]
	mov	x0, x19
	mov	x1, x8
	bl	_wiiproto_keep_rumble
	mov	x1, sp
	mov	x0, x19
	mov	w2, #24
	bl	_wiimote_queue
	ldr	x8, [sp, #24]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_WIIPROTO_FLAG_DRM_LOCKED,4,2   ; @WIIPROTO_FLAG_DRM_LOCKED
	.comm	_WIIPROTO_REQ_NULL,8,3          ; @WIIPROTO_REQ_NULL
	.comm	_WIIPROTO_REQ_DRM,8,3           ; @WIIPROTO_REQ_DRM
.subsections_via_symbols
