// File: Lartu[P]polaris/src/polaris.cpp
// Function: join_paths(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string join_paths(string base_path, string new_path)
{
    string joined_path = "";
    if(new_path[0] == '/') //Absolute Path
            joined_path = new_path;
    else if(new_path[0] == '~' && new_path[1] == '/') //Home Path
        joined_path = expand_home(new_path);
    else // Relative path
        joined_path = base_path + "/" + new_path;
    return joined_path;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdx, -0xd8(%rbp)
movq %rsi, -0xd0(%rbp)
movq %rdi, -0xc0(%rbp)
movq %rdi, %rax
movq %rax, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
leaq -0x1a(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x34a0
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rdx
leaq 0xc488(%rip), %rsi      # 0x103c7
callq 0x33a0
jmp 0x3f46
leaq -0x1a(%rbp), %rdi
callq 0x3330
movq -0xd8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3500
movq %rax, -0xe0(%rbp)
jmp 0x3f68
movq -0xe0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x3fbc
movq -0xd8(%rbp), %rsi
movq -0xc0(%rbp), %rdi
callq 0x3040
jmp 0x3f8c
jmp 0x4141
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x1a(%rbp), %rdi
callq 0x3330
jmp 0x4177
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x4167
movq -0xd8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3500
movq %rax, -0xe8(%rbp)
jmp 0x3fd5
movq -0xe8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7e, %eax
jne 0x409a
movq -0xd8(%rbp), %rdi
movl $0x1, %esi
callq 0x3500
movq %rax, -0xf0(%rbp)
jmp 0x4002
movq -0xf0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x409a
movq -0xd8(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x3170
jmp 0x4027
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4780
jmp 0x4036
movq -0xc0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x3040
jmp 0x4048
leaq -0x50(%rbp), %rdi
callq 0x31c0
jmp 0x4053
leaq -0x70(%rbp), %rdi
callq 0x31c0
jmp 0x405e
jmp 0x413f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x408a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x31c0
jmp 0x4088
jmp 0x408a
leaq -0x70(%rbp), %rdi
callq 0x31c0
jmp 0x4095
jmp 0x4167
movq -0xd0(%rbp), %rsi
leaq 0xc330(%rip), %rdx      # 0x103d8
leaq -0xb0(%rbp), %rdi
callq 0xa720
jmp 0x40b6
movq -0xd8(%rbp), %rdx
leaq -0x90(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xa690
jmp 0x40d2
movq -0xc0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3040
jmp 0x40e7
leaq -0x90(%rbp), %rdi
callq 0x31c0
jmp 0x40f5
leaq -0xb0(%rbp), %rdi
callq 0x31c0
jmp 0x4103
jmp 0x413f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x412f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x31c0
jmp 0x412d
jmp 0x412f
leaq -0xb0(%rbp), %rdi
callq 0x31c0
jmp 0x413d
jmp 0x4167
jmp 0x4141
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x4157
movq -0xc0(%rbp), %rdi
callq 0x31c0
movq -0xc8(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
movq -0xc0(%rbp), %rdi
callq 0x31c0
jmp 0x4175
jmp 0x4177
movq -0x28(%rbp), %rdi
callq 0x3490
movq %rax, %rdi
callq 0xa540
nopl (%rax,%rax)