// File: girdhari9[P]TEXPLORER/cmd_main.cpp
// Function: cmd_pointer_move(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void cmd_pointer_move(string current_path, string file_name){
    init_setting();
    char c = 0;
    int x = search_v.size()-1,y = 1, cur_pos = search_v.size()-1;
    while(c != 101){
        fflush(stdin);
        fflush(stdout);
            switch(c = getchar()){
                case 'A': if(x > 1) screen_point(--x,y,0);
                        break;
                case 'B': if(x < cur_pos && x < screen_limit) screen_point(++x,y,0); 
                          break;
                case 'D':{ 
                    screen_point(0,0,1);
                    list_print(current_path,1,0);
                    pointer_move();
                    break;
                }
                case 10:{
                    pid_t pid = fork();
                    if(pid == 0)    
                    execl("/usr/bin/xdg-open","xdg-open",(search_v[x] + "/" + file_name).c_str(),NULL);
                    break;
                } 
                case 127:{
                    screen_point(0,0,1);
                    re_init_setting();
                    list_print(current_path,1,0);
                    pointer_move();
                }
                case 104: screen_point(0,0,1);  
                    list_print(home_path,1,0); break;
                default: break;
            }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0xe0(%rbp)
movq %rsi, -0xd8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x7300
movb $0x0, -0x11(%rbp)
leaq 0xae47(%rip), %rdi      # 0x188b8
callq 0x8e60
subq $0x1, %rax
movl %eax, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
leaq 0xae2d(%rip), %rdi      # 0x188b8
callq 0x8e60
subq $0x1, %rax
movl %eax, -0x20(%rbp)
movsbl -0x11(%rbp), %eax
cmpl $0x65, %eax
je 0xdd9e
movq 0xa515(%rip), %rax      # 0x17fc0
movq (%rax), %rdi
callq 0x33b0
movq 0xa4e6(%rip), %rax      # 0x17fa0
movq (%rax), %rdi
callq 0x33b0
callq 0x3470
movb %al, -0x11(%rbp)
movsbl %al, %ecx
movl %ecx, -0xe4(%rbp)
subb $0xa, %al
je 0xdbed
jmp 0xdadd
movl -0xe4(%rbp), %eax
subl $0x41, %eax
je 0xdb29
jmp 0xdaea
movl -0xe4(%rbp), %eax
subl $0x42, %eax
je 0xdb47
jmp 0xdaf7
movl -0xe4(%rbp), %eax
subl $0x44, %eax
je 0xdb75
jmp 0xdb04
movl -0xe4(%rbp), %eax
subl $0x68, %eax
je 0xdd07
jmp 0xdb15
movl -0xe4(%rbp), %eax
subl $0x7f, %eax
je 0xdca3
jmp 0xdd97
cmpl $0x1, -0x18(%rbp)
jle 0xdb42
movl -0x18(%rbp), %edi
addl $-0x1, %edi
movl %edi, -0x18(%rbp)
movl -0x1c(%rbp), %esi
xorl %edx, %edx
callq 0x4020
jmp 0xdd99
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0xdb70
movl -0x18(%rbp), %eax
leaq 0xaccf(%rip), %rcx      # 0x18828
cmpl (%rcx), %eax
jge 0xdb70
movl -0x18(%rbp), %edi
addl $0x1, %edi
movl %edi, -0x18(%rbp)
movl -0x1c(%rbp), %esi
xorl %edx, %edx
callq 0x4020
jmp 0xdd99
xorl %esi, %esi
movl %esi, -0xe8(%rbp)
movl $0x1, %edx
movl %edx, -0xec(%rbp)
movl %esi, %edi
callq 0x4020
movq -0xe0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x3130
movq -0xf8(%rbp), %rdi
movl -0xec(%rbp), %esi
movl -0xe8(%rbp), %edx
callq 0x4360
jmp 0xdbc0
leaq -0x40(%rbp), %rdi
callq 0x35c8
callq 0x6bc0
jmp 0xdd99
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x35c8
jmp 0xdda7
callq 0x30a0
movl %eax, -0x50(%rbp)
cmpl $0x0, -0x50(%rbp)
jne 0xdc9e
movslq -0x18(%rbp), %rsi
leaq 0xacae(%rip), %rdi      # 0x188b8
callq 0x8e80
movq %rax, %rsi
leaq 0x34c8(%rip), %rdx      # 0x110e1
leaq -0x90(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x5490
movq -0x100(%rbp), %rsi
movq -0xd8(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x5370
jmp 0xdc45
leaq -0x70(%rbp), %rdi
callq 0x3110
movq %rax, %rdx
leaq 0x33fd(%rip), %rdi      # 0x11055
leaq 0x33ff(%rip), %rsi      # 0x1105e
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x3400
leaq -0x70(%rbp), %rdi
callq 0x35c8
leaq -0x90(%rbp), %rdi
callq 0x35c8
jmp 0xdc9e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x35c8
jmp 0xdda7
jmp 0xdd99
xorl %esi, %esi
movl %esi, -0x104(%rbp)
movl $0x1, %edx
movl %edx, -0x108(%rbp)
movl %esi, %edi
callq 0x4020
callq 0x74d0
movq -0xe0(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x3130
movq -0x110(%rbp), %rdi
movl -0x108(%rbp), %esi
movl -0x104(%rbp), %edx
callq 0x4360
jmp 0xdcf6
leaq -0xb0(%rbp), %rdi
callq 0x35c8
callq 0x6bc0
xorl %esi, %esi
movl %esi, -0x114(%rbp)
movl $0x1, %edx
movl %edx, -0x118(%rbp)
movl %esi, %edi
callq 0x4020
leaq 0xa9f0(%rip), %rsi      # 0x18718
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x3130
movq -0x120(%rbp), %rdi
movl -0x118(%rbp), %esi
movl -0x114(%rbp), %edx
callq 0x4360
jmp 0xdd55
leaq -0xd0(%rbp), %rdi
callq 0x35c8
jmp 0xdd99
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x35c8
jmp 0xdda7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x35c8
jmp 0xdda7
jmp 0xdd99
jmp 0xda97
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3530