	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function XzEncIndex_AddIndexRecord
_XzEncIndex_AddIndexRecord:             ## @XzEncIndex_AddIndexRecord
	.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
	subq	$144, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	-176(%rbp), %rdi
	movl	%edx, %esi
	callq	_Xz_WriteVarInt
	movl	%eax, %r12d
	movl	%eax, %eax
	leaq	-176(,%rax,4), %rdi
	addq	%rbp, %rdi
	movl	%ebx, %esi
	callq	_Xz_WriteVarInt
	movl	%eax, %ebx
	addl	%r12d, %ebx
	movl	(%r14), %eax
	movl	4(%r14), %edi
	movl	%eax, %ecx
	subl	%edi, %ecx
	cmpl	%ecx, %ebx
	jbe	LBB0_4
## %bb.1:
	addl	%eax, %eax
	addl	$32, %eax
	addl	%ebx, %edi
	cmpl	%edi, %eax
	jae	LBB0_3
## %bb.2:
	movq	_SZ_ERROR_MEM@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movl	%eax, %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_XzEncIndex_ReAlloc
	movl	%eax, %edi
	callq	_RINOK
	movl	4(%r14), %edi
LBB0_4:
	addl	8(%r14), %edi
	leaq	-176(%rbp), %rsi
	movl	%ebx, %edx
	callq	_memcpy
	addl	%ebx, 4(%r14)
	incl	12(%r14)
	movq	_SZ_OK@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	addq	$144, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SZ_ERROR_MEM,4,2               ## @SZ_ERROR_MEM
	.comm	_SZ_OK,4,2                      ## @SZ_OK
	.no_dead_strip	_XzEncIndex_AddIndexRecord
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function XzEncIndex_AddIndexRecord
_XzEncIndex_AddIndexRecord:             ; @XzEncIndex_AddIndexRecord
	.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	x21, x3
	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, #-56]
	add	x23, sp, #8
	add	x0, sp, #8
	mov	x1, x2
	bl	_Xz_WriteVarInt
	mov	x22, x0
	add	x0, x23, w0, uxtw #2
	mov	x1, x20
	bl	_Xz_WriteVarInt
	add	w20, w0, w22
	ldp	w9, w8, [x19]
	sub	w10, w9, w8
	cmp	w20, w10
	b.ls	LBB0_4
; %bb.1:
	lsl	w9, w9, #1
	add	w1, w9, #32
	add	w8, w8, w20
	cmp	w1, w8
	b.hs	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _SZ_ERROR_MEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SZ_ERROR_MEM@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
	mov	x0, x19
	mov	x2, x21
	bl	_XzEncIndex_ReAlloc
	bl	_RINOK
	ldr	w8, [x19, #4]
LBB0_4:
	ldr	w9, [x19, #8]
	add	w0, w8, w9
	add	x1, sp, #8
	mov	x2, x20
	bl	_memcpy
	ldr	w8, [x19, #4]
	add	w8, w8, w20
	str	w8, [x19, #4]
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
Lloh5:
	adrp	x8, _SZ_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SZ_OK@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	ldur	x8, [x29, #-56]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	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_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SZ_ERROR_MEM,4,2               ; @SZ_ERROR_MEM
	.comm	_SZ_OK,4,2                      ; @SZ_OK
	.no_dead_strip	_XzEncIndex_AddIndexRecord
.subsections_via_symbols
