	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_shared_index
_write_shared_index:                    ## @write_shared_index
	.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
	movq	%rsi, %r14
	movq	(%rdi), %r13
	callq	_move_cache_to_base_index
	movq	_the_repository@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%r14), %rax
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %r15
	leaq	L_.str.1(%rip), %r12
	leaq	L_.str.2(%rip), %rcx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_trace2_region_enter_printf
	movq	(%r13), %rdi
	movq	(%r14), %rsi
	movl	$1, %edx
	callq	_do_write_index
	movl	%eax, %ebx
	movq	_the_repository@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%r14), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movq	%r12, %rsi
	leaq	L_.str.2(%rip), %rcx
	callq	_trace2_region_leave_printf
	testl	%ebx, %ebx
	jne	LBB0_5
## %bb.1:
	movq	(%r14), %rdi
	callq	_get_tempfile_path
	movl	%eax, %edi
	callq	_adjust_shared_perm
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
	callq	__
	movl	%eax, %r15d
	movq	(%r14), %rdi
	callq	_get_tempfile_path
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_error
	jmp	LBB0_5
LBB0_3:
	movq	(%r13), %rdi
	callq	_oid_to_hex
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	callq	_git_path
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_rename_tempfile
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	leaq	8(%r13), %rdi
	movq	(%r13), %rsi
	callq	_oidcpy
	movq	(%r13), %rdi
	callq	_oid_to_hex
	movl	%eax, %edi
	callq	_clean_shared_index_files
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"index"

L_.str.1:                               ## @.str.1
	.asciz	"shared/do_write_index"

	.comm	_the_repository,4,2             ## @the_repository
L_.str.2:                               ## @.str.2
	.asciz	"%s"

L_.str.3:                               ## @.str.3
	.asciz	"cannot fix permission bits on '%s'"

L_.str.4:                               ## @.str.4
	.asciz	"sharedindex.%s"

	.no_dead_strip	_write_shared_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_shared_index
_write_shared_index:                    ; @write_shared_index
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x1
	ldr	x24, [x0]
	bl	_move_cache_to_base_index
Lloh0:
	adrp	x25, _the_repository@GOTPAGE
Lloh1:
	ldr	x25, [x25, _the_repository@GOTPAGEOFF]
	ldr	w2, [x25]
	ldr	x8, [x19]
	ldr	w4, [x8]
Lloh2:
	adrp	x21, l_.str@PAGE
Lloh3:
	add	x21, x21, l_.str@PAGEOFF
Lloh4:
	adrp	x22, l_.str.1@PAGE
Lloh5:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh6:
	adrp	x23, l_.str.2@PAGE
Lloh7:
	add	x23, x23, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x1, x22
	mov	x3, x23
	bl	_trace2_region_enter_printf
	ldr	x0, [x24]
	ldr	x1, [x19]
	mov	w2, #1
	bl	_do_write_index
	mov	x20, x0
	ldr	w2, [x25]
	ldr	x8, [x19]
	ldr	w4, [x8]
	mov	x0, x21
	mov	x1, x22
	mov	x3, x23
	bl	_trace2_region_leave_printf
	cbnz	w20, LBB0_5
; %bb.1:
	ldr	x0, [x19]
	bl	_get_tempfile_path
	bl	_adjust_shared_perm
	cbz	w0, LBB0_3
; %bb.2:
	mov	x20, x0
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	__
	mov	x21, x0
	ldr	x0, [x19]
	bl	_get_tempfile_path
	mov	x1, x0
	mov	x0, x21
	bl	_error
	b	LBB0_5
LBB0_3:
	ldr	x0, [x24]
	bl	_oid_to_hex
	mov	x1, x0
Lloh10:
	adrp	x0, l_.str.4@PAGE
Lloh11:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_git_path
	mov	x1, x0
	mov	x0, x19
	bl	_rename_tempfile
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.4:
	add	x0, x24, #8
	ldr	x1, [x24]
	bl	_oidcpy
	ldr	x0, [x24]
	bl	_oid_to_hex
	bl	_clean_shared_index_files
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"index"

l_.str.1:                               ; @.str.1
	.asciz	"shared/do_write_index"

	.comm	_the_repository,4,2             ; @the_repository
l_.str.2:                               ; @.str.2
	.asciz	"%s"

l_.str.3:                               ; @.str.3
	.asciz	"cannot fix permission bits on '%s'"

l_.str.4:                               ; @.str.4
	.asciz	"sharedindex.%s"

	.no_dead_strip	_write_shared_index
.subsections_via_symbols
