	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_write_locked_index
_do_write_locked_index:                 ## @do_write_locked_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
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_the_repository@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%rsi), %rax
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %r13
	leaq	L_.str.1(%rip), %r12
	leaq	L_.str.2(%rip), %rcx
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_trace2_region_enter_printf
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_do_write_index
	movl	%eax, %r15d
	movq	_the_repository@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%rbx), %rax
	movl	(%rax), %r8d
	movq	%r13, %rdi
	movq	%r12, %rsi
	leaq	L_.str.2(%rip), %rcx
	callq	_trace2_region_leave_printf
	testl	%r15d, %r15d
	jne	LBB0_5
## %bb.1:
	movq	_COMMIT_LOCK@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_commit_locked_index
	jmp	LBB0_4
LBB0_3:
	movq	%rbx, %rdi
	callq	_close_lock_file_gently
LBB0_4:
	movl	%eax, %r15d
	cmpq	$0, 8(%r14)
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.4(%rip), %rcx
	movq	%rcx, %rdx
	cmoveq	%rax, %rdx
	cmpq	$0, (%r14)
	cmoveq	%rax, %rcx
	leaq	L_.str.3(%rip), %rsi
	xorl	%edi, %edi
	xorl	%r8d, %r8d
	callq	_run_hook_le
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14)
LBB0_5:
	movl	%r15d, %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	"do_write_index"

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

	.comm	_COMMIT_LOCK,4,2                ## @COMMIT_LOCK
L_.str.3:                               ## @.str.3
	.asciz	"post-index-change"

L_.str.4:                               ## @.str.4
	.asciz	"1"

L_.str.5:                               ## @.str.5
	.asciz	"0"

	.no_dead_strip	_do_write_locked_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_write_locked_index
_do_write_locked_index:                 ; @do_write_locked_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	x22, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x26, _the_repository@GOTPAGE
Lloh1:
	ldr	x26, [x26, _the_repository@GOTPAGEOFF]
	ldr	w2, [x26]
	ldr	x8, [x1]
	ldr	w4, [x8]
Lloh2:
	adrp	x23, l_.str@PAGE
Lloh3:
	add	x23, x23, l_.str@PAGEOFF
Lloh4:
	adrp	x24, l_.str.1@PAGE
Lloh5:
	add	x24, x24, l_.str.1@PAGEOFF
Lloh6:
	adrp	x25, l_.str.2@PAGE
Lloh7:
	add	x25, x25, l_.str.2@PAGEOFF
	mov	x0, x23
	mov	x1, x24
	mov	x3, x25
	bl	_trace2_region_enter_printf
	ldr	x1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_do_write_index
	mov	x21, x0
	ldr	w2, [x26]
	ldr	x8, [x20]
	ldr	w4, [x8]
	mov	x0, x23
	mov	x1, x24
	mov	x3, x25
	bl	_trace2_region_leave_printf
	cbnz	w21, LBB0_5
; %bb.1:
Lloh8:
	adrp	x8, _COMMIT_LOCK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _COMMIT_LOCK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	mov	x0, x20
	tst	w8, w22
	b.eq	LBB0_3
; %bb.2:
	bl	_commit_locked_index
	b	LBB0_4
LBB0_3:
	bl	_close_lock_file_gently
LBB0_4:
	mov	x21, x0
Lloh11:
	adrp	x8, l_.str.4@PAGE
Lloh12:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh13:
	adrp	x9, l_.str.5@PAGE
Lloh14:
	add	x9, x9, l_.str.5@PAGEOFF
	ldp	x11, x10, [x19]
	cmp	x10, #0
	csel	x2, x9, x8, eq
	cmp	x11, #0
	csel	x3, x9, x8, eq
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, #0
	mov	x4, #0
	bl	_run_hook_le
	stp	xzr, xzr, [x19]
LBB0_5:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"index"

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

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

	.comm	_COMMIT_LOCK,4,2                ; @COMMIT_LOCK
l_.str.3:                               ; @.str.3
	.asciz	"post-index-change"

l_.str.4:                               ; @.str.4
	.asciz	"1"

l_.str.5:                               ; @.str.5
	.asciz	"0"

	.no_dead_strip	_do_write_locked_index
.subsections_via_symbols
