	.file	"extr_fix_node.c_ip_check_balance.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"S[0] can not be 0"
.LC1:
	.string	"vs-8210"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"incorrect return value of get_empty_nodes"
	.section	.rodata.str1.1
.LC3:
	.string	"vs-8215"
.LC4:
	.string	"vs-8230: bad h"
	.section	.rodata.str1.8
	.align 8
.LC5:
	.string	"vs-8225: tree is not balanced on leaf level"
	.align 8
.LC6:
	.string	"vs-8220: tree is not balanced on internal level"
	.text
	.p2align 4
	.type	ip_check_balance, @function
ip_check_balance:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pxor	xmm0, xmm0
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movsx	rbx, esi
	mov	esi, ebx
	mov	r12, rbx
	sub	rsp, 152
	.cfi_def_cfa_offset 208
	mov	r14, QWORD PTR 48[rdi]
	mov	edi, DWORD PTR 40[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 136[rsp], rax
	xor	eax, eax
	movaps	XMMWORD PTR 48[rsp], xmm0
	movaps	XMMWORD PTR 64[rsp], xmm0
	movaps	XMMWORD PTR 80[rsp], xmm0
	movaps	XMMWORD PTR 96[rsp], xmm0
	movaps	XMMWORD PTR 112[rsp], xmm0
	call	PATH_H_PBUFFER@PLT
	mov	r13, rax
	mov	rax, QWORD PTR 0[rbp]
	mov	eax, DWORD PTR [rax+rbx*4]
	mov	DWORD PTR [rsp], eax
	test	r13, r13
	je	.L55
.L2:
	mov	esi, r12d
	mov	rdi, rbp
	call	get_parents@PLT
	mov	r15d, eax
	cmp	eax, 130
	je	.L56
.L1:
	mov	rax, QWORD PTR 136[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L57
	add	rsp, 152
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	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
.L56:
	.cfi_restore_state
	mov	rdi, r13
	call	B_FREE_SPACE@PLT
	mov	esi, r12d
	mov	rdi, rbp
	mov	DWORD PTR 8[rsp], eax
	call	get_rfree@PLT
	mov	esi, r12d
	mov	rdi, rbp
	mov	DWORD PTR 4[rsp], eax
	call	get_lfree@PLT
	mov	edi, DWORD PTR 4[r14]
	mov	ecx, DWORD PTR 4[rsp]
	mov	r9d, r12d
	mov	edx, DWORD PTR 8[rsp]
	mov	r8, rbp
	mov	esi, eax
	mov	DWORD PTR 12[rsp], eax
	call	can_node_be_removed@PLT
	cmp	eax, DWORD PTR NO_BALANCING_NEEDED[rip]
	je	.L44
	mov	esi, r12d
	mov	rdi, rbp
	call	create_virtual_node@PLT
	mov	r11d, DWORD PTR 12[rsp]
	mov	esi, r12d
	mov	rdi, rbp
	mov	edx, r11d
	call	check_left@PLT
	mov	edx, DWORD PTR 4[rsp]
	mov	esi, r12d
	mov	rdi, rbp
	call	check_right@PLT
	test	r12d, r12d
	je	.L7
	mov	rdx, QWORD PTR 8[rbp]
	mov	eax, DWORD PTR [r14]
	mov	ecx, DWORD PTR [rdx+rbx*4]
	mov	rdx, QWORD PTR 16[rbp]
	mov	edx, DWORD PTR [rdx+rbx*4]
	lea	esi, [rcx+rdx]
	cmp	eax, esi
	jl	.L58
	cmp	eax, edx
	jge	.L59
.L9:
	lea	rsi, .LC6[rip]
	mov	edi, 1
	call	RFALSE@PLT
.L35:
	lea	rsi, .LC5[rip]
	xor	edi, edi
	call	RFALSE@PLT
	mov	ecx, DWORD PTR 8[rsp]
	cmp	DWORD PTR [rsp], ecx
	jle	.L40
	mov	rax, QWORD PTR 16[rbp]
	sub	rsp, 8
	.cfi_def_cfa_offset 216
	mov	edi, DWORD PTR 4[r14]
	xor	ecx, ecx
	mov	r8d, -1
	mov	edx, r12d
	mov	rsi, rbp
	mov	r11d, DWORD PTR [rax+rbx*4]
	mov	rax, QWORD PTR 8[rbp]
	mov	DWORD PTR 8[rsp], r11d
	mov	r13d, DWORD PTR [rax+rbx*4]
	push	0
	.cfi_def_cfa_offset 224
	lea	rax, 64[rsp]
	mov	QWORD PTR 40[rsp], rax
	push	rax
	.cfi_def_cfa_offset 232
	push	-1
	.cfi_def_cfa_offset 240
	mov	r9d, DWORD PTR [r14]
	call	get_num_ver@PLT
	mov	edi, DWORD PTR 4[r14]
	mov	edx, r12d
	mov	rsi, rbp
	mov	DWORD PTR 36[rsp], eax
	add	rsp, 24
	.cfi_def_cfa_offset 216
	mov	r8d, -1
	push	0
	.cfi_def_cfa_offset 224
	lea	rax, 84[rsp]
	push	rax
	.cfi_def_cfa_offset 232
	push	-1
	.cfi_def_cfa_offset 240
	mov	r11d, DWORD PTR 32[rsp]
	mov	r9d, DWORD PTR [r14]
	mov	ecx, r11d
	mov	DWORD PTR 44[rsp], r11d
	call	get_num_ver@PLT
	mov	r9d, DWORD PTR [r14]
	mov	edi, DWORD PTR 4[r14]
	xor	ecx, ecx
	mov	DWORD PTR 40[rsp], eax
	add	rsp, 24
	.cfi_def_cfa_offset 216
	mov	edx, r12d
	mov	rsi, rbp
	push	0
	.cfi_def_cfa_offset 224
	sub	r9d, r13d
	mov	r8d, -1
	lea	rax, 104[rsp]
	push	rax
	.cfi_def_cfa_offset 232
	push	-1
	.cfi_def_cfa_offset 240
	mov	DWORD PTR 32[rsp], r13d
	call	get_num_ver@PLT
	add	rsp, 24
	.cfi_def_cfa_offset 216
	mov	r9d, DWORD PTR [r14]
	mov	edi, DWORD PTR 4[r14]
	push	0
	.cfi_def_cfa_offset 224
	mov	r8d, -1
	mov	edx, r12d
	mov	rsi, rbp
	mov	r13d, eax
	lea	rcx, 124[rsp]
	mov	QWORD PTR 32[rsp], rcx
	push	rcx
	.cfi_def_cfa_offset 232
	push	-1
	.cfi_def_cfa_offset 240
	mov	r11d, DWORD PTR 44[rsp]
	sub	r9d, DWORD PTR 32[rsp]
	mov	ecx, r11d
	call	get_num_ver@PLT
	mov	r10d, DWORD PTR 40[rsp]
	add	rsp, 32
	.cfi_def_cfa_offset 208
	mov	r11d, eax
	mov	eax, r13d
	cmp	r10d, r13d
	cmovle	eax, r10d
	cmp	r11d, eax
	jl	.L39
	mov	DWORD PTR 12[rsp], 0
.L37:
	cmp	DWORD PTR 4[rsp], r11d
	je	.L60
	cmp	r10d, r13d
	jne	.L1
	mov	esi, r12d
	mov	rdi, rbp
	call	is_left_neighbor_in_cache@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L55:
	test	ebx, ebx
	je	.L61
.L3:
	mov	esi, r12d
	mov	rdi, rbp
	call	get_empty_nodes@PLT
	mov	r15d, eax
	cmp	eax, 129
	jg	.L4
	cmp	eax, 127
	jg	.L1
.L6:
	mov	edi, DWORD PTR 36[rbp]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC3[rip]
	call	reiserfs_panic@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	cmp	eax, 130
	jne	.L6
.L40:
	push	-1
	.cfi_def_cfa_offset 216
	xor	r9d, r9d
	mov	r8d, 1
	xor	ecx, ecx
	push	-1
	.cfi_def_cfa_offset 224
	xor	edx, edx
	mov	esi, r12d
	mov	rdi, rbp
	call	set_parameters@PLT
	pop	r10
	.cfi_def_cfa_offset 216
	mov	r15d, DWORD PTR NO_BALANCING_NEEDED[rip]
	pop	r11
	.cfi_def_cfa_offset 208
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L44:
	mov	r15d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L61:
	mov	edi, DWORD PTR 36[rbp]
	lea	rdx, .LC0[rip]
	lea	rsi, .LC1[rip]
	call	reiserfs_panic@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L7:
	lea	rsi, .LC6[rip]
	xor	edi, edi
	call	RFALSE@PLT
	mov	rdx, QWORD PTR 16[rbp]
	mov	eax, DWORD PTR [r14]
	cmp	DWORD PTR [rdx+rbx*4], eax
	jl	.L12
	cmp	DWORD PTR 24[rbp], -1
	jne	.L12
.L11:
	lea	rsi, .LC5[rip]
	mov	edi, 1
	call	RFALSE@PLT
.L33:
	mov	rdi, rbp
	call	is_leaf_removable@PLT
	test	rax, rax
	jne	.L1
	mov	ecx, DWORD PTR 8[rsp]
	cmp	DWORD PTR [rsp], ecx
	jg	.L62
	mov	eax, DWORD PTR [r14]
	mov	DWORD PTR 32[rbp], eax
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdx, QWORD PTR 8[rbp]
	cmp	eax, DWORD PTR [rdx+rbx*4]
	jg	.L13
	cmp	DWORD PTR 28[rbp], -1
	je	.L11
.L13:
	lea	rsi, .LC5[rip]
	xor	edi, edi
	call	RFALSE@PLT
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L59:
	cmp	eax, ecx
	jl	.L9
	lea	rsi, .LC6[rip]
	xor	edi, edi
	call	RFALSE@PLT
	jmp	.L35
.L39:
	mov	rax, QWORD PTR 16[rbp]
	cmp	DWORD PTR [rax+rbx*4], 1
	je	.L63
.L20:
	lea	rsi, .LC4[rip]
	mov	edi, 1
	mov	DWORD PTR [rsp], r11d
	call	RFALSE@PLT
	mov	r11d, DWORD PTR [rsp]
.L22:
	mov	rdx, QWORD PTR 8[rbp]
	xor	eax, eax
	cmp	DWORD PTR 28[rbp], -1
	mov	r8d, r11d
	setne	al
	mov	esi, r12d
	mov	rdi, rbp
	mov	ecx, DWORD PTR [rdx+rbx*4]
	mov	rdx, QWORD PTR 16[rbp]
	sub	ecx, eax
	mov	edx, DWORD PTR [rdx+rbx*4]
	xor	eax, eax
	cmp	DWORD PTR 24[rbp], -1
	push	-1
	.cfi_def_cfa_offset 216
	setne	al
	push	-1
	.cfi_def_cfa_offset 224
	mov	r9, QWORD PTR 32[rsp]
	sub	edx, eax
	call	set_parameters@PLT
	pop	r8
	.cfi_def_cfa_offset 216
	pop	r9
	.cfi_def_cfa_offset 208
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L62:
	mov	rax, QWORD PTR 16[rbp]
	sub	rsp, 8
	.cfi_def_cfa_offset 216
	mov	edi, DWORD PTR 4[r14]
	xor	r9d, r9d
	mov	r8d, -1
	xor	ecx, ecx
	xor	edx, edx
	mov	rsi, rbp
	mov	eax, DWORD PTR [rax+rbx*4]
	mov	DWORD PTR 16[rsp], eax
	mov	rax, QWORD PTR 8[rbp]
	mov	eax, DWORD PTR [rax+rbx*4]
	mov	DWORD PTR 8[rsp], eax
	push	0
	.cfi_def_cfa_offset 224
	lea	rax, 64[rsp]
	mov	QWORD PTR 40[rsp], rax
	push	rax
	.cfi_def_cfa_offset 232
	push	-1
	.cfi_def_cfa_offset 240
	call	get_num_ver@PLT
	mov	edi, DWORD PTR 4[r14]
	xor	r9d, r9d
	xor	ecx, ecx
	mov	DWORD PTR 36[rsp], eax
	add	rsp, 24
	.cfi_def_cfa_offset 216
	mov	r13d, eax
	xor	edx, edx
	push	1
	.cfi_def_cfa_offset 224
	mov	r8d, -1
	mov	rsi, rbp
	lea	rax, 74[rsp]
	push	rax
	.cfi_def_cfa_offset 232
	push	-1
	.cfi_def_cfa_offset 240
	call	get_num_ver@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 208
	cmp	eax, r13d
	jl	.L15
	mov	DWORD PTR 12[rsp], 0
.L16:
	cmp	DWORD PTR 24[rbp], -1
	mov	edi, DWORD PTR 4[r14]
	je	.L64
	mov	eax, DWORD PTR 8[rsp]
	sub	rsp, 8
	.cfi_def_cfa_offset 216
	xor	r9d, r9d
	mov	r8d, -1
	push	0
	.cfi_def_cfa_offset 224
	lea	ecx, -1[rax]
	lea	rax, 84[rsp]
	push	rax
	.cfi_def_cfa_offset 232
	push	-1
	.cfi_def_cfa_offset 240
.L52:
	xor	edx, edx
	mov	rsi, rbp
	call	get_num_ver@PLT
	mov	r8d, DWORD PTR 24[rbp]
	mov	edi, DWORD PTR 4[r14]
	mov	rsi, rbp
	mov	DWORD PTR 72[rsp], eax
	add	rsp, 32
	.cfi_def_cfa_offset 208
	xor	eax, eax
	mov	ecx, DWORD PTR 8[rsp]
	cmp	r8d, -1
	setne	al
	sub	rsp, 8
	.cfi_def_cfa_offset 216
	xor	r9d, r9d
	xor	edx, edx
	push	1
	.cfi_def_cfa_offset 224
	sub	ecx, eax
	lea	rax, 94[rsp]
	push	rax
	.cfi_def_cfa_offset 232
	push	-1
	.cfi_def_cfa_offset 240
	call	get_num_ver@PLT
	mov	edi, DWORD PTR 4[r14]
	mov	r8d, -1
	mov	rsi, rbp
	mov	DWORD PTR 64[rsp], eax
	add	rsp, 24
	.cfi_def_cfa_offset 216
	xor	eax, eax
	cmp	DWORD PTR 28[rbp], -1
	push	0
	.cfi_def_cfa_offset 224
	setne	al
	xor	ecx, ecx
	lea	rdx, 104[rsp]
	push	rdx
	.cfi_def_cfa_offset 232
	xor	edx, edx
	push	-1
	.cfi_def_cfa_offset 240
	mov	r13d, DWORD PTR 32[rsp]
	mov	r9d, r13d
	sub	r9d, eax
	call	get_num_ver@PLT
	mov	edi, DWORD PTR 4[r14]
	xor	edx, edx
	mov	r9d, r13d
	mov	DWORD PTR 68[rsp], eax
	add	rsp, 24
	.cfi_def_cfa_offset 216
	mov	eax, DWORD PTR 28[rbp]
	mov	rsi, rbp
	push	1
	.cfi_def_cfa_offset 224
	mov	r8d, -1
	cmp	eax, -1
	setne	dl
	lea	rcx, 114[rsp]
	sub	r9d, edx
	xor	edx, edx
	push	rcx
	.cfi_def_cfa_offset 232
	xor	ecx, ecx
	push	rax
	.cfi_def_cfa_offset 240
	mov	DWORD PTR 32[rsp], r13d
	call	get_num_ver@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 208
	mov	r9d, DWORD PTR [rsp]
	mov	r13d, eax
	xor	eax, eax
	cmp	DWORD PTR 28[rbp], -1
	setne	al
	sub	r9d, eax
	cmp	DWORD PTR 24[rbp], -1
	je	.L65
	mov	eax, DWORD PTR 8[rsp]
	sub	rsp, 8
	.cfi_def_cfa_offset 216
	mov	edi, DWORD PTR 4[r14]
	mov	r8d, -1
	push	0
	.cfi_def_cfa_offset 224
	lea	ecx, -1[rax]
	lea	rax, 124[rsp]
	mov	QWORD PTR 32[rsp], rax
	push	rax
	.cfi_def_cfa_offset 232
	push	-1
	.cfi_def_cfa_offset 240
.L53:
	xor	edx, edx
	mov	rsi, rbp
	call	get_num_ver@PLT
	mov	r10d, DWORD PTR 72[rsp]
	add	rsp, 32
	.cfi_def_cfa_offset 208
	mov	r8d, DWORD PTR 24[rbp]
	mov	esi, DWORD PTR 8[rsp]
	mov	edi, DWORD PTR 4[r14]
	mov	DWORD PTR 44[rsp], eax
	mov	eax, DWORD PTR 32[rsp]
	cmp	eax, r10d
	cmovle	r10d, eax
	mov	eax, DWORD PTR 36[rsp]
	cmp	r13d, eax
	mov	DWORD PTR 32[rsp], r10d
	cmovg	r13d, eax
	mov	eax, DWORD PTR 28[rbp]
	xor	edx, edx
	cmp	eax, -1
	setne	dl
	xor	ecx, ecx
	cmp	r8d, -1
	setne	cl
	sub	rsp, 8
	.cfi_def_cfa_offset 216
	push	1
	.cfi_def_cfa_offset 224
	sub	esi, ecx
	mov	ecx, esi
	mov	rsi, rbp
	lea	r14, 134[rsp]
	push	r14
	.cfi_def_cfa_offset 232
	push	rax
	.cfi_def_cfa_offset 240
	mov	r9d, DWORD PTR 32[rsp]
	sub	r9d, edx
	xor	edx, edx
	call	get_num_ver@PLT
	mov	r10d, DWORD PTR 64[rsp]
	mov	r11d, DWORD PTR 76[rsp]
	add	rsp, 32
	.cfi_def_cfa_offset 208
	mov	r8d, eax
	cmp	r13d, r10d
	mov	eax, r10d
	cmovle	eax, r13d
	cmp	r8d, r11d
	jge	.L66
	mov	r11d, r8d
	cmp	r8d, eax
	jge	.L37
	lea	rsi, .LC4[rip]
	xor	edi, edi
	mov	DWORD PTR [rsp], r8d
	call	RFALSE@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	r9, r14
	xor	esi, esi
	mov	rdi, rbp
	mov	ecx, DWORD PTR [rax+rbx*4]
	mov	rax, QWORD PTR 16[rbp]
	mov	edx, DWORD PTR [rax+rbx*4]
	mov	eax, DWORD PTR 28[rbp]
	push	rax
	.cfi_def_cfa_offset 216
	mov	eax, DWORD PTR 24[rbp]
	push	rax
	.cfi_def_cfa_offset 224
	mov	r8d, DWORD PTR 16[rsp]
	call	set_parameters@PLT
	pop	rdx
	.cfi_def_cfa_offset 216
	pop	rcx
	.cfi_def_cfa_offset 208
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	DWORD PTR 4[rsp], eax
	mov	DWORD PTR 12[rsp], 5
	jmp	.L16
.L65:
	sub	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 216
	mov	edi, DWORD PTR 4[r14]
	mov	r8d, -1
	push	0
	.cfi_def_cfa_offset 224
	lea	rax, 124[rsp]
	mov	QWORD PTR 32[rsp], rax
	push	rax
	.cfi_def_cfa_offset 232
	push	-1
	.cfi_def_cfa_offset 240
	mov	ecx, DWORD PTR 40[rsp]
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L66:
	.cfi_restore_state
	cmp	eax, r11d
	jle	.L37
	lea	rsi, .LC4[rip]
	xor	edi, edi
	mov	DWORD PTR [rsp], r11d
	call	RFALSE@PLT
	mov	r11d, DWORD PTR [rsp]
	jmp	.L22
.L58:
	mov	rdi, r13
	call	MAX_NR_KEY@PLT
	mov	rdx, QWORD PTR 16[rbp]
	mov	rdi, r13
	lea	eax, 2[rax+rax]
	sub	eax, DWORD PTR [rdx+rbx*4]
	mov	rdx, QWORD PTR 8[rbp]
	sub	eax, DWORD PTR [rdx+rbx*4]
	add	eax, DWORD PTR [r14]
	add	eax, 1
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR [rsp], eax
	call	MAX_NR_KEY@PLT
	mov	rdx, QWORD PTR 8[rbp]
	mov	ecx, DWORD PTR [rsp]
	mov	rdi, rbp
	add	eax, 1
	xor	r9d, r9d
	xor	r8d, r8d
	mov	esi, r12d
	sub	eax, DWORD PTR [rdx+rbx*4]
	mov	edx, DWORD PTR [r14]
	push	-1
	.cfi_def_cfa_offset 216
	push	-1
	.cfi_def_cfa_offset 224
	sub	ecx, eax
	add	edx, 1
	sub	edx, ecx
	call	set_parameters@PLT
	pop	rbx
	.cfi_def_cfa_offset 216
	pop	rbp
	.cfi_def_cfa_offset 208
	jmp	.L1
.L60:
	movsx	rax, DWORD PTR 12[rsp]
	push	-1
	.cfi_def_cfa_offset 216
	mov	esi, r12d
	mov	rdi, rbp
	push	-1
	.cfi_def_cfa_offset 224
	mov	rcx, QWORD PTR 40[rsp]
	xor	edx, edx
	mov	r8d, DWORD PTR 20[rsp]
	lea	r9, [rcx+rax*2]
	xor	ecx, ecx
	call	set_parameters@PLT
	pop	rsi
	.cfi_def_cfa_offset 216
	pop	rdi
	.cfi_def_cfa_offset 208
	jmp	.L1
.L63:
	mov	rax, QWORD PTR 8[rbp]
	cmp	DWORD PTR [rax+rbx*4], 1
	jne	.L20
	cmp	r11d, 1
	jne	.L20
	cmp	r13d, 2
	jne	.L20
	cmp	r10d, 2
	lea	rsi, .LC4[rip]
	setne	dil
	cmp	r12d, 1
	setne	al
	or	edi, eax
	movzx	edi, dil
	call	RFALSE@PLT
	mov	r11d, 1
	jmp	.L22
.L57:
	call	__stack_chk_fail@PLT
.L64:
	push	rax
	.cfi_def_cfa_offset 216
	xor	r9d, r9d
	or	r8d, -1
	push	0
	.cfi_def_cfa_offset 224
	lea	rax, 84[rsp]
	push	rax
	.cfi_def_cfa_offset 232
	push	-1
	.cfi_def_cfa_offset 240
	mov	ecx, DWORD PTR 40[rsp]
	jmp	.L52
	.cfi_endproc
.LFE0:
	.size	ip_check_balance, .-ip_check_balance
	.comm	SET_PAR_SHIFT_RIGHT,4,4
	.comm	SET_PAR_SHIFT_LEFT,4,4
	.comm	RIGHT_SHIFT_NO_FLOW,4,4
	.comm	RIGHT_SHIFT_FLOW,4,4
	.comm	NO_FLOW,4,4
	.comm	NO_BALANCING_NEEDED,4,4
	.comm	NOTHING_SHIFT_NO_FLOW,4,4
	.comm	NOTHING_SHIFT_FLOW,4,4
	.comm	LR_SHIFT_NO_FLOW,4,4
	.comm	LR_SHIFT_FLOW,4,4
	.comm	LEFT_SHIFT_NO_FLOW,4,4
	.comm	LEFT_SHIFT_FLOW,4,4
	.comm	FLOW,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_fix_node.c_ip_check_balance.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"S[0] can not be 0\000"
	.align	2
.LC1:
	.ascii	"vs-8210\000"
	.align	2
.LC2:
	.ascii	"incorrect return value of get_empty_nodes\000"
	.align	2
.LC3:
	.ascii	"vs-8215\000"
	.align	2
.LC4:
	.ascii	"vs-8230: bad h\000"
	.align	2
.LC5:
	.ascii	"vs-8225: tree is not balanced on leaf level\000"
	.align	2
.LC6:
	.ascii	"vs-8220: tree is not balanced on internal level\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ip_check_balance, %function
ip_check_balance:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	mov	r5, r1
	ldr	r3, .L65
	sub	sp, sp, #140
	mov	r2, #80
	mov	r1, #0
	add	r0, sp, #52
	ldr	r3, [r3]
	str	r3, [sp, #132]
	mov	r3,#0
	ldr	r9, [r4, #32]
	bl	memset
	mov	r1, r5
	ldr	r0, [r4, #28]
	bl	PATH_H_PBUFFER
	ldr	r3, [r4]
	subs	r6, r0, #0
	ldr	r7, [r3, r5, lsl #2]
	beq	.L56
.L2:
	mov	r1, r5
	mov	r0, r4
	bl	get_parents
	cmp	r0, #130
	mov	fp, r0
	beq	.L57
.L1:
	ldr	r3, .L65
	ldr	r2, [r3]
	ldr	r3, [sp, #132]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L58
	mov	r0, fp
	add	sp, sp, #140
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L57:
	mov	r0, r6
	bl	B_FREE_SPACE
	mov	r10, r0
	mov	r1, r5
	mov	r0, r4
	str	r10, [sp, #28]
	bl	get_rfree
	mov	r1, r5
	mov	r8, r0
	mov	r0, r4
	bl	get_lfree
	mov	r10, r0
	mov	r3, r8
	ldr	r0, [r9, #4]
	mov	r1, r10
	stm	sp, {r4, r5}
	ldr	r2, [sp, #28]
	bl	can_node_be_removed
	ldr	r3, .L65+4
	ldr	r3, [r3]
	cmp	r0, r3
	moveq	fp, r0
	beq	.L1
	mov	r1, r5
	mov	r0, r4
	bl	create_virtual_node
	mov	r2, r10
	mov	r1, r5
	mov	r0, r4
	bl	check_left
	mov	r2, r8
	mov	r1, r5
	mov	r0, r4
	bl	check_right
	cmp	r5, #0
	beq	.L7
	ldmib	r4, {r2, r3}
	ldr	r1, [r2, r5, lsl #2]
	ldr	r2, [r3, r5, lsl #2]
	ldr	r3, [r9]
	add	r0, r1, r2
	cmp	r3, r0
	blt	.L59
	cmp	r3, r2
	bge	.L60
.L9:
	mov	r0, #1
	ldr	r1, .L65+8
	bl	RFALSE
.L33:
	mov	r0, #0
	ldr	r1, .L65+12
	bl	RFALSE
	ldr	r3, [sp, #28]
	cmp	r7, r3
	ble	.L38
	mvn	r8, #0
	mov	r6, #0
	ldr	r3, [r4, #4]
	ldr	r2, [r4, #8]
	ldr	r7, [r3, r5, lsl #2]
	add	r3, sp, #52
	ldr	r10, [r2, r5, lsl #2]
	ldr	r0, [r9, #4]
	str	r8, [sp, #8]
	str	r6, [sp, #16]
	str	r3, [sp, #12]
	ldr	r3, [r9]
	mov	r2, r5
	mov	r1, r4
	str	r3, [sp, #4]
	str	r8, [sp]
	mov	r3, r6
	bl	get_num_ver
	mov	ip, r0
	add	r3, sp, #72
	ldr	r0, [r9, #4]
	str	r8, [sp, #8]
	str	r6, [sp, #16]
	str	r3, [sp, #12]
	ldr	r3, [r9]
	mov	r2, r5
	mov	r1, r4
	str	r3, [sp, #4]
	str	r8, [sp]
	mov	r3, r10
	str	ip, [sp, #40]
	bl	get_num_ver
	mov	ip, r0
	add	r3, sp, #92
	ldr	r0, [r9, #4]
	str	r8, [sp, #8]
	str	r6, [sp, #16]
	str	r3, [sp, #12]
	ldr	r3, [r9]
	mov	r2, r5
	sub	r3, r3, r7
	mov	r1, r4
	str	r3, [sp, #4]
	str	r8, [sp]
	mov	r3, r6
	str	ip, [sp, #28]
	bl	get_num_ver
	add	r2, sp, #112
	ldr	r1, [r9, #4]
	str	r8, [sp, #8]
	str	r6, [sp, #16]
	str	r2, [sp, #12]
	str	r2, [sp, #44]
	ldr	r2, [r9]
	mov	r3, r10
	sub	r9, r2, r7
	mov	r7, r0
	stm	sp, {r8, r9}
	mov	r0, r1
	mov	r2, r5
	mov	r1, r4
	bl	get_num_ver
	ldr	r3, [sp, #28]
	mov	r8, r0
	cmp	r7, r3
	movlt	r3, r7
	cmp	r3, r0
	bgt	.L37
.L35:
	ldr	r3, [sp, #40]
	cmp	r3, r8
	beq	.L61
	ldr	r3, [sp, #28]
	cmp	r3, r7
	bne	.L1
	mov	r1, r5
	mov	r0, r4
	bl	is_left_neighbor_in_cache
	b	.L1
.L56:
	cmp	r5, #0
	beq	.L62
.L3:
	mov	r1, r5
	mov	r0, r4
	bl	get_empty_nodes
	cmp	r0, #129
	mov	fp, r0
	bgt	.L4
	cmp	r0, #127
	bgt	.L1
.L6:
	ldr	r2, .L65+16
	ldr	r1, .L65+20
	ldr	r0, [r4, #24]
	bl	reiserfs_panic
	b	.L2
.L4:
	cmp	r0, #130
	bne	.L6
.L38:
	mov	r3, #0
	mvn	r2, #0
	mov	ip, #1
	str	r2, [sp, #12]
	str	r2, [sp, #8]
	str	r3, [sp, #4]
	mov	r2, r3
	mov	r1, r5
	mov	r0, r4
	str	ip, [sp]
	bl	set_parameters
	ldr	r3, .L65+4
	ldr	fp, [r3]
	b	.L1
.L62:
	ldr	r2, .L65+24
	ldr	r1, .L65+28
	ldr	r0, [r4, #24]
	bl	reiserfs_panic
	b	.L3
.L7:
	mov	r0, r5
	ldr	r1, .L65+8
	bl	RFALSE
	ldr	r2, [r4, #8]
	ldr	r3, [r9]
	ldr	r2, [r2]
	cmp	r2, r3
	blt	.L12
	ldr	r2, [r4, #12]
	cmn	r2, #1
	bne	.L12
.L11:
	mov	r0, #1
	ldr	r1, .L65+12
	bl	RFALSE
.L31:
	mov	r0, r4
	bl	is_leaf_removable
	subs	r6, r0, #0
	bne	.L1
	ldr	r3, [sp, #28]
	cmp	r7, r3
	bgt	.L63
	ldr	r3, [r9]
	str	r3, [r4, #20]
	b	.L38
.L12:
	ldr	r2, [r4, #4]
	ldr	r2, [r2]
	cmp	r3, r2
	bgt	.L13
	ldr	r3, [r4, #16]
	cmn	r3, #1
	beq	.L11
.L13:
	ldr	r1, .L65+12
	mov	r0, #0
	bl	RFALSE
	b	.L31
.L60:
	cmp	r3, r1
	blt	.L9
	ldr	r1, .L65+8
	mov	r0, #0
	bl	RFALSE
	b	.L33
.L37:
	ldr	r3, [r4, #8]
	ldr	r0, [r3, r5, lsl #2]
	cmp	r0, #1
	beq	.L64
	mov	r0, #1
	ldr	r1, .L65+32
	bl	RFALSE
.L22:
	ldmib	r4, {r0, r1}
	ldr	r3, [r4, #16]
	ldr	r2, [r4, #12]
	adds	r3, r3, #1
	movne	r3, #1
	adds	r2, r2, #1
	movne	r2, #1
	mvn	ip, #0
	ldr	r1, [r1, r5, lsl #2]
	ldr	r0, [r0, r5, lsl #2]
	sub	r2, r1, r2
	ldr	r1, [sp, #44]
	sub	r3, r0, r3
	str	r1, [sp, #4]
	mov	r0, r4
	mov	r1, r5
	str	r8, [sp]
	str	ip, [sp, #12]
	str	ip, [sp, #8]
	bl	set_parameters
	b	.L1
.L63:
	mvn	r7, #0
	ldr	r3, [r4, #4]
	ldr	r2, [r4, #8]
	ldr	r3, [r3]
	ldr	r2, [r2]
	str	r3, [sp, #36]
	add	r3, sp, #52
	ldr	r0, [r9, #4]
	mov	r1, r4
	str	r2, [sp, #32]
	str	r7, [sp, #8]
	mov	r2, r6
	str	r7, [sp]
	str	r6, [sp, #16]
	str	r3, [sp, #12]
	str	r6, [sp, #4]
	mov	r3, r6
	bl	get_num_ver
	mov	r2, #1
	mov	ip, r0
	add	r3, sp, #62
	ldr	r0, [r9, #4]
	mov	r1, r4
	str	r7, [sp, #8]
	str	r7, [sp]
	str	r6, [sp, #4]
	str	r2, [sp, #16]
	str	r3, [sp, #12]
	mov	r2, r6
	mov	r3, r6
	mov	r7, ip
	str	ip, [sp, #40]
	bl	get_num_ver
	mov	r10, #0
	mvn	r8, #0
	ldr	r3, [r4, #12]
	cmp	r0, r7
	strlt	r0, [sp, #40]
	movlt	r6, #5
	cmn	r3, #1
	ldr	r3, [sp, #32]
	add	r1, sp, #72
	ldr	r0, [r9, #4]
	mov	r2, r10
	subne	r3, r3, #1
	str	r10, [sp, #16]
	str	r10, [sp, #4]
	str	r8, [sp, #8]
	str	r8, [sp]
	str	r1, [sp, #12]
	mov	r1, r4
	bl	get_num_ver
	ldr	r2, [r4, #12]
	ldr	lr, [sp, #32]
	subs	r3, r2, r8
	movne	r3, #1
	sub	r3, lr, r3
	mov	lr, #1
	mov	ip, r0
	add	r1, sp, #82
	ldr	r0, [r9, #4]
	str	lr, [sp, #16]
	str	r2, [sp]
	str	r8, [sp, #8]
	mov	r2, r10
	str	r10, [sp, #4]
	str	r1, [sp, #12]
	mov	r1, r4
	mov	r7, ip
	bl	get_num_ver
	ldr	r3, [r4, #16]
	cmp	r0, r7
	movlt	r2, r0
	movge	r2, r7
	subs	r3, r3, r8
	movne	r3, #1
	str	r2, [sp, #28]
	ldr	r2, [sp, #36]
	add	r1, sp, #92
	sub	r3, r2, r3
	ldr	r0, [r9, #4]
	mov	r2, r10
	str	r3, [sp, #4]
	str	r10, [sp, #16]
	mov	r3, r10
	str	r8, [sp, #8]
	str	r8, [sp]
	str	r1, [sp, #12]
	mov	r1, r4
	bl	get_num_ver
	ldr	r2, [r4, #16]
	mov	lr, #1
	subs	r3, r2, r8
	movne	r3, #1
	ldr	r1, [sp, #36]
	mov	r7, r0
	sub	r3, r1, r3
	add	r1, sp, #102
	ldr	r0, [r9, #4]
	str	lr, [sp, #16]
	str	r8, [sp]
	str	r2, [sp, #8]
	str	r3, [sp, #4]
	mov	r2, r10
	mov	r3, r10
	str	r1, [sp, #12]
	mov	r1, r4
	bl	get_num_ver
	ldr	r3, [r4, #12]
	cmp	r0, r7
	ldr	r2, [r4, #16]
	movlt	r7, r0
	cmp	r3, r8
	ldr	r3, [sp, #32]
	mov	r10, #0
	subne	r3, r3, #1
	adds	r2, r2, #1
	movne	r2, #1
	mvn	r1, #0
	ldr	ip, [sp, #36]
	add	lr, sp, #112
	sub	r2, ip, r2
	ldr	r0, [r9, #4]
	str	r2, [sp, #4]
	str	r1, [sp, #8]
	mov	r2, r10
	str	r1, [sp]
	str	lr, [sp, #12]
	mov	r1, r4
	str	r10, [sp, #16]
	str	lr, [sp, #44]
	bl	get_num_ver
	ldr	lr, [r4, #16]
	ldr	ip, [r4, #12]
	adds	r2, lr, #1
	movne	r2, #1
	mov	r1, #1
	adds	r3, ip, #1
	movne	r3, #1
	mov	r8, r0
	ldr	r0, [r9, #4]
	ldr	r9, [sp, #36]
	str	r1, [sp, #16]
	sub	r2, r9, r2
	stmib	sp, {r2, lr}
	ldr	r2, [sp, #32]
	add	r1, sp, #122
	sub	r3, r2, r3
	str	r1, [sp, #12]
	mov	r2, r10
	mov	r1, r4
	str	ip, [sp]
	bl	get_num_ver
	mov	r9, r8
	ldr	r3, [sp, #28]
	mov	r8, r0
	cmp	r7, r3
	movlt	r3, r7
	cmp	r0, r9
	blt	.L18
	cmp	r9, r3
	movge	r8, r9
	bge	.L35
	mov	r0, r10
	ldr	r1, .L65+32
	mov	r8, r9
	bl	RFALSE
	b	.L22
.L18:
	cmp	r0, r3
	bge	.L35
	mov	r0, r10
	ldr	r1, .L65+32
	bl	RFALSE
	ldr	r3, [r4, #4]
	ldr	r2, [r4, #8]
	add	r0, sp, #122
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	ip, [r4, #16]
	str	r0, [sp, #4]
	ldr	r0, [r4, #12]
	mov	r1, r10
	str	r0, [sp, #8]
	str	r8, [sp]
	mov	r0, r4
	str	ip, [sp, #12]
	bl	set_parameters
	b	.L1
.L59:
	mov	r0, r6
	bl	MAX_NR_KEY
	ldmib	r4, {r1, r2}
	lsl	r3, r0, #1
	ldr	r2, [r2, r5, lsl #2]
	ldr	r1, [r1, r5, lsl #2]
	add	r3, r3, #2
	sub	r3, r3, r2
	ldr	r2, [r9]
	sub	r3, r3, r1
	add	r3, r3, r2
	add	r3, r3, #1
	add	r3, r3, r3, lsr #31
	mov	r0, r6
	asr	r6, r3, #1
	bl	MAX_NR_KEY
	mvn	lr, #0
	mov	ip, #0
	ldr	r3, [r4, #4]
	ldr	r2, [r9]
	ldr	r3, [r3, r5, lsl #2]
	add	r1, r0, #1
	sub	r1, r1, r3
	sub	r3, r6, r1
	add	r2, r2, #1
	mov	r1, r5
	mov	r0, r4
	stmib	sp, {ip, lr}
	sub	r2, r2, r3
	str	lr, [sp, #12]
	str	ip, [sp]
	bl	set_parameters
	b	.L1
.L61:
	mvn	r2, #0
	mov	r3, #0
	add	r1, sp, #52
	add	r6, r1, r6, lsl #1
	ldr	r1, [sp, #40]
	str	r2, [sp, #12]
	str	r1, [sp]
	str	r2, [sp, #8]
	mov	r1, r5
	mov	r0, r4
	mov	r2, r3
	str	r6, [sp, #4]
	bl	set_parameters
	b	.L1
.L64:
	ldr	r3, [r4, #4]
	ldr	r3, [r3, r5, lsl #2]
	cmp	r3, #1
	beq	.L21
.L54:
	ldr	r1, .L65+32
	bl	RFALSE
	b	.L22
.L21:
	cmp	r7, #2
	cmpeq	r8, #1
	movne	r0, r3
	bne	.L54
.L23:
	ldr	r2, [sp, #28]
	ldr	r1, .L65+32
	cmp	r5, #1
	cmpeq	r2, #2
	movne	r0, #1
	moveq	r0, #0
	mov	r8, r3
	bl	RFALSE
	b	.L22
.L58:
	bl	__stack_chk_fail
.L66:
	.align	2
.L65:
	.word	.LC7
	.word	NO_BALANCING_NEEDED
	.word	.LC6
	.word	.LC5
	.word	.LC2
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC4
	.size	ip_check_balance, .-ip_check_balance
	.comm	SET_PAR_SHIFT_RIGHT,4,4
	.comm	SET_PAR_SHIFT_LEFT,4,4
	.comm	RIGHT_SHIFT_NO_FLOW,4,4
	.comm	RIGHT_SHIFT_FLOW,4,4
	.comm	NO_FLOW,4,4
	.comm	NO_BALANCING_NEEDED,4,4
	.comm	NOTHING_SHIFT_NO_FLOW,4,4
	.comm	NOTHING_SHIFT_FLOW,4,4
	.comm	LR_SHIFT_NO_FLOW,4,4
	.comm	LR_SHIFT_FLOW,4,4
	.comm	LEFT_SHIFT_NO_FLOW,4,4
	.comm	LEFT_SHIFT_FLOW,4,4
	.comm	FLOW,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
