	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vtenc_populate_extradata
_vtenc_populate_extradata:              ## @vtenc_populate_extradata
	.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	%rdi, %r15
	movq	24(%rdi), %r14
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	leaq	8(%r14), %r13
	movq	%r13, (%rsp)
	callq	_vtenc_create_encoder
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movq	(%r13), %rdi
	callq	_VTCompressionSessionGetPixelBufferPool
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	leaq	-56(%rbp), %rdx
	xorl	%edi, %edi
	movq	%rax, %rsi
	callq	_CVPixelBufferPoolCreatePixelBuffer
	movl	%eax, %ebx
	movq	_kCVReturnSuccess@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_4
## %bb.6:
	movl	16(%r15), %esi
	xorl	%edi, %edi
	callq	_CMTimeMake
	movq	(%r13), %rdi
	movq	-56(%rbp), %rsi
	movq	_kCMTimeInvalid@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	$0, (%rsp)
	movl	%eax, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_VTCompressionSessionEncodeFrame
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_5
LBB0_2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_12
LBB0_4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_5:
	movq	%r15, %rdi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_av_log
LBB0_12:
	movq	(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:
	callq	_CFRelease
LBB0_14:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14)
	movl	$1, %edi
	testl	%ebx, %ebx
	jne	LBB0_18
## %bb.15:
	cmpq	$0, 8(%r15)
	je	LBB0_16
## %bb.17:
	xorl	%edi, %edi
	cmpq	$0, (%r15)
	setg	%dil
	jmp	LBB0_18
LBB0_16:
	xorl	%edi, %edi
LBB0_18:
	callq	_av_assert0
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	(%r13), %rdi
	movq	_kCMTimeIndefinite@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_VTCompressionSessionCompleteFrames
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_vtenc_q_pop
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %r12d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r15, %rdi
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movl	%r12d, %ebx
	jmp	LBB0_12
LBB0_11:
	movq	-48(%rbp), %rdi
	callq	_CFRelease
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error getting pixel buffer pool.\n"

	.comm	_kCVReturnSuccess,4,2           ## @kCVReturnSuccess
L_.str.1:                               ## @.str.1
	.asciz	"Error creating frame from pool: %d\n"

	.comm	_kCMTimeInvalid,4,2             ## @kCMTimeInvalid
L_.str.2:                               ## @.str.2
	.asciz	"Error sending frame for extradata: %d\n"

	.comm	_kCMTimeIndefinite,4,2          ## @kCMTimeIndefinite
L_.str.3:                               ## @.str.3
	.asciz	"popping: %d\n"

	.no_dead_strip	_vtenc_populate_extradata
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vtenc_populate_extradata
_vtenc_populate_extradata:              ; @vtenc_populate_extradata
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	ldr	x20, [x0, #24]
	stp	xzr, xzr, [sp, #16]
	add	x21, x20, #8
	mov	x6, x21
	bl	_vtenc_create_encoder
	mov	x22, x0
	cbz	w0, LBB0_5
LBB0_1:
	ldr	x0, [x21]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_CFRelease
LBB0_3:
	stp	xzr, xzr, [x20]
	cbz	w22, LBB0_10
; %bb.4:
	mov	w0, #1
	b	LBB0_14
LBB0_5:
	ldr	x0, [x21]
	bl	_VTCompressionSessionGetPixelBufferPool
	cbz	x0, LBB0_12
; %bb.6:
	mov	x1, x0
	add	x2, sp, #24
	mov	x0, #0
	bl	_CVPixelBufferPoolCreatePixelBuffer
Lloh0:
	adrp	x8, _kCVReturnSuccess@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kCVReturnSuccess@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_15
; %bb.7:
	ldr	w1, [x19, #16]
	mov	w0, #0
	bl	_CMTimeMake
	mov	x2, x0
	ldr	x0, [x21]
	ldr	x1, [sp, #24]
Lloh3:
	adrp	x8, _kCMTimeInvalid@GOTPAGE
Lloh4:
	ldr	x8, [x8, _kCMTimeInvalid@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x4, #0
	mov	x5, #0
	mov	x6, #0
	bl	_VTCompressionSessionEncodeFrame
	cbz	w0, LBB0_16
; %bb.8:
	mov	x22, x0
Lloh6:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	str	x22, [sp]
Lloh9:
	adrp	x2, l_.str.2@PAGE
Lloh10:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_av_log
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	b	LBB0_1
LBB0_10:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_13
; %bb.11:
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, gt
	b	LBB0_14
LBB0_12:
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	w22, #0
	b	LBB0_1
LBB0_13:
	mov	w0, #0
LBB0_14:
	bl	_av_assert0
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
LBB0_15:
	mov	x22, x0
Lloh16:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	str	x22, [sp]
Lloh19:
	adrp	x2, l_.str.1@PAGE
Lloh20:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_1
LBB0_16:
	ldr	x0, [x21]
Lloh21:
	adrp	x8, _kCMTimeIndefinite@GOTPAGE
Lloh22:
	ldr	x8, [x8, _kCMTimeIndefinite@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_VTCompressionSessionCompleteFrames
	mov	x22, x0
	cbnz	w0, LBB0_1
; %bb.17:
	add	x2, sp, #16
	mov	x0, x20
	mov	w1, #0
	mov	x3, #0
	bl	_vtenc_q_pop
	mov	x22, x0
	cbz	w0, LBB0_19
; %bb.18:
Lloh24:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	str	x22, [sp]
Lloh27:
	adrp	x2, l_.str.3@PAGE
Lloh28:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_9
LBB0_19:
	ldr	x0, [sp, #16]
	bl	_CFRelease
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error getting pixel buffer pool.\n"

	.comm	_kCVReturnSuccess,4,2           ; @kCVReturnSuccess
l_.str.1:                               ; @.str.1
	.asciz	"Error creating frame from pool: %d\n"

	.comm	_kCMTimeInvalid,4,2             ; @kCMTimeInvalid
l_.str.2:                               ; @.str.2
	.asciz	"Error sending frame for extradata: %d\n"

	.comm	_kCMTimeIndefinite,4,2          ; @kCMTimeIndefinite
l_.str.3:                               ; @.str.3
	.asciz	"popping: %d\n"

	.no_dead_strip	_vtenc_populate_extradata
.subsections_via_symbols
