	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wiiu_hid_send_control
_wiiu_hid_send_control:                 ## @wiiu_hid_send_control
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	(%rdi), %edx
	movl	4(%rdi), %edi
	xorl	%esi, %esi
	callq	_memset
	movl	4(%rbx), %edi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	movl	8(%rbx), %edi
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_HIDWrite
	testl	%eax, %eax
	leaq	8(%rsp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	js	LBB0_4
## %bb.2:
	retq
LBB0_3:
	leaq	L_.str(%rip), %rdi
	jmp	_RARCH_ERR                      ## TAILCALL
LBB0_4:
	movzwl	%ax, %ecx
	movl	%eax, %edx
	shrl	$16, %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	jmp	_RARCH_LOG                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[hid]: send_control: bad adapter.\n"

L_.str.1:                               ## @.str.1
	.asciz	"[hid]: write failed: %08x (%d:%d)\n"

	.no_dead_strip	_wiiu_hid_send_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wiiu_hid_send_control
_wiiu_hid_send_control:                 ; @wiiu_hid_send_control
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_3
; %bb.1:
	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
	.cfi_remember_state
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0, #4]
	ldr	w2, [x19]
	mov	w1, #0
	bl	_memset
	ldr	w0, [x19, #4]
	mov	x1, x21
	mov	x2, x20
	bl	_memcpy
	ldp	w1, w0, [x19, #4]
	ldr	w2, [x19]
	mov	x3, #0
	mov	x4, #0
	bl	_HIDWrite
	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
	tbnz	w0, #31, LBB0_4
; %bb.2:
	ret
LBB0_3:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	_RARCH_ERR
LBB0_4:
	.cfi_restore_state
	mov	x1, x0
	and	w3, w0, #0xffff
	lsr	w2, w0, #16
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	_RARCH_LOG
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[hid]: send_control: bad adapter.\n"

l_.str.1:                               ; @.str.1
	.asciz	"[hid]: write failed: %08x (%d:%d)\n"

	.no_dead_strip	_wiiu_hid_send_control
.subsections_via_symbols
