	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_midx_repack                    ## -- Begin function midx_repack
	.p2align	4, 0x90
_midx_repack:                           ## @midx_repack
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_CHILD_PROCESS_INIT@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)
	movq	%rsi, %rdi
	movl	$1, %esi
	callq	_load_multi_pack_index
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	8(%rax), %edi
	movl	$1, %esi
	callq	_xcalloc
	movq	%rax, %r14
	testq	%r12, %r12
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	movq	%r12, %rcx
	callq	_fill_included_packs_batch
	jmp	LBB0_5
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_18
LBB0_4:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_fill_included_packs_all
LBB0_5:
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_16
## %bb.6:
	leaq	-52(%rbp), %r15
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_argv_array_push
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_strbuf_addstr
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strbuf_addstr
	movq	-80(%rbp), %rsi
	movq	%r15, %rdi
	callq	_argv_array_push
	movq	_MIDX_PROGRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	%r15, %rdi
	callq	_argv_array_push
	movq	%rbx, %rdi
	callq	_strbuf_release
	movabsq	$-4294967295, %rax              ## imm = 0xFFFFFFFF00000001
	movq	%rax, -64(%rbp)
	movl	$-1, -56(%rbp)
	leaq	-64(%rbp), %rdi
	callq	_start_command
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_15
LBB0_8:
	cmpq	$0, (%r13)
	jle	LBB0_13
## %bb.9:
	xorl	%ebx, %ebx
	leaq	-88(%rbp), %r15
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	cmpq	(%r13), %rbx
	jge	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_nth_midxed_pack_int_id
	cmpb	$0, (%r14,%rax)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_nth_midxed_object_oid
	movl	-60(%rbp), %r12d
	movq	%r15, %rdi
	callq	_oid_to_hex
	movq	_the_hash_algo@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %edx
	movl	%r12d, %edi
	movq	%rax, %rsi
	callq	_xwrite
	movl	-60(%rbp), %edi
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edx
	callq	_xwrite
	jmp	LBB0_12
LBB0_13:
	movl	-60(%rbp), %edi
	callq	_close
	leaq	-64(%rbp), %rdi
	callq	_finish_command
	testq	%rax, %rax
	je	LBB0_19
## %bb.14:
	leaq	L_.str.6(%rip), %rdi
LBB0_15:
	callq	__
	movl	%eax, %edi
	callq	_error
	movl	$1, %ebx
LBB0_16:
	movq	%r13, %rdi
	callq	_close_midx
LBB0_17:
	movq	%r14, %rdi
	callq	_free
LBB0_18:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	xorl	%edx, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_write_midx_internal
	movl	%eax, %ebx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_CHILD_PROCESS_INIT,16,2        ## @CHILD_PROCESS_INIT
	.comm	_STRBUF_INIT,8,3                ## @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pack-objects"

L_.str.1:                               ## @.str.1
	.asciz	"/pack/pack"

	.comm	_MIDX_PROGRESS,4,2              ## @MIDX_PROGRESS
L_.str.2:                               ## @.str.2
	.asciz	"--progress"

L_.str.3:                               ## @.str.3
	.asciz	"-q"

L_.str.4:                               ## @.str.4
	.asciz	"could not start pack-objects"

	.comm	_the_hash_algo,8,3              ## @the_hash_algo
L_.str.5:                               ## @.str.5
	.asciz	"\n"

L_.str.6:                               ## @.str.6
	.asciz	"could not finish pack-objects"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function midx_repack
lCPI0_0:
	.long	1                               ; 0x1
	.long	4294967295                      ; 0xffffffff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_midx_repack
	.p2align	2
_midx_repack:                           ; @midx_repack
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x21, x3
	mov	x23, x2
	mov	x22, x1
	mov	x24, x0
Lloh0:
	adrp	x8, _CHILD_PROCESS_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CHILD_PROCESS_INIT@GOTPAGEOFF]
