	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alignStream
_alignStream:                           ## @alignStream
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	8(%rsi), %edi
	callq	_hb_list_count
	testq	%rax, %rax
	jle	LBB0_24
## %bb.1:
	movq	(%r15), %rax
	movq	_SYNC_TYPE_SUBTITLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_24
## %bb.2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r15), %edi
	xorl	%esi, %esi
	callq	_hb_list_item
	movq	%rax, -64(%rbp)
	movq	(%rax), %rsi
	subq	%r14, %rsi
	je	LBB0_24
## %bb.3:
	js	LBB0_4
## %bb.13:
	movq	%rax, %r12
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rax
	movq	_SYNC_TYPE_AUDIO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.14:
	movq	16(%r13), %rax
	movq	_HB_ACODEC_PASS_FLAG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_21
## %bb.15:
	movq	%r13, %rdi
	movq	%r14, %rdx
	callq	_CreateSilenceBuf
	jmp	LBB0_18
LBB0_4:
	cmpl	$0, (%rbx)
	jle	LBB0_24
## %bb.5:
	xorl	%r12d, %r12d
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_alignStream
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%r12
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movslq	(%rbx), %rax
	cmpq	%rax, %r12
	jge	LBB0_24
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	8(%rbx), %r15
	leaq	(%r12,%r12,2), %r13
	leaq	(%r15,%r13,8), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	cmpq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	leaq	-64(%rbp), %rbx
	je	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	8(%r15,%r13,8), %edi
	callq	_hb_list_count
	testq	%rax, %rax
	jle	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	leaq	(%r15,%r13,8), %r15
	addq	$8, %r15
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %edi
	xorl	%esi, %esi
	callq	_hb_list_item
	movq	%rax, -64(%rbp)
	cmpq	%r14, (%rax)
	jge	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movl	(%r15), %edi
	movq	%rax, %rsi
	callq	_hb_list_rem
	movq	%rbx, %rdi
	callq	_hb_buffer_close
	movl	(%r15), %edi
	callq	_hb_list_count
	testq	%rax, %rax
	jg	LBB0_9
	jmp	LBB0_12
LBB0_16:
	movq	_SYNC_TYPE_VIDEO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.17:
	movq	%r13, %rdi
	movq	%r14, %rdx
	callq	_CreateBlackBuf
LBB0_18:
	movq	%rax, %rdx
	testq	%rax, %rax
	je	LBB0_21
## %bb.19:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%rdx), %r14
	movq	24(%rdx), %r15
	movq	$0, 24(%rdx)
	movl	8(%r13), %edi
	movl	%ebx, %esi
	callq	_hb_list_insert
	incl	%ebx
	movq	%r15, %rdx
	testq	%r15, %r15
	jne	LBB0_20
LBB0_21:
	movq	(%r13), %rax
	movq	_SYNC_TYPE_VIDEO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_24
## %bb.22:
	movq	(%r12), %rax
	cmpq	%r14, %rax
	jle	LBB0_24
## %bb.23:
	subl	%r14d, %eax
	addl	%eax, 16(%r12)
	movq	%r14, (%r12)
LBB0_24:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYNC_TYPE_SUBTITLE,8,3         ## @SYNC_TYPE_SUBTITLE
	.comm	_SYNC_TYPE_AUDIO,8,3            ## @SYNC_TYPE_AUDIO
	.comm	_HB_ACODEC_PASS_FLAG,4,2        ## @HB_ACODEC_PASS_FLAG
	.comm	_SYNC_TYPE_VIDEO,8,3            ## @SYNC_TYPE_VIDEO
	.no_dead_strip	_alignStream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alignStream
_alignStream:                           ; @alignStream
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x1, #8]
	bl	_hb_list_count
	cmp	x0, #1
	b.lt	LBB0_23
; %bb.1:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _SYNC_TYPE_SUBTITLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SYNC_TYPE_SUBTITLE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_23
; %bb.2:
	ldr	w0, [x20, #8]
	mov	w1, #0
	bl	_hb_list_item
	str	x0, [sp, #8]
	ldr	x8, [x0]
	subs	x1, x8, x19
	b.eq	LBB0_23
; %bb.3:
	tbnz	x1, #63, LBB0_7
; %bb.4:
	mov	x22, x0
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _SYNC_TYPE_AUDIO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SYNC_TYPE_AUDIO@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x23, _SYNC_TYPE_VIDEO@GOTPAGE
Lloh7:
	ldr	x23, [x23, _SYNC_TYPE_VIDEO@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.5:
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _HB_ACODEC_PASS_FLAG@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HB_ACODEC_PASS_FLAG@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_20
; %bb.6:
	mov	x0, x20
	mov	x2, x19
	bl	_CreateSilenceBuf
	b	LBB0_17
LBB0_7:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_23
; %bb.8:
	mov	x23, #0
	mov	w24, #24
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	bl	_alignStream
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x21]
	cmp	x23, x8
	b.ge	LBB0_23
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	ldr	x8, [x21, #8]
	madd	x22, x23, x24, x8
	cmp	x22, x20
	b.eq	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	madd	x25, x23, x24, x8
	ldr	w0, [x25, #8]!
	bl	_hb_list_count
	cmp	x0, #1
	b.lt	LBB0_10
LBB0_13:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x25]
	mov	w1, #0
	bl	_hb_list_item
	str	x0, [sp, #8]
	ldr	x8, [x0]
	cmp	x8, x19
	b.ge	LBB0_9
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	mov	x1, x0
	ldr	w0, [x25]
	bl	_hb_list_rem
	add	x0, sp, #8
	bl	_hb_buffer_close
	ldr	w0, [x25]
	bl	_hb_list_count
	cmp	x0, #0
	b.gt	LBB0_13
	b	LBB0_10
LBB0_15:
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.16:
	mov	x0, x20
	mov	x2, x19
	bl	_CreateBlackBuf
LBB0_17:
	mov	x2, x0
	cbz	x0, LBB0_20
; %bb.18:
	mov	w21, #0
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x19, [x2, #8]
	ldr	x24, [x2, #24]
	str	xzr, [x2, #24]
	ldr	w0, [x20, #8]
	mov	x1, x21
	bl	_hb_list_insert
	add	w21, w21, #1
	mov	x2, x24
	cbnz	x24, LBB0_19
LBB0_20:
	ldr	x8, [x20]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_23
; %bb.21:
	ldr	x8, [x22]
	cmp	x8, x19
	b.le	LBB0_23
; %bb.22:
	ldr	w9, [x22, #16]
	sub	w8, w8, w19
	add	w8, w9, w8
	str	w8, [x22, #16]
	str	x19, [x22]
LBB0_23:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SYNC_TYPE_SUBTITLE,8,3         ; @SYNC_TYPE_SUBTITLE
	.comm	_SYNC_TYPE_AUDIO,8,3            ; @SYNC_TYPE_AUDIO
	.comm	_HB_ACODEC_PASS_FLAG,4,2        ; @HB_ACODEC_PASS_FLAG
	.comm	_SYNC_TYPE_VIDEO,8,3            ; @SYNC_TYPE_VIDEO
	.no_dead_strip	_alignStream
.subsections_via_symbols
