// File: /workspace/github_c_makefile_star2_O1/jarun[P]nnn/src/nnn.c
// Function: statusbar
static void statusbar(char *path)
{
	int i = 0, len = 0;
	char *ptr;
	pEntry pent = &pdents[cur];

	if (!ndents) {
		printmsg("0/0");
		return;
	}

	/* Get the file extension for regular files */
	if (S_ISREG(pent->mode)) {
		i = (int)(pent->nlen - 1);
		ptr = xextension(pent->name, i);
		if (ptr)
			len = i - (ptr - pent->name);
		if (!ptr || len > 5 || len < 2)
			ptr = "\b";
	} else
		ptr = "\b";

	attron(COLOR_PAIR(cfg.curctx + 1));

	if (cfg.fileinfo && get_output("file", "-b", pdents[cur].name, -1, FALSE))
		mvaddstr(xlines - 2, 2, g_buf);

	tolastln();

	printw("%d/%s ", cur + 1, xitoa(ndents));

	if (g_state.selmode || nselected) {
		attron(A_REVERSE);
		addch(' ');
		if (g_state.rangesel)
			addch('*');
		else if (g_state.selmode)
			addch('+');
		if (nselected)
			addstr(xitoa(nselected));
		addch(' ');
		attroff(A_REVERSE);
		addch(' ');
	}

	if (cfg.blkorder) { /* du mode */
		char buf[24];

		xstrsncpy(buf, coolsize(dir_blocks << blk_shift), 12);

		printw("%cu:%s avail:%s files:%llu %lluB %s\n",
		       (cfg.apparentsz ? 'a' : 'd'), buf, coolsize(get_fs_info(path, VFS_AVAIL)),
		       num_files, (ullong_t)pent->blocks << blk_shift, ptr);
	} else { /* light or detail mode */
		char sort[] = "\0\0\0\0\0";

		if (cfg.filtermode)
			addch('F');

		getorderstr(sort) ? addstr(sort) : addch(' ');

		/* Timestamp */
		print_time(&pent->sec, pent->flags);

		addch(' ');
		addstr(get_lsperms(pent->mode));
		addch(' ');
#ifndef NOUG
		if (g_state.uidgid) {
			addstr(getpwname(pent->uid));
			addch(':');
			addstr(getgrname(pent->gid));
			addch(' ');
		}
#endif
		if (S_ISLNK(pent->mode)) {
			if (!cfg.fileinfo) {
				i = readlink(pent->name, g_buf, PATH_MAX);
				addstr(coolsize(i >= 0 ? i : pent->size)); /* Show symlink size */
				if (i > 1) { /* Show symlink target */
					int y;

					addstr(" ->");
					getyx(stdscr, len, y);
					i = MIN(i, xcols - y);
					g_buf[i] = '\0';
					addstr(g_buf);
				}
			}
		} else {
			addstr(coolsize(pent->size));
			addch(' ');
			addstr(ptr);
			if (pent->flags & HARD_LINK) {
				struct stat sb;

				if (stat(pent->name, &sb) != -1) {
					addch(' ');
					addstr(xitoa((int)sb.st_nlink)); /* Show number of links */
					addch('-');
					addstr(xitoa((int)sb.st_ino)); /* Show inode number */
				}
			}
		}
		clrtoeol();
	}

	attroff(COLOR_PAIR(cfg.curctx + 1));
	/* Place HW cursor on current for Braille systems */
	tocursor();
}

