	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_manifest
_write_manifest:                        ## @write_manifest
	.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	$2088, %rsp                     ## imm = 0x828
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	24(%rdi), %rbx
	cmpl	$0, (%rbx)
	jle	LBB0_1
## %bb.2:
	movq	8(%rbx), %rax
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	movsd	%xmm0, -2112(%rbp)              ## 8-byte Spill
	movq	16(%r12), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_av_q2d
	mulsd	-2112(%rbp), %xmm0              ## 8-byte Folded Reload
	jmp	LBB0_3
LBB0_1:
	xorpd	%xmm0, %xmm0
LBB0_3:
	movsd	%xmm0, -2112(%rbp)              ## 8-byte Spill
	movq	(%r12), %rcx
	leaq	L_.str(%rip), %rdx
	leaq	-1072(%rbp), %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_snprintf
	movq	(%r12), %rcx
	leaq	L_.str.1(%rip), %rdx
	leaq	-2096(%rbp), %r15
	movq	%r15, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_snprintf
	movq	_AVIO_FLAG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-2104(%rbp), %rsi
	movq	%r12, %rdi
	movq	%r15, %rdx
	xorl	%r8d, %r8d
	callq	*8(%r12)
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	-2104(%rbp), %rdi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_avio_printf
	movq	-2104(%rbp), %rdi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_avio_printf
	movq	-2104(%rbp), %r15
	movq	%r12, -2120(%rbp)               ## 8-byte Spill
	movq	(%r12), %rdi
	callq	_av_basename
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_avio_printf
	movq	-2104(%rbp), %rdi
	testl	%r14d, %r14d
	leaq	L_.str.8(%rip), %rax
	leaq	L_.str.7(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_avio_printf
	movq	-2104(%rbp), %rdi
	leaq	L_.str.9(%rip), %rsi
	xorl	%eax, %eax
	callq	_avio_printf
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.6:
	movq	-2104(%rbp), %rdi
	leaq	L_.str.10(%rip), %rsi
	movsd	-2112(%rbp), %xmm0              ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movb	$1, %al
	callq	_avio_printf
LBB0_7:
	cmpl	$0, (%rbx)
	jle	LBB0_12
## %bb.8:
	movl	$16, %r12d
	xorl	%r14d, %r14d
	movq	%rbx, -2128(%rbp)               ## 8-byte Spill
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %r13
	movl	-4(%r13,%r12), %edi
	callq	_AV_BASE64_SIZE
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_av_malloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %r15
	movl	-4(%r13,%r12), %ecx
	movl	(%r13,%r12), %edx
	movq	%rax, %rdi
	movl	%ebx, %esi
	callq	_av_base64_encode
	movq	-2104(%rbp), %rdi
	leaq	L_.str.11(%rip), %rsi
	movl	%r14d, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_avio_printf
	movq	-2104(%rbp), %rdi
	movslq	-8(%r13,%r12), %rax
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$38, %rdx
	addl	%eax, %edx
	leaq	L_.str.12(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r14d, %ecx
	movl	%r14d, %r8d
	xorl	%eax, %eax
	callq	_avio_printf
	movq	-2104(%rbp), %rdi
	leaq	L_.str.13(%rip), %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_avio_printf
	movq	-2104(%rbp), %rdi
	leaq	L_.str.14(%rip), %rsi
	xorl	%eax, %eax
	callq	_avio_printf
	movq	%r15, %rdi
	callq	_av_free
	incq	%r14
	movq	-2128(%rbp), %rbx               ## 8-byte Reload
	movslq	(%rbx), %rax
	addq	$24, %r12
	cmpq	%rax, %r14
	jl	LBB0_9
LBB0_12:
	movq	-2104(%rbp), %rdi
	leaq	L_.str.15(%rip), %rsi
	xorl	%eax, %eax
	callq	_avio_printf
	movq	-2104(%rbp), %rdi
	callq	_avio_flush
	leaq	-2104(%rbp), %rsi
	movq	-2120(%rbp), %rbx               ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_ff_format_io_close
	leaq	-2096(%rbp), %rdi
	leaq	-1072(%rbp), %rsi
	movq	%rbx, %rdx
	callq	_ff_rename
	jmp	LBB0_13
LBB0_4:
	movl	%eax, %r15d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	leaq	-2096(%rbp), %rcx
	movq	%r12, %rdi
	callq	_av_log
	jmp	LBB0_14
LBB0_10:
	leaq	-2104(%rbp), %rsi
	movq	-2120(%rbp), %rdi               ## 8-byte Reload
	callq	_ff_format_io_close
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_13:
	movl	%eax, %r15d
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%r15d, %eax
	addq	$2088, %rsp                     ## imm = 0x828
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/index.f4m"

L_.str.1:                               ## @.str.1
	.asciz	"%s/index.f4m.tmp"

	.comm	_AVIO_FLAG_WRITE,4,2            ## @AVIO_FLAG_WRITE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"Unable to open %s for writing\n"

L_.str.3:                               ## @.str.3
	.asciz	"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"

L_.str.4:                               ## @.str.4
	.asciz	"<manifest xmlns=\"http://ns.adobe.com/f4m/1.0\">\n"

L_.str.5:                               ## @.str.5
	.asciz	"\t<id>%s</id>\n"

L_.str.6:                               ## @.str.6
	.asciz	"\t<streamType>%s</streamType>\n"

L_.str.7:                               ## @.str.7
	.asciz	"recorded"

L_.str.8:                               ## @.str.8
	.asciz	"live"

L_.str.9:                               ## @.str.9
	.asciz	"\t<deliveryType>streaming</deliveryType>\n"

L_.str.10:                              ## @.str.10
	.asciz	"\t<duration>%f</duration>\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.11:                              ## @.str.11
	.asciz	"\t<bootstrapInfo profile=\"named\" url=\"stream%d.abst\" id=\"bootstrap%d\" />\n"

L_.str.12:                              ## @.str.12
	.asciz	"\t<media bitrate=\"%d\" url=\"stream%d\" bootstrapInfoId=\"bootstrap%d\">\n"

L_.str.13:                              ## @.str.13
	.asciz	"\t\t<metadata>%s</metadata>\n"

L_.str.14:                              ## @.str.14
	.asciz	"\t</media>\n"

L_.str.15:                              ## @.str.15
	.asciz	"</manifest>\n"

	.no_dead_strip	_write_manifest
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_manifest
_write_manifest:                        ; @write_manifest
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	sub	sp, sp, #2096
	mov	x20, x1
	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, #-112]
	ldr	x26, [x0, #24]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.1:
	ldr	x8, [x26, #8]
	ldr	d8, [x8]
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_av_q2d
	fmul	d8, d8, d0
	b	LBB0_3
LBB0_2:
	movi	d8, #0000000000000000
LBB0_3:
	ldr	x3, [x19]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #1056
	mov	w1, #1024
	bl	_snprintf
	ldr	x3, [x19]
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x0, sp, #32
	mov	w1, #1024
	bl	_snprintf
	ldr	x8, [x19, #8]
Lloh7:
	adrp	x9, _AVIO_FLAG_WRITE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AVIO_FLAG_WRITE@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x9]
	add	x1, sp, #24
	add	x2, sp, #32
	mov	x0, x19
	mov	x4, #0
	blr	x8
	tbnz	w0, #31, LBB0_11
; %bb.4:
	ldr	x0, [sp, #24]
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_avio_printf
	ldr	x0, [sp, #24]
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_avio_printf
	ldr	x21, [sp, #24]
	ldr	x0, [x19]
	bl	_av_basename
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh14:
	adrp	x1, l_.str.5@PAGE
Lloh15:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_avio_printf
	ldr	x0, [sp, #24]
Lloh16:
	adrp	x8, l_.str.7@PAGE
Lloh17:
	add	x8, x8, l_.str.7@PAGEOFF
Lloh18:
	adrp	x9, l_.str.8@PAGE
Lloh19:
	add	x9, x9, l_.str.8@PAGEOFF
	cmp	w20, #0
	csel	x8, x9, x8, eq
	str	x8, [sp]
Lloh20:
	adrp	x1, l_.str.6@PAGE
Lloh21:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_avio_printf
	ldr	x0, [sp, #24]
Lloh22:
	adrp	x1, l_.str.9@PAGE
Lloh23:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_avio_printf
	cbz	w20, LBB0_6
; %bb.5:
	ldr	x0, [sp, #24]
	str	d8, [sp]
Lloh24:
	adrp	x1, l_.str.10@PAGE
Lloh25:
	add	x1, x1, l_.str.10@PAGEOFF
	bl	_avio_printf
LBB0_6:
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x27, #0
	mov	x28, #0
Lloh26:
	adrp	x21, l_.str.12@PAGE
Lloh27:
	add	x21, x21, l_.str.12@PAGEOFF
Lloh28:
	adrp	x22, l_.str.13@PAGE
Lloh29:
	add	x22, x22, l_.str.13@PAGEOFF
Lloh30:
	adrp	x23, l_.str.14@PAGE
Lloh31:
	add	x23, x23, l_.str.14@PAGEOFF
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26, #8]
	add	x20, x8, x27
	ldr	w0, [x20, #12]
	bl	_AV_BASE64_SIZE
	mov	x25, x0
	bl	_av_malloc
	cbz	x0, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x24, x0
	ldp	w3, w2, [x20, #12]
	mov	x1, x25
	bl	_av_base64_encode
	ldr	x0, [sp, #24]
	stp	x28, x28, [sp]
Lloh32:
	adrp	x1, l_.str.11@PAGE
Lloh33:
	add	x1, x1, l_.str.11@PAGEOFF
	bl	_avio_printf
	ldr	x0, [sp, #24]
	ldrsw	x8, [x20, #8]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	stp	x28, x28, [sp, #8]
	str	x8, [sp]
	mov	x1, x21
	bl	_avio_printf
	ldr	x0, [sp, #24]
	str	x24, [sp]
	mov	x1, x22
	bl	_avio_printf
	ldr	x0, [sp, #24]
	mov	x1, x23
	bl	_avio_printf
	mov	x0, x24
	bl	_av_free
	add	x28, x28, #1
	ldrsw	x8, [x26]
	add	x27, x27, #24
	cmp	x28, x8
	b.lt	LBB0_8
LBB0_10:
	ldr	x0, [sp, #24]
Lloh34:
	adrp	x1, l_.str.15@PAGE
Lloh35:
	add	x1, x1, l_.str.15@PAGEOFF
	bl	_avio_printf
	ldr	x0, [sp, #24]
	bl	_avio_flush
	add	x1, sp, #24
	mov	x0, x19
	bl	_ff_format_io_close
	add	x0, sp, #32
	add	x1, sp, #1056
	mov	x2, x19
	bl	_ff_rename
	b	LBB0_13
LBB0_11:
	mov	x21, x0
Lloh36:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh37:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
Lloh39:
	adrp	x2, l_.str.2@PAGE
Lloh40:
	add	x2, x2, l_.str.2@PAGEOFF
	add	x3, sp, #32
	mov	x0, x19
	bl	_av_log
	b	LBB0_14
LBB0_12:
	add	x1, sp, #24
	mov	x0, x19
	bl	_ff_format_io_close
Lloh41:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh42:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_13:
	mov	x21, x0
LBB0_14:
	ldur	x8, [x29, #-112]
Lloh44:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh45:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x21
	add	sp, sp, #2096
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/index.f4m"

l_.str.1:                               ; @.str.1
	.asciz	"%s/index.f4m.tmp"

	.comm	_AVIO_FLAG_WRITE,4,2            ; @AVIO_FLAG_WRITE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"Unable to open %s for writing\n"

l_.str.3:                               ; @.str.3
	.asciz	"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"

l_.str.4:                               ; @.str.4
	.asciz	"<manifest xmlns=\"http://ns.adobe.com/f4m/1.0\">\n"

l_.str.5:                               ; @.str.5
	.asciz	"\t<id>%s</id>\n"

l_.str.6:                               ; @.str.6
	.asciz	"\t<streamType>%s</streamType>\n"

l_.str.7:                               ; @.str.7
	.asciz	"recorded"

l_.str.8:                               ; @.str.8
	.asciz	"live"

l_.str.9:                               ; @.str.9
	.asciz	"\t<deliveryType>streaming</deliveryType>\n"

l_.str.10:                              ; @.str.10
	.asciz	"\t<duration>%f</duration>\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.11:                              ; @.str.11
	.asciz	"\t<bootstrapInfo profile=\"named\" url=\"stream%d.abst\" id=\"bootstrap%d\" />\n"

l_.str.12:                              ; @.str.12
	.asciz	"\t<media bitrate=\"%d\" url=\"stream%d\" bootstrapInfoId=\"bootstrap%d\">\n"

l_.str.13:                              ; @.str.13
	.asciz	"\t\t<metadata>%s</metadata>\n"

l_.str.14:                              ; @.str.14
	.asciz	"\t</media>\n"

l_.str.15:                              ; @.str.15
	.asciz	"</manifest>\n"

	.no_dead_strip	_write_manifest
.subsections_via_symbols
