	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_ps_streams
_update_ps_streams:                     ## @update_ps_streams
	.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
	cmpl	$-1, %r8d
	jne	LBB0_2
## %bb.1:
	movq	_st2codec@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ecx, %rsi
	movl	(%rax,%rsi,4), %r8d
LBB0_2:
	movslq	%r8d, %r12
	movl	(%rdi), %r8d
	testl	%r8d, %r8d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_3
## %bb.4:
	movq	8(%rdi), %rdi
	movq	_U@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	movq	_V@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	leaq	(,%r8,8), %rax
	leaq	(%rax,%rax,2), %r11
	movl	$-1, %r15d
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_5 Depth=1
	addq	$24, %r14
	incl	%ebx
	cmpq	%r14, %r11
	je	LBB0_25
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdi,%r14), %eax
	cmpl	%r13d, %eax
	cmovel	%ebx, %r15d
	jne	LBB0_17
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	4(%rdi,%r14), %esi
	testl	%esi, %esi
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%r9, 8(%rdi,%r14)
	je	LBB0_8
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%edx, %esi
	je	LBB0_13
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%r12, %r10
	jne	LBB0_24
## %bb.18:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%r12, 8(%rdi,%r14)
	jne	LBB0_24
## %bb.19:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%r13d, %eax
	jl	LBB0_24
## %bb.20:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%edx, 4(%rdi,%r14)
	jl	LBB0_24
## %bb.21:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	callq	_new_pes
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rcx
	cltq
	leaq	(%rax,%rax,2), %rax
	leaq	(%rcx,%rax,8), %rdi
	addq	%rcx, %r14
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r8d
	jmp	LBB0_22
LBB0_3:
	movl	$-1, %r15d
	xorl	%ebx, %ebx
LBB0_22:
	cmpl	%r8d, %ebx
	jne	LBB0_23
LBB0_25:
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_new_pes
	movl	%eax, %ebx
	movq	8(%r14), %rax
	movslq	%ebx, %r14
	leaq	(%r14,%r14,2), %rcx
	testl	%r15d, %r15d
	js	LBB0_27
## %bb.26:
	leaq	(%rax,%rcx,8), %rdi
	movl	%r15d, %ecx
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rax,%rcx,8), %rsi
	movl	$4, %edx
	callq	_memcpy
	jmp	LBB0_28
LBB0_23:
	movslq	%ebx, %r14
	jmp	LBB0_29
LBB0_27:
	movl	$-1, 16(%rax,%rcx,8)
LBB0_28:
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
LBB0_29:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	leaq	(%r14,%r14,2), %rsi
	movl	%r13d, (%rax,%rsi,8)
	movl	%edx, 4(%rax,%rsi,8)
	movl	%ecx, 20(%rax,%rsi,8)
	movq	%r12, 8(%rax,%rsi,8)
LBB0_30:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_P@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jne	LBB0_15
## %bb.14:
	movl	%ebx, %r15d
	cmpq	%r9, 8(%rdi,%r14)
	je	LBB0_22
	jmp	LBB0_30
LBB0_15:
	cmpq	%r12, %r9
	je	LBB0_30
## %bb.16:
	movl	%ebx, %r15d
	cmpq	%r12, 8(%rdi,%r14)
	jne	LBB0_22
	jmp	LBB0_30
LBB0_8:
	testl	%edx, %edx
	je	LBB0_10
## %bb.9:
	movl	%ebx, %r15d
	jmp	LBB0_22
LBB0_10:
	movq	_P@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	je	LBB0_30