// Assembly:
cmpl $0x0, 0xb516(%rip)      # 0x1bb8c
je 0x106f3
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %r14
movslq 0x139e5(%rip), %rax     # 0x24078
leaq (%rax,%rax,2), %r13
shlq $0x4, %r13
addq 0x139ce(%rip), %r13     # 0x24070
movl $0xf000, %eax           # imm = 0xF000
andl 0x14(%r13), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x106ff
movzwl 0x25(%r13), %r15d
leaq -0x1(%r15), %rdx
movq (%r13), %rbx
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x46f0
subq %rax, %rbx
leaq (%rbx,%r15), %rcx
decq %rcx
addl $-0x6, %ecx
cmpl $-0x4, %ecx
leaq 0x5c8f(%rip), %rcx      # 0x16372
movq %rax, %rbx
cmovbq %rcx, %rbx
testq %rax, %rax
cmoveq %rcx, %rbx
jmp 0x10706
leaq 0x5c74(%rip), %rdi      # 0x1636e
jmp 0xee6f
leaq 0x5c6c(%rip), %rbx      # 0x16372
movq 0x9883(%rip), %r12      # 0x19f90
movq (%r12), %rdi
movl 0x9db1(%rip), %esi      # 0x1a4c8
shrl $0x5, %esi
andl $0x700, %esi            # imm = 0x700
addl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x4120
testb $0x2, 0x9d96(%rip)      # 0x1a4ca
je 0x107a1
movq 0x13933(%rip), %rax     # 0x24070
movslq 0x13934(%rip), %rcx     # 0x24078
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rdx
leaq 0x5b5a(%rip), %rdi      # 0x162b1
leaq 0x5d1f(%rip), %rsi      # 0x1647d
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
callq 0x117c7
testb %al, %al
je 0x107a1
movq (%r12), %rdi
movzwl 0xb40e(%rip), %esi      # 0x1bb88
addl $-0x2, %esi
movl $0x2, %edx
callq 0x4070
cmpl $-0x1, %eax
je 0x107a1
movq (%r12), %rdi
leaq 0x9fb9(%rip), %rsi      # 0x1a750
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
movq (%r12), %rdi
movzwl 0xb3dc(%rip), %esi      # 0x1bb88
decl %esi
xorl %edx, %edx
callq 0x4070
movl 0x138bd(%rip), %ebp     # 0x24078
incl %ebp
movl 0xb3c9(%rip), %edi      # 0x1bb8c
callq 0x5fa8
leaq 0x5ba5(%rip), %rdi      # 0x16374
movl %ebp, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x45f0
movl $0x200000, %eax         # imm = 0x200000
andl 0x9d3e(%rip), %eax      # 0x1a524
orl 0x13ac0(%rip), %eax     # 0x242ac
je 0x10883
movq (%r12), %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x4120
movq (%r12), %rdi
movl $0x20, %esi
callq 0x4850
movl 0x9d0e(%rip), %eax      # 0x1a524
movl $0x2a, %esi
testw %ax, %ax
js 0x1082b
movl $0x2b, %esi
btl $0x15, %eax
jae 0x10834
movq (%r12), %rdi
callq 0x4850
movl 0x13a72(%rip), %edi     # 0x242ac
testl %edi, %edi
je 0x10857
movq (%r12), %r15
callq 0x5fa8
movq %r15, %rdi
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
movq (%r12), %rdi
movl $0x20, %esi
callq 0x4850
movq (%r12), %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x4730
movq (%r12), %rdi
movl $0x20, %esi
callq 0x4850
movl 0x9c3f(%rip), %eax      # 0x1a4c8
testb $0x10, %al
jne 0x108d8
movw $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
testb $0x1, %al
je 0x108ae
movq (%r12), %rdi
movl $0x46, %esi
callq 0x4850
leaq 0x8(%rsp), %rdi
callq 0x13929
movq (%r12), %rdi
testl %eax, %eax
je 0x10988
leaq 0x8(%rsp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
jmp 0x10992
movq 0x14a21(%rip), %rdi     # 0x25300
xorl %eax, %eax
cmpb $0x0, 0x137dc(%rip)     # 0x240c4
sete %al
leal (%rax,%rax,8), %ecx
shlq %cl, %rdi
callq 0x1365a
leaq 0x14a67(%rip), %rsi     # 0x25364
leaq 0x10(%rsp), %rdi
movl $0xc, %ecx
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x10918
movb $0x0, 0x1b(%rsp)
xorl %eax, %eax
testb $0x8, 0x9ba7(%rip)      # 0x1a4c8
sete %al
leal (%rax,%rax,2), %ebp
addl $0x61, %ebp
movq %r14, %rdi
xorl %esi, %esi
callq 0x138c5
movq %rax, %rdi
callq 0x1365a
movq 0x149b5(%rip), %r8      # 0x252f8
movabsq $0xffffffffff, %r9      # imm = 0xFFFFFFFFFF
andq 0x20(%r13), %r9
xorl %eax, %eax
cmpb $0x0, 0x1376a(%rip)     # 0x240c4
sete %al
leal (%rax,%rax,8), %ecx
shlq %cl, %r9
movq %rbx, (%rsp)
leaq 0x5a0d(%rip), %rdi      # 0x1637b
leaq 0x149ef(%rip), %rcx     # 0x25364
leaq 0x10(%rsp), %rdx
movl %ebp, %esi
xorl %eax, %eax
callq 0x45f0
jmp 0x10d20
movl $0x20, %esi
callq 0x4850
leaq 0x8(%r13), %rdi
movzbl 0x27(%r13), %esi
callq 0x135cb
movq (%r12), %rdi
movl $0x20, %esi
callq 0x4850
movl 0x14(%r13), %r15d
movl %r15d, %eax
andl $0xf000, %eax           # imm = 0xF000
addl $0xfffff000, %eax       # imm = 0xFFFFF000
movb $0x3f, %cl
cmpl $0xbfff, %eax           # imm = 0xBFFF
ja 0x109d5
shrl $0xc, %eax
leaq 0x4d46(%rip), %rcx      # 0x15718
movb (%rax,%rcx), %cl
movq (%r12), %r14
movb %cl, 0x14991(%rip)      # 0x25370
movl %r15d, %eax
shrl $0x3, %eax
andl $0x38, %eax
leaq 0x9321(%rip), %rbp      # 0x19d10
movq (%rax,%rbp), %rsi
leaq 0x14977(%rip), %rdi     # 0x25371
movl $0x4, %ecx
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x10a12
movb $0x0, 0x14962(%rip)     # 0x25374
movl %r15d, %eax
andl $0x38, %eax
movq (%rax,%rbp), %rsi
leaq 0x14951(%rip), %rdi     # 0x25374
movl $0x4, %ecx
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x10a3b
movb $0x0, 0x1493c(%rip)     # 0x25377
movl %r15d, %eax
andl $0x7, %eax
movq (%rbp,%rax,8), %rsi
leaq 0x1492a(%rip), %rdi     # 0x25377
movl $0x4, %ecx
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x10a65
movb $0x0, 0x14915(%rip)     # 0x2537a
btl $0xb, %r15d
jae 0x10a7e
movzbl %r15b, %eax
shrl $0x6, %eax
shlb $0x5, %al
orb $0x53, %al
movb %al, 0x148f5(%rip)      # 0x25373
btl $0xa, %r15d
jae 0x10a9c
testb $0x8, %r15b
movl $0x6c, %eax
movl $0x73, %ecx
cmovel %eax, %ecx
movb %cl, 0x148da(%rip)      # 0x25376
btl $0x9, %r15d
jae 0x10ab6
andb $0x1, %r15b
shlb $0x5, %r15b
orb $0x54, %r15b
movb %r15b, 0x148c3(%rip)    # 0x25379
leaq 0x148b3(%rip), %rsi     # 0x25370
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
movq (%r12), %rdi
movl $0x20, %esi
callq 0x4850
testb $-0x80, 0x9a47(%rip)    # 0x1a526
je 0x10ba7
movq (%r12), %r14
movl 0x28(%r13), %ebp
cmpl %ebp, 0x9a05(%rip)      # 0x1a4f8
je 0x10b15
movl %ebp, %edi
callq 0x4280
movl %ebp, 0x99f6(%rip)      # 0x1a4f8
testq %rax, %rax
je 0x10b0c
movq (%rax), %rax
jmp 0x10b0e
xorl %eax, %eax
movq %rax, 0x1486b(%rip)     # 0x25380
movq 0x14864(%rip), %rsi     # 0x25380
testq %rsi, %rsi
jne 0x10b2b
movl %ebp, %edi
callq 0x5fa8
movq %rax, %rsi
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
movq (%r12), %rdi
movl $0x3a, %esi
callq 0x4850
movq (%r12), %r14
movl 0x2c(%r13), %ebp
cmpl %ebp, 0x99a8(%rip)      # 0x1a4fc
je 0x10b76
movl %ebp, %edi
callq 0x4340
movl %ebp, 0x9999(%rip)      # 0x1a4fc
testq %rax, %rax
je 0x10b6d
movq (%rax), %rax
jmp 0x10b6f
xorl %eax, %eax
movq %rax, 0x14812(%rip)     # 0x25388
movq 0x1480b(%rip), %rsi     # 0x25388
testq %rsi, %rsi
jne 0x10b8c
movl %ebp, %edi
callq 0x5fa8
movq %rax, %rsi
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
movq (%r12), %rdi
movl $0x20, %esi
callq 0x4850
movl $0xf000, %eax           # imm = 0xF000
andl 0x14(%r13), %eax
cmpl $0xa000, %eax           # imm = 0xA000
jne 0x10bfa
testb $0x2, 0x990c(%rip)      # 0x1a4ca
jne 0x10d17
movq (%r13), %rdi
leaq 0x9b81(%rip), %rbx      # 0x1a750
movl $0x1000, %edx           # imm = 0x1000
movq %rbx, %rsi
callq 0x41e0
movq %rax, %r14
movq (%r12), %r15
testl %r14d, %r14d
js 0x10caa
movl %r14d, %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
jmp 0x10cae
movq (%r12), %r14
movq 0x18(%r13), %rdi
callq 0x1365a
leaq 0x14756(%rip), %rsi     # 0x25364
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
movq (%r12), %rdi
movl $0x20, %esi
callq 0x4850
movq (%r12), %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
testb $0x2, 0x27(%r13)
je 0x10d17
movq (%r13), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4300
cmpl $-0x1, %eax
je 0x10d17
movq (%r12), %rdi
movl $0x20, %esi
callq 0x4850
movq (%r12), %rbx
movl 0x20(%rsp), %edi
callq 0x5fa8
movq %rbx, %rdi
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
movq (%r12), %rdi
movl $0x2d, %esi
callq 0x4850
movq (%r12), %rbx
movl 0x18(%rsp), %edi
callq 0x5fa8
movq %rbx, %rdi
movq %rax, %rsi
jmp 0x10d0d
movq 0x18(%r13), %rdi
callq 0x1365a
leaq 0x146aa(%rip), %rsi     # 0x25364
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r15, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
cmpl $0x2, %r14d
jl 0x10d17
movq (%r12), %rdi
leaq 0x56c3(%rip), %rsi      # 0x163a0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
movq (%r12), %rdi
testq %rdi, %rdi
je 0x10cf4
movswl 0x2(%rdi), %ebp
movzwl 0x1359d(%rip), %eax     # 0x24298
subl %ebp, %eax
cmpl %r14d, %eax
cmovgel %r14d, %eax
cltq
movb $0x0, (%rax,%rbx)
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
movq (%r12), %rdi
callq 0x4840
movq (%r12), %rdi
movl 0x979e(%rip), %esi      # 0x1a4c8
shrl $0x5, %esi
andl $0x700, %esi            # imm = 0x700
addl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x4730
movq (%r12), %rdi
movl 0x1332e(%rip), %esi     # 0x24078
subl 0x13558(%rip), %esi     # 0x242a8
addl $0x2, %esi
xorl %edx, %edx
callq 0x4070
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq