LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./util.h
// Function: eforkpty
pid_t eforkpty(int *amaster, char *name,
	const struct termios *termp, const struct winsize *winsize)
{
	int master, slave;
	pid_t pid;

	if (eopenpty(&master, &slave, name, termp, winsize) < 0)
		return -1;

	errno = 0;
	pid   = fork();
	if (pid < 0) {
		logging(ERROR, "fork: %s\n", strerror(errno));
		return pid;
	} else if (pid == 0) { /* child */
		close(master);
		setsid();

		dup2(slave, STDIN_FILENO);
		dup2(slave, STDOUT_FILENO);
		dup2(slave, STDERR_FILENO);

		/* XXX: this ioctl may fail in Mac OS X
			ref http://www.opensource.apple.com/source/Libc/Libc-825.25/util/pty.c?txt */
		if (ioctl(slave, TIOCSCTTY, NULL))
			logging(WARN, "ioctl: TIOCSCTTY faild\n");
		close(slave);

		return 0;
	}
	/* parent */
	close(slave);
	*amaster = master;

	return pid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
leaq -0x2c(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2bb0
cmpl $0x0, %eax
jge 0x2d02
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2dd4
callq 0x2060
movl $0x0, (%rax)
callq 0x2310
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0x2d48
callq 0x2060
movl (%rax), %edi
callq 0x22d0
movq %rax, %rdx
movl $0x2, %edi
leaq 0x52b51(%rip), %rsi     # 0x55887
movb $0x0, %al
callq 0x2450
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2dd4
cmpl $0x0, -0x34(%rbp)
jne 0x2dbb
movl -0x2c(%rbp), %edi
callq 0x2140
callq 0x2150
movl -0x30(%rbp), %edi
xorl %esi, %esi
callq 0x20f0
movl -0x30(%rbp), %edi
movl $0x1, %esi
callq 0x20f0
movl -0x30(%rbp), %edi
movl $0x2, %esi
callq 0x20f0
movl -0x30(%rbp), %edi
movl $0x540e, %esi           # imm = 0x540E
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x2130
cmpl $0x0, %eax
je 0x2daa
movl $0x1, %edi
leaq 0x52aee(%rip), %rsi     # 0x55891
movb $0x0, %al
callq 0x2450
movl -0x30(%rbp), %edi
callq 0x2140
movl $0x0, -0x4(%rbp)
jmp 0x2dd4
jmp 0x2dbd
movl -0x30(%rbp), %edi
callq 0x2140
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./util.h
// Function: esetenv
int esetenv(const char *name, const char *value, int overwrite)
{
	int ret;
	errno = 0;

	if ((ret = setenv(name, value, overwrite)) < 0)
		logging(ERROR, "setenv: %s\n", strerror(errno));

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
callq 0x2060
movl $0x0, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x20a0
movl %eax, -0x18(%rbp)
cmpl $0x0, %eax
jge 0x2e38
callq 0x2060
movl (%rax), %edi
callq 0x22d0
movq %rax, %rdx
movl $0x2, %edi
leaq 0x52a78(%rip), %rsi     # 0x558a9
movb $0x0, %al
callq 0x2450
movl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./util.h
// Function: eexecvp
int eexecvp(const char *file, char *const argv[])
{
	int ret;
	errno = 0;

	if ((ret = execvp(file, (char * const *) argv)) < 0)
		logging(ERROR, "execvp: %s\n", strerror(errno));

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x2060
movl $0x0, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x22a0
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jge 0x2ea2
callq 0x2060
movl (%rax), %edi
callq 0x22d0
movq %rax, %rdx
movl $0x2, %edi
leaq 0x52a1a(%rip), %rsi     # 0x558b5
movb $0x0, %al
callq 0x2450
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./util.h
// Function: eexecl
int eexecl(const char *path)
{
	int ret;
	errno = 0;

	/* XXX: assume only one argument is given */
	if ((ret = execl(path, path, NULL)) < 0)
		logging(ERROR, "execl: %s\n", strerror(errno));

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
callq 0x2060
movl $0x0, (%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x22e0
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jge 0x2f04
callq 0x2060
movl (%rax), %edi
callq 0x22d0
movq %rax, %rdx
movl $0x2, %edi
leaq 0x529c4(%rip), %rsi     # 0x558c1
movb $0x0, %al
callq 0x2450
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./util.h
// Function: estrtol
long estrtol(const char *nptr, char **endptr, int base)
{
	long int ret;
	errno = 0;

	ret = strtol(nptr, endptr, base);
	if (ret == LONG_MIN || ret == LONG_MAX) {
		logging(ERROR, "strtol: %s\n", strerror(errno));
		return 0;
	}

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
callq 0x2060
movl $0x0, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x21a0
movq %rax, -0x28(%rbp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x28(%rbp)
je 0x2f62
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0x28(%rbp)
jne 0x2f8e
callq 0x2060
movl (%rax), %edi
callq 0x22d0
movq %rax, %rdx
movl $0x2, %edi
leaq 0x5294f(%rip), %rsi     # 0x558cc
movb $0x0, %al
callq 0x2450
movq $0x0, -0x8(%rbp)
jmp 0x2f96
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./util.h
// Function: add_parm
void add_parm(struct parm_t *pt, char *cp)
{
	if (pt->argc >= MAX_ARGS)
		return;

	logging(DEBUG, "argv[%d]: %s\n", pt->argc, (cp == NULL) ? "NULL": cp);

	pt->argv[pt->argc] = cp;
	pt->argc++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x10, (%rax)
jl 0x2ffb
jmp 0x3056
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3018
leaq 0x528c6(%rip), %rax     # 0x558d8
movq %rax, -0x20(%rbp)
jmp 0x3020
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
xorl %edi, %edi
leaq 0x52d8b(%rip), %rsi     # 0x55dbb
movb $0x0, %al
callq 0x2450
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq (%rcx), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./util.h
// Function: parse_arg
void parse_arg(char *buf, struct parm_t *pt, int delim, int (is_valid)(int c))
{
	/*
		v..........v d           v.....v d v.....v ... d
		(valid char) (delimiter)
		argv[0]                  argv[1]   argv[2] ...   argv[argc - 1]
	*/
	size_t length;
	char *cp, *vp;

	if (buf == NULL)
		return;

	length = strlen(buf);
	logging(DEBUG, "parse_arg() length:%u\n", (unsigned) length);

	vp = NULL;
	for (size_t i = 0; i < length; i++) {
		cp = buf + i;

		if (vp == NULL && is_valid(*cp))
			vp = cp;

		if (*cp == delim) {
			*cp = '\0';
			add_parm(pt, vp);
			vp = NULL;
		}

		if (i == (length - 1) && (vp != NULL || *cp == '\0'))
			add_parm(pt, vp);
	}

	logging(DEBUG, "argc:%d\n", pt->argc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x3083
jmp 0x3173
movq -0x8(%rbp), %rdi
callq 0x20d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl %eax, %edx
xorl %edi, %edi
leaq 0x5283e(%rip), %rsi     # 0x558dd
movb $0x0, %al
callq 0x2450
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x315d
movq -0x8(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x30f1
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movsbl (%rcx), %edi
callq *%rax
cmpl $0x0, %eax
je 0x30f1
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x3119
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x2fe0
movq $0x0, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x314a
cmpq $0x0, -0x38(%rbp)
jne 0x313d
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x314a
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x2fe0
jmp 0x314c
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x30b6
movq -0x10(%rbp), %rax
movl (%rax), %edx
xorl %edi, %edi
leaq 0x52788(%rip), %rsi     # 0x558f4
movb $0x0, %al
callq 0x2450
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./util.h
// Function: sum
int sum(struct parm_t *parm)
{
	int sum = 0;

	for (int i = 0; i < parm->argc; i++)
		sum += dec2num(parm->argv[i]);

	return sum;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x3278
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rdi
callq 0x31b0
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x324a
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./fb/linux.h
// Function: alloc_cmap
void alloc_cmap(cmap_t *cmap, int colors)
{
	cmap->start  = 0;
	cmap->len    = colors;
	cmap->red    = (__u16 *) ecalloc(colors, sizeof(__u16));
	cmap->green  = (__u16 *) ecalloc(colors, sizeof(__u16));
	cmap->blue   = (__u16 *) ecalloc(colors, sizeof(__u16));
	cmap->transp = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movslq -0xc(%rbp), %rdi
movl $0x2, %esi
callq 0x27d0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movslq -0xc(%rbp), %rdi
movl $0x2, %esi
callq 0x27d0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movslq -0xc(%rbp), %rdi
movl $0x2, %esi
callq 0x27d0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./fb/linux.h
// Function: set_bitfield
void set_bitfield(struct fb_var_screeninfo *vinfo,
	struct bitfield_t *red, struct bitfield_t *green, struct bitfield_t *blue)
{
	red->length   = vinfo->red.length;
	green->length = vinfo->green.length;
	blue->length  = vinfo->blue.length;

	red->offset   = vinfo->red.offset;
	green->offset = vinfo->green.offset;
	blue->offset  = vinfo->blue.offset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl 0x3c(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./fb/linux.h
// Function: set_type
enum fb_type_t set_type(__u32 type)
{
	if (type == FB_TYPE_PACKED_PIXELS)
		return YAFT_FB_TYPE_PACKED_PIXELS;
	else if (type == FB_TYPE_PLANES)
		return YAFT_FB_TYPE_PLANES;
	else
		return YAFT_FB_TYPE_UNKNOWN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x33f6
movl $0x0, -0x4(%rbp)
jmp 0x340c
cmpl $0x1, -0x8(%rbp)
jne 0x3405
movl $0x1, -0x4(%rbp)
jmp 0x340c
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./fb/linux.h
// Function: set_visual
enum fb_visual_t set_visual(__u32 visual)
{
	if (visual == FB_VISUAL_TRUECOLOR)
		return YAFT_FB_VISUAL_TRUECOLOR;
	else if (visual == FB_VISUAL_DIRECTCOLOR)
		return YAFT_FB_VISUAL_DIRECTCOLOR;
	else if (visual == FB_VISUAL_PSEUDOCOLOR)
		return YAFT_FB_VISUAL_PSEUDOCOLOR;
	else
		return YAFT_FB_VISUAL_UNKNOWN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0x2, -0x8(%rbp)
jne 0x3436
movl $0x0, -0x4(%rbp)
jmp 0x345b
cmpl $0x4, -0x8(%rbp)
jne 0x3445
movl $0x1, -0x4(%rbp)
jmp 0x345b
cmpl $0x3, -0x8(%rbp)
jne 0x3454
movl $0x2, -0x4(%rbp)
jmp 0x345b
movl $0x3, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./fb/linux.h
// Function: set_fbinfo
bool set_fbinfo(int fd, struct fb_info_t *info)
{
	struct fb_fix_screeninfo finfo;
	struct fb_var_screeninfo vinfo;

	if (ioctl(fd, FBIOGET_FSCREENINFO, &finfo)) {
		logging(ERROR, "ioctl: FBIOGET_FSCREENINFO failed\n");
		return false;
	}

	if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo)) {
		logging(ERROR, "ioctl: FBIOGET_VSCREENINFO failed\n");
		return false;
	}

	set_bitfield(&vinfo, &info->red, &info->green, &info->blue);

	info->width  = vinfo.xres;
	info->height = vinfo.yres;
	info->screen_size = finfo.smem_len;
	info->line_length = finfo.line_length;

	info->bits_per_pixel  = vinfo.bits_per_pixel;
	info->bytes_per_pixel = my_ceil(info->bits_per_pixel, BITS_PER_BYTE);

	info->type   = set_type(finfo.type);
	info->visual = set_visual(finfo.visual);

	/* check screen [xy]offset and initialize because linux console changes these values */
	if (vinfo.xoffset != 0 || vinfo.yoffset != 0) {
		vinfo.xoffset = vinfo.yoffset = 0;
		if (ioctl(fd, FBIOPUT_VSCREENINFO, &vinfo))
			logging(WARN, "couldn't reset offset (x:%d y:%d)\n", vinfo.xoffset, vinfo.yoffset);
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %edi
movl $0x4602, %esi           # imm = 0x4602
leaq -0x60(%rbp), %rdx
movb $0x0, %al
callq 0x2130
cmpl $0x0, %eax
je 0x34a6
movl $0x2, %edi
leaq 0x52467(%rip), %rsi     # 0x558fd
movb $0x0, %al
callq 0x2450
movb $0x0, -0x1(%rbp)
jmp 0x35dd
movl -0x8(%rbp), %edi
movl $0x4600, %esi           # imm = 0x4600
leaq -0x100(%rbp), %rdx
movb $0x0, %al
callq 0x2130
cmpl $0x0, %eax
je 0x34dd
movl $0x2, %edi
leaq 0x52453(%rip), %rsi     # 0x55920
movb $0x0, %al
callq 0x2450
movb $0x0, -0x1(%rbp)
jmp 0x35dd
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x8, %rdx
movq -0x10(%rbp), %rcx
addq $0x10, %rcx
leaq -0x100(%rbp), %rdi
callq 0x3370
movl -0x100(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0xfc(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl -0x48(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
movl -0xe8(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %edi
movl $0x8, %esi
callq 0x3180
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2c(%rax)
movl -0x44(%rbp), %edi
callq 0x33e0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x34(%rax)
movl -0x3c(%rbp), %edi
callq 0x3420
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x38(%rax)
cmpl $0x0, -0xf0(%rbp)
jne 0x3589
cmpl $0x0, -0xec(%rbp)
je 0x35d9
movl $0x0, -0xec(%rbp)
movl $0x0, -0xf0(%rbp)
movl -0x8(%rbp), %edi
movl $0x4601, %esi           # imm = 0x4601
leaq -0x100(%rbp), %rdx
movb $0x0, %al
callq 0x2130
cmpl $0x0, %eax
je 0x35d7
movl -0xf0(%rbp), %edx
movl -0xec(%rbp), %ecx
movl $0x1, %edi
leaq 0x52373(%rip), %rsi     # 0x55943
movb $0x0, %al
callq 0x2450
jmp 0x35d9
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./fb/common.h
// Function: load_wallpaper
uint8_t *load_wallpaper(uint8_t *fp, long screen_size)
{
	uint8_t *ptr;

	if ((ptr = (uint8_t *) ecalloc(1, screen_size)) == NULL) {
		logging(ERROR, "couldn't allocate wallpaper buffer\n");
		return NULL;
	}
	memcpy(ptr, fp, screen_size);

	return ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rsi
movl $0x1, %edi
callq 0x27d0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x3635
movl $0x2, %edi
leaq 0x52342(%rip), %rsi     # 0x55966
movb $0x0, %al
callq 0x2450
movq $0x0, -0x8(%rbp)
jmp 0x364e
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x21c0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./fb/common.h
// Function: cmap_die
void cmap_die(cmap_t *cmap)
{
	if (cmap) {
		free(cmap->red);
		free(cmap->green);
		free(cmap->blue);
		//free(cmap->transp);
		free(cmap);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x36a3
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2050
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2050
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2050
movq -0x8(%rbp), %rdi
callq 0x2050
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./fb/common.h
// Function: cmap_create
cmap_t *cmap_create(int colors)
{
	cmap_t *cmap;

	if ((cmap = (cmap_t *) ecalloc(1, sizeof(cmap_t))) == NULL) {
		logging(ERROR, "couldn't allocate cmap buffer\n");
		return NULL;
	}

	/* init os specific */
	alloc_cmap(cmap, colors);

	if (!cmap->red || !cmap->green || !cmap->blue) {
		logging(ERROR, "couldn't allocate red/green/blue buffer of cmap\n");
		cmap_die(cmap);
		return NULL;
	}
	return cmap;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl $0x1, %edi
movl $0x28, %esi
callq 0x27d0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x36f1
movl $0x2, %edi
leaq 0x522aa(%rip), %rsi     # 0x5598a
movb $0x0, %al
callq 0x2450
movq $0x0, -0x8(%rbp)
jmp 0x374c
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x3290
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x371e
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x371e
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x3744
movl $0x2, %edi
leaq 0x5227f(%rip), %rsi     # 0x559a9
movb $0x0, %al
callq 0x2450
movq -0x18(%rbp), %rdi
callq 0x3660
movq $0x0, -0x8(%rbp)
jmp 0x374c
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./fb/common.h
// Function: cmap_update
bool cmap_update(int fd, cmap_t *cmap)
{
	if (cmap) {
		if (put_cmap(fd, cmap)) {
			logging(ERROR, "put_cmap failed\n");
			return false;
		}
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x37a2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x3310
cmpl $0x0, %eax
je 0x37a0
movl $0x2, %edi
leaq 0x52247(%rip), %rsi     # 0x559da
movb $0x0, %al
callq 0x2450
movb $0x0, -0x1(%rbp)
jmp 0x37a6
jmp 0x37a2
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./fb/common.h
// Function: cmap_save
bool cmap_save(int fd, cmap_t *cmap)
{
	if (get_cmap(fd, cmap)) {
		logging(WARN, "get_cmap failed\n");
		return false;
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x3340
cmpl $0x0, %eax
je 0x37f9
movl $0x1, %edi
leaq 0x521ff(%rip), %rsi     # 0x559eb
movb $0x0, %al
callq 0x2450
movb $0x0, -0x1(%rbp)
jmp 0x37fd
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./fb/common.h
// Function: init_truecolor
bool init_truecolor(struct fb_info_t *info, cmap_t **cmap, cmap_t **cmap_orig)
{
	switch(info->bits_per_pixel) {
	case 15: /* XXX: 15 bpp is not tested */
	case 16:
	case 24:
	case 32:
		break;
	default:
		logging(ERROR, "truecolor %d bpp not supported\n", info->bits_per_pixel);
		return false;
	}
	/* we don't use cmap in truecolor */
	*cmap = *cmap_orig = NULL;

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %eax
movl %eax, -0x24(%rbp)
addl $-0xf, %eax
subl $0x2, %eax
jb 0x3a9c
jmp 0x3a88
movl -0x24(%rbp), %eax
subl $0x18, %eax
je 0x3a9c
jmp 0x3a92
movl -0x24(%rbp), %eax
subl $0x20, %eax
jne 0x3a9e
jmp 0x3a9c
jmp 0x3abe
movq -0x10(%rbp), %rax
movl 0x30(%rax), %edx
movl $0x2, %edi
leaq 0x51f4b(%rip), %rsi     # 0x559fc
movb $0x0, %al
callq 0x2450
movb $0x0, -0x1(%rbp)
jmp 0x3ad8
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./fb/common.h
// Function: fb_print_info
void fb_print_info(struct fb_info_t *info)
{
	const char *type_str[] = {
		[YAFT_FB_TYPE_PACKED_PIXELS] = "YAFT_FB_TYPE_PACKED_PIXELS",
		[YAFT_FB_TYPE_PLANES]        = "YAFT_FB_TYPE_PLANES",
		[YAFT_FB_TYPE_UNKNOWN]       = "YAFT_FB_TYPE_UNKNOWN",
	};

	const char *visual_str[] = {
		[YAFT_FB_VISUAL_TRUECOLOR]   = "YAFT_FB_VISUAL_TRUECOLOR",
		[YAFT_FB_VISUAL_DIRECTCOLOR] = "YAFT_FB_VISUAL_DIRECTCOLOR",
		[YAFT_FB_VISUAL_PSEUDOCOLOR] = "YAFT_FB_VISUAL_PSEUDOCOLOR",
		[YAFT_FB_VISUAL_UNKNOWN]     = "YAFT_FB_VISUAL_UNKNOWN",
	};

	logging(DEBUG, "framebuffer info:\n");
	logging(DEBUG, "\tred(off:%d len:%d) green(off:%d len:%d) blue(off:%d len:%d)\n",
		info->red.offset, info->red.length, info->green.offset, info->green.length, info->blue.offset, info->blue.length);
	logging(DEBUG, "\tresolution %dx%d\n", info->width, info->height);
	logging(DEBUG, "\tscreen size:%ld line length:%d\n", info->screen_size, info->line_length);
	logging(DEBUG, "\tbits_per_pixel:%d bytes_per_pixel:%d\n", info->bits_per_pixel, info->bytes_per_pixel);
	logging(DEBUG, "\ttype:%s\n", type_str[info->type]);
	logging(DEBUG, "\tvisual:%s\n", visual_str[info->visual]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq 0x5503d(%rip), %rax     # 0x58d90
movq %rax, -0x20(%rbp)
movq 0x5503a(%rip), %rax     # 0x58d98
movq %rax, -0x18(%rbp)
movq 0x55037(%rip), %rax     # 0x58da0
movq %rax, -0x10(%rbp)
movq 0x5503c(%rip), %rax     # 0x58db0
movq %rax, -0x40(%rbp)
movq 0x55039(%rip), %rax     # 0x58db8
movq %rax, -0x38(%rbp)
movq 0x55036(%rip), %rax     # 0x58dc0
movq %rax, -0x30(%rbp)
movq 0x55033(%rip), %rax     # 0x58dc8
movq %rax, -0x28(%rbp)
xorl %edi, %edi
leaq 0x51dcb(%rip), %rsi     # 0x55b6d
movb $0x0, %al
callq 0x2450
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edx
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl 0xc(%rax), %r8d
movq -0x8(%rbp), %rax
movl 0x8(%rax), %r9d
movq -0x8(%rbp), %rax
movl 0x14(%rax), %r10d
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
xorl %edi, %edi
leaq 0x51da2(%rip), %rsi     # 0x55b80
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x2450
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
xorl %edi, %edi
leaq 0x51dba(%rip), %rsi     # 0x55bbe
movb $0x0, %al
callq 0x2450
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
movq -0x8(%rbp), %rax
movl 0x28(%rax), %ecx
xorl %edi, %edi
leaq 0x51dae(%rip), %rsi     # 0x55bd1
movb $0x0, %al
callq 0x2450
movq -0x8(%rbp), %rax
movl 0x30(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
xorl %edi, %edi
leaq 0x51db1(%rip), %rsi     # 0x55bf2
movb $0x0, %al
callq 0x2450
movq -0x8(%rbp), %rax
movl 0x34(%rax), %eax
movq -0x20(%rbp,%rax,8), %rdx
xorl %edi, %edi
leaq 0x51dbc(%rip), %rsi     # 0x55c19
movb $0x0, %al
callq 0x2450
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
movq -0x40(%rbp,%rax,8), %rdx
xorl %edi, %edi
leaq 0x51daa(%rip), %rsi     # 0x55c23
movb $0x0, %al
callq 0x2450
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./fb/common.h
// Function: color2pixel
static inline uint32_t color2pixel(struct fb_info_t *info, uint32_t color)
{
	uint32_t r, g, b;

	r = bit_mask[BITS_PER_RGB] & (color >> (BITS_PER_RGB * 2));
	g = bit_mask[BITS_PER_RGB] & (color >>  BITS_PER_RGB);
	b = bit_mask[BITS_PER_RGB] & (color >>  0);

	r = r >> (BITS_PER_RGB - info->red.length);
	g = g >> (BITS_PER_RGB - info->green.length);
	b = b >> (BITS_PER_RGB - info->blue.length);

	return (r << info->red.offset)
			+ (g << info->green.offset)
			+ (b << info->blue.offset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl 0x72cf(%rip), %eax      # 0xb440
movl -0xc(%rbp), %ecx
shrl $0x10, %ecx
andl %ecx, %eax
movl %eax, -0x10(%rbp)
movl 0x72be(%rip), %eax      # 0xb440
movl -0xc(%rbp), %ecx
shrl $0x8, %ecx
andl %ecx, %eax
movl %eax, -0x14(%rbp)
movl 0x72ad(%rip), %eax      # 0xb440
movl -0xc(%rbp), %ecx
shrl $0x0, %ecx
andl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
movl $0x8, %ecx
subl (%rdx), %ecx
shrl %cl, %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rdx
movl $0x8, %ecx
subl 0x8(%rdx), %ecx
shrl %cl, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rdx
movl $0x8, %ecx
subl 0x10(%rdx), %ecx
shrl %cl, %eax
movl %eax, -0x18(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %ecx
shll %cl, %eax
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rcx
movl 0xc(%rcx), %ecx
shll %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %ecx
shll %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./fb/common.h
// Function: fb_die
void fb_die(struct framebuffer_t *fb)
{
	cmap_die(fb->cmap);
	if (fb->cmap_orig) {
		put_cmap(fb->fd, fb->cmap_orig);
		cmap_die(fb->cmap_orig);
	}
	free(fb->wall);
	free(fb->buf);
	emunmap(fb->fp, fb->info.screen_size);
	eclose(fb->fd);
	//fb_release(fb->fd, &fb->info); /* os specific */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x460(%rax), %rdi
callq 0x3660
movq -0x8(%rbp), %rax
cmpq $0x0, 0x468(%rax)
je 0x4260
movq -0x8(%rbp), %rax
movl (%rax), %edi
movq -0x8(%rbp), %rax
movq 0x468(%rax), %rsi
callq 0x3310
movq -0x8(%rbp), %rax
movq 0x468(%rax), %rdi
callq 0x3660
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2050
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2050
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x440(%rax), %rsi
callq 0x2770
movq -0x8(%rbp), %rax
movl (%rax), %edi
callq 0x25b0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./fb/common.h
// Function: refresh
void refresh(struct framebuffer_t *fb, struct terminal_t *term)
{
	if (term->palette_modified) {
		term->palette_modified = false;
		for (int i = 0; i < COLORS; i++)
			fb->real_palette[i] = color2pixel(&fb->info, term->virtual_palette[i]);
	}

	if (term->mode & MODE_CURSOR)
		term->line_dirty[term->cursor.y] = true;

	for (int line = 0; line < term->lines; line++) {
		if (term->line_dirty[line]) {
			draw_line(fb, term, line);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0x480(%rax)
je 0x4322
movq -0x10(%rbp), %rax
movb $0x0, 0x480(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp)     # imm = 0x100
jge 0x4320
movq -0x8(%rbp), %rdi
addq $0x420, %rdi            # imm = 0x420
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl 0x80(%rax,%rcx,4), %esi
callq 0x4160
movl %eax, %edx
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl %edx, 0x20(%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x42df
jmp 0x4322
movq -0x10(%rbp), %rax
movl 0x38(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4345
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movzwl 0x26(%rcx), %ecx
movb $0x1, (%rax,%rcx)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x4387
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x18(%rbp), %rcx
testb $0x1, (%rax,%rcx)
je 0x437a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %edx
callq 0x4390
jmp 0x437c
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x434c
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./terminal.h
// Function: erase_cell
void erase_cell(struct terminal_t *term, int y, int x)
{
	struct cell_t *cellp;

	cellp             = &term->cells[y][x];
	cellp->glyphp     = term->glyph[DEFAULT_CHAR];
	cellp->color_pair = term->color_pair; /* bce */
	cellp->attribute  = ATTR_RESET;
	cellp->width      = HALF;
	cellp->has_pixmap = false;

	term->line_dirty[y] = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10(%rbp), %rcx
imulq $0x218, %rcx, %rcx      # imm = 0x218
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x588(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movw 0x4c(%rcx), %cx
movw %cx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x10(%rax)
movq -0x18(%rbp), %rax
movb $0x0, 0x14(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
movb $0x1, (%rax,%rcx)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./terminal.h
// Function: copy_cell
void copy_cell(struct terminal_t *term, int dst_y, int dst_x, int src_y, int src_x)
{
	struct cell_t *dst, *src;

	dst = &term->cells[dst_y][dst_x];
	src = &term->cells[src_y][src_x];

	if (src->width == NEXT_TO_WIDE) {
		return;
	} else if (src->width == WIDE && dst_x == (term->cols - 1)) {
		erase_cell(term, dst_y, dst_x);
	} else {
		*dst = *src;
		if (src->width == WIDE) {
			*(dst + 1) = *src;
			(dst + 1)->width = NEXT_TO_WIDE;
		}
		term->line_dirty[dst_y] = true;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10(%rbp), %rcx
imulq $0x218, %rcx, %rcx      # imm = 0x218
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x18(%rbp), %rcx
imulq $0x218, %rcx, %rcx      # imm = 0x218
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x47ec
jmp 0x486d
movq -0x28(%rbp), %rax
cmpl $0x2, 0x10(%rax)
jne 0x4818
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0xc(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x4818
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x46f0
jmp 0x486b
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl $0x218, %edx            # imm = 0x218
callq 0x21c0
movq -0x28(%rbp), %rax
cmpl $0x2, 0x10(%rax)
jne 0x485b
movq -0x20(%rbp), %rdi
addq $0x218, %rdi            # imm = 0x218
movq -0x28(%rbp), %rsi
movl $0x218, %edx            # imm = 0x218
callq 0x21c0
movq -0x20(%rbp), %rax
movl $0x0, 0x228(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
movb $0x1, (%rax,%rcx)
jmp 0x486d
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./terminal.h
// Function: move_cursor
void move_cursor(struct terminal_t *term, int y_offset, int x_offset)
{
	int x, y, top, bottom;

	x = term->cursor.x + x_offset;
	y = term->cursor.y + y_offset;

	top    = term->scroll.top;
	bottom = term->scroll.bottom;

	if (x < 0) {
		x = 0;
	} else if (x >= term->cols) {
		if (term->mode & MODE_AMRIGHT)
			term->wrap_occurred = true;
		x = term->cols - 1;
	}
	term->cursor.x = x;

	y = (y < 0) ? 0:
		(y >= term->lines) ? term->lines - 1: y;

	if (term->cursor.y == top && y_offset < 0) {
		y = top;
		scroll(term, top, bottom, y_offset);
	} else if (term->cursor.y == bottom && y_offset > 0) {
		y = bottom;
		scroll(term, top, bottom, y_offset);
	}
	term->cursor.y = y;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x24(%rax), %eax
addl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x26(%rax), %eax
addl -0xc(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x20(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x22(%rax), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x4d23
movl $0x0, -0x14(%rbp)
jmp 0x4d55
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jl 0x4d53
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4d46
movq -0x8(%rbp), %rax
movb $0x1, 0x3c(%rax)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4d55
movl -0x14(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x24(%rax)
cmpl $0x0, -0x18(%rbp)
jge 0x4d70
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0x4d97
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jl 0x4d8b
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4d91
movl -0x18(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x26(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x4dca
cmpl $0x0, -0xc(%rbp)
jge 0x4dca
movl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
movl -0xc(%rbp), %ecx
callq 0x4ad0
jmp 0x4df7
movq -0x8(%rbp), %rax
movzwl 0x26(%rax), %eax
cmpl -0x20(%rbp), %eax
jne 0x4df5
cmpl $0x0, -0xc(%rbp)
jle 0x4df5
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
movl -0xc(%rbp), %ecx
callq 0x4ad0
jmp 0x4df7
movl -0x18(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x26(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./terminal.h
// Function: set_cursor
void set_cursor(struct terminal_t *term, int y, int x)
{
	int top, bottom;

	if (term->mode & MODE_ORIGIN) {
		top    = term->scroll.top;
		bottom = term->scroll.bottom;
		y += term->scroll.top;
	} else {
		top = 0;
		bottom = term->lines - 1;
	}

	x = (x < 0) ? 0: (x >= term->cols) ? term->cols - 1: x;
	y = (y < top) ? top: (y > bottom) ? bottom: y;

	term->cursor.x = x;
	term->cursor.y = y;
	term->wrap_occurred = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4e53
movq -0x8(%rbp), %rax
movzwl 0x20(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x22(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x20(%rax), %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x4e67
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x10(%rbp)
jge 0x4e74
xorl %eax, %eax
movl %eax, -0x1c(%rbp)
jmp 0x4e9b
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jl 0x4e8f
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4e95
movl -0x10(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x4eb1
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x4ecd
movl -0xc(%rbp), %eax
cmpl -0x18(%rbp), %eax
jle 0x4ec1
movl -0x18(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x4ec7
movl -0xc(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x10(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x24(%rax)
movl -0xc(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x26(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x3c(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./terminal.h
// Function: drcs_glyph
const struct glyph_t *drcs_glyph(struct terminal_t *term, uint32_t code)
{
	/* DRCSMMv1
		ESC ( SP <\xXX> <\xYY> ESC ( B
		<===> U+10XXYY ( 0x40 <= 0xXX <=0x7E, 0x20 <= 0xYY <= 0x7F )
	*/
	int row, cell; /* = ku, ten */

	row  = (0xFF00 & code) >> 8;
	cell = 0xFF & code;

	logging(DEBUG, "drcs row:0x%.2X cell:0x%.2X\n", row, cell);

	if ((0x40 <= row && row <= 0x7E) && (0x20 <= cell && cell <= 0x7F))
		return &term->drcs[(row - 0x40) * GLYPHS_PER_CHARSET + (cell - 0x20)];
	else
		return term->glyph[SUBSTITUTE_HALF];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
shrl $0x8, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
andl $0xff, %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
xorl %edi, %edi
leaq 0x50d68(%rip), %rsi     # 0x55c9f
movb $0x0, %al
callq 0x2450
movl $0x40, %eax
cmpl -0x18(%rbp), %eax
jg 0x4f89
cmpl $0x7e, -0x18(%rbp)
jg 0x4f89
movl $0x20, %eax
cmpl -0x1c(%rbp), %eax
jg 0x4f89
cmpl $0x7f, -0x1c(%rbp)
jg 0x4f89
movq -0x10(%rbp), %rax
addq $0x80488, %rax          # imm = 0x80488
movl -0x18(%rbp), %ecx
subl $0x40, %ecx
imull $0x60, %ecx, %ecx
movl -0x1c(%rbp), %edx
subl $0x20, %edx
addl %edx, %ecx
movslq %ecx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x4f98
movq -0x10(%rbp), %rax
movq 0x588(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./terminal.h
// Function: reset
void reset(struct terminal_t *term)
{
	term->mode  = MODE_RESET;
	term->mode |= (MODE_CURSOR | MODE_AMRIGHT);
	term->wrap_occurred = false;

	term->scroll.top    = 0;
	term->scroll.bottom = term->lines - 1;

	term->cursor.x = term->cursor.y = 0;

	term->state.mode      = term->mode;
	term->state.cursor    = term->cursor;
	term->state.attribute = ATTR_RESET;

	term->color_pair.fg = DEFAULT_FG;
	term->color_pair.bg = DEFAULT_BG;

	term->attribute = ATTR_RESET;

	for (int line = 0; line < term->lines; line++) {
		for (int col = 0; col < term->cols; col++) {
			erase_cell(term, line, col);
			if ((col % TABSTOP) == 0)
				term->tabstop[col] = true;
			else
				term->tabstop[col] = false;
		}
		term->line_dirty[line] = true;
	}

	reset_esc(term);
	reset_charset(term);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x38(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
orl $0x6, %ecx
movl %ecx, 0x38(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x3c(%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x22(%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x26(%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x24(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x44(%rax)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x24(%rcx), %ecx
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movb $0x7, 0x4c(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x4d(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x50(%rax)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x54f3
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x54d5
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x46f0
movl -0x10(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x54b8
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x10(%rbp), %rcx
movb $0x1, (%rax,%rcx)
jmp 0x54c8
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x10(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x54ca
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x547b
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
movb $0x1, (%rax,%rcx)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x5468
movq -0x8(%rbp), %rdi
callq 0x5130
movq -0x8(%rbp), %rdi
callq 0x5380
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./terminal.h
// Function: term_die
void term_die(struct terminal_t *term)
{
	free(term->line_dirty);
	free(term->tabstop);
	free(term->esc.buf);
	free(term->sixel.pixmap);

	for (int i = 0; i < term->lines; i++)
		free(term->cells[i]);
	free(term->cells);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x2050
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x2050
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
callq 0x2050
movq -0x8(%rbp), %rax
movq 0xbb588(%rax), %rdi
callq 0x2050
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x55c6
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2050
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x559a
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2050
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./ctrlseq/esc.h
// Function: bs
void bs(struct terminal_t *term)
{
	if (term->mode & MODE_VWBS
		&& term->cursor.x - 1 >= 0
		&& term->cells[term->cursor.y][term->cursor.x - 1].width == NEXT_TO_WIDE)
		move_cursor(term, 0, -2);
	else
		move_cursor(term, 0, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x594f
movq -0x8(%rbp), %rax
movzwl 0x24(%rax), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jl 0x594f
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movzwl 0x26(%rcx), %ecx
movq (%rax,%rcx,8), %rax
movq -0x8(%rbp), %rcx
movzwl 0x24(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x218, %rcx, %rcx      # imm = 0x218
addq %rcx, %rax
cmpl $0x0, 0x10(%rax)
jne 0x594f
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
callq 0x4cd0
jmp 0x595f
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4cd0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./ctrlseq/esc.h
// Function: tab
void tab(struct terminal_t *term)
{
	int i;

	for (i = term->cursor.x + 1; i < term->cols; i++) {
		if (term->tabstop[i]) {
			set_cursor(term, term->cursor.y, i);
			return;
		}
	}
	set_cursor(term, term->cursor.y, term->cols - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x24(%rax), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x59cb
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0xc(%rbp), %rcx
testb $0x1, (%rax,%rcx)
je 0x59be
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzwl 0x26(%rax), %esi
movl -0xc(%rbp), %edx
callq 0x4e10
jmp 0x59e6
jmp 0x59c0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x598a
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzwl 0x26(%rax), %esi
movq -0x8(%rbp), %rax
movl 0xc(%rax), %edx
subl $0x1, %edx
callq 0x4e10
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./ctrlseq/esc.h
// Function: restore_state
void restore_state(struct terminal_t *term)
{
	/* restore state */
	if (term->state.mode & MODE_ORIGIN)
		term->mode |= MODE_ORIGIN;
	else
		term->mode &= ~MODE_ORIGIN;
	term->cursor    = term->state.cursor;
	term->attribute = term->state.attribute;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x44(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x5ad6
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x38(%rax)
jmp 0x5ae3
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
andl $-0x2, %ecx
movl %ecx, 0x38(%rax)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x40(%rcx), %ecx
movl %ecx, 0x24(%rax)
movq -0x8(%rbp), %rax
movl 0x48(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./ctrlseq/csi.h
// Function: insert_blank
void insert_blank(struct terminal_t *term, struct parm_t *parm)
{
	int i, num = sum(parm);

	if (num <= 0)
		num = 1;

	for (i = term->cols - 1; term->cursor.x <= i; i--) {
		if (term->cursor.x <= (i - num))
			copy_cell(term, term->cursor.y, i, term->cursor.y, i - num);
		else
			erase_cell(term, term->cursor.y, i);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3230
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jg 0x5c69
movl $0x1, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x24(%rax), %eax
cmpl -0x14(%rbp), %eax
jg 0x5cdc
movq -0x8(%rbp), %rax
movzwl 0x24(%rax), %eax
movl -0x14(%rbp), %ecx
subl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jg 0x5cbb
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzwl 0x26(%rax), %esi
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movzwl 0x26(%rax), %ecx
movl -0x14(%rbp), %r8d
subl -0x18(%rbp), %r8d
callq 0x4780
jmp 0x5ccf
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzwl 0x26(%rax), %esi
movl -0x14(%rbp), %edx
callq 0x46f0
jmp 0x5cd1
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5c76
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./ctrlseq/csi.h
// Function: curs_up
void curs_up(struct terminal_t *term, struct parm_t *parm)
{
	int num = sum(parm);

	if (num <= 0)
		num = 1;

	move_cursor(term, -num, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3230
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jg 0x5d19
movl $0x1, -0x14(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
subl -0x14(%rbp), %esi
xorl %edx, %edx
callq 0x4cd0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./ctrlseq/csi.h
// Function: curs_down
void curs_down(struct terminal_t *term, struct parm_t *parm)
{
	int num = sum(parm);

	if (num <= 0)
		num = 1;

	move_cursor(term, num, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3230
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jg 0x5d59
movl $0x1, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
xorl %edx, %edx
callq 0x4cd0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/uobikiemukot[P]yaft/./ctrlseq/csi.h
// Function: curs_forward
void curs_forward(struct terminal_t *term, struct parm_t *parm)
{
	int num = sum(parm);

	if (num <= 0)
		num = 1;

	move_cursor(term, 0, num);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3230
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jg 0x5d99
movl $0x1, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
xorl %esi, %esi
callq 0x4cd0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)