// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl 0x11b18(%rip), %eax     # 0x21e8c
subl $0x1, %eax
cmpl -0x4(%rbp), %eax
jge 0x1038a
movl 0x11b0a(%rip), %eax     # 0x21e8c
subl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x10390
movl -0x4(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x103a0
xorl %eax, %eax
movl %eax, -0x18(%rbp)
jmp 0x103c8
movl 0x11ae6(%rip), %eax     # 0x21e8c
subl $0x1, %eax
cmpl -0x4(%rbp), %eax
jge 0x103bc
movl 0x11ad8(%rip), %eax     # 0x21e8c
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x103c2
movl -0x4(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl 0x1a1d4(%rip), %eax     # 0x2a5a8
movl %eax, 0x1b20e(%rip)     # 0x2b5e8
movl 0x19f98(%rip), %eax     # 0x2a378
movl %eax, 0x1b27a(%rip)     # 0x2b660
movl -0x4(%rbp), %eax
movl %eax, 0x19f89(%rip)     # 0x2a378
cmpl $0x0, -0x8(%rbp)
jne 0x1048b
movl -0x4(%rbp), %eax
subl 0x1b25e(%rip), %eax     # 0x2b660
movl %eax, -0xc(%rbp)
movzwl 0x11a7c(%rip), %ecx     # 0x21e88
subl $0x4, %ecx
sarl %ecx
movl $0x3, %eax
cmpl %ecx, %eax
jge 0x10424
movl $0x3, %eax
movl %eax, -0x20(%rbp)
jmp 0x10433
movzwl 0x11a5d(%rip), %eax     # 0x21e88
subl $0x4, %eax
sarl %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x10(%rbp)
movl 0x19f39(%rip), %eax     # 0x2a378
movl 0x1a163(%rip), %ecx     # 0x2a5a8
addl -0x10(%rbp), %ecx
cmpl %ecx, %eax
jge 0x10452
cmpl $0x0, -0xc(%rbp)
jl 0x1047a
movl 0x19f20(%rip), %eax     # 0x2a378
movl 0x1a14a(%rip), %ecx     # 0x2a5a8
movzwl 0x11a23(%rip), %edx     # 0x21e88
subl $0x4, %edx
addl %edx, %ecx
subl -0x10(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x10489
cmpl $0x0, -0xc(%rbp)
jle 0x10489
movl -0xc(%rbp), %eax
addl 0x1a125(%rip), %eax     # 0x2a5a8
movl %eax, 0x1a11f(%rip)     # 0x2a5a8
jmp 0x1048b
movl 0x1a117(%rip), %eax     # 0x2a5a8
movl %eax, -0x24(%rbp)
movl 0x19ede(%rip), %eax     # 0x2a378
movl 0x119ec(%rip), %ecx     # 0x21e8c
movzwl 0x119e1(%rip), %edx     # 0x21e88
subl $0x4, %edx
subl %edx, %ecx
cmpl %ecx, %eax
jge 0x104bb
movl 0x19ec2(%rip), %eax     # 0x2a378
movl %eax, -0x28(%rbp)
jmp 0x104d0
movl 0x119cb(%rip), %eax     # 0x21e8c
movzwl 0x119c0(%rip), %ecx     # 0x21e88
subl $0x4, %ecx
subl %ecx, %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
movl -0x28(%rbp), %ecx
cmpl %ecx, %eax
jge 0x104e5
movl 0x1a0c8(%rip), %eax     # 0x2a5a8
movl %eax, -0x2c(%rbp)
jmp 0x10527
movl 0x19e8d(%rip), %eax     # 0x2a378
movl 0x1199b(%rip), %ecx     # 0x21e8c
movzwl 0x11990(%rip), %edx     # 0x21e88
subl $0x4, %edx
subl %edx, %ecx
cmpl %ecx, %eax
jge 0x1050c
movl 0x19e71(%rip), %eax     # 0x2a378
movl %eax, -0x30(%rbp)
jmp 0x10521
movl 0x1197a(%rip), %eax     # 0x21e8c
movzwl 0x1196f(%rip), %ecx     # 0x21e88
subl $0x4, %ecx
subl %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, 0x1a078(%rip)     # 0x2a5a8
movl 0x1a072(%rip), %eax     # 0x2a5a8
movl %eax, -0x34(%rbp)
movl 0x19e39(%rip), %eax     # 0x2a378
movzwl 0x11942(%rip), %ecx     # 0x21e88
subl $0x4, %ecx
subl $0x1, %ecx
subl %ecx, %eax
cmpl $0x0, %eax
jle 0x1056d
movl 0x19e1f(%rip), %eax     # 0x2a378
movzwl 0x11928(%rip), %ecx     # 0x21e88
subl $0x4, %ecx
subl $0x1, %ecx
subl %ecx, %eax
movl %eax, -0x38(%rbp)
jmp 0x10574
xorl %eax, %eax
movl %eax, -0x38(%rbp)
jmp 0x10574
movl -0x34(%rbp), %eax
movl -0x38(%rbp), %ecx
cmpl %ecx, %eax
jle 0x10589
movl 0x1a024(%rip), %eax     # 0x2a5a8
movl %eax, -0x3c(%rbp)
jmp 0x105ca
movl 0x19de9(%rip), %eax     # 0x2a378
movzwl 0x118f2(%rip), %ecx     # 0x21e88
subl $0x4, %ecx
subl $0x1, %ecx
subl %ecx, %eax
cmpl $0x0, %eax
jle 0x105bd
movl 0x19dcf(%rip), %eax     # 0x2a378
movzwl 0x118d8(%rip), %ecx     # 0x21e88
subl $0x4, %ecx
subl $0x1, %ecx
subl %ecx, %eax
movl %eax, -0x40(%rbp)
jmp 0x105c4
xorl %eax, %eax
movl %eax, -0x40(%rbp)
jmp 0x105c4
movl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, 0x19fd5(%rip)     # 0x2a5a8
movl 0x1024b(%rip), %eax     # 0x20824
shrl $0x5, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x105eb
xorl %edi, %edi
callq 0xc890
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)