// File: girdhari9[P]TEXPLORER/list_print.cpp
// Function: print_file_permission(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void print_file_permission(string path)
{
    struct stat fileStat;
    
    if(stat(path.c_str(),&fileStat) < 0)    
        return ;

    cout<<fileStat.st_size<<"B";

    screen_point(itemCounter+1,40,0);

    cout<<(S_ISDIR(fileStat.st_mode) ? "d" : "-");
    cout<<((fileStat.st_mode & S_IRUSR) ? "r" : "-");
    cout<<((fileStat.st_mode & S_IWUSR) ? "w" : "-");
    cout<<((fileStat.st_mode & S_IXUSR) ? "x" : "-");
    cout<<((fileStat.st_mode & S_IRGRP) ? "r" : "-");
    cout<<((fileStat.st_mode & S_IWGRP) ? "w" : "-");
    cout<<((fileStat.st_mode & S_IXGRP) ? "x" : "-");
    cout<<((fileStat.st_mode & S_IROTH) ? "r" : "-");
    cout<<((fileStat.st_mode & S_IWOTH) ? "w" : "-");
    cout<<((fileStat.st_mode & S_IXOTH) ? "x" : "-");

    struct passwd *pw = getpwuid(fileStat.st_uid);
	struct group  *gr = getgrgid(fileStat.st_gid);


	cout<<" "<<gr->gr_name<<" "<<pw->pw_name<<" ";
	string time = ctime(&fileStat.st_mtime);
	cout<<time.substr(4,12)<<"\n";
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x8(%rbp)
callq 0x3110
movq %rax, %rdi
leaq -0x98(%rbp), %rsi
callq 0x32a0
cmpl $0x0, %eax
jge 0x4d3d
jmp 0x517b
movq -0x68(%rbp), %rsi
movq 0x13288(%rip), %rdi     # 0x17fd0
callq 0x3570
movq %rax, %rdi
leaq 0xc310(%rip), %rsi      # 0x11067
callq 0x32d0
movl 0x13a96(%rip), %edi     # 0x187f8
addl $0x1, %edi
movl $0x28, %esi
xorl %edx, %edx
callq 0x4020
movl -0x80(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x4d90
leaq 0xc2a5(%rip), %rax      # 0x1102c
movq %rax, -0x108(%rbp)
jmp 0x4da0
leaq 0xc2d2(%rip), %rax      # 0x11069
movq %rax, -0x108(%rbp)
jmp 0x4da0
movq -0x108(%rbp), %rsi
movq 0x13222(%rip), %rdi     # 0x17fd0
callq 0x32d0
movl -0x80(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x4dd0
leaq 0xc42e(%rip), %rax      # 0x111f5
movq %rax, -0x110(%rbp)
jmp 0x4de0
leaq 0xc292(%rip), %rax      # 0x11069
movq %rax, -0x110(%rbp)
jmp 0x4de0
movq -0x110(%rbp), %rsi
movq 0x131e2(%rip), %rdi     # 0x17fd0
callq 0x32d0
movl -0x80(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x4e10
leaq 0xc264(%rip), %rax      # 0x1106b
movq %rax, -0x118(%rbp)
jmp 0x4e20
leaq 0xc252(%rip), %rax      # 0x11069
movq %rax, -0x118(%rbp)
jmp 0x4e20
movq -0x118(%rbp), %rsi
movq 0x131a2(%rip), %rdi     # 0x17fd0
callq 0x32d0
movl -0x80(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x4e4e
leaq 0xc228(%rip), %rax      # 0x1106d
movq %rax, -0x120(%rbp)
jmp 0x4e5e
leaq 0xc214(%rip), %rax      # 0x11069
movq %rax, -0x120(%rbp)
jmp 0x4e5e
movq -0x120(%rbp), %rsi
movq 0x13164(%rip), %rdi     # 0x17fd0
callq 0x32d0
movl -0x80(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x4e8c
leaq 0xc372(%rip), %rax      # 0x111f5
movq %rax, -0x128(%rbp)
jmp 0x4e9c
leaq 0xc1d6(%rip), %rax      # 0x11069
movq %rax, -0x128(%rbp)
jmp 0x4e9c
movq -0x128(%rbp), %rsi
movq 0x13126(%rip), %rdi     # 0x17fd0
callq 0x32d0
movl -0x80(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x4eca
leaq 0xc1aa(%rip), %rax      # 0x1106b
movq %rax, -0x130(%rbp)
jmp 0x4eda
leaq 0xc198(%rip), %rax      # 0x11069
movq %rax, -0x130(%rbp)
jmp 0x4eda
movq -0x130(%rbp), %rsi
movq 0x130e8(%rip), %rdi     # 0x17fd0
callq 0x32d0
movl -0x80(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x4f08
leaq 0xc16e(%rip), %rax      # 0x1106d
movq %rax, -0x138(%rbp)
jmp 0x4f18
leaq 0xc15a(%rip), %rax      # 0x11069
movq %rax, -0x138(%rbp)
jmp 0x4f18
movq -0x138(%rbp), %rsi
movq 0x130aa(%rip), %rdi     # 0x17fd0
callq 0x32d0
movl -0x80(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4f46
leaq 0xc2b8(%rip), %rax      # 0x111f5
movq %rax, -0x140(%rbp)
jmp 0x4f56
leaq 0xc11c(%rip), %rax      # 0x11069
movq %rax, -0x140(%rbp)
jmp 0x4f56
movq -0x140(%rbp), %rsi
movq 0x1306c(%rip), %rdi     # 0x17fd0
callq 0x32d0
movl -0x80(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4f84
leaq 0xc0f0(%rip), %rax      # 0x1106b
movq %rax, -0x148(%rbp)
jmp 0x4f94
leaq 0xc0de(%rip), %rax      # 0x11069
movq %rax, -0x148(%rbp)
jmp 0x4f94
movq -0x148(%rbp), %rsi
movq 0x1302e(%rip), %rdi     # 0x17fd0
callq 0x32d0
movl -0x80(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4fc2
leaq 0xc0b4(%rip), %rax      # 0x1106d
movq %rax, -0x150(%rbp)
jmp 0x4fd2
leaq 0xc0a0(%rip), %rax      # 0x11069
movq %rax, -0x150(%rbp)
jmp 0x4fd2
movq -0x150(%rbp), %rsi
movq 0x12ff0(%rip), %rdi     # 0x17fd0
movq %rdi, -0x170(%rbp)
callq 0x32d0
movl -0x7c(%rbp), %edi
callq 0x33a0
movq %rax, -0xa0(%rbp)
movl -0x78(%rbp), %edi
callq 0x3510
movq -0x170(%rbp), %rdi
movq %rax, -0xa8(%rbp)
leaq 0xc406(%rip), %rsi      # 0x1141e
movq %rsi, -0x168(%rbp)
callq 0x32d0
movq %rax, %rdi
movq -0xa8(%rbp), %rax
movq (%rax), %rsi
callq 0x32d0
movq -0x168(%rbp), %rsi
movq %rax, %rdi
callq 0x32d0
movq %rax, %rdi
movq -0xa0(%rbp), %rax
movq (%rax), %rsi
callq 0x32d0
movq -0x168(%rbp), %rsi
movq %rax, %rdi
callq 0x32d0
leaq -0x40(%rbp), %rdi
callq 0x30f0
movq %rax, -0x160(%rbp)
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x3540
movq -0x160(%rbp), %rsi
movq -0x158(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
callq 0x3cd0
jmp 0x50a5
leaq -0xc9(%rbp), %rdi
callq 0x3350
leaq -0x100(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
movl $0x4, %edx
movl $0xc, %ecx
callq 0x3310
jmp 0x50d0
movq 0x12ef9(%rip), %rdi     # 0x17fd0
leaq -0x100(%rbp), %rsi
callq 0x3290
movq %rax, -0x178(%rbp)
jmp 0x50ec
movq -0x178(%rbp), %rdi
leaq 0xbff4(%rip), %rsi      # 0x110ee
callq 0x32d0
jmp 0x5101
leaq -0x100(%rbp), %rdi
callq 0x35c8
leaq -0xc8(%rbp), %rdi
callq 0x35c8
jmp 0x517b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
leaq -0xc9(%rbp), %rdi
callq 0x3350
jmp 0x5184
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
jmp 0x516d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x35c8
leaq -0xc8(%rbp), %rdi
callq 0x35c8
jmp 0x5184
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
movq -0xd8(%rbp), %rdi
callq 0x3530