// File: girdhari9[P]TEXPLORER/list_print.cpp
// Function: list_print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int)
void list_print(string path,int cur_pos, int update_value){
	screen_limit = cmd_mod_screen_start-1;
	new_path = path;
	if(cur_pos < 2){
		screen_point(0,0,1);
		itemCounter = 0;
	    print_dir(); //To print directory attributes
	    //To print current path location
	    
	    if(update_value == 2)
	    	screen_point(itemCounter,0,0);
	    else screen_point(0,0,0);
	    return;
	}
	/* After pressing "Enter" this code will run to traverse in new directroy 
	and Display all files of that directory */
	screen_point(0,0,1);
	itemCounter = 0;
	int index = up + cur_pos-1, flag = 1; 
	while(1){
		if((int)namelist[index]->d_type == 4){
			string s = namelist[index]->d_name;
			if(s == ".." && new_path == home_path){
				flag = 0;
				new_path = path;
			}
			else if(s == ".."){
				size_t found = new_path.find_last_of("/\\");
				new_path = new_path.substr(0,found);
			}
			else if(s == "."){ 
				new_path = path;
				flag = 0;
			}
			else new_path = path + '/' + s;	
			break;
		}
		else{
			pid_t pid = fork();
			if(pid == 0){
				execl("/usr/bin/xdg-open","xdg-open",(new_path + "/" + namelist[index]->d_name).c_str(),NULL);
			}
		}
		break;
	}
	if(flag)
	forword_st.push(new_path);
	up = 0, x = 1;
	print_dir(); 	//To print directory attributes
	screen_point(0,0,0);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movl %esi, %eax
movq %rdi, %rsi
movq %rsi, -0x108(%rbp)
movq %rsi, -0x8(%rbp)
movl %eax, -0xc(%rbp)
movl %edx, -0x10(%rbp)
leaq 0x143b4(%rip), %rax     # 0x1873c
movl (%rax), %eax
subl $0x1, %eax
movl %eax, 0x14495(%rip)     # 0x18828
leaq 0x14466(%rip), %rdi     # 0x18800
callq 0x3050
cmpl $0x2, -0xc(%rbp)
jge 0x43e9
xorl %esi, %esi
movl $0x1, %edx
movl %esi, %edi
callq 0x4020
movl $0x0, 0x1443b(%rip)     # 0x187f8
callq 0x4780
cmpl $0x2, -0x10(%rbp)
jne 0x43d9
movl 0x1442a(%rip), %edi     # 0x187f8
xorl %edx, %edx
movl %edx, %esi
callq 0x4020
jmp 0x43e4
xorl %edx, %edx
movl %edx, %edi
movl %edx, %esi
callq 0x4020
jmp 0x4763
xorl %esi, %esi
movl $0x1, %edx
movl %esi, %edi
callq 0x4020
movl $0x0, 0x143f7(%rip)     # 0x187f8
movl 0x14419(%rip), %eax     # 0x18820
addl -0xc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
movl $0x1, -0x18(%rbp)
movq 0x14332(%rip), %rax     # 0x18750
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movzbl 0x12(%rax), %eax
cmpl $0x4, %eax
jne 0x4665
movq 0x14316(%rip), %rax     # 0x18750
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x13, %rax
movq %rax, -0x118(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x3540
movq -0x118(%rbp), %rsi
movq -0x110(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x3cd0
jmp 0x4476
leaq -0x39(%rbp), %rdi
callq 0x3350
leaq 0xcbea(%rip), %rsi      # 0x11070
leaq -0x38(%rbp), %rdi
callq 0x52b0
movb %al, -0x119(%rbp)
jmp 0x4497
movb -0x119(%rbp), %al
testb $0x1, %al
jne 0x44a3
jmp 0x4508
leaq 0x14356(%rip), %rdi     # 0x18800
leaq 0x14267(%rip), %rsi     # 0x18718
callq 0x52e0
testb $0x1, %al
jne 0x44bc
jmp 0x4508
movq -0x108(%rbp), %rsi
movl $0x0, -0x18(%rbp)
leaq 0x1432f(%rip), %rdi     # 0x18800
callq 0x3050
jmp 0x44d8
jmp 0x4649
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x3350
jmp 0x476c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4657
leaq 0xcb61(%rip), %rsi      # 0x11070
leaq -0x38(%rbp), %rdi
callq 0x52b0
movb %al, -0x11a(%rbp)
jmp 0x4520
movb -0x11a(%rbp), %al
testb $0x1, %al
jne 0x452c
jmp 0x4589
leaq 0x142cd(%rip), %rdi     # 0x18800
movq %rdi, -0x128(%rbp)
leaq 0xcb11(%rip), %rsi      # 0x11052
movq $-0x1, %rdx
callq 0x32b0
movq -0x128(%rbp), %rsi
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x78(%rbp), %rdi
callq 0x3310
jmp 0x456b
leaq 0x1428e(%rip), %rdi     # 0x18800
leaq -0x78(%rbp), %rsi
callq 0x33e0
leaq -0x78(%rbp), %rdi
callq 0x35c8
jmp 0x4647
leaq 0xcae1(%rip), %rsi      # 0x11071
leaq -0x38(%rbp), %rdi
callq 0x52b0
movb %al, -0x129(%rbp)
jmp 0x45a1
movb -0x129(%rbp), %al
testb $0x1, %al
jne 0x45ad
jmp 0x45cb
movq -0x108(%rbp), %rsi
leaq 0x14245(%rip), %rdi     # 0x18800
callq 0x3050
jmp 0x45c2
movl $0x0, -0x18(%rbp)
jmp 0x4645
movq -0x108(%rbp), %rsi
leaq -0xb8(%rbp), %rdi
movl $0x2f, %edx
callq 0x53c0
jmp 0x45e5
leaq -0x98(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x5370
jmp 0x45fe
leaq 0x141fb(%rip), %rdi     # 0x18800
leaq -0x98(%rbp), %rsi
callq 0x33e0
leaq -0x98(%rbp), %rdi
callq 0x35c8
leaq -0xb8(%rbp), %rdi
callq 0x35c8
jmp 0x4645
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x35c8
jmp 0x4657
jmp 0x4647
jmp 0x4649
leaq -0x38(%rbp), %rdi
callq 0x35c8
jmp 0x4726
leaq -0x38(%rbp), %rdi
callq 0x35c8
jmp 0x476c
callq 0x30a0
movl %eax, -0xbc(%rbp)
cmpl $0x0, -0xbc(%rbp)
jne 0x4722
leaq 0x1417c(%rip), %rsi     # 0x18800
leaq 0xca56(%rip), %rdx      # 0x110e1
leaq -0x100(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x5490
movq -0x138(%rbp), %rsi
movq 0x140a4(%rip), %rax     # 0x18750
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x13, %rdx
leaq -0xe0(%rbp), %rdi
callq 0x5440
jmp 0x46c6
leaq -0xe0(%rbp), %rdi
callq 0x3110
movq %rax, %rdx
leaq 0xc979(%rip), %rdi      # 0x11055
leaq 0xc97b(%rip), %rsi      # 0x1105e
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x3400
leaq -0xe0(%rbp), %rdi
callq 0x35c8
leaq -0x100(%rbp), %rdi
callq 0x35c8
jmp 0x4722
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x35c8
jmp 0x476c
jmp 0x4724
jmp 0x4726
cmpl $0x0, -0x18(%rbp)
je 0x473f
leaq 0x14075(%rip), %rdi     # 0x187a8
leaq 0x140c6(%rip), %rsi     # 0x18800
callq 0x5510
movl $0x0, 0x140d7(%rip)     # 0x18820
movl $0x1, 0x13ba9(%rip)     # 0x182fc
callq 0x4780
xorl %edx, %edx
movl %edx, %edi
movl %edx, %esi
callq 0x4020
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3530
nopw %cs:(%rax,%rax)