LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/charMstr[P]minishell/sources/builtin_cd_utils.c
// Function: ft_getcwd
int		ft_getcwd(char **target)
{
	if (!(getcwd(*target, ft_strlen(*target))))
	{
		errno = 0;
		ft_free((void **)target);
		if (!(*target = getcwd(NULL, 0)))
			return (0);
	}
	return (1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xfb10
movq -0x18(%rbp), %rdi
movq %rax, %rsi
callq 0x20e0
cmpq $0x0, %rax
jne 0x4b5d
callq 0x2040
movl $0x0, (%rax)
movq -0x10(%rbp), %rdi
callq 0x10600
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x20e0
movq -0x10(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x4b5b
movl $0x0, -0x4(%rbp)
jmp 0x4b64
jmp 0x4b5d
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/charMstr[P]minishell/sources/builtin_exit.c
// Function: exit_builtin
int		exit_builtin(char **argv, t_control *control)
{
	int has_sign;

	control->quit = 1;
	if (control->parent_pid == getpid())
		ft_putendl_fd("exit", 2);
	if (!argv || !argv[1])
		return (1);
	has_sign = (argv[1][0] == '-' || argv[1][0] == '+' ? 1 : 0);
	if (!ft_isonly_ft(argv[1] + has_sign, ft_isdigit, 1))
	{
		ft_perror("exit", argv[1], "numeric argument required");
		control->exit_status = (IS_APPLE ? 255 : 2);
	}
	else if (ft_array_len(argv) >= 3)
	{
		ft_perror("exit", NULL, "too many arguments");
		control->quit = 0;
		control->exit_status = 1;
	}
	else
		control->exit_status = (unsigned char)ft_atoi(argv[1]);
	return (1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb (%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x20(%rbp)
callq 0x2060
movl %eax, %ecx
movl -0x20(%rbp), %eax
cmpl %ecx, %eax
jne 0x4bf7
leaq 0xc5d3(%rip), %rdi      # 0x111c0
movl $0x2, %esi
callq 0xef40
cmpq $0x0, -0x10(%rbp)
je 0x4c09
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x4c15
movl $0x1, -0x4(%rbp)
jmp 0x4cfe
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x2d, %ecx
movb %al, -0x21(%rbp)
je 0x4c3e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
sete %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movslq -0x1c(%rbp), %rax
addq %rax, %rdi
leaq 0x9d89(%rip), %rsi      # 0xe9f0
movl $0x1, %edx
callq 0xeae0
cmpl $0x0, %eax
jne 0x4c9e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0xc53b(%rip), %rdi      # 0x111c0
leaq 0xc539(%rip), %rdx      # 0x111c5
callq 0x2620
movq -0x18(%rbp), %rax
movl $0x2, 0x4(%rax)
jmp 0x4cf7
movq -0x10(%rbp), %rdi
callq 0x10410
cmpl $0x3, %eax
jl 0x4cde
leaq 0xc50d(%rip), %rdi      # 0x111c0
xorl %eax, %eax
movl %eax, %esi
leaq 0xc521(%rip), %rdx      # 0x111df
callq 0x2620
movq -0x18(%rbp), %rax
movb (%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x4(%rax)
jmp 0x4cf5
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xe7e0
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
jmp 0x4cf7
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/charMstr[P]minishell/sources/input_root.c
// Function: input_root
t_list	*input_root(t_control *control)
{
	t_list *tokens_lst;

	control->ctrl_c = 0;
	control->term->prompt_ps1 = 1;
	if (!reset_prompts(control->env, control->term))
	{
		control->quit = 1;
		return (NULL);
	}
	if (!history_add_new_link(control))
	{
		control->quit = 1;
		return (NULL);
	}
	tokens_lst = input_root_assist_and_prompt(control);
	return (tokens_lst);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb (%rax), %cl
andb $-0x3, %cl
orb $0x0, %cl
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl $0x1, 0x30(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x51c0
cmpl $0x0, %eax
jne 0x4d6b
movq -0x10(%rbp), %rax
movb (%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x4da6
movq -0x10(%rbp), %rdi
callq 0x8150
cmpl $0x0, %eax
jne 0x4d91
movq -0x10(%rbp), %rax
movb (%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x4da6
movq -0x10(%rbp), %rdi
callq 0x4db0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/charMstr[P]minishell/sources/input_root.c
// Function: input_root_assist_and_prompt
t_list	*input_root_assist_and_prompt(t_control *control)
{
	t_list *tokens_lst;

	tokens_lst = NULL;
	while (!tokens_lst && !control->quit && !control->ctrl_c \
			&& !control->lexer_end.unexpected)
	{
		if (!terminfo_load_win_size(control->term) && (control->quit = 1))
			break ;
		control->term->clipboard.highlight = 0;
		if (control->term->prompt_ps1)
			ft_putstr_fd(control->term->ps1, 2);
		else
			ft_putstr_fd(control->term->ps2, 2);
		if (!input_reset_term_struct(control))
			return (NULL);
		tokens_lst = input_reading_and_lexing(control);
		control->term->prompt_ps1 = 0;
		ft_free((void **)&(control->term->line));
	}
	if (control->lexer_end.unexpected)
		input_synthax_error(control, control->lexer_end.unexpected);
//	debug_tokens_list(tokens_lst);
	//ft_lstclear(&tokens_lst, del_token);
	return (tokens_lst);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x19(%rbp)
jne 0x4e0c
movq -0x10(%rbp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
jne 0x4e0c
movq -0x10(%rbp), %rax
movb (%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
jne 0x4e0c
movq -0x10(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
setne %al
xorb $-0x1, %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x4e18
jmp 0x4ed6
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x5700
cmpl $0x0, %eax
jne 0x4e45
movq -0x10(%rbp), %rax
movb (%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, (%rax)
movb $0x1, %al
testb $0x1, %al
jne 0x4e40
jmp 0x4e45
jmp 0x4ed6
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl $0x0, 0x60(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpl $0x0, 0x30(%rax)
je 0x4e7a
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rax), %rdi
movl $0x2, %esi
callq 0xf020
jmp 0x4e90
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x40(%rax), %rdi
movl $0x2, %esi
callq 0xf020
movq -0x10(%rbp), %rdi
callq 0x4f10
cmpl $0x0, %eax
jne 0x4ea8
movq $0x0, -0x8(%rbp)
jmp 0x4ef8
movq -0x10(%rbp), %rdi
callq 0x4fc0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x10600
jmp 0x4dc4
movq -0x10(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
je 0x4ef0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %esi
callq 0x5090
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/charMstr[P]minishell/sources/input_root.c
// Function: input_reset_term_struct
int		input_reset_term_struct(t_control *control)
{
	if (!terminfo_cursor_get_pos(control, &(control->term->cursor_start)))
		return (0);
	control->term->cursor = control->term->cursor_start;
	control->term->prompt_len = control->term->cursor.x;
	control->term->inline_position = -1;
	control->term->line_len = 0;
	control->term->current_history_link = control->history->head;
	return (1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
addq $0x20, %rsi
callq 0x5b70
cmpl $0x0, %eax
jne 0x4f3f
movl $0x0, -0x4(%rbp)
jmp 0x4faa
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl %ecx, 0x48(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl $0xffffffff, 0xc(%rax)  # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x58(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x7950
movq -0x10(%rbp), %rdi
callq 0x73c0
cmpl $0x0, %eax
jne 0x4ffc
movq $0x0, -0x8(%rbp)
jmp 0x5083
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x6480
cmpl $0x0, %eax
jne 0x5016
movq $0x0, -0x8(%rbp)
jmp 0x5083
movl $0xa, %edi
movl $0x1, %esi
callq 0xef10
movq -0x10(%rbp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x503f
movq $0x0, -0x8(%rbp)
jmp 0x5083
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x8020
cmpl $0x0, %eax
jne 0x505f
movq $0x0, -0x8(%rbp)
jmp 0x5083
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x2780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0xc14c(%rip), %rdi      # 0x111f2
movl $0x2, %esi
callq 0xf020
cmpl $0x1, -0xc(%rbp)
jne 0x50ca
movl $0x3b, %edi
movl $0x2, %esi
callq 0xef10
jmp 0x5195
cmpl $0x2, -0xc(%rbp)
jne 0x50e4
movl $0x7c, %edi
movl $0x2, %esi
callq 0xef10
jmp 0x5193
cmpl $0x3, -0xc(%rbp)
jne 0x5100
leaq 0xc132(%rip), %rdi      # 0x11223
movl $0x2, %esi
callq 0xf020
jmp 0x5191
cmpl $0x4, -0xc(%rbp)
jne 0x5117
movl $0x26, %edi
movl $0x2, %esi
callq 0xef10
jmp 0x518f
cmpl $0x5, -0xc(%rbp)
jne 0x5130
leaq 0xc102(%rip), %rdi      # 0x11226
movl $0x2, %esi
callq 0xf020
jmp 0x518d
cmpl $0x6, -0xc(%rbp)
jne 0x5147
movl $0x28, %edi
movl $0x2, %esi
callq 0xef10
jmp 0x518b
cmpl $0x7, -0xc(%rbp)
jne 0x515e
movl $0x29, %edi
movl $0x2, %esi
callq 0xef10
jmp 0x5189
cmpl $0xa, -0xc(%rbp)
je 0x5176
cmpl $0xb, -0xc(%rbp)
je 0x5176
cmpl $0xc, -0xc(%rbp)
je 0x5176
cmpl $0xd, -0xc(%rbp)
jne 0x5187
leaq 0xc0ac(%rip), %rdi      # 0x11229
movl $0x2, %esi
callq 0xf020
jmp 0x5189
jmp 0x518b
jmp 0x518d
jmp 0x518f
jmp 0x5191
jmp 0x5193
jmp 0x5195
leaq 0xc095(%rip), %rdi      # 0x11231
movl $0x2, %esi
callq 0xf020
movq -0x8(%rbp), %rax
movl $0x0, 0x2c(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdx
leaq 0xc059(%rip), %rdi      # 0x11234
movl $0x3, %esi
callq 0x3e50
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdx
leaq 0xc044(%rip), %rdi      # 0x11238
movl $0x3, %esi
callq 0x3e50
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x38, %rsi
callq 0x5240
cmpl $0x0, %eax
jne 0x5221
movl $0x0, -0x4(%rbp)
jmp 0x5235
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x40, %rsi
callq 0x5240
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x5261
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x52ac
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x527d
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0xfb10
cmpq $0x0, %rax
jne 0x52aa
movq -0x18(%rbp), %rdi
callq 0x10600
leaq 0xbf32(%rip), %rdi      # 0x111bf
callq 0xf950
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x52a8
movl $0x0, -0x4(%rbp)
jmp 0x5304
jmp 0x52aa
jmp 0x52fd
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x52ce
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x10580
cmpl $0x0, %eax
je 0x52fb
movq -0x18(%rbp), %rdi
callq 0x10600
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xf950
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x52f9
movl $0x0, -0x4(%rbp)
jmp 0x5304
jmp 0x52fb
jmp 0x52fd
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
xorl %edi, %edi
leaq -0x54(%rbp), %rsi
callq 0x21c0
cmpl $-0x1, %eax
jne 0x54c1
movq -0x10(%rbp), %rax
movb (%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x4(%rax)
callq 0x2040
movl (%rax), %edi
callq 0x2210
movq %rax, %rdx
leaq 0xbd8d(%rip), %rdi      # 0x1123c
xorl %eax, %eax
movl %eax, %esi
callq 0x2620
movl $0x0, -0x4(%rbp)
jmp 0x553e
movq -0x18(%rbp), %rdi
leaq -0x54(%rbp), %rsi
movl $0x3c, %edx
callq 0xed20
cmpl $0x0, %eax
jne 0x54e1
movl $0x1, -0x4(%rbp)
jmp 0x553e
movq -0x18(%rbp), %rdx
xorl %edi, %edi
movl $0x2, %esi
callq 0x21d0
cmpl $-0x1, %eax
jne 0x5537
movq -0x10(%rbp), %rax
movb (%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x4(%rax)
callq 0x2040
movl (%rax), %edi
callq 0x2210
movq %rax, %rdx
leaq 0xbd3f(%rip), %rdi      # 0x11264
xorl %eax, %eax
movl %eax, %esi
callq 0x2620
movl $0x0, -0x4(%rbp)
jmp 0x553e
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %esi
movq %rdx, %rdi
callq 0x2190
movl %eax, -0xc(%rbp)
cmpl $-0x1, -0xc(%rbp)
jne 0x557c
movq $0x0, -0x8(%rbp)
jmp 0x55d7
callq 0x55f0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x5595
movq $0x0, -0x8(%rbp)
jmp 0x55d7
movq -0x18(%rbp), %rdi
callq 0x5700
cmpl $0x0, %eax
jne 0x55b2
movq -0x18(%rbp), %rdi
callq 0x5740
movq %rax, -0x8(%rbp)
jmp 0x55d7
movq -0x18(%rbp), %rdi
callq 0x5800
cmpl $0x0, %eax
jne 0x55cf
movq -0x18(%rbp), %rdi
callq 0x5740
movq %rax, -0x8(%rbp)
jmp 0x55d7
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/charMstr[P]minishell/sources/terminfo_utils.c
// Function: terminfo_init_struct
t_term	*terminfo_init_struct(void)
{
	t_term *term;

	if (!(term = (t_term *)malloc(sizeof(t_term))))
		return (NULL);
	term->clipboard.paste_me = NULL;
	term->line = NULL;
	term->line_len = 0;
	term->inline_position = 0;
	term->array_esc_seq = NULL;
	term->ps1 = NULL;
	term->ps2 = NULL;
	term->prompt_len = 0;
	term->cursor.x = 0;
	term->cursor.y = 0;
	term->cursor_saved.x = 0;
	term->cursor_saved.y = 0;
	term->size_window.x = 0;
	term->size_window.y = 0;
	term->cursor_start.x = 0;
	term->cursor_start.y = 0;
	term->current_history_link = NULL;
	term->prompt_ps1 = 1;
	return (term);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x78, %edi
callq 0x2180
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x5619
movq $0x0, -0x8(%rbp)
jmp 0x56ec
movq -0x10(%rbp), %rax
movq $0x0, 0x70(%rax)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x48(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x30(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x2230
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x2230
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x2230
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0x10410
movq -0x10(%rbp), %rdi
movl %eax, %esi
callq 0x102f0
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
addq $0x10, %rdi
callq 0x10600
movq -0x8(%rbp), %rdi
callq 0x2230
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
leaq -0x98(%rbp), %rdi
leaq 0x113c3(%rip), %rsi     # 0x16be0
movl $0x78, %edx
callq 0x2160
leaq -0x98(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x78, %edi
callq 0x2180
movq -0x10(%rbp), %rcx
movq %rax, 0x50(%rcx)
cmpq $0x0, %rax
jne 0x585a
movl $0x0, -0x4(%rbp)
jmp 0x58c2
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq $0x0, 0x70(%rax)
cmpl $0xe, -0x1c(%rbp)
jge 0x58bb
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xf950
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
movq %rax, (%rcx,%rdx,8)
cmpq $0x0, %rax
jne 0x58b0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
movl -0x1c(%rbp), %esi
callq 0x102f0
movl $0x0, -0x4(%rbp)
jmp 0x58c2
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x586a
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/charMstr[P]minishell/sources/terminfo_utils2.c
// Function: terminfo_edit_caps
char	*terminfo_edit_caps(t_control *control, char *caps_id, int param)
{
	char *caps;

	if (!(caps = terminfo_get_caps(caps_id, control)))
		return (NULL);
	caps = tparm(caps, param);
	if (!(caps + 1))
	{
		control->quit = 1;
		return (NULL);
	}
	return (caps);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5950
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x5904
movq $0x0, -0x8(%rbp)
jmp 0x5944
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
movb $0x0, %al
callq 0x21a0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq $0x0, %rax
jne 0x593c
movq -0x10(%rbp), %rax
movb (%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x5944
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/charMstr[P]minishell/sources/terminfo_utils2.c
// Function: terminfo_get_caps
char	*terminfo_get_caps(char *caps_id, t_control *control)
{
	char *caps;

	caps = tigetstr(caps_id);
	if (!(caps + 1))
	{
		control->quit = 1;
		return (NULL);
	}
	return (caps);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x21e0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
cmpq $0x0, %rax
jne 0x5993
movq -0x18(%rbp), %rax
movb (%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x599b
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rdi
callq 0x5ad0
cmpl $0x0, %eax
jne 0x59ee
movl $0x0, -0x4(%rbp)
jmp 0x5abf
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x24(%rax), %edx
xorl %esi, %esi
callq 0x6120
cmpl $0x0, %eax
jne 0x5a15
movl $0x0, -0x4(%rbp)
jmp 0x5abf
movq -0x10(%rbp), %rsi
leaq 0xb7bc(%rip), %rdi      # 0x111dc
callq 0x5950
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x5a3b
movl $0x0, -0x4(%rbp)
jmp 0x5abf
movq -0x18(%rbp), %rdi
movl $0x1, %esi
leaq 0xaaf5(%rip), %rdx      # 0x10540
callq 0x2030
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpl $0x0, 0x30(%rax)
je 0x5a76
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rax), %rdi
movl $0x2, %esi
callq 0xf020
jmp 0x5a8c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x40(%rax), %rdi
movl $0x2, %esi
callq 0xf020
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rdi
movl $0x1, %esi
callq 0xf020
movq -0x10(%rbp), %rdi
callq 0x5cd0
cmpl $0x0, %eax
jne 0x5ab8
movl $0x0, -0x4(%rbp)
jmp 0x5abf
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5d40
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq 0xb7c8(%rip), %rdi      # 0x112c4
callq 0x5950
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x5b14
movl $0x0, -0x4(%rbp)
jmp 0x5b5e
jmp 0x5b16
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpl 0x2c(%rcx), %eax
jl 0x5b57
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x24(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x24(%rax)
movq -0x20(%rbp), %rdi
movl $0x1, %esi
leaq 0xa9f0(%rip), %rdx      # 0x10540
callq 0x2030
jmp 0x5b16
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq 0xb73d(%rip), %rdi      # 0x112c8
callq 0x5950
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x5ba3
movl $0x0, -0x4(%rbp)
jmp 0x5bcf
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5be0
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
leaq 0xa924(%rip), %rdx      # 0x10540
callq 0x2030
xorl %edi, %edi
leaq -0x15(%rbp), %rsi
movl $0x1, %edx
callq 0x2120
cmpq $0x1, %rax
jne 0x5cbe
movsbl -0x15(%rbp), %eax
cmpl $0x1b, %eax
je 0x5c4d
movsbl -0x15(%rbp), %eax
cmpl $0x5b, %eax
jne 0x5c4f
jmp 0x5c21
cmpl $0x0, -0x14(%rbp)
je 0x5c81
movsbl -0x15(%rbp), %edi
callq 0xe9f0
cmpl $0x0, %eax
je 0x5c81
movq -0x10(%rbp), %rax
imull $0xa, 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movsbl -0x15(%rbp), %ecx
subl $0x30, %ecx
movq -0x10(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0x5c21
movl $0x0, -0x14(%rbp)
movsbl -0x15(%rbp), %edi
callq 0xe9f0
cmpl $0x0, %eax
je 0x5cae
movq -0x10(%rbp), %rax
imull $0xa, (%rax), %ecx
movl %ecx, (%rax)
movsbl -0x15(%rbp), %ecx
subl $0x30, %ecx
movq -0x10(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movsbl -0x15(%rbp), %eax
cmpl $0x52, %eax
jne 0x5cb9
jmp 0x5cbe
jmp 0x5c21
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x18(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x10(%rax), %esi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %edx
callq 0x6120
cmpl $0x0, %eax
jne 0x5d21
movl $0x0, -0x4(%rbp)
jmp 0x5d28
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x0, (%rax)
jne 0x5d8e
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x5df0
jmp 0x5d90
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x5de8
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x5dc4
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x28(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x5dd4
movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5d90
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6d90
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0xc(%rax), %eax
addl $0x1, %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpl 0x8(%rcx), %eax
jl 0x5e3f
movl $0x1, -0x4(%rbp)
jmp 0x5ecc
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0xc(%rax), %eax
addl $0x1, %eax
cmpl -0x1c(%rbp), %eax
jne 0x5e6b
movq -0x10(%rbp), %rdi
callq 0x5ee0
cmpl $0x0, %eax
jne 0x5e69
movl $0x0, -0x4(%rbp)
jmp 0x5ecc
jmp 0x5eb4
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rsi
leaq 0xb444(%rip), %rdi      # 0x112cb
callq 0x5950
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x5e9f
movl $0x0, -0x4(%rbp)
jmp 0x5ecc
movq -0x18(%rbp), %rdi
movl $0x1, %esi
leaq 0xa691(%rip), %rdx      # 0x10540
callq 0x2030
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
addl $0x1, %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpl 0x2c(%rcx), %eax
jne 0x5f7a
movq -0x10(%rbp), %rdi
leaq 0xb3c3(%rip), %rsi      # 0x112d5
movl $0x1, %edx
callq 0x58d0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x5f32
movl $0x0, -0x4(%rbp)
jmp 0x5fc8
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x24(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x24(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x1c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x1c(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rdi
movl $0x1, %esi
leaq 0xa5cb(%rip), %rdx      # 0x10540
callq 0x2030
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %edx
addl $0x1, %edx
xorl %esi, %esi
callq 0x6120
cmpl $0x0, %eax
jne 0x5fa1
movl $0x0, -0x4(%rbp)
jmp 0x5fc8
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpl $0x0, 0xc(%rax)
jge 0x6006
movl $0x1, -0x4(%rbp)
jmp 0x608e
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpl $0x0, 0x10(%rax)
jne 0x602d
movq -0x10(%rbp), %rdi
callq 0x60a0
cmpl $0x0, %eax
jne 0x602b
movl $0x0, -0x4(%rbp)
jmp 0x608e
jmp 0x6076
movq -0x10(%rbp), %rsi
leaq 0xb298(%rip), %rdi      # 0x112d0
callq 0x5950
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x6050
movl $0x0, -0x4(%rbp)
jmp 0x608e
movq -0x18(%rbp), %rdi
movl $0x1, %esi
leaq 0xa4e0(%rip), %rdx      # 0x10540
callq 0x2030
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x10(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0xc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x24(%rax), %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpl 0x14(%rcx), %eax
jne 0x60cd
movl $0x1, -0x4(%rbp)
jmp 0x6116
movq -0x10(%rbp), %rdi
callq 0x6f20
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x14(%rbp), %edx
callq 0x6120
cmpl $0x0, %eax
jne 0x60ff
movl $0x0, -0x4(%rbp)
jmp 0x6116
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/charMstr[P]minishell/sources/terminfo_cursor_move.c
// Function: terminfo_cursor_move
int	terminfo_cursor_move(t_control *control, int x, int y)
{
	char *caps;

	if (!(caps = terminfo_get_caps("cup", control)))
		return (0);
	caps = tgoto(caps, x, y);
	if (!(caps + 1))
	{
		control->quit = 1;
		return (0);
	}
	tputs(caps, 1, ft_putchar);
	return (1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq 0xb19d(%rip), %rdi      # 0x112da
callq 0x5950
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x6155
movl $0x0, -0x4(%rbp)
jmp 0x61a9
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0x2080
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
cmpq $0x0, %rax
jne 0x618d
movq -0x10(%rbp), %rax
movb (%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x61a9
movq -0x20(%rbp), %rdi
movl $0x1, %esi
leaq 0xa3a3(%rip), %rdx      # 0x10540
callq 0x2030
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpl 0x24(%rcx), %eax
jg 0x61e9
jmp 0x62c9
movq -0x8(%rbp), %rdi
callq 0x6f20
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x24(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x623d
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpl 0x48(%rcx), %eax
jge 0x623d
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x7f60
jmp 0x62c9
movq -0x10(%rbp), %rax
movl (%rax), %eax
cmpl -0x18(%rbp), %eax
jle 0x627d
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x14(%rbp), %edx
callq 0x6120
movq -0x10(%rbp), %rax
movl (%rax), %edx
addl $0x1, %edx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl 0xc(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
jmp 0x62c7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %esi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
subl $0x1, %edx
callq 0x6120
movq -0x10(%rbp), %rax
movl (%rax), %edx
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
subl (%rcx), %eax
addl %eax, %edx
addl $0x1, %edx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl 0xc(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rax)
jmp 0x62c9
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6fc0
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5d40
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6ca0
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x14(%rbp), %eax
jl 0x631e
jmp 0x63c9
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x639c
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x635b
movq -0x10(%rbp), %rax
movl (%rax), %eax
cmpl -0x1c(%rbp), %eax
jl 0x635b
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
subl $0x1, %esi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x6120
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
subl (%rax), %ecx
addl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x63c9
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %esi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
addl $0x1, %edx
movl %edx, 0x4(%rax)
callq 0x6120
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x642c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpl 0x28(%rcx), %eax
jne 0x6419
movq -0x10(%rbp), %rdi
callq 0x5ee0
cmpl $0x0, %eax
jne 0x6417
movl $0x0, -0x4(%rbp)
jmp 0x646d
jmp 0x642a
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
jmp 0x6466
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpl $0x0, 0x10(%rax)
jne 0x6453
movq -0x10(%rbp), %rdi
callq 0x60a0
cmpl $0x0, %eax
jne 0x6451
movl $0x0, -0x4(%rbp)
jmp 0x646d
jmp 0x6464
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x10(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x10(%rax)
jmp 0x6466
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x64dc
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x20(%rax), %esi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x24(%rax), %edx
callq 0x6120
cmpl $0x0, %eax
jne 0x64c2
movl $0x0, -0x4(%rbp)
jmp 0x6525
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x651e
movq -0x10(%rbp), %rdi
callq 0x5d40
movq %rax, -0x24(%rbp)
movq -0x24(%rbp), %rax
movq %rax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0x6120
cmpl $0x0, %eax
jne 0x650e
movl $0x0, -0x4(%rbp)
jmp 0x6525
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x1c(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop