// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/udc.c
// Function: rCleanup
static bits64 rCleanup(time_t deleteTime, boolean testOnly)
/* Delete any bitmap or sparseData files last accessed before deleteTime */
{
struct fileInfo *file, *fileList = listDirX(".", "*", FALSE);
bits64 results = 0;
for (file = fileList; file != NULL; file = file->next)
    {
    if (file->isDir)
        {
	setCurrentDir(file->name);
	bits64 oneResult = rCleanup(deleteTime, testOnly);
	setCurrentDir("..");
	if (oneResult > 0)
	    {
	    if (!testOnly)
		remove(file->name);
	    results += oneResult;
	    results += file->size;
	    }
	}
    else if (sameString(file->name, bitmapName))
        {
	if (file->size > udcBitmapHeaderSize) /* prevent failure on bitmap files of size 0 or less than header size */
	    verbose(4, "%ld (%ld) %s/%s\n", bitRealDataSize(file->name), (long)file->size, getCurrentDir(), file->name);
	if (file->lastAccess < deleteTime)
	    {
	    /* Remove all files when get bitmap, so that can ensure they are deleted in 
	     * right order. */
	    results += file->size;
	    if (!testOnly)
		{
		remove(bitmapName);
		remove(sparseDataName);
		if (fileExists(redirName))
		    remove(redirName);
		}
	    }
	}
    else if (sameString(file->name, sparseDataName))
        {
	if (results > 0)
	    results += file->size;
	}
    }
return results;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %ebx
movq %rdi, %rbp
leaq 0x43c63(%rip), %rdi     # 0x7f878
leaq 0x4da32(%rip), %rsi     # 0x8964e
xorl %edx, %edx
callq 0x2f288
movq %rax, %r15
leaq 0x484bf(%rip), %r14     # 0x840ec
xorl %r13d, %r13d
movl %ebx, 0xc(%rsp)
movq %rbp, 0x20(%rsp)
testq %r15, %r15
je 0x3bddd
leaq 0x20(%r15), %r12
cmpb $0x0, 0x10(%r15)
je 0x3bc95
movq %r12, %rdi
callq 0x2ee93
movq %rbp, %rdi
movl %ebx, %esi
callq 0x3bbfb
movq %rax, %r14
leaq 0x46a62(%rip), %rdi     # 0x826cb
callq 0x2ee93
testq %r14, %r14
je 0x3bc89
testl %ebx, %ebx
jne 0x3bc7f
movq %r12, %rdi
callq 0x6da0
addq %r13, %r14
addq 0x8(%r15), %r14
movq %r14, %r13
leaq 0x4845c(%rip), %r14     # 0x840ec
movq (%r15), %r15
jmp 0x3bc39
movq %r12, %rdi
leaq 0x4843b(%rip), %rsi     # 0x840da
callq 0x6a50
testl %eax, %eax
je 0x3bcc6
movq %r12, %rdi
leaq 0x4842f(%rip), %rsi     # 0x840e1
callq 0x6a50
testl %eax, %eax
jne 0x3bc90
testq %r13, %r13
je 0x3bc90
addq 0x8(%r15), %r13
jmp 0x3bc90
cmpq $0x41, 0x8(%r15)
jl 0x3bd92
movq %r12, %rdi
callq 0x3b30a
movq %rax, %r14
movq %rax, 0x30(%rsp)
movslq 0x8(%rax), %rcx
movq 0x18(%rax), %rax
addq %rcx, %rax
decq %rax
xorl %edx, %edx
divq %rcx
movl $0x0, %ebp
testl %eax, %eax
jle 0x3bd50
movl %eax, %ebp
addl $0x7, %ebp
shrl $0x3, %ebp
movq %rbp, %rdi
movq %rcx, 0x18(%rsp)
movq %rax, 0x10(%rsp)
callq 0x289b8
movq %rax, %rbx
movq %rax, 0x28(%rsp)
movl 0x3c(%r14), %edi
movq %rax, %rsi
movq %rbp, %rdx
callq 0x1f096
movq %rbx, %rdi
xorl %esi, %esi
movq 0x10(%rsp), %rdx
callq 0x1856c
movslq %eax, %rbp
imulq 0x18(%rsp), %rbp
leaq 0x28(%rsp), %rdi
callq 0x28c3d
leaq 0x30(%rsp), %rdi
callq 0x3af9b
movq 0x8(%r15), %rbx
xorl %eax, %eax
callq 0x2ee65
pushq $0x4
popq %rdi
leaq 0x486d5(%rip), %rsi     # 0x84444
movq %rbp, %rdx
movq %rbx, %rcx
movq %rax, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0x3c521
movl 0xc(%rsp), %ebx
movq 0x20(%rsp), %rbp
leaq 0x4835a(%rip), %r14     # 0x840ec
cmpq %rbp, 0x18(%r15)
jge 0x3bc90
addq 0x8(%r15), %r13
testl %ebx, %ebx
jne 0x3bc90
leaq 0x4832b(%rip), %rdi     # 0x840da
callq 0x6da0
leaq 0x48326(%rip), %rdi     # 0x840e1
callq 0x6da0
movq %r14, %rdi
callq 0x1f807
testl %eax, %eax
je 0x3bc90
movq %r14, %rdi
callq 0x6da0
jmp 0x3bc90
movq %r13, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq