	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ff_mpeg4_pred_dc
_ff_mpeg4_pred_dc:                      ## @ff_mpeg4_pred_dc
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	xorl	%eax, %eax
	cmpl	$4, %esi
	setge	%bl
	movq	_IS_3IV1@GOTPCREL(%rip), %rdx
	cmpq	$0, (%rdx)
	movl	$8, %r9d
	jne	LBB0_2
## %bb.1:
	movb	%bl, %al
	movl	(%rdi,%rax,4), %r9d
LBB0_2:
	movslq	%esi, %r10
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rbx
	movslq	(%rdx,%r10,4), %rdx
	movq	(%rbx), %rbx
	movq	24(%rdi), %rax
	movslq	(%rax,%r10,4), %rax
	leaq	(%rbx,%rax,4), %r11
	movl	-4(%rbx,%rax,4), %r10d
	movq	%rdx, %rax
	notq	%rax
	movl	(%r11,%rax,4), %r12d
	shlq	$2, %rdx
	movq	%r11, %rax
	subq	%rdx, %rax
	movl	(%rax), %ebx
	cmpl	$3, %esi
	je	LBB0_6
## %bb.3:
	cmpq	$0, 88(%rdi)
	je	LBB0_6
## %bb.4:
	cmpl	$2, %esi
	movl	$1024, %eax                     ## imm = 0x400
	cmovnel	%eax, %r12d
	cmovnel	%eax, %ebx
	cmpl	$1, %esi
	je	LBB0_6
## %bb.5:
	movq	32(%rdi), %rdx
	cmpq	40(%rdi), %rdx
	cmovel	%eax, %r10d
	cmovel	%eax, %r12d
LBB0_6:
	movq	32(%rdi), %rax
	cmpq	40(%rdi), %rax
	movq	%r11, -48(%rbp)                 ## 8-byte Spill
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	movl	%r9d, -56(%rbp)                 ## 4-byte Spill
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	jne	LBB0_11
## %bb.7:
	movq	56(%rdi), %rax
	incq	%rax
	cmpq	%rax, 48(%rdi)
	jne	LBB0_11
## %bb.8:
	cmpl	$5, %esi
	ja	LBB0_11
## %bb.9:
	movl	$49, %eax
	btl	%esi, %eax
	jae	LBB0_11
## %bb.10:
	movl	$1024, %r12d                    ## imm = 0x400
