	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stream_cycle_channel
_stream_cycle_channel:                  ## @stream_cycle_channel
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	24(%rdi), %rdi
	movl	(%rdi), %r13d
	cmpl	$130, %esi
	je	LBB0_3
## %bb.1:
	cmpl	$128, %r12d
	jne	LBB0_4
## %bb.2:
	movl	(%r14), %r15d
	movl	4(%r14), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_14
LBB0_3:
	leaq	8(%r14), %rax
	leaq	12(%r14), %rcx
	jmp	LBB0_5
LBB0_4:
	leaq	16(%r14), %rax
	leaq	20(%r14), %rcx
LBB0_5:
	movl	(%rax), %r15d
	movl	(%rcx), %eax
	movl	4(%r14), %edx
	cmpl	$-1, %edx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_14
## %bb.6:
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_av_find_program_from_stream
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movl	(%rax), %r13d
	testl	%r13d, %r13d
	jle	LBB0_12
## %bb.8:
	movq	8(%rax), %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r15d, (%rcx,%rbx,4)
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_9
## %bb.11:
	movl	%r13d, %ebx
LBB0_12:
	cmpl	%r13d, %ebx
	movl	$-1, %r15d
	cmovnel	%ebx, %r15d
	jmp	LBB0_15
LBB0_14:
	xorl	%eax, %eax
LBB0_15:
	leal	-128(%r12), %ecx
	movl	%r15d, %ebx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_18 Depth=1
	cmpl	$130, %r12d
	je	LBB0_25
## %bb.17:                              ##   in Loop: Header=BB0_18 Depth=1
	cmpl	$2, %ecx
	jb	LBB0_27
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	cmpl	%r13d, %ebx
	jl	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	cmpl	$129, %r12d
	je	LBB0_31
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=1
	xorl	%ebx, %ebx
	cmpl	$-1, %r15d
	je	LBB0_30
LBB0_21:                                ##   in Loop: Header=BB0_18 Depth=1
	cmpl	%r15d, %ebx
	je	LBB0_30
## %bb.22:                              ##   in Loop: Header=BB0_18 Depth=1
	movl	%ebx, %edx
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	8(%rax), %rdx
	movslq	%ebx, %rsi
	movl	(%rdx,%rsi,4), %edx
LBB0_24:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	24(%r14), %rsi
	movq	8(%rsi), %rsi
	movslq	%edx, %rdx
	movq	(%rsi,%rdx,8), %rdx
	movq	(%rdx), %rdx
	cmpl	%r12d, (%rdx)
	jne	LBB0_18
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_18 Depth=1
	cmpl	$0, 8(%rdx)
	je	LBB0_18
## %bb.26:                              ##   in Loop: Header=BB0_18 Depth=1
	cmpl	$0, 4(%rdx)
	je	LBB0_18
LBB0_27:
	testq	%rax, %rax
	je	LBB0_32
## %bb.28:
	cmpl	$-1, %ebx
	je	LBB0_32
## %bb.29:
	movq	8(%rax), %rax
	movslq	%ebx, %rcx
	movl	(%rax,%rcx,4), %ebx
	jmp	LBB0_32
LBB0_30:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_31:
	movl	$-1, 16(%r14)
	movl	$-1, %ebx
LBB0_32:
	movq	_AV_LOG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r12d, %edi
	callq	_av_get_media_type_string
	leaq	L_.str(%rip), %rdx
	xorl	%edi, %edi
	movl	%r13d, %esi
	movl	%eax, %ecx
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %r8d
	movl	%ebx, %r9d
	callq	_av_log
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_stream_component_close
	movq	%r14, %rdi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_stream_component_open          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_INFO,4,2                ## @AV_LOG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Switch %s stream from #%d to #%d\n"

	.no_dead_strip	_stream_cycle_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stream_cycle_channel
_stream_cycle_channel:                  ; @stream_cycle_channel
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	ldr	x0, [x0, #24]
	ldr	w23, [x0]
	cmp	w1, #130
	b.eq	LBB0_3
; %bb.1:
	cmp	w20, #128
	b.ne	LBB0_4
; %bb.2:
	mov	x0, #0
	ldp	w24, w21, [x19]
	b	LBB0_15
LBB0_3:
	add	x8, x19, #8
	add	x9, x19, #12
	b	LBB0_5
LBB0_4:
	add	x8, x19, #16
	add	x9, x19, #20
LBB0_5:
	ldr	w24, [x8]
	ldr	w21, [x9]
	ldr	w2, [x19, #4]
	cmn	w2, #1
	b.eq	LBB0_12
; %bb.6:
	mov	x1, #0
	bl	_av_find_program_from_stream
	cbz	x0, LBB0_15
; %bb.7:
	ldr	w23, [x0]
	cmp	w23, #1
	b.lt	LBB0_13
; %bb.8:
	mov	x8, #0
	ldr	x9, [x0, #8]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9, x8, lsl #2]
	cmp	w10, w24
	b.eq	LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x8, x8, #1
	cmp	x23, x8
	b.ne	LBB0_9
; %bb.11:
	mov	x8, x23
	b	LBB0_14
LBB0_12:
	mov	x0, #0
	b	LBB0_15
LBB0_13:
	mov	w8, #0
LBB0_14:
	cmp	w8, w23
	csinv	w24, w8, wzr, ne
LBB0_15:
	sub	w8, w20, #128
	mov	x22, x24
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_18 Depth=1
	cmp	w20, #130
	b.eq	LBB0_26
; %bb.17:                               ;   in Loop: Header=BB0_18 Depth=1
	cmp	w8, #2
	b.lo	LBB0_28
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	add	w22, w22, #1
	cmp	w22, w23
	b.lt	LBB0_22
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	cmp	w20, #129
	b.eq	LBB0_32
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=1
	cmn	w24, #1
	b.eq	LBB0_31
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	w22, #0
LBB0_22:                                ;   in Loop: Header=BB0_18 Depth=1
	cmp	w22, w24
	b.eq	LBB0_31
; %bb.23:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x9, x22
	cbz	x0, LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x9, [x0, #8]
	ldr	w9, [x9, w22, sxtw #2]
LBB0_25:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	x10, [x19, #24]
	ldr	x10, [x10, #8]
	ldr	x9, [x10, w9, sxtw #3]
	ldr	x9, [x9]
	ldr	w10, [x9]
	cmp	w10, w20
	b.ne	LBB0_18
	b	LBB0_16
LBB0_26:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	w10, [x9, #8]
	cbz	w10, LBB0_18
; %bb.27:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	w9, [x9, #4]
	cbz	w9, LBB0_18
LBB0_28:
	cbz	x0, LBB0_33
; %bb.29:
	cmn	w22, #1
	b.eq	LBB0_33
; %bb.30:
	ldr	x8, [x0, #8]
	ldr	w22, [x8, w22, sxtw #2]
	b	LBB0_33
LBB0_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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_32:
	mov	w22, #-1
	str	w22, [x19, #16]
LBB0_33:
Lloh0:
	adrp	x8, _AV_LOG_INFO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_INFO@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	mov	x0, x20
	bl	_av_get_media_type_string
	mov	x3, x0
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, #0
	mov	x1, x23
	mov	x4, x21
	mov	x5, x22
	bl	_av_log
	mov	x0, x19
	mov	x1, x21
	bl	_stream_component_close
	mov	x0, x19
	mov	x1, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_stream_component_open
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_INFO,4,2                ; @AV_LOG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Switch %s stream from #%d to #%d\n"

	.no_dead_strip	_stream_cycle_channel
.subsections_via_symbols
