	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_refs_update_ref                ## -- Begin function refs_update_ref
	.p2align	4, 0x90
_refs_update_ref:                       ## @refs_update_ref
	.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
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	movq	%r8, %r14
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdx, %rdi
	callq	_ref_type
	movq	_REF_TYPE_PSEUDOREF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.8:
	movq	_the_repository@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get_main_ref_store
	xorl	%edi, %edi
	cmpq	%rbx, %rax
	sete	%dil
	callq	_assert
	leaq	-48(%rbp), %rcx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_write_pseudoref
	testl	%eax, %eax
	jne	LBB0_5
## %bb.9:
	leaq	-48(%rbp), %rdi
	callq	_strbuf_release
LBB0_13:
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_1:
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ref_store_transaction_begin
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	leaq	-48(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movq	%r13, %r9
	callq	_ref_transaction_update
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ref_transaction_commit
	testq	%rax, %rax
	je	LBB0_12
LBB0_4:
	movq	%rbx, %rdi
	callq	_ref_transaction_free
LBB0_5:
	movl	16(%rbp), %ebx
	leaq	L_.str(%rip), %rdi
	callq	__
	cmpl	$130, %ebx
	je	LBB0_10
## %bb.6:
	cmpl	$129, %ebx
	jne	LBB0_11
## %bb.7:
	movq	-48(%rbp), %rdx
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_error
	jmp	LBB0_11
LBB0_10:
	movq	-48(%rbp), %rdx
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_die
LBB0_11:
	leaq	-48(%rbp), %rdi
	callq	_strbuf_release
	movl	$1, %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	-48(%rbp), %rdi
	callq	_strbuf_release
	movq	%rbx, %rdi
	callq	_ref_transaction_free
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,8,3                ## @STRBUF_INIT
	.comm	_REF_TYPE_PSEUDOREF,8,3         ## @REF_TYPE_PSEUDOREF
	.comm	_the_repository,4,2             ## @the_repository
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"update_ref failed for ref '%s': %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_refs_update_ref                ; -- Begin function refs_update_ref
	.p2align	2
_refs_update_ref:                       ; @refs_update_ref
	.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	x20, x6
	mov	x23, x5
	mov	x21, x4
	mov	x22, x3
	mov	x19, x2
	mov	x25, x1
	mov	x24, x0
Lloh0:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	mov	x0, x2
	bl	_ref_type
Lloh3:
	adrp	x8, _REF_TYPE_PSEUDOREF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REF_TYPE_PSEUDOREF@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.1:
Lloh6:
	adrp	x8, _the_repository@GOTPAGE
Lloh7:
	ldr	x8, [x8, _the_repository@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_get_main_ref_store
	cmp	x0, x24
	cset	w0, eq
	bl	_assert
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_write_pseudoref
	cbnz	w0, LBB0_8
; %bb.2:
	add	x0, sp, #8
	bl	_strbuf_release
LBB0_3:
	mov	w0, #0
	b	LBB0_13
LBB0_4:
	add	x1, sp, #8
	mov	x0, x24
	bl	_ref_store_transaction_begin
	mov	x24, x0
	cbz	x0, LBB0_7
; %bb.5:
	add	x6, sp, #8
	mov	x0, x24
	mov	x1, x19
	mov	x2, x22
	mov	x3, x21
	mov	x4, x23
	mov	x5, x25
	bl	_ref_transaction_update
	cbnz	x0, LBB0_7
; %bb.6:
	add	x1, sp, #8
	mov	x0, x24
	bl	_ref_transaction_commit
	cbz	x0, LBB0_14
LBB0_7:
	mov	x0, x24
	bl	_ref_transaction_free
LBB0_8:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	cmp	w20, #130
	b.eq	LBB0_11
; %bb.9:
	cmp	w20, #129
	b.ne	LBB0_12
; %bb.10:
	ldr	x2, [sp, #8]
	mov	x1, x19
	bl	_error
	b	LBB0_12
LBB0_11:
	ldr	x2, [sp, #8]
	mov	x1, x19
	bl	_die
LBB0_12:
	add	x0, sp, #8
	bl	_strbuf_release
	mov	w0, #1
LBB0_13:
	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
LBB0_14:
	add	x0, sp, #8
	bl	_strbuf_release
	mov	x0, x24
	bl	_ref_transaction_free
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,8,3                ; @STRBUF_INIT
	.comm	_REF_TYPE_PSEUDOREF,8,3         ; @REF_TYPE_PSEUDOREF
	.comm	_the_repository,4,2             ; @the_repository
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"update_ref failed for ref '%s': %s"

.subsections_via_symbols
