// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x7bb8a(%rip), %rdi     # 0xda700
leaq 0x85b9b(%rip), %rsi     # 0xe4718
xorl %edx, %edx
callq 0x4ac00
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x5ed2a
movq -0x18(%rbp), %rax
cmpb $0x0, 0x10(%rax)
je 0x5ec11
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x4a5f0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x5eb60
movq %rax, -0x30(%rbp)
leaq 0x7e9b2(%rip), %rdi     # 0xdd583
callq 0x4a5f0
cmpq $0x0, -0x30(%rbp)
jbe 0x5ec0c
cmpl $0x0, -0xc(%rbp)
jne 0x5ebf0
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x6da0
movq -0x30(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x5ed18
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
movq 0xa8250(%rip), %rsi     # 0x106e70
callq 0x6a40
cmpl $0x0, %eax
jne 0x5ece2
movq -0x18(%rbp), %rax
cmpq $0x40, 0x8(%rax)
jle 0x5ec83
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x5ff20
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movb $0x0, %al
callq 0x4a5b0
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq %rax, %r8
movq -0x18(%rbp), %r9
addq $0x20, %r9
movl $0x4, %edi
leaq 0x806d4(%rip), %rsi     # 0xdf350
movb $0x0, %al
callq 0x60040
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x8(%rbp), %rax
jge 0x5ece0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x5ecde
movq 0xa81c2(%rip), %rdi     # 0x106e70
callq 0x6da0
movq 0xa81be(%rip), %rdi     # 0x106e78
callq 0x6da0
movq 0xa81ba(%rip), %rdi     # 0x106e80
callq 0x30cb0
cmpl $0x0, %eax
je 0x5ecdc
movq 0xa81a9(%rip), %rdi     # 0x106e80
callq 0x6da0
jmp 0x5ecde
jmp 0x5ece0
jmp 0x5ed16
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
movq 0xa8187(%rip), %rsi     # 0x106e78
callq 0x6a40
cmpl $0x0, %eax
jne 0x5ed14
cmpq $0x0, -0x28(%rbp)
jbe 0x5ed12
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x5ed14
jmp 0x5ed16
jmp 0x5ed18
jmp 0x5ed1a
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x5eb98
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)