// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, 0x18(%rsp)
movq %rdi, 0x10(%rsp)
callq 0x422c
leaq 0x6f0b(%rip), %rax      # 0xe818
movq 0x8(%rax), %rcx
subq (%rax), %rcx
shrq $0x5, %rcx
decl %ecx
leaq 0x68(%rsp), %rdx
pushq $0x1
popq %rbp
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %r14
movq %rcx, 0x20(%rsp)
movl %ecx, 0xc(%rsp)
xorl %r15d, %r15d
cmpb $0x65, %r15b
je 0x7b3b
movq %rsi, %r12
movq %rdx, %rbx
movq 0x6671(%rip), %rax      # 0xdfc0
movq (%rax), %rdi
callq 0x22d0
movq 0x6642(%rip), %rax      # 0xdfa0
movq (%rax), %rdi
callq 0x22d0
callq 0x2370
movl %eax, %r15d
cmpb $0xa, %r15b
je 0x7aa9
movsbl %r15b, %eax
cmpl $0x7f, %eax
je 0x7a32
cmpl $0x42, %eax
je 0x79b2
cmpl $0x44, %eax
je 0x79f7
cmpl $0x68, %eax
je 0x7a70
movq %rbx, %rdx
movq %r12, %rsi
cmpl $0x41, %eax
jne 0x7938
cmpl $0x2, 0xc(%rsp)
jl 0x7938
movl 0xc(%rsp), %edi
decl %edi
jmp 0x79df
movl 0xc(%rsp), %eax
cmpl 0x20(%rsp), %eax
movq %rbx, %rdx
movq %r12, %rsi
jge 0x7938
leaq 0x6dbb(%rip), %rax      # 0xe788
movl 0xc(%rsp), %ecx
cmpl (%rax), %ecx
jge 0x7938
movl 0xc(%rsp), %edi
incl %edi
movl %edi, 0xc(%rsp)
movl %ebp, %esi
xorl %edx, %edx
callq 0x2ac4
movq %r12, %rsi
movq %rbx, %rdx
jmp 0x7938
xorl %edi, %edi
xorl %esi, %esi
movl %ebp, %edx
callq 0x2ac4
leaq 0xa8(%rsp), %r13
movq %r13, %rdi
movq 0x10(%rsp), %rsi
callq 0x2360
movq %r13, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x2da8
movq %r13, %rdi
callq 0x2498
callq 0x3cd0
jmp 0x7a9e
xorl %edi, %edi
xorl %esi, %esi
movl %ebp, %edx
callq 0x2ac4
callq 0x4345
movq %r12, %r13
movq %r12, %rdi
movq 0x10(%rsp), %rsi
callq 0x2360
movq %r12, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x2da8
movq %r13, %rdi
callq 0x2498
callq 0x3cd0
leaq 0x28(%rsp), %r14
xorl %edi, %edi
xorl %esi, %esi
movl %ebp, %edx
callq 0x2ac4
movq %r14, %rdi
leaq 0x6bf3(%rip), %rsi      # 0xe678
callq 0x2360
movq %r14, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x2da8
movq %r14, %rdi
callq 0x2498
movq %rbx, %rdx
movq %r12, %rsi
jmp 0x7938
callq 0x2070
testl %eax, %eax
movq %rbx, %rdx
movq %r12, %rsi
jne 0x7938
movslq 0xc(%rsp), %rsi
shlq $0x5, %rsi
leaq 0x6d4c(%rip), %rax      # 0xe818
addq (%rax), %rsi
movq %rdx, %rbx
movq %rdx, %rdi
leaq 0x1662(%rip), %rdx      # 0x913e
callq 0x36d3
leaq 0x88(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq 0x18(%rsp), %rdx
callq 0x365f
movq 0x88(%rsp), %rdx
leaq 0x157b(%rip), %rdi      # 0x9083
leaq 0x157d(%rip), %rsi      # 0x908c
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x2310
movq %r14, %rdi
callq 0x2498
movq %rbx, %rdi
callq 0x2498
movq %rbx, %rdx
pushq $0x1
popq %rbp
movq %r12, %rsi
leaq 0x28(%rsp), %r14
jmp 0x7938
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x7b76
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x7b76
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
jmp 0x7b76
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x2498
movq %rbx, %rdi
callq 0x2420
nop