	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vaapi_encode_make_param_buffer
_vaapi_encode_make_param_buffer:        ## @vaapi_encode_make_param_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rdi), %r14
	movq	(%rsi), %rdx
	movq	8(%rsi), %rdi
	incq	%rdx
	movl	$4, %esi
	callq	_av_realloc_array
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, 8(%rbx)
	movq	8(%r14), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	leaq	-44(%rbp), %rax
	movq	%rax, (%rsp)
	movl	%r12d, %r14d
	movl	%r12d, %edx
	movq	%r13, %rcx
	movl	$1, %r8d
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	callq	_vaCreateBuffer
	movq	%rax, %r12
	movq	_VA_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jne	LBB0_2
## %bb.3:
	movl	-44(%rbp), %eax
	movq	(%rbx), %rcx
	movq	8(%rbx), %rdx
	leaq	1(%rcx), %rsi
	movq	%rsi, (%rbx)
	movl	%eax, (%rdx,%rcx,4)
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movslq	-44(%rbp), %r8
	leaq	L_.str.1(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_4
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_vaErrorStr
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r14d, %ecx
	movq	%r12, %r8
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_av_log
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.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 parameter buffer (type %d): %d (%s).\n"

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

	.no_dead_strip	_vaapi_encode_make_param_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vaapi_encode_make_param_buffer
_vaapi_encode_make_param_buffer:        ; @vaapi_encode_make_param_buffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x23, x4
	mov	x22, x3
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x24, [x0]
	ldp	x8, x0, [x1]
	add	x2, x8, #1
	mov	w1, #4
	bl	_av_realloc_array
	cbz	x0, LBB0_3
; %bb.1:
	str	x0, [x21, #8]
	ldr	x8, [x24, #8]
	ldr	w0, [x8]
	ldr	w1, [x24]
	add	x6, sp, #12
	mov	x2, x19
	mov	x3, x23
	mov	w4, #1
	mov	x5, x22
	bl	_vaCreateBuffer
Lloh0:
	adrp	x8, _VA_STATUS_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VA_STATUS_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.2:
	ldr	w8, [sp, #12]
	ldp	x10, x9, [x21]
	add	x11, x10, #1
	str	x11, [x21]
	str	w8, [x9, x10, lsl #2]
Lloh3:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldrsw	x4, [sp, #12]
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x3, x19
	bl	_av_log
	mov	w0, #0
	b	LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_AVERROR
LBB0_4:
	mov	x22, x0
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
	bl	_vaErrorStr
                                        ; kill: def $w0 killed $w0 def $x0
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	str	x0, [sp]
	mov	x0, x20
	mov	x1, x21
	mov	x3, x19
	mov	x4, x22
	bl	_av_log
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.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 parameter buffer (type %d): %d (%s).\n"

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

	.no_dead_strip	_vaapi_encode_make_param_buffer
.subsections_via_symbols
