// File: /workspace/github_cpp_makefile_star2_O3/CYLMos[P]Read_the_tar_file/MyTar.cpp
// Function: MyTar::getFileMode[abi:cxx11](int)
string MyTar::getFileMode(int modeNum){
    char r = 'r', w = 'w', x = 'x', no = '-';
    string fileMode[3];

    int index = 2;
    while(modeNum > 0){
        int subMode = modeNum % 10;
        modeNum /= 10;

        /// Check the read priviledge section.
        if(subMode >= 4){
            fileMode[index] += r;
            subMode -= 4;
        }
        else{
            fileMode[index] += no;
        }

        /// Check the write priviledge section.
        if(subMode >= 2){
            fileMode[index] += w;
            subMode -= 2;
        }
        else{
            fileMode[index] += no;
        }

        /// Check the execution priviledge section.
        if(subMode >= 1){
            fileMode[index] += x;
            subMode -= 1;
        }
        else{
            fileMode[index] += no;
        }

        --index;
    }

    return fileMode[0] + fileMode[1] + fileMode[2];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %edx, %ebx
movq %rdi, -0x30(%rbp)
movl $0x10, %eax
leaq (%rax,%rbp), %rcx
addq $-0xb0, %rcx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rax
cmpq $0x70, %rax
jne 0x2f05
testl %ebx, %ebx
jle 0x2fca
leaq -0x70(%rbp), %r15
movl $0xcccccccd, %r12d      # imm = 0xCCCCCCCD
movl %ebx, %r13d
imulq %r12, %r13
shrq $0x23, %r13
leal (,%r13,2), %eax
leal (%rax,%rax,4), %eax
movl %ebx, %r14d
subl %eax, %r14d
cmpl $0x4, %r14d
jb 0x2f70
movq %r15, %rdi
movl $0x72, %esi
callq 0x2150
addl $-0x4, %r14d
jmp 0x2f7d
movq %r15, %rdi
movl $0x2d, %esi
callq 0x2150
cmpl $0x2, %r14d
jb 0x2f96
movq %r15, %rdi
movl $0x77, %esi
callq 0x2150
addl $-0x2, %r14d
jmp 0x2fa3
movq %r15, %rdi
movl $0x2d, %esi
callq 0x2150
movl $0x2d, %esi
testl %r14d, %r14d
je 0x2fb2
movl $0x78, %esi
movq %r15, %rdi
callq 0x2150
addq $-0x20, %r15
cmpl $0x9, %ebx
movl %r13d, %ebx
ja 0x2f3b
leaq -0x90(%rbp), %rdx
leaq -0x50(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x30ee
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0x20a0
movq -0x30(%rbp), %r15
leaq 0x10(%r15), %rdx
movq %rdx, (%r15)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x3018
movq %rsi, (%r15)
movq (%rcx), %rdx
movq %rdx, 0x10(%r15)
jmp 0x301e
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%r15)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x304e
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21b0
movq $-0x60, %rbx
leaq -0x60(%rbp), %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x306d
movq (%r14), %rsi
incq %rsi
callq 0x21b0
addq $-0x20, %r14
addq $0x20, %rbx
jne 0x3059
movq %r15, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x30af
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21b0
jmp 0x30af
jmp 0x30ac
movq %rax, %rbx
movq $-0x60, %r14
leaq -0x60(%rbp), %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x30ce
movq (%r15), %rsi
incq %rsi
callq 0x21b0
addq $-0x20, %r15
addq $0x20, %r14
jne 0x30ba
movq %rbx, %rdi
callq 0x2270