// File: /workspace/github_c_makefile_star2_O2/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, 0xbfea(%rip)      # 0x1ab8c
je 0xec1b
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %r14
movslq 0x144b9(%rip), %rax     # 0x23078
imulq $0x30, %rax, %r13
addq 0x144a6(%rip), %r13     # 0x23070
movl $0xf000, %eax           # imm = 0xF000
andl 0x14(%r13), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0xec27
movzwl 0x25(%r13), %r15d
leaq -0x1(%r15), %rsi
movq (%r13), %rbx
movq %rbx, %rdi
callq 0xdc7a
subq %rax, %rbx
leaq (%rbx,%r15), %rcx
decq %rcx
addl $-0x6, %ecx
cmpl $-0x4, %ecx
leaq 0x576a(%rip), %rcx      # 0x14370
movq %rax, %rdx
cmovbq %rcx, %rdx
testq %rax, %rax
cmoveq %rcx, %rdx
movq %rdx, 0x18(%rsp)
jmp 0xec33
leaq 0x574a(%rip), %rdi      # 0x1436c
jmp 0xd5b9
leaq 0x5742(%rip), %rax      # 0x14370
movq %rax, 0x18(%rsp)
movq 0xa356(%rip), %rbx      # 0x18f90
movq (%rbx), %rdi
movl 0xa885(%rip), %esi      # 0x194c8
shrl $0x5, %esi
andl $0x700, %esi            # imm = 0x700
addl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x4120
testb $0x2, 0xa86a(%rip)      # 0x194ca
je 0xecc1
movq 0x14407(%rip), %rax     # 0x23070
movslq 0x14408(%rip), %rcx     # 0x23078
imulq $0x30, %rcx, %rcx
movq (%rax,%rcx), %rdx
leaq 0x5630(%rip), %rdi      # 0x142af
leaq 0x57f5(%rip), %rsi      # 0x1447b
pushq $-0x1
popq %rcx
xorl %r8d, %r8d
callq 0xf969
testb %al, %al
je 0xecc1
movq (%rbx), %rdi
movzwl 0xbee9(%rip), %esi      # 0x1ab88
addl $-0x2, %esi
pushq $0x2
popq %rdx
callq 0x4070
cmpl $-0x1, %eax
je 0xecc1
movq (%rbx), %rdi
leaq 0xaa97(%rip), %rsi      # 0x19750
pushq $-0x1
popq %rdx
callq 0x41c0
movq (%rbx), %rdi
movzwl 0xbebd(%rip), %esi      # 0x1ab88
decl %esi
xorl %edx, %edx
callq 0x4070
movl 0x1439e(%rip), %ebp     # 0x23078
incl %ebp
movl 0xbeaa(%rip), %edi      # 0x1ab8c
callq 0x5d9b
leaq 0x5684(%rip), %rdi      # 0x14372
movl %ebp, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x45f0
movl $0x200000, %eax         # imm = 0x200000
andl 0xa81f(%rip), %eax      # 0x19524
orl 0x145a1(%rip), %eax     # 0x232ac
je 0xed91
movq (%rbx), %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x4120
movq (%rbx), %rdi
pushq $0x20
popq %rsi
callq 0x4850
movl 0xa7f3(%rip), %eax      # 0x19524
testw %ax, %ax
js 0xed40
btl $0x15, %eax
jae 0xed4b
pushq $0x2b
jmp 0xed42
pushq $0x2a
popq %rsi
movq (%rbx), %rdi
callq 0x4850
movl 0x1455b(%rip), %edi     # 0x232ac
testl %edi, %edi
je 0xed6b
movq (%rbx), %r15
callq 0x5d9b
pushq $-0x1
popq %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x41c0
movq (%rbx), %rdi
pushq $0x20
popq %rbp
movl %ebp, %esi
callq 0x4850
movq (%rbx), %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x4730
movq (%rbx), %rdi
movl %ebp, %esi
callq 0x4850
movl 0xa731(%rip), %eax      # 0x194c8
testb $0x10, %al
jne 0xeddc
andw $0x0, 0x14(%rsp)
andl $0x0, 0x10(%rsp)
testb $0x1, %al
je 0xedb5
movq (%rbx), %rdi
pushq $0x46
popq %rsi
callq 0x4850
leaq 0x10(%rsp), %rdi
callq 0x1179c
movq (%rbx), %rdi
testl %eax, %eax
je 0xee83
leaq 0x10(%rsp), %rsi
pushq $-0x1
popq %rdx
callq 0x41c0
jmp 0xee8b
movq 0x1551d(%rip), %rdi     # 0x24300
xorl %eax, %eax
cmpb $0x0, 0x142d8(%rip)     # 0x230c4
sete %al
leal (%rax,%rax,8), %ecx
shlq %cl, %rdi
callq 0x11574
leaq 0x15563(%rip), %r15     # 0x24364
leaq 0x20(%rsp), %r12
pushq $0xc
popq %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x6016
xorl %eax, %eax
testb $0x8, 0xa6ab(%rip)      # 0x194c8
sete %al
leal (%rax,%rax,2), %ebp
addl $0x61, %ebp
movq %r14, %rdi
xorl %esi, %esi
callq 0x11738
movq %rax, %rdi
callq 0x11574
movq 0x154b9(%rip), %r8      # 0x242f8
movabsq $0xffffffffff, %r9      # imm = 0xFFFFFFFFFF
andq 0x20(%r13), %r9
xorl %eax, %eax
cmpb $0x0, 0x1426e(%rip)     # 0x230c4
sete %al
leal (%rax,%rax,8), %ecx
shlq %cl, %r9
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
leaq 0x550a(%rip), %rdi      # 0x14379
movl %ebp, %esi
movq %r12, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x45f0
jmp 0xf1bf
pushq $0x20
popq %rsi
callq 0x4850
leaq 0x8(%r13), %rdi
movzbl 0x27(%r13), %esi
callq 0x114e5
movq (%rbx), %rdi
pushq $0x20
popq %rsi
callq 0x4850
movl 0x14(%r13), %r12d
movl %r12d, %eax
andl $0xf000, %eax           # imm = 0xF000
addl $0xfffff000, %eax       # imm = 0xFFFFF000
movb $0x3f, %cl
cmpl $0xbfff, %eax           # imm = 0xBFFF
ja 0xeecb
shrl $0xc, %eax
leaq 0x4850(%rip), %rcx      # 0x13718
movb (%rax,%rcx), %cl
movq (%rbx), %r14
movb %cl, 0x1549c(%rip)      # 0x24370
movl %r12d, %eax
shrl $0x3, %eax
andl $0x38, %eax
leaq 0x9e2c(%rip), %rbp      # 0x18d10
movq (%rax,%rbp), %rsi
leaq 0x15482(%rip), %rdi     # 0x24371
pushq $0x4
popq %r15
movq %r15, %rdx
callq 0x6016
movl %r12d, %eax
andl $0x38, %eax
movq (%rax,%rbp), %rsi
leaq 0x15468(%rip), %rdi     # 0x24374
movq %r15, %rdx
callq 0x6016
movl %r12d, %eax
andl $0x7, %eax
movq (%rbp,%rax,8), %rsi
leaq 0x15451(%rip), %rdi     # 0x24377
movq %r15, %rdx
callq 0x6016
btl $0xb, %r12d
jae 0xef47
movzbl %r12b, %eax
shrl $0x6, %eax
shlb $0x5, %al
orb $0x53, %al
movb %al, 0x1542c(%rip)      # 0x24373
btl $0xa, %r12d
jae 0xef61
testb $0x8, %r12b
pushq $0x6c
popq %rax
pushq $0x73
popq %rcx
cmovel %eax, %ecx
movb %cl, 0x15415(%rip)      # 0x24376
btl $0x9, %r12d
jae 0xef7b
andb $0x1, %r12b
shlb $0x5, %r12b
orb $0x54, %r12b
movb %r12b, 0x153fe(%rip)    # 0x24379
leaq 0x153ee(%rip), %rsi     # 0x24370
pushq $-0x1
popq %rdx
movq %r14, %rdi
callq 0x41c0
movq (%rbx), %rdi
pushq $0x20
popq %rsi
callq 0x4850
testb $-0x80, 0xa587(%rip)    # 0x19526
je 0xf05f
movq (%rbx), %r14
movl 0x28(%r13), %ebp
cmpl %ebp, 0xa546(%rip)      # 0x194f8
jne 0xefbd
movq 0x153c5(%rip), %rsi     # 0x24380
jmp 0xefdd
movl %ebp, %edi
callq 0x4280
movl %ebp, 0xa52e(%rip)      # 0x194f8
testq %rax, %rax
je 0xefd4
movq (%rax), %rsi
jmp 0xefd6
xorl %esi, %esi
movq %rsi, 0x153a3(%rip)     # 0x24380
testq %rsi, %rsi
jne 0xefec
movl %ebp, %edi
callq 0x5d9b
movq %rax, %rsi
pushq $-0x1
popq %rdx
movq %r14, %rdi
callq 0x41c0
movq (%rbx), %rdi
pushq $0x3a
popq %rsi
callq 0x4850
movq (%rbx), %r14
movl 0x2c(%r13), %ebp
cmpl %ebp, 0xa4ed(%rip)      # 0x194fc
jne 0xf01a
movq 0x15370(%rip), %rsi     # 0x24388
jmp 0xf03a
movl %ebp, %edi
callq 0x4340
movl %ebp, 0xa4d5(%rip)      # 0x194fc
testq %rax, %rax
je 0xf031
movq (%rax), %rsi
jmp 0xf033
xorl %esi, %esi
movq %rsi, 0x1534e(%rip)     # 0x24388
testq %rsi, %rsi
jne 0xf049
movl %ebp, %edi
callq 0x5d9b
movq %rax, %rsi
pushq $-0x1
popq %rdx
movq %r14, %rdi
callq 0x41c0
movq (%rbx), %rdi
pushq $0x20
popq %rsi
callq 0x4850
movl $0xf000, %eax           # imm = 0xF000
andl 0x14(%r13), %eax
cmpl $0xa000, %eax           # imm = 0xA000
jne 0xf0b1
testb $0x2, 0xa454(%rip)      # 0x194ca
jne 0xf1b7
movq (%r13), %rdi
leaq 0xa6c9(%rip), %r12      # 0x19750
movl $0x1000, %edx           # imm = 0x1000
movq %r12, %rsi
callq 0x41e0
movq %rax, %r14
movq (%rbx), %r15
testl %r14d, %r14d
js 0xf155
movl %r14d, %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
jmp 0xf159
movq (%rbx), %r14
movq 0x18(%r13), %rdi
callq 0x11574
leaq 0x152a0(%rip), %rsi     # 0x24364
pushq $-0x1
popq %rbp
movq %r14, %rdi
movl %ebp, %edx
callq 0x41c0
movq (%rbx), %rdi
pushq $0x20
popq %rsi
callq 0x4850
movq (%rbx), %rdi
movq 0x18(%rsp), %rsi
movl %ebp, %edx
callq 0x41c0
testb $0x2, 0x27(%r13)
je 0xf1b7
movq (%r13), %rdi
leaq 0x20(%rsp), %rsi
callq 0x4300
cmpl $-0x1, %eax
je 0xf1b7
movq (%rbx), %rdi
pushq $0x20
popq %rsi
callq 0x4850
movq (%rbx), %r14
movl 0x30(%rsp), %edi
callq 0x5d9b
pushq $-0x1
popq %rbp
movq %r14, %rdi
movq %rax, %rsi
movl %ebp, %edx
callq 0x41c0
movq (%rbx), %rdi
pushq $0x2d
popq %rsi
callq 0x4850
movq (%rbx), %r14
movl 0x28(%rsp), %edi
callq 0x5d9b
movq %r14, %rdi
movq %rax, %rsi
movl %ebp, %edx
jmp 0xf1b2
movq 0x18(%r13), %rdi
callq 0x11574
leaq 0x151ff(%rip), %rsi     # 0x24364
pushq $-0x1
popq %rbp
movq %r15, %rdi
movl %ebp, %edx
callq 0x41c0
cmpl $0x2, %r14d
jl 0xf1b7
movq (%rbx), %rdi
leaq 0x521c(%rip), %rsi      # 0x1439e
movl %ebp, %edx
callq 0x41c0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xf195
movswl 0x2(%rdi), %ebp
movzwl 0x140fc(%rip), %eax     # 0x23298
subl %ebp, %eax
cmpl %r14d, %eax
cmovgel %r14d, %eax
cltq
movb $0x0, (%rax,%r12)
pushq $-0x1
popq %rdx
movq %r12, %rsi
callq 0x41c0
movq (%rbx), %rdi
callq 0x4840
movq (%rbx), %rdi
movl 0xa300(%rip), %esi      # 0x194c8
shrl $0x5, %esi
andl $0x700, %esi            # imm = 0x700
addl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x4730
movq (%rbx), %rdi
movl 0x13e91(%rip), %esi     # 0x23078
subl 0x140bb(%rip), %esi     # 0x232a8
addl $0x2, %esi
xorl %edx, %edx
callq 0x4070
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq