// File: /workspace/github_cpp_makefile_star2_O2/girdhari9[P]TEXPLORER/cmd_main.cpp
// Function: set_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
int set_path(string current_path,int i){
    if(v.size() < 3){
        cout<<v[0]<<": command syntax is not correct 'help' - to find correct syntax.\n";
        return 0;
    }
    if(v[v.size()-1][0] == '~') {
        if(v[i][0] == '~'){
            size_t found = v[i].find_last_of("/\\");
            dest_path = home_path + "/" + v[v.size()-1].substr(2) + "/" + v[i].substr(found+1);
        }
        else{
            size_t found = v[i].find_last_of("/\\");
            if(found != string::npos)
                dest_path = home_path + "/" + v[v.size()-1] + "/" + v[i].substr(found+1);
            else dest_path = home_path + "/" + v[v.size()-1] + "/" + v[i];
        }
    }
    else {
        if(v[i][0] == '~'){
            size_t found = v[i].find_last_of("/\\");
            dest_path = current_path + "/" + v[v.size()-1] + "/" + v[i].substr(found+1);
        }
        size_t found = v[i].find_last_of("/\\");
        if(found != string::npos)
            dest_path = home_path + "/" + v[v.size()-1] + "/" + v[i].substr(found+1);
        else dest_path = home_path + "/" + v[v.size()-1] + "/" + v[i];
    }

    if(v[i][0] == '~') source_path = home_path + "/" + v[i].substr(2);
    else source_path = current_path + "/" + v[i];
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc0, %rsp
movl %esi, %eax
movq 0x7565(%rip), %rcx      # 0xe860
movq 0x7556(%rip), %rsi      # 0xe858
subq %rsi, %rcx
cmpq $0x40, %rcx
ja 0x732d
movq 0x6cbe(%rip), %rdi      # 0xdfd0
callq 0x21f0
leaq 0x1f66(%rip), %rsi      # 0x9284
movq %rax, %rdi
callq 0x2230
xorl %eax, %eax
jmp 0x7827
movq %rdi, %r14
movq -0x20(%rsi,%rcx), %rcx
movslq %eax, %rbx
shlq $0x5, %rbx
leaq (%rsi,%rbx), %rdi
cmpb $0x7e, (%rcx)
movq (%rsi,%rbx), %rax
movb (%rax), %bpl
jne 0x7447
leaq 0x1d29(%rip), %rsi      # 0x9080
pushq $-0x1
popq %rdx
callq 0x2210
movq %rax, %r15
leaq 0x730f(%rip), %rsi      # 0xe678
leaq 0x1dce(%rip), %rdx      # 0x913e
cmpb $0x7e, %bpl
jne 0x75c4
leaq 0x40(%rsp), %rdi
callq 0x36d3
movq 0x74d5(%rip), %rsi      # 0xe860
addq $-0x20, %rsi
leaq 0x60(%rsp), %rdi
pushq $0x2
popq %rdx
pushq $-0x1
popq %rcx
callq 0x2270
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x7b89
leaq 0x1d84(%rip), %rdx      # 0x913e
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x36b4
movq 0x748a(%rip), %rsi      # 0xe858
addq %rbx, %rsi
incq %r15
leaq 0xa0(%rsp), %rdi
pushq $-0x1
popq %rcx
movq %r15, %rdx
callq 0x2270
leaq 0x80(%rsp), %rdi
movq %rsp, %rsi
leaq 0xa0(%rsp), %rdx
callq 0x7b89
leaq 0x789a(%rip), %rdi      # 0xeca0
leaq 0x80(%rsp), %r15
movq %r15, %rsi
callq 0x2300
movq %r15, %rdi
callq 0x2498
leaq 0xa0(%rsp), %rdi
callq 0x2498
movq %rsp, %rdi
callq 0x2498
leaq 0x20(%rsp), %rdi
callq 0x2498
leaq 0x60(%rsp), %rdi
jmp 0x7744
cmpb $0x7e, %bpl
jne 0x7524
leaq 0x1c28(%rip), %rsi      # 0x9080
pushq $-0x1
popq %rdx
callq 0x2210
movq %rax, %r15
leaq 0x1cd4(%rip), %rdx      # 0x913e
leaq 0x40(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x36d3
movq 0x73df(%rip), %rdx      # 0xe860
addq $-0x20, %rdx
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x365f
leaq 0x1ca5(%rip), %rdx      # 0x913e
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x36b4
movq 0x73ab(%rip), %rsi      # 0xe858
addq %rbx, %rsi
incq %r15
leaq 0x60(%rsp), %rdi
pushq $-0x1
popq %rcx
movq %r15, %rdx
callq 0x2270
leaq 0x80(%rsp), %rdi
movq %rsp, %rsi
leaq 0x60(%rsp), %rdx
callq 0x7b89
leaq 0x77c1(%rip), %rdi      # 0xeca0
leaq 0x80(%rsp), %r15
movq %r15, %rsi
callq 0x2300
movq %r15, %rdi
callq 0x2498
leaq 0x60(%rsp), %rdi
callq 0x2498
movq %rsp, %rdi
callq 0x2498
leaq 0x20(%rsp), %rdi
callq 0x2498
leaq 0x40(%rsp), %rdi
callq 0x2498
movq 0x7334(%rip), %rsi      # 0xe858
addq %rbx, %rsi
leaq 0x1b52(%rip), %rax      # 0x9080
pushq $-0x1
popq %rdx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2210
cmpq $-0x1, %rax
je 0x7662
movq %rax, %r15
leaq 0x7128(%rip), %rsi      # 0xe678
leaq 0x1be7(%rip), %rdx      # 0x913e
leaq 0x40(%rsp), %r12
movq %r12, %rdi
callq 0x36d3
movq 0x72f5(%rip), %rdx      # 0xe860
addq $-0x20, %rdx
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x365f
leaq 0x1bbb(%rip), %rdx      # 0x913e
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x36b4
movq 0x72c1(%rip), %rsi      # 0xe858
addq %rbx, %rsi
incq %r15
leaq 0x60(%rsp), %rdi
pushq $-0x1
popq %rcx
movq %r15, %rdx
callq 0x2270
leaq 0x80(%rsp), %rdi
movq %rsp, %rsi
leaq 0x60(%rsp), %rdx
callq 0x7b89
jmp 0x7639
cmpq $-0x1, %r15
je 0x76c5
leaq 0x40(%rsp), %r12
movq %r12, %rdi
callq 0x36d3
movq 0x727e(%rip), %rdx      # 0xe860
addq $-0x20, %rdx
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x365f
leaq 0x1b44(%rip), %rdx      # 0x913e
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x36b4
movq 0x724a(%rip), %rsi      # 0xe858
addq %rbx, %rsi
incq %r15
leaq 0x60(%rsp), %rdi
pushq $-0x1
popq %rcx
movq %r15, %rdx
callq 0x2270
leaq 0x80(%rsp), %rdi
movq %rsp, %rsi
leaq 0x60(%rsp), %rdx
callq 0x7b89
leaq 0x7660(%rip), %rdi      # 0xeca0
leaq 0x80(%rsp), %r15
movq %r15, %rsi
callq 0x2300
movq %r15, %rdi
callq 0x2498
leaq 0x60(%rsp), %rdi
jmp 0x7732
leaq 0x700f(%rip), %rsi      # 0xe678
leaq 0x1ace(%rip), %rdx      # 0x913e
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0x36d3
movq 0x71dc(%rip), %rdx      # 0xe860
addq $-0x20, %rdx
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x365f
leaq 0x1aa2(%rip), %rdx      # 0x913e
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x36b4
movq 0x71a8(%rip), %rdx      # 0xe858
addq %rbx, %rdx
leaq 0x80(%rsp), %rdi
movq %rsp, %rsi
callq 0x365f
jmp 0x7718
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0x36d3
movq 0x7187(%rip), %rdx      # 0xe860
addq $-0x20, %rdx
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x365f
leaq 0x1a4d(%rip), %rdx      # 0x913e
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x36b4
movq 0x7153(%rip), %rdx      # 0xe858
addq %rbx, %rdx
leaq 0x80(%rsp), %rdi
movq %rsp, %rsi
callq 0x365f
leaq 0x7581(%rip), %rdi      # 0xeca0
leaq 0x80(%rsp), %r15
movq %r15, %rsi
callq 0x2300
movq %r15, %rdi
callq 0x2498
movq %rsp, %rdi
callq 0x2498
leaq 0x20(%rsp), %rdi
callq 0x2498
leaq 0x40(%rsp), %rdi
callq 0x2498
movq 0x70fe(%rip), %rax      # 0xe858
movq (%rax,%rbx), %rax
cmpb $0x7e, (%rax)
jne 0x77ce
leaq 0x6f0e(%rip), %rsi      # 0xe678
leaq 0x19cd(%rip), %rdx      # 0x913e
movq %rsp, %rdi
callq 0x36d3
addq 0x70d8(%rip), %rbx      # 0xe858
leaq 0x20(%rsp), %rdi
pushq $0x2
popq %rdx
pushq $-0x1
popq %rcx
movq %rbx, %rsi
callq 0x2270
leaq 0x80(%rsp), %rdi
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
callq 0x7b89
leaq 0x7511(%rip), %rdi      # 0xecc0
leaq 0x80(%rsp), %rbx
movq %rbx, %rsi
callq 0x2300
movq %rbx, %rdi
callq 0x2498
leaq 0x20(%rsp), %rdi
jmp 0x7817
leaq 0x1969(%rip), %rdx      # 0x913e
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x36d3
addq 0x706e(%rip), %rbx      # 0xe858
leaq 0x80(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x365f
leaq 0x74bc(%rip), %rdi      # 0xecc0
leaq 0x80(%rsp), %rbx
movq %rbx, %rsi
callq 0x2300
movq %rbx, %rdi
callq 0x2498
movq %rsp, %rdi
callq 0x2498
pushq $0x1
popq %rax
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x789c
jmp 0x78a9
jmp 0x78b8
jmp 0x788d
jmp 0x789c
jmp 0x78a9
jmp 0x78b8
jmp 0x789c
jmp 0x78a9
jmp 0x78b8
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2498
jmp 0x7862
jmp 0x788d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2498
jmp 0x7871
jmp 0x789c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2498
jmp 0x7882
jmp 0x78a9
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
jmp 0x78b1
jmp 0x78b8
jmp 0x78b8
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2498
jmp 0x789f
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2498
jmp 0x78ac
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2498
jmp 0x78bb
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
jmp 0x78d9
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2498
jmp 0x78d6
jmp 0x78d3
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2498
movq %rbx, %rdi
callq 0x2420