// File: /workspace/github_c_makefile_star2_O3/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, 0xb741(%rip)      # 0x1bb8c
je 0x104c8
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %r14
movslq 0x13c10(%rip), %rax     # 0x24078
leaq (%rax,%rax,2), %r13
shlq $0x4, %r13
addq 0x13bf9(%rip), %r13     # 0x24070
movl $0xf000, %eax           # imm = 0xF000
andl 0x14(%r13), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x104d4
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 0x5ed4(%rip), %rcx      # 0x1638c
movq %rax, %rbx
cmovbq %rcx, %rbx
testq %rax, %rax
cmoveq %rcx, %rbx
jmp 0x104db
leaq 0x5eb9(%rip), %rdi      # 0x16388
jmp 0xec60
leaq 0x5eb1(%rip), %rbx      # 0x1638c
movq 0x9aae(%rip), %r12      # 0x19f90
movq (%r12), %rdi
movl 0x9fdc(%rip), %esi      # 0x1a4c8
shrl $0x5, %esi
andl $0x700, %esi            # imm = 0x700
addl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x4120
testb $0x2, 0x9fc1(%rip)      # 0x1a4ca
je 0x10576
movq 0x13b5e(%rip), %rax     # 0x24070
movslq 0x13b5f(%rip), %rcx     # 0x24078
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rdx
leaq 0x5d9f(%rip), %rdi      # 0x162cb
leaq 0x5f64(%rip), %rsi      # 0x16497
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
callq 0x11434
testb %al, %al
je 0x10576
movq (%r12), %rdi
movzwl 0xb639(%rip), %esi      # 0x1bb88
addl $-0x2, %esi
movl $0x2, %edx
callq 0x4070
cmpl $-0x1, %eax
je 0x10576
movq (%r12), %rdi
leaq 0xa1e4(%rip), %rsi      # 0x1a750
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
movq (%r12), %rdi
movzwl 0xb607(%rip), %esi      # 0x1bb88
decl %esi
xorl %edx, %edx
callq 0x4070
movl 0x13ae8(%rip), %ebp     # 0x24078
incl %ebp
movl 0xb5f4(%rip), %edi      # 0x1bb8c
callq 0x5f73
leaq 0x5dea(%rip), %rdi      # 0x1638e
movl %ebp, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x45f0
movl $0x200000, %eax         # imm = 0x200000
andl 0x9f69(%rip), %eax      # 0x1a524
orl 0x13ceb(%rip), %eax     # 0x242ac
je 0x10658
movq (%r12), %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x4120
movq (%r12), %rdi
movl $0x20, %esi
callq 0x4850
movl 0x9f39(%rip), %eax      # 0x1a524
movl $0x2a, %esi
testw %ax, %ax
js 0x10600
movl $0x2b, %esi
btl $0x15, %eax
jae 0x10609
movq (%r12), %rdi
callq 0x4850
movl 0x13c9d(%rip), %edi     # 0x242ac
testl %edi, %edi
je 0x1062c
movq (%r12), %r15
callq 0x5f73
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 0x9e6a(%rip), %eax      # 0x1a4c8
testb $0x10, %al
jne 0x106ad
movw $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
testb $0x1, %al
je 0x10683
movq (%r12), %rdi
movl $0x46, %esi
callq 0x4850
leaq 0x8(%rsp), %rdi
callq 0x135c1
movq (%r12), %rdi
testl %eax, %eax
je 0x1075d
leaq 0x8(%rsp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
jmp 0x10767
movq 0x14c4c(%rip), %rdi     # 0x25300
xorl %eax, %eax
cmpb $0x0, 0x13a07(%rip)     # 0x240c4
sete %al
leal (%rax,%rax,8), %ecx
shlq %cl, %rdi
callq 0x1330c
leaq 0x14c92(%rip), %rsi     # 0x25364
leaq 0x10(%rsp), %rdi
movl $0xc, %ecx
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x106ed
movb $0x0, 0x1b(%rsp)
xorl %eax, %eax
testb $0x8, 0x9dd2(%rip)      # 0x1a4c8
sete %al
leal (%rax,%rax,2), %ebp
addl $0x61, %ebp
movq %r14, %rdi
xorl %esi, %esi
callq 0x1355d
movq %rax, %rdi
callq 0x1330c
movq 0x14be0(%rip), %r8      # 0x252f8
movabsq $0xffffffffff, %r9      # imm = 0xFFFFFFFFFF
andq 0x20(%r13), %r9
xorl %eax, %eax
cmpb $0x0, 0x13995(%rip)     # 0x240c4
sete %al
leal (%rax,%rax,8), %ecx
shlq %cl, %r9
movq %rbx, (%rsp)
leaq 0x5c52(%rip), %rdi      # 0x16395
leaq 0x14c1a(%rip), %rcx     # 0x25364
leaq 0x10(%rsp), %rdx
movl %ebp, %esi
xorl %eax, %eax
callq 0x45f0
jmp 0x10af9
movl $0x20, %esi
callq 0x4850
leaq 0x8(%r13), %rdi
movzbl 0x27(%r13), %esi
callq 0x1327d
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 0x107aa
shrl $0xc, %eax
leaq 0x4f71(%rip), %rcx      # 0x15718
movb (%rax,%rcx), %cl
movq (%r12), %r14
movb %cl, 0x14bbc(%rip)      # 0x25370
movl %r15d, %eax
shrl $0x3, %eax
andl $0x38, %eax
leaq 0x954c(%rip), %rbp      # 0x19d10
movq (%rax,%rbp), %rsi
leaq 0x14ba2(%rip), %rdi     # 0x25371
movl $0x4, %ecx
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x107e7
movb $0x0, 0x14b8d(%rip)     # 0x25374
movl %r15d, %eax
andl $0x38, %eax
movq (%rax,%rbp), %rsi
leaq 0x14b7c(%rip), %rdi     # 0x25374
movl $0x4, %ecx
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x10810
movb $0x0, 0x14b67(%rip)     # 0x25377
movl %r15d, %eax
andl $0x7, %eax
movq (%rbp,%rax,8), %rsi
leaq 0x14b55(%rip), %rdi     # 0x25377
movl $0x4, %ecx
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x1083a
movb $0x0, 0x14b40(%rip)     # 0x2537a
btl $0xb, %r15d
jae 0x10853
movzbl %r15b, %eax
shrl $0x6, %eax
shlb $0x5, %al
orb $0x53, %al
movb %al, 0x14b20(%rip)      # 0x25373
btl $0xa, %r15d
jae 0x10871
testb $0x8, %r15b
movl $0x6c, %eax
movl $0x73, %ecx
cmovel %eax, %ecx
movb %cl, 0x14b05(%rip)      # 0x25376
btl $0x9, %r15d
jae 0x1088b
andb $0x1, %r15b
shlb $0x5, %r15b
orb $0x54, %r15b
movb %r15b, 0x14aee(%rip)    # 0x25379
leaq 0x14ade(%rip), %rsi     # 0x25370
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
movq (%r12), %rdi
movl $0x20, %esi
callq 0x4850
testb $-0x80, 0x9c72(%rip)    # 0x1a526
je 0x10980
movq (%r12), %r14
movl 0x28(%r13), %ebp
cmpl %ebp, 0x9c30(%rip)      # 0x1a4f8
jne 0x108d3
movq 0x14aaf(%rip), %rsi     # 0x25380
jmp 0x108f3
movl %ebp, %edi
callq 0x4280
movl %ebp, 0x9c18(%rip)      # 0x1a4f8
testq %rax, %rax
je 0x108ea
movq (%rax), %rsi
jmp 0x108ec
xorl %esi, %esi
movq %rsi, 0x14a8d(%rip)     # 0x25380
testq %rsi, %rsi
jne 0x10902
movl %ebp, %edi
callq 0x5f73
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, 0x9bd1(%rip)      # 0x1a4fc
jne 0x10936
movq 0x14a54(%rip), %rsi     # 0x25388
jmp 0x10956
movl %ebp, %edi
callq 0x4340
movl %ebp, 0x9bb9(%rip)      # 0x1a4fc
testq %rax, %rax
je 0x1094d
movq (%rax), %rsi
jmp 0x1094f
xorl %esi, %esi
movq %rsi, 0x14a32(%rip)     # 0x25388
testq %rsi, %rsi
jne 0x10965
movl %ebp, %edi
callq 0x5f73
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 0x109d3
testb $0x2, 0x9b33(%rip)      # 0x1a4ca
jne 0x10af0
movq (%r13), %rdi
leaq 0x9da8(%rip), %rbx      # 0x1a750
movl $0x1000, %edx           # imm = 0x1000
movq %rbx, %rsi
callq 0x41e0
movq %rax, %r14
movq (%r12), %r15
testl %r14d, %r14d
js 0x10a83
movl %r14d, %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
jmp 0x10a87
movq (%r12), %r14
movq 0x18(%r13), %rdi
callq 0x1330c
leaq 0x1497d(%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 0x10af0
movq (%r13), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4300
cmpl $-0x1, %eax
je 0x10af0
movq (%r12), %rdi
movl $0x20, %esi
callq 0x4850
movq (%r12), %rbx
movl 0x20(%rsp), %edi
callq 0x5f73
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 0x5f73
movq %rbx, %rdi
movq %rax, %rsi
jmp 0x10ae6
movq 0x18(%r13), %rdi
callq 0x1330c
leaq 0x148d1(%rip), %rsi     # 0x25364
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r15, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
cmpl $0x2, %r14d
jl 0x10af0
movq (%r12), %rdi
leaq 0x5904(%rip), %rsi      # 0x163ba
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x41c0
movq (%r12), %rdi
testq %rdi, %rdi
je 0x10acd
movswl 0x2(%rdi), %ebp
movzwl 0x137c4(%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 0x99c5(%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 0x13555(%rip), %esi     # 0x24078
subl 0x1377f(%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