// File: /workspace/github_cpp_makefile_star2_O3/RC2K7[P]SDisk-FileSystem/shell.cpp
// Function: Shell::type(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Shell::type(string fileName)
{
    string fileBuffer = "";
    string blockBuffer = "";

    for ( int curBlock = getFirstBlock(fileName); curBlock != 0; curBlock = this->nextBlock(fileName, curBlock)) {
        this->readBlock(fileName, curBlock, blockBuffer);
        fileBuffer += blockBuffer;
    }

    fileBuffer = fileBuffer.substr(0, fileBuffer.find_first_of('#'));

    cout << fileBuffer << endl;

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x375b(%rip), %r15      # 0x70bc
leaq -0x48(%rbp), %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x2648
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x68(%rbp), %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x2648
leaq -0xb8(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0xc8(%rbp), %rdi
callq 0x4218
leaq -0xc8(%rbp), %rsi
movq %r14, %rdi
callq 0x560e
movl %eax, %r15d
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x39d6
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x21c0
testl %r15d, %r15d
je 0x3aa5
leaq -0xa8(%rbp), %r12
leaq -0x88(%rbp), %r13
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x4218
movq %r14, %rdi
movq %r12, %rsi
movl %r15d, %edx
leaq -0x68(%rbp), %rcx
callq 0x5c80
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x3a41
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x2090
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x4218
movq %r14, %rdi
movq %r13, %rsi
movl %r15d, %edx
callq 0x5e42
movl %eax, %r15d
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x3a9c
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x21c0
testl %r15d, %r15d
jne 0x39ed
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
movl $0x23, %esi
xorl %edx, %edx
callq 0x2240
leaq -0xe8(%rbp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x21e0
leaq -0x48(%rbp), %rdi
leaq -0xe8(%rbp), %rbx
movq %rbx, %rsi
callq 0x2220
movq (%rbx), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x3afd
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq 0x64c4(%rip), %rdi      # 0x9fd0
callq 0x21f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x3b54
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x3b6d
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
movl $0x1, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3be7
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x3bea
movq -0xb8(%rbp), %rsi
jmp 0x3bdd
jmp 0x3be7
movq %rax, %rbx
jmp 0x3c03
jmp 0x3be7
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x3bea
movq -0x98(%rbp), %rsi
jmp 0x3bdd
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x3bea
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x3bea
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x3c03
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x3c1c
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2300