// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./filebuf.h
// Function: FileBuf::peek()
int peek() {
		assert(_in != NULL || _zIn != NULL || _inf != NULL || _ins != NULL);
		assert_leq(_cur, _buf_sz);
		if(_cur == _buf_sz) {
			if(_done) {
				// We already exhausted the input stream
				return -1;
			}
			// Read a new buffer's worth of data
			else {
				// Get the next chunk
				if(_inf != NULL) {
					_inf->read((char*)_buf, BUF_SZ);
					_buf_sz = _inf->gcount();
				} else if(_zIn != NULL) {
					_buf_sz = gzread(_zIn, (void *)_buf, BUF_SZ);
				} else if(_ins != NULL) {
					_ins->read((char*)_buf, BUF_SZ);
					_buf_sz = _ins->gcount();
				} else {
					assert(_in != NULL);
					// TODO: consider an _unlocked function
					_buf_sz = fread(_buf, 1, BUF_SZ, _in);
				}
				_cur = 0;
				if(_buf_sz == 0) {
					// Exhausted, and we have nothing to return to the
					// caller
					_done = true;
					return -1;
				} else if(_buf_sz < BUF_SZ) {
					// Exhausted
					_done = true;
				}
			}
		}
		return (int)_buf[_cur];
	}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
movq %rcx, %rdx
orq %rax, %rdx
movq 0x10(%rdi), %r8
orq %r8, %rdx
movq 0x18(%rdi), %rdi
orq %rdi, %rdx
je 0x1d1d2
movq 0x20(%rbx), %rdx
cmpq 0x28(%rbx), %rdx
ja 0x1d1f1
jne 0x1d18b
pushq $-0x1
popq %rbp
cmpb $0x0, 0x30(%rbx)
jne 0x1d190
testq %r8, %r8
je 0x1d157
leaq 0x31(%rbx), %rsi
movl $0x40000, %edx          # imm = 0x40000
movq %r8, %rdi
callq 0x43c0
movq 0x10(%rbx), %rax
movq 0x8(%rax), %rax
jmp 0x1d16f
testq %rax, %rax
je 0x1d19d
leaq 0x31(%rbx), %rsi
movq %rax, %rdi
movl $0x40000, %edx          # imm = 0x40000
callq 0x4630
cltq
movq %rax, 0x28(%rbx)
andq $0x0, 0x20(%rbx)
testq %rax, %rax
je 0x1d197
cmpq $0x3ffff, %rax          # imm = 0x3FFFF
ja 0x1d189
movb $0x1, 0x30(%rbx)
xorl %edx, %edx
movzbl 0x31(%rbx,%rdx), %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movb $0x1, 0x30(%rbx)
jmp 0x1d190
testq %rdi, %rdi
je 0x1d1b6
leaq 0x31(%rbx), %rsi
movl $0x40000, %edx          # imm = 0x40000
callq 0x43c0
movq 0x18(%rbx), %rax
jmp 0x1d151
testq %rcx, %rcx
je 0x1d296
leaq 0x31(%rbx), %rdi
pushq $0x1
popq %rsi
movl $0x40000, %edx          # imm = 0x40000
callq 0x44b0
jmp 0x1d16f
leaq 0xd000(%rip), %rdi      # 0x2a1d9
leaq 0xd035(%rip), %rsi      # 0x2a215
leaq 0xd03a(%rip), %rcx      # 0x2a221
movl $0xdc, %edx
callq 0x4190
movq 0x16dc0(%rip), %r14     # 0x33fb8
leaq 0xafe4(%rip), %rsi      # 0x281e3
movq %r14, %rdi
callq 0x42d0
movq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x40b0
leaq 0xafe0(%rip), %rsi      # 0x281fa
movq %rax, %rdi
callq 0x42d0
movq 0x28(%rbx), %rsi
movq %rax, %rdi
callq 0x40b0
leaq 0xd1e3(%rip), %rsi      # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0xcfc9(%rip), %rbx      # 0x2a215
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42d0
leaq 0xc4dd(%rip), %rsi      # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0xdd, %esi
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0xc399(%rip), %rdi      # 0x2961b
leaq 0xcf98(%rip), %rcx      # 0x2a221
movq %rbx, %rsi
movl $0xdd, %edx
callq 0x4190
leaq 0xcf98(%rip), %rdi      # 0x2a235
leaq 0xcf71(%rip), %rsi      # 0x2a215
leaq 0xcf76(%rip), %rcx      # 0x2a221
movl $0xef, %edx
callq 0x4190
nop