	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dash_write_trailer
_dash_write_trailer:                    ## @dash_write_trailer
	.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	$1032, %rsp                     ## imm = 0x408
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	24(%rdi), %r12
	cmpl	$0, (%rdi)
	jle	LBB0_4
## %bb.1:
	movq	24(%r12), %rbx
	cmpq	$0, 48(%r12)
	jne	LBB0_3
## %bb.2:
	movq	24(%rbx), %rdi
	subq	32(%rbx), %rdi
	movq	16(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	movq	_AV_TIME_BASE_Q@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_av_rescale_q
	movq	%rax, 48(%r12)
LBB0_3:
	movq	24(%rbx), %rdi
	subq	16(%rbx), %rdi
	movq	16(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	movq	_AV_TIME_BASE_Q@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_av_rescale_q
	movq	%rax, 40(%r12)
LBB0_4:
	movq	%r15, %rdi
	movl	$1, %esi
	movl	$-1, %edx
	callq	_dash_flush
	cmpq	$0, 32(%r12)
	je	LBB0_14
## %bb.5:
	cmpl	$0, (%r15)
	jle	LBB0_11
## %bb.6:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r13
	movslq	(%r15), %rax
	addq	$40, %rbx
	cmpq	%rax, %r13
	jge	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %r14
	leaq	(%r14,%rbx), %rsi
	movl	12(%r14,%rbx), %edx
	movq	%r15, %rdi
	callq	_dashenc_delete_media_segments
	movl	8(%r14,%rbx), %esi
	movq	%r15, %rdi
	callq	_dashenc_delete_segment_file
	cmpq	$0, 16(%r12)
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r14,%rbx), %rax
	movq	_SEGMENT_TYPE_MP4@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r12), %rdx
	leaq	-1072(%rbp), %r14
	movq	%r14, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	movl	%r13d, %ecx
	callq	_get_hls_playlist_name
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_dashenc_delete_file
	jmp	LBB0_10
LBB0_11:
	movq	8(%r15), %rsi
	movq	%r15, %rdi
	callq	_dashenc_delete_file
	cmpq	$0, 16(%r12)
	je	LBB0_14
## %bb.12:
	cmpq	$0, 8(%r12)
	je	LBB0_14
## %bb.13:
	movq	(%r12), %rcx
	leaq	L_.str(%rip), %rdx
	leaq	-1072(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_snprintf
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_dashenc_delete_file
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	xorl	%eax, %eax
	addq	$1032, %rsp                     ## imm = 0x408
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_TIME_BASE_Q,4,2             ## @AV_TIME_BASE_Q
	.comm	_SEGMENT_TYPE_MP4,8,3           ## @SEGMENT_TYPE_MP4
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%smaster.m3u8"

	.no_dead_strip	_dash_write_trailer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dash_write_trailer
_dash_write_trailer:                    ; @dash_write_trailer
	.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
	sub	sp, sp, #1040
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldr	x22, [x0, #24]
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	ldr	x21, [x22, #24]
	ldr	x8, [x22, #48]
Lloh3:
	adrp	x20, _AV_TIME_BASE_Q@GOTPAGE
Lloh4:
	ldr	x20, [x20, _AV_TIME_BASE_Q@GOTPAGEOFF]
	cbnz	x8, LBB0_3
; %bb.2:
	ldp	x8, x9, [x21, #24]
	sub	x0, x8, x9
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	w1, [x8]
	ldr	w2, [x20]
	bl	_av_rescale_q
	str	x0, [x22, #48]
LBB0_3:
	ldp	x9, x8, [x21, #16]
	sub	x0, x8, x9
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	w1, [x8]
	ldr	w2, [x20]
	bl	_av_rescale_q
	str	x0, [x22, #40]
LBB0_4:
	mov	x0, x19
	mov	w1, #1
	mov	w2, #-1
	bl	_dash_flush
	ldr	x8, [x22, #32]
	cbz	x8, LBB0_14
; %bb.5:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.6:
	mov	x23, #0
	mov	x20, #0
Lloh5:
	adrp	x24, _SEGMENT_TYPE_MP4@GOTPAGE
Lloh6:
	ldr	x24, [x24, _SEGMENT_TYPE_MP4@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x19]
	add	x23, x23, #40
	cmp	x20, x8
	b.ge	LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x25, [x22, #24]
	add	x21, x25, x23
	ldr	w2, [x21, #12]
	mov	x0, x19
	mov	x1, x21
	bl	_dashenc_delete_media_segments
	ldr	w1, [x21, #8]
	mov	x0, x19
	bl	_dashenc_delete_segment_file
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x25, x23]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x2, [x22]
	add	x0, sp, #8
	mov	w1, #1024
	mov	x3, x20
	bl	_get_hls_playlist_name
	add	x1, sp, #8
	mov	x0, x19
	bl	_dashenc_delete_file
	b	LBB0_7
LBB0_11:
	ldr	x1, [x19, #8]
	mov	x0, x19
	bl	_dashenc_delete_file
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_14
; %bb.12:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_14
; %bb.13:
	ldr	x3, [x22]
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #8
	mov	w1, #1024
	bl	_snprintf
	add	x1, sp, #8
	mov	x0, x19
	bl	_dashenc_delete_file
LBB0_14:
	ldur	x8, [x29, #-72]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	mov	w0, #0
	add	sp, sp, #1040
	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
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_TIME_BASE_Q,4,2             ; @AV_TIME_BASE_Q
	.comm	_SEGMENT_TYPE_MP4,8,3           ; @SEGMENT_TYPE_MP4
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%smaster.m3u8"

	.no_dead_strip	_dash_write_trailer
.subsections_via_symbols
