// File: /workspace/github_cpp_makefile_star2_O3/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 0x20de9
movq 0x20(%rbx), %rdx
cmpq 0x28(%rbx), %rdx
ja 0x20e08
jne 0x20da0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpb $0x0, 0x30(%rbx)
jne 0x20da5
testq %r8, %r8
je 0x20d69
leaq 0x31(%rbx), %rsi
movl $0x40000, %edx          # imm = 0x40000
movq %r8, %rdi
callq 0x4410
movq 0x10(%rbx), %rax
movq 0x8(%rax), %rax
jmp 0x20d81
testq %rax, %rax
je 0x20db2
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 0x20dac
cmpq $0x3ffff, %rax          # imm = 0x3FFFF
ja 0x20d9e
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 0x20da5
testq %rdi, %rdi
je 0x20dcb
leaq 0x31(%rbx), %rsi
movl $0x40000, %edx          # imm = 0x40000
callq 0x4410
movq 0x18(%rbx), %rax
jmp 0x20d63
testq %rcx, %rcx
je 0x20ead
leaq 0x31(%rbx), %rdi
movl $0x1, %esi
movl $0x40000, %edx          # imm = 0x40000
callq 0x44e0
jmp 0x20d81
leaq 0xd376(%rip), %rdi      # 0x2e166
leaq 0xd3ab(%rip), %rsi      # 0x2e1a2
leaq 0xd3b0(%rip), %rcx      # 0x2e1ae
movl $0xdc, %edx
callq 0x41c0
movq 0x161a9(%rip), %r14     # 0x36fb8
leaq 0xb43a(%rip), %rsi      # 0x2c250
movq %r14, %rdi
callq 0x4310
movq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0xb436(%rip), %rsi      # 0x2c267
movq %rax, %rdi
callq 0x4310
movq 0x28(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0xd559(%rip), %rsi      # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xd33f(%rip), %rbx      # 0x2e1a2
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0xc933(%rip), %rsi      # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0xdd, %esi
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0xc7ef(%rip), %rdi      # 0x2d688
leaq 0xd30e(%rip), %rcx      # 0x2e1ae
movq %rbx, %rsi
movl $0xdd, %edx
callq 0x41c0
leaq 0xd30e(%rip), %rdi      # 0x2e1c2
leaq 0xd2e7(%rip), %rsi      # 0x2e1a2
leaq 0xd2ec(%rip), %rcx      # 0x2e1ae
movl $0xef, %edx
callq 0x41c0