## %bb.11:
	movl	%ebx, %r15d
	cmpq	%r12, %r9
	jne	LBB0_22
	jmp	LBB0_30
	.cfi_endproc
                                        ## -- End function
	.comm	_st2codec,8,3                   ## @st2codec
	.comm	_U,8,3                          ## @U
	.comm	_P,8,3                          ## @P
	.comm	_V,8,3                          ## @V
	.no_dead_strip	_update_ps_streams
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_ps_streams
_update_ps_streams:                     ; @update_ps_streams
	.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
                                        ; kill: def $w4 killed $w4 def $x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	cmn	w4, #1
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _st2codec@GOTPAGE
Lloh1:
	ldr	x8, [x8, _st2codec@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w4, [x8, w19, sxtw #2]
LBB0_2:
	sxtw	x24, w4
	ldr	w8, [x22]
	cmp	w8, #0
	b.le	LBB0_13
; %bb.3:
	mov	x25, #0
	ldr	x10, [x22, #8]
Lloh3:
	adrp	x9, _U@GOTPAGE
Lloh4:
	ldr	x9, [x9, _U@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x11, _V@GOTPAGE
Lloh7:
	ldr	x11, [x11, _V@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	mov	w26, #-1
	mov	w23, #8
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x25, #1
	add	x23, x23, #24
	cmp	x8, x25
	b.eq	LBB0_14
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x13, x10, x23
	ldur	w12, [x13, #-8]
	cmp	w12, w21
	csel	w26, w25, w26, eq
	b.ne	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldur	w13, [x13, #-4]
	cbnz	w13, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x14, [x10, x23]
	cmp	x14, x9
	b.eq	LBB0_21
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	w13, w20
	b.eq	LBB0_17
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	x11, x24
	b.ne	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x13, [x10, x23]
	cmp	x13, x24
	ccmp	w12, w21, #8, eq
	b.lt	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x12, x10, x23
	ldur	w12, [x12, #-4]
	cmp	w12, w20
	b.lt	LBB0_4
; %bb.12:
	mov	x0, x22
	bl	_new_pes
	ldr	x8, [x22, #8]
	mov	w9, #24
	smaddl	x0, w0, w9, x8
	add	x8, x8, x23
	sub	x1, x8, #8
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [x22]
	mov	x23, x25
	cmp	w23, w8
	b.eq	LBB0_14
	b	LBB0_25
LBB0_13:
	mov	w23, #0
	mov	w26, #-1
	cmp	w23, w8
	b.ne	LBB0_25
LBB0_14:
	mov	x0, x22
	bl	_new_pes
	mov	x23, x0
	ldr	x8, [x22, #8]
	sxtw	x25, w23
	mov	w9, #24
	tbnz	w26, #31, LBB0_16
; %bb.15:
	madd	x0, x25, x9, x8
	umaddl	x1, w26, w9, x8
	mov	w2, #4
	bl	_memcpy
	b	LBB0_26
LBB0_16:
	madd	x8, x25, x9, x8
	mov	w9, #-1
	str	w9, [x8, #16]
	b	LBB0_26
LBB0_17:
Lloh9:
	adrp	x11, _P@GOTPAGE
Lloh10:
	ldr	x11, [x11, _P@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x11]
	cmp	x11, x24
	b.ne	LBB0_19
; %bb.18:
	ldr	x10, [x10, x23]
	cmp	x10, x9
	b.ne	LBB0_23
	b	LBB0_24
LBB0_19:
	cmp	x9, x24
	b.eq	LBB0_23
; %bb.20:
	ldr	x9, [x10, x23]
	cmp	x9, x24
	b.ne	LBB0_24
	b	LBB0_23
LBB0_21:
	cbnz	w20, LBB0_24
; %bb.22:
Lloh12:
	adrp	x10, _P@GOTPAGE
Lloh13:
	ldr	x10, [x10, _P@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x10, x24
	ccmp	x9, x24, #4, ne
	b.ne	LBB0_24
LBB0_23:
	mov	x23, x25
	b	LBB0_27
LBB0_24:
	mov	x23, x25
	mov	x26, x25
	cmp	w23, w8
	b.eq	LBB0_14
LBB0_25:
	mov	x8, x23
	sxtw	x25, w8
LBB0_26:
	ldr	x8, [x22, #8]
	mov	w9, #24
	madd	x8, x25, x9, x8
	stp	w21, w20, [x8]
	str	w19, [x8, #20]
	str	x24, [x8, #8]
LBB0_27:
	mov	x0, x23
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_st2codec,8,3                   ; @st2codec
	.comm	_U,8,3                          ; @U
	.comm	_P,8,3                          ; @P
	.comm	_V,8,3                          ; @V
	.no_dead_strip	_update_ps_streams
.subsections_via_symbols
