	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_notes_cache_write              ## -- Begin function notes_cache_write
	.p2align	4, 0x90
_notes_cache_write:                     ## @notes_cache_write
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, %r14d
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	cmpl	$0, 12(%rdi)
	je	LBB0_9
## %bb.2:
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	cmpl	$0, (%rax)
	je	LBB0_9
## %bb.4:
	cmpl	$0, 8(%rbx)
	je	LBB0_5
## %bb.6:
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_write_notes_tree
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:
	movl	16(%rbx), %r15d
	movl	%r15d, %edi
	callq	_strlen
	movq	$0, (%rsp)
	leaq	-40(%rbp), %rdx
	leaq	-32(%rbp), %r8
	movl	%r15d, %edi
	movl	%eax, %esi
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	_commit_tree
	testq	%rax, %rax
	js	LBB0_9
## %bb.8:
	movq	(%rbx), %rsi
	movq	_UPDATE_REFS_QUIET_ON_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	L_.str(%rip), %rdi
	leaq	-32(%rbp), %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_update_ref
	movq	%rax, %r14
	sarq	$63, %r14
	jmp	LBB0_9
LBB0_5:
	xorl	%r14d, %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"update notes cache"

	.comm	_UPDATE_REFS_QUIET_ON_ERR,4,2   ## @UPDATE_REFS_QUIET_ON_ERR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_notes_cache_write              ; -- Begin function notes_cache_write
	.p2align	2
_notes_cache_write:                     ; @notes_cache_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0, #12]
	cbz	w8, LBB0_6
; %bb.2:
	ldr	x8, [x19]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.4:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_8
; %bb.5:
	add	x1, sp, #8
	mov	x0, x19
	bl	_write_notes_tree
	cbz	x0, LBB0_9
LBB0_6:
	mov	w0, #-1
LBB0_7:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_8:
	mov	w0, #0
	b	LBB0_7
LBB0_9:
	ldr	w20, [x19, #16]
	mov	x0, x20
	bl	_strlen
	mov	x1, x0
	add	x2, sp, #8
	mov	x4, sp
	mov	x0, x20
	mov	x3, #0
	mov	x5, #0
	mov	x6, #0
	bl	_commit_tree
	tbnz	x0, #63, LBB0_6
; %bb.10:
	ldr	x1, [x19]
Lloh0:
	adrp	x8, _UPDATE_REFS_QUIET_ON_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UPDATE_REFS_QUIET_ON_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w5, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, sp
	mov	x3, #0
	mov	w4, #0
	bl	_update_ref
	asr	x0, x0, #63
	b	LBB0_7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"update notes cache"

	.comm	_UPDATE_REFS_QUIET_ON_ERR,4,2   ; @UPDATE_REFS_QUIET_ON_ERR
.subsections_via_symbols
