	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function XzEncIndex_WriteFooter
_XzEncIndex_WriteFooter:                ## @XzEncIndex_WriteFooter
	.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	$280, %rsp                      ## imm = 0x118
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, -312(%rbp)                ## 4-byte Spill
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_CRC_INIT_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -308(%rbp)
	leaq	-296(%rbp), %rdi
	movl	16(%r12), %esi
	callq	_Xz_WriteVarInt
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %ebx
	movq	$0, -304(%rbp)
	leaq	-304(%rbp), %rsi
	leaq	-308(%rbp), %r13
	movq	%r15, %rdi
	movl	%ebx, %edx
	movq	%r13, %rcx
	callq	_WriteBytesUpdateCrc
	movl	%eax, %edi
	callq	_RINOK
	movq	8(%r12), %rsi
	movl	(%r12), %edx
	movq	%r15, %rdi
	movq	%r13, %rcx
	callq	_WriteBytesUpdateCrc
	movl	%eax, %edi
	callq	_RINOK
	addl	(%r12), %ebx
	movl	%ebx, %edi
	callq	_XZ_GET_PAD_SIZE
	movl	%eax, %r12d
	addl	%eax, %ebx
	xorps	%xmm0, %xmm0
	movups	%xmm0, -296(%rbp)
	movq	$0, -280(%rbp)
	movl	-308(%rbp), %edi
	leaq	-272(%rbp), %r14
	movl	%eax, %eax
	shlq	$3, %rax
	negq	%rax
	leaq	(%rax,%rbp), %r13
	addq	$-272, %r13                     ## imm = 0xFEF0
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_CrcUpdate
	movl	%eax, -308(%rbp)
	movl	%eax, %edi
	callq	_CRC_GET_DIGEST
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_SetUi32
	leaq	-208(%rbp), %r14
	shrl	$2, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_SetUi32
	movl	-312(%rbp), %ecx                ## 4-byte Reload
	movl	%ecx, %eax
	sarl	$8, %eax
	cltq
	movq	%rax, -176(%rbp)
	movzbl	%cl, %eax
	movq	%rax, -168(%rbp)
	movq	%r14, %rdi
	movl	$6, %esi
	callq	_CrcCalc
	leaq	-240(%rbp), %rdi
	movl	%eax, %esi
	callq	_SetUi32
	movq	_XZ_FOOTER_SIG_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -160(%rbp)
	movq	_XZ_FOOTER_SIG_1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -152(%rbp)
	addl	$16, %r12d
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_WriteBytes
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_2
## %bb.1:
	addq	$280, %rsp                      ## imm = 0x118
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CRC_INIT_VAL,4,2               ## @CRC_INIT_VAL
	.comm	_XZ_FOOTER_SIG_0,8,3            ## @XZ_FOOTER_SIG_0
	.comm	_XZ_FOOTER_SIG_1,8,3            ## @XZ_FOOTER_SIG_1
	.no_dead_strip	_XzEncIndex_WriteFooter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function XzEncIndex_WriteFooter
_XzEncIndex_WriteFooter:                ; @XzEncIndex_WriteFooter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #368
	.cfi_def_cfa_offset 368
	stp	x28, x27, [sp, #272]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #288]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #304]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #320]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #336]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #352]            ; 16-byte Folded Spill
	add	x29, sp, #352
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	add	x25, sp, #8
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _CRC_INIT_VAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CRC_INIT_VAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #4]
	add	x0, x25, #8
	ldr	w1, [x21, #16]
	bl	_Xz_WriteVarInt
	add	w22, w0, #1
	str	xzr, [sp, #8]
	add	x1, sp, #8
	add	x3, sp, #4
	mov	x0, x19
	mov	x2, x22
	bl	_WriteBytesUpdateCrc
	bl	_RINOK
	ldr	x1, [x21, #8]
	ldr	w2, [x21]
	add	x3, sp, #4
	mov	x0, x19
	bl	_WriteBytesUpdateCrc
	bl	_RINOK
	ldr	w8, [x21]
	add	w21, w8, w22
	mov	x0, x21
	bl	_XZ_GET_PAD_SIZE
	mov	x22, x0
	add	w26, w21, w0
	stp	xzr, xzr, [sp, #24]
	str	xzr, [sp, #16]
	ldr	w0, [sp, #4]
	add	x21, x25, #32
	sub	x23, x21, w22, uxtw #3
	mov	x1, x23
	mov	x2, x22
	bl	_CrcUpdate
	str	w0, [sp, #4]
	bl	_CRC_GET_DIGEST
	mov	x1, x0
	mov	x0, x21
	bl	_SetUi32
	add	x21, x25, #64
	add	x24, x25, #96
	lsr	w1, w26, #2
	mov	x0, x24
	bl	_SetUi32
	sbfx	x8, x20, #8, #24
	and	w9, w20, #0xff
	stp	x8, x9, [x25, #128]
	mov	x0, x24
	mov	w1, #6
	bl	_CrcCalc
	mov	x1, x0
	mov	x0, x21
	bl	_SetUi32
Lloh6:
	adrp	x8, _XZ_FOOTER_SIG_0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XZ_FOOTER_SIG_0@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _XZ_FOOTER_SIG_1@GOTPAGE
Lloh10:
	ldr	x9, [x9, _XZ_FOOTER_SIG_1@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	stp	x8, x9, [x25, #144]
	add	w2, w22, #16
	mov	x0, x19
	mov	x1, x23
	bl	_WriteBytes
	ldur	x8, [x29, #-88]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #352]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #336]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #320]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #304]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #288]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #272]            ; 16-byte Folded Reload
	add	sp, sp, #368
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CRC_INIT_VAL,4,2               ; @CRC_INIT_VAL
	.comm	_XZ_FOOTER_SIG_0,8,3            ; @XZ_FOOTER_SIG_0
	.comm	_XZ_FOOTER_SIG_1,8,3            ; @XZ_FOOTER_SIG_1
	.no_dead_strip	_XzEncIndex_WriteFooter
.subsections_via_symbols
