	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_video_stream_info
_find_video_stream_info:                ## @find_video_stream_info
	.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, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	leaq	-56(%rbp), %r12
	movq	%r12, %rdi
	callq	_av_init_packet
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_av_packet_unref
	xorl	%eax, %eax
LBB0_21:                                ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, %eax
	jne	LBB0_22
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_av_read_frame
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r15), %rax
	movq	-56(%rbp), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	8(%rax), %rdi
	movq	(%rdi), %rcx
	cmpq	(%r13), %rcx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rax), %rcx
	leaq	1(%rcx), %rdx
	movq	%rdx, (%rax)
	testq	%rcx, %rcx
	jg	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_try_decode_video_frame
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_av_packet_unref
	movl	(%r15), %r8d
	testl	%r8d, %r8d
	jle	LBB0_22
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r15), %rsi
	movq	(%r13), %rdx
	cmpl	$1, %r8d
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %eax
	xorl	%edi, %edi
LBB0_18:                                ##   in Loop: Header=BB0_1 Depth=1
	testb	$1, %r8b
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rsi,%rdi,8), %rcx
	movq	8(%rcx), %rsi
	cmpq	%rdx, (%rsi)
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_1 Depth=1
	xorl	%edx, %edx
	cmpq	$0, (%rcx)
	setg	%dl
	andl	%edx, %eax
	jmp	LBB0_21
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%r8d, %r9d
	andl	$-2, %r9d
	movl	$1, %eax
	xorl	%edi, %edi
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=2
	addq	$2, %rdi
	cmpq	%rdi, %r9
	je	LBB0_18
LBB0_13:                                ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rsi,%rdi,8), %rbx
	movq	8(%rbx), %rcx
	cmpq	%rdx, (%rcx)
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	xorl	%ecx, %ecx
	cmpq	$0, (%rbx)
	setg	%cl
	andl	%ecx, %eax
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=2
	movq	8(%rsi,%rdi,8), %rbx
	movq	8(%rbx), %rcx
	cmpq	%rdx, (%rcx)
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=2
	xorl	%ecx, %ecx
	cmpq	$0, (%rbx)
	setg	%cl
	andl	%ecx, %eax
	jmp	LBB0_17
LBB0_2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
LBB0_3:
	movq	%r15, %rdi
	callq	_av_log
LBB0_22:
	leaq	-56(%rbp), %rdi
	callq	_av_packet_unref
	cmpl	$0, (%r15)
	jle	LBB0_25
## %bb.23:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	movq	8(%rax), %rdi
	callq	_avcodec_close
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_24
LBB0_25:
	shrl	$31, %r14d
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read frame\n"

	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ## @AVMEDIA_TYPE_VIDEO
L_.str.1:                               ## @.str.1
	.asciz	"Failed to decode video frame\n"

	.no_dead_strip	_find_video_stream_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_video_stream_info
_find_video_stream_info:                ; @find_video_stream_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x19, x0
	add	x0, sp, #8
	bl	_av_init_packet
Lloh0:
	adrp	x22, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #8
	bl	_av_packet_unref
	mov	w9, #0
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbnz	w9, LBB0_14
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	add	x1, sp, #8
	mov	x0, x19
	bl	_av_read_frame
	mov	x20, x0
	tbnz	w0, #31, LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [sp, #8]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x0, [x8, #8]
	ldr	x9, [x0]
	ldr	x10, [x22]
	cmp	x9, x10
	b.ne	LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x8]
	add	x10, x9, #1
	str	x10, [x8]
	cmp	x9, #1
	b.ge	LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, sp, #8
	mov	x2, x21
	bl	_try_decode_video_frame
	mov	x20, x0
	tbnz	w0, #31, LBB0_18
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #8
	bl	_av_packet_unref
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x10, [x19, #8]
	ldr	x11, [x22]
	mov	w9, #1
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	add	x10, x10, #8
	subs	x8, x8, #1
	b.eq	LBB0_2
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x12, [x10]
	ldr	x13, [x12, #8]
	ldr	x13, [x13]
	cmp	x13, x11
	b.ne	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	x12, [x12]
	cmp	x12, #0
	cset	w12, gt
	and	w9, w9, w12
	b	LBB0_9
LBB0_12:
Lloh2:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
LBB0_13:
	mov	x0, x19
	bl	_av_log
LBB0_14:
	add	x0, sp, #8
	bl	_av_packet_unref
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.15:
	mov	x21, #0
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x21, lsl #3]
	ldr	x0, [x8, #8]
	bl	_avcodec_close
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.lt	LBB0_16
LBB0_17:
	lsr	w0, w20, #31
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_18:
Lloh7:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_13
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read frame\n"

	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ; @AVMEDIA_TYPE_VIDEO
l_.str.1:                               ; @.str.1
	.asciz	"Failed to decode video frame\n"

	.no_dead_strip	_find_video_stream_info
.subsections_via_symbols
