// File: juli9797[P]ssf/src/filetree.hpp
// Function: ssf::Filetree::move_right()
void move_right()
	{
		try
		{
			if(!selection.empty())
			{
				auto selected = *selection.begin();
				if (selected.is_directory())
				{
					//THIS IS A DIRTY HACK AND SHOULD BE DONE PROPERLY ASAP
					auto probePerm = get_directory_list(selected.path()); //probe if filesystem throws permission error

					current_path = selected.path();
					if(!probePerm.empty()){
						update_selection(*(probePerm.begin()));
					}
				
				}
				else if (selected.is_regular_file() || selected.is_character_file())
				{
					try
					{
						move_right_on_file();
					}
					catch (std::bad_function_call &e)
					{
					}
				}
			}
		}
		catch (std::filesystem::filesystem_error &e)
		{
		}
		update();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
addq $0x30, %rdi
callq 0xe130
testb $0x1, %al
jne 0x16647
movq -0xe0(%rbp), %rdi
addq $0x30, %rdi
callq 0xf0a0
movq %rax, -0x40(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xff20
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
callq 0xdc90
jmp 0x16416
leaq -0x38(%rbp), %rdi
callq 0xff40
movb %al, -0xe1(%rbp)
jmp 0x16427
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0x16436
jmp 0x16577
leaq -0x38(%rbp), %rdi
callq 0x10100
movq %rax, %rsi
leaq -0x90(%rbp), %rdi
callq 0xdcd0
jmp 0x16450
movq -0xe0(%rbp), %rsi
leaq -0x68(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0xf930
jmp 0x16469
leaq -0x90(%rbp), %rdi
callq 0xddb0
leaq -0x38(%rbp), %rdi
callq 0x10100
movq -0xe0(%rbp), %rdi
movq %rax, %rsi
addq $0x8, %rdi
callq 0x44b0
jmp 0x16493
leaq -0x68(%rbp), %rdi
callq 0xe130
testb $0x1, %al
jne 0x1655b
leaq -0x68(%rbp), %rdi
callq 0xf0a0
movq %rax, -0xc8(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0xff20
movq %rax, %rsi
leaq -0xc0(%rbp), %rdi
callq 0xdc90
jmp 0x164d1
movq -0xe0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x10c30
jmp 0x164e6
leaq -0xc0(%rbp), %rdi
callq 0xdd90
jmp 0x1655b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x16611
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x16608
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xddb0
jmp 0x16608
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x16569
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0xdd90
jmp 0x16569
leaq -0x68(%rbp), %rdi
callq 0xa720
jmp 0x165fd
leaq -0x68(%rbp), %rdi
callq 0xa720
jmp 0x16608
leaq -0x38(%rbp), %rdi
callq 0x16660
movb %al, -0xe2(%rbp)
jmp 0x16588
movb -0xe2(%rbp), %al
testb $0x1, %al
jne 0x165b1
jmp 0x16594
leaq -0x38(%rbp), %rdi
callq 0x16690
movb %al, -0xe3(%rbp)
jmp 0x165a5
movb -0xe3(%rbp), %al
testb $0x1, %al
jne 0x165b1
jmp 0x165fb
movq -0xe0(%rbp), %rdi
addq $0xc0, %rdi
callq 0x13170
jmp 0x165c6
jmp 0x165f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0x16608
movq -0x48(%rbp), %rdi
callq 0x40e0
movq %rax, -0xd0(%rbp)
callq 0x4500
jmp 0x165f7
jmp 0x165f9
jmp 0x165fb
jmp 0x165fd
leaq -0x38(%rbp), %rdi
callq 0xdd90
jmp 0x16647
leaq -0x38(%rbp), %rdi
callq 0xdd90
movl -0x4c(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x16649
movq -0x48(%rbp), %rdi
callq 0x40e0
movq %rax, -0xd8(%rbp)
callq 0x4500
movq -0xe0(%rbp), %rdi
callq 0xf450
addq $0xf0, %rsp
popq %rbp
retq
jmp 0x16632
movq -0x48(%rbp), %rdi
callq 0x4560
nopw %cs:(%rax,%rax)
nopl (%rax)