// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
subq $0x60, %rsp
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0xb8dd(%rip), %rax      # 0xe69c
movl (%rax), %eax
decl %eax
movl %eax, 0xb9bf(%rip)      # 0xe788
leaq 0xb990(%rip), %rdi      # 0xe760
movq %rbx, %rsi
callq 0x2150
pushq $0x1
popq %rdx
xorl %edi, %edi
xorl %esi, %esi
callq 0x2ac4
andl $0x0, 0xb96d(%rip)      # 0xe758
cmpl $0x1, %r14d
jg 0x2e0a
callq 0x3039
cmpl $0x2, %ebp
jne 0x2eca
movl 0xb953(%rip), %edi      # 0xe758
jmp 0x2ecc
movl 0xb970(%rip), %eax      # 0xe780
addl %r14d, %eax
decl %eax
movq 0xb894(%rip), %rcx      # 0xe6b0
movslq %eax, %r14
movq (%rcx,%r14,8), %rsi
cmpb $0x4, 0x12(%rsi)
jne 0x2edd
addq $0x13, %rsi
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x29f0
leaq 0x6259(%rip), %rsi      # 0x909e
movq %rsp, %rdi
callq 0x3629
testb %al, %al
je 0x2e6c
leaq 0xb908(%rip), %rdi      # 0xe760
leaq 0xb819(%rip), %rsi      # 0xe678
callq 0x3636
testb %al, %al
jne 0x2f5e
leaq 0x622b(%rip), %rsi      # 0x909e
movq %rsp, %rdi
callq 0x3629
testb %al, %al
je 0x2f4b
leaq 0xb8d6(%rip), %rbx      # 0xe760
leaq 0x61ef(%rip), %rsi      # 0x9080
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x2210
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x2270
leaq 0xb8ab(%rip), %rdi      # 0xe760
leaq 0x20(%rsp), %rbx
movq %rbx, %rsi
callq 0x2300
movq %rbx, %rdi
jmp 0x2fba
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x2ac4
callq 0x2070
testl %eax, %eax
jne 0x2fc7
leaq 0xb86f(%rip), %rsi      # 0xe760
leaq 0x6246(%rip), %rdx      # 0x913e
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x36d3
movq 0xb7a4(%rip), %rax      # 0xe6b0
movq (%rax,%r14,8), %rdx
addq $0x13, %rdx
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x36b4
movq %rsp, %rbx
movq (%rbx), %rdx
leaq 0x6157(%rip), %rdi      # 0x9083
leaq 0x6159(%rip), %rsi      # 0x908c
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x2310
movq %rbx, %rdi
callq 0x2498
leaq 0x20(%rsp), %rdi
jmp 0x2fc2
leaq 0x614d(%rip), %rsi      # 0x909f
movq %rsp, %rdi
callq 0x3629
testb %al, %al
je 0x2f77
leaq 0xb7fb(%rip), %rdi      # 0xe760
movq %rbx, %rsi
callq 0x2150
movq %rsp, %rdi
callq 0x2498
jmp 0x2fda
leaq 0x40(%rsp), %rdi
pushq $0x2f
popq %rdx
movq %rbx, %rsi
callq 0x367e
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %rsp, %rdx
callq 0x365f
leaq 0xb7c0(%rip), %rdi      # 0xe760
leaq 0x20(%rsp), %rbx
movq %rbx, %rsi
callq 0x2300
movq %rbx, %rdi
callq 0x2498
leaq 0x40(%rsp), %rdi
callq 0x2498
movq %rsp, %rdi
callq 0x2498
leaq 0xb73a(%rip), %rdi      # 0xe708
leaq 0xb78b(%rip), %rsi      # 0xe760
callq 0x3a58
andl $0x0, 0xb79f(%rip)      # 0xe780
movl $0x1, 0xb279(%rip)      # 0xe264
callq 0x3039
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2ac4
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x2498
jmp 0x3024
jmp 0x3021
jmp 0x3021
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
jmp 0x3027
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2498
jmp 0x3031
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2420