	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_cv_pixel_buffer
_create_cv_pixel_buffer:                ## @create_cv_pixel_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	%rsp, -96(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_AV_NUM_DATA_POINTERS@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	leaq	(,%rbx,8), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movl	(%r15), %r12d
	leaq	(,%r12,8), %r15
	movq	%r15, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	(%r14), %rax
	movq	_AV_PIX_FMT_VIDEOTOOLBOX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	cmpq	%rax, (%rbx)
	sete	%dil
	callq	_av_assert0
	movq	16(%rbx), %rax
	movq	24(%rax), %rdi
	movq	%rdi, (%r13)
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_av_assert0
	movq	(%r13), %rdi
	callq	_CFRetain
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_2:
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	8(%r14), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	shll	$3, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	shll	$3, %r12d
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_memset
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_memset
	leaq	-112(%rbp), %rax
	leaq	-100(%rbp), %rdx
	leaq	-104(%rbp), %rcx
	movq	%r14, %rdi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	%r13, %r9
	pushq	%rax
	pushq	%r15
	callq	_get_cv_pixel_info
	addq	$16, %rsp
	testl	%eax, %eax
	movq	%r14, %r12
	je	LBB0_4
## %bb.3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	(%rbx), %rcx
	movl	8(%rbx), %r8d
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_9
LBB0_4:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	callq	_VTCompressionSessionGetPixelBufferPool
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_5
LBB0_11:
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movq	%r14, %rsi
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_CVPixelBufferPoolCreatePixelBuffer
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r12, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_9
LBB0_5:
	movq	(%rbx), %rdi
	callq	_VTCompressionSessionPrepareToEncodeFrames
	movq	_kVTInvalidSessionErr@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.6:
	movq	(%rbx), %rdi
	callq	_CFRelease
	movq	$0, (%rbx)
	movq	%r12, %rdi
	callq	_vtenc_configure_encoder
	testl	%eax, %eax
	je	LBB0_7
