	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_update_head_with_reflog        ## -- Begin function update_head_with_reflog
	.p2align	4, 0x90
_update_head_with_reflog:               ## @update_head_with_reflog
	.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	%r8, %r15
	movq	%rcx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	leaq	-48(%rbp), %r13
	movq	%r13, %rdi
	movq	%rdx, %rsi
	callq	_strbuf_addstr
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_strbuf_addstr
LBB0_2:
	movl	(%rbx), %edi
	movl	$10, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movslq	(%rbx), %rsi
	subq	%rsi, %rax
	incq	%rax
	leaq	-48(%rbp), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%rax, %rdx
	callq	_strbuf_add
	jmp	LBB0_5
LBB0_4:
	leaq	-48(%rbp), %r13
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_strbuf_addbuf
	movq	%r13, %rdi
	movl	$10, %esi
	callq	_strbuf_addch
LBB0_5:
	movq	%r15, %rdi
	callq	_ref_transaction_begin
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	testq	%r12, %r12
	jne	LBB0_8
## %bb.7:
	movq	_null_oid@GOTPCREL(%rip), %r12
LBB0_8:
	movl	-48(%rbp), %r9d
	movq	%r15, (%rsp)
	leaq	L_.str.1(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	movq	%r14, %rdx
	movq	%r12, %rcx
	xorl	%r8d, %r8d
	callq	_ref_transaction_update
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ref_transaction_commit
	testq	%rax, %rax
	je	LBB0_11
LBB0_10:
	movl	$-1, %r13d
LBB0_11:
	movq	%rbx, %rdi
	callq	_ref_transaction_free
	leaq	-48(%rbp), %rdi
	callq	_strbuf_release
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,4,2                ## @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	": "

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

	.comm	_null_oid,4,2                   ## @null_oid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_update_head_with_reflog        ; -- Begin function update_head_with_reflog
	.p2align	2
_update_head_with_reflog:               ; @update_head_with_reflog
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x4
	mov	x22, x3
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	cbz	x2, LBB0_2
; %bb.1:
	add	x0, sp, #8
	mov	x1, x2
	bl	_strbuf_addstr
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #8
	bl	_strbuf_addstr
LBB0_2:
	ldr	w0, [x22]
	mov	w1, #10
	bl	_strchr
	cbz	x0, LBB0_4
; %bb.3:
	ldrsw	x1, [x22]
	sub	x8, x0, x1
	add	x2, x8, #1
	add	x0, sp, #8
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_strbuf_add
	b	LBB0_5
LBB0_4:
	add	x0, sp, #8
	mov	x1, x22
	bl	_strbuf_addbuf
	add	x0, sp, #8
	mov	w1, #10
	bl	_strbuf_addch
LBB0_5:
	mov	x0, x19
	bl	_ref_transaction_begin
	mov	x22, x0
	cbz	x0, LBB0_8
; %bb.6:
Lloh5:
	adrp	x8, _null_oid@GOTPAGE
Lloh6:
	ldr	x8, [x8, _null_oid@GOTPAGEOFF]
	cmp	x21, #0
	csel	x3, x8, x21, eq
	ldr	w5, [sp, #8]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x2, x20
	mov	w4, #0
	mov	x6, x19
	bl	_ref_transaction_update
	cbnz	x0, LBB0_8
; %bb.7:
	mov	x0, x22
	mov	x1, x19
	bl	_ref_transaction_commit
	cbz	x0, LBB0_10
LBB0_8:
	mov	w19, #-1
LBB0_9:
	mov	x0, x22
	bl	_ref_transaction_free
	add	x0, sp, #8
	bl	_strbuf_release
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
	mov	w19, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,4,2                ; @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	": "

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

	.comm	_null_oid,4,2                   ; @null_oid
.subsections_via_symbols
