LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_cursor_move2.c
// Function: terminfo_cursor_move_down
void	terminfo_cursor_move_down(t_control *control, t_int_pair *cursor)
{
	t_int_pair	cursor_end;
	int			len_next;
	int			current_len;

	len_next = terminfo_predict_next_line_len(control);
	cursor_end = terminfo_cursor_get_endl(control);
	current_len = terminfo_predict_current_line_len(control);
	if (cursor->y >= cursor_end.y)
		return ;
	if (cursor->x >= len_next - 1)
	{
		cursor->y++;
		if (cursor->y == cursor_end.y && cursor->x >= len_next)
			len_next++;
		terminfo_cursor_move(control, len_next - 1, cursor->y);
		control->term->inline_position += current_len - cursor->x \
											+ len_next - 1;
		cursor->x = len_next - 1;
	}
	else
	{
		terminfo_cursor_move(control, cursor->x, ++(cursor->y));
		control->term->inline_position += current_len;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4fce
movl %eax, %r12d
movq %rbx, %rdi
callq 0x4676
movq %rax, %r13
shrq $0x20, %r13
movq %rbx, %rdi
callq 0x4e7c
movl 0x4(%r14), %edx
cmpl %r13d, %edx
jge 0x4a07
movl %eax, %r15d
movl (%r14), %esi
leal -0x1(%r12), %eax
incl %edx
movl %edx, 0x4(%r14)
cmpl %eax, %esi
jge 0x49cf
movq %rbx, %rdi
callq 0x4879
movq 0x18(%rbx), %rax
addl %r15d, 0xc(%rax)
jmp 0x4a07
cmpl %r13d, %edx
sete %al
cmpl %r12d, %esi
setge %cl
andb %al, %cl
movzbl %cl, %eax
leal (%r12,%rax), %r13d
leal (%r12,%rax), %ebp
decl %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4879
movq 0x18(%rbx), %rax
leal (%r15,%r13), %ecx
decl %ecx
subl (%r14), %ecx
addl %ecx, 0xc(%rax)
movl %ebp, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_cursor_move2.c
// Function: terminfo_cursor_track_position
int		terminfo_cursor_track_position(t_control *control, int add)
{
	if (add)
	{
		if (control->term->cursor.x + 1 == control->term->size_window.x)
		{
			if (!terminfo_cursor_move_diagonally_down(control))
				return (0);
		}
		else
			control->term->cursor.x++;
	}
	else
	{
		if (control->term->cursor.x == 0)
		{
			if (!terminfo_cursor_move_diagonally_up(control))
				return (0);
		}
		else
			control->term->cursor.x--;
	}
	return (1);
}

// Assembly:
pushq %rax
movq 0x18(%rdi), %rax
movl 0x10(%rax), %ecx
testl %esi, %esi
je 0x4a30
incl %ecx
cmpl 0x28(%rax), %ecx
jne 0x4a36
callq 0x4729
jmp 0x4a40
testl %ecx, %ecx
je 0x4a3b
decl %ecx
movl %ecx, 0x10(%rax)
jmp 0x4a44
callq 0x481e
testl %eax, %eax
je 0x4a4b
movl $0x1, %eax
popq %rcx
retq
xorl %eax, %eax
jmp 0x4a49
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_cursor_move2.c
// Function: terminfo_cursor_move_endl
int		terminfo_cursor_move_endl(t_control *control, int start)
{
	t_int_pair cursor_end;

	if (start)
	{
		if (!terminfo_cursor_move(control, control->term->cursor_start.x, \
					control->term->cursor_start.y))
			return (0);
		control->term->cursor = control->term->cursor_start;
	}
	else
	{
		cursor_end = terminfo_cursor_get_endl(control);
		if (!terminfo_cursor_move(control, cursor_end.x, cursor_end.y))
			return (0);
		control->term->cursor = cursor_end;
	}
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
je 0x4a7f
movq 0x18(%rbx), %rax
movl 0x20(%rax), %esi
movl 0x24(%rax), %edx
movq %rbx, %rdi
callq 0x4879
testl %eax, %eax
je 0x4ab6
movq 0x18(%rbx), %rax
movq 0x20(%rax), %rcx
movq %rcx, 0x10(%rax)
jmp 0x4aaf
movq %rbx, %rdi
callq 0x4676
movq %rax, %r14
movq %rax, %r15
shrq $0x20, %r15
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0x4879
testl %eax, %eax
je 0x4ab6
movq 0x18(%rbx), %rax
movl %r14d, 0x10(%rax)
movl %r15d, 0x14(%rax)
movl $0x1, %eax
jmp 0x4ab8
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_cursor_move3.c
// Function: terminfo_cursor_move_next_word
int		terminfo_cursor_move_next_word(t_control *control)
{
	int index;
	int	right_motion;
	int j;
	int	current_len;

	j = 0;
	if (-1 == (index = terminfo_cursor_find_next_word_start(control)))
		return (1);
	right_motion = index - control->term->inline_position - 1;
	while (j < right_motion)
	{
		current_len = terminfo_predict_current_line_len(control);
		terminfo_cursor_track_position(control, 1);
		if (control->term->cursor.x == current_len)
			terminfo_cursor_move_diagonally_down(control);
		control->term->inline_position++;
		j++;
	}
	if (!terminfo_cursor_move(control, control->term->cursor.x, \
				control->term->cursor.y))
		return (0);
	return (1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x4b3a
cmpl $-0x1, %eax
je 0x4b30
movl %eax, %ebp
movq 0x18(%rbx), %rax
movl 0xc(%rax), %ecx
notl %ecx
addl %ecx, %ebp
testl %ebp, %ebp
jle 0x4b17
movq %rbx, %rdi
callq 0x4e7c
movl %eax, %r14d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x4a16
movq 0x18(%rbx), %rax
cmpl %r14d, 0x10(%rax)
jne 0x4b10
movq %rbx, %rdi
callq 0x4729
movq 0x18(%rbx), %rax
incl 0xc(%rax)
decl %ebp
jne 0x4ae2
movl 0x10(%rax), %esi
movl 0x14(%rax), %edx
movq %rbx, %rdi
callq 0x4879
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x4b35
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_cursor_move3.c
// Function: terminfo_cursor_find_next_word_start
int		terminfo_cursor_find_next_word_start(t_control *control)
{
	int		i;
	char	*str;

	if ((str = control->term->line) == NULL)
		return (-1);
	i = control->term->inline_position + 1;
	while (str[i])
	{
		if (str[i] == ' ' || str[i] == '\n')
		{
			while (str[i] && (str[i] == ' ' || str[i] == '\n'))
				i++;
			if (str[i])
				return (i);
			else
				return (-1);
		}
		i++;
	}
	return (-1);
}

// Assembly:
movq 0x18(%rdi), %rcx
movq (%rcx), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rdx, %rdx
je 0x4b87
movslq 0xc(%rcx), %rcx
addq %rcx, %rdx
movzbl 0x1(%rdx), %esi
testl %esi, %esi
je 0x4b87
incq %rdx
incl %ecx
cmpl $0x20, %esi
je 0x4b70
cmpl $0xa, %esi
jne 0x4b52
jmp 0x4b70
incl %ecx
incq %rdx
movzbl (%rdx), %esi
cmpl $0x20, %esi
je 0x4b6b
cmpl $0xa, %esi
je 0x4b6b
xorl %eax, %eax
cmpb $0x1, %sil
sbbl %eax, %eax
orl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_cursor_move3.c
// Function: terminfo_cursor_move_previous_word
int		terminfo_cursor_move_previous_word(t_control *control)
{
	int index;
	int	left_motion;
	int j;

	j = 0;
	if (-1 == (index = terminfo_cursor_find_previous_word_start(control)))
		return (1);
	left_motion = control->term->inline_position + 1 - index;
	while (j < left_motion)
	{
		terminfo_cursor_track_position(control, 0);
		control->term->inline_position--;
		j++;
	}
	if (!terminfo_cursor_move(control, control->term->cursor.x, \
				control->term->cursor.y))
		return (0);
	return (1);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4be5
cmpl $-0x1, %eax
je 0x4bd9
movq 0x18(%rbx), %rcx
movl 0xc(%rcx), %ebp
subl %eax, %ebp
cmpl $0x7ffffffe, %ebp       # imm = 0x7FFFFFFE
ja 0x4bc0
incl %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4a16
movq 0x18(%rbx), %rcx
decl 0xc(%rcx)
decl %ebp
jne 0x4bab
movl 0x10(%rcx), %esi
movl 0x14(%rcx), %edx
movq %rbx, %rdi
callq 0x4879
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x4bde
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_cursor_move3.c
// Function: terminfo_cursor_find_previous_word_start
int		terminfo_cursor_find_previous_word_start(t_control *control)
{
	int		i;
	char	*str;

	str = control->term->line;
	i = control->term->inline_position;
	if (i == -1)
		return (-1);
	while (str[i] && (str[i] == ' ' || str[i] == '\n'))
		i--;
	if (i == -1)
		return (-1);
	while (i >= 0)
	{
		if (str[i] == ' ' || str[i] == '\n')
			return (i + 1);
		i--;
	}
	return (0);
}

// Assembly:
movq 0x18(%rdi), %rcx
movslq 0xc(%rcx), %rsi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $-0x1, %rsi
je 0x4c47
movq (%rcx), %rcx
leal 0x1(%rsi), %edx
xorl %edi, %edi
movq %rsi, %r8
movzbl (%rcx,%r8), %r9d
cmpl $0x20, %r9d
je 0x4c14
cmpl $0xa, %r9d
jne 0x4c1b
decq %r8
incl %edi
jmp 0x4c03
cmpq $-0x1, %r8
je 0x4c47
xorl %eax, %eax
testq %r8, %r8
js 0x4c47
subl %edi, %edx
subl %edi, %esi
movl %esi, %esi
addq %rsi, %rcx
movzbl (%rcx), %esi
cmpl $0x20, %esi
je 0x4c48
cmpl $0xa, %esi
je 0x4c48
decl %edx
decq %rcx
testl %edx, %edx
jg 0x4c31
retq
movl %edx, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_insert_character.c
// Function: terminfo_insert_char
int		terminfo_insert_char(t_control *control, char c)
{
	int cur_line_len;
	int	saved_inline_position;

	cur_line_len = terminfo_predict_current_line_len(control);
	if (cur_line_len == control->term->size_window.x)
	{
		control->term->cursor_saved = control->term->cursor;
		saved_inline_position = control->term->inline_position;
		if (!terminfo_insert_char_cascade(control))
			return (0);
		if (!(terminfo_cursor_saved_reset(control)))
			return (0);
		control->term->inline_position = saved_inline_position;
	}
	if (!terminfo_insert_in_place(control, c))
		return (0);
	if (!(terminfo_cursor_track_position(control, 1)))
		return (0);
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x4e7c
movq 0x18(%rbx), %rcx
cmpl 0x28(%rcx), %eax
jne 0x4cc9
movq 0x10(%rcx), %rax
movq %rax, 0x18(%rcx)
movq 0x18(%rbx), %rax
movl 0xc(%rax), %r15d
movq %rbx, %rdi
callq 0x4d02
xorl %r14d, %r14d
testl %eax, %eax
je 0x4cf4
movq %rbx, %rdi
callq 0x464f
testl %eax, %eax
je 0x4cf4
movq 0x18(%rbx), %rax
movl %r15d, 0xc(%rax)
movsbl %bpl, %esi
movq %rbx, %rdi
callq 0x4d83
testl %eax, %eax
je 0x4cf1
movq %rbx, %rdi
movl $0x1, %esi
callq 0x4a16
xorl %r14d, %r14d
testl %eax, %eax
setne %r14b
jmp 0x4cf4
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_insert_character.c
// Function: terminfo_insert_char_cascade
int		terminfo_insert_char_cascade(t_control *control)
{
	char	cascade_me;
	char	*str;
	int		offset;
	int		end_index;

	str = control->term->line;
	while (terminfo_predict_current_line_len(control) \
			== control->term->size_window.x)
	{
		end_index = terminfo_predict_current_line_end_index(control);
		offset = end_index - control->term->inline_position;
		cascade_me = str[end_index];
		if (!terminfo_cursor_move_diagonally_down(control))
			return (0);
		if (!terminfo_insert_in_place(control, cascade_me))
			return (0);
		control->term->inline_position += offset;
		if (control->term->inline_position >= control->term->line_len)
			break ;
	}
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq (%rax), %r15
movq %rbx, %rdi
callq 0x4e7c
movq 0x18(%rbx), %rcx
movl $0x1, %r14d
cmpl 0x28(%rcx), %eax
jne 0x4d77
movq %rbx, %rdi
callq 0x4ee8
movl %eax, %ebp
movq 0x18(%rbx), %rax
movslq %ebp, %rcx
subl 0xc(%rax), %ebp
movb (%r15,%rcx), %r12b
movq %rbx, %rdi
callq 0x4729
xorl %r14d, %r14d
testl %eax, %eax
je 0x4d77
movsbl %r12b, %esi
movq %rbx, %rdi
callq 0x4d83
testl %eax, %eax
je 0x4d77
movq 0x18(%rbx), %rax
addl 0xc(%rax), %ebp
movl %ebp, 0xc(%rax)
movl $0x1, %r14d
cmpl 0x8(%rax), %ebp
jl 0x4d14
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_insert_character.c
// Function: terminfo_insert_in_place
int		terminfo_insert_in_place(t_control *control, char c)
{
	char *caps;

	if (c != '\n')
	{
		if (!(caps = terminfo_edit_caps(control, "ich", 1)))
			return (0);
		tputs(caps, 1, ft_putchar);
		ft_putchar_fd(c, 1);
	}
	else if (!terminfo_insert_newline(control))
		return (0);
	return (1);
}

// Assembly:
pushq %rbx
movl %esi, %ebx
cmpb $0xa, %bl
jne 0x4d96
callq 0x4dd8
testl %eax, %eax
jne 0x4dcd
jmp 0x4dd4
leaq 0x6593(%rip), %rsi      # 0xb330
movl $0x1, %edx
callq 0x4436
testq %rax, %rax
je 0x4dd4
leaq 0x5bbd(%rip), %rdx      # 0xa970
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
movsbl %bl, %edi
movl $0x1, %esi
callq 0x9db0
movl $0x1, %eax
jmp 0x4dd6
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_insert_character.c
// Function: terminfo_insert_newline
int		terminfo_insert_newline(t_control *control)
{
	char		*caps;
	t_int_pair	cursor_end;

	cursor_end = terminfo_cursor_get_endl(control);
	if (cursor_end.y >= control->term->size_window.y)
	{
		if (!(caps = terminfo_edit_caps(control, "indn", 1)))
			return (0);
		tputs(caps, 1, ft_putchar);
		control->term->cursor.y--;
		control->term->cursor_saved.y--;
		control->term->cursor_start.y--;
		if (!terminfo_cursor_move(control, control->term->cursor.x,\
					control->term->cursor.y))
			return (0);
	}
	if (!(caps = terminfo_get_caps("il1", control)))
		return (0);
	tputs(caps, 1, ft_putchar);
	return (1);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4676
shrq $0x20, %rax
movq 0x18(%rbx), %rcx
cmpl %eax, 0x2c(%rcx)
jg 0x4e40
leaq 0x6530(%rip), %rsi      # 0xb327
movq %rbx, %rdi
movl $0x1, %edx
callq 0x4436
xorl %ebp, %ebp
testq %rax, %rax
je 0x4e71
leaq 0x5b5e(%rip), %rdx      # 0xa970
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
movq 0x18(%rbx), %rax
movl 0x10(%rax), %esi
movl 0x14(%rax), %edx
decl %edx
movl %edx, 0x14(%rax)
decl 0x1c(%rax)
decl 0x24(%rax)
movq %rbx, %rdi
callq 0x4879
testl %eax, %eax
je 0x4e71
leaq 0x64ed(%rip), %rdi      # 0xb334
movq %rbx, %rsi
callq 0x4457
testq %rax, %rax
je 0x4e6f
leaq 0x5b15(%rip), %rdx      # 0xa970
movl $0x1, %ebp
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
jmp 0x4e71
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_predict_size.c
// Function: terminfo_predict_current_line_len
int			terminfo_predict_current_line_len(t_control *control)
{
	int		i;
	int		j;
	char	*str;

	i = control->term->cursor.x;
	j = control->term->inline_position + 1;
	str = control->term->line;
	if (!str)
		return (control->term->prompt_len);
	while (i < control->term->size_window.x && str[j] && str[j] != '\n')
	{
		i++;
		j++;
	}
	if (str[j] == '\n' && i != control->term->size_window.x)
		return (++i);
	return (i);
}

// Assembly:
movq 0x18(%rdi), %rdx
movq (%rdx), %rcx
testq %rcx, %rcx
je 0x4ecb
movl 0xc(%rdx), %edi
movl 0x10(%rdx), %eax
movl 0x28(%rdx), %edx
leal 0x1(%rdi), %esi
movl %eax, %r8d
subl %edx, %r8d
jge 0x4ed5
movslq %esi, %r9
addl %edx, %edi
subl %eax, %edi
incl %edi
addq %rcx, %r9
xorl %r10d, %r10d
movzbl (%r9), %r11d
testl %r11d, %r11d
je 0x4ecf
cmpl $0xa, %r11d
je 0x4ecf
decl %r10d
incq %r9
cmpl %r10d, %r8d
jne 0x4eab
movl %edx, %eax
movl %edi, %esi
jmp 0x4ed5
movl 0x48(%rdx), %eax
retq
subl %r10d, %esi
subl %r10d, %eax
movslq %esi, %rsi
cmpb $0xa, (%rcx,%rsi)
jne 0x4ee7
xorl %ecx, %ecx
cmpl %edx, %eax
setne %cl
addl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_predict_size.c
// Function: terminfo_predict_current_line_end_index
int			terminfo_predict_current_line_end_index(t_control *control)
{
	int		i;
	int		j;
	char	*str;

	i = control->term->cursor.x;
	j = control->term->inline_position + 1;
	str = control->term->line;
	if (!str)
		return (0);
	while (i + 1 < control->term->size_window.x && str[j] && str[j] != '\n')
	{
		i++;
		j++;
	}
	return (j);
}

// Assembly:
movq 0x18(%rdi), %rdx
movq (%rdx), %rax
testq %rax, %rax
je 0x4f27
movslq 0xc(%rdx), %rsi
movl 0x10(%rdx), %ecx
movl 0x28(%rdx), %edx
leal 0x1(%rsi), %edi
addq %rax, %rsi
incq %rsi
incl %ecx
movl %edi, %eax
cmpl %edx, %ecx
jge 0x4f26
movzbl (%rsi), %r8d
cmpl $0xa, %r8d
je 0x4f26
leal 0x1(%rax), %edi
incq %rsi
incl %ecx
testl %r8d, %r8d
jne 0x4f09
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_predict_size.c
// Function: terminfo_predict_current_line_start_index
int			terminfo_predict_current_line_start_index(t_control *control)
{
	int		i;
	int		j;
	char	*str;

	i = control->term->cursor.x;
	j = control->term->inline_position + 1;
	str = control->term->line;
	if (!str)
		return (0);
	if (str[j] == '\n' && i != 0)
	{
		i--;
		j--;
	}
	while (i > 0 && j > 0 && str[j] != '\n')
	{
		i--;
		j--;
	}
	return (j);
}

// Assembly:
movq 0x18(%rdi), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x4f82
movslq 0xc(%rax), %rdi
movl 0x10(%rax), %esi
leaq 0x1(%rdi), %rdx
cmpb $0xa, 0x1(%rcx,%rdi)
sete %al
testl %esi, %esi
setne %r8b
andb %al, %r8b
movzbl %r8b, %eax
subl %eax, %esi
testb %al, %al
cmovnel %edi, %edx
testl %esi, %esi
jle 0x4f7f
testl %edx, %edx
jle 0x4f7f
movl %edx, %eax
cmpb $0xa, (%rcx,%rax)
je 0x4f7f
leal -0x1(%rdx), %eax
cmpl $0x2, %esi
jl 0x4f7e
decl %esi
cmpl $0x1, %edx
movl %eax, %edx
jg 0x4f65
retq
movl %edx, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_predict_size.c
// Function: terminfo_predict_previous_line_cursor_end
t_int_pair	terminfo_predict_previous_line_cursor_end(t_control *control)
{
	t_int_pair	end_previous;
	int			end_index_prev;
	int			i;
	char		*str;

	i = 0;
	end_previous = control->term->cursor_start;
	end_index_prev = terminfo_predict_current_line_start_index(control) - 1;
	str = control->term->line;
	while (i < end_index_prev)
	{
		if (str[i] == '\n' \
				|| end_previous.x + 1 == control->term->size_window.x)
		{
			end_previous.x = 0;
			end_previous.y++;
		}
		else
			end_previous.x++;
		i++;
	}
	return (end_previous);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x18(%rdi), %r14
movl 0x20(%r14), %ebp
movl 0x24(%r14), %ebx
callq 0x4f2a
cmpl $0x2, %eax
jl 0x4fc0
movq (%r14), %rcx
decl %eax
xorl %edx, %edx
cmpb $0xa, (%rcx,%rdx)
je 0x4fb4
incl %ebp
cmpl 0x28(%r14), %ebp
jne 0x4fb8
incl %ebx
xorl %ebp, %ebp
incq %rdx
cmpq %rdx, %rax
jne 0x4fa6
shlq $0x20, %rbx
movl %ebp, %eax
orq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_predict_size.c
// Function: terminfo_predict_next_line_len
int			terminfo_predict_next_line_len(t_control *control)
{
	int		i;
	int		j;
	char	*str;

	i = 0;
	j = terminfo_predict_current_line_end_index(control);
	str = control->term->line;
	if (!str || !str[j])
		return (0);
	j++;
	while (i + 1 < control->term->size_window.x && str[j] && str[j] != '\n')
	{
		j++;
		i++;
	}
	if (str[j] == '\n')
		i++;
	return (i);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x4ee8
movl %eax, %ecx
movq 0x18(%rbx), %rsi
movq (%rsi), %rdx
xorl %eax, %eax
testq %rdx, %rdx
je 0x5047
movslq %ecx, %r8
cmpb $0x0, (%rdx,%r8)
je 0x5047
movl 0x28(%rsi), %eax
cmpl $0x2, %eax
movl $0x1, %esi
cmovgel %eax, %esi
leal -0x1(%rsi), %eax
leal (%r8,%rsi), %edi
leaq (%r8,%rdx), %r9
incq %r9
xorl %r8d, %r8d
movl %eax, %r10d
addl %r8d, %r10d
je 0x503d
movzbl (%r9), %r10d
decl %r8d
cmpl $0xa, %r10d
je 0x502d
incq %r9
testl %r10d, %r10d
jne 0x5010
subl %r8d, %ecx
movl %r8d, %eax
notl %eax
negl %r8d
movl %ecx, %edi
movl %r8d, %esi
movslq %edi, %rcx
cmpb $0xa, (%rdx,%rcx)
cmovel %esi, %eax
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_clipboard_root.c
// Function: terminfo_clipboard_copy_start
int	terminfo_clipboard_copy_start(t_control *control, t_clipboard *clipboard)
{
	char *caps;

	if (!control->term->line)
		return (1);
	if (control->term->inline_position + 1 == control->term->line_len)
		return (1);
	ft_free((void**)&clipboard->paste_me);
	if (!(caps = terminfo_get_caps("smso", control)))
		return (0);
	tputs(caps, 1, ft_putchar);
	clipboard->start = control->term->inline_position + 1;
	clipboard->end = control->term->inline_position + 1;
	clipboard->highlight = 1;
	clipboard->swaped_end = 0;
	if (!terminfo_clipboard_highlight_cur(control, 1))
		return (0);
	return (1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rcx
movl $0x1, %eax
cmpq $0x0, (%rcx)
je 0x50d6
movl 0xc(%rcx), %edx
incl %edx
cmpl 0x8(%rcx), %edx
je 0x50d6
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsi), %rdi
callq 0xa9c0
leaq 0x62b9(%rip), %rdi      # 0xb338
movq %rbx, %rsi
callq 0x4457
testq %rax, %rax
je 0x50d4
leaq 0x58dd(%rip), %rdx      # 0xa970
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
movq 0x18(%rbx), %rax
movl 0xc(%rax), %eax
incl %eax
movl %eax, 0x4(%r14)
movl %eax, 0x8(%r14)
movl $0x1, (%r14)
movl $0x0, 0xc(%r14)
movq %rbx, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x50de
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_clipboard_root.c
// Function: terminfo_clipboard_highlight_cur
int	terminfo_clipboard_highlight_cur(t_control *control, int on)
{
	char c;
	char *caps;

	if (!on)
	{
		if (!(caps = terminfo_get_caps("rmso", control)))
			return (0);
		tputs(caps, 1, ft_putchar);
	}
	c = control->term->line[control->term->inline_position + 1];
	ft_putchar_fd(c, 1);
	if (!terminfo_cursor_move(control, control->term->cursor.x, \
				control->term->cursor.y))
		return (0);
	if (!on)
	{
		if (!(caps = terminfo_get_caps("smso", control)))
			return (0);
		tputs(caps, 1, ft_putchar);
	}
	return (1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
testl %esi, %esi
jne 0x5117
leaq 0x624b(%rip), %rdi      # 0xb33d
movq %rbx, %rsi
callq 0x4457
testq %rax, %rax
je 0x5184
leaq 0x5866(%rip), %rdx      # 0xa970
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
movq 0x18(%rbx), %rax
movq (%rax), %rcx
movslq 0xc(%rax), %rax
movsbl 0x1(%rcx,%rax), %edi
movl $0x1, %esi
callq 0x9db0
movq 0x18(%rbx), %rax
movl 0x10(%rax), %esi
movl 0x14(%rax), %edx
movq %rbx, %rdi
callq 0x4879
xorl %r14d, %r14d
testl %eax, %eax
setne %r14b
testl %ebp, %ebp
jne 0x5187
testl %eax, %eax
je 0x5187
leaq 0x61dd(%rip), %rdi      # 0xb338
movq %rbx, %rsi
callq 0x4457
testq %rax, %rax
je 0x5184
leaq 0x5801(%rip), %rdx      # 0xa970
movl $0x1, %r14d
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
jmp 0x5187
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_clipboard_root.c
// Function: terminfo_clipboard_copy_end
int	terminfo_clipboard_copy_end(t_control *control, t_clipboard *clipboard)
{
	if (!terminfo_clipboard_disable_highlight(control))
		return (0);
	if (!terminfo_refresh_screen_from_start(control))
		return (0);
	if (clipboard->start > clipboard->end)
	{
		clipboard->start ^= clipboard->end;
		clipboard->end ^= clipboard->start;
		clipboard->start ^= clipboard->end;
		clipboard->swaped_end = 1;
	}
	if (!(clipboard->paste_me = ft_substr(control->term->line, \
				clipboard->start, clipboard->end - clipboard->start + 1)))
	{
		control->quit = 1;
		return (0);
	}
	return (1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x5201
xorl %ebp, %ebp
testl %eax, %eax
je 0x51fa
movq %rbx, %rdi
callq 0x445c
testl %eax, %eax
je 0x51fa
movl 0x4(%r14), %ecx
movl 0x8(%r14), %esi
cmpl %esi, %ecx
jle 0x51d0
movl %ecx, 0x8(%r14)
movl %esi, 0x4(%r14)
movl $0x1, 0xc(%r14)
movl %ecx, %eax
jmp 0x51d4
movl %esi, %eax
movl %ecx, %esi
movq 0x18(%rbx), %rcx
movq (%rcx), %rdi
subl %esi, %eax
incl %eax
movslq %eax, %rdx
callq 0xa69c
movq %rax, 0x10(%r14)
movl $0x1, %ebp
testq %rax, %rax
jne 0x51fa
orb $0x1, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_clipboard_root.c
// Function: terminfo_clipboard_dispatch_action
int	terminfo_clipboard_dispatch_action(t_control *control, int c)
{
	if (c == KEY_RIGHT_ID)
	{
		if (!terminfo_clipboard_right_move(control, &control->term->clipboard))
			return (0);
	}
	else if (c == KEY_LEFT_ID)
	{
		if (!terminfo_clipboard_left_move(control, &control->term->clipboard))
			return (0);
	}
	else if (c == CTRL_K_COMBO)
	{
		if (!terminfo_clipboard_copy_end(control, &control->term->clipboard))
			return (0);
		control->term->clipboard.highlight = 0;
	}
	else if (c == CTRL_L_COMBO)
	{
		if (!terminfo_clipboard_copy_end(control, &control->term->clipboard))
			return (0);
		if (!terminfo_clipboard_cut(control, &control->term->clipboard))
			return (0);
		control->term->clipboard.highlight = 0;
	}
	return (1);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x81, %esi
jg 0x528a
cmpl $0xb, %esi
je 0x52ac
cmpl $0xc, %esi
jne 0x52e4
movq 0x18(%rbx), %rsi
addq $0x60, %rsi
movq %rbx, %rdi
callq 0x518f
xorl %ebp, %ebp
testl %eax, %eax
je 0x52ed
movq 0x18(%rbx), %rsi
addq $0x60, %rsi
movq %rbx, %rdi
callq 0x53c7
testl %eax, %eax
jne 0x52c0
jmp 0x52ed
cmpl $0x83, %esi
je 0x52d0
cmpl $0x82, %esi
jne 0x52e4
movq 0x18(%rbx), %rsi
addq $0x60, %rsi
movq %rbx, %rdi
callq 0x52f8
jmp 0x52e0
movq 0x18(%rbx), %rsi
addq $0x60, %rsi
movq %rbx, %rdi
callq 0x518f
testl %eax, %eax
je 0x52eb
addq $0x18, %rbx
movq (%rbx), %rax
movl $0x0, 0x60(%rax)
jmp 0x52e4
movq 0x18(%rbx), %rsi
addq $0x60, %rsi
movq %rbx, %rdi
callq 0x5365
testl %eax, %eax
je 0x52eb
movl $0x1, %ebp
jmp 0x52ed
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_clipboard_action.c
// Function: terminfo_clipboard_right_move
int	terminfo_clipboard_right_move(t_control *control, t_clipboard *clipboard)
{
	if (control->term->inline_position + 2 == control->term->line_len)
		return (1);
	if (control->term->inline_position + 1 < clipboard->start)
	{
		if (!terminfo_clipboard_highlight_cur(control, 0))
			return (0);
		if (!terminfo_cursor_move_right(control))
			return (0);
	}
	else
	{
		if (!terminfo_cursor_move_right(control))
			return (0);
		if (!terminfo_clipboard_highlight_cur(control, 1))
			return (0);
	}
	clipboard->end++;
	return (1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x18(%rdi), %rcx
movl 0xc(%rcx), %eax
leal 0x2(%rax), %edx
movl $0x1, %ebp
cmpl 0x8(%rcx), %edx
je 0x535e
movq %rsi, %rbx
movq %rdi, %r14
incl %eax
cmpl 0x4(%rsi), %eax
jge 0x5337
xorl %ebp, %ebp
movq %r14, %rdi
xorl %esi, %esi
callq 0x50de
testl %eax, %eax
je 0x535e
movq %r14, %rdi
callq 0x46b8
jmp 0x5352
movq %r14, %rdi
callq 0x46b8
xorl %ebp, %ebp
testl %eax, %eax
je 0x535e
movq %r14, %rdi
movl $0x1, %esi
callq 0x50de
testl %eax, %eax
je 0x535e
incl 0x8(%rbx)
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_clipboard_action.c
// Function: terminfo_clipboard_left_move
int	terminfo_clipboard_left_move(t_control *control, t_clipboard *clipboard)
{
	if (control->term->inline_position >= 0)
		clipboard->end--;
	if (control->term->inline_position + 1 > clipboard->start)
	{
		if (!terminfo_clipboard_highlight_cur(control, 0))
			return (0);
		if (!terminfo_cursor_move_left(control))
			return (0);
	}
	else
	{
		if (!terminfo_cursor_move_left(control))
			return (0);
		if (!terminfo_clipboard_highlight_cur(control, 1))
			return (0);
	}
	return (1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rax
movl 0xc(%rax), %eax
testl %eax, %eax
js 0x537a
decl 0x8(%rsi)
cmpl 0x4(%rsi), %eax
jge 0x539c
movq %r14, %rdi
callq 0x47b0
xorl %ebx, %ebx
testl %eax, %eax
je 0x53bd
movq %r14, %rdi
movl $0x1, %esi
callq 0x50de
jmp 0x53b4
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x50de
testl %eax, %eax
je 0x53bd
movq %r14, %rdi
callq 0x47b0
testl %eax, %eax
je 0x53bd
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_clipboard_action.c
// Function: terminfo_clipboard_cut
int	terminfo_clipboard_cut(t_control *control, t_clipboard *clipboard)
{
	char	*str;
	int		len_rest;
	int		len_cut;
	int		i;

	str = control->term->line;
	len_rest = control->term->line_len - clipboard->end - 1;
	len_cut = clipboard->end - clipboard->start + 1;
	i = 1;
	if (!clipboard->swaped_end)
	{
		while (i < len_cut)
		{
			terminfo_cursor_track_position(control, 0);
			i++;
			control->term->inline_position--;
		}
	}
	ft_memmove(str + clipboard->start, str + clipboard->end + 1, len_rest + 1);
	control->term->line_len -= len_cut;
	if (!terminfo_refresh_screen_from_start(control))
		return (0);
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq (%rax), %r8
movslq 0x8(%rax), %r14
movl 0x4(%rsi), %ecx
movl 0x8(%rsi), %eax
movslq %eax, %r13
movl %r13d, %r12d
subl %ecx, %r12d
cmpl $0x0, 0xc(%rsi)
setne %dl
testl %r12d, %r12d
setle %sil
orb %dl, %sil
jne 0x542d
movq %r8, (%rsp)
movl %r12d, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4a16
movq 0x18(%rbx), %rax
decl 0xc(%rax)
decl %ebp
jne 0x540c
movl 0x4(%r15), %ecx
movl 0x8(%r15), %eax
movq (%rsp), %r8
notl %r12d
subq %r13, %r14
movslq %ecx, %rdi
addq %r8, %rdi
cltq
leaq (%r8,%rax), %rsi
incq %rsi
movq %r14, %rdx
callq 0x9d58
movq 0x18(%rbx), %rax
addl %r12d, 0x8(%rax)
movq %rbx, %rdi
callq 0x445c
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/terminfo_clipboard_action.c
// Function: terminfo_clipboard_paste
int	terminfo_clipboard_paste(t_control *control, t_clipboard *clipboard)
{
	int			len_paste_me;
	int			i;
	t_int_pair	cursor_end;

	if (!clipboard->paste_me)
		return (1);
	len_paste_me = ft_strlen(clipboard->paste_me);
	i = -1;
	if (!(ft_strstradd(&control->term->line, \
					control->term->inline_position + 1, clipboard->paste_me)))
		return (0);
	control->term->line_len += len_paste_me;
	cursor_end = terminfo_cursor_get_endl(control);
	while (clipboard->paste_me[++i] \
			&& cursor_end.y >= control->term->size_window.y)
	{
		if (clipboard->paste_me[i] == '\n' && (control->term->cursor.y--))
			cursor_end.y--;
	}
	control->term->clipboard.highlight = 0;
	if (!terminfo_refresh_screen_from_start(control))
		return (0);
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rsi), %rdi
testq %rdi, %rdi
je 0x5508
movq %rsi, %r14
callq 0xa4f8
movq %rax, %r15
movq 0x18(%rbx), %rdi
movl 0xc(%rdi), %esi
incl %esi
movq 0x10(%r14), %rdx
callq 0xaac0
testl %eax, %eax
je 0x550f
movq 0x18(%rbx), %rax
addl %r15d, 0x8(%rax)
movq %rbx, %rdi
callq 0x4676
movq 0x10(%r14), %rcx
movb (%rcx), %dil
movq 0x18(%rbx), %rdx
testb %dil, %dil
je 0x54ee
shrq $0x20, %rax
movl 0x2c(%rdx), %esi
incq %rcx
cmpl %esi, %eax
jl 0x54ee
cmpb $0xa, %dil
jne 0x54e3
addl $-0x1, 0x14(%rdx)
sbbl $0x0, %eax
movb (%rcx), %dil
incq %rcx
testb %dil, %dil
jne 0x54d2
movl $0x0, 0x60(%rdx)
movq %rbx, %rdi
callq 0x445c
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x5511
movl $0x1, %eax
jmp 0x5511
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/read_root.c
// Function: read_root
void	read_root(t_control *control, int read_res, char c)
{
	while (1)
	{
		read_res = read(STDIN_FILENO, &c, 1);
		if (!read_res)
			continue;
		if (c == '\n')
			break ;
		if (read_need_to_stop(control, c, read_res))
			return ;
		read_dispatch_for_processing(control, c);
		if (read_need_to_stop(control, c, read_res))
			return ;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x7(%rsp), %r14
movb %dl, (%r14)
movl $0x1, %edx
xorl %edi, %edi
movq %r14, %rsi
callq 0x2140
movq %rax, %r15
testl %r15d, %r15d
je 0x552a
movsbl 0x7(%rsp), %ebp
cmpl $0xa, %ebp
je 0x5577
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x5582
testl %eax, %eax
jne 0x5577
movq %rbx, %rdi
movl %ebp, %esi
callq 0x55e1
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x5582
testl %eax, %eax
je 0x552a
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/read_root.c
// Function: read_need_to_stop
int		read_need_to_stop(t_control *control, char c, int res)
{
	if (control->quit)
		;
	else if (res == -1)
	{
		control->quit = 1;
		//maybe display message for a read failure
		//maybe set control->exit_status...
	}
	else if (c == 4 && !control->term->line_len)
	{
		control->quit = 1;
		ft_putstr_fd("exit", 2);
	}
	else if (c == 3)
	{
		control->exit_status = (IS_APPLE ? 1 : 130);
		control->ctrl_c = 1;
	}
	else
		return (0);
	return (1);
}

// Assembly:
movb (%rdi), %cl
movl $0x1, %eax
testb $0x1, %cl
jne 0x55ad
cmpl $-0x1, %edx
je 0x55ae
movsbl %sil, %edx
cmpl $0x3, %edx
je 0x55b3
xorl %eax, %eax
cmpl $0x4, %edx
jne 0x55ad
movq 0x18(%rdi), %rdx
cmpl $0x0, 0x8(%rdx)
je 0x55c0
retq
orb $0x1, %cl
jmp 0x55bd
movl $0x82, 0x4(%rdi)
orb $0x2, %cl
movb %cl, (%rdi)
retq
pushq %rax
orb $0x1, %cl
movb %cl, (%rdi)
leaq 0x5c0f(%rip), %rdi      # 0xb1dc
movl $0x2, %esi
callq 0x9e70
movl $0x1, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/read_root.c
// Function: read_dispatch_for_processing
void	read_dispatch_for_processing(t_control *control, int c)
{
	if (c == 27 && !(c = read_remap_esc_sequence_from_128(control, c)))
		return ;
	if (control->term->clipboard.highlight)
	{
		if (c != KEY_LEFT_ID && c != KEY_RIGHT_ID && c != CTRL_K_COMBO \
				&& c != CTRL_L_COMBO)
			terminfo_clipboard_copy_end(control, &control->term->clipboard);
		else
		{
			terminfo_clipboard_dispatch_action(control, c);
			return ;
		}
	}
	if (c == CTRL_K_COMBO)
		terminfo_clipboard_copy_start(control, &control->term->clipboard);
	else if (c >= 128)
		read_process_special_key(control, c);
	else if (c == 127)
		read_process_del_char(control);
	else if (!ft_isprint(c))
		read_process_control_combo(control, c);
	else
		read_process_add_char(control, c);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
cmpl $0x1b, %esi
jne 0x5619
movq 0x18(%rbx), %rdi
movl $0x1b, %esi
callq 0x56e6
movl %eax, %r14d
subl $-0x80, %r14d
je 0x5611
cmpl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
jne 0x5619
orb $0x1, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x18(%rbx), %rsi
cmpl $0x0, 0x60(%rsi)
je 0x5656
leal -0xb(%r14), %eax
cmpl $0x2, %eax
jb 0x5638
leal -0x82(%r14), %eax
cmpl $0x2, %eax
jae 0x564a
movq %rbx, %rdi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5242
addq $0x60, %rsi
movq %rbx, %rdi
callq 0x518f
cmpl $0xb, %r14d
jne 0x5673
movq 0x18(%rbx), %rsi
addq $0x60, %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x504c
cmpl $0x80, %r14d
jl 0x568e
movq %rbx, %rdi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5836
cmpl $0x7f, %r14d
jne 0x56a3
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x57f8
movl %r14d, %edi
callq 0x9bbc
movsbl %r14b, %esi
movq %rbx, %rdi
addq $0x8, %rsp
testl %eax, %eax
je 0x56c2
popq %rbx
popq %r14
jmp 0x57ac
popq %rbx
popq %r14
jmp 0x58f6
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/read_root.c
// Function: read_get_esc_seq_id
int		read_get_esc_seq_id(t_term *term, int c)
{
	int		res_read;
	char	*str;
	int		i;

	str = NULL;
	if (!ft_strappend(&str, c))
		return (-1);
	while ((res_read = read(STDIN_FILENO, &c, 1)) && (i = -1))
	{
		if (res_read == -1 || !ft_strappend(&str, c))
		{
			free(str);
			return (-1);
		}
		while (++i < NUMBER_SPECIAL_KEYS)
		{
			if (!ft_strncmp(str, term->array_esc_seq[i], ft_strlen(str) + 1))
			{
				free(str);
				return (i);
			}
		}
	}
	free(str);
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
leaq 0x10(%rsp), %rdi
movq $0x0, (%rdi)
movsbl %sil, %esi
callq 0xa8f8
testl %eax, %eax
je 0x578b
leaq 0xc(%rsp), %r14
leaq 0x10(%rsp), %r15
movl $0x1, %edx
xorl %edi, %edi
movq %r14, %rsi
callq 0x2140
movq %rax, %r12
incl %eax
cmpl $0x2, %eax
jb 0x577f
movsbl 0xc(%rsp), %esi
movq %r15, %rdi
callq 0xa8f8
testl %eax, %eax
je 0x57a3
xorl %r12d, %r12d
cmpq $0xe, %r12
je 0x571e
movq 0x10(%rsp), %r13
movq 0x50(%rbx), %rax
movq (%rax,%r12,8), %rbp
movq %r13, %rdi
callq 0xa4f8
leaq 0x1(%rax), %rdx
movq %r13, %rdi
movq %rbp, %rsi
callq 0xa518
incq %r12
testl %eax, %eax
jne 0x574b
decl %r12d
movq 0x10(%rsp), %rdi
callq 0x2240
jmp 0x5791
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x577f
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/read_process_char.c
// Function: read_process_add_char
void	read_process_add_char(t_control *control, char c)
{
	if (!(ft_strcadd(&(control->term->line), c, \
					control->term->inline_position + 1)))
	{
		control->quit = 1;
		return ;
	}
	control->term->inline_position++;
	control->term->line_len++;
	if (!terminfo_insert_char(control, c))
	{
		control->quit = 1;
		return ;
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movslq 0xc(%rdi), %rdx
incq %rdx
callq 0xa9d8
testl %eax, %eax
je 0x57ee
movq 0x18(%rbx), %rax
movq 0x8(%rax), %xmm0
pcmpeqd %xmm1, %xmm1
psubd %xmm1, %xmm0
movq %xmm0, 0x8(%rax)
movsbl %bpl, %esi
movq %rbx, %rdi
callq 0x4c7c
testl %eax, %eax
jne 0x57f1
orb $0x1, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/read_process_char.c
// Function: read_process_del_char
void	read_process_del_char(t_control *control)
{
	if (control->term->inline_position == -1)
		return ;
	ft_strcdel(control->term->line, control->term->inline_position);
	if (!terminfo_del_char(control))
		return ;
	control->term->inline_position--;
	control->term->line_len--;
}

// Assembly:
pushq %rbx
movq 0x18(%rdi), %rax
movslq 0xc(%rax), %rsi
cmpq $-0x1, %rsi
je 0x5834
movq %rdi, %rbx
movq (%rax), %rdi
callq 0xaa78
movq %rbx, %rdi
callq 0x4c4c
testl %eax, %eax
je 0x5834
movq 0x18(%rbx), %rax
movq 0x8(%rax), %xmm0
pcmpeqd %xmm1, %xmm1
paddd %xmm0, %xmm1
movq %xmm1, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/read_process_char.c
// Function: read_process_special_key
void	read_process_special_key(t_control *control, int i)
{
	if (i == KEY_RIGHT_ID)
		terminfo_cursor_move_right(control);
	else if (i == KEY_LEFT_ID)
		terminfo_cursor_move_left(control);
	else if (i == KEY_HOME_ID)
		read_process_control_combo(control, CTRL_A_COMBO);
	else if (i == KEY_END_ID)
		read_process_control_combo(control, CTRL_E_COMBO);
	else if (i == KEY_UP_CTRL_ID)
		terminfo_cursor_move_up(control, &control->term->cursor);
	else if (i == KEY_DOWN_CTRL_ID)
		terminfo_cursor_move_down(control, &control->term->cursor);
	else if (i == KEY_RIGHT_CTRL_ID)
		terminfo_cursor_move_next_word(control);
	else if (i == KEY_LEFT_CTRL_ID)
		terminfo_cursor_move_previous_word(control);
	else if (i == KEY_UP_ID)
		history_search(control, 1);
	else if (i == KEY_DOWN_ID)
		history_search(control, 0);
}

// Assembly:
pushq %rbx
addl $0xffffff7f, %esi       # imm = 0xFFFFFF7F
cmpl $0xc, %esi
ja 0x58e2
movq %rdi, %rbx
leaq 0x5af4(%rip), %rax      # 0xb344
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x58b8
movq %rbx, %rdi
popq %rbx
jmp 0x47b0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4a4f
testl %eax, %eax
je 0x58e2
movq 0x18(%rbx), %rax
movl 0x8(%rax), %ecx
decl %ecx
movl %ecx, 0xc(%rax)
jmp 0x58e2
movq %rbx, %rdi
popq %rbx
jmp 0x46b8
movq 0x18(%rbx), %rsi
addq $0x10, %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x48c8
movq 0x18(%rbx), %rsi
addq $0x10, %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x496f
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x5ba8
movq %rbx, %rdi
movl $0x1, %esi
callq 0x4a4f
testl %eax, %eax
je 0x58e2
movq 0x18(%rbx), %rax
movl $0xffffffff, 0xc(%rax)  # imm = 0xFFFFFFFF
movq 0x20(%rax), %rcx
movq %rcx, 0x10(%rax)
popq %rbx
retq
movq %rbx, %rdi
popq %rbx
jmp 0x4b88
movq %rbx, %rdi
popq %rbx
jmp 0x4ac0
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/read_process_char.c
// Function: read_process_control_combo
void	read_process_control_combo(t_control *control, char c)
{
	if (c == CTRL_A_COMBO)
	{
		if (!terminfo_cursor_move_endl(control, 1))
			return ;
		control->term->inline_position = -1;
		control->term->cursor = control->term->cursor_start;
	}
	else if (c == CTRL_E_COMBO)
	{
		if (!terminfo_cursor_move_endl(control, 0))
			return ;
		control->term->inline_position = control->term->line_len - 1;
	}
	else if (c == CTRL_P_COMBO)
	{
		terminfo_clipboard_paste(control, &control->term->clipboard);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x10, %esi
je 0x594b
cmpl $0x5, %esi
je 0x592f
cmpl $0x1, %esi
jne 0x5949
movq %rbx, %rdi
movl $0x1, %esi
callq 0x4a4f
testl %eax, %eax
je 0x5949
movq 0x18(%rbx), %rax
movl $0xffffffff, 0xc(%rax)  # imm = 0xFFFFFFFF
movq 0x20(%rax), %rcx
movq %rcx, 0x10(%rax)
jmp 0x5949
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4a4f
testl %eax, %eax
je 0x5949
movq 0x18(%rbx), %rax
movl 0x8(%rax), %ecx
decl %ecx
movl %ecx, 0xc(%rax)
popq %rbx
retq
movq 0x18(%rbx), %rsi
addq $0x60, %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x5472
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/historic_root.c
// Function: history_root
int			history_root(t_control *control, t_history *history)
{
	if (!control->term->line)
	{
		if (!(control->term->line = ft_strdup("")))
		{
			control->quit = 1;
			return (0);
		}
	}
	if (!history_update_line(control, history))
		return (0);
	if (history_decide_discard_new_link(control))
		return (0);
//	debug_history_list(control->history)
	return (1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rax
cmpq $0x0, (%rax)
jne 0x5988
leaq 0x5864(%rip), %rdi      # 0xb1db
callq 0xa3e4
movq 0x18(%rbx), %rcx
movq %rax, (%rcx)
testq %rax, %rax
je 0x59aa
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5a5c
testl %eax, %eax
je 0x59ad
movq %rbx, %rdi
callq 0x5b40
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
jmp 0x59af
orb $0x1, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/historic_root.c
// Function: history_init_struct
t_history	*history_init_struct(void)
{
	t_history *hist;

	if (!(hist = (t_history*)malloc(sizeof(t_history))))
		return (NULL);
	hist->size = 0;
	hist->max_size = 255;
	hist->head = NULL;
	return (hist);
}

// Assembly:
pushq %rax
movl $0x18, %edi
callq 0x2190
testq %rax, %rax
je 0x59dc
movl $0x0, (%rax)
movl $0xff, 0x10(%rax)
movq $0x0, 0x8(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/historic_root.c
// Function: history_add_new_link
int			history_add_new_link(t_control *control)
{
	t_dlist	*history_new;
	char	*str;

	if (!(str = ft_strdup("")))
	{
		control->quit = 1;
		return (0);
	}
	if (!(history_new = ft_dlstnew(str)))
	{
		free(str);
		control->quit = 1;
		return (0);
	}
	ft_dlstadd_front(&(control->history->head), history_new);
	control->history->size++;
	if (control->history->size > control->history->max_size)
	{
		control->history->size--;
		ft_dlstpop_back(&control->history->head, history_del_content);
	}
	return (1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x57ea(%rip), %rdi      # 0xb1db
callq 0xa3e4
testq %rax, %rax
je 0x5a4c
movq %rax, %r14
movq %rax, %rdi
callq 0xab80
testq %rax, %rax
je 0x5a44
movq 0x10(%rbx), %rdi
addq $0x8, %rdi
movq %rax, %rsi
callq 0xaba0
movq 0x10(%rbx), %rdi
movl (%rdi), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%rdi)
movl $0x1, %ebx
cmpl 0x10(%rdi), %eax
jl 0x5a51
movl %eax, (%rdi)
addq $0x8, %rdi
leaq -0x5f(%rip), %rsi       # 0x59de
callq 0xac80
jmp 0x5a51
movq %r14, %rdi
callq 0x2240
orb $0x1, (%rbx)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/historic_update.c
// Function: history_update_line
int	history_update_line(t_control *control, t_history *history)
{
	char *current_hist;
	char *str;

	current_hist = (char *)(history->head->content);
	if (control->lexer_end.backslash)
		current_hist[ft_strlen(current_hist) - 1] = '\0';
	if (control->lexer_end.quote || control->lexer_end.add_semi)
	{
		if (!history_update_line_insert_sep(control, history))
			return (0);
	}
	else
	{
		if (!(str = ft_strjoin_free(current_hist, control->term->line, 1)))
		{
			control->quit = 1;
			return (0);
		}
		history->head->content = str;
	}
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rax
movq (%rax), %r15
movb 0x28(%rdi), %al
testb $0x4, %al
je 0x5a87
movq %r15, %rdi
callq 0xa4f8
movb $0x0, -0x1(%r15,%rax)
movb 0x28(%r14), %al
testb $0x12, %al
je 0x5a9c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5acf
testl %eax, %eax
jne 0x5abc
jmp 0x5ac7
movq 0x18(%r14), %rax
movq (%rax), %rsi
movq %r15, %rdi
movl $0x1, %edx
callq 0xa4b4
testq %rax, %rax
je 0x5ac3
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movl $0x1, %eax
jmp 0x5ac9
orb $0x1, (%r14)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/historic_update.c
// Function: history_update_line_insert_sep
int	history_update_line_insert_sep(t_control *control, t_history *history)
{
	char *str;
	char c;

	if (control->lexer_end.quote)
		c = '\n';
	else
		c = ';';
	str = (char *)(history->head->content);
	if (!ft_strappend(&str, c))
	{
		control->quit = 1;
		return (0);
	}
	if (!(str = ft_strjoin_free(str, control->term->line, 1)))
	{
		control->quit = 1;
		free(str);
		return (0);
	}
	history->head->content = str;
	return (1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
testb $0x2, 0x28(%rdi)
movq 0x8(%rsi), %rax
movq (%rax), %rax
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movl $0x3b, %eax
movl $0xa, %esi
cmovel %eax, %esi
callq 0xa8f8
testl %eax, %eax
je 0x5b2f
movq 0x8(%rsp), %rdi
movq 0x18(%r14), %rax
movq (%rax), %rsi
movl $0x1, %ebp
movl $0x1, %edx
callq 0xa4b4
testq %rax, %rax
je 0x5b2f
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
jmp 0x5b35
orb $0x1, (%r14)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/historic_update.c
// Function: history_decide_discard_new_link
int	history_decide_discard_new_link(t_control *control)
{
	char	*str;
	int		i;
	int		len;

	str = (char *)(control->history->head->content);
	if (!str || !(len = ft_strlen(str)) || control->ctrl_c)
	{
		control->history->size--;
		ft_dlstpop_front(&control->history->head, history_del_content);
		control->ctrl_c = 1;
		return (1);
	}
	i = 0;
	while (str[i] && str[i] == ' ')
		i++;
	if (i == len)
	{
		control->history->size--;
		ft_dlstpop_front(&control->history->head, history_del_content);
		control->ctrl_c = 1;
		return (1);
	}
	return (0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq 0x8(%rax), %rax
movq (%rax), %r14
testq %r14, %r14
je 0x5b7d
movq %r14, %rdi
callq 0xa4f8
testl %eax, %eax
je 0x5b7d
testb $0x2, (%rbx)
jne 0x5b7d
xorl %edx, %edx
cmpb $0x20, (%r14,%rdx)
leaq 0x1(%rdx), %rdx
je 0x5b6a
incl %eax
xorl %ecx, %ecx
cmpl %edx, %eax
jne 0x5b9b
movq 0x10(%rbx), %rdi
decl (%rdi)
addq $0x8, %rdi
leaq -0x1b0(%rip), %rsi      # 0x59de
callq 0xac4c
orb $0x2, (%rbx)
movl $0x1, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/sources/historic_search.c
// Function: history_search
void	history_search(t_control *control, int direction)
{
	t_int_pair cursor_end;

	if (!history_swap_line_in_term_struct(control, direction))
		return ;
	if (!terminfo_refresh_screen_from_start(control))
		return ;
	cursor_end = terminfo_cursor_get_endl(control);
	control->term->cursor = cursor_end;
	terminfo_cursor_move(control, cursor_end.x, cursor_end.y);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x5be5
testl %eax, %eax
je 0x5be3
movq %rbx, %rdi
callq 0x445c
testl %eax, %eax
je 0x5be3
movq %rbx, %rdi
callq 0x4676
movq 0x18(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq %rax, %rdx
shrq $0x20, %rdx
movl %eax, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x4879
popq %rbx
retq