Lloh2:
	ldr	q0, [x8]
	str	q0, [sp, #16]
Lloh3:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	mov	x0, x1
	mov	w1, #1
	bl	_load_multi_pack_index
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	w0, [x0, #8]
	mov	w1, #1
	bl	_xcalloc
	mov	x19, x0
	cbz	x23, LBB0_5
; %bb.2:
	mov	x0, x24
	mov	x1, x20
	mov	x2, x19
	mov	x3, x23
	bl	_fill_included_packs_batch
	cbz	x0, LBB0_6
LBB0_3:
	mov	w21, #0
	b	LBB0_16
LBB0_4:
	mov	w21, #0
	b	LBB0_18
LBB0_5:
	mov	x0, x20
	mov	x1, x19
	bl	_fill_included_packs_all
	cbnz	x0, LBB0_3
LBB0_6:
	add	x8, sp, #16
	orr	x23, x8, #0xc
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_argv_array_push
	add	x0, sp, #8
	mov	x1, x22
	bl	_strbuf_addstr
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #8
	bl	_strbuf_addstr
	ldr	x1, [sp, #8]
	mov	x0, x23
	bl	_argv_array_push
Lloh10:
	adrp	x8, _MIDX_PROGRESS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MIDX_PROGRESS@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, l_.str.2@PAGE
Lloh14:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh15:
	adrp	x10, l_.str.3@PAGE
Lloh16:
	add	x10, x10, l_.str.3@PAGEOFF
	tst	w8, w21
	csel	x1, x10, x9, eq
	mov	x0, x23
	bl	_argv_array_push
	add	x0, sp, #8
	bl	_strbuf_release
	mov	w8, #-1
	str	w8, [sp, #24]
Lloh17:
	adrp	x8, lCPI0_0@PAGE
Lloh18:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #16]
	add	x0, sp, #16
	bl	_start_command
	cbz	x0, LBB0_8
; %bb.7:
Lloh19:
	adrp	x0, l_.str.4@PAGE
Lloh20:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_15
LBB0_8:
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_13
; %bb.9:
	mov	x23, #0
Lloh21:
	adrp	x26, _the_hash_algo@GOTPAGE
Lloh22:
	ldr	x26, [x26, _the_hash_algo@GOTPAGEOFF]
Lloh23:
	adrp	x24, l_.str.5@PAGE
Lloh24:
	add	x24, x24, l_.str.5@PAGEOFF
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x23, x23, #1
	ldr	x8, [x20]
	cmp	x23, x8
	b.ge	LBB0_13
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_nth_midxed_pack_int_id
	ldrb	w8, [x19, x0]
	cbz	w8, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, sp
	mov	x1, x20
	mov	x2, x23
	bl	_nth_midxed_object_oid
	ldr	w25, [sp, #20]
	mov	x0, sp
	bl	_oid_to_hex
	mov	x1, x0
	ldr	x8, [x26]
	ldr	w2, [x8]
	mov	x0, x25
	bl	_xwrite
	ldr	w0, [sp, #20]
	mov	x1, x24
	mov	w2, #1
	bl	_xwrite
	b	LBB0_10
LBB0_13:
	ldr	w0, [sp, #20]
	bl	_close
	add	x0, sp, #16
	bl	_finish_command
	cbz	x0, LBB0_19
; %bb.14:
Lloh25:
	adrp	x0, l_.str.6@PAGE
Lloh26:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_15:
	bl	__
	bl	_error
	mov	w21, #1
LBB0_16:
	mov	x0, x20
	bl	_close_midx
LBB0_17:
	mov	x0, x19
	bl	_free
LBB0_18:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_19:
	mov	x0, x22
	mov	x1, x20
	mov	x2, #0
	mov	x3, x21
	bl	_write_midx_internal
	mov	x21, x0
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_CHILD_PROCESS_INIT,16,2        ; @CHILD_PROCESS_INIT
	.comm	_STRBUF_INIT,8,3                ; @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pack-objects"

l_.str.1:                               ; @.str.1
	.asciz	"/pack/pack"

	.comm	_MIDX_PROGRESS,4,2              ; @MIDX_PROGRESS
l_.str.2:                               ; @.str.2
	.asciz	"--progress"

l_.str.3:                               ; @.str.3
	.asciz	"-q"

l_.str.4:                               ; @.str.4
	.asciz	"could not start pack-objects"

	.comm	_the_hash_algo,8,3              ; @the_hash_algo
l_.str.5:                               ; @.str.5
	.asciz	"\n"

l_.str.6:                               ; @.str.6
	.asciz	"could not finish pack-objects"

.subsections_via_symbols
