// File: /workspace/github_cpp_makefile_star2_O2/CYLMos[P]Read_the_tar_file/MyTar.cpp
// Function: MyTar::showContent()
void MyTar::showContent(){
    cout << "Total " << this->getFileNum() << " " << (this->getFileNum() > 1 ? "files." : "file.") << endl;
    cout << left << setw(12) << "filemode" << setw(32) << "username" << setw(32) << "groupname" << setw(6) << "size" << setw(100) << "filename" << endl;

    for(int i = 0; i < this->getFileNum(); i++){
        struct TarHeader buffer = this->tarVector.at(i);

        /// Check the file is directory and output the file mode.
        cout << left << setw(12) << (buffer.type == '5' ? 'd' : '-') + this->getFileMode(atoi(buffer.filemode));

        /// Output the user name.
        cout << left << setw(32) << buffer.username;

        /// Output the group name.
        cout << left << setw(32) << buffer.groupname;

        /// Output the file size.
        cout << left << setw(6) << this->hex2Dec(buffer.filesize, sizeof(buffer.filesize));
        //cout << left << setw(6) << this->hex2Dec(atoi(buffer.filesize));

        /// Output the file name.
        cout << left << setw(100) << buffer.filename << endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rdi, %r15
movq 0x37f0(%rip), %r14      # 0x5fd8
leaq 0x186d(%rip), %rsi      # 0x405c
movq %r14, %rdi
callq 0x2170
movq %rax, %rbx
movq %r15, %rdi
callq 0x2ae4
movq %rbx, %rdi
movl %eax, %esi
callq 0x2240
leaq 0x184e(%rip), %rsi      # 0x4061
movq %rax, %rdi
callq 0x2170
movq %rax, %rbx
movq %r15, %rdi
callq 0x2ae4
cmpl $0x2, %eax
leaq 0x1833(%rip), %rax      # 0x4063
leaq 0x1833(%rip), %rsi      # 0x406a
cmovgeq %rax, %rsi
movq %rbx, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20d0
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl $0xffffff4f, %r13d      # imm = 0xFFFFFF4F
movl 0x18(%r14,%rcx), %edx
andl %r13d, %edx
orl $0x20, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
movq $0xc, 0x10(%r14,%rax)
leaq 0x17f4(%rip), %rsi      # 0x4070
movq %r14, %rdi
callq 0x2170
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
pushq $0x20
popq %rbx
movq %rbx, 0x10(%rax,%rcx)
leaq 0x17df(%rip), %rsi      # 0x4079
movq %rax, %rdi
callq 0x2170
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq %rbx, 0x10(%rax,%rcx)
leaq 0x17cd(%rip), %rsi      # 0x4082
movq %rax, %rdi
callq 0x2170
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x6, 0x10(%rax,%rcx)
leaq 0x17b8(%rip), %rsi      # 0x408c
movq %rax, %rdi
callq 0x2170
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x64, 0x10(%rax,%rcx)
leaq 0x179e(%rip), %rsi      # 0x4091
movq %rax, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20d0
movq %r15, -0x38(%rbp)
leaq 0x208(%r15), %rax
movq %rax, -0x30(%rbp)
xorl %r12d, %r12d
leaq -0x278(%rbp), %rbx
movq -0x38(%rbp), %rdi
callq 0x2ae4
cltq
cmpq %rax, %r12
jge 0x2ab0
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2d92
movl $0x200, %edx            # imm = 0x200
movq %rbx, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2120
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r14,%rcx), %edx
andl %r13d, %edx
orl $0x20, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
movq $0xc, 0x10(%r14,%rax)
movb -0x1dc(%rbp), %bl
leaq -0x214(%rbp), %rdi
callq 0x2220
leaq -0x58(%rbp), %r13
movq %r13, %rdi
movl %eax, %edx
callq 0x2b9c
cmpb $0x35, %bl
pushq $0x2d
popq %rsi
pushq $0x64
popq %rax
cmovel %eax, %esi
leaq -0x78(%rbp), %rbx
movq %rbx, %rdi
movq %r13, %rdx
callq 0x2db3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2150
movq %rbx, %rdi
callq 0x20c0
leaq -0x58(%rbp), %rdi
callq 0x20c0
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r14,%rcx), %edx
movl $0xffffff4f, %r13d      # imm = 0xFFFFFF4F
andl %r13d, %edx
orl $0x20, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
pushq $0x20
popq %rbx
movq %rbx, 0x10(%r14,%rax)
movq %r14, %rdi
leaq -0x16f(%rbp), %rsi
callq 0x2170
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r14,%rcx), %edx
andl %r13d, %edx
orl $0x20, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
movq %rbx, 0x10(%r14,%rax)
movq %r14, %rdi
leaq -0x14f(%rbp), %rsi
callq 0x2170
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r14,%rcx), %edx
andl %r13d, %edx
orl $0x20, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
movq $0x6, 0x10(%r14,%rax)
leaq -0x1fc(%rbp), %rsi
pushq $0xc
popq %rdx
callq 0x273c
movq %r14, %rdi
movl %eax, %esi
callq 0x2240
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r14,%rcx), %edx
andl %r13d, %edx
orl $0x20, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
movq $0x64, 0x10(%r14,%rax)
movq %r14, %rdi
movq %r15, %rbx
movq %r15, %rsi
callq 0x2170
movq %rax, %rdi
callq 0x20d0
incq %r12
jmp 0x291c
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x20c0
jmp 0x2ad3
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2260