	.file	"extr_inode.c_ufs_inode_getfrag.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"ENTER, ino %lu, fragment %llu, new_fragment %llu, required %u, metadata %d\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"EXIT, result %llu\n"
	.text
	.p2align 4
	.type	ufs_inode_getfrag, @function
ufs_inode_getfrag:
.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
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	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
	mov	rbx, rdi
	sub	rsp, 104
	.cfi_def_cfa_offset 160
	mov	QWORD PTR 24[rsp], rsi
	mov	DWORD PTR 80[rsp], ecx
	mov	QWORD PTR 40[rsp], r8
	mov	QWORD PTR 32[rsp], r9
	mov	QWORD PTR 56[rsp], rdi
	call	UFS_I@PLT
	mov	rbp, QWORD PTR 8[rbx]
	mov	r12, rax
	mov	rdi, rbp
	call	UFS_SB@PLT
	movsx	rsi, DWORD PTR 4[rbx]
	mov	rdx, r14
	mov	rcx, r13
	cmp	QWORD PTR 32[rsp], 0
	mov	r8d, DWORD PTR 80[rsp]
	lea	rdi, .LC0[rip]
	sete	r9b
	mov	r15, QWORD PTR [rax]
	xor	eax, eax
	movzx	r9d, r9b
	call	UFSD@PLT
	mov	rdi, r14
	call	ufs_fragstoblks@PLT
	mov	rdi, r14
	mov	rbx, rax
	mov	QWORD PTR 48[rsp], rax
	call	ufs_fragnum@PLT
	mov	rdx, rbx
	mov	rsi, r12
	mov	rdi, r15
	mov	DWORD PTR 20[rsp], eax
	mov	r14, rbx
	call	ufs_get_direct_data_ptr@PLT
	cmp	QWORD PTR 32[rsp], 0
	mov	QWORD PTR 64[rsp], 0
	mov	rbx, rax
	mov	eax, 0
	cmovne	rax, QWORD PTR 168[rsp]
	mov	QWORD PTR 72[rsp], rax
	lea	rax, -1[r14]
	mov	QWORD PTR 88[rsp], rax
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rsi, rbx
	mov	rdi, rbp
	call	ufs_data_ptr_to_cpu@PLT
	mov	r14, QWORD PTR [r12]
	test	rax, rax
	je	.L3
	cmp	QWORD PTR 24[rsp], r14
	jge	.L3
	mov	r14d, DWORD PTR 20[rsp]
	mov	rsi, rax
	add	rsi, QWORD PTR [r15]
	mov	QWORD PTR 8[rsp], rax
	add	rsi, r14
	cmp	QWORD PTR 32[rsp], 0
	jne	.L4
	mov	rdi, rbp
	call	sb_getblk@PLT
	mov	rsi, rbx
	mov	rdi, rbp
	mov	r13, rax
	call	ufs_data_ptr_to_cpu@PLT
	mov	rdx, QWORD PTR 8[rsp]
	cmp	rax, rdx
	je	.L43
	mov	rdi, r13
	call	brelse@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdi, r14
	call	ufs_fragstoblks@PLT
	mov	rdi, r14
	mov	r13, rax
	call	ufs_fragnum@PLT
	cmp	QWORD PTR 48[rsp], r13
	jle	.L8
	test	eax, eax
	mov	DWORD PTR 8[rsp], eax
	je	.L9
	mov	rdx, r13
	mov	rsi, r12
	mov	rdi, r15
	call	ufs_get_direct_data_ptr@PLT
	mov	ecx, DWORD PTR 8[rsp]
	mov	r8d, DWORD PTR 8[r15]
	mov	rdi, rbp
	mov	rsi, rax
	mov	QWORD PTR 8[rsp], rax
	sub	r8d, ecx
	mov	DWORD PTR 84[rsp], r8d
	call	ufs_data_ptr_to_cpu@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	mov	rdx, r14
	push	QWORD PTR 176[rsp]
	.cfi_def_cfa_offset 176
	mov	r9, QWORD PTR 56[rsp]
	mov	rcx, rax
	mov	r8d, DWORD PTR 100[rsp]
	mov	rsi, QWORD PTR 24[rsp]
	mov	rdi, QWORD PTR 72[rsp]
	call	ufs_new_fragments@PLT
	pop	r8
	.cfi_def_cfa_offset 168
	pop	r9
	.cfi_def_cfa_offset 160
	test	rax, rax
	jne	.L10
	cmp	QWORD PTR [r12], r14
	jne	.L2
	.p2align 4,,10
	.p2align 3
.L41:
	xor	r14d, r14d
.L1:
	add	rsp, 104
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r14
	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
.L8:
	.cfi_restore_state
	je	.L44
	cmp	QWORD PTR 48[rsp], 0
	jne	.L14
.L39:
	mov	r8d, DWORD PTR 8[r15]
.L15:
	mov	eax, DWORD PTR 20[rsp]
	mov	rdx, QWORD PTR 24[rsp]
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	push	QWORD PTR 80[rsp]
	.cfi_def_cfa_offset 176
	mov	r9, QWORD PTR 56[rsp]
	sub	rdx, rax
.L40:
	mov	rcx, QWORD PTR 80[rsp]
	mov	rdi, QWORD PTR 72[rsp]
	mov	rsi, rbx
	call	ufs_new_fragments@PLT
	pop	rdx
	.cfi_def_cfa_offset 168
	pop	rcx
	.cfi_def_cfa_offset 160
	test	rax, rax
	jne	.L17
.L46:
	mov	eax, DWORD PTR 20[rsp]
	test	eax, eax
	je	.L45
	cmp	QWORD PTR [r12], r14
	jne	.L2
	mov	eax, DWORD PTR ENOSPC[rip]
	mov	rcx, QWORD PTR 40[rsp]
	neg	eax
	mov	DWORD PTR [rcx], eax
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L10:
	mov	r14, QWORD PTR [r12]
.L9:
	mov	rsi, r12
	mov	rdi, r15
	mov	rdx, r13
	call	ufs_get_direct_data_ptr@PLT
	mov	rdi, rbp
	mov	rsi, rax
	call	ufs_data_ptr_to_cpu@PLT
	test	rax, rax
	je	.L11
	mov	edx, DWORD PTR 8[r15]
	add	rax, rdx
	mov	QWORD PTR 64[rsp], rax
.L11:
	mov	eax, DWORD PTR 20[rsp]
	mov	rdx, QWORD PTR 24[rsp]
	sub	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 168
	push	QWORD PTR 80[rsp]
	.cfi_def_cfa_offset 176
	mov	r9, QWORD PTR 56[rsp]
	mov	rcx, rax
	sub	rdx, rax
	mov	eax, DWORD PTR 96[rsp]
	lea	r8d, [rax+rcx]
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L45:
	.cfi_restore_state
	mov	rsi, rbx
	mov	rdi, rbp
	call	ufs_data_ptr_to_cpu@PLT
	test	rax, rax
	jne	.L2
	mov	eax, DWORD PTR ENOSPC[rip]
	mov	rcx, QWORD PTR 40[rsp]
	neg	eax
	mov	DWORD PTR [rcx], eax
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L44:
	mov	edx, DWORD PTR 20[rsp]
	mov	rsi, rbx
	mov	rdi, rbp
	sub	edx, eax
	mov	eax, DWORD PTR 80[rsp]
	mov	DWORD PTR 8[rsp], edx
	lea	r13d, [rdx+rax]
	call	ufs_data_ptr_to_cpu@PLT
	mov	edx, DWORD PTR 8[rsp]
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	mov	rsi, rbx
	mov	rcx, rax
	mov	rax, QWORD PTR 32[rsp]
	push	QWORD PTR 80[rsp]
	.cfi_def_cfa_offset 176
	mov	r8d, r13d
	mov	r9, QWORD PTR 56[rsp]
	mov	rdi, QWORD PTR 72[rsp]
	sub	rax, rdx
	mov	rdx, rax
	call	ufs_new_fragments@PLT
	pop	rsi
	.cfi_def_cfa_offset 168
	pop	rdi
	.cfi_def_cfa_offset 160
	test	rax, rax
	je	.L46
.L17:
	mov	rsi, QWORD PTR [r15]
	mov	r13d, DWORD PTR 20[rsp]
	mov	rdx, rax
	add	rsi, rax
	add	rsi, r13
	cmp	QWORD PTR 32[rsp], 0
	je	.L47
	mov	rax, QWORD PTR 32[rsp]
	xor	r14d, r14d
	mov	QWORD PTR [rax], rsi
	mov	rax, QWORD PTR 40[rsp]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR 160[rsp]
	mov	DWORD PTR [rax], 1
.L20:
	mov	rcx, QWORD PTR 56[rsp]
	mov	eax, DWORD PTR CURRENT_TIME_SEC[rip]
	mov	QWORD PTR 8[rsp], rdx
	mov	DWORD PTR [rcx], eax
	mov	rdi, rcx
	call	IS_SYNC@PLT
	mov	rdx, QWORD PTR 8[rsp]
	test	rax, rax
	jne	.L48
.L21:
	mov	rdi, QWORD PTR 56[rsp]
	mov	QWORD PTR 8[rsp], rdx
	call	mark_inode_dirty@PLT
	mov	rdx, QWORD PTR 8[rsp]
	lea	rdi, .LC1[rip]
	xor	eax, eax
	lea	rsi, 0[r13+rdx]
	call	UFSD@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdx, QWORD PTR 88[rsp]
	mov	rsi, r12
	mov	rdi, r15
	call	ufs_get_direct_data_ptr@PLT
	mov	rdi, rbp
	mov	rsi, rax
	call	ufs_data_ptr_to_cpu@PLT
	test	rax, rax
	je	.L39
	mov	edx, DWORD PTR 8[r15]
	add	rax, rdx
	mov	r8, rdx
	mov	QWORD PTR 64[rsp], rax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR 32[rsp]
	xor	r14d, r14d
	mov	QWORD PTR [rax], rsi
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L43:
	mov	rcx, r14
	lea	rdi, .LC1[rip]
	mov	r14, r13
	add	rcx, rax
	xor	eax, eax
	mov	rsi, rcx
	call	UFSD@PLT
	jmp	.L1
.L48:
	mov	rdi, QWORD PTR 56[rsp]
	call	ufs_sync_inode@PLT
	mov	rdx, QWORD PTR 8[rsp]
	jmp	.L21
.L47:
	mov	rdi, rbp
	mov	QWORD PTR 8[rsp], rax
	call	sb_getblk@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	r14, rax
	jmp	.L20
	.cfi_endproc
.LFE0:
	.size	ufs_inode_getfrag, .-ufs_inode_getfrag
	.comm	ENOSPC,4,4
	.comm	CURRENT_TIME_SEC,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_inode.c_ufs_inode_getfrag.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ENTER, ino %lu, fragment %llu, new_fragment %llu, r"
	.ascii	"equired %u, metadata %d\012\000"
	.align	2
.LC1:
	.ascii	"EXIT, result %llu\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ufs_inode_getfrag, %function
