	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_mpeg_ref_picture            ## -- Begin function ff_mpeg_ref_picture
	.p2align	4, 0x90
_ff_mpeg_ref_picture:                   ## @ff_mpeg_ref_picture
	.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
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	56(%rsi), %rax
	movq	(%rax), %rax
	xorl	%edi, %edi
	cmpl	$0, (%rax)
	sete	%dil
	callq	_av_assert0
	movq	56(%r12), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_av_assert0
	movq	56(%r12), %rax
	leaq	48(%r12), %rsi
	movq	%rax, 48(%r12)
	movq	56(%r15), %rax
	leaq	48(%r15), %rdi
	movq	%rax, 48(%r15)
	callq	_ff_thread_ref_frame
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ff_update_picture_tables
	testl	%eax, %eax
	js	LBB0_5
## %bb.2:
	cmpq	$0, 40(%r12)
	je	LBB0_7
## %bb.3:
	movq	32(%r12), %rdi
	callq	_av_buffer_ref
	movq	%rax, 32(%r15)
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	(%rax), %rax
	movq	%rax, 40(%r15)
LBB0_7:
	movl	28(%r12), %eax
	movl	%eax, 28(%r15)
	movl	24(%r12), %eax
	movl	%eax, 24(%r15)
	movl	20(%r12), %eax
	movl	%eax, 20(%r15)
	movups	4(%r12), %xmm0
	movups	%xmm0, 4(%r15)
	movl	(%r15), %edi
	movl	(%r12), %esi
	movl	$4, %edx
	callq	_memcpy
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_5:
	movl	%eax, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ff_mpeg_unref_picture
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_mpeg_ref_picture            ; -- Begin function ff_mpeg_ref_picture
	.p2align	2
_ff_mpeg_ref_picture:                   ; @ff_mpeg_ref_picture
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x1, #56]
	ldr	x8, [x8]
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w0, eq
	bl	_av_assert0
	ldr	x8, [x21, #56]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_av_assert0
	ldr	x8, [x21, #56]
	mov	x1, x21
	str	x8, [x1, #48]!
	ldr	x8, [x19, #56]
	mov	x0, x19
	str	x8, [x0, #48]!
	bl	_ff_thread_ref_frame
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	x0, x19
	mov	x1, x21
	bl	_ff_update_picture_tables
	tbnz	w0, #31, LBB0_7
; %bb.2:
	ldr	x8, [x21, #40]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x0, [x21, #32]
	bl	_av_buffer_ref
	str	x0, [x19, #32]
	cbz	x0, LBB0_6
; %bb.4:
	ldr	x8, [x0]
	str	x8, [x19, #40]
LBB0_5:
	ldr	w8, [x21, #28]
	str	w8, [x19, #28]
	ldur	d0, [x21, #20]
	stur	d0, [x19, #20]
	ldur	q0, [x21, #4]
	stur	q0, [x19, #4]
	ldr	w0, [x19]
	ldr	w1, [x21]
	mov	w2, #4
	bl	_memcpy
	mov	w22, #0
	b	LBB0_8
LBB0_6:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_7:
	mov	x22, x0
	mov	x0, x20
	mov	x1, x19
	bl	_ff_mpeg_unref_picture
LBB0_8:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
