	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function index_dup_stream
_index_dup_stream:                      ## @index_dup_stream
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %eax
	movq	_PREALLOC_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_10
## %bb.2:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	40(%rdi), %edi
	movl	36(%rbx), %esi
	movl	28(%rbx), %ecx
	movl	32(%rbx), %edx
	movq	%r14, %r8
	callq	_index_stream_init
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movq	%rax, %r15
	movl	(%rbx), %eax
	movl	%eax, (%r15)
	movl	24(%rbx), %eax
	movl	%eax, 24(%r15)
	movl	20(%rbx), %eax
	movl	%eax, 20(%r15)
	movl	16(%rbx), %eax
	movl	%eax, 16(%r15)
	cmpq	$0, 8(%rbx)
	je	LBB0_11
## %bb.4:
	movl	(%rbx), %eax
	leal	40(,%rax,4), %edi
	movq	%r14, %rsi
	callq	_lzma_alloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	%rax, %r12
	movq	%rax, %r14
	addq	$16, %r14
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rax)
	movl	$1, (%rax)
	movl	(%rbx), %eax
	movl	%eax, 4(%r12)
	decl	%eax
	movl	%eax, 8(%r12)
	movq	8(%rbx), %rbx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rdi
	addq	%r13, %rdi
	movq	32(%rbx), %rsi
	movl	8(%rbx), %eax
	leal	4(,%rax,4), %edx
	callq	_memcpy
	movslq	8(%rbx), %rax
	addq	%rax, %r13
	incq	%r13
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_index_tree_next
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:
	movslq	4(%r12), %rax
	xorl	%edi, %edi
	cmpq	%rax, %r13
	sete	%dil
	callq	_assert
	movq	%r15, %rdi
	addq	$8, %rdi
	movq	%r14, %rsi
	callq	_index_tree_append
	jmp	LBB0_11
LBB0_9:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_index_stream_end
LBB0_10:
	xorl	%r15d, %r15d
LBB0_11:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PREALLOC_MAX,4,2               ## @PREALLOC_MAX
	.no_dead_strip	_index_dup_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function index_dup_stream
_index_dup_stream:                      ; @index_dup_stream
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _PREALLOC_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PREALLOC_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_2
LBB0_1:
	mov	x19, #0
	b	LBB0_8
LBB0_2:
	mov	x21, x1
	mov	x20, x0
	ldr	w0, [x0, #40]
	ldp	w2, w1, [x20, #32]
	ldr	w3, [x20, #28]
	mov	x4, x21
	bl	_index_stream_init
	mov	x19, x0
	cbz	x0, LBB0_8
; %bb.3:
	ldr	w8, [x20]
	str	w8, [x19]
	ldr	w8, [x20, #24]
	str	w8, [x19, #24]
	ldr	d0, [x20, #16]
	str	d0, [x19, #16]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_8
; %bb.4:
	ldr	w8, [x20]
	lsl	w8, w8, #2
	add	w0, w8, #40
	mov	x1, x21
	bl	_lzma_alloc
	cbz	x0, LBB0_9
; %bb.5:
	mov	x22, x0
	mov	x23, #0
	mov	x21, x0
	str	xzr, [x21, #16]!
	str	xzr, [x0, #24]
	mov	w8, #1
	ldr	w9, [x20]
	stp	w8, w9, [x0]
	sub	w8, w9, #1
	str	w8, [x0, #8]
	ldr	x20, [x20, #8]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #32]
	add	x0, x8, x23
	ldr	x1, [x20, #32]
	ldr	w8, [x20, #8]
	lsl	w8, w8, #2
	add	w2, w8, #4
	bl	_memcpy
	ldrsw	x8, [x20, #8]
	add	x8, x8, x23
	add	x23, x8, #1
	add	x0, x20, #16
	bl	_index_tree_next
	mov	x20, x0
	cbnz	x0, LBB0_6
; %bb.7:
	ldrsw	x8, [x22, #4]
	cmp	x23, x8
	cset	w0, eq
	bl	_assert
	add	x0, x19, #8
	mov	x1, x21
	bl	_index_tree_append
LBB0_8:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x0, x19
	mov	x1, x21
	bl	_index_stream_end
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PREALLOC_MAX,4,2               ; @PREALLOC_MAX
	.no_dead_strip	_index_dup_stream
.subsections_via_symbols