LBB0_8:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_9:
	movq	_AVERROR_EXTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_15:
	movq	-96(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	(%r15), %rdx
	movq	%r12, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	callq	_copy_avframe_to_pixel_buffer
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movl	%eax, %r14d
	movq	(%r15), %rdi
	callq	_CFRelease
	movq	$0, (%r15)
	movl	%r14d, %ebx
	jmp	LBB0_15
LBB0_7:
	movq	(%rbx), %rdi
	callq	_VTCompressionSessionGetPixelBufferPool
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:
	movq	%rax, %r14
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_11
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NUM_DATA_POINTERS,4,2       ## @AV_NUM_DATA_POINTERS
	.comm	_AV_PIX_FMT_VIDEOTOOLBOX,8,3    ## @AV_PIX_FMT_VIDEOTOOLBOX
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error: Cannot convert format %d color_range %d: %d\n"

	.comm	_AVERROR_EXTERNAL,4,2           ## @AVERROR_EXTERNAL
	.comm	_kVTInvalidSessionErr,8,3       ## @kVTInvalidSessionErr
L_.str.1:                               ## @.str.1
	.asciz	"Could not get pixel buffer pool.\n"

	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.2:                               ## @.str.2
	.asciz	"VT session restarted because of a kVTInvalidSessionErr error.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Could not create pixel buffer from pool: %d.\n"

	.no_dead_strip	_create_cv_pixel_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_cv_pixel_buffer
_create_cv_pixel_buffer:                ; @create_cv_pixel_buffer
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	mov	x26, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x13, _AV_NUM_DATA_POINTERS@GOTPAGE
Lloh4:
	ldr	x13, [x13, _AV_NUM_DATA_POINTERS@GOTPAGEOFF]
	ldr	w12, [x13]
	lsl	x8, x12, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x24, x9, x8
	mov	sp, x24
	ldr	w25, [x13]
	lsl	x8, x25, #3
	mov	x9, x8
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x13, x10, #0xffffffff0
	sub	x22, x9, x13
	mov	sp, x22
	mov	x9, x8
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x23, x8, x13
	mov	sp, x23
	ldr	x8, [x0]
Lloh11:
	adrp	x9, _AV_PIX_FMT_VIDEOTOOLBOX@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AV_PIX_FMT_VIDEOTOOLBOX@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x9, [x21]
	cmp	x9, x8
	cset	w0, eq
	bl	_av_assert0
	ldr	x8, [x21, #16]
	ldr	x0, [x8, #24]
	str	x0, [x19]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_av_assert0
	ldr	x0, [x19]
	bl	_CFRetain
	mov	w20, #0
	b	LBB0_11
LBB0_2:
	ldr	x27, [x20, #8]
	lsl	w2, w12, #3
	mov	x0, x24
	mov	w1, #0
	bl	_memset
	lsl	w25, w25, #3
	mov	x0, x22
	mov	w1, #0
	mov	x2, x25
	bl	_memset
	mov	x0, x23
	mov	w1, #0
	mov	x2, x25
	bl	_memset
	sub	x2, x29, #96
	sub	x3, x29, #92
	sub	x7, x29, #104
	mov	x0, x20
	mov	x1, x21
	mov	x4, x24
	mov	x5, x22
	mov	x6, x23
	bl	_get_cv_pixel_info
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_4
; %bb.3:
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	x8, [x21]
	ldr	w9, [x21, #8]
	sub	sp, sp, #32
	stp	x9, x0, [sp, #8]
	str	x8, [sp]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_av_log
	add	sp, sp, #32
	b	LBB0_10
LBB0_4:
	ldr	x0, [x27]
	bl	_VTCompressionSessionGetPixelBufferPool
	mov	x24, x0
	cbz	x0, LBB0_7
LBB0_5:
	mov	x0, #0
	mov	x1, x24
	mov	x2, x19
	bl	_CVPixelBufferPoolCreatePixelBuffer
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_13
; %bb.6:
Lloh19:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	str	x0, [sp, #-16]!
Lloh22:
	adrp	x2, l_.str.3@PAGE
Lloh23:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_av_log
	add	sp, sp, #16
	b	LBB0_10
LBB0_7:
	ldr	x0, [x27]
	bl	_VTCompressionSessionPrepareToEncodeFrames
Lloh24:
	adrp	x8, _kVTInvalidSessionErr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _kVTInvalidSessionErr@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.8:
	ldr	x0, [x27]
	bl	_CFRelease
	str	xzr, [x27]
	mov	x0, x20
	bl	_vtenc_configure_encoder
	cbz	w0, LBB0_15
LBB0_9:
Lloh27:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x2, l_.str.1@PAGE
Lloh31:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_av_log
LBB0_10:
Lloh32:
	adrp	x8, _AVERROR_EXTERNAL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AVERROR_EXTERNAL@GOTPAGEOFF]
Lloh34:
	ldr	w20, [x8]
LBB0_11:
	mov	sp, x26
	ldur	x8, [x29, #-88]
Lloh35:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh36:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.12:
	mov	x0, x20
	sub	sp, x29, #80
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_13:
	ldr	x2, [x19]
	mov	x0, x20
	mov	x1, x21
	mov	x3, x23
	mov	x4, x22
	bl	_copy_avframe_to_pixel_buffer
	mov	x20, x0
	cbz	w0, LBB0_11
; %bb.14:
	ldr	x0, [x19]
	bl	_CFRelease
	str	xzr, [x19]
	b	LBB0_11
LBB0_15:
	ldr	x0, [x27]
	bl	_VTCompressionSessionGetPixelBufferPool
	cbz	x0, LBB0_9
; %bb.16:
	mov	x24, x0
Lloh38:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
Lloh41:
	adrp	x2, l_.str.2@PAGE
Lloh42:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_av_log
	b	LBB0_5
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NUM_DATA_POINTERS,4,2       ; @AV_NUM_DATA_POINTERS
	.comm	_AV_PIX_FMT_VIDEOTOOLBOX,8,3    ; @AV_PIX_FMT_VIDEOTOOLBOX
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error: Cannot convert format %d color_range %d: %d\n"

	.comm	_AVERROR_EXTERNAL,4,2           ; @AVERROR_EXTERNAL
	.comm	_kVTInvalidSessionErr,8,3       ; @kVTInvalidSessionErr
l_.str.1:                               ; @.str.1
	.asciz	"Could not get pixel buffer pool.\n"

	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.2:                               ; @.str.2
	.asciz	"VT session restarted because of a kVTInvalidSessionErr error.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Could not create pixel buffer from pool: %d.\n"

	.no_dead_strip	_create_cv_pixel_buffer
.subsections_via_symbols
