	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avg_width8_msa
_avg_width8_msa:                        ## @avg_width8_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $r8d killed $r8d def $r8
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	leal	3(%r8), %r13d
	cmpl	$7, %r13d
	jb	LBB0_3
## %bb.1:
	movq	%rdx, %rbx
	movq	%rdi, %r12
	testl	%r8d, %r8d
	cmovnsl	%r8d, %r13d
	sarl	$2, %r13d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leal	(,%rax,4), %eax
	movslq	%eax, %rcx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	(,%rax,4), %eax
	cltq
	shlq	$2, %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	shlq	$2, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_LD_UB4
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_LD_UB4
	callq	_AVER_UB4_UB
	xorl	%esi, %esi
	callq	___msa_copy_u_d
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	xorl	%esi, %esi
	callq	___msa_copy_u_d
	movl	%eax, %r15d
	xorl	%esi, %esi
	callq	___msa_copy_u_d
	movl	%eax, %r14d
	xorl	%esi, %esi
	callq	___msa_copy_u_d
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
	movq	%rbx, %r8
	movq	-48(%rbp), %r9                  ## 8-byte Reload
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_SD4
	addq	-80(%rbp), %r12                 ## 8-byte Folded Reload
	addq	-72(%rbp), %rbx                 ## 8-byte Folded Reload
	decl	%r13d
	jne	LBB0_2
LBB0_3:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_avg_width8_msa
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function avg_width8_msa
_avg_width8_msa:                        ; @avg_width8_msa
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	add	w8, w4, #3
	cmp	w8, #7
	b.lo	LBB0_3
; %bb.1:
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	cmp	w4, #0
	csel	w8, w8, w4, lt
	asr	w26, w8, #2
	lsl	w8, w1, #2
	lsl	w9, w3, #2
	sbfiz	x27, x8, #2, #32
	sbfiz	x28, x9, #2, #32
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sub	w26, w26, #1
	mov	x0, x22
	mov	x1, x21
	bl	_LD_UB4
	mov	x0, x20
	mov	x1, x19
	bl	_LD_UB4
	bl	_AVER_UB4_UB
	mov	w1, #0
	bl	___msa_copy_u_d
	mov	x23, x0
	mov	w1, #0
	bl	___msa_copy_u_d
	mov	x24, x0
	mov	w1, #0
	bl	___msa_copy_u_d
	mov	x25, x0
	mov	w1, #0
	bl	___msa_copy_u_d
	mov	x3, x0
	mov	x0, x23
	mov	x1, x24
	mov	x2, x25
	mov	x4, x20
	mov	x5, x19
	bl	_SD4
	add	x22, x22, x27
	add	x20, x20, x28
	cbnz	w26, LBB0_2
LBB0_3:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_avg_width8_msa
.subsections_via_symbols
