// File: /workspace/github_c_makefile_star2_O0/jarun[P]nnn/src/nnn.c
// Function: remote_mount
static bool remote_mount(char *newpath)
{
	uchar_t flag = F_CLI;
	int opt;
	char *tmp, *env;
	bool r = getutil(utils[UTIL_RCLONE]), s = getutil(utils[UTIL_SSHFS]);
	char mntpath[PATH_MAX];

	if (!(r || s)) {
		printmsg("install sshfs/rclone");
		return FALSE;
	}

	if (r && s)
		opt = get_input(messages[MSG_REMOTE_OPTS]);
	else
		opt = (!s) ? 'r' : 's';

	if (opt == 's')
		env = xgetenv("NNN_SSHFS", utils[UTIL_SSHFS]);
	else if (opt == 'r') {
		flag |= F_NOWAIT | F_NOTRACE;
		env = xgetenv("NNN_RCLONE", "rclone mount");
	} else {
		printmsg(messages[MSG_INVALID_KEY]);
		return FALSE;
	}

	tmp = xreadline(NULL, "host[:dir] > ");
	if (!tmp[0]) {
		printmsg(messages[MSG_CANCEL]);
		return FALSE;
	}

	char *div = strchr(tmp, ':');

	if (div)
		*div = '\0';

	/* Create the mount point */
	mkpath(cfgpath, toks[TOK_MNT], mntpath);
	mkpath(mntpath, tmp, newpath);
	if (!xmktree(newpath, TRUE)) {
		printwarn(NULL);
		return FALSE;
	}

	if (!div) { /* Convert "host" to "host:" */
		size_t len = xstrlen(tmp);

		tmp[len] = ':';
		tmp[len + 1] = '\0';
	} else
		*div = ':';

	/* Connect to remote */
	if (opt == 's') {
		if (spawn(env, tmp, newpath, NULL, flag)) {
			printmsg(messages[MSG_FAILED]);
			return FALSE;
		}
	} else {
		spawn(env, tmp, newpath, NULL, flag);
		printmsg(messages[MSG_RCLONE_DELAY]);
		xdelay(XDELAY_INTERVAL_MS << 2); /* Set 4 times the usual delay */
	}

	return TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1040, %rsp           # imm = 0x1040
movq %rdi, -0x10(%rbp)
movb $0x9, -0x11(%rbp)
movq 0xdf16(%rip), %rdi      # 0x1fa00
callq 0x12930
andb $0x1, %al
movb %al, -0x29(%rbp)
movq 0xdefd(%rip), %rdi      # 0x1f9f8
callq 0x12930
andb $0x1, %al
movb %al, -0x2a(%rbp)
testb $0x1, -0x29(%rbp)
jne 0x11b26
testb $0x1, -0x2a(%rbp)
jne 0x11b26
leaq 0xac8c(%rip), %rdi      # 0x1c7a4
callq 0xd020
movb $0x0, -0x1(%rbp)
jmp 0x11d2b
testb $0x1, -0x29(%rbp)
je 0x11b43
testb $0x1, -0x2a(%rbp)
je 0x11b43
movq 0xe017(%rip), %rdi      # 0x1fb50
callq 0x10dc0
movl %eax, -0x18(%rbp)
jmp 0x11b5c
movb -0x2a(%rbp), %dl
xorb $-0x1, %dl
movl $0x73, %eax
movl $0x72, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x18(%rbp)
cmpl $0x73, -0x18(%rbp)
jne 0x11b7b
movq 0xde8f(%rip), %rsi      # 0x1f9f8
leaq 0xac49(%rip), %rdi      # 0x1c7b9
callq 0x5c70
movq %rax, -0x28(%rbp)
jmp 0x11bbb
cmpl $0x72, -0x18(%rbp)
jne 0x11ba4
movzbl -0x11(%rbp), %eax
orl $0x6, %eax
movb %al, -0x11(%rbp)
leaq 0xac31(%rip), %rdi      # 0x1c7c3
leaq 0xac35(%rip), %rsi      # 0x1c7ce
callq 0x5c70
movq %rax, -0x28(%rbp)
jmp 0x11bb9
movq 0xdff5(%rip), %rdi      # 0x1fba0
callq 0xd020
movb $0x0, -0x1(%rbp)
jmp 0x11d2b
jmp 0x11bbb
xorl %eax, %eax
movl %eax, %edi
leaq 0xac15(%rip), %rsi      # 0x1c7db
callq 0x144a0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x11bed
movq 0xdea1(%rip), %rdi      # 0x1fa80
callq 0xd020
movb $0x0, -0x1(%rbp)
jmp 0x11d2b
movq -0x20(%rbp), %rdi
movl $0x3a, %esi
callq 0x4310
movq %rax, -0x1038(%rbp)
cmpq $0x0, -0x1038(%rbp)
je 0x11c16
movq -0x1038(%rbp), %rax
movb $0x0, (%rax)
movq 0x1004b(%rip), %rdi     # 0x21c68
movq 0xe09c(%rip), %rsi      # 0x1fcc0
leaq -0x1030(%rbp), %rdx
callq 0x74c0
leaq -0x1030(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x74c0
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x7360
testb $0x1, %al
jne 0x11c77
callq 0x40c0
movl (%rax), %edi
callq 0x4870
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xd210
movb $0x0, -0x1(%rbp)
jmp 0x11d2b
cmpq $0x0, -0x1038(%rbp)
jne 0x11cb2
movq -0x20(%rbp), %rdi
callq 0x5cc0
movq %rax, -0x1040(%rbp)
movq -0x20(%rbp), %rax
movq -0x1040(%rbp), %rcx
movb $0x3a, (%rax,%rcx)
movq -0x20(%rbp), %rax
movq -0x1040(%rbp), %rcx
movb $0x0, 0x1(%rax,%rcx)
jmp 0x11cbc
movq -0x1038(%rbp), %rax
movb $0x3a, (%rax)
cmpl $0x73, -0x18(%rbp)
jne 0x11cf6
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
movzbl -0x11(%rbp), %eax
xorl %ecx, %ecx
movzwl %ax, %r8d
callq 0xde30
cmpl $0x0, %eax
je 0x11cf4
movq 0xdd9f(%rip), %rdi      # 0x1fa88
callq 0xd020
movb $0x0, -0x1(%rbp)
jmp 0x11d2b
jmp 0x11d27
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
movzbl -0x11(%rbp), %eax
xorl %ecx, %ecx
movzwl %ax, %r8d
callq 0xde30
movq 0xde40(%rip), %rdi      # 0x1fb58
callq 0xd020
movl $0x155cc0, %edi         # imm = 0x155CC0
callq 0xd0a0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x1040, %rsp           # imm = 0x1040
popq %rbp
retq
nopl (%rax)