	.file	"extr_brec.c_hfs_bnode_split.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"split_nodes: %d - %d - %d\n"
	.text
	.p2align 4
	.type	hfs_bnode_split, @function
hfs_bnode_split:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	rbx, QWORD PTR 24[rdi]
	mov	rbp, QWORD PTR 16[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	mov	rdi, rbx
	call	hfs_bmap_alloc@PLT
	mov	rdi, rax
	mov	r15, rax
	call	IS_ERR@PLT
	test	rax, rax
	je	.L25
.L1:
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L26
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r15
	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
.L25:
	.cfi_restore_state
	mov	rdi, rbp
	call	hfs_bnode_get@PLT
	mov	r8, QWORD PTR 8[rbp]
	mov	rcx, QWORD PTR [r15]
	lea	rsi, .LC0[rip]
	mov	rdx, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR BNODE_MOD[rip]
	call	hfs_dbg@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	rsi, QWORD PTR 8[rbp]
	mov	QWORD PTR 8[rsp], 0
	mov	QWORD PTR 16[r15], rax
	mov	eax, DWORD PTR 36[rbp]
	mov	QWORD PTR 8[r15], rsi
	mov	DWORD PTR 36[r15], eax
	mov	eax, DWORD PTR 32[rbp]
	mov	DWORD PTR 32[r15], eax
	mov	eax, DWORD PTR 28[rbp]
	mov	DWORD PTR 28[r15], eax
	test	rsi, rsi
	jne	.L27
.L3:
	mov	rdi, QWORD PTR 8[rsp]
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L28
	mov	r8d, DWORD PTR [rbx]
	mov	eax, DWORD PTR 24[rbp]
	mov	r14d, 1
	mov	r13d, r8d
	add	eax, eax
	shr	r13d, 31
	add	r13d, r8d
	sar	r13d
	sub	r13d, eax
	lea	eax, -14[r13]
	lea	r13d, -4[r8]
	mov	DWORD PTR 16[rsp], eax
.L6:
	mov	esi, r13d
	mov	rdi, rbp
	call	hfs_bnode_read_u16@PLT
	mov	ecx, eax
	cmp	DWORD PTR 16[rsp], eax
	jl	.L5
	sub	r13d, 2
	add	r14d, 1
	cmp	DWORD PTR 24[rbp], r14d
	jg	.L6
	mov	rdi, rbp
	call	hfs_bnode_put@PLT
	mov	rdi, r15
	call	hfs_bnode_put@PLT
	mov	rax, QWORD PTR 8[rsp]
	test	rax, rax
	je	.L7
	mov	rdi, rax
	call	hfs_bnode_put@PLT
.L7:
	mov	edi, DWORD PTR ENOSPC[rip]
	neg	edi
	call	ERR_PTR@PLT
	mov	r15, rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L27:
	mov	rdi, rbx
	call	hfs_bnode_find@PLT
	mov	QWORD PTR 8[rsp], rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L28:
	mov	rdi, rbp
	call	hfs_bnode_put@PLT
	mov	rdi, r15
	call	hfs_bnode_put@PLT
	mov	r15, QWORD PTR 8[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	eax, DWORD PTR [r12]
	add	eax, 1
	cmp	eax, r14d
	jge	.L8
	add	r13d, 2
	mov	rdi, rbp
	sub	r14d, 1
	mov	esi, r13d
	call	hfs_bnode_read_u16@PLT
	mov	ecx, eax
	lea	eax, -14[rax]
	mov	DWORD PTR 20[rsp], eax
.L9:
	mov	eax, DWORD PTR 24[rbp]
	sub	eax, r14d
	mov	DWORD PTR 24[r15], eax
	mov	eax, DWORD PTR [rbx]
	mov	DWORD PTR 24[rbp], r14d
	lea	r12d, -2[rax]
	mov	DWORD PTR 28[rsp], eax
	mov	eax, DWORD PTR 24[r15]
	mov	esi, r12d
	mov	DWORD PTR 24[rsp], eax
	test	eax, eax
	je	.L16
	add	eax, eax
	mov	r14d, r13d
	mov	edx, 14
	sub	r12d, r13d
	sub	r14d, eax
	.p2align 4,,10
	.p2align 3
.L11:
	lea	esi, [r12+r13]
	mov	rdi, r15
	sub	r13d, 2
	mov	DWORD PTR 16[rsp], ecx
	call	hfs_bnode_write_u16@PLT
	mov	esi, r13d
	mov	rdi, rbp
	call	hfs_bnode_read_u16@PLT
	mov	ecx, DWORD PTR 16[rsp]
	mov	edx, eax
	sub	edx, DWORD PTR 20[rsp]
	cmp	r13d, r14d
	jne	.L11
	mov	r14d, DWORD PTR 24[rsp]
	sub	eax, ecx
	mov	esi, DWORD PTR 28[rsp]
	mov	DWORD PTR 24[rsp], eax
	sub	r14d, 1
	neg	r14d
	lea	esi, -4[rsi+r14*2]
.L10:
	mov	rdi, r15
	mov	DWORD PTR 16[rsp], ecx
	lea	r12, 32[rsp]
	call	hfs_bnode_write_u16@PLT
	mov	r8d, DWORD PTR 24[rsp]
	mov	rdx, rbp
	mov	rdi, r15
	mov	ecx, DWORD PTR 16[rsp]
	mov	esi, 14
	call	hfs_bnode_copy@PLT
	mov	rdi, QWORD PTR 8[r15]
	call	cpu_to_be32@PLT
	mov	rdi, QWORD PTR 16[r15]
	mov	QWORD PTR 48[rsp], rax
	call	cpu_to_be32@PLT
	mov	edi, DWORD PTR 24[r15]
	mov	QWORD PTR 32[rsp], rax
	mov	eax, DWORD PTR 32[r15]
	mov	DWORD PTR 68[rsp], eax
	mov	eax, DWORD PTR 28[r15]
	mov	DWORD PTR 64[rsp], eax
	call	cpu_to_be16@PLT
	mov	ecx, 40
	xor	edx, edx
	mov	rsi, r12
	mov	rdi, r15
	mov	QWORD PTR 40[rsp], rax
	mov	QWORD PTR 56[rsp], 0
	call	hfs_bnode_write@PLT
	mov	rax, QWORD PTR [r15]
	mov	ecx, 40
	xor	edx, edx
	mov	rsi, r12
	mov	rdi, rbp
	mov	QWORD PTR 8[rbp], rax
	call	hfs_bnode_read@PLT
	mov	rdi, QWORD PTR 8[rbp]
	call	cpu_to_be32@PLT
	mov	edi, DWORD PTR 24[rbp]
	mov	QWORD PTR 48[rsp], rax
	call	cpu_to_be16@PLT
	xor	edx, edx
	mov	ecx, 40
	mov	rsi, r12
	mov	rdi, rbp
	mov	QWORD PTR 40[rsp], rax
	call	hfs_bnode_write@PLT
	mov	rdx, QWORD PTR 8[rsp]
	test	rdx, rdx
	je	.L12
	mov	rax, QWORD PTR [r15]
	mov	rbx, rdx
	mov	ecx, 40
	mov	rsi, r12
	mov	rdi, rbx
	mov	QWORD PTR 16[rdx], rax
	xor	edx, edx
	call	hfs_bnode_read@PLT
	mov	rdi, QWORD PTR 16[rbx]
	call	cpu_to_be32@PLT
	mov	rdi, rbx
	mov	ecx, 40
	xor	edx, edx
	mov	rsi, r12
	mov	QWORD PTR 32[rsp], rax
	call	hfs_bnode_write@PLT
	mov	rdi, rbx
	call	hfs_bnode_put@PLT
.L13:
	mov	rdi, rbp
	call	hfs_bnode_dump@PLT
	mov	rdi, r15
	call	hfs_bnode_dump@PLT
	mov	rdi, rbp
	call	hfs_bnode_put@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, rbp
	mov	DWORD PTR 16[rsp], ecx
	call	hfs_bnode_put@PLT
	mov	rdi, r15
	call	hfs_bnode_get@PLT
	mov	ecx, DWORD PTR 16[rsp]
	sub	DWORD PTR [r12], r14d
	mov	QWORD PTR 16[r12], r15
	lea	eax, -14[rcx]
	sub	DWORD PTR 4[r12], eax
	sub	DWORD PTR 8[r12], eax
	mov	DWORD PTR 20[rsp], eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rax, QWORD PTR 8[rbx]
	cmp	QWORD PTR 0[rbp], rax
	jne	.L13
	mov	rax, QWORD PTR [r15]
	mov	edi, DWORD PTR 16[rbx]
	mov	QWORD PTR 8[rbx], rax
	call	mark_inode_dirty@PLT
	jmp	.L13
.L16:
	mov	edx, 14
	jmp	.L10
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	hfs_bnode_split, .-hfs_bnode_split
	.comm	ENOSPC,4,4
	.comm	BNODE_MOD,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_brec.c_hfs_bnode_split.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"split_nodes: %d - %d - %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hfs_bnode_split, %function
hfs_bnode_split:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	fp, r0
	ldr	r9, [r0, #16]
	ldr	r3, .L28
	sub	sp, sp, #60
	mov	r0, r9
	ldr	r3, [r3]
	str	r3, [sp, #52]
	mov	r3,#0
	ldr	r5, [fp, #12]
	bl	hfs_bmap_alloc
	mov	r4, r0
	bl	IS_ERR
	cmp	r0, #0
	beq	.L24
.L1:
	ldr	r3, .L28
	ldr	r2, [r3]
	ldr	r3, [sp, #52]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	mov	r0, r4
	add	sp, sp, #60
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L24:
	mov	r0, r5
	bl	hfs_bnode_get
	ldr	r1, [r5, #4]
	ldr	r0, .L28+4
	ldr	r3, [r4]
	ldr	r2, [r5]
	ldr	r0, [r0]
	str	r1, [sp]
	ldr	r1, .L28+8
	bl	hfs_dbg
	ldr	r7, [r5, #4]
	ldr	ip, [r5]
	ldr	r0, [r5, #24]
	ldr	r2, [r5, #20]
	ldr	r3, [r5, #16]
	cmp	r7, #0
	stmib	r4, {r7, ip}
	str	r0, [r4, #24]
	str	r2, [r4, #20]
	str	r3, [r4, #16]
	bne	.L26
.L3:
	mov	r0, r7
	bl	IS_ERR
	cmp	r0, #0
	bne	.L27
	mov	r6, #1
	ldr	r1, [r9]
	ldr	r10, [r5, #12]
	add	r3, r1, r1, lsr #31
	sub	r1, r1, #4
	mov	r8, r1
	lsl	r10, r10, r6
	rsb	r10, r10, r3, asr r6
	sub	r10, r10, #14
.L6:
	mov	r1, r8
	mov	r0, r5
	bl	hfs_bnode_read_u16
	cmp	r10, r0
	blt	.L5
	ldr	r3, [r5, #12]
	add	r6, r6, #1
	cmp	r3, r6
	sub	r8, r8, #2
	bgt	.L6
	mov	r0, r5
	bl	hfs_bnode_put
	mov	r0, r4
	bl	hfs_bnode_put
	cmp	r7, #0
	beq	.L7
	mov	r0, r7
	bl	hfs_bnode_put
.L7:
	ldr	r3, .L28+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bl	ERR_PTR
	mov	r4, r0
	b	.L1
.L26:
	mov	r1, r7
	mov	r0, r9
	bl	hfs_bnode_find
	mov	r7, r0
	b	.L3
.L27:
	mov	r0, r5
	bl	hfs_bnode_put
	mov	r0, r4
	bl	hfs_bnode_put
	mov	r4, r7
	b	.L1
.L5:
	ldr	r3, [fp]
	mov	r1, r8
	add	r3, r3, #1
	cmp	r3, r6
	mov	r8, r0
	bge	.L8
	add	r1, r1, #2
	mov	r0, r5
	str	r1, [sp, #12]
	bl	hfs_bnode_read_u16
	mov	r8, r0
	ldr	r1, [sp, #12]
	sub	r6, r6, #1
	sub	r10, r0, #14
.L9:
	ldr	r3, [r5, #12]
	ldr	r2, [r9]
	sub	r3, r3, r6
	str	r3, [r4, #12]
	str	r6, [r5, #12]
	ldr	r0, [r4, #12]
	mov	r3, r2
	cmp	r0, #0
	str	r2, [sp, #16]
	sub	r6, r2, #2
	str	r0, [sp, #12]
	mov	r2, #14
	beq	.L10
	sub	r3, r1, r3
	str	r7, [sp, #20]
	mov	r7, r4
	mov	r4, r3
	sub	fp, r6, r0, lsl #1
.L11:
	mov	r1, r6
	mov	r0, r7
	bl	hfs_bnode_write_u16
	add	r1, r4, r6
	mov	r0, r5
	bl	hfs_bnode_read_u16
	sub	r6, r6, #2
	cmp	r6, fp
	sub	r2, r0, r10
	bne	.L11
	ldr	r3, [sp, #12]
	mov	r4, r7
	rsb	r1, r3, #1
	ldr	r3, [sp, #16]
	ldr	r7, [sp, #20]
	sub	r3, r3, #4
	add	r6, r3, r1, lsl #1
	sub	r3, r0, r8
	str	r3, [sp, #12]
.L10:
	mov	r1, r6
	mov	r0, r4
	bl	hfs_bnode_write_u16
	ldr	r3, [sp, #12]
	mov	r2, r5
	mov	r1, #14
	str	r3, [sp]
	mov	r0, r4
	mov	r3, r8
	bl	hfs_bnode_copy
	ldr	r0, [r4, #4]
	bl	cpu_to_be32
	mov	r3, r0
	ldr	r0, [r4, #8]
	str	r3, [sp, #36]
	bl	cpu_to_be32
	mov	r1, r0
	ldr	r3, [r4, #16]
	ldr	r2, [r4, #20]
	ldr	r0, [r4, #12]
	str	r1, [sp, #28]
	str	r2, [sp, #48]
	str	r3, [sp, #44]
	bl	cpu_to_be16
	mov	r6, #0
	mov	ip, r0
	mov	r2, r6
	mov	r3, #24
	add	r1, sp, #28
	mov	r0, r4
	str	ip, [sp, #32]
	str	r6, [sp, #40]
	bl	hfs_bnode_write
	ldr	r3, [r4]
	mov	r2, r6
	add	r1, sp, #28
	str	r3, [r5, #4]
	mov	r0, r5
	mov	r3, #24
	bl	hfs_bnode_read
	ldr	r0, [r5, #4]
	bl	cpu_to_be32
	mov	r3, r0
	ldr	r0, [r5, #12]
	str	r3, [sp, #36]
	bl	cpu_to_be16
	mov	ip, r0
	mov	r2, r6
	mov	r3, #24
	mov	r0, r5
	add	r1, sp, #28
	str	ip, [sp, #32]
	bl	hfs_bnode_write
	cmp	r7, r6
	beq	.L12
	ldr	r2, [r4]
	mov	r3, #24
	add	r1, sp, #28
	str	r2, [r7, #8]
	mov	r0, r7
	mov	r2, r6
	bl	hfs_bnode_read
	ldr	r0, [r7, #8]
	bl	cpu_to_be32
	mov	ip, r0
	mov	r2, r6
	mov	r3, #24
	mov	r0, r7
	add	r1, sp, #28
	str	ip, [sp, #28]
	bl	hfs_bnode_write
	mov	r0, r7
	bl	hfs_bnode_put
.L13:
	mov	r0, r5
	bl	hfs_bnode_dump
	mov	r0, r4
	bl	hfs_bnode_dump
	mov	r0, r5
	bl	hfs_bnode_put
	b	.L1
.L8:
	mov	r0, r5
	str	r1, [sp, #12]
	sub	r10, r8, #14
	bl	hfs_bnode_put
	mov	r0, r4
	bl	hfs_bnode_get
	ldm	fp, {r0, r2, r3}
	sub	r0, r0, r6
	sub	r2, r2, r10
	sub	r3, r3, r10
	stmib	fp, {r2, r3}
	ldr	r1, [sp, #12]
	str	r4, [fp, #12]
	str	r0, [fp]
	b	.L9
.L12:
	ldr	r2, [r5]
	ldr	r3, [r9, #4]
	cmp	r2, r3
	bne	.L13
	ldr	r3, [r4]
	ldr	r0, [r9, #8]
	str	r3, [r9, #4]
	bl	mark_inode_dirty
	b	.L13
.L25:
	bl	__stack_chk_fail
.L29:
	.align	2
.L28:
	.word	.LC1
	.word	BNODE_MOD
	.word	.LC0
	.word	ENOSPC
	.size	hfs_bnode_split, .-hfs_bnode_split
	.comm	ENOSPC,4,4
	.comm	BNODE_MOD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
