// File: /workspace/github_cpp_makefile_star2_O1/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 0x21317
movq 0x28(%rbx), %rdx
cmpq %rdx, 0x20(%rbx)
ja 0x21336
jne 0x212ca
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpb $0x0, 0x30(%rbx)
jne 0x212d3
testq %r8, %r8
je 0x21295
leaq 0x31(%rbx), %rsi
movl $0x40000, %edx          # imm = 0x40000
movq %r8, %rdi
callq 0x4410
movq 0x10(%rbx), %rax
movq 0x8(%rax), %rax
jmp 0x212ad
testq %rax, %rax
je 0x212e0
leaq 0x31(%rbx), %rsi
movq %rax, %rdi
movl $0x40000, %edx          # imm = 0x40000
callq 0x4670
cltq
movq %rax, 0x28(%rbx)
movq $0x0, 0x20(%rbx)
testq %rax, %rax
je 0x212da
cmpq $0x3ffff, %rax          # imm = 0x3FFFF
ja 0x212ca
movb $0x1, 0x30(%rbx)
movq 0x20(%rbx), %rax
movzbl 0x31(%rbx,%rax), %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movb $0x1, 0x30(%rbx)
jmp 0x212d3
testq %rdi, %rdi
je 0x212f9
leaq 0x31(%rbx), %rsi
movl $0x40000, %edx          # imm = 0x40000
callq 0x4410
movq 0x18(%rbx), %rax
jmp 0x2128f
testq %rcx, %rcx
je 0x213db
leaq 0x31(%rbx), %rdi
movl $0x1, %esi
movl $0x40000, %edx          # imm = 0x40000
callq 0x44e0
jmp 0x212ad
leaq 0xddb8(%rip), %rdi      # 0x2f0d6
leaq 0xdded(%rip), %rsi      # 0x2f112
leaq 0xddf2(%rip), %rcx      # 0x2f11e
movl $0xdc, %edx
callq 0x41c0
movq 0x15c7b(%rip), %r14     # 0x36fb8
leaq 0xbe7c(%rip), %rsi      # 0x2d1c0
movq %r14, %rdi
callq 0x4310
movq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0xbe78(%rip), %rsi      # 0x2d1d7
movq %rax, %rdi
callq 0x4310
movq 0x28(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0xdf9b(%rip), %rsi      # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xdd81(%rip), %rbx      # 0x2f112
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0xd375(%rip), %rsi      # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0xdd, %esi
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0xd231(%rip), %rdi      # 0x2e5f8
leaq 0xdd50(%rip), %rcx      # 0x2f11e
movq %rbx, %rsi
movl $0xdd, %edx
callq 0x41c0
leaq 0xdd50(%rip), %rdi      # 0x2f132
leaq 0xdd29(%rip), %rsi      # 0x2f112
leaq 0xdd2e(%rip), %rcx      # 0x2f11e
movl $0xef, %edx
callq 0x41c0