	.file	"extr_refs.c_write_pseudoref.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s\n"
.LC1:
	.string	"%s"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"could not open '%s' for writing: %s"
	.section	.rodata.str1.1
.LC3:
	.string	"could not read ref '%s'"
.LC4:
	.string	"ref '%s' already exists"
	.section	.rodata.str1.8
	.align 8
.LC5:
	.string	"unexpected object ID when writing '%s'"
	.section	.rodata.str1.1
.LC6:
	.string	"could not write to '%s'"
	.text
	.p2align 4
	.type	write_pseudoref, @function
write_pseudoref:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xor	r14d, r14d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	QWORD PTR [rsp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR LOCK_INIT[rip]
	mov	DWORD PTR 24[rsp], eax
	mov	rax, QWORD PTR STRBUF_INIT[rip]
	mov	QWORD PTR 32[rsp], rax
	test	rsi, rsi
	je	.L1
	mov	r12, rdi
	mov	rdi, rsi
	lea	r15, 32[rsp]
	mov	rbp, rdx
	call	oid_to_hex@PLT
	lea	rsi, .LC0[rip]
	mov	rdi, r15
	lea	rbx, 24[rsp]
	mov	rdx, rax
	xor	eax, eax
	call	strbuf_addf@PLT
	mov	rsi, r12
	lea	rdi, .LC1[rip]
	call	git_path@PLT
	mov	r14, rax
	xor	eax, eax
	call	get_files_ref_lock_timeout_ms@PLT
	xor	edx, edx
	mov	rsi, r14
	mov	rdi, rbx
	mov	ecx, eax
	call	hold_lock_file_for_update_timeout@PLT
	mov	r13d, eax
	test	eax, eax
	js	.L22
	test	rbp, rbp
	je	.L5
	lea	r9, 28[rsp]
	mov	rdi, r12
	mov	rsi, r9
	mov	QWORD PTR 8[rsp], r9
	call	read_ref@PLT
	mov	r9, QWORD PTR 8[rsp]
	test	rax, rax
	je	.L6
	mov	rdi, rbp
	call	is_null_oid@PLT
	lea	rdi, .LC3[rip]
	test	rax, rax
	je	.L19
.L5:
	mov	edx, DWORD PTR 32[rsp]
	mov	esi, DWORD PTR 36[rsp]
	mov	edi, r13d
	call	write_in_full@PLT
	test	rax, rax
	js	.L23
	mov	rdi, rbx
	xor	r14d, r14d
	call	commit_lock_file@PLT
.L4:
	mov	rdi, r15
	call	strbuf_release@PLT
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L24
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	rdi, rbp
	mov	QWORD PTR 8[rsp], r9
	call	is_null_oid@PLT
	mov	r9, QWORD PTR 8[rsp]
	lea	rdi, .LC4[rip]
	test	rax, rax
	jne	.L19
	mov	rsi, rbp
	mov	rdi, r9
	call	oideq@PLT
	test	eax, eax
	jne	.L5
	lea	rdi, .LC5[rip]
	.p2align 4,,10
	.p2align 3
.L19:
	call	_@PLT
	mov	rdx, r12
	mov	rsi, rax
.L20:
	mov	rdi, QWORD PTR [rsp]
	xor	eax, eax
	mov	r14d, -1
	call	strbuf_addf@PLT
	mov	rdi, rbx
	call	rollback_lock_file@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rdi, .LC6[rip]
	call	_@PLT
	mov	rdx, r14
	mov	rsi, rax
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L22:
	mov	edi, DWORD PTR errno[rip]
	call	strerror@PLT
	lea	rdi, .LC2[rip]
	mov	r12d, eax
	call	_@PLT
	mov	rdi, QWORD PTR [rsp]
	mov	rdx, r14
	mov	ecx, r12d
	mov	rsi, rax
	xor	eax, eax
	mov	r14d, -1
	call	strbuf_addf@PLT
	jmp	.L4
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	write_pseudoref, .-write_pseudoref
	.comm	errno,4,4
	.comm	STRBUF_INIT,8,8
	.comm	LOCK_INIT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_refs.c_write_pseudoref.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s\012\000"
	.align	2
.LC1:
	.ascii	"%s\000"
	.align	2
.LC2:
	.ascii	"could not open '%s' for writing: %s\000"
	.align	2
.LC3:
	.ascii	"could not read ref '%s'\000"
	.align	2
.LC4:
	.ascii	"ref '%s' already exists\000"
	.align	2
.LC5:
	.ascii	"unexpected object ID when writing '%s'\000"
	.align	2
.LC6:
	.ascii	"could not write to '%s'\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_pseudoref, %function
write_pseudoref:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	ip, .L23
	sub	sp, sp, #28
	ldr	r8, [ip]
	mov	r7, r3
	ldr	lr, .L23+4
	ldr	r3, .L23+8
	subs	ip, r1, #0
	add	r5, sp, #12
	mov	r4, r0
	ldm	lr, {r0, r1}
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	moveq	r4, ip
	stm	r5, {r0, r1}
	str	r8, [sp, #4]
	beq	.L1
	mov	r0, ip
	mov	r6, r2
	bl	oid_to_hex
	ldr	r1, .L23+12
	mov	r2, r0
	mov	r0, r5
	bl	strbuf_addf
	mov	r1, r4
	ldr	r0, .L23+16
	bl	git_path
	mov	r9, r0
	bl	get_files_ref_lock_timeout_ms
	mov	r1, r9
	mov	r3, r0
	mov	r2, #0
	add	r0, sp, #4
	bl	hold_lock_file_for_update_timeout
	subs	r8, r0, #0
	blt	.L20
	cmp	r6, #0
	beq	.L5
	mov	r0, r4
	add	r1, sp, #8
	bl	read_ref
	cmp	r0, #0
	mov	r0, r6
	beq	.L6
	bl	is_null_oid
	cmp	r0, #0
	ldreq	r0, .L23+20
	beq	.L17
.L5:
	mov	r0, r8
	ldr	r2, [sp, #12]
	ldr	r1, [sp, #16]
	bl	write_in_full
	cmp	r0, #0
	blt	.L21
	add	r0, sp, #4
	bl	commit_lock_file
	mov	r4, #0
.L4:
	mov	r0, r5
	bl	strbuf_release
.L1:
	ldr	r3, .L23+8
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L6:
	bl	is_null_oid
	cmp	r0, #0
	ldrne	r0, .L23+24
	bne	.L17
	mov	r1, r6
	add	r0, sp, #8
	bl	oideq
	cmp	r0, #0
	bne	.L5
	ldr	r0, .L23+28
.L17:
	bl	_
	mov	r2, r4
	mov	r1, r0
.L18:
	mov	r0, r7
	bl	strbuf_addf
	add	r0, sp, #4
	bl	rollback_lock_file
	mvn	r4, #0
	b	.L4
.L21:
	ldr	r0, .L23+32
	bl	_
	mov	r2, r9
	mov	r1, r0
	b	.L18
.L20:
	ldr	r0, .L23+36
	bl	_
	ldr	r3, .L23+40
	mov	r4, r0
	ldr	r0, [r3]
	bl	strerror
	mov	r1, r4
	mov	r3, r0
	mov	r2, r9
	mov	r0, r7
	bl	strbuf_addf
	mvn	r4, #0
	b	.L4
.L22:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	LOCK_INIT
	.word	STRBUF_INIT
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC2
	.word	errno
	.size	write_pseudoref, .-write_pseudoref
	.comm	errno,4,4
	.comm	STRBUF_INIT,8,4
	.comm	LOCK_INIT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
