	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hidpad_wiiupro_packet_handler
_hidpad_wiiupro_packet_handler:         ## @hidpad_wiiupro_packet_handler
	.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
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	notb	48(%rsi)
	notb	52(%rsi)
	notb	56(%rsi)
	leaq	24(%rdi), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	52(%rbx), %eax
	shrl	$6, %eax
	andl	$1, %eax
	movl	%eax, 32(%r14)
	movl	52(%rbx), %eax
	shrl	$4, %eax
	andl	$1, %eax
	movl	%eax, 36(%r14)
	movl	52(%rbx), %eax
	shrl	$5, %eax
	andl	$1, %eax
	movl	%eax, 40(%r14)
	movl	52(%rbx), %eax
	shrl	$3, %eax
	andl	$1, %eax
	movl	%eax, 44(%r14)
	movl	48(%rbx), %eax
	shrl	$5, %eax
	andl	$1, %eax
	movl	%eax, 48(%r14)
	movl	48(%rbx), %eax
	shrl	%eax
	andl	$1, %eax
	movl	%eax, 52(%r14)
	movl	52(%rbx), %eax
	shrl	$7, %eax
	andl	$1, %eax
	movl	%eax, 56(%r14)
	movl	52(%rbx), %eax
	shrl	$2, %eax
	andl	$1, %eax
	movl	%eax, 60(%r14)
	movl	48(%rbx), %eax
	shrl	$4, %eax
	andl	$1, %eax
	movl	%eax, 64(%r14)
	movl	48(%rbx), %eax
	shrl	$2, %eax
	andl	$1, %eax
	movl	%eax, 68(%r14)
	movl	56(%rbx), %eax
	shrl	%eax
	andl	$1, %eax
	movl	%eax, 72(%r14)
	movl	56(%rbx), %eax
	andl	$1, %eax
	movl	%eax, 76(%r14)
	movl	52(%rbx), %eax
	shrl	%eax
	andl	$1, %eax
	movl	%eax, 80(%r14)
	movl	48(%rbx), %eax
	shrl	$7, %eax
	andl	$1, %eax
	movl	%eax, 84(%r14)
	movl	52(%rbx), %eax
	andl	$1, %eax
	movl	%eax, 88(%r14)
	movl	48(%rbx), %eax
	shrl	$6, %eax
	andl	$1, %eax
	movl	%eax, 92(%r14)
	movl	48(%rbx), %eax
	shrl	$3, %eax
	andl	$1, %eax
	movl	%eax, 96(%r14)
	movl	20(%rbx), %ecx
	shll	$8, %ecx
	orl	16(%rbx), %ecx
	cmpl	$4, 8(%r14)
	movq	16(%r14), %rax
	jg	LBB0_3
## %bb.2:
	movl	%ecx, (%rax)
	movl	36(%rbx), %ecx
	shll	$8, %ecx
	orl	32(%rbx), %ecx
	movl	%ecx, 4(%rax)
	movl	28(%rbx), %ecx
	shll	$8, %ecx
	orl	24(%rbx), %ecx
	movl	%ecx, 8(%rax)
	movl	44(%rbx), %ecx
	shll	$8, %ecx
	orl	40(%rbx), %ecx
	movl	%ecx, 12(%rax)
	incl	8(%r14)
	jmp	LBB0_4
LBB0_3:
	subl	(%rax), %ecx
	movq	(%r15), %rdx
	movl	%ecx, (%rdx)
	movl	36(%rbx), %ecx
	shll	$8, %ecx
	orl	32(%rbx), %ecx
	subl	4(%rax), %ecx
	movl	%ecx, 4(%rdx)
	movl	28(%rbx), %ecx
	shll	$8, %ecx
	orl	24(%rbx), %ecx
	subl	8(%rax), %ecx
	movl	%ecx, 8(%rdx)
	movl	44(%rbx), %ecx
	shll	$8, %ecx
	orl	40(%rbx), %ecx
	subl	12(%rax), %ecx
	movl	%ecx, 12(%rdx)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_hidpad_wiiupro_packet_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hidpad_wiiupro_packet_handler
