// File: mshabbirhasan[P]ups-indel/include/seqan/system/file_sync.h
// Function: seqan::File<seqan::Sync<void>>::openTemp(int)
bool openTemp(int openMode = DefaultOpenTempMode<File>::VALUE) {
            // Construct the pattern for the temporary file.
            //
            // First, try to get the temporary directory from the environment
            // variables TMPDIR, TMP.
            CharString tmpDir;
            if ((getuid() == geteuid()) && (getgid() == getegid())) 
			{
                char * res;
                if ((res = getenv("TMPDIR")) != NULL)
                    tmpDir = res;
                else
                    if ((res = getenv("TMP")) != NULL)
                        tmpDir = res;
            }
            // If this does not work, try to use the constant
            // SEQAN_DEFAULT_TMPDIR, fall back to "/tmp", if this does not
            // work.
#ifdef SEQAN_DEFAULT_TMPDIR
            if (empty(tmpDir))
                tmpDir = SEQAN_DEFAULT_TMPDIR;
#else  // #ifdef SEQAN_DEFAULT_TMPDIR
            if (empty(tmpDir))
                tmpDir = "/tmp";
#endif  // #ifdef SEQAN_DEFAULT_TMPDIR

            // At this point, we have a temporary directory.  Now, we add the
            // file name template to get the full path template.
            append(tmpDir, "/SQNXXXXXX");
            // Open temporary file and unlink it immediately afterwards so the
            // memory is released when the program exits.
            int oldMode = umask(077);  // Create with restrictive permissions.
			if ((handle = ::mkstemp(toCString(tmpDir))) == -1) {
			    umask(oldMode);  // Reset umask mode.
				if (!(openMode & OPEN_QUIET))
					::std::cerr << "Couldn't create temporary file " << tmpDir << ". (" << ::strerror(errno) << ")" << ::std::endl;
				return false;
			}
			if (!(close() && open(toCString(tmpDir), openMode))) 
			{
				umask(oldMode);  // Reset umask mode.
			    return false;
            }
			umask(oldMode);  // Reset umask mode.
            #ifdef SEQAN_DEBUG
				if (::unlink(toCString(tmpDir)) == -1 && !(openMode & OPEN_QUIET))
					::std::cerr << "Couldn't unlink temporary file " << tmpDir << ". (" << ::strerror(errno) << ")" << ::std::endl;
            #else
				::unlink(toCString(tmpDir));
			#endif
			return true;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xb3a0
callq 0x4230
movl %eax, -0x50(%rbp)
callq 0x42a0
movl %eax, %ecx
movl -0x50(%rbp), %eax
cmpl %ecx, %eax
jne 0xf65f
callq 0x4490
movl %eax, -0x5c(%rbp)
callq 0x4040
movl %eax, %ecx
movl -0x5c(%rbp), %eax
cmpl %ecx, %eax
jne 0xf65f
leaq 0x19224(%rip), %rdi     # 0x2881e
callq 0x4500
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0xf634
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xf870
jmp 0xf618
jmp 0xf65d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xb7b0
jmp 0xf859
leaq 0x191ea(%rip), %rdi     # 0x28825
callq 0x4500
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0xf65b
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xf870
jmp 0xf659
jmp 0xf65b
jmp 0xf65d
jmp 0xf65f
leaq -0x30(%rbp), %rdi
callq 0xf8e0
movb %al, -0x5d(%rbp)
jmp 0xf66d
movb -0x5d(%rbp), %al
testb $0x1, %al
jne 0xf676
jmp 0xf68a
leaq 0x191ac(%rip), %rsi     # 0x28829
leaq -0x30(%rbp), %rdi
callq 0xf920
jmp 0xf688
jmp 0xf68a
leaq 0x1919d(%rip), %rsi     # 0x2882e
leaq -0x30(%rbp), %rdi
callq 0xf990
jmp 0xf69c
movl $0x3f, %edi
callq 0x47a0
movl %eax, -0x48(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xf9c0
movq %rax, -0x68(%rbp)
jmp 0xf6b8
movq -0x68(%rbp), %rdi
callq 0x4170
movl %eax, -0x6c(%rbp)
jmp 0xf6c6
movl -0x6c(%rbp), %eax
movq -0x58(%rbp), %rcx
movl %eax, 0x8(%rcx)
cmpl $-0x1, %eax
jne 0xf79e
movl -0x48(%rbp), %edi
callq 0x47a0
movl -0x14(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0xf78e
movq 0x288f7(%rip), %rdi     # 0x37ff0
leaq 0x19139(%rip), %rsi     # 0x28839
callq 0x4430
movq %rax, -0x78(%rbp)
jmp 0xf70b
movq -0x78(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xf9e0
movq %rax, -0x80(%rbp)
jmp 0xf71e
movq -0x80(%rbp), %rdi
leaq 0x18fa7(%rip), %rsi     # 0x286d0
callq 0x4430
movq %rax, -0x88(%rbp)
jmp 0xf737
callq 0x4080
movl (%rax), %edi
callq 0x4190
movq -0x88(%rbp), %rdi
movq %rax, %rsi
callq 0x4430
movq %rax, -0x90(%rbp)
jmp 0xf75b
movq -0x90(%rbp), %rdi
leaq 0x19121(%rip), %rsi     # 0x2888a
callq 0x4430
movq %rax, -0x98(%rbp)
jmp 0xf777
movq -0x98(%rbp), %rdi
movq 0x2881b(%rip), %rsi     # 0x37fa0
callq 0x4480
jmp 0xf78c
jmp 0xf78e
movb $0x0, -0x1(%rbp)
movl $0x1, -0x4c(%rbp)
jmp 0xf842
movq -0x58(%rbp), %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
movb %al, -0x99(%rbp)
jmp 0xf7b3
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0xf7bf
jmp 0xf7fc
leaq -0x30(%rbp), %rdi
callq 0xf9c0
movq %rax, -0xa8(%rbp)
jmp 0xf7d1
movq -0xa8(%rbp), %rsi
movq -0x58(%rbp), %rdi
movl -0x14(%rbp), %edx
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movb %al, -0xa9(%rbp)
jmp 0xf7f0
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0xf811
jmp 0xf7fc
movl -0x48(%rbp), %edi
callq 0x47a0
movb $0x0, -0x1(%rbp)
movl $0x1, -0x4c(%rbp)
jmp 0xf842
movl -0x48(%rbp), %edi
callq 0x47a0
leaq -0x30(%rbp), %rdi
callq 0xf9c0
movq %rax, -0xb8(%rbp)
jmp 0xf82b
movq -0xb8(%rbp), %rdi
callq 0x4220
movb $0x1, -0x1(%rbp)
movl $0x1, -0x4c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xb7b0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xc0, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x4770
nopw %cs:(%rax,%rax)
nopl (%rax)