	.file	"extr_catalog.c_hfs_cat_move.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"rename_cat: %u - %lu,%s - %lu,%s\n"
	.text
	.p2align 4
	.globl	hfs_cat_move
	.type	hfs_cat_move, @function
hfs_cat_move:
.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	r14d, edi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	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	rbx, r8
	sub	rsp, 112
	.cfi_def_cfa_offset 168
	mov	QWORD PTR 16[rsp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 96[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [r8]
	push	rax
	.cfi_def_cfa_offset 176
	mov	r8d, DWORD PTR [rdx]
	mov	edx, edi
	mov	r9d, DWORD PTR [rcx]
	mov	edi, DWORD PTR DBG_CAT_MOD[rip]
	mov	ecx, DWORD PTR [rsi]
	lea	rsi, .LC0[rip]
	lea	r13, 64[rsp]
	call	dprint@PLT
	mov	r15, QWORD PTR 32[rbp]
	mov	rdi, r15
	call	HFS_SB@PLT
	mov	rsi, r13
	mov	edi, DWORD PTR [rax]
	call	hfs_find_init@PLT
	mov	esi, DWORD PTR 72[rsp]
	mov	edx, DWORD PTR 0[rbp]
	mov	rcx, r12
	movdqa	xmm0, XMMWORD PTR 64[rsp]
	mov	rdi, r15
	movaps	XMMWORD PTR 80[rsp], xmm0
	call	hfs_cat_build_key@PLT
	mov	rdi, r13
	call	hfs_brec_find@PLT
	pop	rdx
	.cfi_def_cfa_offset 168
	pop	rcx
	.cfi_def_cfa_offset 160
	mov	r8d, eax
	test	eax, eax
	jne	.L2
	mov	ecx, DWORD PTR 48[rsp]
	cmp	ecx, 4
	jbe	.L3
	mov	r8d, DWORD PTR EIO[rip]
	neg	r8d
.L2:
	mov	edi, DWORD PTR 68[rsp]
	mov	DWORD PTR 8[rsp], r8d
	call	hfs_bnode_put@PLT
	mov	rdi, r13
	call	hfs_find_exit@PLT
	mov	r8d, DWORD PTR 8[rsp]
	mov	rax, QWORD PTR 88[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L18
	add	rsp, 104
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	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
.L3:
	.cfi_restore_state
	lea	rax, 44[rsp]
	mov	edx, DWORD PTR 60[rsp]
	mov	edi, DWORD PTR 52[rsp]
	mov	rsi, rax
	mov	QWORD PTR 24[rsp], rax
	call	hfs_bnode_read@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	rcx, rbx
	mov	rdi, r15
	mov	esi, DWORD PTR 72[rsp]
	mov	edx, DWORD PTR [rax]
	call	hfs_cat_build_key@PLT
	lea	rax, 64[rsp]
	mov	rdi, rax
	mov	QWORD PTR 16[rsp], rax
	call	hfs_brec_find@PLT
	mov	r8d, eax
	add	eax, DWORD PTR ENOENT[rip]
	je	.L4
.L16:
	test	r8d, r8d
	jne	.L2
	mov	r8d, DWORD PTR EEXIST[rip]
	neg	r8d
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edx, DWORD PTR 48[rsp]
	mov	rsi, QWORD PTR 24[rsp]
	mov	rdi, QWORD PTR 16[rsp]
	call	hfs_brec_insert@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L2
	mov	rdx, QWORD PTR 8[rsp]
	mov	rax, QWORD PTR CURRENT_TIME_SEC[rip]
	add	DWORD PTR 24[rdx], 1
	mov	rdi, rdx
	mov	QWORD PTR 8[rdx], rax
	mov	QWORD PTR 16[rdx], rax
	call	mark_inode_dirty@PLT
	mov	edx, DWORD PTR 0[rbp]
	mov	esi, DWORD PTR 56[rsp]
	mov	rcx, r12
	mov	rdi, r15
	call	hfs_cat_build_key@PLT
	mov	rdi, r13
	call	hfs_brec_find@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L2
	mov	rdi, r13
	call	hfs_brec_remove@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L2
	mov	rax, QWORD PTR CURRENT_TIME_SEC[rip]
	sub	DWORD PTR 24[rbp], 1
	mov	rdi, rbp
	mov	QWORD PTR 8[rbp], rax
	mov	QWORD PTR 16[rbp], rax
	call	mark_inode_dirty@PLT
	mov	ebp, DWORD PTR 44[rsp]
	cmp	DWORD PTR HFS_CDR_FIL[rip], ebp
	jne	.L5
	mov	r8d, ebp
	and	r8d, DWORD PTR HFS_FIL_THD[rip]
	je	.L2
.L5:
	mov	esi, DWORD PTR 56[rsp]
	xor	ecx, ecx
	mov	edx, r14d
	mov	rdi, r15
	call	hfs_cat_build_key@PLT
	mov	rdi, r13
	call	hfs_brec_find@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L2
	mov	rdi, r13
	call	hfs_brec_remove@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L2
	mov	esi, DWORD PTR 72[rsp]
	xor	ecx, ecx
	mov	edx, r14d
	mov	rdi, r15
	call	hfs_cat_build_key@PLT
	mov	rax, QWORD PTR 8[rsp]
	cmp	DWORD PTR HFS_CDR_FIL[rip], ebp
	mov	edx, DWORD PTR HFS_CDR_THD[rip]
	mov	ecx, DWORD PTR [rax]
	jne	.L7
	mov	edx, DWORD PTR HFS_CDR_FTH[rip]
.L7:
	mov	rsi, QWORD PTR 24[rsp]
	mov	r8, rbx
	mov	rdi, r15
	call	hfs_cat_build_thread@PLT
	mov	rdi, QWORD PTR 16[rsp]
	mov	r12d, eax
	call	hfs_brec_find@PLT
	mov	r8d, eax
	add	eax, DWORD PTR ENOENT[rip]
	jne	.L16
	mov	rsi, QWORD PTR 24[rsp]
	mov	rdi, QWORD PTR 16[rsp]
	mov	edx, r12d
	call	hfs_brec_insert@PLT
	mov	r8d, eax
	jmp	.L2
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	hfs_cat_move, .-hfs_cat_move
	.comm	HFS_FIL_THD,4,4
	.comm	HFS_CDR_THD,4,4
	.comm	HFS_CDR_FTH,4,4
	.comm	HFS_CDR_FIL,4,4
	.comm	ENOENT,4,4
	.comm	EIO,4,4
	.comm	EEXIST,4,4
	.comm	DBG_CAT_MOD,4,4
	.comm	CURRENT_TIME_SEC,8,8
	.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_catalog.c_hfs_cat_move.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"rename_cat: %u - %lu,%s - %lu,%s\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	hfs_cat_move
	.syntax unified
	.arm
	.fpu softvfp
	.type	hfs_cat_move, %function
hfs_cat_move:
	@ args = 4, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r2
	mov	r5, r1
	mov	r9, r0
	sub	sp, sp, #68
	ldr	fp, [sp, #104]
	ldr	r2, [r3]
	mov	r8, r3
	ldr	r3, [r7]
	ldr	r0, [fp]
	ldr	r1, .L16
	str	r2, [sp, #4]
	str	r3, [sp]
	ldr	ip, .L16+4
	ldr	r3, [r5]
	str	r0, [sp, #8]
	mov	r2, r9
	ldr	r0, [r1]
	ldr	r1, .L16+8
	ldr	ip, [ip]
	str	ip, [sp, #60]
	mov	ip,#0
	bl	dprint
	ldr	r10, [r5, #16]
	add	r4, sp, #28
	mov	r0, r10
	bl	HFS_SB
	add	r6, sp, #44
	mov	r1, r4
	ldr	r0, [r0]
	bl	hfs_find_init
	ldm	r4, {r0, r1, r2, r3}
	stm	r6, {r0, r1, r2, r3}
	mov	r3, r7
	ldr	r2, [r5]
	ldr	r1, [sp, #36]
	mov	r0, r10
	bl	hfs_cat_build_key
	mov	r0, r4
	bl	hfs_brec_find
	subs	r3, r0, #0
	bne	.L2
	ldr	r3, [sp, #28]
	cmp	r3, #4
	bls	.L3
	ldr	r3, .L16+12
	ldr	r0, [r3]
	rsb	r3, r0, #0
.L2:
	ldr	r0, [sp, #48]
	str	r3, [sp, #20]
	bl	hfs_bnode_put
	mov	r0, r4
	bl	hfs_find_exit
	ldr	r2, .L16+4
	ldr	r3, [sp, #20]
	ldr	r1, [r2]
	ldr	r2, [sp, #60]
	eors	r1, r2, r1
	mov	r2, #0
	bne	.L15
	mov	r0, r3
	add	sp, sp, #68
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	ldr	r2, [sp, #40]
	add	r1, sp, #24
	ldr	r0, [sp, #32]
	bl	hfs_bnode_read
	mov	r3, fp
	ldr	r2, [r8]
	ldr	r1, [sp, #52]
	mov	r0, r10
	bl	hfs_cat_build_key
	mov	r0, r6
	bl	hfs_brec_find
	ldr	r2, .L16+16
	mov	r3, r0
	ldr	r2, [r2]
	cmn	r0, r2
	beq	.L4
	cmp	r0, #0
	ldreq	r3, .L16+20
	ldreq	r0, [r3]
	rsbeq	r3, r0, #0
	b	.L2
.L4:
	mov	r0, r6
	ldr	r2, [sp, #28]
	add	r1, sp, #24
	bl	hfs_brec_insert
	subs	r3, r0, #0
	bne	.L2
	ldr	r2, .L16+24
	ldr	r3, [r8, #12]
	ldr	r2, [r2]
	add	r3, r3, #1
	str	r2, [r8, #4]
	str	r2, [r8, #8]
	str	r3, [r8, #12]
	mov	r0, r8
	bl	mark_inode_dirty
	mov	r3, r7
	ldr	r2, [r5]
	ldr	r1, [sp, #36]
	mov	r0, r10
	bl	hfs_cat_build_key
	mov	r0, r4
	bl	hfs_brec_find
	subs	r3, r0, #0
	bne	.L2
	mov	r0, r4
	bl	hfs_brec_remove
	subs	r3, r0, #0
	bne	.L2
	ldr	r2, .L16+24
	ldr	r3, [r5, #12]
	ldr	r2, [r2]
	sub	r3, r3, #1
	ldr	r7, .L16+28
	str	r3, [r5, #12]
	mov	r0, r5
	str	r2, [r5, #4]
	str	r2, [r5, #8]
	bl	mark_inode_dirty
	ldr	r3, [r7]
	ldr	r5, [sp, #24]
	cmp	r3, r5
	bne	.L5
	ldr	r3, .L16+32
	ldr	r3, [r3]
	ands	r3, r5, r3
	beq	.L2
.L5:
	mov	r3, #0
	mov	r2, r9
	ldr	r1, [sp, #36]
	mov	r0, r10
	bl	hfs_cat_build_key
	mov	r0, r4
	bl	hfs_brec_find
	subs	r3, r0, #0
	bne	.L2
	mov	r0, r4
	bl	hfs_brec_remove
	subs	r3, r0, #0
	bne	.L2
	mov	r2, r9
	ldr	r1, [sp, #52]
	mov	r0, r10
	bl	hfs_cat_build_key
	ldr	r3, [r7]
	add	r1, sp, #24
	cmp	r3, r5
	ldreq	r3, .L16+36
	ldrne	r3, .L16+40
	mov	r0, r10
	ldr	r2, [r3]
	str	fp, [sp]
	ldr	r3, [r8]
	bl	hfs_cat_build_thread
	mov	r5, r0
	mov	r0, r6
	bl	hfs_brec_find
	ldr	r2, .L16+16
	mov	r3, r0
	ldr	r2, [r2]
	cmn	r0, r2
	beq	.L8
	cmp	r0, #0
	ldreq	r3, .L16+20
	ldreq	r3, [r3]
	rsbeq	r3, r3, #0
	b	.L2
.L8:
	mov	r2, r5
	mov	r0, r6
	add	r1, sp, #24
	bl	hfs_brec_insert
	mov	r3, r0
	b	.L2
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	DBG_CAT_MOD
	.word	.LC1
	.word	.LC0
	.word	EIO
	.word	ENOENT
	.word	EEXIST
	.word	CURRENT_TIME_SEC
	.word	HFS_CDR_FIL
	.word	HFS_FIL_THD
	.word	HFS_CDR_FTH
	.word	HFS_CDR_THD
	.size	hfs_cat_move, .-hfs_cat_move
	.comm	HFS_FIL_THD,4,4
	.comm	HFS_CDR_THD,4,4
	.comm	HFS_CDR_FTH,4,4
	.comm	HFS_CDR_FIL,4,4
	.comm	ENOENT,4,4
	.comm	EIO,4,4
	.comm	EEXIST,4,4
	.comm	DBG_CAT_MOD,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
