	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function webm_dash_manifest_write_header
_webm_dash_manifest_write_header:       ## @webm_dash_manifest_write_header
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	callq	_parse_adaptation_sets
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_write_header
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_avio_printf
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	xorps	%xmm0, %xmm0
	movb	$1, %al
	callq	_avio_printf
	cmpl	$0, 4(%r12)
	jne	LBB0_5
## %bb.4:
	movl	(%r14), %ebx
	movq	%r14, %rdi
	callq	_get_duration
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_avio_printf
LBB0_5:
	movl	(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_avio_printf
	cmpl	$0, (%r12)
	jle	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_write_adaptation_set
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_8
LBB0_6:
	movl	(%r14), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_avio_printf
	movq	%r14, %rdi
	callq	_write_footer
	jmp	LBB0_9
LBB0_1:
	movl	%eax, %r15d
LBB0_9:
	movq	%r14, %rdi
	callq	_free_adaptation_sets
	movl	%r15d, %eax
	sarl	$31, %eax
	andl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"<Period id=\"0\""

L_.str.1:                               ## @.str.1
	.asciz	" start=\"PT%gS\""

L_.str.2:                               ## @.str.2
	.asciz	" duration=\"PT%gS\""

L_.str.3:                               ## @.str.3
	.asciz	" >\n"

L_.str.4:                               ## @.str.4
	.asciz	"</Period>\n"

	.no_dead_strip	_webm_dash_manifest_write_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function webm_dash_manifest_write_header
_webm_dash_manifest_write_header:       ; @webm_dash_manifest_write_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x22, [x0, #8]
	bl	_parse_adaptation_sets
	tbnz	w0, #31, LBB0_9
; %bb.1:
	mov	x0, x19
	bl	_write_header
	mov	x20, x0
	tbnz	w0, #31, LBB0_10
; %bb.2:
	ldr	w0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_avio_printf
	ldr	w0, [x19]
	str	xzr, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_avio_printf
	ldr	w8, [x22, #4]
	cbnz	w8, LBB0_4
; %bb.3:
	ldr	w21, [x19]
	mov	x0, x19
	bl	_get_duration
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_avio_printf
LBB0_4:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_avio_printf
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.5:
	mov	w21, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_write_adaptation_set
	mov	x20, x0
	tbnz	w0, #31, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w21, w21, #1
	ldr	w8, [x22]
	cmp	w21, w8
	b.lt	LBB0_6
LBB0_8:
	ldr	w0, [x19]
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_avio_printf
	mov	x0, x19
	bl	_write_footer
	b	LBB0_10
LBB0_9:
	mov	x20, x0
LBB0_10:
	mov	x0, x19
	bl	_free_adaptation_sets
	cmp	w20, #0
	csel	w0, w20, wzr, lt
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"<Period id=\"0\""

l_.str.1:                               ; @.str.1
	.asciz	" start=\"PT%gS\""

l_.str.2:                               ; @.str.2
	.asciz	" duration=\"PT%gS\""

l_.str.3:                               ; @.str.3
	.asciz	" >\n"

l_.str.4:                               ; @.str.4
	.asciz	"</Period>\n"

	.no_dead_strip	_webm_dash_manifest_write_header
.subsections_via_symbols
