	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_vaapi_decode_make_slice_buffer ## -- Begin function ff_vaapi_decode_make_slice_buffer
	.p2align	4, 0x90
_ff_vaapi_decode_make_slice_buffer:     ## @ff_vaapi_decode_make_slice_buffer
	.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
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r13
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	(%rax), %r15
	movl	(%rsi), %eax
	xorl	%edi, %edi
	cmpl	4(%rsi), %eax
	setle	%dil
	callq	_av_assert0
	movl	(%rbx), %eax
	movl	4(%rbx), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_3
## %bb.1:
	leal	(%rax,%rax), %ecx
	testl	%eax, %eax
	movl	$64, %esi
	cmovgl	%ecx, %esi
	movl	%esi, 4(%rbx)
	movq	8(%rbx), %rdi
	movl	$8, %edx
	callq	_av_realloc_array
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %eax
	movl	4(%rbx), %ecx
	jmp	LBB0_4
LBB0_3:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
LBB0_4:
	xorl	%edi, %edi
	cmpl	%ecx, %eax
	setl	%dil
	callq	_av_assert0
	movslq	(%rbx), %r14
	movq	(%r15), %rax
	movl	(%rax), %edi
	movl	8(%r15), %esi
	movq	_VASliceParameterBufferType@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	(,%r14,8), %rax
	addq	8(%rbx), %rax
	movq	%rax, (%rsp)
	movq	%r13, %rcx
	movl	$1, %r8d
	movq	%r12, %r9
	callq	_vaCreateBuffer
	movq	%rax, %r12
	movq	_VA_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jne	LBB0_7
