	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function append_extra_bits
_append_extra_bits:                     ## @append_extra_bits
	.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	%r13
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %eax
	testl	%ecx, %ecx
	jle	LBB0_20
## %bb.1:
	movl	%edx, %ecx
	movl	%eax, %r12d
	movl	%r8d, %r9d
	movl	%r9d, %eax
	andl	$-8, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	addq	$-8, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdx
	shrq	$3, %rdx
	incq	%rdx
	movd	%ecx, %xmm0
	movq	%rdx, %rax
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	andq	$-2, %rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%r9, %r14
	negq	%r14
	xorl	%r13d, %r13d
	pmovzxdq	%xmm0, %xmm0                    ## xmm0 = xmm0[0],zero,xmm0[1],zero
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	cmpq	%r12, %r13
	je	LBB0_20
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
                                        ##     Child Loop BB0_18 Depth 2
	testl	%r8d, %r8d
	jle	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rdi,%r13,8), %r15
	movq	(%rsi,%r13,8), %r11
	cmpl	$8, %r8d
	jb	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r11,%r9,4), %rdx
	cmpq	%rdx, %r15
	jae	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r15,%r9,4), %rdx
	cmpq	%rdx, %r11
	jae	LBB0_9
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r10d, %r10d
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r10, %rdx
	testb	$1, %r9b
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15,%r10,4), %edx
	shll	%cl, %edx
	orl	(%r11,%r10,4), %edx
	movl	%edx, (%r15,%r10,4)
	movq	%r10, %rdx
	orq	$1, %rdx
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	notq	%r10
	cmpq	%r14, %r10
	je	LBB0_2
	.p2align	4, 0x90
LBB0_18:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15,%rdx,4), %ebx
	shll	%cl, %ebx
	orl	(%r11,%rdx,4), %ebx
	movl	4(%r15,%rdx,4), %eax
	shll	%cl, %eax
	movl	%ebx, (%r15,%rdx,4)
	orl	4(%r11,%rdx,4), %eax
	movl	%eax, 4(%r15,%rdx,4)
	addq	$2, %rdx
	cmpq	%rdx, %r9
	jne	LBB0_18
	jmp	LBB0_2
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdx
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_19
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %r10                 ## 8-byte Reload
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	(%r15,%r14,4), %xmm1
	movdqu	16(%r15,%r14,4), %xmm2
	movdqu	32(%r15,%r14,4), %xmm3
	movdqu	48(%r15,%r14,4), %xmm4
	pslld	%xmm0, %xmm1
	pslld	%xmm0, %xmm2
	movdqu	(%r11,%r14,4), %xmm5
	por	%xmm1, %xmm5
	movdqu	16(%r11,%r14,4), %xmm1
	por	%xmm2, %xmm1
	movdqu	%xmm5, (%r15,%r14,4)
	movdqu	%xmm1, 16(%r15,%r14,4)
	pslld	%xmm0, %xmm3
	pslld	%xmm0, %xmm4
	movdqu	32(%r11,%r14,4), %xmm1
	por	%xmm3, %xmm1
	movdqu	48(%r11,%r14,4), %xmm2
	por	%xmm4, %xmm2
	movdqu	%xmm1, 32(%r15,%r14,4)
	movdqu	%xmm2, 48(%r15,%r14,4)
	addq	$16, %r14
	addq	$-2, %r10
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, -56(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movdqu	(%r15,%r14,4), %xmm1
	movdqu	16(%r15,%r14,4), %xmm2
	pslld	%xmm0, %xmm1
	pslld	%xmm0, %xmm2
	movdqu	(%r11,%r14,4), %xmm3
	por	%xmm1, %xmm3
	movdqu	16(%r11,%r14,4), %xmm1
	por	%xmm2, %xmm1
	movdqu	%xmm3, (%r15,%r14,4)
	movdqu	%xmm1, 16(%r15,%r14,4)
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %r10
	cmpq	%r9, %rax
	movq	%rdx, %r14
	je	LBB0_2
	jmp	LBB0_15
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r14d, %r14d
	testb	$1, -56(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_13
	jmp	LBB0_14
LBB0_20:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_append_extra_bits
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function append_extra_bits
_append_extra_bits:                     ; @append_extra_bits
	.cfi_startproc
; %bb.0:
	cmp	w3, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x8, #0
	mov	w9, w3
	mov	w10, w4
	and	x11, x10, #0xfffffff0
	dup.4s	v0, w2
	lsl	x12, x10, #2
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #1
	cmp	x8, x9
	b.eq	LBB0_12
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;     Child Loop BB0_11 Depth 2
	cmp	w4, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	lsl	x14, x8, #3
	ldr	x13, [x0, x14]
	ldr	x14, [x1, x14]
	cmp	w4, #16
	b.lo	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x15, x13, x12
	add	x16, x14, x12
	cmp	x13, x16
	ccmp	x14, x15, #2, lo
	b.lo	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x15, x14, #32
	add	x16, x13, #32
	mov	x17, x11
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q1, q2, [x16, #-32]
	ldp	q3, q4, [x16]
	ushl.4s	v1, v1, v0
	ushl.4s	v2, v2, v0
	ushl.4s	v3, v3, v0
	ushl.4s	v4, v4, v0
	ldp	q5, q6, [x15, #-32]
	ldp	q7, q16, [x15], #64
	orr.16b	v1, v5, v1
	orr.16b	v2, v6, v2
	orr.16b	v3, v7, v3
	orr.16b	v4, v16, v4
	stp	q1, q2, [x16, #-32]
	stp	q3, q4, [x16], #64
	subs	x17, x17, #16
	b.ne	LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x15, x11
	cmp	x11, x10
	b.eq	LBB0_2
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x15, #0
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	lsl	x16, x15, #2
	add	x14, x14, x16
	add	x13, x13, x16
	sub	x15, x10, x15
LBB0_11:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w16, [x13]
	lsl	w16, w16, w2
	ldr	w17, [x14], #4
	orr	w16, w17, w16
	str	w16, [x13], #4
	subs	x15, x15, #1
	b.ne	LBB0_11
	b	LBB0_2
LBB0_12:
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_append_extra_bits
.subsections_via_symbols