_hidpad_wiiupro_packet_handler:         ; @hidpad_wiiupro_packet_handler
	.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
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	d0, [x1, #48]
	movi	d1, #0x0000ff000000ff
	eor.8b	v0, v0, v1
	str	d0, [x1, #48]
	ldr	w8, [x1, #56]
	eor	w8, w8, #0xff
	str	w8, [x1, #56]
	add	x21, x0, #24
	mov	x0, x21
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w8, [x19, #52]
	ubfx	w8, w8, #6, #1
	str	w8, [x20, #32]
	ldr	w8, [x19, #52]
	ubfx	w8, w8, #4, #1
	str	w8, [x20, #36]
	ldr	w8, [x19, #52]
	ubfx	w8, w8, #5, #1
	str	w8, [x20, #40]
	ldr	w8, [x19, #52]
	ubfx	w8, w8, #3, #1
	str	w8, [x20, #44]
	ldr	w8, [x19, #48]
	ubfx	w8, w8, #5, #1
	str	w8, [x20, #48]
	ldr	w8, [x19, #48]
	ubfx	w8, w8, #1, #1
	str	w8, [x20, #52]
	ldr	w8, [x19, #52]
	ubfx	w8, w8, #7, #1
	str	w8, [x20, #56]
	ldr	w8, [x19, #52]
	ubfx	w8, w8, #2, #1
	str	w8, [x20, #60]
	ldr	w8, [x19, #48]
	ubfx	w8, w8, #4, #1
	str	w8, [x20, #64]
	ldr	w8, [x19, #48]
	ubfx	w8, w8, #2, #1
	str	w8, [x20, #68]
	ldr	w8, [x19, #56]
	ubfx	w8, w8, #1, #1
	str	w8, [x20, #72]
	ldr	w8, [x19, #56]
	and	w8, w8, #0x1
	str	w8, [x20, #76]
	ldr	w8, [x19, #52]
	ubfx	w8, w8, #1, #1
	str	w8, [x20, #80]
	ldr	w8, [x19, #48]
	ubfx	w8, w8, #7, #1
	str	w8, [x20, #84]
	ldr	w8, [x19, #52]
	and	w8, w8, #0x1
	str	w8, [x20, #88]
	ldr	w8, [x19, #48]
	ubfx	w8, w8, #6, #1
	str	w8, [x20, #92]
	ldr	w8, [x19, #48]
	ubfx	w8, w8, #3, #1
	str	w8, [x20, #96]
	ldr	w10, [x20, #8]
	ldp	w8, w9, [x19, #16]
	orr	w9, w8, w9, lsl #8
	ldr	x8, [x20, #16]
	cmp	w10, #4
	b.gt	LBB0_3
; %bb.2:
	str	w9, [x8]
	ldp	w9, w10, [x19, #32]
	orr	w9, w9, w10, lsl #8
	str	w9, [x8, #4]
	ldp	w9, w10, [x19, #24]
	orr	w9, w9, w10, lsl #8
	str	w9, [x8, #8]
	ldp	w9, w10, [x19, #40]
	orr	w9, w9, w10, lsl #8
	str	w9, [x8, #12]
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
	b	LBB0_4
LBB0_3:
	ldr	w10, [x8]
	sub	w9, w9, w10
	ldr	x10, [x21]
	str	w9, [x10]
	ldp	w9, w11, [x19, #32]
	orr	w9, w9, w11, lsl #8
	ldr	w11, [x8, #4]
	sub	w9, w9, w11
	str	w9, [x10, #4]
	ldp	w9, w11, [x19, #24]
	orr	w9, w9, w11, lsl #8
	ldr	w11, [x8, #8]
	sub	w9, w9, w11
	str	w9, [x10, #8]
	ldp	w9, w11, [x19, #40]
	orr	w9, w9, w11, lsl #8
	ldr	w8, [x8, #12]
	sub	w8, w9, w8
	str	w8, [x10, #12]
LBB0_4:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_hidpad_wiiupro_packet_handler
.subsections_via_symbols
