// File: /workspace/github_c_makefile_star2_O0/jarun[P]nnn/src/nnn.c
// Function: get_lsperms
static char *get_lsperms(mode_t mode)
{
	static const char * const rwx[] = {"---", "--x", "-w-", "-wx", "r--", "r-x", "rw-", "rwx"};
	static char bits[11] = {'\0'};

	switch (mode & S_IFMT) {
	case S_IFREG:
		bits[0] = '-';
		break;
	case S_IFDIR:
		bits[0] = 'd';
		break;
	case S_IFLNK:
		bits[0] = 'l';
		break;
	case S_IFSOCK:
		bits[0] = 's';
		break;
	case S_IFIFO:
		bits[0] = 'p';
		break;
	case S_IFBLK:
		bits[0] = 'b';
		break;
	case S_IFCHR:
		bits[0] = 'c';
		break;
	default:
		bits[0] = '?';
		break;
	}

	xstrsncpy(&bits[1], rwx[(mode >> 6) & 7], 4);
	xstrsncpy(&bits[4], rwx[(mode >> 3) & 7], 4);
	xstrsncpy(&bits[7], rwx[(mode & 7)], 4);

	if (mode & S_ISUID)
		bits[3] = (mode & 0100) ? 's' : 'S';  /* user executable */
	if (mode & S_ISGID)
		bits[6] = (mode & 0010) ? 's' : 'l';  /* group executable */
	if (mode & S_ISVTX)
		bits[9] = (mode & 0001) ? 't' : 'T';  /* others executable */

	return bits;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
movl %eax, -0x8(%rbp)
subl $0x1000, %eax           # imm = 0x1000
je 0x1888b
jmp 0x1881f
movl -0x8(%rbp), %eax
subl $0x2000, %eax           # imm = 0x2000
je 0x1889d
jmp 0x1882b
movl -0x8(%rbp), %eax
subl $0x4000, %eax           # imm = 0x4000
je 0x18870
jmp 0x18837
movl -0x8(%rbp), %eax
subl $0x6000, %eax           # imm = 0x6000
je 0x18894
jmp 0x18843
movl -0x8(%rbp), %eax
subl $0x8000, %eax           # imm = 0x8000
je 0x18867
jmp 0x1884f
movl -0x8(%rbp), %eax
subl $0xa000, %eax           # imm = 0xA000
je 0x18879
jmp 0x1885b
movl -0x8(%rbp), %eax
subl $0xc000, %eax           # imm = 0xC000
je 0x18882
jmp 0x188a6
movb $0x2d, 0x12e02(%rip)    # 0x2b670
jmp 0x188ad
movb $0x64, 0x12df9(%rip)    # 0x2b670
jmp 0x188ad
movb $0x6c, 0x12df0(%rip)    # 0x2b670
jmp 0x188ad
movb $0x73, 0x12de7(%rip)    # 0x2b670
jmp 0x188ad
movb $0x70, 0x12dde(%rip)    # 0x2b670
jmp 0x188ad
movb $0x62, 0x12dd5(%rip)    # 0x2b670
jmp 0x188ad
movb $0x63, 0x12dcc(%rip)    # 0x2b670
jmp 0x188ad
movb $0x3f, 0x12dc3(%rip)    # 0x2b670
movl -0x4(%rbp), %eax
shrl $0x6, %eax
andl $0x7, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x740f(%rip), %rax      # 0x1fcd0
movq (%rax,%rcx,8), %rsi
leaq 0x12da4(%rip), %rdi     # 0x2b670
addq $0x1, %rdi
movl $0x4, %edx
callq 0x6250
movl -0x4(%rbp), %eax
shrl $0x3, %eax
andl $0x7, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x73e2(%rip), %rax      # 0x1fcd0
movq (%rax,%rcx,8), %rsi
leaq 0x12d77(%rip), %rdi     # 0x2b670
addq $0x4, %rdi
movl $0x4, %edx
callq 0x6250
movl -0x4(%rbp), %eax
andl $0x7, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x73b8(%rip), %rax      # 0x1fcd0
movq (%rax,%rcx,8), %rsi
leaq 0x12d4d(%rip), %rdi     # 0x2b670
addq $0x7, %rdi
movl $0x4, %edx
callq 0x6250
movl -0x4(%rbp), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x1895a
movl -0x4(%rbp), %edx
andl $0x40, %edx
movl $0x53, %eax
movl $0x73, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, 0x12d19(%rip)      # 0x2b673
movl -0x4(%rbp), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x18983
movl -0x4(%rbp), %edx
andl $0x8, %edx
movl $0x6c, %eax
movl $0x73, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, 0x12cf3(%rip)      # 0x2b676
movl -0x4(%rbp), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x189ac
movl -0x4(%rbp), %edx
andl $0x1, %edx
movl $0x54, %eax
movl $0x74, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, 0x12ccd(%rip)      # 0x2b679
leaq 0x12cbd(%rip), %rax     # 0x2b670
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)