	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_find_default_stream_index   ## -- Begin function av_find_default_stream_index
	.p2align	4, 0x90
_av_find_default_stream_index:          ## @av_find_default_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %r9d
	testl	%r9d, %r9d
	jle	LBB0_1
## %bb.2:
	movq	_INT_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	8(%rdi), %r10
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rax
	movq	(%rax), %r11
	movq	_AV_DISPOSITION_ATTACHED_PIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_AVDISCARD_ALL@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	xorl	%edi, %edi
	xorl	%eax, %eax
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, 16(%rbx)
	leal	12(%rcx), %esi
	cmovel	%ecx, %esi
	leal	200(%rsi), %ecx
	cmpq	%r12, 8(%rbx)
	cmovel	%esi, %ecx
	cmpl	%edx, %ecx
	cmovgl	%edi, %eax
	cmovgl	%ecx, %edx
	incq	%rdi
	cmpq	%rdi, %r9
	je	LBB0_10
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r10,%rdi,8), %rbx
	movq	24(%rbx), %r13
	movq	(%r13), %r8
	movl	$0, %ecx
	cmpq	%r11, %r8
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rbx), %ecx
	andl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	movl	$-400, %esi                     ## imm = 0xFE70
	cmovnel	%esi, %ecx
	cmpq	$0, 24(%r13)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	50(%rcx), %r14d
	cmpq	$0, 16(%r13)
	cmovel	%ecx, %r14d
	movl	%r14d, %ecx
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	addl	$25, %ecx
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r15, %r8
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	50(%rcx), %esi
	cmpq	$0, 8(%r13)
	cmovel	%ecx, %esi
	movl	%esi, %ecx
	jmp	LBB0_9
LBB0_1:
	movl	$-1, %eax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MIN,4,2                    ## @INT_MIN
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ## @AVMEDIA_TYPE_VIDEO
	.comm	_AV_DISPOSITION_ATTACHED_PIC,4,2 ## @AV_DISPOSITION_ATTACHED_PIC
	.comm	_AVMEDIA_TYPE_AUDIO,8,3         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AVDISCARD_ALL,8,3              ## @AVDISCARD_ALL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_find_default_stream_index   ; -- Begin function av_find_default_stream_index
	.p2align	2
_av_find_default_stream_index:          ; @av_find_default_stream_index
	.cfi_startproc
; %bb.0:
	ldr	w9, [x0]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x8, x0
	mov	x10, #0
	mov	w0, #0
Lloh0:
	adrp	x11, _INT_MIN@GOTPAGE
Lloh1:
	ldr	x11, [x11, _INT_MIN@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
Lloh3:
	adrp	x12, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh4:
	ldr	x12, [x12, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
	ldr	x8, [x8, #8]
Lloh5:
	ldr	x12, [x12]
Lloh6:
	adrp	x13, _AV_DISPOSITION_ATTACHED_PIC@GOTPAGE
Lloh7:
	ldr	x13, [x13, _AV_DISPOSITION_ATTACHED_PIC@GOTPAGEOFF]
Lloh8:
	adrp	x14, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh9:
	ldr	x14, [x14, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh10:
	ldr	w13, [x13]
Lloh11:
	ldr	x14, [x14]
Lloh12:
	adrp	x15, _AVDISCARD_ALL@GOTPAGE
Lloh13:
	ldr	x15, [x15, _AVDISCARD_ALL@GOTPAGEOFF]
Lloh14:
	ldr	x15, [x15]
	mov	w16, #-400
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w1, w3, #12
	ldp	x17, x2, [x17, #8]
	cmp	x2, #0
	csel	w1, w3, w1, eq
	add	w2, w1, #200
	cmp	x17, x15
	csel	w17, w1, w2, eq
	cmp	w17, w11
	csel	w0, w10, w0, gt
	csel	w11, w17, w11, gt
	add	x10, x10, #1
	cmp	x9, x10
	b.eq	LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x17, [x8, x10, lsl #3]
	ldr	x1, [x17, #24]
	ldr	x2, [x1]
	cmp	x2, x12
	b.ne	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w3, [x17]
	tst	w13, w3
	csel	w3, wzr, w16, eq
	ldr	x4, [x1, #24]
	cbz	x4, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x4, [x1, #16]
	add	w5, w3, #50
	cmp	x4, #0
	csel	w3, w3, w5, eq
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w3, w3, #25
	cmp	x2, x14
	b.ne	LBB0_2
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w3, #0
	cmp	x2, x14
	b.ne	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x1, [x1, #8]
	add	w2, w3, #50
	cmp	x1, #0
	csel	w3, w3, w2, eq
	b	LBB0_2
LBB0_9:
	ret
LBB0_10:
	mov	w0, #-1
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MIN,4,2                    ; @INT_MIN
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ; @AVMEDIA_TYPE_VIDEO
	.comm	_AV_DISPOSITION_ATTACHED_PIC,4,2 ; @AV_DISPOSITION_ATTACHED_PIC
	.comm	_AVMEDIA_TYPE_AUDIO,8,3         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AVDISCARD_ALL,8,3              ; @AVDISCARD_ALL
.subsections_via_symbols
