	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function XzEncIndex_PreAlloc
_XzEncIndex_PreAlloc:                   ## @XzEncIndex_PreAlloc
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-176(%rbp), %rdi
	movl	%ecx, %esi
	callq	_Xz_WriteVarInt
	movl	%eax, %ebx
	movl	%eax, %eax
	leaq	-176(,%rax,4), %rdi
	addq	%rbp, %rdi
	movl	%r15d, %esi
	callq	_Xz_WriteVarInt
	addl	%ebx, %eax
	imull	%r12d, %eax
	movl	(%r13), %ecx
	movl	4(%r13), %esi
	subl	%esi, %ecx
	cmpl	%ecx, %eax
	jbe	LBB0_1
## %bb.2:
	addl	%eax, %esi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_XzEncIndex_ReAlloc
	jmp	LBB0_3
LBB0_1:
	movq	_SZ_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SZ_OK,4,2                      ## @SZ_OK
	.comm	_SZ_ERROR_MEM,4,2               ## @SZ_ERROR_MEM
	.no_dead_strip	_XzEncIndex_PreAlloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function XzEncIndex_PreAlloc
_XzEncIndex_PreAlloc:                   ; @XzEncIndex_PreAlloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	mov	x19, x4
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	add	x24, sp, #8
	add	x0, sp, #8
	mov	x1, x3
	bl	_Xz_WriteVarInt
	mov	x23, x0
	add	x0, x24, w0, uxtw #2
	mov	x1, x21
	bl	_Xz_WriteVarInt
	add	w8, w0, w23
	mul	w8, w8, w22
	ldp	w10, w9, [x20]
	sub	w10, w10, w9
	cmp	w8, w10
	b.ls	LBB0_2
; %bb.1:
	add	w1, w9, w8
	mov	x0, x20
	mov	x2, x19
	bl	_XzEncIndex_ReAlloc
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _SZ_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SZ_OK@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
LBB0_3:
	ldur	x8, [x29, #-56]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SZ_OK,4,2                      ; @SZ_OK
	.comm	_SZ_ERROR_MEM,4,2               ; @SZ_ERROR_MEM
	.no_dead_strip	_XzEncIndex_PreAlloc
.subsections_via_symbols
