	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cmd__write_cache               ## -- Begin function cmd__write_cache
	.p2align	4, 0x90
_cmd__write_cache:                      ## @cmd__write_cache
	.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	_LOCK_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	$1, %ebx
	cmpl	$2, %edi
	jne	LBB0_2
## %bb.1:
	movq	8(%rsi), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtol
	movl	%eax, %ebx
LBB0_2:
	xorl	%eax, %eax
	callq	_setup_git_directory
	xorl	%eax, %eax
	callq	_read_cache
	testl	%ebx, %ebx
	jle	LBB0_7
## %bb.3:
	movq	_LOCK_DIE_ON_ERROR@GOTPCREL(%rip), %r13
	leaq	-48(%rbp), %r14
	movq	_COMMIT_LOCK@GOTPCREL(%rip), %r12
	movq	_the_index@GOTPCREL(%rip), %r15
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	decl	%ebx
	je	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_hold_locked_index
	movl	(%r12), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_write_locked_index
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_die
	jmp	LBB0_6
LBB0_7:
	xorl	%eax, %eax
	addq	$8, %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	_LOCK_DIE_ON_ERROR,4,2          ## @LOCK_DIE_ON_ERROR
	.comm	_the_index,4,2                  ## @the_index
	.comm	_COMMIT_LOCK,4,2                ## @COMMIT_LOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to write index file"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cmd__write_cache               ; -- Begin function cmd__write_cache
	.p2align	2
_cmd__write_cache:                      ; @cmd__write_cache
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
Lloh0:
	adrp	x8, _LOCK_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOCK_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	cmp	w0, #2
	b.ne	LBB0_2
; %bb.1:
	ldr	x0, [x1, #8]
	mov	x1, #0
	mov	w2, #0
	bl	_strtol
	mov	x19, x0
	b	LBB0_3
LBB0_2:
	mov	w19, #1
LBB0_3:
	bl	_setup_git_directory
	bl	_read_cache
	cmp	w19, #1
	b.lt	LBB0_8
; %bb.4:
Lloh3:
	adrp	x22, _LOCK_DIE_ON_ERROR@GOTPAGE
Lloh4:
	ldr	x22, [x22, _LOCK_DIE_ON_ERROR@GOTPAGEOFF]
Lloh5:
	adrp	x23, _COMMIT_LOCK@GOTPAGE
Lloh6:
	ldr	x23, [x23, _COMMIT_LOCK@GOTPAGEOFF]
Lloh7:
	adrp	x20, l_.str@PAGE
Lloh8:
	add	x20, x20, l_.str@PAGEOFF
Lloh9:
	adrp	x21, _the_index@GOTPAGE
Lloh10:
	ldr	x21, [x21, _the_index@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	subs	w19, w19, #1
	b.eq	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	add	x0, sp, #8
	bl	_hold_locked_index
	ldr	w2, [x23]
	add	x1, sp, #8
	mov	x0, x21
	bl	_write_locked_index
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	bl	_die
	b	LBB0_5
LBB0_8:
	mov	w0, #0
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_LOCK_INIT,4,2                  ; @LOCK_INIT
	.comm	_LOCK_DIE_ON_ERROR,4,2          ; @LOCK_DIE_ON_ERROR
	.comm	_the_index,4,2                  ; @the_index
	.comm	_COMMIT_LOCK,4,2                ; @COMMIT_LOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to write index file"

.subsections_via_symbols
