// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/udc.c
// Function: udcFileClose
void udcFileClose(struct udcFile **pFile)
/* Close down cached file. */
{
struct udcFile *file = *pFile;
if (file != NULL)
    {
    if (udcLogStream)
        {
        fprintf(udcLogStream, "Close %s %s %lld %lld bit %lld %lld %lld %lld %lld sparse %lld %lld %lld %lld %lld udc  %lld %lld %lld %lld %lld net %lld %lld %lld %lld %lld \n",
           file->url, file->prot->type, file->ios.numConnects, file->ios.numReuse,
           file->ios.bit.numSeeks, file->ios.bit.numReads, file->ios.bit.bytesRead, file->ios.bit.numWrites,  file->ios.bit.bytesWritten, 
           file->ios.sparse.numSeeks, file->ios.sparse.numReads, file->ios.sparse.bytesRead, file->ios.sparse.numWrites,  file->ios.sparse.bytesWritten, 
           file->ios.udc.numSeeks, file->ios.udc.numReads, file->ios.udc.bytesRead, file->ios.udc.numWrites,  file->ios.udc.bytesWritten, 
           file->ios.net.numSeeks, file->ios.net.numReads, file->ios.net.bytesRead, file->ios.net.numWrites,  file->ios.net.bytesWritten);
        }
    if (file->mmapBase != NULL)
        {
        if (munmap(file->mmapBase, file->size) < 0)
            errnoAbort("munmap() failed on %s", file->url);
        }
    if (file->connInfo.socket != 0)
	mustCloseFd(&(file->connInfo.socket));
    if (file->connInfo.ctrlSocket != 0)
	mustCloseFd(&(file->connInfo.ctrlSocket));
    freeMem(file->url);
    freeMem(file->protocol);
    udcProtocolFree(&file->prot);
    freeMem(file->cacheDir);
    freeMem(file->bitmapFileName);
    freeMem(file->sparseFileName);
    freeMem(file->sparseReadAheadBuf);
    if (file->fdSparse != 0)
        mustCloseFd(&(file->fdSparse));
    udcBitmapClose(&file->bits);
    }
freez(pFile);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x5dba8
cmpq $0x0, 0xacd92(%rip)     # 0x10a638
je 0x5daa8
movq 0xacd85(%rip), %rdi     # 0x10a638
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rcx
movq -0x38(%rbp), %rax
movq 0x158(%rax), %r8
movq -0x38(%rbp), %rax
movq 0x160(%rax), %r9
movq -0x38(%rbp), %rax
movq 0xb8(%rax), %rax
movq -0x38(%rbp), %rsi
movq 0xc0(%rsi), %rsi
movq %rsi, -0x98(%rbp)
movq -0x38(%rbp), %rsi
movq 0xc8(%rsi), %rsi
movq %rsi, -0x90(%rbp)
movq -0x38(%rbp), %rsi
movq 0xd0(%rsi), %rsi
movq %rsi, -0x88(%rbp)
movq -0x38(%rbp), %rsi
movq 0xd8(%rsi), %rsi
movq %rsi, -0x80(%rbp)
movq -0x38(%rbp), %rsi
movq 0xe0(%rsi), %rsi
movq %rsi, -0x78(%rbp)
movq -0x38(%rbp), %rsi
movq 0xe8(%rsi), %rsi
movq %rsi, -0x70(%rbp)
movq -0x38(%rbp), %rsi
movq 0xf0(%rsi), %rsi
movq %rsi, -0x68(%rbp)
movq -0x38(%rbp), %rsi
movq 0xf8(%rsi), %rsi
movq %rsi, -0x60(%rbp)
movq -0x38(%rbp), %rsi
movq 0x100(%rsi), %rsi
movq %rsi, -0x58(%rbp)
movq -0x38(%rbp), %rsi
movq 0x108(%rsi), %rsi
movq %rsi, -0x50(%rbp)
movq -0x38(%rbp), %rsi
movq 0x110(%rsi), %rsi
movq %rsi, -0x48(%rbp)
movq -0x38(%rbp), %rsi
movq 0x118(%rsi), %r13
movq -0x38(%rbp), %rsi
movq 0x120(%rsi), %r12
movq -0x38(%rbp), %rsi
movq 0x128(%rsi), %r15
movq -0x38(%rbp), %rsi
movq 0x130(%rsi), %r14
movq -0x38(%rbp), %rsi
movq 0x138(%rsi), %rbx
movq -0x38(%rbp), %rsi
movq 0x140(%rsi), %r11
movq -0x38(%rbp), %rsi
movq 0x148(%rsi), %r10
movq -0x38(%rbp), %rsi
movq 0x150(%rsi), %rsi
movq %rsi, -0x40(%rbp)
leaq 0x8123d(%rip), %rsi     # 0xdec36
movq %rax, (%rsp)
movq -0x98(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0x90(%rbp), %rax
movq %rax, 0x10(%rsp)
movq -0x88(%rbp), %rax
movq %rax, 0x18(%rsp)
movq -0x80(%rbp), %rax
movq %rax, 0x20(%rsp)
movq -0x78(%rbp), %rax
movq %rax, 0x28(%rsp)
movq -0x70(%rbp), %rax
movq %rax, 0x30(%rsp)
movq -0x68(%rbp), %rax
movq %rax, 0x38(%rsp)
movq -0x60(%rbp), %rax
movq %rax, 0x40(%rsp)
movq -0x58(%rbp), %rax
movq %rax, 0x48(%rsp)
movq -0x50(%rbp), %rax
movq %rax, 0x50(%rsp)
movq -0x48(%rbp), %rax
movq %rax, 0x58(%rsp)
movq -0x40(%rbp), %rax
movq %r13, 0x60(%rsp)
movq %r12, 0x68(%rsp)
movq %r15, 0x70(%rsp)
movq %r14, 0x78(%rsp)
movq %rbx, 0x80(%rsp)
movq %r11, 0x88(%rsp)
movq %r10, 0x90(%rsp)
movq %rax, 0x98(%rsp)
movb $0x0, %al
callq 0x6a80
movq -0x38(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
je 0x5daeb
movq -0x38(%rbp), %rax
movq 0xb0(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x63c0
cmpl $0x0, %eax
jge 0x5dae9
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x811e4(%rip), %rdi     # 0xdecc6
movb $0x0, %al
callq 0x35ee0
jmp 0x5daeb
movq -0x38(%rbp), %rax
cmpl $0x0, 0x90(%rax)
je 0x5db08
movq -0x38(%rbp), %rdi
addq $0x90, %rdi
callq 0x2ff60
movq -0x38(%rbp), %rax
cmpl $0x0, 0xa0(%rax)
je 0x5db29
movq -0x38(%rbp), %rdi
addq $0x90, %rdi
addq $0x10, %rdi
callq 0x2ff60
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x40d40
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x40d40
movq -0x38(%rbp), %rdi
addq $0x18, %rdi
callq 0x5d2d0
movq -0x38(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x40d40
movq -0x38(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x40d40
movq -0x38(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x40d40
movq -0x38(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x40d40
movq -0x38(%rbp), %rax
cmpl $0x0, 0x58(%rax)
je 0x5db9b
movq -0x38(%rbp), %rdi
addq $0x58, %rdi
callq 0x2ff60
movq -0x38(%rbp), %rdi
addq $0x70, %rdi
callq 0x5dbd0
movq -0x30(%rbp), %rdi
callq 0x40d70
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)