	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_pseudoref
_write_pseudoref:                       ## @write_pseudoref
	.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	$40, %rsp
	.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)
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.1:
	movq	%rcx, %r14
	movq	%rdx, %r13
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_oid_to_hex
	leaq	L_.str(%rip), %rsi
	leaq	-56(%rbp), %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_strbuf_addf
	leaq	L_.str.1(%rip), %rdi
	movq	%r12, %rsi
	callq	_git_path
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_get_files_ref_lock_timeout_ms
	leaq	-48(%rbp), %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	movl	%eax, %ecx
	callq	_hold_lock_file_for_update_timeout
	testl	%eax, %eax
	js	LBB0_8
## %bb.2:
	movl	%eax, %ebx
	testq	%r13, %r13
	je	LBB0_5
## %bb.3:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	leaq	-64(%rbp), %rsi
	movq	%r12, %rdi
	callq	_read_ref
	movq	%rax, %r14
	movq	%r13, %rdi
	callq	_is_null_oid
	testq	%r14, %r14
	je	LBB0_10
## %bb.4:
	testq	%rax, %rax
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_12
LBB0_5:
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %esi
	movl	%ebx, %edi
	callq	_write_in_full
	testq	%rax, %rax
	js	LBB0_9
## %bb.6:
	leaq	-48(%rbp), %rdi
	callq	_commit_lock_file
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movq	%rax, %rbx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_strbuf_addf
	jmp	LBB0_15
LBB0_9:
	leaq	L_.str.6(%rip), %rdi
	callq	__
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%r15, %rdx
	jmp	LBB0_14
LBB0_10:
	testq	%rax, %rax
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_18
## %bb.11:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_13
LBB0_12:
	leaq	L_.str.3(%rip), %rdi
LBB0_13:
	callq	__
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%r12, %rdx
LBB0_14:
	xorl	%eax, %eax
	callq	_strbuf_addf
	leaq	-48(%rbp), %rdi
	callq	_rollback_lock_file
LBB0_15:
	movl	$-1, %ebx
LBB0_16:
	leaq	-56(%rbp), %rdi
	callq	_strbuf_release
LBB0_17:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	leaq	-64(%rbp), %rdi
	movq	%r13, %rsi
	callq	_oideq
	testl	%eax, %eax
	jne	LBB0_5
## %bb.19:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_LOCK_INIT,4,2                  ## @LOCK_INIT
	.comm	_STRBUF_INIT,8,2                ## @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s"

L_.str.2:                               ## @.str.2
	.asciz	"could not open '%s' for writing: %s"

	.comm	_errno,4,2                      ## @errno
L_.str.3:                               ## @.str.3
	.asciz	"could not read ref '%s'"

L_.str.4:                               ## @.str.4
	.asciz	"ref '%s' already exists"

L_.str.5:                               ## @.str.5
	.asciz	"unexpected object ID when writing '%s'"

L_.str.6:                               ## @.str.6
	.asciz	"could not write to '%s'"

	.no_dead_strip	_write_pseudoref
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_pseudoref
_write_pseudoref:                       ; @write_pseudoref
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
Lloh0:
	adrp	x8, _LOCK_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOCK_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #24]
Lloh3:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [sp, #16]
	cbz	x1, LBB0_7
; %bb.1:
	mov	x19, x3
	mov	x22, x2
	mov	x20, x0
	mov	x0, x1
	bl	_oid_to_hex
	mov	x2, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #16
	bl	_strbuf_addf
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_git_path
	mov	x21, x0
	bl	_get_files_ref_lock_timeout_ms
	mov	x3, x0
	add	x0, sp, #24
	mov	x1, x21
	mov	w2, #0
	bl	_hold_lock_file_for_update_timeout
	tbnz	w0, #31, LBB0_8
; %bb.2:
	mov	x23, x0
	cbz	x22, LBB0_5
; %bb.3:
	add	x1, sp, #8
	mov	x0, x20
	bl	_read_ref
	mov	x24, x0
	mov	x0, x22
	bl	_is_null_oid
	cbz	x24, LBB0_10
; %bb.4:
	cbz	x0, LBB0_12
LBB0_5:
	ldp	w2, w1, [sp, #16]
	mov	x0, x23
	bl	_write_in_full
	tbnz	x0, #63, LBB0_9
; %bb.6:
	add	x0, sp, #24
	bl	_commit_lock_file
	mov	w19, #0
	b	LBB0_16
LBB0_7:
	mov	w19, #0
	b	LBB0_17
LBB0_8:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	mov	x20, x0
Lloh12:
	adrp	x8, _errno@GOTPAGE
Lloh13:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_strbuf_addf
	b	LBB0_15
LBB0_9:
Lloh15:
	adrp	x0, l_.str.6@PAGE
Lloh16:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	__
	mov	x1, x0
	mov	x0, x19
	mov	x2, x21
	b	LBB0_14
LBB0_10:
	cbz	x0, LBB0_18
; %bb.11:
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_13:
	bl	__
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
LBB0_14:
	bl	_strbuf_addf
	add	x0, sp, #24
	bl	_rollback_lock_file
LBB0_15:
	mov	w19, #-1
LBB0_16:
	add	x0, sp, #16
	bl	_strbuf_release
LBB0_17:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
LBB0_18:
	add	x0, sp, #8
	mov	x1, x22
	bl	_oideq
	cbnz	w0, LBB0_5
; %bb.19:
Lloh21:
	adrp	x0, l_.str.5@PAGE
Lloh22:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_LOCK_INIT,4,2                  ; @LOCK_INIT
	.comm	_STRBUF_INIT,8,2                ; @STRBUF_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s"

l_.str.2:                               ; @.str.2
	.asciz	"could not open '%s' for writing: %s"

	.comm	_errno,4,2                      ; @errno
l_.str.3:                               ; @.str.3
	.asciz	"could not read ref '%s'"

l_.str.4:                               ; @.str.4
	.asciz	"ref '%s' already exists"

l_.str.5:                               ; @.str.5
	.asciz	"unexpected object ID when writing '%s'"

l_.str.6:                               ; @.str.6
	.asciz	"could not write to '%s'"

	.no_dead_strip	_write_pseudoref
.subsections_via_symbols
