LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: rmlistpath
static void rmlistpath(void)
{
	if (listpath) {
		DPRINTF_S(__func__);
		DPRINTF_S(listpath);
		spawn(utils[UTIL_RM_RF], listpath, NULL, NULL, F_NOTRACE | F_MULTI);
		/* Do not free if program was started in list mode */
		if (listpath != initpath)
			free(listpath);
		listpath = NULL;
	}
}

// Assembly:
movq 0xce8f(%rip), %rsi      # 0x1bb80
testq %rsi, %rsi
je 0xed31
pushq %rax
leaq 0x71a0(%rip), %rdi      # 0x15e9e
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x5, %r8d
callq 0xf5fc
movq 0xce6c(%rip), %rdi      # 0x1bb80
cmpq 0xb91d(%rip), %rdi      # 0x1a638
je 0xed22
callq 0x4090
movq $0x0, 0xce53(%rip) # 0x1bb80
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: notify_fifo
static void notify_fifo(bool force)
{
	if (!fifopath)
		return;

	if (fifofd == -1) {
		fifofd = open(fifopath, O_WRONLY|O_NONBLOCK|O_CLOEXEC);
		if (fifofd == -1) {
			if (errno != ENXIO)
				/* Unexpected error, the FIFO file might have been removed */
				/* We give up FIFO notification */
				fifopath = NULL;
			return;
		}
	}

	static struct entry lastentry;

	if (!force && !memcmp(&lastentry, &pdents[cur], sizeof(struct entry))) // NOLINT
		return;

	lastentry = pdents[cur];

	char path[PATH_MAX];
	size_t len = mkpath(g_ctx[cfg.curctx].c_path, ndents ? pdents[cur].name : "", path);

	path[len - 1] = '\n';

	ssize_t ret = write(fifofd, path, len);

	if (ret != (ssize_t)len && !(ret == -1 && (errno == EAGAIN || errno == EPIPE))) {
		DPRINTF_S(strerror(errno));
	}
}

