LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/input_root.c
// Function: input_reading_and_lexing
t_list	*input_reading_and_lexing(t_control *control)
{
	t_list *token_lst;

	token_lst = NULL;
	read_root(control, 0, 0);
	if (!terminfo_clipboard_disable_highlight(control))
		return (NULL);
	if (!terminfo_cursor_move_endl(control, 0))
		return (NULL);
	ft_putchar_fd('\n', 1);
	if (control->quit)
		return (NULL);
	if (!history_root(control, control->history))
		return (NULL);
	//printf("\n\033[38;5;27mENTERING LEXER WITH: [\033[0m%s\033[38;5;27m]\033[0m\n\n", control->history->head->content);
	token_lst = lexer_root((char *)(control->history->head->content), control);
	return (token_lst);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x5508
movq %rbx, %rdi
callq 0x51f5
testl %eax, %eax
je 0x3f43
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4a31
testl %eax, %eax
je 0x3f43
movl $0xa, %edi
movl $0x1, %esi
callq 0x9e5c
testb $0x1, (%rbx)
jne 0x3f43
movq 0x10(%rbx), %rsi
movq %rbx, %rdi
callq 0x594c
testl %eax, %eax
je 0x3f43
movq 0x10(%rbx), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
movq %rbx, %rsi
popq %rbx
jmp 0x2648
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/input_root.c
// Function: input_synthax_error
void	input_synthax_error(t_control *control, unsigned int unexpected)
{
	ft_putstr_fd("minishell: synthax error near unexpected token `", 2);
	if (unexpected == SEMI)
		ft_putchar_fd(';', 2);
	else if (unexpected == PIPE)
		ft_putchar_fd('|', 2);
	else if (unexpected == OR_IF)
		ft_putstr_fd("||", 2);
	else if (unexpected == AND)
		ft_putchar_fd('&', 2);
	else if (unexpected == AND_IF)
		ft_putstr_fd("&&", 2);
	else if (unexpected == LBRACE)
		ft_putchar_fd('(', 2);
	else if (unexpected == RBRACE)
		ft_putchar_fd(')', 2);
	else if (unexpected == LESS || unexpected == DLESS || unexpected == GREAT \
			|| unexpected == DGREAT)
		ft_putstr_fd("newline", 2);
	ft_putstr_fd("'\n", 2);
	control->lexer_end.unexpected = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x72ec(%rip), %rdi      # 0xb244
movl $0x2, %esi
callq 0x9f24
decl %r14d
cmpl $0xc, %r14d
ja 0x3fcb
leaq 0x729e(%rip), %rax      # 0xb210
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x72f9(%rip), %rdi      # 0xb27b
jmp 0x3fa9
leaq 0x72ed(%rip), %rdi      # 0xb278
jmp 0x3fa9
movl $0x28, %edi
jmp 0x3fc1
movl $0x26, %edi
jmp 0x3fc1
movl $0x3b, %edi
jmp 0x3fc1
leaq 0x72cc(%rip), %rdi      # 0xb275
movl $0x2, %esi
callq 0x9f24
jmp 0x3fcb
movl $0x7c, %edi
jmp 0x3fc1
movl $0x29, %edi
movl $0x2, %esi
callq 0x9e5c
leaq 0x72b1(%rip), %rdi      # 0xb283
movl $0x2, %esi
callq 0x9f24
movl $0x0, 0x2c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/reset_prompts.c
// Function: reset_prompts
int	reset_prompts(t_list *env, t_term *term)
{
	char	**ps1;
	char	**ps2;

	ps2 = env_get_addr("PS2", 3, env);
	ps1 = env_get_addr("PS1", 3, env);
	if (!reset_prompt(ps1, &term->ps1))
		return (0);
	return (reset_prompt(ps2, &term->ps2));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x7288(%rip), %rdi      # 0xb286
movl $0x3, %esi
movq %r15, %rdx
callq 0x3403
movq %rax, %r14
leaq 0x7275(%rip), %rdi      # 0xb28a
movl $0x3, %esi
movq %r15, %rdx
callq 0x3403
leaq 0x38(%rbx), %rsi
movq %rax, %rdi
callq 0x404e
testl %eax, %eax
je 0x4046
addq $0x40, %rbx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x404e
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/reset_prompts.c
// Function: reset_prompt
int	reset_prompt(char **ref_from_env, char **term_ps)
{
	if (!ref_from_env || !*ref_from_env)
	{
		if (!*term_ps || !ft_strlen(*term_ps))
		{
			ft_free((void **)term_ps);
			if (!(*term_ps = ft_strdup("")))
				return (0);
		}
	}
	else if (!*term_ps || ft_strcmp(*ref_from_env, *term_ps))
	{
		ft_free((void **)term_ps);
		if (!(*term_ps = ft_strdup(*ref_from_env)))
			return (0);
	}
	return (1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdi, %rdi
je 0x4083
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x4083
movq (%rbx), %rsi
testq %rsi, %rsi
je 0x4076
callq 0xaa70
testl %eax, %eax
je 0x40b1
movq %rbx, %rdi
callq 0xaa9c
movq (%r14), %rdi
jmp 0x40a4
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4095
callq 0xa5c8
testq %rax, %rax
jne 0x40b1
movq %rbx, %rdi
callq 0xaa9c
leaq 0x7137(%rip), %rdi      # 0xb1db
callq 0xa4b4
movq %rax, (%rbx)
testq %rax, %rax
je 0x40b8
movl $0x1, %eax
jmp 0x40ba
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/termios_utils.c
// Function: termios_reset_cooked_mode
int	termios_reset_cooked_mode(t_control *control, struct termios *saved_copy)
{
	struct termios new;

	if (tcgetattr(STDIN_FILENO, &new) == -1)
	{
		control->quit = 1;
		control->exit_status = 1;
		ft_perror("tcgetattr can't get", NULL, strerror(errno));
		return (0);
	}
	if (!ft_memcmp(saved_copy, &new, sizeof(struct termios)))
		return (1);
	if (tcsetattr(STDIN_FILENO, TCSAFLUSH, saved_copy) == -1)
	{
		control->quit = 1;
		control->exit_status = 1;
		ft_perror("tcsetattr can't reset", NULL, strerror(errno));
		return (0);
	}
	return (1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4(%rsp), %rsi
xorl %edi, %edi
callq 0x21d0
cmpl $-0x1, %eax
je 0x41e2
leaq 0x4(%rsp), %rsi
movl $0x3c, %edx
movq %r14, %rdi
callq 0x9dc4
movl $0x1, %ebp
testl %eax, %eax
je 0x420e
xorl %edi, %edi
movl $0x2, %esi
movq %r14, %rdx
callq 0x21e0
cmpl $-0x1, %eax
jne 0x420e
leaq 0x70d6(%rip), %r14      # 0xb2b6
jmp 0x41e9
leaq 0x70a5(%rip), %r14      # 0xb28e
orb $0x1, (%rbx)
movl $0x1, 0x4(%rbx)
callq 0x2040
movl (%rax), %edi
callq 0x2220
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x2511
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/terminfo_utils.c
// Function: terminfo_init_database
t_term	*terminfo_init_database(void)
{
	int		res;
	t_term	*term;

	res = setupterm(NULL, STDOUT_FILENO, NULL);
	if (res == ERR)
		return (NULL); //note: ERR is defined to 1 in the library. {mli norm 🤔}
	if (!(term = terminfo_init_struct()))
		return (NULL);
	if (!terminfo_load_win_size(term))
		return (terminfo_free_struct(term));
	if (!terminfo_load_array_esc_seq(term))
		return (terminfo_free_struct(term));
	return (term);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
xorl %edi, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x21a0
cmpl $-0x1, %eax
je 0x42b9
movl $0x78, %edi
callq 0x2190
testq %rax, %rax
je 0x4279
movq %rax, %rbx
movq $0x0, 0x70(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x38(%rax)
movl $0x0, 0x48(%rax)
movups %xmm0, 0x50(%rax)
movl $0x1, 0x30(%rax)
jmp 0x427b
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x42b7
movq %rsp, %r14
movl $0x5413, %esi           # imm = 0x5413
xorl %edi, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x20f0
movzwl (%r14), %eax
movl %eax, 0x2c(%rbx)
movzwl 0x2(%r14), %eax
movl %eax, 0x28(%rbx)
movq %rbx, %rdi
callq 0x43b8
testl %eax, %eax
jne 0x42b9
movq %rbx, %rdi
callq 0x433d
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/terminfo_utils.c
// Function: terminfo_free_struct
void	*terminfo_free_struct(t_term *term)
{
	free(term->line);
	free(term->ps1);
	free(term->ps2);
	ft_array_free(term->array_esc_seq, \
			ft_array_len(term->array_esc_seq));
	ft_free((void **)&term->clipboard.paste_me);
	free(term);
	return (NULL);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2240
movq 0x38(%rbx), %rdi
callq 0x2240
movq 0x40(%rbx), %rdi
callq 0x2240
movq 0x50(%rbx), %r14
movq %r14, %rdi
callq 0xa9b8
movq %r14, %rdi
movl %eax, %esi
callq 0xa924
leaq 0x70(%rbx), %rdi
callq 0xaa9c
movq %rbx, %rdi
callq 0x2240
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/terminfo_utils2.c
// Function: terminfo_load_array_esc_seq
int		terminfo_load_array_esc_seq(t_term *term)
{
	char	**array;
	int		i;

	array = (char *[]){KEY_ESC_, KEY_UP_, KEY_RIGHT_,
		KEY_LEFT_, KEY_DOWN_, KEY_HOME_, KEY_DELETE_, KEY_END_, KEY_PAGE_UP_,
		KEY_PAGE_DOWN_, KEY_UP_CTRL_, KEY_DOWN_CTRL_, KEY_RIGHT_CTRL_,
		KEY_LEFT_CTRL_, NULL};
	i = 0;
	if (!(term->array_esc_seq = (char **)malloc(sizeof(char *) * (1 + \
						NUMBER_SPECIAL_KEYS))))
		return (0);
	term->array_esc_seq[NUMBER_SPECIAL_KEYS] = NULL;
	while (i < NUMBER_SPECIAL_KEYS)
	{
		if (!(term->array_esc_seq[i] = ft_strdup((char *)array[i])))
		{
			ft_array_free(term->array_esc_seq, i);
			return (0);
		}
		i++;
	}
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x78, %edi
callq 0x2190
movq %rax, 0x50(%rbx)
testq %rax, %rax
je 0x441a
movq $0x0, 0x70(%rax)
leaq 0xd7fe(%rip), %r15      # 0x11be0
xorl %r14d, %r14d
movq (%r15), %rdi
callq 0xa4b4
movq 0x50(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
testq %rax, %rax
je 0x440e
incq %r14
addq $0x8, %r15
cmpq $0xe, %r14
jne 0x43e5
movl $0x1, %eax
jmp 0x441c
movq 0x50(%rbx), %rdi
movl %r14d, %esi
callq 0xa924
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/terminfo_utils2.c
// Function: terminfo_refresh_screen_from_start
int		terminfo_refresh_screen_from_start(t_control *control)
{
	char *caps;

	control->term->cursor_saved = control->term->cursor;
	if (!terminfo_update_bottom_screen_and_cursor(control))
		return (0);
	if (!terminfo_cursor_move(control, 0, control->term->cursor_start.y))
		return (0);
	if (!(caps = terminfo_get_caps("ed", control)))
		return (0);
	tputs(caps, 1, ft_putchar);
	if (control->term->prompt_ps1)
		ft_putstr_fd(control->term->ps1, 2);
	else
		ft_putstr_fd(control->term->ps2, 2);
	ft_putstr_fd(control->term->line, 1);
	if (!(terminfo_cursor_saved_reset(control)))
		return (0);
	return (1);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x18(%rax)
callq 0x44e9
testl %eax, %eax
je 0x44de
movq 0x18(%rbx), %rax
movl 0x24(%rax), %edx
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4859
testl %eax, %eax
je 0x44e0
leaq 0x6d77(%rip), %rdi      # 0xb1f8
callq 0x21f0
testq %rax, %rax
je 0x44e0
leaq 0x65ba(%rip), %rdx      # 0xaa4c
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
movq 0x18(%rbx), %rax
xorl %ecx, %ecx
cmpl $0x0, 0x30(%rax)
sete %cl
movq 0x38(%rax,%rcx,8), %rdi
movl $0x2, %esi
callq 0x9f24
movq 0x18(%rbx), %rax
movq (%rax), %rdi
movl $0x1, %esi
callq 0x9f24
movq %rbx, %rdi
callq 0x4630
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
jmp 0x44e0
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/terminfo_utils2.c
// Function: terminfo_update_bottom_screen_and_cursor
int		terminfo_update_bottom_screen_and_cursor(t_control *control)
{
	t_int_pair	cursor_end;
	char		*caps;

	cursor_end = terminfo_cursor_get_endl(control);
	if (!(caps = terminfo_get_caps("ind", control)))
		return (0);
	while (cursor_end.y >= control->term->size_window.y)
	{
		cursor_end.y--;
		control->term->cursor_start.y--;
		tputs(caps, 1, ft_putchar);
	}
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x4657
movq %rax, %r14
leaq 0x6e13(%rip), %rdi      # 0xb316
callq 0x21f0
testq %rax, %rax
je 0x454f
movq %rax, %r15
shrq $0x20, %r14
movq 0x18(%rbx), %rax
movl $0x1, %ebp
cmpl %r14d, 0x2c(%rax)
jg 0x4551
incl %r14d
leaq 0x651f(%rip), %r12      # 0xaa4c
decl 0x24(%rax)
movq %r15, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x2030
movq 0x18(%rbx), %rax
decl %r14d
cmpl 0x2c(%rax), %r14d
jg 0x452d
jmp 0x4551
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/terminfo_cursor_position.c
// Function: terminfo_cursor_get_pos
int			terminfo_cursor_get_pos(t_control *control, t_int_pair *curs)
{
	char	*caps;

	if (!(caps = terminfo_get_caps("u7", control)))
		return (0);
	terminfo_cursor_get_pos_assist(caps, curs);
	//we add this here so that we dont have to do it all the time
	curs->x--;
	curs->y--;
	return (1);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x6db0(%rip), %rdi      # 0xb31a
callq 0x4443
testq %rax, %rax
je 0x458b
movq %rax, %rdi
movq %rbx, %rsi
callq 0x458f
decl (%rbx)
decl 0x4(%rbx)
movl $0x1, %eax
jmp 0x458d
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/terminfo_cursor_position.c
// Function: terminfo_cursor_get_pos_assist
void		terminfo_cursor_get_pos_assist(char *caps, t_int_pair *cursor)
{
	int		first_coord;
	char	c;

	first_coord = 1;
	cursor->x = 0;
	cursor->y = 0;
	tputs(caps, 1, ft_putchar);
	while (read(STDIN_FILENO, &c, 1) == 1)
	{
		if (c == '\033' || c == '[')
			continue;
		if (first_coord && ft_isdigit(c))
		{
			cursor->y *= 10;
			cursor->y += c - 48;
			continue;
		}
		first_coord = 0;
		if (ft_isdigit(c))
		{
			cursor->x *= 10;
			cursor->x += c - 48;
		}
		if (c == 'R')
			break ;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq $0x0, (%rsi)
leaq 0x64a5(%rip), %rdx      # 0xaa4c
movl $0x1, %esi
callq 0x2030
xorl %ebp, %ebp
leaq 0x7(%rsp), %r14
movl $0x1, %edx
xorl %edi, %edi
movq %r14, %rsi
callq 0x2140
cmpq $0x1, %rax
jne 0x4625
movsbl 0x7(%rsp), %r15d
movl %r15d, %eax
andb $-0x41, %al
cmpb $0x1b, %al
je 0x45b8
testb $0x1, %bpl
jne 0x4602
movl %r15d, %edi
callq 0x9c08
testl %eax, %eax
je 0x4602
movl 0x4(%rbx), %eax
leal (%rax,%rax,4), %eax
leal (%r15,%rax,2), %eax
addl $-0x30, %eax
movl %eax, 0x4(%rbx)
xorl %ebp, %ebp
jmp 0x45b8
movl %r15d, %edi
callq 0x9c08
testl %eax, %eax
je 0x461c
movl (%rbx), %eax
leal (%rax,%rax,4), %eax
leal (%r15,%rax,2), %eax
addl $-0x30, %eax
movl %eax, (%rbx)
movb $0x1, %bpl
cmpb $0x52, %r15b
jne 0x45b8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/terminfo_cursor_position.c
// Function: terminfo_cursor_saved_reset
int			terminfo_cursor_saved_reset(t_control *control)
{
	control->term->cursor = control->term->cursor_saved;
	if (!terminfo_cursor_move(control, control->term->cursor.x, \
				control->term->cursor.y))
		return (0);
	return (1);
}

// Assembly:
pushq %rax
movq 0x18(%rdi), %rax
movq 0x18(%rax), %rcx
movq %rcx, 0x10(%rax)
movq 0x18(%rdi), %rax
movl 0x10(%rax), %esi
movl 0x14(%rax), %edx
callq 0x4859
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/terminfo_cursor_position.c
// Function: terminfo_cursor_get_endl
t_int_pair	terminfo_cursor_get_endl(t_control *control)
{
	t_int_pair	cursor_end;
	char		*str;
	int			i;

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

// Assembly:
movq 0x18(%rdi), %rdx
movl 0x20(%rdx), %eax
movl 0x24(%rdx), %ecx
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x468c
movzbl (%rsi), %edi
cmpl $0xa, %edi
je 0x467e
testl %edi, %edi
je 0x468c
movl 0x28(%rdx), %edi
decl %edi
cmpl %edi, %eax
jne 0x4685
incl %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %eax
incq %rsi
jmp 0x4669
shlq $0x20, %rcx
movl %eax, %eax
orq %rcx, %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/terminfo_cursor_move.c
// Function: terminfo_cursor_move_right
int	terminfo_cursor_move_right(t_control *control)
{
	char	*caps;
	int		cur_line_end_index;

	cur_line_end_index = terminfo_predict_current_line_end_index(control);
	if (control->term->inline_position + 1 >= control->term->line_len)
		return (1);
	if (control->term->inline_position + 1 == cur_line_end_index)
	{
		if (!terminfo_cursor_move_diagonally_down(control))
			return (0);
	}
	else
	{
		control->term->cursor.x++;
		if (!(caps = terminfo_get_caps("cuf1", control)))
			return (0);
		tputs(caps, 1, ft_putchar);
	}
	control->term->inline_position++;
	return (1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x4edc
movq 0x18(%r14), %rcx
movl 0xc(%rcx), %edx
incl %edx
movl $0x1, %ebx
cmpl 0x8(%rcx), %edx
jge 0x46ff
cmpl %eax, %edx
jne 0x46c9
movq %r14, %rdi
callq 0x4709
testl %eax, %eax
jne 0x46f4
jmp 0x46fd
incl 0x10(%rcx)
leaq 0x6c4a(%rip), %rdi      # 0xb31d
movq %r14, %rsi
callq 0x4443
testq %rax, %rax
je 0x46fd
leaq 0x6365(%rip), %rdx      # 0xaa4c
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
movq 0x18(%r14), %rax
incl 0xc(%rax)
jmp 0x46ff
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/terminfo_cursor_move.c
// Function: terminfo_cursor_move_diagonally_down
int	terminfo_cursor_move_diagonally_down(t_control *control)
{
	char *caps;

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

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movl 0x14(%rax), %ecx
incl %ecx
cmpl 0x2c(%rax), %ecx
jne 0x4757
leaq 0x6c03(%rip), %rsi      # 0xb327
movq %rbx, %rdi
movl $0x1, %edx
callq 0x4422
testq %rax, %rax
je 0x4785
movq 0x18(%rbx), %rcx
decl 0x24(%rcx)
decl 0x1c(%rcx)
decl 0x14(%rcx)
leaq 0x6302(%rip), %rdx      # 0xaa4c
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
movq 0x18(%rbx), %rax
movl 0x14(%rax), %edx
incl %edx
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4859
testl %eax, %eax
je 0x4787
movq 0x18(%rbx), %rax
movl $0x0, 0x10(%rax)
incl 0x14(%rax)
movl $0x1, %ebp
jmp 0x4787
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/terminfo_cursor_move.c
// Function: terminfo_cursor_move_left
int	terminfo_cursor_move_left(t_control *control)
{
	char		*caps;

	if (control->term->inline_position < 0)
		return (1);
	if (control->term->cursor.x == 0)
	{
		if (!terminfo_cursor_move_diagonally_up(control))
			return (0);
	}
	else
	{
		if (!(caps = terminfo_get_caps("cub1", control)))
			return (0);
		tputs(caps, 1, ft_putchar);
		control->term->cursor.x--;
	}
	control->term->inline_position--;
	return (1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rax
movl $0x1, %ebx
cmpl $0x0, 0xc(%rax)
js 0x47f4
movq %rdi, %r14
cmpl $0x0, 0x10(%rax)
je 0x47dd
leaq 0x6b6f(%rip), %rdi      # 0xb322
movq %r14, %rsi
callq 0x4443
testq %rax, %rax
je 0x47f2
leaq 0x6285(%rip), %rdx      # 0xaa4c
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
movq 0x18(%r14), %rax
decl 0x10(%rax)
jmp 0x47e9
movq %r14, %rdi
callq 0x47fe
testl %eax, %eax
je 0x47f2
movq 0x18(%r14), %rax
decl 0xc(%rax)
jmp 0x47f4
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/terminfo_cursor_move.c
// Function: terminfo_cursor_move_diagonally_up
int	terminfo_cursor_move_diagonally_up(t_control *control)
{
	t_int_pair	previous_end;

	if (control->term->cursor_start.y == control->term->cursor.y)
		return (1);
	previous_end = terminfo_predict_previous_line_cursor_end(control);
	if (!terminfo_cursor_move(control, previous_end.x, previous_end.y))
		return (0);
	control->term->cursor = previous_end;
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rax
movl 0x24(%rax), %ecx
movl $0x1, %ebx
cmpl 0x14(%rax), %ecx
je 0x484b
movq %rdi, %r14
callq 0x4f79
movq %rax, %r15
movq %rax, %r12
shrq $0x20, %r12
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x4859
testl %eax, %eax
je 0x4849
movq 0x18(%r14), %rax
movl %r15d, 0x10(%rax)
movl %r12d, 0x14(%rax)
jmp 0x484b
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/charMstr[P]minishell/sources/terminfo_cursor_move2.c
// Function: terminfo_cursor_move_up
void	terminfo_cursor_move_up(t_control *control, t_int_pair *cursor)
{
	t_int_pair	previous_end;

	if (cursor->y <= control->term->cursor_start.y)
		return ;
	previous_end = terminfo_predict_previous_line_cursor_end(control);
	if (cursor->y == control->term->cursor_start.y + 1 \
			&& cursor->x < control->term->prompt_len)
		read_process_control_combo(control, CTRL_A_COMBO);
	else if (cursor->x > previous_end.x)
	{
		terminfo_cursor_move(control, previous_end.x, previous_end.y);
		control->term->inline_position -= cursor->x + 1;
		*cursor = previous_end;
	}
	else
	{
		terminfo_cursor_move(control, cursor->x, cursor->y - 1);
		control->term->inline_position -= cursor->x \
										+ (previous_end.x - cursor->x) + 1;
		cursor->y--;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0x4(%rsi), %eax
movq 0x18(%rdi), %rcx
cmpl 0x24(%rcx), %eax
jle 0x4945
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4f79
movq %rax, %r15
movl 0x4(%rbx), %edx
movq 0x18(%r14), %rax
movl 0x24(%rax), %ecx
incl %ecx
cmpl %ecx, %edx
jne 0x48fd
movl (%rbx), %ecx
cmpl 0x48(%rax), %ecx
jge 0x48fd
movq %r14, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x58e6
movl (%rbx), %esi
cmpl %r15d, %esi
jle 0x492d
movq %r15, %r12
shrq $0x20, %r12
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x4859
movl (%rbx), %eax
notl %eax
movq 0x18(%r14), %rcx
addl %eax, 0xc(%rcx)
movl %r15d, (%rbx)
movl %r12d, 0x4(%rbx)
jmp 0x4945
decl %edx
movq %r14, %rdi
callq 0x4859
notl %r15d
movq 0x18(%r14), %rax
addl %r15d, 0xc(%rax)
decl 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4fc2
movl %eax, %r12d
movq %rbx, %rdi
callq 0x4657
movq %rax, %r13
shrq $0x20, %r13
movq %rbx, %rdi
callq 0x4e70
movl 0x4(%r14), %edx
cmpl %r13d, %edx
jge 0x49e9
movl %eax, %r15d
movl (%r14), %esi
leal -0x1(%r12), %eax
incl %edx
movl %edx, 0x4(%r14)
cmpl %eax, %esi
jge 0x49b1
movq %rbx, %rdi
callq 0x4859
movq 0x18(%rbx), %rax
addl %r15d, 0xc(%rax)
jmp 0x49e9
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 0x4859
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_O1/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 0x4a12
incl %ecx
cmpl 0x28(%rax), %ecx
jne 0x4a18
callq 0x4709
jmp 0x4a22
testl %ecx, %ecx
je 0x4a1d
decl %ecx
movl %ecx, 0x10(%rax)
jmp 0x4a26
callq 0x47fe
testl %eax, %eax
je 0x4a2d
movl $0x1, %eax
popq %rcx
retq
xorl %eax, %eax
jmp 0x4a2b
// File: /workspace/github_c_makefile_star2_O1/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 0x4a61
movq 0x18(%rbx), %rax
movl 0x20(%rax), %esi
movl 0x24(%rax), %edx
movq %rbx, %rdi
callq 0x4859
testl %eax, %eax
je 0x4a98
movq 0x18(%rbx), %rax
movq 0x20(%rax), %rcx
movq %rcx, 0x10(%rax)
jmp 0x4a91
movq %rbx, %rdi
callq 0x4657
movq %rax, %r14
movq %rax, %r15
shrq $0x20, %r15
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0x4859
testl %eax, %eax
je 0x4a98
movq 0x18(%rbx), %rax
movl %r14d, 0x10(%rax)
movl %r15d, 0x14(%rax)
movl $0x1, %eax
jmp 0x4a9a
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4b1e
cmpl $-0x1, %eax
je 0x4b14
movl %eax, %ebp
movq 0x18(%rbx), %rax
movl 0xc(%rax), %eax
notl %eax
addl %eax, %ebp
testl %ebp, %ebp
jle 0x4af7
movq %rbx, %rdi
callq 0x4e70
movl %eax, %r14d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x49f8
movq 0x18(%rbx), %rax
cmpl %r14d, 0x10(%rax)
jne 0x4aec
movq %rbx, %rdi
callq 0x4709
movq 0x18(%rbx), %rax
incl 0xc(%rax)
decl %ebp
jne 0x4ac2
movq 0x18(%rbx), %rax
movl 0x10(%rax), %esi
movl 0x14(%rax), %edx
movq %rbx, %rdi
callq 0x4859
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x4b19
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4b6b
movslq 0xc(%rcx), %rcx
addq %rcx, %rdx
movzbl 0x1(%rdx), %esi
testl %esi, %esi
je 0x4b6b
incq %rdx
incl %ecx
cmpl $0x20, %esi
je 0x4b54
cmpl $0xa, %esi
jne 0x4b36
jmp 0x4b54
incl %ecx
incq %rdx
movzbl (%rdx), %esi
cmpl $0x20, %esi
je 0x4b4f
cmpl $0xa, %esi
je 0x4b4f
xorl %eax, %eax
cmpb $0x1, %sil
sbbl %eax, %eax
orl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4bd8
cmpl $-0x1, %eax
je 0x4bcc
movq 0x18(%rbx), %rcx
movl 0xc(%rcx), %ecx
subl %eax, %ecx
cmpl $0x7ffffffe, %ecx       # imm = 0x7FFFFFFE
ja 0x4baf
incl %ecx
cmpl $0x2, %ecx
movl $0x1, %ebp
cmovgel %ecx, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x49f8
movq 0x18(%rbx), %rax
decl 0xc(%rax)
decl %ebp
jne 0x4b9a
movq 0x18(%rbx), %rax
movl 0x10(%rax), %esi
movl 0x14(%rax), %edx
movq %rbx, %rdi
callq 0x4859
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x4bd1
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4c3a
movq (%rcx), %rcx
leal 0x1(%rsi), %edx
xorl %edi, %edi
movq %rsi, %r8
movzbl (%rcx,%r8), %r9d
cmpl $0x20, %r9d
je 0x4c07
cmpl $0xa, %r9d
jne 0x4c0e
decq %r8
incl %edi
jmp 0x4bf6
cmpq $-0x1, %r8
je 0x4c3a
xorl %eax, %eax
testq %r8, %r8
js 0x4c3a
subl %edi, %edx
subl %edi, %esi
movl %esi, %esi
addq %rsi, %rcx
movzbl (%rcx), %esi
cmpl $0x20, %esi
je 0x4c3b
cmpl $0xa, %esi
je 0x4c3b
decl %edx
decq %rcx
testl %edx, %edx
jg 0x4c24
retq
movl %edx, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x4e70
movq 0x18(%rbx), %rcx
cmpl 0x28(%rcx), %eax
jne 0x4cbd
movq 0x10(%rcx), %rax
movq %rax, 0x18(%rcx)
movq 0x18(%rbx), %rax
movl 0xc(%rax), %r15d
movq %rbx, %rdi
callq 0x4cf6
xorl %r14d, %r14d
testl %eax, %eax
je 0x4ce8
movq %rbx, %rdi
callq 0x4630
testl %eax, %eax
je 0x4ce8
movq 0x18(%rbx), %rax
movl %r15d, 0xc(%rax)
movsbl %bpl, %esi
movq %rbx, %rdi
callq 0x4d77
testl %eax, %eax
je 0x4ce5
movq %rbx, %rdi
movl $0x1, %esi
callq 0x49f8
xorl %r14d, %r14d
testl %eax, %eax
setne %r14b
jmp 0x4ce8
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4e70
movq 0x18(%rbx), %rcx
movl $0x1, %r14d
cmpl 0x28(%rcx), %eax
jne 0x4d6b
movq %rbx, %rdi
callq 0x4edc
movl %eax, %ebp
movq 0x18(%rbx), %rax
movslq %ebp, %rcx
subl 0xc(%rax), %ebp
movb (%r15,%rcx), %r12b
movq %rbx, %rdi
callq 0x4709
xorl %r14d, %r14d
testl %eax, %eax
je 0x4d6b
movsbl %r12b, %esi
movq %rbx, %rdi
callq 0x4d77
testl %eax, %eax
je 0x4d6b
movq 0x18(%rbx), %rax
addl 0xc(%rax), %ebp
movl %ebp, 0xc(%rax)
movl $0x1, %r14d
cmpl 0x8(%rax), %ebp
jl 0x4d08
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4d8a
callq 0x4dcc
testl %eax, %eax
jne 0x4dc1
jmp 0x4dc8
leaq 0x659f(%rip), %rsi      # 0xb330
movl $0x1, %edx
callq 0x4422
testq %rax, %rax
je 0x4dc8
leaq 0x5ca5(%rip), %rdx      # 0xaa4c
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
movsbl %bl, %edi
movl $0x1, %esi
callq 0x9e5c
movl $0x1, %eax
jmp 0x4dca
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4657
shrq $0x20, %rax
movq 0x18(%rbx), %rcx
cmpl %eax, 0x2c(%rcx)
jg 0x4e34
leaq 0x653c(%rip), %rsi      # 0xb327
movq %rbx, %rdi
movl $0x1, %edx
callq 0x4422
xorl %ebp, %ebp
testq %rax, %rax
je 0x4e65
leaq 0x5c46(%rip), %rdx      # 0xaa4c
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 0x4859
testl %eax, %eax
je 0x4e65
leaq 0x64f9(%rip), %rdi      # 0xb334
movq %rbx, %rsi
callq 0x4443
testq %rax, %rax
je 0x4e63
leaq 0x5bfd(%rip), %rdx      # 0xaa4c
movl $0x1, %ebp
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
jmp 0x4e65
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x4ebf
movl 0xc(%rdx), %edi
movl 0x10(%rdx), %eax
movl 0x28(%rdx), %edx
leal 0x1(%rdi), %esi
movl %eax, %r8d
subl %edx, %r8d
jge 0x4ec9
movslq %esi, %r9
addl %edx, %edi
subl %eax, %edi
incl %edi
addq %rcx, %r9
xorl %r10d, %r10d
movzbl (%r9), %r11d
testl %r11d, %r11d
je 0x4ec3
cmpl $0xa, %r11d
je 0x4ec3
decl %r10d
incq %r9
cmpl %r10d, %r8d
jne 0x4e9f
movl %edx, %eax
movl %edi, %esi
jmp 0x4ec9
movl 0x48(%rdx), %eax
retq
subl %r10d, %esi
subl %r10d, %eax
movslq %esi, %rsi
cmpb $0xa, (%rcx,%rsi)
jne 0x4edb
xorl %ecx, %ecx
cmpl %edx, %eax
setne %cl
addl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4f1b
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 0x4f1a
movzbl (%rsi), %r8d
cmpl $0xa, %r8d
je 0x4f1a
leal 0x1(%rax), %edi
incq %rsi
incl %ecx
testl %r8d, %r8d
jne 0x4efd
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4f76
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 0x4f73
testl %edx, %edx
jle 0x4f73
movl %edx, %eax
cmpb $0xa, (%rcx,%rax)
je 0x4f73
leal -0x1(%rdx), %eax
cmpl $0x2, %esi
jl 0x4f72
decl %esi
cmpl $0x1, %edx
movl %eax, %edx
jg 0x4f59
retq
movl %edx, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4f1e
cmpl $0x2, %eax
jl 0x4fb4
movq (%r14), %rcx
decl %eax
xorl %edx, %edx
cmpb $0xa, (%rcx,%rdx)
je 0x4fa8
incl %ebp
cmpl 0x28(%r14), %ebp
jne 0x4fac
incl %ebx
xorl %ebp, %ebp
incq %rdx
cmpq %rdx, %rax
jne 0x4f9a
shlq $0x20, %rbx
movl %ebp, %eax
orq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4edc
movl %eax, %ecx
movq 0x18(%rbx), %rsi
movq (%rsi), %rdx
xorl %eax, %eax
testq %rdx, %rdx
je 0x503b
movslq %ecx, %r8
cmpb $0x0, (%rdx,%r8)
je 0x503b
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 0x5031
movzbl (%r9), %r10d
decl %r8d
cmpl $0xa, %r10d
je 0x5021
incq %r9
testl %r10d, %r10d
jne 0x5004
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_O1/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 0x50ca
movl 0xc(%rcx), %edx
incl %edx
cmpl 0x8(%rcx), %edx
je 0x50ca
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsi), %rdi
callq 0xaa9c
leaq 0x62c5(%rip), %rdi      # 0xb338
movq %rbx, %rsi
callq 0x4443
testq %rax, %rax
je 0x50c8
leaq 0x59c5(%rip), %rdx      # 0xaa4c
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 0x50d2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x510b
leaq 0x6257(%rip), %rdi      # 0xb33d
movq %rbx, %rsi
callq 0x4443
testq %rax, %rax
je 0x5178
leaq 0x594e(%rip), %rdx      # 0xaa4c
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 0x9e5c
movq 0x18(%rbx), %rax
movl 0x10(%rax), %esi
movl 0x14(%rax), %edx
movq %rbx, %rdi
callq 0x4859
xorl %r14d, %r14d
testl %eax, %eax
setne %r14b
testl %ebp, %ebp
jne 0x517b
testl %eax, %eax
je 0x517b
leaq 0x61e9(%rip), %rdi      # 0xb338
movq %rbx, %rsi
callq 0x4443
testq %rax, %rax
je 0x5178
leaq 0x58e9(%rip), %rdx      # 0xaa4c
movl $0x1, %r14d
movq %rax, %rdi
movl $0x1, %esi
callq 0x2030
jmp 0x517b
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x51f5
xorl %ebp, %ebp
testl %eax, %eax
je 0x51ee
movq %rbx, %rdi
callq 0x4448
testl %eax, %eax
je 0x51ee
movl 0x4(%r14), %eax
movl 0x8(%r14), %ecx
cmpl %ecx, %eax
jle 0x51c0
movl %eax, 0x8(%r14)
movl %ecx, 0x4(%r14)
movl $0x1, 0xc(%r14)
movq 0x18(%rbx), %rax
movq (%rax), %rdi
movl 0x4(%r14), %esi
movl 0x8(%r14), %eax
subl %esi, %eax
incl %eax
movslq %eax, %rdx
callq 0xa774
movq %rax, 0x10(%r14)
movl $0x1, %ebp
testq %rax, %rax
jne 0x51ee
orb $0x1, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x527e
cmpl $0xb, %esi
je 0x52a0
cmpl $0xc, %esi
jne 0x52d8
movq 0x18(%rbx), %rsi
addq $0x60, %rsi
movq %rbx, %rdi
callq 0x5183
xorl %ebp, %ebp
testl %eax, %eax
je 0x52e1
movq 0x18(%rbx), %rsi
addq $0x60, %rsi
movq %rbx, %rdi
callq 0x53bb
testl %eax, %eax
jne 0x52b4
jmp 0x52e1
cmpl $0x83, %esi
je 0x52c4
cmpl $0x82, %esi
jne 0x52d8
movq 0x18(%rbx), %rsi
addq $0x60, %rsi
movq %rbx, %rdi
callq 0x52ec
jmp 0x52d4
movq 0x18(%rbx), %rsi
addq $0x60, %rsi
movq %rbx, %rdi
callq 0x5183
testl %eax, %eax
je 0x52df
addq $0x18, %rbx
movq (%rbx), %rax
movl $0x0, 0x60(%rax)
jmp 0x52d8
movq 0x18(%rbx), %rsi
addq $0x60, %rsi
movq %rbx, %rdi
callq 0x5359
testl %eax, %eax
je 0x52df
movl $0x1, %ebp
jmp 0x52e1
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop