	.file	"extr_lbalance.c_leaf_copy_items_entirely.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"vs-10090: bad last_first parameter %d"
	.align 8
.LC1:
	.string	"vs-10100: too few items in source %d, required %d from %d"
	.align 8
.LC2:
	.string	"vs-10110: can not copy negative amount of items"
	.align 8
.LC3:
	.string	"vs-10120: can not copy negative amount of items"
	.align 8
.LC4:
	.string	"vs-10130: can not copy negative amount of items"
	.align 8
.LC5:
	.string	"vs-10140: not enough free space for headers %d (needed %d)"
	.align 8
.LC6:
	.string	"vs-10150: not enough free space for items %d (needed %d)"
	.align 8
.LC7:
	.string	"vs-10160: block number in bh does not match to field in disk_child structure %lu and %lu"
	.text
	.p2align 4
	.type	leaf_copy_items_entirely, @function
leaf_copy_items_entirely:
.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
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, r8d
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	QWORD PTR 8[rsp], rdi
	xor	edi, edi
	cmp	DWORD PTR LAST_TO_FIRST[rip], edx
	mov	DWORD PTR 16[rsp], ecx
	je	.L2
	xor	edi, edi
	cmp	DWORD PTR FIRST_TO_LAST[rip], edx
	setne	dil
.L2:
	mov	edx, r13d
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	RFALSE@PLT
	mov	rdi, rbp
	call	B_NR_ITEMS@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	B_NR_ITEMS@PLT
	mov	ecx, DWORD PTR 16[rsp]
	xor	edi, edi
	mov	edx, r12d
	lea	rsi, .LC1[rip]
	sub	eax, ecx
	mov	r8d, ecx
	mov	ecx, ebx
	cmp	eax, ebx
	setl	dil
	xor	eax, eax
	call	RFALSE@PLT
	mov	edi, ebx
	lea	rsi, .LC2[rip]
	xor	eax, eax
	shr	edi, 31
	call	RFALSE@PLT
	mov	r15, QWORD PTR 8[rsp]
	xor	edi, edi
	lea	rsi, .LC3[rip]
	test	r15, r15
	sete	dil
	xor	eax, eax
	call	RFALSE@PLT
	mov	r12, QWORD PTR 16[r15]
	xor	edi, edi
	lea	rsi, .LC4[rip]
	test	r12, r12
	sete	dil
	xor	eax, eax
	call	RFALSE@PLT
	test	ebx, ebx
	jne	.L19
.L1:
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L19:
	.cfi_restore_state
	mov	rdi, r12
	call	B_BLK_HEAD@PLT
	mov	r15, rax
	mov	rdi, rax
	call	blkh_nr_item@PLT
	mov	rdi, r15
	mov	QWORD PTR 24[rsp], r15
	mov	r14d, eax
	call	blkh_free_space@PLT
	mov	rdi, r12
	mov	DWORD PTR 40[rsp], eax
	xor	eax, eax
	cmp	DWORD PTR LAST_TO_FIRST[rip], r13d
	mov	edx, eax
	cmovne	eax, r14d
	cmove	edx, r14d
	mov	esi, eax
	mov	DWORD PTR 20[rsp], eax
	mov	r15d, edx
	call	item_head@PLT
	mov	edx, DWORD PTR IH_SIZE[rip]
	mov	rdi, r12
	mov	r13, rax
	imul	edx, ebx
	mov	DWORD PTR 44[rsp], edx
	call	B_FREE_SPACE@PLT
	mov	rdi, QWORD PTR 24[rsp]
	mov	QWORD PTR 32[rsp], rax
	call	blkh_free_space@PLT
	mov	edx, DWORD PTR IH_SIZE[rip]
	mov	ecx, DWORD PTR 44[rsp]
	xor	edi, edi
	lea	rsi, .LC5[rip]
	imul	edx, ebx
	cmp	eax, edx
	mov	rdx, QWORD PTR 32[rsp]
	setl	dil
	xor	eax, eax
	call	RFALSE@PLT
	mov	edx, DWORD PTR IH_SIZE[rip]
	movsx	rax, ebx
	mov	rsi, r13
	lea	r10, 0[0+rax*4]
	imul	edx, r15d
	lea	rdi, 0[r13+r10]
	mov	QWORD PTR 48[rsp], r10
	call	memmove@PLT
	mov	edx, DWORD PTR IH_SIZE[rip]
	mov	esi, DWORD PTR 16[rsp]
	mov	rdi, rbp
	imul	edx, ebx
	mov	DWORD PTR 32[rsp], edx
	call	item_head@PLT
	mov	edx, DWORD PTR 32[rsp]
	mov	rdi, r13
	mov	rsi, rax
	call	memcpy@PLT
	mov	edx, DWORD PTR IH_SIZE[rip]
	mov	ecx, DWORD PTR 40[rsp]
	mov	rdi, QWORD PTR 24[rsp]
	imul	edx, ebx
	sub	ecx, edx
	mov	esi, ecx
	mov	DWORD PTR 40[rsp], ecx
	call	set_blkh_free_space@PLT
	mov	eax, DWORD PTR 20[rsp]
	test	eax, eax
	jne	.L6
	mov	eax, DWORD PTR [r12]
	mov	DWORD PTR 32[rsp], eax
.L7:
	lea	eax, [rbx+r14]
	mov	DWORD PTR 44[rsp], eax
	cmp	DWORD PTR 20[rsp], eax
	jge	.L20
	mov	eax, DWORD PTR 44[rsp]
	mov	r14d, DWORD PTR 32[rsp]
	mov	DWORD PTR 60[rsp], ebx
	mov	rbx, r13
	lea	ecx, -1[rax]
	mov	eax, ecx
	mov	DWORD PTR 56[rsp], ecx
	sub	eax, DWORD PTR 20[rsp]
	lea	rax, 4[r13+rax*4]
	mov	r15, rax
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdi, rbx
	call	ih_item_len@PLT
	mov	rdi, rbx
	add	rbx, 4
	sub	r14d, eax
	mov	esi, r14d
	call	put_ih_location@PLT
	cmp	r15, rbx
	jne	.L11
	mov	ebx, DWORD PTR 60[rsp]
.L12:
	mov	eax, DWORD PTR 56[rsp]
	sub	eax, DWORD PTR 20[rsp]
	cdqe
	lea	rdi, 0[r13+rax*4]
	call	ih_location@PLT
	mov	DWORD PTR 20[rsp], eax
	mov	rax, QWORD PTR 48[rsp]
	lea	rdi, -4[r13+rax]
	call	ih_location@PLT
	mov	r13d, DWORD PTR 32[rsp]
	xor	edi, edi
	lea	rsi, .LC6[rip]
	movsx	r15, eax
	mov	eax, DWORD PTR 40[rsp]
	sub	r13d, r15d
	mov	r14, r15
	cmp	r13d, eax
	mov	edx, eax
	mov	ecx, r13d
	setg	dil
	xor	eax, eax
	call	RFALSE@PLT
	movsx	rsi, DWORD PTR 20[rsp]
	movsx	rax, DWORD PTR 32[rsp]
	mov	rcx, QWORD PTR 16[r12]
	add	rax, rsi
	sub	r14d, esi
	sub	rax, r15
	mov	edx, r14d
	lea	rdi, [rcx+rsi*4]
	lea	r8, [rcx+rax*4]
	mov	rsi, r8
	call	memmove@PLT
	mov	ecx, DWORD PTR 16[rsp]
	mov	rdi, rbp
	lea	esi, -1[rcx+rbx]
	call	item_body@PLT
	mov	edx, r13d
	mov	rsi, rax
	mov	rax, QWORD PTR 16[r12]
	lea	rdi, [rax+r15*4]
	call	memcpy@PLT
	mov	r15, QWORD PTR 24[rsp]
	mov	esi, DWORD PTR 44[rsp]
	mov	rdi, r15
	call	set_blkh_nr_item@PLT
	mov	esi, DWORD PTR 40[rsp]
	mov	rdi, r15
	sub	esi, r13d
	call	set_blkh_free_space@PLT
	mov	r14, QWORD PTR 8[rsp]
	xor	edx, edx
	mov	rsi, r12
	mov	edi, DWORD PTR 8[r14]
	call	do_balance_mark_leaf_dirty@PLT
	mov	rdi, QWORD PTR [r14]
	test	rdi, rdi
	je	.L1
	mov	rax, QWORD PTR 8[rsp]
	mov	esi, DWORD PTR 12[rax]
	call	B_N_CHILD@PLT
	mov	rbp, rax
	mov	rdi, rax
	call	dc_block_number@PLT
	mov	r15, QWORD PTR 8[r12]
	mov	rdi, rbp
	mov	r14, rax
	call	dc_block_number@PLT
	xor	edi, edi
	cmp	QWORD PTR 8[r12], rax
	mov	rdx, r15
	setne	dil
	mov	rcx, r14
	lea	rsi, .LC7[rip]
	xor	eax, eax
	call	RFALSE@PLT
	mov	rdi, rbp
	call	dc_size@PLT
	imul	ebx, DWORD PTR IH_SIZE[rip]
	mov	rdi, rbp
	lea	esi, [rbx+r13]
	movsx	rsi, esi
	add	rsi, rax
	call	put_dc_size@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	edx, edx
	mov	edi, DWORD PTR 8[rax]
	mov	rsi, QWORD PTR [rax]
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	jmp	do_balance_mark_internal_dirty@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	lea	rdi, -4[r13]
	call	ih_location@PLT
	mov	DWORD PTR 32[rsp], eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	sub	eax, 1
	mov	DWORD PTR 56[rsp], eax
	jmp	.L12
	.cfi_endproc
.LFE0:
	.size	leaf_copy_items_entirely, .-leaf_copy_items_entirely
	.comm	LAST_TO_FIRST,4,4
	.comm	IH_SIZE,4,4
	.comm	FIRST_TO_LAST,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_lbalance.c_leaf_copy_items_entirely.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"vs-10090: bad last_first parameter %d\000"
	.align	2
.LC1:
	.ascii	"vs-10100: too few items in source %d, required %d f"
	.ascii	"rom %d\000"
	.align	2
.LC2:
	.ascii	"vs-10110: can not copy negative amount of items\000"
	.align	2
.LC3:
	.ascii	"vs-10120: can not copy negative amount of items\000"
	.align	2
.LC4:
	.ascii	"vs-10130: can not copy negative amount of items\000"
	.align	2
.LC5:
	.ascii	"vs-10140: not enough free space for headers %d (nee"
	.ascii	"ded %d)\000"
	.align	2
.LC6:
	.ascii	"vs-10150: not enough free space for items %d (neede"
	.ascii	"d %d)\000"
	.align	2
.LC7:
	.ascii	"vs-10160: block number in bh does not match to fiel"
	.ascii	"d in disk_child structure %lu and %lu\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	leaf_copy_items_entirely, %function
leaf_copy_items_entirely:
	@ args = 4, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r9, r2
	ldr	r10, .L19
	sub	sp, sp, #44
	ldr	r2, [r10]
	str	r0, [sp, #12]
	cmp	r2, r9
	mov	r5, r1
	moveq	r0, #0
	ldr	r4, [sp, #80]
	str	r3, [sp, #8]
	beq	.L2
	ldr	r3, .L19+4
	ldr	r0, [r3]
	subs	r0, r0, r9
	movne	r0, #1
.L2:
	mov	r2, r9
	ldr	r1, .L19+8
	bl	RFALSE
	mov	r0, r5
	bl	B_NR_ITEMS
	mov	r6, r0
	mov	r0, r5
	bl	B_NR_ITEMS
	ldr	r3, [sp, #8]
	mov	r2, r0
	sub	r0, r6, r3
	cmp	r0, r4
	movge	r0, #0
	movlt	r0, #1
	ldr	r1, .L19+12
	str	r3, [sp]
	mov	r3, r4
	bl	RFALSE
	ldr	r1, .L19+16
	lsr	r0, r4, #31
	bl	RFALSE
	ldr	r6, [sp, #12]
	ldr	r1, .L19+20
	clz	r0, r6
	lsr	r0, r0, #5
	bl	RFALSE
	ldr	r6, [r6, #12]
	ldr	r1, .L19+24
	clz	r0, r6
	lsr	r0, r0, #5
	bl	RFALSE
	cmp	r4, #0
	bne	.L18
.L1:
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	mov	r0, r6
	bl	B_BLK_HEAD
	mov	r8, r0
	bl	blkh_nr_item
	mov	fp, r0
	str	r0, [sp, #20]
	mov	r0, r8
	bl	blkh_free_space
	ldr	r3, [r10]
	mov	r7, r0
	cmp	r3, r9
	movne	r2, fp
	moveq	r2, #0
	mov	r0, r6
	mov	r1, r2
	mov	r9, r7
	str	r2, [sp, #16]
	moveq	r7, fp
	movne	r7, #0
	bl	item_head
	mov	fp, r0
	mov	r0, r8
	str	r8, [sp, #28]
	bl	blkh_free_space
	ldr	r8, .L19+28
	lsl	ip, r4, #2
	ldr	r3, [r8]
	str	ip, [sp, #32]
	mov	ip, r3
	mov	r10, r0
	mul	ip, r4, ip
	mov	r0, r6
	cmp	r10, ip
	movge	r10, #0
	movlt	r10, #1
	bl	B_FREE_SPACE
	ldr	r3, [r8]
	mov	r2, r0
	mov	ip, r3
	mul	ip, r4, ip
	ldr	r1, .L19+32
	mov	r3, ip
	mov	r0, r10
	bl	RFALSE
	ldr	r2, [r8]
	mov	r1, fp
	mov	ip, r2
	mul	ip, r7, ip
	add	r0, fp, r4, lsl #2
	mov	r2, ip
	bl	memmove
	ldr	r1, [sp, #8]
	mov	r0, r5
	bl	item_head
	ldr	r2, [r8]
	mov	r1, r0
	mov	r3, r2
	mul	r3, r4, r3
	mov	r0, fp
	mov	r2, r3
	bl	memcpy
	ldr	r7, [r8]
	ldr	r0, [sp, #28]
	mul	r7, r4, r7
	sub	r3, r9, r7
	mov	r1, r3
	str	r3, [sp, #36]
	bl	set_blkh_free_space
	ldr	r2, [sp, #16]
	cmp	r2, #0
	bne	.L6
	ldr	r3, [r6]
	str	r3, [sp, #24]
.L7:
	ldr	r3, [sp, #20]
	ldr	r2, [sp, #16]
	add	r3, r4, r3
	cmp	r2, r3
	str	r3, [sp, #20]
	bge	.L12
	mov	r10, fp
	ldr	r3, [sp, #20]
	ldr	r7, [sp, #24]
	add	r9, fp, r3, lsl #2
	ldr	r3, [sp, #16]
	sub	r9, r9, r3, lsl #2
.L11:
	mov	r0, r10
	bl	ih_item_len
	sub	r7, r7, r0
	mov	r1, r7
	mov	r0, r10
	add	r10, r10, #4
	bl	put_ih_location
	cmp	r9, r10
	bne	.L11
.L12:
	ldr	r3, [sp, #20]
	ldr	r2, [sp, #16]
	sub	r0, r3, #1
	sub	r0, r0, r2
	add	r0, fp, r0, lsl #2
	bl	ih_location
	ldr	r2, [sp, #32]
	mov	r10, r0
	sub	r0, r2, #4
	add	r0, fp, r0
	bl	ih_location
	mov	r9, r0
	ldr	r2, [sp, #24]
	ldr	r7, [sp, #36]
	sub	fp, r2, r0
	cmp	fp, r7
	movle	r0, #0
	movgt	r0, #1
	mov	r3, fp
	mov	r2, r7
	ldr	r1, .L19+36
	bl	RFALSE
	ldr	r2, [sp, #24]
	ldr	r0, [r6, #8]
	add	r1, r2, r10
	sub	r1, r1, r9
	add	r1, r0, r1, lsl #2
	sub	r2, r9, r10
	add	r0, r0, r10, lsl #2
	bl	memmove
	ldr	r0, [sp, #8]
	ldr	r2, [r6, #8]
	add	r1, r0, r4
	sub	r1, r1, #1
	mov	r0, r5
	add	r9, r2, r9, lsl #2
	bl	item_body
	mov	r2, fp
	mov	r1, r0
	mov	r0, r9
	bl	memcpy
	ldr	r5, [sp, #28]
	ldr	r1, [sp, #20]
	mov	r0, r5
	bl	set_blkh_nr_item
	mov	r0, r5
	sub	r1, r7, fp
	bl	set_blkh_free_space
	ldr	r5, [sp, #12]
	mov	r2, #0
	mov	r1, r6
	ldr	r0, [r5, #4]
	bl	do_balance_mark_leaf_dirty
	ldr	r0, [r5]
	cmp	r0, #0
	beq	.L1
	ldr	r9, [sp, #12]
	ldr	r1, [r9, #8]
	bl	B_N_CHILD
	mov	r5, r0
	bl	dc_block_number
	mov	r7, r0
	mov	r0, r5
	ldr	r6, [r6, #4]
	bl	dc_block_number
	mov	r3, r0
	subs	r0, r7, r6
	mov	r2, r6
	movne	r0, #1
	ldr	r1, .L19+40
	bl	RFALSE
	mov	r0, r5
	bl	dc_size
	mov	r1, r0
	ldr	r3, [r8]
	mov	r0, r5
	mla	r4, r3, r4, fp
	add	r1, r4, r1
	bl	put_dc_size
	mov	r2, #0
	ldr	r1, [r9]
	ldr	r0, [r9, #4]
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	do_balance_mark_internal_dirty
.L6:
	sub	r0, fp, #4
	bl	ih_location
	str	r0, [sp, #24]
	b	.L7
.L20:
	.align	2
.L19:
	.word	LAST_TO_FIRST
	.word	FIRST_TO_LAST
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	IH_SIZE
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	leaf_copy_items_entirely, .-leaf_copy_items_entirely
	.comm	LAST_TO_FIRST,4,4
	.comm	IH_SIZE,4,4
	.comm	FIRST_TO_LAST,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
