	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpeg4_unpack_bframes_filter
_mpeg4_unpack_bframes_filter:           ## @mpeg4_unpack_bframes_filter
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rdi), %r12
	movl	$-1, -52(%rbp)
	movl	$0, -48(%rbp)
	movl	$-1, -44(%rbp)
	callq	_ff_bsf_get_packet_ref
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_19
## %bb.1:
	movq	(%rbx), %rdi
	movl	8(%rbx), %esi
	leaq	-52(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	callq	_scan_buffer
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	-48(%rbp), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	cmpl	$0, -44(%rbp)
	js	LBB0_6
## %bb.2:
	cmpq	$0, (%r12)
	je	LBB0_4
## %bb.3:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	%r12, %rdi
	callq	_av_buffer_unref
LBB0_4:
	movq	16(%rbx), %rdi
	callq	_av_buffer_ref
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_17
## %bb.5:
	movslq	-44(%rbp), %rcx
	movq	%rcx, %rdx
	addq	(%rbx), %rdx
	movq	%rdx, (%rax)
	movl	8(%rbx), %edx
	subl	%ecx, %edx
	movl	%edx, 8(%rax)
LBB0_6:
	movl	-48(%rbp), %ecx
	cmpl	$3, %ecx
	jl	LBB0_8
## %bb.7:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	-48(%rbp), %ecx
LBB0_8:
	cmpl	$1, %ecx
	jne	LBB0_12
## %bb.9:
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:
	movq	(%rbx), %rcx
	movq	16(%rbx), %rdx
	movq	%rcx, (%rdx)
	movslq	8(%rbx), %rcx
	movl	%ecx, 8(%rdx)
	movq	%rax, 16(%rbx)
	movq	(%rax), %rsi
	movq	%rsi, (%rbx)
	movl	8(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%rdx, (%r12)
	movq	_MAX_NVOP_SIZE@GOTPCREL(%rip), %rax
	cmpq	%rcx, (%rax)
	jl	LBB0_19
## %bb.11:
	movl	(%r13), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	%r12, %rdi
	callq	_av_buffer_unref
	jmp	LBB0_19
LBB0_12:
	jle	LBB0_14
## %bb.13:
	movl	-44(%rbp), %eax
	movl	%eax, 8(%rbx)
	jmp	LBB0_19
LBB0_14:
	cmpl	$0, -52(%rbp)
	js	LBB0_19
## %bb.15:
	movq	%rbx, %rdi
	callq	_av_packet_make_writable
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_18
## %bb.16:
	movl	(%r13), %esi
	leaq	L_.str.4(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	(%rbx), %rax
	movslq	-52(%rbp), %rcx
	movb	$0, (%rax,%rcx)
	jmp	LBB0_19
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_19
LBB0_18:
	movq	%rbx, %rdi
	callq	_av_packet_unref
LBB0_19:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Found %d VOP startcode(s) in this packet.\n"

	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.1:                               ## @.str.1
	.asciz	"Missing one N-VOP packet, discarding one B-frame.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"Found %d VOP headers in one packet, only unpacking one.\n"

	.comm	_MAX_NVOP_SIZE,8,3              ## @MAX_NVOP_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"Skipping N-VOP.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Updating DivX userdata (remove trailing 'p').\n"

	.no_dead_strip	_mpeg4_unpack_bframes_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpeg4_unpack_bframes_filter
_mpeg4_unpack_bframes_filter:           ; @mpeg4_unpack_bframes_filter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x0]
	mov	w8, #-1
	stp	wzr, w8, [sp, #24]
	str	w8, [sp, #20]
	bl	_ff_bsf_get_packet_ref
	mov	x19, x0
	tbnz	w0, #31, LBB0_19
; %bb.1:
	ldr	x0, [x20]
	ldr	w1, [x20, #8]
	add	x2, sp, #28
	add	x3, sp, #24
	add	x4, sp, #20
	bl	_scan_buffer
Lloh0:
	adrp	x23, _AV_LOG_DEBUG@GOTPAGE
Lloh1:
	ldr	x23, [x23, _AV_LOG_DEBUG@GOTPAGEOFF]
	ldr	w1, [x23]
	ldr	w8, [sp, #24]
	str	x8, [sp]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_av_log
	ldr	w8, [sp, #20]
	tbnz	w8, #31, LBB0_6
; %bb.2:
	ldr	x8, [x22]
	cbz	x8, LBB0_4
; %bb.3:
Lloh4:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_av_log
	mov	x0, x22
	bl	_av_buffer_unref
LBB0_4:
	ldr	x0, [x20, #16]
	bl	_av_buffer_ref
	str	x0, [x22]
	cbz	x0, LBB0_17
; %bb.5:
	ldr	x8, [x20]
	ldrsw	x9, [sp, #20]
	add	x8, x8, x9
	str	x8, [x0]
	ldr	w8, [x20, #8]
	sub	w8, w8, w9
	str	w8, [x0, #8]
LBB0_6:
	ldr	w8, [sp, #24]
	cmp	w8, #3
	b.lt	LBB0_8
; %bb.7:
Lloh9:
	adrp	x9, _AV_LOG_WARNING@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh12:
	adrp	x2, l_.str.2@PAGE
Lloh13:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_av_log
	ldr	w8, [sp, #24]
LBB0_8:
	cmp	w8, #1
	b.ne	LBB0_12
; %bb.9:
	ldr	x8, [x22]
	cbz	x8, LBB0_14
; %bb.10:
	ldr	x9, [x20, #16]
	ldr	x10, [x20]
	str	x10, [x9]
	ldrsw	x10, [x20, #8]
	str	w10, [x9, #8]
	str	x8, [x20, #16]
	ldr	x11, [x8]
	str	x11, [x20]
	ldr	w8, [x8, #8]
	str	w8, [x20, #8]
	str	x9, [x22]
Lloh14:
	adrp	x8, _MAX_NVOP_SIZE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MAX_NVOP_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x8, x10
	b.lt	LBB0_19
; %bb.11:
	ldr	w1, [x23]
Lloh17:
	adrp	x2, l_.str.3@PAGE
Lloh18:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_av_log
	mov	x0, x22
	bl	_av_buffer_unref
	b	LBB0_19
LBB0_12:
	cmp	w8, #2
	b.lt	LBB0_14
; %bb.13:
	ldr	w8, [sp, #20]
	str	w8, [x20, #8]
	b	LBB0_19
LBB0_14:
	ldr	w8, [sp, #28]
	tbnz	w8, #31, LBB0_19
; %bb.15:
	mov	x0, x20
	bl	_av_packet_make_writable
	mov	x19, x0
	tbnz	w0, #31, LBB0_18
; %bb.16:
	ldr	w1, [x23]
Lloh19:
	adrp	x2, l_.str.4@PAGE
Lloh20:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_av_log
	ldr	x8, [x20]
	ldrsw	x9, [sp, #28]
	strb	wzr, [x8, x9]
	b	LBB0_19
LBB0_17:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x19, x0
	tbz	w0, #31, LBB0_19
LBB0_18:
	mov	x0, x20
	bl	_av_packet_unref
LBB0_19:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Found %d VOP startcode(s) in this packet.\n"

	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.1:                               ; @.str.1
	.asciz	"Missing one N-VOP packet, discarding one B-frame.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"Found %d VOP headers in one packet, only unpacking one.\n"

	.comm	_MAX_NVOP_SIZE,8,3              ; @MAX_NVOP_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"Skipping N-VOP.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Updating DivX userdata (remove trailing 'p').\n"

	.no_dead_strip	_mpeg4_unpack_bframes_filter
.subsections_via_symbols
