	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_repo_refresh_and_write_index   ## -- Begin function repo_refresh_and_write_index
	.p2align	4, 0x90
_repo_refresh_and_write_index:          ## @repo_refresh_and_write_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, %r13
	movl	%ecx, %ebx
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_LOCK_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	callq	_repo_hold_locked_index
	movl	%eax, %r12d
	testl	%ebx, %ebx
	jne	LBB0_2
## %bb.1:
	movl	$-1, %ebx
	testl	%r12d, %r12d
	js	LBB0_4
LBB0_2:
	movq	16(%rbp), %r8
	movl	(%r15), %edi
	movl	%r14d, %esi
	movq	%r13, %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	callq	_refresh_index
	xorl	%ebx, %ebx
	testq	%rax, %rax
	setne	%bl
	testl	%r12d, %r12d
	js	LBB0_4
## %bb.3:
	movl	(%r15), %edi
	movq	_COMMIT_LOCK@GOTPCREL(%rip), %rax
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	orl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	callq	_write_locked_index
	xorl	%ecx, %ecx
	negq	%rax
	sbbl	%ecx, %ecx
	orl	%ecx, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOCK_INIT,4,2                  ## @LOCK_INIT
	.comm	_COMMIT_LOCK,4,2                ## @COMMIT_LOCK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_repo_refresh_and_write_index   ; -- Begin function repo_refresh_and_write_index
	.p2align	2
_repo_refresh_and_write_index:          ; @repo_refresh_and_write_index
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x6
	mov	x22, x5
	mov	x23, x4
	mov	x26, x3
	mov	x19, x2
	mov	x24, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _LOCK_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOCK_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	add	x1, sp, #8
	mov	w2, #0
	bl	_repo_hold_locked_index
	mov	x25, x0
	cbnz	w26, LBB0_3
; %bb.1:
	tbz	w25, #31, LBB0_3
; %bb.2:
	mov	w21, #-1
	b	LBB0_5
LBB0_3:
	ldr	w0, [x20]
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	bl	_refresh_index
	cmp	x0, #0
	cset	w21, ne
	tbnz	w25, #31, LBB0_5
; %bb.4:
	ldr	w0, [x20]
Lloh3:
	adrp	x8, _COMMIT_LOCK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _COMMIT_LOCK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w2, w8, w19
	add	x1, sp, #8
	bl	_write_locked_index
	cmp	x0, #0
	csinv	w21, w21, wzr, eq
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_LOCK_INIT,4,2                  ; @LOCK_INIT
	.comm	_COMMIT_LOCK,4,2                ; @COMMIT_LOCK
.subsections_via_symbols