// Assembly:
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movl %edi, %ebx
movq 0xcc0d(%rip), %rdi      # 0x1b950
testq %rdi, %rdi
je 0xee32
cmpl $-0x1, 0xb771(%rip)     # 0x1a4c4
jne 0xed70
movl $0x80801, %esi          # imm = 0x80801
xorl %eax, %eax
callq 0x46b0
movl %eax, 0xb75d(%rip)      # 0x1a4c4
cmpl $-0x1, %eax
je 0xee3b
testb %bl, %bl
jne 0xeda3
movslq 0x152fd(%rip), %rax     # 0x24078
leaq (%rax,%rax,2), %rsi
shlq $0x4, %rsi
addq 0x152e6(%rip), %rsi     # 0x24070
leaq 0x16607(%rip), %rdi     # 0x25398
movl $0x30, %edx
callq 0x4620
testl %eax, %eax
je 0xee32
movq 0x152c6(%rip), %rax     # 0x24070
movslq 0x152c7(%rip), %rcx     # 0x24078
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movups (%rax,%rcx), %xmm0
movups 0x10(%rax,%rcx), %xmm1
movups 0x20(%rax,%rcx), %xmm2
movups %xmm0, 0x165ca(%rip)    # 0x25398
movups %xmm1, 0x165d3(%rip)    # 0x253a8
movups %xmm2, 0x165dc(%rip)    # 0x253b8
movl 0xb6e6(%rip), %edx      # 0x1a4c8
shrl $0xd, %edx
andl $0x7, %edx
imulq $0x2138, %rdx, %rdx     # imm = 0x2138
leaq 0xcd9a(%rip), %rdi      # 0x1bb90
addq %rdx, %rdi
cmpl $0x0, 0xcd8c(%rip)      # 0x1bb8c
je 0xee0a
addq %rcx, %rax
movq (%rax), %rsi
jmp 0xee11
leaq 0x751b(%rip), %rsi      # 0x1632c
movq %rsp, %rbx
movq %rbx, %rdx
callq 0x6dd5
movb $0xa, -0x1(%rax,%rbx)
movl 0xb69d(%rip), %edi      # 0x1a4c4
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4210
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
retq
callq 0x40c0
cmpl $0x6, (%rax)
je 0xee32
movq $0x0, 0xcb00(%rip) # 0x1b950
jmp 0xee32
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: convert_tilde
static bool convert_tilde(const char *path, char *buf)
{
	if (tilde_is_home(path)) {
		ssize_t len = xstrlen(home);
		ssize_t loclen = xstrlen(path);

		xstrsncpy(buf, home, len + 1);
		xstrsncpy(buf + len, path + 1, loclen);
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpb $0x7e, (%rdi)
jne 0xef19
movb 0x1(%rbx), %al
testb %al, %al
sete %cl
cmpb $0x2f, %al
sete %bpl
orb %cl, %bpl
jmp 0xef1b
xorl %ebp, %ebp
testb %bpl, %bpl
je 0xefb7
movq 0xb715(%rip), %r14      # 0x1a640
movq %r14, %rdi
xorl %esi, %esi
callq 0x4490
movq %rax, %r12
subq %r14, %r12
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4490
movq %rax, 0x8(%rsp)
subq %rbx, %rax
movq %rax, 0x10(%rsp)
movq %r12, %r13
incq %r13
sete 0x7(%rsp)
leaq 0xb7ec(%rip), %r15      # 0x1a750
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0x4860
testq %rax, %rax
setne %al
orb 0x7(%rsp), %al
jne 0xef86
movb $0x0, -0x1(%r13,%r15)
addq %r12, %r15
leaq 0x1(%rbx), %rsi
movq %r15, %rdi
xorl %edx, %edx
movq 0x10(%rsp), %r14
movq %r14, %rcx
callq 0x4860
testq %rax, %rax
setne %al
cmpq %rbx, 0x8(%rsp)
sete %cl
orb %al, %cl
jne 0xefb7
movb $0x0, -0x1(%r15,%r14)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: printwait
static void printwait(const char *msg, int *presel)
{
	printmsg(msg);
	if (presel) {
		*presel = MSGWAIT;
		if (ndents)
			xstrsncpy(g_ctx[cfg.curctx].c_name, pdents[cur].name, NAME_MAX + 1);
	}
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
callq 0xee6f
testq %rbx, %rbx
je 0xf03f
movl $0x24, (%rbx)
cmpl $0x0, 0xcba9(%rip)      # 0x1bb8c
je 0xf03f
movl 0xb4dd(%rip), %eax      # 0x1a4c8
shrl $0xd, %eax
andl $0x7, %eax
imulq $0x2138, %rax, %rax     # imm = 0x2138
leaq 0xcb91(%rip), %rcx      # 0x1bb90
leaq (%rax,%rcx), %rbx
addq $0x2000, %rbx           # imm = 0x2000
movq 0x1505f(%rip), %rax     # 0x24070
movslq 0x15060(%rip), %rcx     # 0x24078
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rsi
movl $0x100, %ecx            # imm = 0x100
movq %rbx, %rdi
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0xf03f
movb $0x0, 0xff(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: reventrycmp
static int reventrycmp(const void *va, const void *vb)
{
	if ((((pEntry)vb)->flags & DIR_OR_DIRLNK)
	    != (((pEntry)va)->flags & DIR_OR_DIRLNK)) {
		if (((pEntry)vb)->flags & DIR_OR_DIRLNK)
			return 1;
		return -1;
	}

	return -entrycmp(va, vb);
}

// Assembly:
movzbl 0x27(%rsi), %ecx
andl $0x1, %ecx
movzbl 0x27(%rdi), %eax
andl $0x1, %eax
cmpl %eax, %ecx
jne 0xf060
pushq %rax
callq 0xf06b
negl %eax
addq $0x8, %rsp
retq
xorl %eax, %eax
cmpl $0x1, %ecx
sbbl %eax, %eax
orl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: entrycmp
static int entrycmp(const void *va, const void *vb)
{
	const struct entry *pa = (pEntry)va;
	const struct entry *pb = (pEntry)vb;

	if ((pb->flags & DIR_OR_DIRLNK) != (pa->flags & DIR_OR_DIRLNK)) {
		if (pb->flags & DIR_OR_DIRLNK)
			return 1;
		return -1;
	}

	/* Sort based on specified order */
	if (cfg.timeorder) {
		if (pb->sec > pa->sec)
			return 1;
		if (pb->sec < pa->sec)
			return -1;
		/* If sec matches, comare nsec */
		if (pb->nsec > pa->nsec)
			return 1;
		if (pb->nsec < pa->nsec)
			return -1;
	} else if (cfg.sizeorder) {
		if (pb->size > pa->size)
			return 1;
		if (pb->size < pa->size)
			return -1;
	} else if (cfg.blkorder) {
		if (pb->blocks > pa->blocks)
			return 1;
		if (pb->blocks < pa->blocks)
			return -1;
	} else if (cfg.extnorder && !(pb->flags & DIR_OR_DIRLNK)) {
		char *extna = xextension(pa->name, pa->nlen - 1);
		char *extnb = xextension(pb->name, pb->nlen - 1);

		if (extna || extnb) {
			if (!extna)
				return -1;

			if (!extnb)
				return 1;

			int ret = strcasecmp(extna, extnb);

			if (ret)
				return ret;
		}
	}

	return namecmpfn(pa->name, pb->name);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x20(%rsi), %r15
movq %r15, %rcx
shrq $0x38, %rcx
andl $0x1, %ecx
movq 0x20(%rdi), %rdx
btq $0x38, %rdx
movl %ecx, %eax
sbbl $0x0, %eax
jne 0xf133
movq %rsi, %rbx
movq %rdi, %r14
movl 0xb426(%rip), %eax      # 0x1a4c8
testb $0x2, %al
jne 0xf147
testb $0x4, %al
jne 0xf15f
testb $0x10, %al
jne 0xf177
testb $0x20, %al
sete %al
orb %al, %cl
jne 0xf1a3
movq (%r14), %rdi
shrq $0x28, %rdx
movl $0xffff, %r13d          # imm = 0xFFFF
andq %r13, %rdx
decq %rdx
movl $0x2e, %esi
callq 0x46f0
movq %rax, %r12
movq (%rbx), %rdi
shrq $0x28, %r15
andq %r13, %r15
decq %r15
movl $0x2e, %esi
movq %r15, %rdx
callq 0x46f0
movq %rax, %rsi
movq %r12, %rax
orq %rsi, %rax
sete %cl
xorl %eax, %eax
testq %r12, %r12
setne %al
leal -0x1(%rax,%rax), %eax
je 0xf12d
testq %rsi, %rsi
je 0xf12d
movq %r12, %rdi
callq 0x40b0
testl %eax, %eax
sete %cl
testb %cl, %cl
je 0xf13d
jmp 0xf1a3
xorl %eax, %eax
cmpl $0x1, %ecx
sbbl %eax, %eax
orl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x8(%r14), %rcx
movl $0x1, %eax
cmpq %rcx, 0x8(%rbx)
jg 0xf13d
jge 0xf193
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xf13d
movq 0x18(%r14), %rcx
movl $0x1, %eax
cmpq %rcx, 0x18(%rbx)
jg 0xf13d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jl 0xf13d
jmp 0xf1a3
movabsq $0xffffffffff, %rax     # imm = 0xFFFFFFFFFF
andq %rax, %r15
andq %rax, %rdx
movl $0x1, %eax
cmpq %rdx, %r15
ja 0xf13d
jmp 0xf19c
movl 0x10(%r14), %ecx
cmpl %ecx, 0x10(%rbx)
ja 0xf13d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jb 0xf13d
movq 0xb33e(%rip), %rax      # 0x1a4e8
movq (%r14), %rdi
movq (%rbx), %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: xstricmp
static int xstricmp(const char * const s1, const char * const s2)
{
	char *p1, *p2;

	long long v1 = strtoll(s1, &p1, 10);
	long long v2 = strtoll(s2, &p2, 10);

	/* Check if at least 1 string is numeric */
	if (s1 != p1 || s2 != p2) {
		/* Handle both pure numeric */
		if (s1 != p1 && s2 != p2) {
			if (v2 > v1)
				return -1;

			if (v1 > v2)
				return 1;
		}

		/* Only first string non-numeric */
		if (s1 == p1)
			return 1;

		/* Only second string non-numeric */
		if (s2 == p2)
			return -1;
	}

	/* Handle 1. all non-numeric and 2. both same numeric value cases */
#ifndef NOLC
	return strcoll(s1, s2);
#else
	return strcasecmp(s1, s2);
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r12
movq %r12, %rsi
movl $0xa, %edx
callq 0x44f0
movq %rax, %r15
movq %rsp, %r13
movq %rbx, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x44f0
movq (%r12), %rcx
movq %rcx, %rsi
xorq %r14, %rsi
movq (%r13), %rdx
movq %rdx, %rdi
xorq %rbx, %rdi
orq %rsi, %rdi
jne 0xf365
movq %r14, %rdi
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4630
cmpq %rbx, %rdx
sete %sil
cmpq %r14, %rcx
sete %dil
orb %sil, %dil
je 0xf395
cmpq %rbx, %rdx
sete %dl
xorl %eax, %eax
cmpq %r14, %rcx
sete %cl
orb %cl, %dl
je 0xf34d
movb %cl, %al
leal -0x1(,%rax,2), %ecx
jmp 0xf3ba
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %r15, %rax
jg 0xf3ba
cmpq %rbx, %rdx
sete %dl
xorl %ecx, %ecx
cmpq %rax, %r15
setg %al
orb %al, %dl
je 0xf34d
movb %al, %cl
leal -0x1(,%rcx,2), %ecx
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: create_tmp_file
static int create_tmp_file(void)
{
	xstrsncpy(g_tmpfpath + tmpfplen - 1, messages[STR_TMPFILE], TMP_LEN_MAX - tmpfplen);

	int fd = mkstemp(g_tmpfpath);

	if (fd == -1) {
		DPRINTF_S(strerror(errno));
	}

	return fd;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movzbl 0xb18f(%rip), %r15d     # 0x1a740
leaq -0x40(%r15), %rbx
negq %rbx
leaq 0xb141(%rip), %rax      # 0x1a700
leaq (%r15,%rax), %r14
decq %r14
leaq 0x68f2(%rip), %rsi      # 0x15ebf
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x4860
cmpq $0x40, %r15
je 0xf5eb
testq %rax, %rax
jne 0xf5eb
movb $0x0, -0x1(%r14,%rbx)
leaq 0xb10e(%rip), %rdi      # 0x1a700
popq %rbx
popq %r14
popq %r15
jmp 0x4470
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: writesel
static void writesel(const char *buf, const size_t buflen)
{
	if (!selpath)
		return;

	int fd = open(selpath, O_CREAT | O_WRONLY | O_TRUNC, S_IWUSR | S_IRUSR);

	if (fd != -1) {
		if (write(fd, buf, buflen) != (ssize_t)buflen)
			printwarn(NULL);
		close(fd);
	} else
		printwarn(NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movq 0xaae4(%rip), %rdi      # 0x1a528
testq %rdi, %rdi
je 0xfa96
movq %rsi, %r14
movl $0x241, %esi            # imm = 0x241
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x46b0
cmpl $-0x1, %eax
je 0xfa9c
movl %eax, %ebx
movl %eax, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4210
cmpq %r14, %rax
je 0xfa8a
callq 0x40c0
movl (%rax), %edi
callq 0x4870
movq %rax, %rdi
callq 0xee6f
movl %ebx, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x43c0
popq %rbx
popq %r14
popq %r15
retq
callq 0x40c0
movl (%rax), %edi
callq 0x4870
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xee6f
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: enable_signals
static void enable_signals(void)
{
	struct sigaction dfl_act = {.sa_handler = SIG_DFL};

	sigaction(SIGHUP, &dfl_act, NULL);
	sigaction(SIGINT, &dfl_act, NULL);
	sigaction(SIGQUIT, &dfl_act, NULL);
	sigaction(SIGTSTP, &dfl_act, NULL);
	sigaction(SIGWINCH, &dfl_act, NULL);
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
leaq 0x8(%rsp), %rbx
movl $0x98, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4380
movl $0x1, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4170
movl $0x2, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4170
movl $0x3, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4170
movl $0x14, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4170
movl $0x1c, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4170
addq $0xa0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: dentfree
static void dentfree(void)
{
	free(pnamebuf);
	free(pdents);
	free(mark);

	/* Thread data cleanup */
	free(core_blocks);
	free(core_data);
	free(core_files);
}

// Assembly:
pushq %rax
movq 0x14773(%rip), %rdi     # 0x242a0
callq 0x4090
movq 0x14537(%rip), %rdi     # 0x24070
callq 0x4090
movq 0x1476b(%rip), %rdi     # 0x242b0
callq 0x4090
movq 0x1577f(%rip), %rdi     # 0x252d0
callq 0x4090
movq 0x1577b(%rip), %rdi     # 0x252d8
callq 0x4090
movq 0x15777(%rip), %rdi     # 0x252e0
popq %rax
jmp 0x4090
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: printerr
static void printerr(int linenum)
{
	exitcurses();
	perror(xitoa(linenum));
	if (!g_state.picker && selpath)
		unlink(selpath);
	free(pselbuf);
	exit(1);
}

// Assembly:
pushq %rbx
movl %edi, %ebx
callq 0x4890
movl %ebx, %edi
callq 0x5fa8
movq %rax, %rdi
callq 0x4740
testb $0x10, 0xa5d9(%rip)     # 0x1a525
sete %al
movq 0xa5d2(%rip), %rdi      # 0x1a528
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xff68
callq 0x40d0
movq 0xbb09(%rip), %rdi      # 0x1ba78
callq 0x4090
movl $0x1, %edi
callq 0x4800
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: visit_parent
static char *visit_parent(char *path, char *newpath, int *presel)
{
	char *dir;

	/* There is no going back */
	if (istopdir(path)) {
		/* Continue in type-to-nav mode, if enabled */
		if (cfg.filtermode && presel)
			*presel = FILTER;
		return NULL;
	}

	/* Use a copy as xdirname() may change the string passed */
	if (newpath)
		xstrsncpy(newpath, path, PATH_MAX);
	else
		newpath = path;

	dir = xdirname(newpath);
	if (chdir(dir) == -1) {
		printwarn(presel);
		return NULL;
	}

	return dir;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
cmpb $0x0, 0x1(%rdi)
jne 0x10f3e
cmpb $0x2f, (%rsi)
jne 0x10f3e
xorl %r14d, %r14d
testq %rbx, %rbx
je 0x10f93
movl 0x9597(%rip), %eax      # 0x1a4c8
andl $0x1, %eax
je 0x10f93
movl $0x2f, (%rbx)
jmp 0x10f90
testq %r14, %r14
je 0x10f61
movl $0x1000, %ecx           # imm = 0x1000
movq %r14, %rdi
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x10f64
movb $0x0, 0xfff(%r14)
jmp 0x10f64
movq %rsi, %r14
movq %r14, %rdi
callq 0x6cbf
movq %r14, %rdi
callq 0x42d0
cmpl $-0x1, %eax
jne 0x10f93
callq 0x40c0
movl (%rax), %edi
callq 0x4870
movq %rax, %rdi
movq %rbx, %rsi
callq 0xefc8
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: cdprep
static bool cdprep(char *lastdir, char *lastname, char *path, char *newpath)
{
	if (lastname)
		lastname[0] =  '\0';

	/* Save last working directory */
	xstrsncpy(lastdir, path, PATH_MAX);

	/* Save the newly opted dir in path */
	xstrsncpy(path, newpath, PATH_MAX);
	DPRINTF_S(path);

	clearfilter();
	return cfg.filtermode;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r15
testq %rsi, %rsi
je 0x10fb4
movb $0x0, (%rsi)
movl $0x1000, %ecx           # imm = 0x1000
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x10fd3
movb $0x0, 0xfff(%r15)
movl $0x1000, %ecx           # imm = 0x1000
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x10ff1
movb $0x0, 0xfff(%rbx)
movl 0x94d1(%rip), %eax      # 0x1a4c8
movl %eax, %ecx
shrl $0xd, %ecx
andl $0x7, %ecx
imulq $0x2138, %rcx, %rcx     # imm = 0x2138
leaq 0xab83(%rip), %rsi      # 0x1bb90
movb 0x2101(%rcx,%rsi), %dl
testb %dl, %dl
je 0x11029
addq %rsi, %rcx
addq $0x2100, %rcx           # imm = 0x2100
movb %dl, 0x2f(%rcx)
movb $0x0, 0x1(%rcx)
andb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: move_cursor
static void move_cursor(int target, int ignore_scrolloff)
{
	target = MAX(0, MIN(ndents - 1, target));
	last_curscroll = curscroll;
	last = cur;
	cur = target;

	if (!ignore_scrolloff) {
		int delta = target - last;
		int scrolloff = MIN(SCROLLOFF, ONSCREEN >> 1);

		/*
		 * When ignore_scrolloff is 1, the cursor can jump into the scrolloff
		 * margin area, but when ignore_scrolloff is 0, act like a boa
		 * constrictor and squeeze the cursor towards the middle region of the
		 * screen by allowing it to move inward and disallowing it to move
		 * outward (deeper into the scrolloff margin area).
		 */
		if (((cur < (curscroll + scrolloff)) && delta < 0)
		    || ((cur > (curscroll + ONSCREEN - scrolloff - 1)) && delta > 0))
			curscroll += delta;
	}
	curscroll = MIN(curscroll, MIN(cur, ndents - ONSCREEN));
	curscroll = MAX(curscroll, MAX(cur - (ONSCREEN - 1), 0));

#ifndef NOFIFO
	if (!g_state.fifomode)
		notify_fifo(FALSE); /* Send hovered path to NNN_FIFO */
#endif
}

// Assembly:
movl 0xab55(%rip), %eax      # 0x1bb8c
leal -0x1(%rax), %ecx
cmpl %edi, %ecx
cmovll %ecx, %edi
xorl %ecx, %ecx
testl %edi, %edi
cmovlel %ecx, %edi
movl 0x1325c(%rip), %edx     # 0x242a8
movl %edx, 0x14296(%rip)     # 0x252e8
movl 0x1301f(%rip), %r9d     # 0x24078
movl %r9d, 0x14300(%rip)     # 0x25360
movl %edi, 0x13012(%rip)     # 0x24078
testl %esi, %esi
jne 0x110cb
movzwl 0xab17(%rip), %esi      # 0x1bb88
addl $-0x4, %esi
movl %esi, %r8d
sarl %r8d
cmpl $0x3, %r8d
movl $0x3, %r10d
cmovll %r8d, %r10d
leal (%r10,%rdx), %r8d
cmpl %r8d, %edi
setl %r11b
movl %edi, %r8d
subl %r9d, %r8d
sets %r9b
testb %r9b, %r11b
jne 0x110c1
addl %edx, %esi
notl %r10d
addl %esi, %r10d
cmpl %r10d, %edi
setg %sil
testl %r8d, %r8d
setg %r9b
andb %sil, %r9b
cmpb $0x1, %r9b
jne 0x110cb
addl %edx, %r8d
movl %r8d, 0x131dd(%rip)     # 0x242a8
movl 0x131d7(%rip), %edx     # 0x242a8
movzwl 0xaab0(%rip), %esi      # 0x1bb88
subl %esi, %eax
addl $0x4, %eax
cmpl %eax, %edi
cmovll %edi, %eax
cmpl %eax, %edx
cmovll %edx, %eax
subl %esi, %edi
addl $0x5, %edi
cmpl %eax, %edi
cmovlel %eax, %edi
testl %edi, %edi
cmovgl %edi, %ecx
movl %ecx, 0x131ac(%rip)     # 0x242a8
testb $0x20, 0x9421(%rip)     # 0x1a524
jne 0x1110c
xorl %edi, %edi
jmp 0xed32
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: send_to_explorer
static void send_to_explorer(int *presel)
{
	if (nselected) {
		int fd = open(fifopath, O_WRONLY|O_NONBLOCK|O_CLOEXEC, 0600);
		if ((fd == -1) || (seltofile(fd, NULL, NEWLINE) != (size_t)(selbufpos)))
			printwarn(presel);
		else {
			resetselind();
			clearselection();
		}
		if (fd > 1)
			close(fd);
	} else
		notify_fifo(TRUE); /* Send opened path to NNN_FIFO */
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x12c80(%rip)     # 0x242ac
je 0x116f5
movq %rdi, %r14
movq 0xa314(%rip), %rdi      # 0x1b950
movl $0x80801, %esi          # imm = 0x80801
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x46b0
movl %eax, %ebx
cmpl $-0x1, %eax
je 0x116cb
leaq 0x4e7a(%rip), %rdx      # 0x164d5
movl %ebx, %edi
xorl %esi, %esi
callq 0xeb78
movl 0xa406(%rip), %ecx      # 0x1ba70
cmpq %rcx, %rax
jne 0x116cb
movslq 0xa516(%rip), %rcx      # 0x1bb8c
testq %rcx, %rcx
jle 0x116ab
movq 0x129ee(%rip), %rax     # 0x24070
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
movq 0x20(%rax,%rdx), %rsi
btq $0x3c, %rsi
jae 0x116a2
btrq $0x3c, %rsi
movq %rsi, 0x20(%rax,%rdx)
addq $0x30, %rdx
cmpq %rdx, %rcx
jne 0x1168c
xorl %eax, %eax
movl %eax, 0x12bf9(%rip)     # 0x242ac
movl %eax, 0xa3b7(%rip)      # 0x1ba70
andb $-0x21, 0x8e66(%rip)    # 0x1a526
xorl %edi, %edi
xorl %esi, %esi
callq 0xfa35
jmp 0x116e2
callq 0x40c0
movl (%rax), %edi
callq 0x4870
movq %rax, %rdi
movq %r14, %rsi
callq 0xefc8
cmpl $0x2, %ebx
jl 0x11706
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x43c0
movl $0x1, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xed32
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: appendfpath
static void appendfpath(const char *path, const size_t len)
{
	if ((selbufpos >= selbuflen) || ((len + 3) > (selbuflen - selbufpos))) {
		selbuflen += PATH_MAX;
		pselbuf = xrealloc(pselbuf, selbuflen);
		if (!pselbuf)
			errexit();
	}

	selbufpos += xstrsncpy(pselbuf + selbufpos, path, len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x129aa(%rip), %esi     # 0x240cc
movl %esi, %eax
subl 0xa346(%rip), %eax      # 0x1ba70
jbe 0x11735
leaq 0x3(%rbx), %rcx
cmpq %rax, %rcx
jbe 0x1175f
addl $0x1000, %esi           # imm = 0x1000
movl %esi, 0x1298b(%rip)     # 0x240cc
movq 0xa330(%rip), %r15      # 0x1ba78
movq %r15, %rdi
callq 0x4640
movq %rax, %r12
testq %rax, %rax
je 0x117ae
movq %r12, 0xa319(%rip)      # 0x1ba78
movl 0xa30a(%rip), %r12d     # 0x1ba70
movq %r12, %r15
addq 0xa308(%rip), %r15      # 0x1ba78
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x4860
testq %rax, %rax
jne 0x11796
testq %rbx, %rbx
je 0x11790
movb $0x0, -0x1(%r15,%rbx)
addq %r15, %rbx
movq %rbx, %rax
subl %r15d, %eax
addl %r12d, %eax
movl %eax, 0xa2ce(%rip)      # 0x1ba70
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
callq 0x4090
movq %r12, 0xa2bb(%rip)      # 0x1ba78
movl $0x668, %edi            # imm = 0x668
callq 0xff2e
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: get_input
static int get_input(const char *prompt)
{
	wint_t ch[1];

	if (prompt)
		printmsg(prompt);
	cleartimeout();

	get_wch(ch);

#ifdef KEY_RESIZE
	while (*ch == KEY_RESIZE) {
		if (prompt) {
			clearoldprompt();
			xlines = LINES;
			printmsg(prompt);
		}

		get_wch(ch);
	}
#endif
	settimeout();
	return (int)*ch;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x1198b
movq %rbx, %rdi
callq 0xee6f
movq 0x85fe(%rip), %r15      # 0x19f90
movq (%r15), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4560
movq (%r15), %rdi
leaq 0x4(%rsp), %r14
movq %r14, %rsi
callq 0x48d0
cmpl $0x19a, (%r14)          # imm = 0x19A
jne 0x119f7
leaq 0x4(%rsp), %r14
movq 0x860c(%rip), %r12      # 0x19fd0
testq %rbx, %rbx
je 0x119e2
callq 0x13c6c
movzwl (%r12), %eax
movw %ax, 0xa1ae(%rip)       # 0x1bb88
movq %rbx, %rdi
callq 0xee6f
movq (%r15), %rdi
movq %r14, %rsi
callq 0x48d0
cmpl $0x19a, 0x4(%rsp)       # imm = 0x19A
je 0x119c4
movq (%r15), %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x4560
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: set_smart_ctx
static void set_smart_ctx(int ctx, char *nextpath, char **path, char *file, char **lastname, char **lastdir)
{
	if (ctx == '+') /* Get smart context */
		ctx = (int)(get_free_ctx() + 1);

	if (ctx == 0 || ctx == cfg.curctx + 1) { /* Same context */
		clearfilter();
		xstrsncpy(*lastdir, *path, PATH_MAX);
		xstrsncpy(*path, nextpath, PATH_MAX);
	} else { /* New context */
		--ctx;
		/* Deactivate the new context and build from scratch */
		g_ctx[ctx].c_cfg.ctxactive = 0;
		DPRINTF_S(nextpath);
		savecurctx(nextpath, file, ctx);
		*path = g_ctx[ctx].c_path;
		*lastdir = g_ctx[ctx].c_last;
		*lastname = g_ctx[ctx].c_name;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %rdx, %r14
movq %rsi, %rbx
cmpl $0x2b, %edi
jne 0x11a6a
movl 0x8a95(%rip), %eax      # 0x1a4c8
shrl $0xd, %eax
andl $0x7, %eax
leaq 0xa150(%rip), %rdx      # 0x1bb90
movl %eax, %esi
incl %esi
movl %esi, %edi
andl $0xfb, %edi
imulq $0x2138, %rdi, %r9      # imm = 0x2138
testb $0x2, 0x2131(%r9,%rdx)
je 0x11a68
andl $0x1fb, %esi            # imm = 0x1FB
cmpl %eax, %edi
jne 0x11a42
incl %edi
testl %edi, %edi
je 0x11a80
movl 0x8a54(%rip), %eax      # 0x1a4c8
shrl $0xd, %eax
andl $0x7, %eax
incl %eax
cmpl %eax, %edi
jne 0x11afb
movl 0x8a42(%rip), %eax      # 0x1a4c8
shrl $0xd, %eax
andl $0x7, %eax
imulq $0x2138, %rax, %rax     # imm = 0x2138
leaq 0xa0f6(%rip), %rdx      # 0x1bb90
movb 0x2101(%rax,%rdx), %cl
testb %cl, %cl
je 0x11ab5
addq %rdx, %rax
addq $0x2100, %rax           # imm = 0x2100
movb %cl, 0x2f(%rax)
movb $0x0, 0x1(%rax)
movq (%r15), %r15
movq (%r14), %rsi
movl $0x1000, %ecx           # imm = 0x1000
movq %r15, %rdi
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x11ad7
movb $0x0, 0xfff(%r15)
movq (%r14), %r14
movl $0x1000, %ecx           # imm = 0x1000
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x11b4c
movb $0x0, 0xfff(%r14)
jmp 0x11b4c
decl %edi
movslq %edi, %rdx
imulq $0x2138, %rdx, %r13     # imm = 0x2138
leaq 0xa082(%rip), %rax      # 0x1bb90
leaq (%rax,%r13), %r12
movq %rbx, %rdi
leaq (%rax,%r13), %rbx
addq $0x1000, %rbx           # imm = 0x1000
andb $-0x3, 0x1131(%rbx)
movq %rcx, %rsi
movq %r8, %rbp
callq 0x10d6c
movq %r12, (%r14)
movq %rbx, (%r15)
leaq 0xa051(%rip), %rax      # 0x1bb90
addq %r13, %rax
addq $0x2000, %rax           # imm = 0x2000
movq %rax, (%rbp)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: dentfind
static int dentfind(const char *fname, int n)
{
	for (int i = 0; i < n; ++i)
		if (xstrcmp(fname, pdents[i].name) == 0)
			return i;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %esi, %esi
jle 0x11e83
movq %rdi, %r14
movb (%rdi), %bpl
movq 0x12212(%rip), %r15     # 0x24070
movl %esi, %r12d
xorl %ebx, %ebx
movq (%r15), %rsi
cmpb (%rsi), %bpl
jne 0x11e77
movq %r14, %rdi
callq 0x44d0
testl %eax, %eax
je 0x11e85
incq %rbx
addq $0x30, %r15
cmpq %rbx, %r12
jne 0x11e63
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: plugscript
static bool plugscript(const char *plugin, uchar_t flags)
{
	mkpath(plgpath, plugin, g_buf);
	if (!access(g_buf, X_OK)) {
		spawn(g_buf, NULL, NULL, NULL, flags);
		return TRUE;
	}

	return FALSE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %rsi
movq 0x9c00(%rip), %rdi      # 0x1baa0
leaq 0x88a9(%rip), %r14      # 0x1a750
movq %r14, %rdx
callq 0x6dd5
movq %r14, %rdi
movl $0x1, %esi
callq 0x4710
movl %eax, %ebp
testl %eax, %eax
jne 0x11ed8
movzbl %bl, %r8d
leaq 0x8883(%rip), %rdi      # 0x1a750
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf5fc
testl %ebp, %ebp
sete %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: startselection
static void startselection(void)
{
	if (!g_state.selmode) {
		g_state.selmode = 1;
		nselected = 0;

		if (selbufpos) {
			resetselind();
			writesel(NULL, 0);
			selbufpos = 0;
		}
	}
}

// Assembly:
movl 0x8609(%rip), %eax      # 0x1a524
btl $0x15, %eax
jb 0x11f93
orl $0x200000, %eax         # imm = 0x200000
movl %eax, 0x85f8(%rip)      # 0x1a524
movl $0x0, 0x12376(%rip)     # 0x242ac
cmpl $0x0, 0x9b33(%rip)      # 0x1ba70
je 0x11f93
pushq %rax
movslq 0x9c45(%rip), %rcx      # 0x1bb8c
testq %rcx, %rcx
jle 0x11f7c
movq 0x1211d(%rip), %rax     # 0x24070
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
movq 0x20(%rax,%rdx), %rsi
btq $0x3c, %rsi
jae 0x11f73
btrq $0x3c, %rsi
movq %rsi, 0x20(%rax,%rdx)
addq $0x30, %rdx
cmpq %rdx, %rcx
jne 0x11f5d
xorl %edi, %edi
xorl %esi, %esi
callq 0xfa35
movl $0x0, 0x9ae1(%rip)      # 0x1ba70
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: rmfromselbuf
static void rmfromselbuf(size_t len)
{
	char *found = findinsel(findselpos, len);
	if (!found)
		return;

	memmove(found, found + len, selbufpos - (found + len - pselbuf));
	selbufpos -= len;

	nselected ? writesel(pselbuf, selbufpos - 1) : clearselection();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x1331d(%rip), %rdi     # 0x252c0
movl %ebx, %esi
callq 0x13518
testq %rax, %rax
je 0x11ff2
movq %rbx, %rsi
addq %rax, %rsi
movl 0x9ab4(%rip), %r14d     # 0x1ba70
movq 0x9ab5(%rip), %r15      # 0x1ba78
movq %r14, %rdx
subq %rsi, %rdx
addq %r15, %rdx
movq %rax, %rdi
callq 0x46d0
subl %ebx, %r14d
movl %r14d, 0x9a92(%rip)     # 0x1ba70
cmpl $0x0, 0x122c7(%rip)     # 0x242ac
je 0x11ff8
decl %r14d
movq %r15, %rdi
movq %r14, %rsi
jmp 0x12011
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
andb $-0x21, 0x8525(%rip)    # 0x1a526
movl %eax, 0x122a5(%rip)     # 0x242ac
movl %eax, 0x9a63(%rip)      # 0x1ba70
xorl %edi, %edi
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0xfa35
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: scanselforpath
static int scanselforpath(const char *path, bool getsize)
{
	if (!path[1]) { /* path should always be at least two bytes (including NULL) */
		g_sel[0] = '/';
		findselpos = pselbuf;
		return 1; /* Length of '/' is 1 */
	}

	size_t off = xstrsncpy(g_sel, path, PATH_MAX);

	g_sel[off - 1] = '/';
	/*
	 * We set findselpos only here. Directories can be listed in arbitrary order.
	 * This is the best best we can do for remembering position.
	 */
	findselpos = findinsel(NULL, off);

	if (getsize)
		return off;
	return (findselpos ? off : 0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpb $0x0, 0x1(%rdi)
je 0x12081
movl %esi, %ebx
movq %rdi, %rsi
leaq 0x1228f(%rip), %rdi     # 0x242c0
xorl %r14d, %r14d
movl $0x1000, %ecx           # imm = 0x1000
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x12053
movb $0x0, 0x13273(%rip)     # 0x252bf
leaq 0x1326d(%rip), %rax     # 0x252c0
leaq 0x12266(%rip), %rcx     # 0x242c0
movl %eax, %ebp
subl %ecx, %ebp
movb $0x2f, -0x1(%rax)
xorl %edi, %edi
movl %ebp, %esi
callq 0x13518
testq %rax, %rax
cmovnel %ebp, %r14d
movq %rax, 0x13247(%rip)     # 0x252c0
testb %bl, %bl
cmovnel %ebp, %r14d
jmp 0x1209c
movb $0x2f, 0x12238(%rip)    # 0x242c0
movq 0x99e9(%rip), %rax      # 0x1ba78
movq %rax, 0x1322a(%rip)     # 0x252c0
movl $0x1, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: get_cur_or_sel
static int get_cur_or_sel(void)
{
	bool sel = (selbufpos || !isselfileempty());

	/* Check both local buffer and selection file for external selection */
	if (sel && ndents) {
		/* If selection is preferred and we have a local selection, return selection.
		 * Always show the prompt in case of an external selection.
		 */
		if (cfg.prefersel && selbufpos)
			return 's';

		int choice = get_input(messages[MSG_CUR_SEL_OPTS]);

		return ((choice == 'c' || choice == 's') ? choice : 0);
	}

	if (sel)
		return 's';

	if (ndents)
		return 'c';

	return 0;
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movb $0x1, %al
cmpl $0x0, 0x99bb(%rip)      # 0x1ba70
jne 0x120d9
movq 0x846a(%rip), %rdi      # 0x1a528
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x4300
cmpl $-0x1, %eax
setne %cl
cmpq $0x0, 0x30(%rbx)
setne %al
andb %cl, %al
movl 0x9aad(%rip), %ecx      # 0x1bb8c
testl %ecx, %ecx
setne %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x1211f
testb $0x1, 0x83d8(%rip)      # 0x1a4ca
je 0x12102
movl $0x73, %eax
cmpl $0x0, 0x9970(%rip)      # 0x1ba70
jne 0x12133
leaq 0x3dfc(%rip), %rdi      # 0x15f05
callq 0x11973
movl %eax, %ecx
movl %eax, %edx
andl $-0x11, %edx
xorl %eax, %eax
cmpl $0x63, %edx
cmovel %ecx, %eax
jmp 0x12133
testl %ecx, %ecx
movl $0x63, %edx
cmovel %ecx, %edx
testb %al, %al
movl $0x73, %eax
cmovel %edx, %eax
addq $0x90, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: xrmfromsel
static void xrmfromsel(char *path, char *fpath)
{
#ifndef NOX11
	bool selected = TRUE;
#endif

	if ((pdents[cur].flags & DIR_OR_DIRLNK) && scanselforpath(fpath, FALSE))
		clearselection();
	else if (pdents[cur].flags & FILE_SELECTED) {
		--nselected;
		rmfromselbuf(mkpath(path, pdents[cur].name, g_sel));
	}
#ifndef NOX11
	else
		selected = FALSE;

	if (selected && cfg.x11)
		plugscript(utils[UTIL_CBCP], F_NOWAIT | F_NOTRACE);
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x11f26(%rip), %rax     # 0x24070
movslq 0x11f27(%rip), %rcx     # 0x24078
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
testb $0x1, 0x27(%rax,%rcx)
je 0x12191
xorl %r14d, %r14d
movq %rsi, %rdi
xorl %esi, %esi
callq 0x1201b
testl %eax, %eax
je 0x12191
movl %r14d, 0x12134(%rip)    # 0x242ac
movl %r14d, 0x98f1(%rip)     # 0x1ba70
andb $-0x21, 0x83a0(%rip)    # 0x1a526
xorl %edi, %edi
xorl %esi, %esi
callq 0xfa35
jmp 0x121cf
movq 0x11ed8(%rip), %rax     # 0x24070
movslq 0x11ed9(%rip), %rcx     # 0x24078
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
testb $0x10, 0x27(%rax,%rcx)
je 0x121d8
decl 0x120f8(%rip)           # 0x242ac
movq (%rax,%rcx), %rsi
leaq 0x12101(%rip), %rdx     # 0x242c0
movq %rbx, %rdi
callq 0x6dd5
movq %rax, %rdi
callq 0x11f94
testb $0x4, 0x82f5(%rip)      # 0x1a4cb
jne 0x121e0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3c98(%rip), %rdi      # 0x15e7f
movl $0x6, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x11e90
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: copynextname
static void copynextname(char *lastname)
{
	if (cur) {
		cur += (cur != (ndents - 1)) ? 1 : -1;
		copycurname();
	} else
		lastname[0] = '\0';
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x11e76(%rip), %eax     # 0x24078
testl %eax, %eax
je 0x12260
movl 0x9980(%rip), %ecx      # 0x1bb8c
leal -0x1(%rcx), %edx
xorl %esi, %esi
cmpl %edx, %eax
setne %sil
leal (%rax,%rsi,2), %eax
decl %eax
movl %eax, 0x11e56(%rip)     # 0x24078
cmpl $0x1, %ecx
jae 0x12230
leaq 0x314a(%rip), %rsi      # 0x15378
jmp 0x12245
movq 0x11e39(%rip), %rcx     # 0x24070
cltq
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movq (%rcx,%rax), %rsi
movl $0x100, %ecx            # imm = 0x100
movq %rbx, %rdi
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x12263
addq $0xff, %rbx
movb $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: selsafe
static bool selsafe(void)
{
	/* Fail if selection file path not generated */
	if (!selpath) {
		printmsg(messages[MSG_SEL_MISSING]);
		return FALSE;
	}

	/* Fail if selection file path isn't accessible */
	if (access(selpath, R_OK | W_OK) == -1) {
		errno == ENOENT ? printmsg(messages[MSG_0_SELECTED]) : printwarn(NULL);
		return FALSE;
	}

	return TRUE;
}

// Assembly:
pushq %rax
movq 0x82bb(%rip), %rdi      # 0x1a528
testq %rdi, %rdi
je 0x1229a
movl $0x6, %esi
callq 0x4710
movl %eax, %ecx
movb $0x1, %al
cmpl $-0x1, %ecx
jne 0x122b2
callq 0x40c0
movl (%rax), %edi
cmpl $0x2, %edi
jne 0x122a3
leaq 0x3c33(%rip), %rdi      # 0x15ecb
jmp 0x122ab
leaq 0x3d83(%rip), %rdi      # 0x16024
jmp 0x122ab
callq 0x4870
movq %rax, %rdi
callq 0xee6f
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: getreadline
static char *getreadline(const char *prompt)
{
	exitcurses();

	char *input = readline(prompt);

	refresh();

	if (input && input[0]) {
		add_history(input);
		xstrsncpy(g_buf, input, CMD_LEN_MAX);
		free(input);
		return g_buf;
	}

	free(input);
	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4890
movq %rbx, %rdi
callq 0x43b0
movq %rax, %rbx
movq 0x74e4(%rip), %rax      # 0x19f90
movq (%rax), %rdi
callq 0x4440
testq %rbx, %rbx
je 0x12aed
cmpb $0x0, (%rbx)
je 0x12aed
movq %rbx, %rdi
callq 0x41b0
leaq 0x7c83(%rip), %r14      # 0x1a750
movl $0x1200, %ecx           # imm = 0x1200
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x12af0
movb $0x0, 0x8e64(%rip)      # 0x1b94f
jmp 0x12af0
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x4090
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: get_archive_cmd
static char *get_archive_cmd(const char *archive)
{
	uchar_t i = 3;

	if (!g_state.usebsdtar && getutil(utils[UTIL_ATOOL]))
		i = 0;
	else if (getutil(utils[UTIL_BSDTAR]))
		i = 1;
	else if (is_suffix(archive, ".zip"))
		i = 2;
	// else tar

	return archive_cmd[i];
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testb $0x1, 0x7a16(%rip)      # 0x1a527
jne 0x12b37
leaq 0x396b(%rip), %rdi      # 0x16485
leaq 0x331b(%rip), %rsi      # 0x15e3c
xorl %r14d, %r14d
xorl %edx, %edx
xorl %ecx, %ecx
movl $0xc, %r8d
callq 0xf5fc
testl %eax, %eax
je 0x12b70
leaq 0x3947(%rip), %rdi      # 0x16485
leaq 0x32fd(%rip), %rsi      # 0x15e42
xorl %edx, %edx
xorl %ecx, %ecx
movl $0xc, %r8d
callq 0xf5fc
testl %eax, %eax
je 0x12b6a
movq %rbx, %rdi
callq 0x13c9e
movzbl %al, %r14d
xorq $0x3, %r14
jmp 0x12b70
movl $0x1, %r14d
leaq 0x2b91(%rip), %rcx      # 0x15708
movslq (%rcx,%r14,4), %rax
addq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: get_cwd_entry
static char *get_cwd_entry(const char *restrict cwdpath, char *entrypath, size_t *tokenlen)
{
	size_t len = xstrlen(cwdpath);
	char *end;

	if (!is_prefix(entrypath, cwdpath, len))
		return NULL;

	entrypath += len + 1; /* Add 1 for trailing / */
	end = strchr(entrypath, '/');
	if (end)
		*tokenlen = end - entrypath;
	else
		*tokenlen = xstrlen(entrypath);
	DPRINTF_U(*tokenlen);

	return entrypath;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x4490
movq %rax, %r12
subq %r13, %r12
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x40f0
testl %eax, %eax
jne 0x12be2
leaq (%r15,%r12), %rbx
incq %rbx
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x4310
testq %rax, %rax
jne 0x12bdc
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4490
subq %rbx, %rax
movq %rax, (%r14)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: printkeys
static void printkeys(kv *kvarr, char *buf, uchar_t max)
{
	uchar_t i = 0;

	for (; i < max && kvarr[i].key; ++i) {
		buf[i << 1] = ' ';
		buf[(i << 1) + 1] = kvarr[i].key;
	}

	buf[i << 1] = '\0';
}

// Assembly:
testl %edx, %edx
je 0x12c18
movzbl %dl, %ecx
xorl %eax, %eax
cmpl $0x0, (%rdi,%rax,8)
je 0x12c14
movb $0x20, (%rsi,%rax,2)
movb (%rdi,%rax,8), %dl
movb %dl, 0x1(%rsi,%rax,2)
incq %rax
cmpq %rax, %rcx
jne 0x12bf8
movq %rcx, %rax
addl %eax, %eax
jmp 0x12c1a
xorl %eax, %eax
movb $0x0, (%rsi,%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: write_lastdir
static void write_lastdir(const char *curpath, const char *outfile)
{
	bool tilde = false, ok = false;
	if (!outfile)
		xstrsncpy(cfgpath + xstrlen(cfgpath), "/.lastd", 8);
	else
		tilde = convert_tilde(outfile, g_buf);

	int fd = open(outfile
			? (tilde ? g_buf : outfile)
			: cfgpath, O_CREAT | O_WRONLY | O_TRUNC, S_IWUSR | S_IRUSR);
	if (fd >= 0) {
		memcpy(g_buf, "cd ", 3);  // NOLINT
		ssize_t l = shell_escape(g_buf + 3, sizeof(g_buf) - 3, curpath);
		ok = l >= 0 && write(fd, g_buf, l + 3) == l + 3;
		close(fd);
	}
	if (!ok)
		errexit();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0x12c46
movq %rbx, %rdi
callq 0xeef0
leaq 0x7b12(%rip), %rdi      # 0x1a750
testb %al, %al
cmoveq %rbx, %rdi
jmp 0x12c64
movq 0x8d1b(%rip), %rdi      # 0x1b968
xorl %esi, %esi
callq 0x4490
movabsq $0x647473616c2e2f, %rcx # imm = 0x647473616C2E2F
movq %rcx, (%rax)
movq %rbx, %rdi
testq %rbx, %rbx
jne 0x12c70
movq 0x8cf8(%rip), %rdi      # 0x1b968
movl $0x241, %esi            # imm = 0x241
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x46b0
testl %eax, %eax
js 0x12d81
movl %eax, %ebx
movb $0x20, 0x7ac0(%rip)     # 0x1a752
movw $0x6463, 0x7ab5(%rip)   # imm = 0x6463
movq %r14, %rdi
xorl %esi, %esi
callq 0x4490
leaq 0x7aa7(%rip), %rcx      # 0x1a753
cmpq %rcx, %r14
je 0x12d12
movb $0x27, 0x7a9b(%rip)     # 0x1a753
cmpq %r14, %rax
je 0x12d1f
subq %r14, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
movl $0x1, %r15d
xorl %ecx, %ecx
leaq 0x7a79(%rip), %rdx      # 0x1a750
leaq -0x11f7(%r15), %rsi
cmpq $-0x11fe, %rsi          # imm = 0xEE02
jbe 0x12d39
movb (%r14,%rcx), %sil
cmpb $0x27, %sil
jne 0x12d00
movl $0x27275c27, 0x3(%r15,%rdx) # imm = 0x27275C27
addq $0x4, %r15
jmp 0x12d08
movb %sil, 0x3(%r15,%rdx)
incq %r15
incq %rcx
cmpq %rcx, %rax
jne 0x12cd7
jmp 0x12d25
callq 0x40c0
movl $0x16, (%rax)
jmp 0x12d44
movl $0x1, %r15d
leaq 0x7a24(%rip), %rax      # 0x1a750
movw $0x27, 0x3(%r15,%rax)
incq %r15
jmp 0x12d4b
callq 0x40c0
movl $0x24, (%rax)
movq $-0x1, %r15
testq %r15, %r15
js 0x12d7a
addq $0x3, %r15
leaq 0x79f5(%rip), %rsi      # 0x1a750
movl %ebx, %edi
movq %r15, %rdx
callq 0x4210
movq %rax, %r14
movl %ebx, %edi
callq 0x43c0
cmpq %r15, %r14
jne 0x12d81
popq %rbx
popq %r14
popq %r15
retq
movl %ebx, %edi
callq 0x43c0
movl $0xb36, %edi            # imm = 0xB36
callq 0xff2e
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: dirwalk
static void dirwalk(char *path, int entnum, bool mountpoint)
{
	/* Loop till any core is free */
	while (active_threads == NUM_DU_THREADS);

	if (g_state.interrupt)
		return;

	pthread_mutex_lock(&running_mutex);
	int core = ffs(threadbmp) - 1;

	threadbmp &= ~(1 << core);
	++active_threads;
	pthread_mutex_unlock(&running_mutex);

	xstrsncpy(core_data[core].path, path, PATH_MAX);
	core_data[core].entnum = entnum;
	core_data[core].core = (ushort_t)core;
	core_data[core].mntpoint = mountpoint;

	pthread_t tid = 0;

	pthread_create(&tid, NULL, du_thread, (void *)&(core_data[core]));

	tolastln();
	addstr(xbasename(path));
	addstr(" [^C aborts]\n");
	refresh();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movl %edi, %r14d
movl 0x12567(%rip), %eax     # 0x25308
cmpl $0x4, %eax
je 0x12d9b
testb $0x1, 0x7778(%rip)      # 0x1a525
jne 0x12ed2
leaq 0x12556(%rip), %rbx     # 0x25310
movq %rbx, %rdi
callq 0x48e0
movl 0x772c(%rip), %eax      # 0x1a4f4
bsfl %eax, %ecx
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmovnel %ecx, %r15d
btrl %r15d, %eax
movl %eax, 0x7715(%rip)      # 0x1a4f4
incl 0x12523(%rip)           # 0x25308
movq %rbx, %rdi
callq 0x4590
movq 0x124e4(%rip), %r12     # 0x252d8
movslq %r15d, %r13
movq %r13, %rax
shlq $0xc, %rax
leaq (%rax,%r13,8), %rbx
leaq (%r12,%rbx), %r15
leaq 0x7943(%rip), %rsi      # 0x1a750
movl $0x1000, %ecx           # imm = 0x1000
movq %r15, %rdi
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x12e29
movb $0x0, 0xfff(%r15)
movl %r14d, 0x1000(%r12,%rbx)
movw %r13w, 0x1004(%r12,%rbx)
movb %bpl, 0x1006(%r12,%rbx)
movq %rsp, %rdi
movq $0x0, (%rdi)
leaq 0xe4(%rip), %rdx        # 0x12f37
xorl %esi, %esi
movq %r15, %rcx
callq 0x46a0
movq 0x712c(%rip), %r15      # 0x19f90
movq (%r15), %rdi
movzwl 0x8d1a(%rip), %esi      # 0x1bb88
decl %esi
xorl %edx, %edx
callq 0x4070
movq (%r15), %r14
leaq 0x78cf(%rip), %rbx      # 0x1a750
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4490
subq %rbx, %rax
movq %rbx, %rdi
movl $0x2f, %esi
movq %rax, %rdx
callq 0x46f0
leaq 0x1(%rax), %rsi
testq %rax, %rax
cmoveq %rbx, %rsi
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
movq (%r15), %rdi
leaq 0x346d(%rip), %rsi      # 0x1632d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
movq (%r15), %rdi
callq 0x4440
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: test_set_bit
static bool test_set_bit(uint_t nr)
{
	nr &= HASH_BITS;

	pthread_mutex_lock(&hardlink_mutex);
	ullong_t *m = ihashbmp + (nr >> 6);

	if (*m & (1 << (nr & 63))) {
		pthread_mutex_unlock(&hardlink_mutex);
		return FALSE;
	}

	*m |= 1 << (nr & 63);
	pthread_mutex_unlock(&hardlink_mutex);

	return TRUE;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x1244d(%rip), %rdi     # 0x25338
callq 0x48e0
movq 0x8bb9(%rip), %rax      # 0x1bab0
movl %ebx, %edx
shrl $0x6, %edx
movl $0x1, %esi
movl %ebx, %ecx
shll %cl, %esi
andl $0x3ffff, %edx          # imm = 0x3FFFF
movq (%rax,%rdx,8), %rcx
movslq %esi, %rsi
testq %rsi, %rcx
jne 0x12f21
movq %rcx, %rdi
orq %rsi, %rdi
movq %rdi, (%rax,%rdx,8)
testq %rsi, %rcx
sete %bl
leaq 0x1240a(%rip), %rdi     # 0x25338
callq 0x4590
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: du_thread
static void *du_thread(void *p_data)
{
	thread_data *pdata = (thread_data *)p_data;
	char *path[2] = {pdata->path, NULL};
	ullong_t tfiles = 0;
	blkcnt_t tblocks = 0;
	struct stat *sb;
	FTS *tree = fts_open(path, FTS_PHYSICAL | FTS_XDEV | FTS_NOCHDIR, 0);
	FTSENT *node;

	while ((node = fts_read(tree))) {
		if (node->fts_info & FTS_D) {
			if (g_state.interrupt)
				break;
			continue;
		}

		sb = node->fts_statp;

		if (cfg.apparentsz) {
			if (sb->st_size && DU_TEST)
				tblocks += sb->st_size;
		} else if (sb->st_blocks && DU_TEST)
			tblocks += sb->st_blocks;

		++tfiles;
	}

	fts_close(tree);

	if (pdata->entnum >= 0)
		pdents[pdata->entnum].blocks = tblocks;

	if (!pdata->mntpoint) {
		core_blocks[pdata->core] += tblocks;
		core_files[pdata->core] += tfiles;
	} else
		core_files[pdata->core] += 1;

	pthread_mutex_lock(&running_mutex);
	threadbmp |= (1 << pdata->core);
	--active_threads;
	pthread_mutex_unlock(&running_mutex);

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
movq %rbx, (%rdi)
movq $0x0, 0x8(%rdi)
xorl %r12d, %r12d
movl $0x54, %esi
xorl %edx, %edx
callq 0x42c0
movq %rax, %r14
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x43d0
testq %rax, %rax
je 0x12fde
movq %rax, %r15
movzwl 0x62(%rax), %ecx
testb $0x1, %cl
je 0x12f8f
testb $0x1, 0x759a(%rip)      # 0x1a525
je 0x12f6b
jmp 0x12fde
movq 0x68(%r15), %rax
testb $0x8, 0x752e(%rip)      # 0x1a4c8
jne 0x12fa9
cmpq $0x0, 0x40(%rax)
je 0x12fd9
leaq 0x40(%rax), %rbp
jmp 0x12fb4
cmpq $0x0, 0x30(%rax)
je 0x12fd9
leaq 0x30(%rax), %rbp
testb $0x8, %cl
jne 0x12fc2
testb $0x6, 0x62(%r15)
jne 0x12fd5
jmp 0x12fd9
cmpq $0x2, 0x10(%rax)
jb 0x12fd5
movl 0x8(%rax), %edi
callq 0x12ee1
testb %al, %al
je 0x12fb9
addq (%rbp), %r12
incq %r13
jmp 0x12f6b
movq %r14, %rdi
callq 0x4480
movslq 0x1000(%rbx), %rax
testq %rax, %rax
js 0x13025
movq 0x11077(%rip), %rcx     # 0x24070
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movabsq $0xffffffffff, %rdx     # imm = 0xFFFFFFFFFF
andq %r12, %rdx
movabsq $-0x10000000000, %rsi   # imm = 0xFFFFFF0000000000
andq 0x20(%rcx,%rax), %rsi
orq %rdx, %rsi
movq %rsi, 0x20(%rcx,%rax)
movzwl 0x1004(%rbx), %eax
movl $0x1, %ecx
cmpb $0x0, 0x1006(%rbx)
jne 0x13048
movq 0x1228f(%rip), %rcx     # 0x252d0
addq %r12, (%rcx,%rax,8)
movq %r13, %rcx
movq 0x12291(%rip), %rdx     # 0x252e0
addq %rcx, (%rdx,%rax,8)
leaq 0x122b6(%rip), %r14     # 0x25310
movq %r14, %rdi
callq 0x48e0
movb 0x1004(%rbx), %cl
movl $0x1, %eax
shll %cl, %eax
orl %eax, 0x747f(%rip)      # 0x1a4f4
decl 0x1228d(%rip)           # 0x25308
movq %r14, %rdi
callq 0x4590
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq