// File: /workspace/github_cpp_makefile_star2_O1/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, 0x58(%rsp)
movq %rdi, 0x10(%rsp)
callq 0x4a8f
leaq 0x5d94(%rip), %rax      # 0x11818
movq 0x8(%rax), %rcx
subq (%rax), %rcx
shrq $0x5, %rcx
decl %ecx
leaq 0x48(%rsp), %rbp
leaq 0x78(%rsp), %r15
movq 0x551e(%rip), %r13      # 0x10fc0
movq 0x54f7(%rip), %r12      # 0x10fa0
movq %rcx, 0x60(%rsp)
movl %ecx, %r14d
movq (%r13), %rdi
callq 0x22c0
movq (%r12), %rdi
callq 0x22c0
callq 0x2340
movl %eax, %ebx
movsbl %bl, %eax
cmpl $0x43, %eax
jg 0xbb10
cmpl $0xa, %eax
je 0xbc21
cmpl $0x41, %eax
je 0xbd41
cmpl $0x42, %eax
jne 0xbddd
cmpl 0x60(%rsp), %r14d
jge 0xbddd
leaq 0x5c89(%rip), %rax      # 0x11788
cmpl (%rax), %r14d
jge 0xbddd
incl %r14d
jmp 0xbd4e
movl %r14d, 0xc(%rsp)
cmpl $0x44, %eax
je 0xbcb8
cmpl $0x68, %eax
je 0xbbbc
cmpl $0x7f, %eax
jne 0xbd5f
movq %rbp, %rax
movq %r13, %rbp
movq %rax, %r13
xorl %edi, %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0x2c0c
callq 0x4c46
leaq 0x98(%rsp), %r12
movq %r12, 0x88(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %r14
movq %r14, %rdi
callq 0x2aec
movq %r14, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2fb8
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0xbba7
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2230
callq 0x42e0
movq %r13, %rax
movq %rbp, %r13
movq 0x53e7(%rip), %r12      # 0x10fa0
movq %rax, %rbp
xorl %edi, %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0x2c0c
movq %rbp, 0x38(%rsp)
leaq 0x5aa2(%rip), %rax      # 0x11678
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x2aec
movq %r14, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2fb8
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
movl 0xc(%rsp), %r14d
je 0xbddd
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0xbddd
callq 0x2060
testl %eax, %eax
jne 0xbddd
movl %r14d, %r12d
movslq %r14d, %rax
leaq 0x5bdd(%rip), %rcx      # 0x11818
movq (%rcx), %rcx
shlq $0x5, %rax
leaq 0x28(%rsp), %rdx
movq %rdx, 0x18(%rsp)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x2aec
movq %r14, %rdi
leaq 0x149f(%rip), %rsi      # 0xd10e
callq 0x2450
movq 0x58(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r14, %rdi
callq 0x2090
movq %r15, %rbp
movq %r15, 0x68(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movl %r12d, %r14d
je 0xbd66
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0xbd6d
movq %r12, %rbp
movq %r13, %r12
xorl %edi, %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0x2c0c
leaq 0xb8(%rsp), %r13
movq %r13, 0xa8(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %r14
movq %r14, %rdi
callq 0x2aec
movq %r14, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2fb8
movq 0xa8(%rsp), %rdi
cmpq %r13, %rdi
movl 0xc(%rsp), %r14d
je 0xbd2c
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2230
callq 0x42e0
movq %r12, %r13
movq %rbp, %r12
leaq 0x48(%rsp), %rbp
jmp 0xbddd
cmpl $0x2, %r14d
jl 0xbddd
decl %r14d
movl %r14d, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2c0c
jmp 0xbddd
movl 0xc(%rsp), %r14d
jmp 0xbddd
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x68(%rsp), %rdx
leaq 0x12c4(%rip), %rdi      # 0xd055
leaq 0x12c6(%rip), %rsi      # 0xd05e
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x2300
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
leaq 0x48(%rsp), %rbp
je 0xbdbd
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
movq 0x51cf(%rip), %r12      # 0x10fa0
je 0xbddd
movq 0x28(%rsp), %rsi
jmp 0xbc14
cmpb $0x65, %bl
jne 0xbab1
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xbdfa
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xbe61
movq 0x28(%rsp), %rsi
jmp 0xbe59
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r13, %rdi
je 0xbe61
movq 0xb8(%rsp), %rsi
jmp 0xbe59
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0xbe61
movq 0x98(%rsp), %rsi
jmp 0xbe59
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0xbe61
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x2400
nop