ufs_inode_getfrag:
	@ args = 16, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r0
	sub	sp, sp, #68
	mov	r10, r1
	mov	r8, r2
	mov	r4, r3
	str	r0, [sp, #36]
	bl	UFS_I
	ldr	r5, [r6, #8]
	mov	r7, r0
	mov	r0, r5
	bl	UFS_SB
	ldr	r2, [sp, #108]
	mov	r3, r0
	clz	ip, r2
	mov	r0, r10
	ldr	r2, [r6, #4]
	asr	r1, r10, #31
	lsr	ip, ip, #5
	asr	r9, r8, #31
	ldr	fp, [r3]
	stm	sp, {r0-r1}
	asr	r3, r2, #31
	str	ip, [sp, #20]
	str	r8, [sp, #8]
	str	r9, [sp, #12]
	ldr	r0, .L43
	str	r4, [sp, #16]
	bl	UFSD
	mov	r0, r10
	bl	ufs_fragstoblks
	mov	r3, r0
	mov	r0, r10
	mov	r8, r3
	str	r3, [sp, #32]
	bl	ufs_fragnum
	mov	r2, r8
	mov	r9, r0
	mov	r1, r7
	mov	r0, fp
	bl	ufs_get_direct_data_ptr
	ldr	r3, [sp, #108]
	mov	r6, r0
	cmp	r3, #0
	ldr	r3, [sp, #116]
	moveq	r3, #0
	str	r3, [sp, #44]
	mov	r3, #0
	str	r3, [sp, #40]
	add	r3, r4, r9
	str	r3, [sp, #52]
	sub	r3, r10, r9
	str	r3, [sp, #48]
	sub	r3, r8, #1
	str	r3, [sp, #60]
.L2:
	mov	r1, r6
	mov	r0, r5
	bl	ufs_data_ptr_to_cpu
	ldr	r4, [r7]
	mov	r8, r0
	cmp	r0, #0
	cmpne	r10, r4
	bge	.L3
	ldr	r1, [fp]
	ldr	r3, [sp, #108]
	add	r1, r0, r1
	cmp	r3, #0
	add	r1, r1, r9
	bne	.L4
	mov	r0, r5
	bl	sb_getblk
	mov	r1, r6
	mov	r4, r0
	mov	r0, r5
	bl	ufs_data_ptr_to_cpu
	cmp	r0, r8
	beq	.L36
	mov	r0, r4
	bl	brelse
	b	.L2
.L3:
	mov	r0, r4
	bl	ufs_fragstoblks
	mov	r8, r0
	mov	r0, r4
	bl	ufs_fragnum
	ldr	r3, [sp, #32]
	str	r0, [sp, #28]
	cmp	r3, r8
	ble	.L8
	cmp	r0, #0
	beq	.L9
	mov	r2, r8
	mov	r1, r7
	mov	r0, fp
	bl	ufs_get_direct_data_ptr
	mov	r1, r0
	mov	r0, r5
	str	r1, [sp, #56]
	bl	ufs_data_ptr_to_cpu
	ldr	r2, [sp, #116]
	mov	r3, r0
	str	r2, [sp, #8]
	ldr	r2, [sp, #104]
	ldr	r0, [sp, #28]
	str	r2, [sp, #4]
	ldr	r2, [fp, #4]
	ldr	r1, [sp, #56]
	sub	r2, r2, r0
	str	r2, [sp]
	ldr	r0, [sp, #36]
	mov	r2, r4
	bl	ufs_new_fragments
	cmp	r0, #0
	bne	.L10
	ldr	r3, [r7]
	cmp	r3, r4
	bne	.L2
	mov	r4, #0
.L42:
	mov	r0, r4
	add	sp, sp, #68
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L8:
	beq	.L37
	ldr	r3, [sp, #32]
	cmp	r3, #0
	bne	.L14
	ldr	r3, [fp, #4]
.L15:
	ldr	r2, [sp, #44]
	str	r2, [sp, #8]
	ldr	r2, [sp, #104]
	str	r2, [sp, #4]
.L33:
	str	r3, [sp]
	mov	r1, r6
	ldr	r3, [sp, #40]
	ldr	r2, [sp, #48]
	ldr	r0, [sp, #36]
	bl	ufs_new_fragments
	cmp	r0, #0
	bne	.L17
.L39:
	cmp	r9, #0
	beq	.L38
	ldr	r3, [r7]
	cmp	r3, r4
	bne	.L2
.L22:
	mov	r4, #0
	mov	r0, r4
	ldr	r3, .L43+4
	ldr	r2, [sp, #104]
	ldr	r3, [r3]
	rsb	r3, r3, #0
	str	r3, [r2]
	add	sp, sp, #68
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	ldr	r4, [r7]
.L9:
	mov	r2, r8
	mov	r1, r7
	mov	r0, fp
	bl	ufs_get_direct_data_ptr
	mov	r1, r0
	mov	r0, r5
	bl	ufs_data_ptr_to_cpu
	cmp	r0, #0
	ldrne	r3, [fp, #4]
	addne	r3, r0, r3
	strne	r3, [sp, #40]
	ldr	r3, [sp, #44]
	str	r3, [sp, #8]
	ldr	r3, [sp, #104]
	str	r3, [sp, #4]
	ldr	r3, [sp, #52]
	b	.L33
.L38:
	mov	r1, r6
	mov	r0, r5
	bl	ufs_data_ptr_to_cpu
	cmp	r0, #0
	beq	.L22
	b	.L2
.L14:
	ldr	r2, [sp, #60]
	mov	r1, r7
	mov	r0, fp
	bl	ufs_get_direct_data_ptr
	mov	r1, r0
	mov	r0, r5
	bl	ufs_data_ptr_to_cpu
	ldr	r3, [fp, #4]
	cmp	r0, #0
	addne	r2, r0, r3
	strne	r2, [sp, #40]
	b	.L15
.L37:
	mov	r1, r6
	mov	r0, r5
	bl	ufs_data_ptr_to_cpu
	ldr	r1, [sp, #28]
	ldr	r2, [sp, #52]
	mov	r3, r0
	ldr	r0, [sp, #44]
	sub	r2, r2, r1
	str	r0, [sp, #8]
	str	r2, [sp]
	ldr	r0, [sp, #104]
	ldr	r2, [sp, #48]
	str	r0, [sp, #4]
	add	r2, r1, r2
	ldr	r0, [sp, #36]
	mov	r1, r6
	bl	ufs_new_fragments
	cmp	r0, #0
	beq	.L39
.L17:
	ldr	r1, [fp]
	ldr	r3, [sp, #108]
	add	r1, r0, r1
	cmp	r3, #0
	mov	r8, r0
	add	r1, r1, r9
	beq	.L40
	mov	r3, #0
	mov	r2, #1
	ldr	r0, [sp, #108]
	mov	r4, r3
	str	r1, [r0]
	ldr	r1, [sp, #104]
	str	r3, [r1]
	ldr	r3, [sp, #112]
	str	r2, [r3]
.L20:
	ldr	r3, .L43+8
	ldr	r0, [sp, #36]
	ldr	r3, [r3]
	str	r3, [r0]
	bl	IS_SYNC
	cmp	r0, #0
	bne	.L41
.L21:
	ldr	r0, [sp, #36]
	bl	mark_inode_dirty
	mov	r3, #0
	adds	r2, r9, r8
	adc	r3, r3, r8, asr #31
	ldr	r0, .L43+12
	bl	UFSD
	mov	r0, r4
	add	sp, sp, #68
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	ldr	r3, [sp, #108]
	mov	r4, #0
	str	r1, [r3]
	b	.L42
.L36:
	mov	r2, r0
	mov	r7, #0
	mov	r1, r2
	adds	r2, r9, r2
	adc	r3, r7, r1, asr #31
	ldr	r0, .L43+12
	bl	UFSD
	mov	r0, r4
	add	sp, sp, #68
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L41:
	ldr	r0, [sp, #36]
	bl	ufs_sync_inode
	b	.L21
.L40:
	mov	r0, r5
	bl	sb_getblk
	mov	r4, r0
	b	.L20
.L44:
	.align	2
.L43:
	.word	.LC0
	.word	ENOSPC
	.word	CURRENT_TIME_SEC
	.word	.LC1
	.size	ufs_inode_getfrag, .-ufs_inode_getfrag
	.comm	ENOSPC,4,4
	.comm	CURRENT_TIME_SEC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
