	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avg_width4_msa
_avg_width4_msa:                        ## @avg_width4_msa
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	cmpl	$2, %ecx
	je	LBB0_4
## %bb.1:
	cmpl	$4, %ecx
	je	LBB0_5
## %bb.2:
	cmpl	$8, %ecx
	jne	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_LW4
	leal	(,%r15,4), %eax
	movslq	%eax, %r12
	leaq	(%rbx,%r12,4), %rbx
	xorl	%r8d, %r8d
	callq	_INSERT_W4_UB
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_LW4
	xorl	%r8d, %r8d
	callq	_INSERT_W4_UB
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_LW4
	xorl	%r8d, %r8d
	callq	_INSERT_W4_UB
	leaq	(%r14,%r12,4), %rdi
	movl	%r15d, %esi
	callq	_LW4
	xorl	%r8d, %r8d
	callq	_INSERT_W4_UB
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_AVER_UB2_UB
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	movl	$2, %r8d
	movl	$3, %r9d
	pushq	%r15
	pushq	%r14
	pushq	$3
	pushq	$2
	pushq	$1
	pushq	$0
	callq	_ST_W8
	addq	$48, %rsp
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_LW2
	xorl	%edx, %edx
	callq	_INSERT_W2_UB
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_LW2
	xorl	%edx, %edx
	callq	_INSERT_W2_UB
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	___msa_aver_u_b
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$1, %edx
	movq	%r14, %rcx
	movl	%r15d, %r8d
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ST_W2                          ## TAILCALL
LBB0_5:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_LW4
	xorl	%r8d, %r8d
	callq	_INSERT_W4_UB
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_LW4
	xorl	%r8d, %r8d
	callq	_INSERT_W4_UB
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	___msa_aver_u_b
	subq	$8, %rsp
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$1, %edx
	movl	$2, %ecx
	movl	$3, %r8d
	movq	%r14, %r9
	pushq	%r15
	callq	_ST_W4
	addq	$16, %rsp
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_avg_width4_msa
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function avg_width4_msa
_avg_width4_msa:                        ; @avg_width4_msa
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	cmp	w3, #2
	b.eq	LBB0_5
; %bb.1:
	cmp	w3, #4
	b.eq	LBB0_6
; %bb.2:
	cmp	w3, #8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x21
	mov	x1, x19
	bl	_LW4
	lsl	w8, w19, #2
	sbfiz	x22, x8, #2, #32
	add	x21, x21, x22
	mov	x4, #0
	bl	_INSERT_W4_UB
	mov	x0, x21
	mov	x1, x19
	bl	_LW4
	mov	x4, #0
	bl	_INSERT_W4_UB
	mov	x0, x20
	mov	x1, x19
	bl	_LW4
	mov	x4, #0
	bl	_INSERT_W4_UB
	add	x0, x20, x22
	mov	x1, x19
	bl	_LW4
	mov	x4, #0
	bl	_INSERT_W4_UB
	mov	x0, #0
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	mov	x5, #0
	bl	_AVER_UB2_UB
	str	w19, [sp, #16]
	mov	x8, #2
	movk	x8, #3, lsl #32
	stp	x8, x20, [sp]
	mov	x0, #0
	mov	x1, #0
	mov	w2, #0
	mov	w3, #1
	mov	w4, #2
	mov	w5, #3
	mov	w6, #0
	mov	w7, #1
	bl	_ST_W8
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
	mov	x0, x21
	mov	x1, x19
	bl	_LW2
	mov	x2, #0
	bl	_INSERT_W2_UB
	mov	x0, x20
	mov	x1, x19
	bl	_LW2
	mov	x2, #0
	bl	_INSERT_W2_UB
	mov	x0, #0
	mov	x1, #0
	bl	___msa_aver_u_b
	mov	w0, w0
	mov	w1, #0
	mov	w2, #1
	mov	x3, x20
	mov	x4, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_ST_W2
LBB0_6:
	mov	x0, x21
	mov	x1, x19
	bl	_LW4
	mov	x4, #0
	bl	_INSERT_W4_UB
	mov	x0, x20
	mov	x1, x19
	bl	_LW4
	mov	x4, #0
	bl	_INSERT_W4_UB
	mov	x0, #0
	mov	x1, #0
	bl	___msa_aver_u_b
	mov	w0, w0
	mov	w1, #0
	mov	w2, #1
	mov	w3, #2
	mov	w4, #3
	mov	x5, x20
	mov	x6, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_ST_W4
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_avg_width4_msa
.subsections_via_symbols