## %bb.5:
	addq	%r14, %r14
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movslq	(%rbx), %rcx
	movq	8(%rbx), %rax
	movl	(%rax,%r14,4), %r9d
	leaq	L_.str.1(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %r8
	xorl	%eax, %eax
	callq	_av_log
	movq	(%r15), %rax
	movl	(%rax), %edi
	movl	8(%r15), %esi
	movq	_VASliceDataBufferType@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %eax
	orl	$1, %eax
	movslq	%eax, %r13
	leaq	(,%r13,4), %rax
	addq	8(%rbx), %rax
	movq	%rax, (%rsp)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	$1, %r8d
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	callq	_vaCreateBuffer
	movq	%rax, %r12
	movq	_VA_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jne	LBB0_9
## %bb.6:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movslq	(%rbx), %rcx
	movq	8(%rbx), %rax
	movl	(%rax,%r13,4), %r9d
	leaq	L_.str.3(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	incl	(%rbx)
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_vaErrorStr
	movslq	%eax, %r8
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_10
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r12, %rdi
	callq	_vaErrorStr
	leaq	L_.str.2(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%r12, %r8
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_av_log
	movq	(%r15), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rax
	movl	(%rax,%r14,4), %esi
	callq	_vaDestroyBuffer
LBB0_10:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_VASliceParameterBufferType,4,2 ## @VASliceParameterBufferType
	.comm	_VA_STATUS_SUCCESS,8,3          ## @VA_STATUS_SUCCESS
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create slice parameter buffer: %d (%s).\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"Slice %d param buffer (%zu bytes) is %#x.\n"

	.comm	_VASliceDataBufferType,4,2      ## @VASliceDataBufferType
L_.str.2:                               ## @.str.2
	.asciz	"Failed to create slice data buffer (size %zu): %d (%s).\n"

L_.str.3:                               ## @.str.3
	.asciz	"Slice %d data buffer (%zu bytes) is %#x.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_vaapi_decode_make_slice_buffer ; -- Begin function ff_vaapi_decode_make_slice_buffer
	.p2align	2
_ff_vaapi_decode_make_slice_buffer:     ; @ff_vaapi_decode_make_slice_buffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x5
	mov	x22, x4
	mov	x23, x3
	mov	x24, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x25, [x8]
	ldp	w8, w9, [x1]
	cmp	w8, w9
	cset	w0, le
	bl	_av_assert0
	ldp	w8, w9, [x19]
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.1:
	lsl	w9, w8, #1
	mov	w10, #64
	cmp	w8, #0
	csel	w1, w9, w10, gt
	str	w1, [x19, #4]
	ldr	x0, [x19, #8]
	mov	w2, #8
	bl	_av_realloc_array
	str	x0, [x19, #8]
	cbz	x0, LBB0_7
; %bb.2:
	ldp	w8, w9, [x19]
LBB0_3:
	cmp	w8, w9
	cset	w0, lt
	bl	_av_assert0
	ldrsw	x28, [x19]
	ldr	x8, [x25]
	ldr	w0, [x8]
	ldr	w1, [x25, #8]
Lloh0:
	adrp	x8, _VASliceParameterBufferType@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VASliceParameterBufferType@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	ldr	x8, [x19, #8]
	add	x6, x8, x28, lsl #3
	mov	x3, x23
	mov	w4, #1
	mov	x5, x24
	bl	_vaCreateBuffer
Lloh3:
	adrp	x26, _VA_STATUS_SUCCESS@GOTPAGE
Lloh4:
	ldr	x26, [x26, _VA_STATUS_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.4:
Lloh5:
	adrp	x27, _AV_LOG_DEBUG@GOTPAGE
Lloh6:
	ldr	x27, [x27, _AV_LOG_DEBUG@GOTPAGEOFF]
	lsl	x24, x28, #1
	ldr	w1, [x27]
	ldrsw	x3, [x19]
	ldr	x8, [x19, #8]
	ldr	w8, [x8, x24, lsl #2]
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
	str	x8, [sp]
	mov	x0, x20
	mov	x4, x23
	bl	_av_log
	ldr	x8, [x25]
	ldr	w0, [x8]
	ldr	w1, [x25, #8]
Lloh9:
	adrp	x8, _VASliceDataBufferType@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VASliceDataBufferType@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	ldr	x8, [x19, #8]
	orr	w23, w24, #0x1
	add	x6, x8, w23, sxtw #2
	mov	x3, x21
	mov	w4, #1
	mov	x5, x22
	bl	_vaCreateBuffer
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.5:
	sxtw	x8, w23
	ldr	w1, [x27]
	ldrsw	x3, [x19]
	ldr	x9, [x19, #8]
	ldr	w8, [x9, x8, lsl #2]
Lloh12:
	adrp	x2, l_.str.3@PAGE
Lloh13:
	add	x2, x2, l_.str.3@PAGEOFF
	str	x8, [sp]
	mov	x0, x20
	mov	x4, x21
	bl	_av_log
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	mov	x24, x0
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w19, [x8]
	bl	_vaErrorStr
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x4, w0
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x19
	mov	x3, x24
	bl	_av_log
	b	LBB0_9
LBB0_7:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
	mov	x22, x0
Lloh21:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh23:
	ldr	w23, [x8]
	bl	_vaErrorStr
                                        ; kill: def $w0 killed $w0 def $x0
Lloh24:
	adrp	x2, l_.str.2@PAGE
Lloh25:
	add	x2, x2, l_.str.2@PAGEOFF
	str	x0, [sp]
	mov	x0, x20
	mov	x1, x23
	mov	x3, x21
	mov	x4, x22
	bl	_av_log
	ldr	x8, [x25]
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x24, lsl #2]
	bl	_vaDestroyBuffer
LBB0_9:
Lloh26:
	adrp	x8, _EIO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_AVERROR
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_VASliceParameterBufferType,4,2 ; @VASliceParameterBufferType
	.comm	_VA_STATUS_SUCCESS,8,3          ; @VA_STATUS_SUCCESS
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create slice parameter buffer: %d (%s).\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"Slice %d param buffer (%zu bytes) is %#x.\n"

	.comm	_VASliceDataBufferType,4,2      ; @VASliceDataBufferType
l_.str.2:                               ; @.str.2
	.asciz	"Failed to create slice data buffer (size %zu): %d (%s).\n"

l_.str.3:                               ; @.str.3
	.asciz	"Slice %d data buffer (%zu bytes) is %#x.\n"

.subsections_via_symbols
