	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function bfin_keycodecpy
LCPI0_0:
	.byte	0                               ## 0x0
	.byte	1                               ## 0x1
	.byte	4                               ## 0x4
	.byte	5                               ## 0x5
	.byte	8                               ## 0x8
	.byte	9                               ## 0x9
	.byte	12                              ## 0xc
	.byte	13                              ## 0xd
	.byte	8                               ## 0x8
	.byte	9                               ## 0x9
	.byte	12                              ## 0xc
	.byte	13                              ## 0xd
	.byte	12                              ## 0xc
	.byte	13                              ## 0xd
	.byte	14                              ## 0xe
	.byte	15                              ## 0xf
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_bfin_keycodecpy:                       ## @bfin_keycodecpy
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testl	%edx, %edx
	je	LBB0_8
## %bb.1:
	movzwl	%dx, %r9d
	cmpw	$8, %r9w
	jae	LBB0_3
## %bb.2:
	xorl	%ecx, %ecx
	jmp	LBB0_6
LBB0_3:
	movl	%r9d, %ecx
	andl	$-8, %ecx
	leaq	8(%rdi), %r8
	leaq	(%rdi,%r9,2), %rdx
	addq	$8, %rdx
	xorl	%eax, %eax
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,1,4,5,8,9,12,13,8,9,12,13,12,13,14,15]
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rsi,%rax,4), %xmm1
	movdqu	16(%rsi,%rax,4), %xmm2
	movdqa	%xmm1, %xmm3
	pshufb	%xmm0, %xmm3
	movdqa	%xmm2, %xmm4
	pshufb	%xmm0, %xmm4
	punpcklqdq	%xmm4, %xmm3            ## xmm3 = xmm3[0],xmm4[0]
	movdqu	%xmm3, -8(%r8,%rax,2)
	psrld	$16, %xmm1
	psrld	$16, %xmm2
	packusdw	%xmm2, %xmm1
	movdqu	%xmm1, -8(%rdx,%rax,2)
	addq	$8, %rax
	cmpq	%rax, %rcx
	jne	LBB0_4
## %bb.5:
	cmpq	%r9, %rcx
	je	LBB0_8
LBB0_6:
	leaq	(%rdi,%r9,2), %rax
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rsi,%rcx,4), %edx
	movw	%dx, (%rdi,%rcx,2)
	shrl	$16, %edx
	movw	%dx, (%rax,%rcx,2)
	incq	%rcx
	cmpq	%rcx, %r9
	jne	LBB0_7
LBB0_8:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_bfin_keycodecpy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bfin_keycodecpy
_bfin_keycodecpy:                       ; @bfin_keycodecpy
	.cfi_startproc
; %bb.0:
	cbz	w2, LBB0_8
; %bb.1:
	mov	w8, w2
	cmp	w2, #16
	b.hs	LBB0_3
; %bb.2:
	mov	x9, #0
	b	LBB0_6
LBB0_3:
	and	x9, x8, #0xfff0
	lsl	x10, x8, #1
	add	x11, x0, #16
	add	x12, x1, #32
	mov	x13, x9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x12, #-32]
	ldp	q2, q3, [x12], #64
	xtn.4h	v4, v0
	xtn.4h	v5, v1
	xtn.4h	v6, v2
	xtn.4h	v7, v3
	stur	d4, [x11, #-16]
	stur	d5, [x11, #-8]
	str	d6, [x11]
	str	d7, [x11, #8]
	shrn.4h	v0, v0, #16
	shrn.4h	v1, v1, #16
	shrn.4h	v2, v2, #16
	shrn.4h	v3, v3, #16
	add	x14, x11, x10
	stur	d0, [x14, #-16]
	stur	d1, [x14, #-8]
	str	d2, [x14]
	str	d3, [x14, #8]
	add	x11, x11, #32
	subs	x13, x13, #16
	b.ne	LBB0_4
; %bb.5:
	cmp	x9, x8
	b.eq	LBB0_8
LBB0_6:
	add	x10, x9, x8
	add	x10, x0, x10, lsl #1
	add	x11, x1, x9, lsl #2
	sub	x8, x8, x9
	add	x9, x0, x9, lsl #1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11], #4
	strh	w12, [x9], #2
	lsr	w12, w12, #16
	strh	w12, [x10], #2
	subs	x8, x8, #1
	b.ne	LBB0_7
LBB0_8:
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_bfin_keycodecpy
.subsections_via_symbols
