	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function end_ebml_master_crc32
_end_ebml_master_crc32:                 ## @end_ebml_master_crc32
	.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, %r12
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rsi), %rdi
	leaq	-72(%rbp), %rsi
	callq	_avio_close_dyn_buf
	movl	%eax, %r13d
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_put_ebml_num
	cmpq	$0, (%r12)
	je	LBB0_2
## %bb.1:
	movq	_AV_CRC_32_IEEE_LE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_av_crc_get_table
	movq	_UINT32_MAX@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	-72(%rbp), %rdx
	addq	$24, %rdx
	leal	-6(%r13), %ecx
	movl	%eax, %edi
	callq	_av_crc
	xorl	(%rbx), %eax
	leaq	-64(%rbp), %r12
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_AV_WL32
	movq	_EBML_ID_CRC32@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r12, %rdx
	movl	$16, %ecx
	callq	_put_ebml_binary
	movl	$6, %ebx
LBB0_2:
	movl	%ebx, %esi
	shlq	$2, %rsi
	addq	-72(%rbp), %rsi
	subl	%ebx, %r13d
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_avio_write
	movq	-72(%rbp), %rdi
	callq	_av_free
	movq	$0, (%r14)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_CRC_32_IEEE_LE,4,2          ## @AV_CRC_32_IEEE_LE
	.comm	_UINT32_MAX,4,2                 ## @UINT32_MAX
	.comm	_EBML_ID_CRC32,4,2              ## @EBML_ID_CRC32
	.no_dead_strip	_end_ebml_master_crc32
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function end_ebml_master_crc32
_end_ebml_master_crc32:                 ; @end_ebml_master_crc32
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x0, [x1]
	mov	x1, sp
	bl	_avio_close_dyn_buf
	mov	x21, x0
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_put_ebml_num
	ldr	x8, [x22]
	cbz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _AV_CRC_32_IEEE_LE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_CRC_32_IEEE_LE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_av_crc_get_table
Lloh6:
	adrp	x22, _UINT32_MAX@GOTPAGE
Lloh7:
	ldr	x22, [x22, _UINT32_MAX@GOTPAGEOFF]
	ldr	w1, [x22]
	ldr	x8, [sp]
	add	x2, x8, #24
	sub	w3, w21, #6
	bl	_av_crc
	ldr	w8, [x22]
	eor	w1, w8, w0
	add	x0, sp, #8
	bl	_AV_WL32
Lloh8:
	adrp	x8, _EBML_ID_CRC32@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EBML_ID_CRC32@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	mov	w3, #16
	bl	_put_ebml_binary
	mov	w8, #6
LBB0_2:
	ldr	x9, [sp]
	add	x1, x9, w8, uxtw #2
	sub	w2, w21, w8
	mov	x0, x20
	bl	_avio_write
	ldr	x0, [sp]
	bl	_av_free
	str	xzr, [x19]
	ldr	x8, [sp, #24]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	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
	add	sp, sp, #80
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_CRC_32_IEEE_LE,4,2          ; @AV_CRC_32_IEEE_LE
	.comm	_UINT32_MAX,4,2                 ; @UINT32_MAX
	.comm	_EBML_ID_CRC32,4,2              ; @EBML_ID_CRC32
	.no_dead_strip	_end_ebml_master_crc32
.subsections_via_symbols
