	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_program_add_stream_index    ## -- Begin function av_program_add_stream_index
	.p2align	4, 0x90
_av_program_add_stream_index:           ## @av_program_add_stream_index
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edx, %r14d
	cmpl	%edx, (%rdi)
	jbe	LBB0_3
## %bb.1:
	movl	4(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_12
## %bb.2:
	movq	8(%rdi), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rbx
	cmpl	%esi, (%rbx)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_5
	jmp	LBB0_12
LBB0_3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	%r14d, %ecx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_av_log                         ## TAILCALL
LBB0_6:
	movl	4(%rbx), %esi
	movq	8(%rbx), %rdi
	testl	%esi, %esi
	jle	LBB0_10
## %bb.7:
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r14d, (%rdi,%rax,4)
	je	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_9 Depth=1
	incq	%rax
	cmpq	%rax, %rsi
	jne	LBB0_9
LBB0_10:
	incl	%esi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	$4, %edx
	callq	_av_realloc_array
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%rax, 8(%rbx)
	movslq	4(%rbx), %rcx
	leal	1(%rcx), %edx
	movl	%edx, 4(%rbx)
	movl	%r14d, (%rax,%rcx,4)
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stream index %d is not valid\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_program_add_stream_index    ; -- Begin function av_program_add_stream_index
	.p2align	2
_av_program_add_stream_index:           ; @av_program_add_stream_index
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	ldr	w8, [x0]
	cmp	w8, w2
	b.ls	LBB0_5
; %bb.1:
	ldr	w8, [x0, #4]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.2:
	ldr	x9, [x0, #8]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x20, [x9]
	ldr	w10, [x20]
	cmp	w10, w1
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.ne	LBB0_3
	b	LBB0_12
LBB0_5:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_av_log
LBB0_6:
	ldr	w8, [x20, #4]
	ldr	x0, [x20, #8]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x9, x8
	mov	x10, x0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	cmp	w11, w19
	b.eq	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x10, x10, #4
	subs	x9, x9, #1
	b.ne	LBB0_8
LBB0_10:
	add	w1, w8, #1
	mov	w2, #4
	bl	_av_realloc_array
	cbz	x0, LBB0_12
; %bb.11:
	str	x0, [x20, #8]
	ldrsw	x8, [x20, #4]
	add	w9, w8, #1
	str	w9, [x20, #4]
	str	w19, [x0, x8, lsl #2]
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stream index %d is not valid\n"

.subsections_via_symbols
