	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpb_add
_dpb_add:                               ## @dpb_add
	.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	(%rdi), %eax
	movl	$-1, %ebx
	cmpl	4(%rdi), %eax
	jge	LBB0_10
## %bb.1:
	movq	%rdi, %r13
	testl	%eax, %eax
	jle	LBB0_9
## %bb.2:
	movl	$16, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	%rax, %r14
	movq	-16(%rax,%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movl	(%rsi), %edi
	callq	_ff_vaapi_get_surface_id
	cmpq	%rax, -48(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_4
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	(%r13), %rax
	addq	$24, %r15
	cmpq	%rax, %rbx
	movq	%r12, %rsi
	jl	LBB0_3
LBB0_9:
	cltq
	leal	1(%rax), %ecx
	movl	%ecx, (%r13)
	leaq	(%rax,%rax,2), %rdi
	shlq	$3, %rdi
	addq	8(%r13), %rdi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_fill_vaapi_pic
LBB0_10:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	-72(%rbp), %rdi
	xorl	%ebx, %ebx
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_fill_vaapi_pic
	movl	-64(%rbp), %ecx
	movl	-8(%r14,%r15), %eax
	movl	%eax, %edi
	xorl	%ecx, %edi
	movq	_VA_PICTURE_H264_TOP_FIELD@GOTPCREL(%rip), %r8
	movq	_VA_PICTURE_H264_BOTTOM_FIELD@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%r8), %esi
	testl	%edi, %esi
	je	LBB0_10
## %bb.5:
	andl	%ecx, %esi
	orl	%eax, %esi
	movl	%esi, -8(%r14,%r15)
	movl	(%r8), %eax
	testl	%eax, -64(%rbp)
	je	LBB0_7
## %bb.6:
	movl	-56(%rbp), %eax
	movl	%eax, (%r14,%r15)
	jmp	LBB0_10
LBB0_7:
	movl	-60(%rbp), %eax
	movl	%eax, -4(%r14,%r15)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_VA_PICTURE_H264_TOP_FIELD,4,2  ## @VA_PICTURE_H264_TOP_FIELD
	.comm	_VA_PICTURE_H264_BOTTOM_FIELD,4,2 ## @VA_PICTURE_H264_BOTTOM_FIELD
	.no_dead_strip	_dpb_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpb_add
_dpb_add:                               ; @dpb_add
	.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
	ldp	w8, w9, [x0]
	cmp	w8, w9
	b.ge	LBB0_7
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x21, #0
	mov	x23, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x22, [x20, #8]
	ldr	x24, [x22, x21]
	ldr	w0, [x19]
	bl	_ff_vaapi_get_surface_id
	cmp	x24, x0
	b.eq	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x20]
	add	x21, x21, #24
	cmp	x23, x8
	b.lt	LBB0_3
LBB0_5:
	ldr	x9, [x20, #8]
	add	w10, w8, #1
	str	w10, [x20]
	mov	w10, #24
	smaddl	x0, w8, w10, x9
	mov	x1, x19
	mov	w2, #0
	bl	_fill_vaapi_pic
LBB0_6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	mov	w0, #-1
LBB0_8:
	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
LBB0_9:
	add	x0, sp, #8
	mov	x1, x19
	mov	w2, #0
	bl	_fill_vaapi_pic
	ldr	w9, [sp, #16]
	add	x8, x22, x21
	ldr	w11, [x8, #8]
	eor	w13, w11, w9
Lloh0:
	adrp	x10, _VA_PICTURE_H264_TOP_FIELD@GOTPAGE
Lloh1:
	ldr	x10, [x10, _VA_PICTURE_H264_TOP_FIELD@GOTPAGEOFF]
	ldr	w12, [x10]
Lloh2:
	adrp	x14, _VA_PICTURE_H264_BOTTOM_FIELD@GOTPAGE
Lloh3:
	ldr	x14, [x14, _VA_PICTURE_H264_BOTTOM_FIELD@GOTPAGEOFF]
Lloh4:
	ldr	w14, [x14]
	orr	w12, w14, w12
	tst	w12, w13
	b.eq	LBB0_6
; %bb.10:
	and	w9, w12, w9
	orr	w9, w9, w11
	str	w9, [x8, #8]
	ldr	w8, [sp, #16]
	ldr	w9, [x10]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	ldr	w8, [sp, #24]
	add	x9, x22, x21
	str	w8, [x9, #16]
	b	LBB0_6
LBB0_12:
	ldr	w8, [sp, #20]
	add	x9, x22, x21
	str	w8, [x9, #12]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_VA_PICTURE_H264_TOP_FIELD,4,2  ; @VA_PICTURE_H264_TOP_FIELD
	.comm	_VA_PICTURE_H264_BOTTOM_FIELD,4,2 ; @VA_PICTURE_H264_BOTTOM_FIELD
	.no_dead_strip	_dpb_add
.subsections_via_symbols
