	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_pack_to_midx
_add_pack_to_midx:                      ## @add_pack_to_midx
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	movq	%rdx, %rdi
	callq	_ends_with
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movl	32(%rbx), %esi
	movl	36(%rbx), %edi
	incl	%esi
	movl	%esi, 32(%rbx)
	callq	_display_progress
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	movq	%r15, %rsi
	callq	_midx_contains_pack
	testq	%rax, %rax
	jne	LBB0_6
LBB0_3:
	movq	8(%rbx), %rdi
	movl	(%rbx), %esi
	incl	%esi
	movl	16(%rbx), %edx
	callq	_ALLOC_GROW
	movq	%r14, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_add_packed_git
	movq	8(%rbx), %rcx
	movslq	(%rbx), %rdx
	leaq	(%rdx,%rdx,2), %rdx
	movl	%eax, 20(%rcx,%rdx,8)
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movl	%eax, %edi
	callq	_open_pack_index
	testq	%rax, %rax
	je	LBB0_5
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_warning
	movq	8(%rbx), %rax
	movslq	(%rbx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movl	20(%rax,%rcx,8), %edi
	callq	_close_pack
	movq	8(%rbx), %rax
	movslq	(%rbx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movl	20(%rax,%rcx,8), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_FREE_AND_NULL                  ## TAILCALL
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%r14, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_warning                        ## TAILCALL
LBB0_5:
	movq	%r15, %rdi
	callq	_xstrdup
	movq	8(%rbx), %rcx
	movslq	(%rbx), %rdx
	leaq	(%rdx,%rdx,2), %rsi
	movl	%eax, 16(%rcx,%rsi,8)
	movq	%rdx, (%rcx,%rsi,8)
	movq	$0, 8(%rcx,%rsi,8)
	leal	1(%rdx), %eax
	movl	%eax, (%rbx)
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".idx"

L_.str.1:                               ## @.str.1
	.asciz	"failed to add packfile '%s'"

L_.str.2:                               ## @.str.2
	.asciz	"failed to open pack-index '%s'"

	.no_dead_strip	_add_pack_to_midx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_pack_to_midx
_add_pack_to_midx:                      ; @add_pack_to_midx
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x2
	bl	_ends_with
	cbz	x0, LBB0_8
; %bb.1:
	ldp	w8, w0, [x19, #32]
	add	w1, w8, #1
	str	w1, [x19, #32]
	bl	_display_progress
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_3
; %bb.2:
	mov	x1, x21
	bl	_midx_contains_pack
	cbnz	x0, LBB0_8
LBB0_3:
	ldr	x0, [x19, #8]
	ldr	w8, [x19]
	add	w1, w8, #1
	ldr	w2, [x19, #16]
	bl	_ALLOC_GROW
	mov	x0, x20
	mov	x1, x22
	mov	w2, #0
	bl	_add_packed_git
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19]
	mov	w10, #24
	madd	x8, x9, x10, x8
	str	w0, [x8, #20]
	cbz	w0, LBB0_6
; %bb.4:
	bl	_open_pack_index
	cbz	x0, LBB0_7
; %bb.5:
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	mov	x1, x20
	bl	_warning
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19]
	mov	w20, #24
	madd	x8, x9, x20, x8
	ldr	w0, [x8, #20]
	bl	_close_pack
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19]
	madd	x8, x9, x20, x8
	ldr	w0, [x8, #20]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_FREE_AND_NULL
LBB0_6:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	mov	x1, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_warning
LBB0_7:
	mov	x0, x21
	bl	_xstrdup
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19]
	mov	w10, #24
	madd	x8, x9, x10, x8
	str	w0, [x8, #16]
	stp	x9, xzr, [x8]
	add	w8, w9, #1
	str	w8, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".idx"

l_.str.1:                               ; @.str.1
	.asciz	"failed to add packfile '%s'"

l_.str.2:                               ; @.str.2
	.asciz	"failed to open pack-index '%s'"

	.no_dead_strip	_add_pack_to_midx
.subsections_via_symbols
