// File: mshabbirhasan[P]ups-indel/include/seqan/system/file_async.h
// Function: seqan::File<seqan::Async<void>>::open(char const*, int)
bool open(char const *fileName, int openMode = DefaultOpenMode<File>::VALUE) {
            handle = ::open(fileName, Base::_getOFlag(openMode & ~OPEN_ASYNC), S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
			if (handle == -1) 
			{
				handleAsync = handle;
				if (!(openMode & OPEN_QUIET))
					std::cerr << "Open failed on file " << fileName << ": \"" << ::strerror(errno) << '"' << std::endl;
				return false;
			}

			if (Base::_getOFlag(openMode | OPEN_ASYNC) & O_DIRECT) 
			{
				handleAsync = ::open(fileName, Base::_getOFlag(openMode | (OPEN_ASYNC & ~OPEN_CREATE)), S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
				if (handleAsync == -1 || errno == EINVAL) {	// fall back to cached access
					#if SEQAN_ENABLE_DEBUG || SEQAN_ENABLE_TESTING
						if (!(openMode & OPEN_QUIET))
							std::cerr << "Warning: Direct access openening failed. \"" << ::strerror(errno) << '"' << std::endl;
					#endif
					handleAsync = handle;
				}
				#if SEQAN_ENABLE_DEBUG || SEQAN_ENABLE_TESTING
				    else
						if (!(openMode & OPEN_QUIET))
							std::cerr << "Direct access successfully initiated" << std::endl;
				#endif
			} else
				handleAsync = handle;

			if (sizeof(FilePtr) < 8 && !(openMode & OPEN_QUIET))
				// To remove this warning, you have to options:
				// 1. include the following line before including anything in your application
				//    #define _FILE_OFFSET_BITS 64
				// 2. include <seqan/platform.h> or <seqan/sequence.h> before any other include
				std::cerr << "WARNING: FilePtr is not 64bit wide" << std::endl;


			SEQAN_PROADD(SEQAN_PROOPENFILES, 1);
            return true;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x1c(%rbp), %esi
andl $-0x11, %esi
callq 0xe790
movq -0x30(%rbp), %rdi
movl %eax, %esi
movl $0x1b6, %edx            # imm = 0x1B6
movb $0x0, %al
callq 0x4320
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
cmpl $-0x1, 0x8(%rax)
jne 0xe419
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0xc(%rax)
movl -0x1c(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0xe410
movq 0x29c3f(%rip), %rdi     # 0x37ff0
leaq 0x1a303(%rip), %rsi     # 0x286bb
callq 0x4430
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x4430
movq %rax, %rdi
leaq 0x1a301(%rip), %rsi     # 0x286d4
callq 0x4430
movq %rax, -0x38(%rbp)
callq 0x4080
movl (%rax), %edi
callq 0x4190
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x4430
movq %rax, %rdi
movl $0x22, %esi
callq 0x44c0
movq %rax, %rdi
movq 0x29b95(%rip), %rsi     # 0x37fa0
callq 0x4480
movb $0x0, -0x1(%rbp)
jmp 0xe521
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
orl $0x10, %esi
callq 0xe790
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
je 0xe50f
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x1c(%rbp), %esi
orl $0x10, %esi
callq 0xe790
movq -0x40(%rbp), %rdi
movl %eax, %esi
movl $0x1b6, %edx            # imm = 0x1B6
movb $0x0, %al
callq 0x4320
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0xc(%rax)
cmpl $-0x1, 0xc(%rax)
je 0xe478
callq 0x4080
cmpl $0x16, (%rax)
jne 0xe4dc
movl -0x1c(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0xe4d0
movq 0x29b64(%rip), %rdi     # 0x37ff0
leaq 0x1a245(%rip), %rsi     # 0x286d8
callq 0x4430
movq %rax, -0x48(%rbp)
callq 0x4080
movl (%rax), %edi
callq 0x4190
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x4430
movq %rax, %rdi
movl $0x22, %esi
callq 0x44c0
movq %rax, %rdi
movq 0x29ad5(%rip), %rsi     # 0x37fa0
callq 0x4480
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0xc(%rax)
jmp 0xe50d
movl -0x1c(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0xe50b
movq 0x29b00(%rip), %rdi     # 0x37ff0
leaq 0x1a20c(%rip), %rsi     # 0x28703
callq 0x4430
movq %rax, %rdi
movq 0x29a9a(%rip), %rsi     # 0x37fa0
callq 0x4480
jmp 0xe50d
jmp 0xe519
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0xc(%rax)
jmp 0xe51b
jmp 0xe51d
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)