	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_video_buffer
_get_video_buffer:                      ## @get_video_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
	movl	%esi, %r13d
	movq	%rdi, %r12
	movl	40(%rdi), %edi
	callq	_av_pix_fmt_desc_get
	movq	%rax, %rbx
	movl	$32, %edi
	movl	%r13d, %esi
	callq	_FFMAX
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.1:
	movl	%eax, %r15d
	movl	(%r12), %edi
	movl	4(%r12), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_av_image_check_size
	testl	%eax, %eax
	js	LBB0_14
## %bb.2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %r14
	cmpl	$0, (%r14)
	je	LBB0_15
LBB0_3:
	movl	4(%r12), %edi
	movl	$32, %esi
	callq	_FFALIGN
	movq	%rax, %r15
	movq	8(%r12), %r8
	movq	16(%r12), %rdi
	movl	40(%r12), %esi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	callq	_av_image_fill_pointers
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_27
## %bb.4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	(%r14,%rax,4), %edi
	callq	_av_buffer_alloc
	movq	32(%r12), %rcx
	movq	%rax, (%rcx)
	movq	32(%r12), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_25
## %bb.5:
	movq	8(%r12), %r8
	movq	16(%r12), %rdi
	movl	40(%r12), %esi
	movq	(%rax), %rcx
	movl	%r15d, %edx
	callq	_av_image_fill_pointers
	testl	%eax, %eax
	js	LBB0_26
## %bb.6:
	movq	16(%r12), %rax
	movslq	-48(%rbp), %rcx                 ## 4-byte Folded Reload
	movq	8(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.7:
	addq	%rcx, %rdx
	movq	%rdx, 8(%rax)
LBB0_8:
	movq	16(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.9:
	leaq	(%rdx,%rcx,2), %rdx
	movq	%rdx, 16(%rax)
LBB0_10:
	movq	24(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.11:
	leaq	(%rcx,%rcx,2), %rcx
	addq	%rcx, %rdx
	movq	%rdx, 24(%rax)
LBB0_12:
	movq	%rax, 24(%r12)
	xorl	%r14d, %r14d
	jmp	LBB0_27
LBB0_13:
	movq	_EINVAL@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_15:
	testl	%r13d, %r13d
	movl	$32, %eax
	cmovgl	%r13d, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leal	-1(%rax), %r15d
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movl	40(%r12), %r13d
	movl	%ebx, %esi
	callq	_FFALIGN
	movq	%r14, %rdi
	movl	%r13d, %esi
	movq	%rax, %rdx
	callq	_av_image_fill_linesizes
	testl	%eax, %eax
	js	LBB0_14
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	8(%r12), %r14
	movl	(%r14), %edi
	testl	%r15d, %edi
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	addl	%ebx, %ebx
	cmpl	-56(%rbp), %ebx                 ## 4-byte Folded Reload
	jle	LBB0_16
LBB0_19:
	testl	%edi, %edi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_3
## %bb.20:
	movl	%ebx, %esi
	callq	_FFALIGN
	movq	8(%r12), %rcx
	movl	%eax, (%rcx)
	movl	4(%rcx), %edi
	testl	%edi, %edi
	je	LBB0_3
## %bb.21:
	movl	%ebx, %esi
	callq	_FFALIGN
	movq	8(%r12), %rcx
	movl	%eax, 4(%rcx)
	movl	8(%rcx), %edi
	testl	%edi, %edi
	je	LBB0_3
## %bb.22:
	movl	%ebx, %esi
	callq	_FFALIGN
	movq	8(%r12), %rcx
	movl	%eax, 8(%rcx)
	movl	12(%rcx), %edi
	testl	%edi, %edi
	je	LBB0_3
## %bb.23:
	movl	%ebx, %esi
	callq	_FFALIGN
	movq	8(%r12), %rcx
	movl	%eax, 12(%rcx)
	jmp	LBB0_3
LBB0_14:
	movl	%eax, %r14d
	jmp	LBB0_27
LBB0_25:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_26:
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_av_frame_unref
LBB0_27:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_get_video_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_video_buffer
_get_video_buffer:                      ; @get_video_buffer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0, #40]
	bl	_av_pix_fmt_desc_get
	mov	x22, x0
	mov	w0, #32
	mov	x1, x21
	bl	_FFMAX
	cbz	x22, LBB0_13
; %bb.1:
	mov	x20, x0
	ldp	w0, w1, [x19]
	mov	w2, #0
	mov	x3, #0
	bl	_av_image_check_size
	tbnz	w0, #31, LBB0_22
; %bb.2:
	ldr	x22, [x19, #8]
	ldr	w8, [x22]
	cbz	w8, LBB0_14
LBB0_3:
	ldr	w0, [x19, #4]
	mov	w1, #32
	bl	_FFALIGN
	mov	x21, x0
	ldr	w1, [x19, #40]
	ldp	x4, x0, [x19, #8]
	mov	x2, x21
	mov	x3, #0
	bl	_av_image_fill_pointers
	mov	x22, x0
	tbnz	w0, #31, LBB0_25
; %bb.4:
	add	w0, w22, w20, lsl #2
	bl	_av_buffer_alloc
	ldr	x8, [x19, #32]
	str	x0, [x8]
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	cbz	x8, LBB0_23
; %bb.5:
	ldr	w1, [x19, #40]
	ldr	x3, [x8]
	ldp	x4, x0, [x19, #8]
	mov	x2, x21
	bl	_av_image_fill_pointers
	tbnz	w0, #31, LBB0_24
; %bb.6:
	ldr	x8, [x19, #16]
	sxtw	x9, w20
	ldr	x10, [x8, #8]
	cbz	x10, LBB0_8
; %bb.7:
	add	x10, x10, x9
	str	x10, [x8, #8]
LBB0_8:
	ldr	x10, [x8, #16]
	cbz	x10, LBB0_10
; %bb.9:
	add	x10, x10, x9, lsl #1
	str	x10, [x8, #16]
LBB0_10:
	ldr	x10, [x8, #24]
	cbz	x10, LBB0_12
; %bb.11:
	add	x9, x9, x9, lsl #1
	add	x9, x10, x9
	str	x9, [x8, #24]
LBB0_12:
	mov	w22, #0
	str	x8, [x19, #24]
	b	LBB0_25
LBB0_13:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_14:
	mov	w8, #32
	cmp	w21, #1
	csel	w21, w8, w21, lt
	sub	w25, w21, #1
	mov	w23, #1
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w24, [x19, #40]
	ldr	w0, [x19]
	mov	x1, x23
	bl	_FFALIGN
	mov	x2, x0
	mov	x0, x22
	mov	x1, x24
	bl	_av_image_fill_linesizes
	tbnz	w0, #31, LBB0_22
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x22, [x19, #8]
	ldr	w0, [x22]
	and	w8, w0, w25
	lsl	w23, w23, #1
	cmp	w8, #0
	ccmp	w23, w21, #0, ne
	b.le	LBB0_15
; %bb.17:
	cbz	w0, LBB0_3
; %bb.18:
	mov	x1, x21
	bl	_FFALIGN
	ldr	x8, [x19, #8]
	str	w0, [x8]
	ldr	w0, [x8, #4]
	cbz	w0, LBB0_3
; %bb.19:
	mov	x1, x21
	bl	_FFALIGN
	ldr	x8, [x19, #8]
	str	w0, [x8, #4]
	ldr	w0, [x8, #8]
	cbz	w0, LBB0_3
; %bb.20:
	mov	x1, x21
	bl	_FFALIGN
	ldr	x8, [x19, #8]
	str	w0, [x8, #8]
	ldr	w0, [x8, #12]
	cbz	w0, LBB0_3
; %bb.21:
	mov	x1, x21
	bl	_FFALIGN
	ldr	x8, [x19, #8]
	str	w0, [x8, #12]
	b	LBB0_3
LBB0_22:
	mov	x22, x0
	b	LBB0_25
LBB0_23:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_24:
	mov	x22, x0
	mov	x0, x19
	bl	_av_frame_unref
LBB0_25:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_get_video_buffer
.subsections_via_symbols