LBB0_11:
	movl	%r10d, %edi
	subl	%r12d, %edi
	movl	%r10d, %ebx
	callq	_abs
	movq	%rax, %r13
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	subl	%r14d, %r12d
	movl	%r12d, %edi
	callq	_abs
	xorl	%ecx, %ecx
	cmpq	%rax, %r13
	cmovll	%r14d, %ebx
	setl	%cl
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%ecx, (%rax)
	movl	-56(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edi
	sarl	%edi
	addl	%ebx, %edi
	movl	%r12d, %esi
	callq	_FASTDIV
	movl	%r15d, %ecx
	subl	%eax, %ecx
	addl	%r15d, %eax
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	cmovel	%eax, %r15d
	cmovnel	%ecx, %eax
	imull	%r12d, %r15d
	cmpl	$2048, %r15d                    ## imm = 0x800
	jb	LBB0_22
## %bb.12:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	cmpl	$0, 80(%rbx)
	je	LBB0_13
LBB0_19:
	testl	%r15d, %r15d
	js	LBB0_20
LBB0_21:
	movq	_FF_BUG_DC_CLIP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 64(%rbx)
	movl	$2047, %ecx                     ## imm = 0x7FF
	cmovel	%ecx, %r15d
	jmp	LBB0_22
LBB0_13:
	movq	72(%rbx), %rdi
	movq	_AV_EF_BITSTREAM@GOTPCREL(%rip), %rcx
	movq	_AV_EF_AGGRESSIVE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%edx, (%rdi)
	je	LBB0_19
## %bb.14:
	testl	%r15d, %r15d
	js	LBB0_15
## %bb.17:
	addl	$2048, %r12d                    ## imm = 0x800
	cmpl	%r12d, %r15d
	jle	LBB0_21
## %bb.18:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	32(%rbx), %rcx
	movq	48(%rbx), %r8
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_16
LBB0_20:
	xorl	%r15d, %r15d
LBB0_22:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%r15d, (%rcx)
LBB0_23:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	32(%rbx), %rcx
	movq	48(%rbx), %r8
	leaq	L_.str(%rip), %rdx
LBB0_16:
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_IS_3IV1,8,3                    ## @IS_3IV1
	.comm	_AV_EF_BITSTREAM,4,2            ## @AV_EF_BITSTREAM
	.comm	_AV_EF_AGGRESSIVE,4,2           ## @AV_EF_AGGRESSIVE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dc<0 at %dx%d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"dc overflow at %dx%d\n"

	.comm	_FF_BUG_DC_CLIP,4,2             ## @FF_BUG_DC_CLIP
	.no_dead_strip	_ff_mpeg4_pred_dc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ff_mpeg4_pred_dc
_ff_mpeg4_pred_dc:                      ; @ff_mpeg4_pred_dc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x4
	mov	x23, x3
	mov	x22, x2
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x19, x0
	cmp	w1, #3
	cset	w8, gt
	ldr	w8, [x0, w8, uxtw #2]
Lloh0:
	adrp	x9, _IS_3IV1@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IS_3IV1@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x9, #0
	mov	w9, #8
	csel	w20, w8, w9, eq
	sbfiz	x8, x1, #2, #32
	ldp	x9, x10, [x0, #8]
	ldr	w9, [x9, x8]
	neg	w11, w9
	ldr	x10, [x10]
	ldr	x12, [x0, #24]
	ldrsw	x8, [x12, x8]
	add	x25, x10, x8, lsl #2
	ldur	w26, [x25, #-4]
	mvn	w8, w9
	ldr	w28, [x25, w8, sxtw #2]
	ldr	w27, [x25, w11, sxtw #2]
	cmp	w1, #3
	b.eq	LBB0_4
; %bb.1:
	ldr	x8, [x19, #88]
	cbz	x8, LBB0_4
; %bb.2:
	mov	w8, #1024
	cmp	w1, #2
	csel	w28, w28, w8, eq
	csel	w27, w27, w8, eq
	cmp	w1, #1
	b.eq	LBB0_4
; %bb.3:
	ldp	x9, x10, [x19, #32]
	cmp	x9, x10
	csel	w26, w8, w26, eq
	csel	w28, w8, w28, eq
LBB0_4:
	ldp	x8, x9, [x19, #32]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	ldp	x8, x9, [x19, #48]
	add	x9, x9, #1
	mov	w10, #1
	lsl	w10, w10, w1
	mov	w11, #49
	tst	w10, w11
	mov	w10, #1024
	csel	w10, w10, w28, ne
	cmp	w1, #5
	csel	w10, w28, w10, hi
	cmp	x8, x9
	csel	w28, w28, w10, ne
LBB0_6:
	sub	w0, w26, w28
	bl	_abs
	mov	x24, x0
	sub	w0, w28, w27
	bl	_abs
	cmp	x24, x0
	cset	w8, lt
	csel	w9, w27, w26, lt
	str	w8, [x23]
	add	w0, w9, w20, asr #1
	mov	x1, x20
	bl	_FASTDIV
	sub	w8, w22, w0
	add	w9, w0, w22
	cmp	w21, #0
	csel	w10, w9, w22, eq
	csel	w0, w9, w8, eq
	mul	w9, w10, w20
	cmp	w9, #2048
	b.lo	LBB0_15
; %bb.7:
	ldr	w8, [x19, #80]
	cbz	w8, LBB0_10
LBB0_8:
	tbnz	w9, #31, LBB0_14
LBB0_9:
	ldr	w8, [x19, #64]
Lloh3:
	adrp	x10, _FF_BUG_DC_CLIP@GOTPAGE
Lloh4:
	ldr	x10, [x10, _FF_BUG_DC_CLIP@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w8
	mov	w8, #2047
	csel	w9, w8, w9, eq
	b	LBB0_15
LBB0_10:
	ldr	x8, [x19, #72]
	ldr	w10, [x8]
Lloh6:
	adrp	x11, _AV_EF_BITSTREAM@GOTPAGE
Lloh7:
	ldr	x11, [x11, _AV_EF_BITSTREAM@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
Lloh9:
	adrp	x12, _AV_EF_AGGRESSIVE@GOTPAGE
Lloh10:
	ldr	x12, [x12, _AV_EF_AGGRESSIVE@GOTPAGEOFF]
Lloh11:
	ldr	w12, [x12]
	orr	w11, w12, w11
	tst	w11, w10
	b.eq	LBB0_8
; %bb.11:
	tbnz	w9, #31, LBB0_17
; %bb.12:
	add	w10, w20, #2048
	cmp	w9, w10
	b.le	LBB0_9
; %bb.13:
Lloh12:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x9]
	ldr	x3, [x19, #32]
	ldr	x4, [x19, #48]
Lloh15:
	adrp	x2, l_.str.1@PAGE
Lloh16:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_18
LBB0_14:
	mov	w9, #0
LBB0_15:
	str	w9, [x25]
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_17:
Lloh17:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh18:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x9]
	ldr	x3, [x19, #32]
	ldr	x4, [x19, #48]
Lloh20:
	adrp	x2, l_.str@PAGE
Lloh21:
	add	x2, x2, l_.str@PAGEOFF
LBB0_18:
	mov	x0, x8
	bl	_av_log
Lloh22:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_IS_3IV1,8,3                    ; @IS_3IV1
	.comm	_AV_EF_BITSTREAM,4,2            ; @AV_EF_BITSTREAM
	.comm	_AV_EF_AGGRESSIVE,4,2           ; @AV_EF_AGGRESSIVE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dc<0 at %dx%d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"dc overflow at %dx%d\n"

	.comm	_FF_BUG_DC_CLIP,4,2             ; @FF_BUG_DC_CLIP
	.no_dead_strip	_ff_mpeg4_pred_dc
.subsections_via_symbols
