	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vt_map_frame
_vt_map_frame:                          ## @vt_map_frame
	.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
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	16(%rdx), %rax
	movl	12(%rax), %r14d
	movl	%r14d, %edi
	callq	_CVPixelBufferGetPixelFormatType
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_av_map_videotoolbox_format_to_pixfmt
	cmpl	%eax, (%r13)
	jne	LBB0_1
## %bb.2:
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%r14d, %edi
	callq	_CVPixelBufferGetWidth
	cmpq	(%r15), %rax
	jne	LBB0_4
## %bb.3:
	movl	%r14d, %edi
	callq	_CVPixelBufferGetHeight
	cmpq	8(%r15), %rax
	jne	LBB0_4
## %bb.7:
	movl	%r14d, %ecx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	_AV_HWFRAME_MAP_READ@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_8
## %bb.9:
	movq	_kCVPixelBufferLock_ReadOnly@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	jmp	LBB0_10
LBB0_1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%ebx, %edi
	callq	_av_fourcc2str
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_6
LBB0_4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
LBB0_5:
	xorl	%eax, %eax
	callq	_av_log
LBB0_6:
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	xorl	%r14d, %r14d
LBB0_10:
	movq	%r13, %r15
	movl	%ecx, %ebx
	movl	%ecx, %edi
	movq	%r14, %rsi
	callq	_CVPixelBufferLockBaseAddress
	movq	_kCVReturnSuccess@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.12:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, %edi
	callq	_CVPixelBufferIsPlanar
	testq	%rax, %rax
	movl	%ebx, %r14d
	movl	%ebx, %edi
	je	LBB0_16
## %bb.13:
	callq	_CVPixelBufferGetPlaneCount
	testl	%eax, %eax
	jle	LBB0_17
## %bb.14:
	movl	%eax, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_CVPixelBufferGetBaseAddressOfPlane
	movq	16(%r15), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_CVPixelBufferGetBytesPerRowOfPlane
	movq	8(%r15), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_15
	jmp	LBB0_17
LBB0_11:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_16:
	callq	_CVPixelBufferGetBaseAddress
	movq	16(%r15), %rcx
	movl	%eax, (%rcx)
	movl	%r14d, %edi
	callq	_CVPixelBufferGetBytesPerRow
	movq	8(%r15), %rcx
	movl	%eax, (%rcx)
LBB0_17:
	movl	4(%r12), %edi
	movq	_vt_unmap@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %r8
	callq	_ff_hwframe_map_create
	movl	%eax, %ebx
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jns	LBB0_19
## %bb.18:
	movl	%r14d, %edi
	movq	%r15, %rsi
	callq	_CVPixelBufferUnlockBaseAddress
	movl	%ebx, %eax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported or mismatching pixel format: %s\n"

	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
L_.str.1:                               ## @.str.1
	.asciz	"Inconsistent frame dimensions.\n"

	.comm	_AV_HWFRAME_MAP_READ,4,2        ## @AV_HWFRAME_MAP_READ
	.comm	_kCVPixelBufferLock_ReadOnly,8,3 ## @kCVPixelBufferLock_ReadOnly
	.comm	_kCVReturnSuccess,8,3           ## @kCVReturnSuccess
L_.str.2:                               ## @.str.2
	.asciz	"Error locking the pixel buffer.\n"

	.comm	_vt_unmap,4,2                   ## @vt_unmap
	.no_dead_strip	_vt_map_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vt_map_frame
_vt_map_frame:                          ; @vt_map_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
	ldr	x8, [x2, #16]
	ldr	w19, [x8, #12]
	mov	x0, x19
	bl	_CVPixelBufferGetPixelFormatType
	mov	x24, x0
	bl	_av_map_videotoolbox_format_to_pixfmt
	ldr	w8, [x21]
	cmp	w8, w0
	b.ne	LBB0_8
; %bb.1:
	mov	x0, x19
	bl	_CVPixelBufferGetWidth
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.2:
	mov	x0, x19
	bl	_CVPixelBufferGetHeight
	ldr	x8, [x23, #8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.3:
Lloh0:
	adrp	x8, _AV_HWFRAME_MAP_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_HWFRAME_MAP_READ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _kCVPixelBufferLock_ReadOnly@GOTPAGE
Lloh4:
	ldr	x9, [x9, _kCVPixelBufferLock_ReadOnly@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	w8, w22
	csel	x22, x9, xzr, eq
	mov	x0, x19
	mov	x1, x22
	bl	_CVPixelBufferLockBaseAddress
Lloh6:
	adrp	x8, _kCVReturnSuccess@GOTPAGE
Lloh7:
	ldr	x8, [x8, _kCVReturnSuccess@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.4:
	mov	x0, x19
	bl	_CVPixelBufferIsPlanar
	cbz	x0, LBB0_14
; %bb.5:
	mov	x0, x19
	bl	_CVPixelBufferGetPlaneCount
	cmp	w0, #1
	b.lt	LBB0_15
; %bb.6:
	mov	x23, #0
	mov	w24, w0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_CVPixelBufferGetBaseAddressOfPlane
	ldr	x8, [x21, #16]
	lsl	x25, x23, #2
	str	w0, [x8, x25]
	mov	x0, x19
	mov	x1, x23
	bl	_CVPixelBufferGetBytesPerRowOfPlane
	ldr	x8, [x21, #8]
	str	w0, [x8, x25]
	add	x23, x23, #1
	cmp	x24, x23
	b.ne	LBB0_7
	b	LBB0_15
LBB0_8:
Lloh9:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w19, [x8]
	mov	x0, x24
	bl	_av_fourcc2str
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x23
	mov	x1, x19
	b	LBB0_11
LBB0_9:
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_10:
	mov	x0, x23
LBB0_11:
	bl	_av_log
Lloh19:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
Lloh21:
	ldr	w20, [x8]
LBB0_12:
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
LBB0_13:
Lloh22:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
Lloh25:
	adrp	x2, l_.str.2@PAGE
Lloh26:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_14:
	mov	x0, x19
	bl	_CVPixelBufferGetBaseAddress
	ldr	x8, [x21, #16]
	str	w0, [x8]
	mov	x0, x19
	bl	_CVPixelBufferGetBytesPerRow
	ldr	x8, [x21, #8]
	str	w0, [x8]
LBB0_15:
	ldr	w0, [x20, #4]
Lloh27:
	adrp	x8, _vt_unmap@GOTPAGE
Lloh28:
	ldr	x8, [x8, _vt_unmap@GOTPAGEOFF]
Lloh29:
	ldr	w3, [x8]
	mov	x1, x21
	mov	x2, x20
	mov	x4, x22
	bl	_ff_hwframe_map_create
	tbnz	w0, #31, LBB0_17
; %bb.16:
	mov	w20, #0
	b	LBB0_12
LBB0_17:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x22
	bl	_CVPixelBufferUnlockBaseAddress
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported or mismatching pixel format: %s\n"

	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
l_.str.1:                               ; @.str.1
	.asciz	"Inconsistent frame dimensions.\n"

	.comm	_AV_HWFRAME_MAP_READ,4,2        ; @AV_HWFRAME_MAP_READ
	.comm	_kCVPixelBufferLock_ReadOnly,8,3 ; @kCVPixelBufferLock_ReadOnly
	.comm	_kCVReturnSuccess,8,3           ; @kCVReturnSuccess
l_.str.2:                               ; @.str.2
	.asciz	"Error locking the pixel buffer.\n"

	.comm	_vt_unmap,4,2                   ; @vt_unmap
	.no_dead_strip	_vt_map_frame
.subsections_via_symbols
