	.file	"extr_odb_loose.c_loose_backend__write.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"tmp_object"
	.text
	.p2align 4
	.type	loose_backend__write, @function
loose_backend__write:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	mov	r14, rdi
	push	r13
	push	r12
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, rcx
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -56
	mov	QWORD PTR -96[rbp], rdx
	mov	QWORD PTR -88[rbp], rsi
	mov	rbx, rsp
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR GIT_BUF_INIT[rip]
	mov	DWORD PTR -72[rbp], eax
	movsx	rax, DWORD PTR MAX_HEADER_LEN[rip]
	mov	r10, rax
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rbx, rax
	and	rdx, -16
	mov	rax, rbx
	cmp	rsp, rax
	je	.L3
.L17:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L17
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L18
.L4:
	mov	eax, DWORD PTR GIT_FILEBUF_INIT[rip]
	lea	rdi, -64[rbp]
	mov	rcx, r12
	mov	edx, r10d
	mov	rsi, rsp
	lea	rbx, -72[rbp]
	lea	r13, -68[rbp]
	mov	DWORD PTR -68[rbp], eax
	call	git_odb__format_object_header@PLT
	mov	r15d, eax
	test	eax, eax
	js	.L5
	lea	rbx, -72[rbp]
	mov	esi, DWORD PTR 4[r14]
	lea	rdx, .LC0[rip]
	mov	rdi, rbx
	call	git_buf_joinpath@PLT
	test	rax, rax
	js	.L19
	mov	ecx, DWORD PTR [r14]
	mov	rdi, r14
	lea	r13, -68[rbp]
	mov	DWORD PTR -100[rbp], ecx
	call	filebuf_flags@PLT
	mov	ecx, DWORD PTR -100[rbp]
	mov	esi, DWORD PTR -72[rbp]
	mov	rdi, r13
	mov	edx, eax
	call	git_filebuf_open@PLT
	test	rax, rax
	js	.L7
	mov	rdx, QWORD PTR -64[rbp]
	mov	rsi, rsp
	mov	rdi, r13
	call	git_filebuf_write@PLT
	mov	rsi, QWORD PTR -96[rbp]
	mov	rdx, r12
	mov	rdi, r13
	call	git_filebuf_write@PLT
	mov	rdx, QWORD PTR -88[rbp]
	mov	rsi, r14
	mov	rdi, rbx
	call	object_file_name@PLT
	test	rax, rax
	js	.L7
	mov	rsi, r14
	mov	rdi, rbx
	call	object_mkdir@PLT
	test	rax, rax
	jns	.L20
	.p2align 4,,10
	.p2align 3
.L7:
	mov	r15d, -1
.L5:
	mov	rdi, r13
	call	git_filebuf_cleanup@PLT
.L8:
	mov	rdi, rbx
	call	git_buf_dispose@PLT
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	lea	rsp, -40[rbp]
	mov	eax, r15d
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	lea	r13, -68[rbp]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L18:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L20:
	mov	esi, DWORD PTR -72[rbp]
	mov	rdi, r13
	call	git_filebuf_commit_at@PLT
	test	rax, rax
	jns	.L8
	jmp	.L7
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	loose_backend__write, .-loose_backend__write
	.comm	MAX_HEADER_LEN,4,4
	.comm	GIT_FILEBUF_INIT,4,4
	.comm	GIT_BUF_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_odb_loose.c_loose_backend__write.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"tmp_object\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	loose_backend__write, %function
loose_backend__write:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #36
	ldr	ip, .L13
	mov	r8, r1
	ldr	ip, [ip]
	ldr	lr, [fp, #4]
	add	r1, ip, #7
	bic	r1, r1, #7
	sub	sp, sp, r1
	mov	r6, sp
	ldr	r1, .L13+4
	mov	r7, r2
	ldr	r2, .L13+8
	str	lr, [r6], #8
	mov	r5, r0
	ldr	r0, .L13+12
	ldr	r4, [r1]
	ldr	lr, [r2]
	ldr	r0, [r0]
	str	r0, [fp, #-40]
	mov	r0,#0
	mov	r2, ip
	mov	r1, r6
	sub	r0, fp, #48
	str	r4, [fp, #-52]
	str	lr, [fp, #-44]
	str	r3, [fp, #-56]
	bl	git_odb__format_object_header
	subs	r4, r0, #0
	sub	r9, fp, #52
	sublt	r10, fp, #44
	blt	.L2
	mov	r0, r9
	ldr	r2, .L13+16
	ldr	r1, [r5, #4]
	bl	git_buf_joinpath
	cmp	r0, #0
	blt	.L11
	ldr	r1, [fp, #-52]
	mov	r0, r5
	str	r1, [fp, #-60]
	bl	filebuf_flags
	sub	r10, fp, #44
	mov	r2, r0
	ldr	r1, [fp, #-60]
	mov	r0, r10
	ldr	r3, [r5]
	bl	git_filebuf_open
	cmp	r0, #0
	blt	.L4
	mov	r1, r6
	ldr	r2, [fp, #-48]
	mov	r0, r10
	bl	git_filebuf_write
	mov	r1, r7
	ldr	r2, [fp, #-56]
	mov	r0, r10
	bl	git_filebuf_write
	mov	r2, r8
	mov	r1, r5
	mov	r0, r9
	bl	object_file_name
	cmp	r0, #0
	blt	.L4
	mov	r1, r5
	mov	r0, r9
	bl	object_mkdir
	cmp	r0, #0
	blt	.L4
	mov	r0, r10
	ldr	r1, [fp, #-52]
	bl	git_filebuf_commit_at
	cmp	r0, #0
	bge	.L5
	b	.L4
.L11:
	sub	r10, fp, #44
.L4:
	mvn	r4, #0
.L2:
	mov	r0, r10
	bl	git_filebuf_cleanup
.L5:
	mov	r0, r9
	bl	git_buf_dispose
	ldr	r3, .L13+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	mov	r0, r4
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	MAX_HEADER_LEN
	.word	GIT_BUF_INIT
	.word	GIT_FILEBUF_INIT
	.word	.LC1
	.word	.LC0
	.size	loose_backend__write, .-loose_backend__write
	.comm	MAX_HEADER_LEN,4,4
	.comm	GIT_FILEBUF_INIT,4,4
	.comm	GIT_BUF_INIT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
