LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_memmove.c
// Function: ft_memmove
void	*ft_memmove(void *dst, const void *src, size_t len)
{
	size_t			i;
	unsigned char	*dest;
	unsigned char	*srcs;

	i = 0;
	dest = (unsigned char *)dst;
	srcs = (unsigned char *)src;
	if (dst < src)
		while (i < len)
		{
			dest[i] = srcs[i];
			i++;
		}
	else if (src < dst)
		while (len-- > 0)
			dest[len] = srcs[len];
	return (dst);
}

// Assembly:
movq %rdi, %rax
cmpq %rsi, %rdi
jae 0x9d79
testq %rdx, %rdx
je 0x9d9d
xorl %ecx, %ecx
movb (%rsi,%rcx), %dil
movb %dil, (%rax,%rcx)
incq %rcx
cmpq %rcx, %rdx
jne 0x9d67
jmp 0x9d9d
setbe %cl
testq %rdx, %rdx
sete %dil
orb %cl, %dil
jne 0x9d9d
movq %rdx, %rcx
movb -0x1(%rsi,%rdx), %dil
movb %dil, -0x1(%rax,%rdx)
decq %rcx
movq %rcx, %rdx
jne 0x9d8b
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_putnbr_fd.c
// Function: ft_putnbr_fd
void	ft_putnbr_fd(int n, int fd)
{
	if (n == -2147483648)
		ft_putstr_fd("-2147483648", fd);
	else if (n < 0)
	{
		n *= (-1);
		ft_putchar_fd('-', fd);
	}
	if (n >= 0 && n <= 9)
		ft_putchar_fd(n + 48, fd);
	else if (n >= 10)
	{
		ft_putnbr_fd(n / 10, fd);
		ft_putnbr_fd(n % 10, fd);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %eax
negl %eax
jno 0x9e17
leaq 0x22be(%rip), %rdi      # 0xc0c4
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9e70
movl %edi, %ebp
movl $0xcccccccd, %r15d      # imm = 0xCCCCCCCD
testl %ebp, %ebp
jns 0x9e31
negl %ebp
movl $0x2d, %edi
movl %ebx, %esi
callq 0x9db0
cmpl $0x9, %ebp
jbe 0x9e56
movl %ebp, %r14d
imulq %r15, %r14
shrq $0x23, %r14
movl %r14d, %edi
movl %ebx, %esi
callq 0x9df0
addl %r14d, %r14d
leal (%r14,%r14,4), %eax
subl %eax, %ebp
jmp 0x9e1f
orb $0x30, %bpl
movsbl %bpl, %edi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9db0
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_split_whitespaces.c
// Function: ft_split_whitespaces
char		**ft_split_whitespaces(char const *s, char *ifs)
{
	char	**ptr;
	int		i;
	int		k;
	int		j;
	int		size;

	i = 0;
	k = 0;
	if (!s || !ifs ||
			!(ptr = (char **)malloc(sizeof(char*) * (size_array(s, ifs) + 1))))
		return (NULL);
	size = size_array(s, ifs);
	ptr[size] = NULL;
	while (k < size)
	{
		i = find_start(s, ifs, i);
		if (!(ptr[k] = (char *)malloc(sizeof(char) * (find_end(s, ifs, i) - i \
							+ 1))))
			return (free_nested(ptr, k));
		j = 0;
		while (s[i] && (-1 == ft_strichr(ifs, s[i])))
			ptr[k][j++] = s[i++];
		ptr[k++][j] = '\0';
	}
	return (ptr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0xa2ea
movq %rsi, %r14
movq %rdi, %rbp
callq 0xa2fe
cltq
leaq 0x8(,%rax,8), %rdi
callq 0x2190
testq %rax, %rax
je 0xa2ea
movq %rax, %rbx
movq %rbp, %rdi
movq %r14, %rsi
callq 0xa2fe
movslq %eax, %rcx
movq $0x0, (%rbx,%rcx,8)
testl %ecx, %ecx
jle 0xa2ec
movq %rbx, 0x10(%rsp)
movl %eax, %eax
movq %rax, 0x20(%rsp)
leaq 0x1(%rbp), %rax
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movl $0x1, %r13d
xorl %ebx, %ebx
movq %rbp, 0x18(%rsp)
movslq %ebx, %r15
movb (%rbp,%r15), %al
testb %al, %al
je 0xa1b8
addq (%rsp), %r15
movsbl %al, %esi
movq %r14, %rdi
callq 0xa824
cmpl $-0x1, %eax
je 0xa1b8
incl %ebx
movb (%r15), %al
incq %r15
testb %al, %al
jne 0xa19c
movslq %ebx, %r15
movb (%rbp,%r15), %al
movl %ebx, %r12d
testb %al, %al
je 0xa21f
movq (%rsp), %rcx
leaq (%rcx,%r15), %rbp
movl %ebx, %r12d
movsbl %al, %esi
movq %r14, %rdi
callq 0xa824
cmpl $-0x1, %eax
je 0xa1ef
incl %r12d
movb (%rbp), %al
incq %rbp
testb %al, %al
jne 0xa1d2
movslq %r12d, %rbp
movq 0x18(%rsp), %rax
movb (%rax,%rbp), %al
testb %al, %al
je 0xa21f
addq (%rsp), %rbp
movsbl %al, %esi
movq %r14, %rdi
callq 0xa824
cmpl $-0x1, %eax
jne 0xa21f
incl %r12d
movb (%rbp), %al
incq %rbp
testb %al, %al
jne 0xa202
subl %ebx, %r12d
incl %r12d
movslq %r12d, %rdi
callq 0x2190
movq %rax, %r12
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %r12, (%rax,%rcx,8)
testq %r12, %r12
je 0xa2b9
movq 0x18(%rsp), %rbp
movb (%rbp,%r15), %al
testb %al, %al
je 0xa285
addq (%rsp), %r15
xorl %ebp, %ebp
movsbl %al, %esi
movq %r14, %rdi
callq 0xa824
cmpl $-0x1, %eax
jne 0xa289
movb -0x1(%r15,%rbp), %al
leaq 0x1(%rbp), %rcx
movb %al, (%r12,%rbp)
movb (%r15,%rbp), %al
movq %rcx, %rbp
testb %al, %al
jne 0xa257
addl %ecx, %ebx
movl %ecx, %ebp
jmp 0xa28b
xorl %eax, %eax
jmp 0xa292
addl %ebp, %ebx
movl %ebp, %eax
movq 0x18(%rsp), %rbp
movq 0x8(%rsp), %rcx
incq %rcx
movb $0x0, (%r12,%rax)
incq %r13
movq %rcx, 0x8(%rsp)
cmpq 0x20(%rsp), %rcx
jne 0xa18c
movq 0x10(%rsp), %rbx
jmp 0xa2ec
cmpq $0x0, 0x8(%rsp)
movq 0x10(%rsp), %rbx
je 0xa2e2
movq -0x10(%rbx,%r13,8), %rdi
callq 0x2240
movq $0x0, -0x10(%rbx,%r13,8)
decq %r13
cmpq $0x1, %r13
ja 0xa2c6
movq %rbx, %rdi
callq 0x2240
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_split_whitespaces.c
// Function: size_array
static int	size_array(char const *s, char *ifs)
{
	int i;
	int count;

	i = 0;
	count = 0;
	while (s[i])
	{
		while (s[i] && (-1 != ft_strichr(ifs, s[i])))
			i++;
		if (s[i] && (ft_strichr(ifs, s[i]) == -1))
			count++;
		while (s[i] && (ft_strichr(ifs, s[i]) == -1))
			i++;
	}
	return (count);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb (%rdi), %al
testb %al, %al
je 0xa398
movq %rsi, %r14
movq %rdi, %r15
leaq 0x1(%rdi), %r12
xorl %ebx, %ebx
xorl %r13d, %r13d
movslq %r13d, %r13
movsbl %al, %esi
movq %r14, %rdi
callq 0xa824
cmpl $-0x1, %eax
je 0xa343
movb 0x1(%r15,%r13), %al
incq %r13
testb %al, %al
jne 0xa325
jmp 0xa360
movb (%r15,%r13), %al
testb %al, %al
je 0xa360
movsbl %al, %esi
movq %r14, %rdi
callq 0xa824
xorl %ecx, %ecx
cmpl $-0x1, %eax
sete %cl
addl %ecx, %ebx
movslq %r13d, %rbp
movb (%r15,%rbp), %al
testb %al, %al
je 0xa39a
addq %r12, %rbp
movsbl %al, %esi
movq %r14, %rdi
callq 0xa824
cmpl $-0x1, %eax
jne 0xa38b
incl %r13d
movb (%rbp), %al
incq %rbp
testb %al, %al
jne 0xa36e
movslq %r13d, %rax
movb (%r15,%rax), %al
testb %al, %al
jne 0xa322
jmp 0xa39a
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_strchr.c
// Function: ft_strchr
char	*ft_strchr(const char *s, int c)
{
	size_t		i;
	size_t		s_len;
	char		searched;

	s_len = ft_strlen(s);
	searched = (char)c;
	i = 0;
	while (i <= s_len)
	{
		if (s[i] == searched)
			return ((char *)&(s[i]));
		i++;
	}
	return (NULL);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0xa4f8
movq %rax, %rcx
movsbl %bpl, %edx
xorl %eax, %eax
xorl %esi, %esi
movsbl (%rbx,%rsi), %edi
cmpl %edi, %edx
je 0xa3d6
incq %rsi
cmpq %rcx, %rsi
jbe 0xa3c4
jmp 0xa3dc
addq %rsi, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_strjoin.c
// Function: ft_strjoin
char	*ft_strjoin(char const *s1, char const *s2)
{
	int		i;
	size_t	tt_len;
	char	*string;

	i = 0;
	if (!s1 || !s2)
		return (NULL);
	tt_len = ft_strlen(s1) + ft_strlen(s2) + 1;
	if (!(string = (char *)malloc(sizeof(*string) * tt_len)))
		return (NULL);
	while (*s1)
		string[i++] = *(s1++);
	while (*s2)
		string[i++] = *(s2++);
	string[i] = '\0';
	return (string);
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0xa4a6
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0xa4f8
movq %rax, %r15
movq %rbx, %rdi
callq 0xa4f8
leaq (%r15,%rax), %rdi
incq %rdi
callq 0x2190
xorl %ecx, %ecx
testq %rax, %rax
je 0xa4a9
movb (%r14), %dl
testb %dl, %dl
je 0xa47e
xorl %ecx, %ecx
movb %dl, (%rax,%rcx)
movb 0x1(%r14,%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0xa46f
movb (%rbx), %dl
testb %dl, %dl
je 0xa49e
movl %ecx, %ecx
movq %rax, %rdi
addq %rcx, %rdi
xorl %esi, %esi
movb %dl, (%rdi,%rsi)
movb 0x1(%rbx,%rsi), %dl
incq %rsi
testb %dl, %dl
jne 0xa48e
addl %esi, %ecx
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
jmp 0xa4ab
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_strjoin_free.c
// Function: ft_strjoin_free
char	*ft_strjoin_free(char const *s1, char const *s2, int to_free)
{
	char *res;

	res = ft_strjoin(s1, s2);
	if (to_free & 1)
		ft_free((void **)&s1);
	if (to_free & 2)
		ft_free((void **)&s2);
	return (res);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
callq 0xa428
movq %rax, %rbx
testb $0x1, %bpl
je 0xa4de
leaq 0x10(%rsp), %rdi
callq 0xa9c0
testb $0x2, %bpl
je 0xa4ee
leaq 0x8(%rsp), %rdi
callq 0xa9c0
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_strlen.c
// Function: ft_strlen
size_t	ft_strlen(const char *s)
{
	size_t i;

	i = 0;
	while (s && s[i])
		i++;
	return (i);
}

// Assembly:
testq %rdi, %rdi
je 0xa513
movq $-0x1, %rcx
leaq 0x1(%rcx), %rax
cmpb $0x0, 0x1(%rdi,%rcx)
movq %rax, %rcx
jne 0xa504
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_strncmp.c
// Function: ft_strncmp
int		ft_strncmp(const char *s1, const char *s2, size_t n)
{
	size_t			i;
	size_t			max;
	unsigned char	*str1;
	unsigned char	*str2;

	i = 0;
	max = 0;
	str1 = (unsigned char *)s1;
	str2 = (unsigned char *)s2;
	while (str1[max] && str2[max])
		max++;
	while (i < n && i <= max)
	{
		if (str1[i] != str2[i])
			return ((int)(str1[i] - str2[i]));
		i++;
	}
	return (0);
}

// Assembly:
xorl %eax, %eax
cmpb $0x0, (%rdi)
je 0xa53a
xorl %r8d, %r8d
cmpb $0x0, (%rsi,%r8)
je 0xa53e
leaq 0x1(%r8), %rcx
cmpb $0x0, 0x1(%rdi,%r8)
movq %rcx, %r8
jne 0xa522
jmp 0xa541
xorl %ecx, %ecx
jmp 0xa541
movq %r8, %rcx
testq %rdx, %rdx
je 0xa56d
decq %rdx
cmpq %rdx, %rcx
cmovbq %rcx, %rdx
incq %rdx
xorl %ecx, %ecx
movzbl (%rdi,%rcx), %eax
movzbl (%rsi,%rcx), %r8d
cmpb %r8b, %al
jne 0xa56e
incq %rcx
cmpq %rcx, %rdx
jne 0xa555
xorl %eax, %eax
retq
subl %r8d, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_strrchr.c
// Function: ft_strrchr
char	*ft_strrchr(const char *s, int c)
{
	size_t			i;
	size_t			s_len;
	char			*to_return;
	unsigned char	searched;

	to_return = NULL;
	s_len = ft_strlen(s);
	searched = (unsigned char)c;
	i = 0;
	while (i <= s_len)
	{
		if (s[i] == searched)
			to_return = (char *)(&(s[i]));
		i++;
	}
	return (to_return);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0xa4f8
movzbl %bpl, %edx
leaq 0x1(%rax), %rcx
cmpq $0x1, %rcx
adcq $0x1, %rax
xorl %ecx, %ecx
movsbl (%rbx), %esi
cmpl %esi, %edx
cmoveq %rbx, %rcx
incq %rbx
decq %rax
jne 0xa593
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_strtrim.c
// Function: ft_strtrim
char		*ft_strtrim(char const *s1, char const *set)
{
	int		i;
	int		j;
	int		size;
	char	*result;

	i = 0;
	j = 0;
	size = 0;
	if (!s1 || !set)
		return (NULL);
	while (s1[i] && is_to_trim(s1[i], set))
		i++;
	if (s1[i])
		size = ft_size(&s1[i], set);
	if (!(result = (char *)ft_calloc(size + 1, sizeof(char))))
		return (NULL);
	while (s1[i] && j < size)
		result[j++] = s1[i++];
	return (result);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
xorl %r15d, %r15d
orb %al, %cl
jne 0xa68c
movq %rdi, %rbx
movb (%rdi), %al
testb %al, %al
je 0xa643
movq %rsi, %r14
xorl %r12d, %r12d
movq %r14, %rcx
movb (%rcx), %dl
testb %dl, %dl
je 0xa5ff
incq %rcx
cmpb %al, %dl
jne 0xa5e1
movb 0x1(%rbx,%r12), %al
incq %r12
testb %al, %al
jne 0xa5de
xorl %r15d, %r15d
jmp 0xa646
leaq (%rbx,%r12), %r15
movq %r15, %rdi
callq 0xa4f8
leal -0x1(%rax), %ecx
movslq %ecx, %rcx
movb (%rcx,%r15), %dl
testb %dl, %dl
je 0xa638
movq %r14, %rsi
movb (%rsi), %dil
testb %dil, %dil
je 0xa638
incq %rsi
cmpb %dl, %dil
jne 0xa61c
movb -0x1(%r15,%rcx), %dl
movl %ecx, %eax
decq %rcx
jmp 0xa615
xorl %r15d, %r15d
testl %eax, %eax
cmovgl %eax, %r15d
jmp 0xa646
xorl %r12d, %r12d
leal 0x1(%r15), %edi
movl $0x1, %esi
callq 0xae64
testq %rax, %rax
je 0xa68c
movl %r12d, %esi
movb (%rbx,%rsi), %cl
testb %cl, %cl
je 0xa68e
testl %r15d, %r15d
je 0xa68e
movl %r15d, %edx
addq %rsi, %rbx
movl $0x1, %esi
movb %cl, -0x1(%rax,%rsi)
movb (%rbx,%rsi), %cl
testb %cl, %cl
je 0xa68e
leaq 0x1(%rsi), %rdi
cmpq %rdx, %rsi
movq %rdi, %rsi
jb 0xa673
jmp 0xa68e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_substr.c
// Function: ft_substr
char	*ft_substr(char const *s, unsigned int start, size_t len)
{
	char	*newcpy;
	size_t	i;
	size_t	s_len;

	i = 0;
	if (s == NULL)
		return (NULL);
	s_len = ft_strlen(s);
	if ((newcpy = (char *)ft_calloc(len + 1, sizeof(*newcpy))) == NULL)
		return (NULL);
	if (start < s_len)
		while (i < len && s[start])
			newcpy[i++] = s[start++];
	return (newcpy);
}

// Assembly:
testq %rdi, %rdi
je 0xa6fb
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0xa4f8
movq %rax, %r15
leaq 0x1(%rbx), %rdi
movl $0x1, %esi
callq 0xae64
testq %rax, %rax
je 0xa6fe
movl %ebp, %ecx
cmpq %rcx, %r15
setbe %dl
testq %rbx, %rbx
sete %sil
orb %dl, %sil
jne 0xa700
xorl %edx, %edx
leal (%rcx,%rdx), %esi
movb (%r14,%rsi), %sil
testb %sil, %sil
je 0xa700
movb %sil, (%rax,%rdx)
incq %rdx
cmpq %rdx, %rbx
jne 0xa6e1
jmp 0xa700
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_lstclear.c
// Function: ft_lstclear
void	ft_lstclear(t_list **lst, void (*del)(void *))
{
	t_list	*current;
	t_list	*then;

	if (!lst || !*lst)
		return ;
	current = *lst;
	while (current)
	{
		then = current->next;
		ft_lstdelone(current, del);
		current = then;
	}
	*lst = NULL;
}

// Assembly:
testq %rdi, %rdi
je 0xa780
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xa77b
movq %rsi, %r14
movq 0x8(%rdi), %r15
movq %r14, %rsi
callq 0xa784
movq %r15, %rdi
testq %r15, %r15
jne 0xa760
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_lstdelone.c
// Function: ft_lstdelone
void	ft_lstdelone(t_list *lst, void (*del)(void *))
{
	if (lst)
	{
		if (del)
			del(lst->content);
		free(lst);
	}
}

// Assembly:
testq %rdi, %rdi
je 0xa7a0
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0xa797
movq (%rbx), %rdi
callq *%rsi
movq %rbx, %rdi
popq %rbx
jmp 0x2240
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_strichr.c
// Function: ft_strichr
int	ft_strichr(const char *str, char c)
{
	int index;

	index = 0;
	if (!str)
		return (-1);
	while (str[index])
	{
		if (str[index] == c)
			return (index);
		index++;
	}
	return (-1);
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0xa846
movb (%rdi), %dl
testb %dl, %dl
je 0xa846
xorl %ecx, %ecx
cmpb %sil, %dl
je 0xa847
movb 0x1(%rdi,%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0xa836
retq
movl %ecx, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_array_free.c
// Function: ft_array_free
void	*ft_array_free(char **ptr, int k)
{
	if (!ptr)
		return (NULL);
	while (--k >= 0)
	{
		free(ptr[k]);
		ptr[k] = NULL;
	}
	free(ptr);
	ptr = NULL;
	return (NULL);
}

// Assembly:
testq %rdi, %rdi
je 0xa88d
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
jle 0xa87e
movl %esi, %r14d
incq %r14
movq -0x10(%rbx,%r14,8), %rdi
callq 0x2240
movq $0x0, -0x10(%rbx,%r14,8)
decq %r14
cmpq $0x1, %r14
ja 0xa862
movq %rbx, %rdi
callq 0x2240
addq $0x8, %rsp
popq %rbx
popq %r14
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_stristr.c
// Function: ft_stristr
int	ft_stristr(const char *str, char *stack)
{
	int i;
	int j;

	if (!str || !stack)
		return (-1);
	i = 0;
	j = 0;
	while (str[i])
	{
		j = 0;
		while (stack[j])
		{
			if (str[i] == stack[j])
				return (i);
			j++;
		}
		i++;
	}
	return (-1);
}

// Assembly:
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
orb %cl, %dl
jne 0xa8de
movb (%rdi), %cl
testb %cl, %cl
je 0xa8de
movb (%rsi), %dl
incq %rsi
xorl %r8d, %r8d
movq %rsi, %r9
movl %edx, %r10d
testb %dl, %dl
je 0xa8cd
cmpb %r10b, %cl
je 0xa8db
movb (%r9), %r10b
incq %r9
testb %r10b, %r10b
jne 0xa8bd
movb 0x1(%rdi,%r8), %cl
incq %r8
testb %cl, %cl
jne 0xa8b3
jmp 0xa8de
movl %r8d, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_strappend.c
// Function: ft_strappend
int	ft_strappend(char **str, char c)
{
	char *char_str;

	char_str = (char	[2]){c, '\0'};
	if (!*str)
	{
		if (!(*str = ft_strdup(char_str)))
			return (0);
	}
	else if (!(*str = ft_strjoin_free(*str, char_str, 1)))
		return (0);
	return (1);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movb %sil, 0xe(%rsp)
movb $0x0, 0xf(%rsp)
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xa923
leaq 0xe(%rsp), %rsi
movl $0x1, %edx
callq 0xa4b4
jmp 0xa92d
leaq 0xe(%rsp), %rdi
callq 0xa3e4
movq %rax, (%rbx)
testq %rax, %rax
je 0xa93c
movl $0x1, %eax
jmp 0xa93e
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_strcmp.c
// Function: ft_strcmp
int	ft_strcmp(const char *s1, const char *s2)
{
	int i;

	i = 0;
	while (s1[i] == s2[i])
	{
		if (s1[i] == '\0')
			return (0);
		i++;
	}
	return ((unsigned)s1[i] - (unsigned)s2[i]);
}

// Assembly:
movb (%rdi), %al
movb (%rsi), %dl
cmpb %dl, %al
jne 0xa9b2
movl $0x1, %ecx
testb %al, %al
je 0xa9bb
movb (%rdi,%rcx), %al
movb (%rsi,%rcx), %dl
incq %rcx
cmpb %dl, %al
je 0xa9a1
movsbl %al, %eax
movsbl %dl, %ecx
subl %ecx, %eax
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_strcadd.c
// Function: ft_strcadd
int	ft_strcadd(char **str, char c, size_t index)
{
	size_t	tt_len;
	char	*new;
	size_t	j;

	tt_len = ft_strlen(*str) + 1;
	j = 0;
	if (!(new = (char*)malloc(sizeof(char) * (tt_len + 1))))
	{
		ft_free((void **)str);
		return (0);
	}
	new[tt_len] = '\0';
	while (j < index && j < (tt_len - 1))
	{
		new[j] = str[0][j];
		j++;
	}
	new[j] = c;
	while (++j < tt_len)
		new[j] = str[0][j - 1];
	ft_free((void**)str);
	*str = new;
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0xa4f8
movq %rax, %r15
leaq 0x2(%rax), %rdi
callq 0x2190
testq %rax, %rax
je 0xaa62
movq %rax, %r12
leaq 0x1(%r15), %rax
movb $0x0, 0x1(%r12,%r15)
cmpq %r15, %r14
cmovaeq %r15, %r14
testq %r14, %r14
je 0xaa2f
movq (%rbx), %rcx
xorl %edx, %edx
movb (%rcx,%rdx), %sil
movb %sil, (%r12,%rdx)
incq %rdx
cmpq %rdx, %r14
jne 0xaa1f
movb %bpl, (%r12,%r14)
leaq 0x1(%r14), %rcx
cmpq %rax, %rcx
jae 0xaa50
movq (%rbx), %rax
movb (%rax,%r14), %cl
movb %cl, 0x1(%r12,%r14)
incq %r14
cmpq %r14, %r15
jne 0xaa3f
movq %rbx, %rdi
callq 0xa9c0
movq %r12, (%rbx)
movl $0x1, %eax
jmp 0xaa6c
movq %rbx, %rdi
callq 0xa9c0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_strcdel.c
// Function: ft_strcdel
void	ft_strcdel(char *str, size_t i)
{
	size_t	len;

	if (!str || !ft_strlen(str))
		return ;
	len = ft_strlen(str);
	if (i >= len)
		return ;
	ft_memmove(str + i, str + i + 1, len - i);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xaab8
movq %rsi, %rbx
movq %rdi, %r14
callq 0xa4f8
testq %rax, %rax
je 0xaab8
movq %r14, %rdi
callq 0xa4f8
subq %rbx, %rax
jbe 0xaab8
leaq (%r14,%rbx), %rdi
leaq (%r14,%rbx), %rsi
incq %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9d58
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_strstradd.c
// Function: ft_strstradd
int			ft_strstradd(char **dst, int start, char *src)
{
	int len;

	if (!dst || !src)
	{
		ft_free((void**)dst);
		return (0);
	}
	len = ft_strlen(*dst);
	if (start > len)
		start = len;
	if (!(*dst))
	{
		if (!(*dst = ft_strdup(src)))
			return (0);
	}
	else if (!ft_strstradd_assist(dst, start, src))
	{
		ft_free((void**)dst);
		return (0);
	}
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
setne %al
testq %rdx, %rdx
setne %cl
testb %cl, %al
je 0xab45
movq %rdx, %r14
movl %esi, %ebp
movq (%rbx), %rdi
callq 0xa4f8
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xab5b
cmpl %ebp, %eax
cmovll %eax, %ebp
movslq %ebp, %r15
xorl %ebp, %ebp
xorl %esi, %esi
movq %r15, %rdx
callq 0xa69c
testq %rax, %rax
je 0xab51
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xa4b4
testq %rax, %rax
je 0xab51
addq (%rbx), %r15
movq %rax, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0xa4b4
testq %rax, %rax
je 0xab51
movq %rax, %r14
movq %rbx, %rdi
callq 0xa9c0
movq %r14, (%rbx)
jmp 0xab6b
movq %rbx, %rdi
callq 0xa9c0
xorl %ebp, %ebp
jmp 0xab70
movq %rbx, %rdi
callq 0xa9c0
jmp 0xab70
movq %r14, %rdi
callq 0xa3e4
movq %rax, (%rbx)
testq %rax, %rax
je 0xab4d
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_dlstadd_front.c
// Function: ft_dlstadd_front
void	ft_dlstadd_front(t_dlist **alst, t_dlist *new)
{
	if (!alst || !new)
		return ;
	if (*alst)
	{
		(*alst)->previous = new;
		new->next = *alst;
	}
	*alst = new;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0xabc6
movq (%rdi), %rax
testq %rax, %rax
je 0xabc3
movq %rsi, 0x10(%rax)
movq (%rdi), %rax
movq %rax, 0x8(%rsi)
movq %rsi, (%rdi)
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_dlstclear.c
// Function: ft_dlstclear
void	ft_dlstclear(t_dlist **lst, void (*del)(void *))
{
	t_dlist	*current;
	t_dlist	*then;

	if (!lst || !*lst)
		return ;
	if (*lst)
	{
		current = (*lst)->next;
		while (current)
		{
			then = current->next;
			ft_dlstdelone(current, del);
			current = then;
		}
	}
	current = *lst;
	while (current)
	{
		then = current->previous;
		ft_dlstdelone(current, del);
		current = then;
	}
	*lst = NULL;
}

// Assembly:
testq %rdi, %rdi
je 0xac28
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xac23
movq %rsi, %r14
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0xac08
movq 0x8(%rax), %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0xac2c
movq %r15, %rax
testq %r15, %r15
jne 0xabe9
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xac1c
movq 0x10(%rdi), %r15
movq %r14, %rsi
callq 0xac2c
movq %r15, %rdi
testq %r15, %r15
jne 0xac08
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_dlstdelone.c
// Function: ft_dlstdelone
void	ft_dlstdelone(t_dlist *lst, void (*del)(void *))
{
	if (lst)
	{
		if (del)
			del(lst->content);
		free(lst);
	}
}

// Assembly:
testq %rdi, %rdi
je 0xac48
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0xac3f
movq (%rbx), %rdi
callq *%rsi
movq %rbx, %rdi
popq %rbx
jmp 0x2240
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_dlstpop_front.c
// Function: ft_dlstpop_front
void	ft_dlstpop_front(t_dlist **head, void (*del)(void*))
{
	t_dlist *new_head;

	if (!head || !del || !*head)
		return ;
	new_head = (*head)->next;
	ft_dlstdelone(*head, del);
	*head = NULL;
	*head = new_head;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0xac7e
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xac77
movq 0x8(%rdi), %r14
callq 0xac2c
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_dlstpop_back.c
// Function: ft_dlstpop_back
void	ft_dlstpop_back(t_dlist **head, void (*del)(void*))
{
	t_dlist **current;
	t_dlist *then;

	if (!head || !del || !*head)
		return ;
	current = head;
	while (*current)
	{
		then = (*current)->next;
		if (!then)
		{
			ft_dlstdelone(*current, del);
			*current = NULL;
			return ;
		}
		current = &(*current)->next;
	}
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0xacbc
movq (%rdi), %rcx
testq %rcx, %rcx
je 0xacbc
pushq %rbx
movq %rdi, %rbx
movq %rcx, %rax
leaq 0x8(%rcx), %rdi
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0xac99
movq %rax, %rdi
callq 0xac2c
movq $0x0, (%rbx)
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_dlstclearback_addr.c
// Function: ft_dlstclearback_addr
void	ft_dlstclearback_addr(t_dlist **lst, void (*del)(void **))
{
	t_dlist	*then;

	if (!lst || !*lst)
		return ;
	while ((*lst)->next)
		(*lst) = (*lst)->next;
	while (*lst)
	{
		then = (*lst)->previous;
		if (del)
			del(&(*lst)->content);
		ft_free((void **)lst);
		(*lst) = then;
	}
}

// Assembly:
testq %rdi, %rdi
je 0xad16
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xad11
movq %rsi, %rbx
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0xacf3
movq %rax, (%r14)
movq %rax, %rdi
movq 0x8(%rax), %rcx
movq %rcx, %rax
testq %rcx, %rcx
jne 0xace1
movq 0x10(%rdi), %r15
testq %rbx, %rbx
je 0xacfe
callq *%rbx
movq %r14, %rdi
callq 0xa9c0
movq %r15, (%r14)
movq %r15, %rdi
testq %r15, %r15
jne 0xacf3
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/ft_lstremove_if.c
// Function: ft_lstremove_if
void	ft_lstremove_if(t_list **begin_list, void *data_ref, int (*cmp)(),
		void (*free_fct)(void *))
{
	t_list	*current;
	t_list	*to_delete;

	while (*begin_list && !((*cmp)((*begin_list)->content, data_ref)))
	{
		to_delete = *begin_list;
		*begin_list = to_delete->next;
		ft_lstdelone(to_delete, free_fct);
	}
	current = *begin_list;
	while (current != NULL)
	{
		if (current->next && !((*cmp)(current->next->content, data_ref)))
		{
			to_delete = current->next;
			current->next = current->next->next;
			ft_lstdelone(to_delete, free_fct);
		}
		else
			current = current->next;
	}
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0xadad
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movq (%rax), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq *%r14
movq (%r13), %r12
testl %eax, %eax
jne 0xad9f
movq 0x8(%r12), %rax
movq %rax, (%r13)
movq %r12, %rdi
movq %rbx, %rsi
callq 0xa784
movq (%r13), %rax
testq %rax, %rax
jne 0xad39
jmp 0xada4
movq 0x8(%r12), %rax
testq %rax, %rax
je 0xada4
movq (%rax), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq *%r14
movq 0x8(%r12), %rdi
testl %eax, %eax
je 0xad8e
movq %rdi, %r12
jmp 0xad9f
movq 0x8(%rdi), %rax
movq %rax, 0x8(%r12)
movq %rbx, %rsi
callq 0xa784
testq %r12, %r12
jne 0xad6b
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/btree_depth.c
// Function: btree_depth
int		btree_depth(t_btree *root)
{
	int	max[3];

	if (!root)
		return (0);
	max[0] = btree_depth(root->left);
	max[1] = btree_depth(root->right);
	max[2] = (max[0] > max[1] ? max[0] : max[1]);
	return (max[2] + 1);
}

// Assembly:
testq %rdi, %rdi
je 0xaddc
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0xadb0
movl %eax, %ebp
movq 0x8(%rbx), %rdi
callq 0xadb0
cmpl %eax, %ebp
cmovgl %ebp, %eax
incl %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/btree_clear.c
// Function: btree_clear
void	btree_clear(t_btree **node, void (*del)(void *))
{
	if (!*node)
		return ;
	btree_clear(&(*node)->left, del);
	btree_clear(&(*node)->right, del);
	btree_delone(node, del);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xae38
movq %rsi, %rbx
callq 0xae00
movq (%r14), %rdi
addq $0x8, %rdi
movq %rbx, %rsi
callq 0xae00
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xae40
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/charMstr[P]minishell/libft/btree_delone.c
// Function: btree_delone
void	btree_delone(t_btree **node, void (*del)(void *))
{
	if (!*node)
		return ;
	if (del)
		del((*node)->item);
	ft_free((void **)node);
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0xae60
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0xae57
movq 0x10(%rax), %rdi
callq *%rsi
movq %rbx, %rdi
popq %rbx
jmp 0xa9c0
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/dubeyalok7[P]crypto-algo/sha/sha256.c
// Function: sha256Input
int sha256Input(SHA256Context *ctx, const uint8_t *msg, unsigned int len)
{
    if(!ctx)
        return SHA_NULL;
    if(!len)
        return SHA_SUCCESS;
    if(!msg)
        return SHA_NULL;

    if(ctx->Computed) return ctx->Corrupted = SHA_ERR;
    if(ctx->Corrupted) return ctx->Corrupted;

    while(len--){
        ctx->msg_block[ctx->msg_block_idx++] = *msg;
        if((SHA256_add_len(ctx, 8) == SHA_SUCCESS) && (ctx->msg_block_idx == SHA256_Message_Block_Size))
            sha256Process(ctx);
        ++msg;
    }
    return SHA_SUCCESS;
}

// Assembly:
movl $0x1, %eax
testq %rdi, %rdi
je 0x12a1
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
testl %edx, %edx
je 0x129a
movq %rsi, %r15
testq %rsi, %rsi
je 0x129c
movq %rdi, %r14
cmpl $0x0, 0x6c(%rdi)
je 0x123a
movl $0x3, 0x70(%r14)
movl $0x3, %eax
jmp 0x129c
movl 0x70(%r14), %eax
testl %eax, %eax
jne 0x129c
decl %ebx
movb (%r15), %al
movswq 0x28(%r14), %rcx
leal 0x1(%rcx), %edx
movw %dx, 0x28(%r14)
movb %al, 0x2a(%r14,%rcx)
movl 0x24(%r14), %eax
movzbl %al, %ecx
cmpl %ecx, %ebx
adcl $0x0, %eax
movl %eax, 0x24(%r14)
je 0x127b
incl 0x20(%r14)
jne 0x127b
movl $0x2, 0x70(%r14)
jmp 0x1292
cmpl $0x0, 0x70(%r14)
jne 0x1292
cmpw $0x40, 0x28(%r14)
jne 0x1292
movq %r14, %rdi
callq 0x12a2
incq %r15
addl $-0x1, %ebx
jb 0x1244
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/dubeyalok7[P]crypto-algo/sha/sha256.c
// Function: sha256FinalizeBits
int sha256FinalizeBits(SHA256Context *ctx, uint8_t msg_bits, unsigned int len)
{
    static uint8_t mask[8] = {
        /* 0 0b00000000 */ 0x00, /* 1 0b10000000 */ 0x80,
        /* 2 0b11000000 */ 0xC0, /* 3 0b11100000 */ 0xE0,
        /* 4 0b11110000 */ 0xF0, /* 5 0b11111000 */ 0xF8,
        /* 6 0b11111100 */ 0xFC, /* 7 0b11111110 */ 0xFE
    };
    static uint8_t markbit[8] = {
        /* 0 0b10000000 */ 0x80, /* 1 0b01000000 */ 0x40,
        /* 2 0b00100000 */ 0x20, /* 3 0b00010000 */ 0x10,
        /* 4 0b00001000 */ 0x08, /* 5 0b00000100 */ 0x04,
        /* 6 0b00000010 */ 0x02, /* 7 0b00000001 */ 0x01
    };

    if(!ctx) return SHA_NULL;
    if(!len) return SHA_SUCCESS;
    if(ctx->Corrupted) return ctx->Corrupted;
    if(ctx->Computed) return SHA_ERR;
    if(len >= 8) return ctx->Corrupted = SHA_BAD_PARAM;

    SHA256_add_len(ctx, len);
    sha256Finalize(ctx, (uint8_t)((msg_bits & mask[len])| markbit[len]));

    return ctx->Corrupted;
}

// Assembly:
testq %rdi, %rdi
je 0x1571
testl %edx, %edx
je 0x1577
pushq %rbx
movq %rdi, %rbx
movl 0x70(%rdi), %eax
testl %eax, %eax
jne 0x15c5
movl $0x3, %eax
cmpl $0x0, 0x6c(%rbx)
jne 0x15c5
cmpl $0x8, %edx
jb 0x157a
movl $0x4, 0x70(%rbx)
movl $0x4, %eax
jmp 0x15c5
movl $0x1, %eax
retq
xorl %eax, %eax
retq
movl 0x24(%rbx), %eax
movzbl %al, %ecx
xorl %edi, %edi
cmpl %edx, %ecx
seta %dil
addl %eax, %edi
movl %edi, 0x24(%rbx)
je 0x1599
movl $0x2, %eax
incl 0x20(%rbx)
je 0x159b
xorl %eax, %eax
movl %eax, 0x70(%rbx)
movl %edx, %eax
leaq 0xa89(%rip), %rcx       # 0x2030
andb (%rax,%rcx), %sil
leaq 0xa86(%rip), %rcx       # 0x2038
orb (%rax,%rcx), %sil
movzbl %sil, %esi
movq %rbx, %rdi
callq 0x15c7
movl 0x70(%rbx), %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/dubeyalok7[P]crypto-algo/sha/sha256.c
// Function: sha256Finalize
static void sha256Finalize(SHA256Context *ctx, uint8_t pad_byte)
{
    sha256PadMsg(ctx, pad_byte);
    for(int i=0; i< SHA256_Message_Block_Size; ++i){
        ctx->msg_block[i] = 0;
    }
    ctx->ll = ctx->hl = 0;
    ctx->Computed = 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movswq 0x28(%rdi), %rcx
leaq 0x2a(%rdi), %r14
leal 0x1(%rcx), %eax
movw %ax, 0x28(%rdi)
cmpq $0x38, %rcx
jl 0x1612
movb %sil, (%r14,%rcx)
cmpw $0x3f, %ax
jg 0x1608
leal 0x1(%rax), %ecx
movw %cx, 0x28(%rbx)
movswq %ax, %rax
movb $0x0, 0x2a(%rbx,%rax)
movzwl 0x28(%rbx), %eax
cmpw $0x40, %ax
jl 0x15ee
movq %rbx, %rdi
callq 0x12a2
jmp 0x1617
movb $0x0, (%r14,%rcx)
movl 0x20(%rbx), %eax
movl 0x24(%rbx), %ecx
bswapl %eax
movl %eax, 0x62(%rbx)
bswapl %ecx
movl %ecx, 0x66(%rbx)
movq %rbx, %rdi
callq 0x12a2
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
movq $0x0, 0x20(%rbx)
movl $0x1, 0x6c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/dubeyalok7[P]crypto-algo/sha/sha256.c
// Function: sha256Result
extern int sha256Result(SHA256Context *ctx, uint8_t msgDigest[SHA256_Hash_Size])
{
    if(!ctx) return SHA_NULL;
    if(!msgDigest) return SHA_NULL;
    if(ctx->Corrupted) return ctx->Corrupted;
    if(!ctx->Computed)
        sha256Finalize(ctx, 0x80);

    for(int i = 0; i < SHA256_Hash_Size; ++i)
        msgDigest[i] = (uint8_t) (ctx->h[i>>2]>> 8*(3-(i&0x03)));

    return SHA_SUCCESS;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
movl $0x1, %eax
jne 0x16c5
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x70(%rdi), %eax
testl %eax, %eax
jne 0x16be
movq %rsi, %rbx
cmpl $0x0, 0x6c(%r14)
jne 0x1696
movq %r14, %rdi
movl $0x80, %esi
callq 0x15c7
xorl %eax, %eax
xorl %edx, %edx
xorl %esi, %esi
movl %esi, %ecx
andl $-0x4, %ecx
movl (%r14,%rcx), %edi
movl %edx, %ecx
notb %cl
andb $0x18, %cl
shrl %cl, %edi
movb %dil, (%rbx,%rsi)
incq %rsi
addl $0x8, %edx
cmpq $0x20, %rsi
jne 0x169c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/dubeyalok7[P]crypto-algo/sha/main.c
// Function: help
void help()
{
  printf("\t\t\t...HELP...\t\t\t\n");
  printf("usage: ./sha -i <filename> -h <hashing_val>\n");
  printf("\t-i  input file\n");
  printf("\t-h  256/512 hashing value\n");
}

// Assembly:
pushq %rax
leaq 0xa81(%rip), %rdi       # 0x2151
callq 0x1050
leaq 0xa86(%rip), %rdi       # 0x2162
callq 0x1050
leaq 0xaa6(%rip), %rdi       # 0x218e
callq 0x1050
leaq 0xaaa(%rip), %rdi       # 0x219e
popq %rax
jmp 0x1050
// File: /workspace/github_c_makefile_star2_O3/dubeyalok7[P]crypto-algo/sha/main.c
// Function: init_sha_256
void init_sha_256(char *infile)
{
  SHA256Context ctx;
  char msg[1000];
  uint8_t msgDigest[SHA256_Hash_Size];
  FILE *fp = fopen(infile, "r+");
  if(NULL == fp){
    printf("error: file doesn't exist.\n");
    return;
  }
  sha256Init(&ctx);
  while(!feof(fp)){
    fscanf(fp, "%s", msg);
    sha256Input(&ctx, (uint8_t *)msg, strlen(msg));
  }
  sha256FinalizeBits(&ctx, 0x80, 3);
  sha256Result(&ctx, msgDigest);
    
  for(int i = 0; i < SHA256_Hash_Size; ++i){
    printf("%.2x ", msgDigest[i]);
  }
  printf("\n");
  fclose(fp);  
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x488, %rsp            # imm = 0x488
leaq 0xa31(%rip), %rsi       # 0x2140
callq 0x10a0
testq %rax, %rax
je 0x17e0
movq %rax, %rbx
leaq 0x2c(%rsp), %rdi
callq 0x11cc
movq %rbx, %rdi
callq 0x1090
testl %eax, %eax
jne 0x177b
leaq 0xa06(%rip), %r14       # 0x2143
leaq 0xa0(%rsp), %r15
leaq 0x2c(%rsp), %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1040
movq %r15, %rdi
callq 0x1070
movq %r12, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x11fd
movq %rbx, %rdi
callq 0x1090
testl %eax, %eax
je 0x174a
leaq 0x2c(%rsp), %r14
movq %r14, %rdi
movl $0x80, %esi
movl $0x3, %edx
callq 0x153f
movq %rsp, %rsi
movq %r14, %rdi
callq 0x165c
leaq 0x9a2(%rip), %r14       # 0x2146
xorl %r15d, %r15d
movzbl (%rsp,%r15), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1080
incq %r15
cmpq $0x20, %r15
jne 0x17a7
movl $0xa, %edi
callq 0x1030
movq %rbx, %rdi
callq 0x1060
addq $0x488, %rsp            # imm = 0x488
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x9d2(%rip), %rdi       # 0x21b9
addq $0x488, %rsp            # imm = 0x488
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1050
// File: /workspace/github_c_makefile_star2_O3/dubeyalok7[P]crypto-algo/sha/main.c
// Function: main
int main(int argc, char *argv[])
{
  int opt, hash_val = 0;
  extern char *optarg;
  char *infile;
  if(argc<5){
    help();
    return 0;
  }
  while((opt = getopt(argc, argv, "i:h:")) != -1){
    switch (opt)
    {
      case 'i':
        infile = optarg;
        break;
      case 'h':
        hash_val = atoi(optarg);      
        break;
    }
  }
  if(256 == hash_val){
    init_sha_256(infile);
  } else if(512 == hash_val){
    init_sha_512(infile);
  }  
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x5, %edi
jge 0x1812
callq 0x16c8
jmp 0x1869
movq %rsi, %rbx
movl %edi, %ebp
xorl %r12d, %r12d
leaq 0x92b(%rip), %r15       # 0x214c
movq 0x27b8(%rip), %r13      # 0x3fe0
movl %ebp, %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x10b0
cmpl $-0x1, %eax
je 0x1858
cmpl $0x68, %eax
je 0x184a
cmpl $0x69, %eax
jne 0x1828
movq (%r13), %r14
jmp 0x1828
movq (%r13), %rdi
callq 0x10c0
movl %eax, %r12d
jmp 0x1828
cmpl $0x100, %r12d           # imm = 0x100
jne 0x1869
movq %r14, %rdi
callq 0x16fa
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xiaowenhuyuehu[P]remote_access/src/connectivity/rd_net.c
// Function: rd_net_read
int rd_net_read(pNetwork_t pNetwork, void *connect, char *buffer, int len, int timeout_ms)
{
    if (RD_NET_WEBSOCKET == pNetwork->type) {
        if (NULL != connect) {
            return ws_nopoll_read(connect, buffer, len, timeout_ms);
        } else {
            return ws_nopoll_read(pNetwork->handle, buffer, len, timeout_ms);
        }
    } else {
        log_debug("unsupport connect type: %d ", pNetwork->type);
        return -1;
    }
}

// Assembly:
movl (%rdi), %r9d
testl %r9d, %r9d
je 0x283f
pushq %rax
leaq 0x67e8(%rip), %rsi      # 0x9004
leaq 0x67e7(%rip), %rdx      # 0x900a
leaq 0x67fa(%rip), %r8       # 0x9024
xorl %edi, %edi
movl $0xe, %ecx
xorl %eax, %eax
callq 0x42c5
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rcx
retq
testq %rsi, %rsi
je 0x2849
movq %rsi, %rdi
jmp 0x284d
movq 0x38(%rdi), %rdi
movq %rdx, %rsi
movl %ecx, %edx
movl %r8d, %ecx
jmp 0x2b0c
// File: /workspace/github_c_makefile_star2_O3/xiaowenhuyuehu[P]remote_access/src/connectivity/rd_net.c
// Function: rd_net_write
int rd_net_write(pNetwork_t pNetwork, void *connect, const char *buffer, int len, int timeout_ms)
{
    if (RD_NET_WEBSOCKET == pNetwork->type) {
        if (NULL != connect) {
            return ws_nopoll_write(connect, buffer, len, timeout_ms);
        } else {
            return ws_nopoll_write(pNetwork->handle, buffer, len, timeout_ms);
        }
    } else {
        log_debug("unsupport connect type: %d ", pNetwork->type);
        return -1;
    }
}

// Assembly:
movl (%rdi), %r9d
testl %r9d, %r9d
je 0x288d
pushq %rax
leaq 0x679a(%rip), %rsi      # 0x9004
leaq 0x6799(%rip), %rdx      # 0x900a
leaq 0x67ac(%rip), %r8       # 0x9024
xorl %edi, %edi
movl $0x1c, %ecx
xorl %eax, %eax
callq 0x42c5
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rcx
retq
testq %rsi, %rsi
je 0x2897
movq %rsi, %rdi
jmp 0x289b
movq 0x38(%rdi), %rdi
movq %rdx, %rsi
movl %ecx, %edx
movl %r8d, %ecx
jmp 0x2b19
// File: /workspace/github_c_makefile_star2_O3/xiaowenhuyuehu[P]remote_access/src/connectivity/rd_net.c
// Function: rd_net_connect
int rd_net_connect(pNetwork_t pNetwork)
{
    if (RD_NET_WEBSOCKET == pNetwork->type) {
        pNetwork->handle = (void *)ws_nopoll_connect(pNetwork->debug_on, pNetwork->host, pNetwork->port, 
                                pNetwork->get_url, pNetwork->tls_on, pNetwork->ca_crt);
        if (NULL != pNetwork->handle) {
            return 0;
        }
        return -1;
    } else {
        log_debug("unsupport connect type: %d ", pNetwork->type);
        return -1;
    }
}

// Assembly:
pushq %rbx
movl (%rdi), %r9d
testl %r9d, %r9d
je 0x2917
leaq 0x6710(%rip), %rsi      # 0x9004
leaq 0x670f(%rip), %rdx      # 0x900a
leaq 0x6722(%rip), %r8       # 0x9024
xorl %edi, %edi
movl $0x35, %ecx
xorl %eax, %eax
callq 0x42c5
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2945
movq %rdi, %rbx
movl 0x34(%rdi), %edi
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rcx
movl 0x30(%rbx), %r8d
movq 0x20(%rbx), %r9
callq 0x2c5a
movq %rax, %rcx
movq %rax, 0x38(%rbx)
xorl %eax, %eax
cmpq $0x1, %rcx
sbbl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/xiaowenhuyuehu[P]remote_access/src/connectivity/rd_net.c
// Function: rd_net_listener
int rd_net_listener(pNetwork_t pNetwork)
{
    if (RD_NET_WEBSOCKET == pNetwork->type) {
        pNetwork->handle = (void *)ws_nopoll_listener(pNetwork->debug_on, pNetwork->host, pNetwork->port, 
                                pNetwork->tls_on, pNetwork->ca_crt, pNetwork->pri_key);
        if (NULL != pNetwork->handle) {
            return 0;
        }
        return -1;
    } else {
        log_debug("unsupport connect type: %d ", pNetwork->type);
        return -1;
    }
}

// Assembly:
pushq %rbx
movl (%rdi), %r9d
testl %r9d, %r9d
je 0x297a
leaq 0x66ad(%rip), %rsi      # 0x9004
leaq 0x66ac(%rip), %rdx      # 0x900a
leaq 0x66bf(%rip), %r8       # 0x9024
xorl %edi, %edi
movl $0x44, %ecx
xorl %eax, %eax
callq 0x42c5
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x29a7
movq %rdi, %rbx
movl 0x34(%rdi), %edi
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movl 0x30(%rbx), %ecx
movq 0x20(%rbx), %r8
movq 0x28(%rbx), %r9
callq 0x2ebc
movq %rax, %rcx
movq %rax, 0x38(%rbx)
xorl %eax, %eax
cmpq $0x1, %rcx
sbbl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/xiaowenhuyuehu[P]remote_access/src/connectivity/rd_net.c
// Function: rd_net_get_conn_info
int rd_net_get_conn_info (pNetwork_t pNetwork, void *connect, ConnectInfo_t *connInfo)
{
    if (RD_NET_WEBSOCKET == pNetwork->type) {
        if (NULL != connect) {
            return ws_nopoll_get_conn_info(connect, connInfo);
        } else {
            return ws_nopoll_get_conn_info(pNetwork->handle, connInfo);
        }
    } else {
        log_debug("unsupport connect type: %d ", pNetwork->type);
        return -1;
    }
}

// Assembly:
movl (%rdi), %r9d
testl %r9d, %r9d
je 0x2a8d
pushq %rax
leaq 0x659a(%rip), %rsi      # 0x9004
leaq 0x6599(%rip), %rdx      # 0x900a
leaq 0x65ac(%rip), %r8       # 0x9024
xorl %edi, %edi
movl $0x70, %ecx
xorl %eax, %eax
callq 0x42c5
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rcx
retq
testq %rsi, %rsi
je 0x2a97
movq %rsi, %rdi
jmp 0x2a9b
movq 0x38(%rdi), %rdi
movq %rdx, %rsi
jmp 0x325e
// File: /workspace/github_c_makefile_star2_O3/xiaowenhuyuehu[P]remote_access/src/connectivity/ws_nopoll.c
// Function: ws_nopoll_write
int ws_nopoll_write(void *handle, const char *buffer, int len, int timeout_ms)
{
    noPollConn *conn = (noPollConn *)handle;
    int tries = 0;
    int bytes_written = 0;

    if ((NULL != buffer) && (len > 0)) {
        bytes_written = nopoll_conn_send_binary (conn, buffer, len);
        if (bytes_written == len) {
            //log_debug ("send all. ");
            return bytes_written;
        }

        while (tries < 5 && errno == NOPOLL_EWOULDBLOCK 
          && nopoll_conn_pending_write_bytes (conn) > 0) {
            nopoll_sleep (10000); 
            if (0 == nopoll_conn_complete_pending_write (conn)) {
                log_debug ("send complete. ");
                return len;
            }
            tries++;
        }
        log_debug ("send len: %d, try: %d. ", bytes_written, tries);
        return  bytes_written;
    } else {
        log_debug ("ERROR: content is NULL or len <= 0 ");
    }
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
testq %rsi, %rsi
sete %al
testl %edx, %edx
setle %cl
orb %al, %cl
jne 0x2b4b
movl %edx, %ebp
movq %rdi, %r14
movl %edx, %edx
callq 0x2460
cmpl %ebp, %eax
jne 0x2b75
movl %ebp, %ebx
jmp 0x2be3
leaq 0x64b2(%rip), %rsi      # 0x9004
leaq 0x64e7(%rip), %rdx      # 0x9040
leaq 0x6525(%rip), %r8       # 0x9085
xorl %edi, %edi
movl $0x38, %ecx
xorl %eax, %eax
callq 0x42c5
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x2be3
movl %eax, %ebx
xorl %r12d, %r12d
callq 0x2400
movq %rax, %r15
cmpl $0xb, (%r15)
jne 0x2bb9
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
jle 0x2bb9
movl $0x2710, %edi           # imm = 0x2710
callq 0x25b0
movq %r14, %rdi
callq 0x2240
testl %eax, %eax
je 0x2bf2
incl %r12d
cmpl $0x5, %r12d
jne 0x2b82
movl $0x5, %r12d
movl %r12d, (%rsp)
leaq 0x6440(%rip), %rsi      # 0x9004
leaq 0x6475(%rip), %rdx      # 0x9040
leaq 0x649b(%rip), %r8       # 0x906d
xorl %edi, %edi
movl $0x35, %ecx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x42c5
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x640b(%rip), %rsi      # 0x9004
leaq 0x6440(%rip), %rdx      # 0x9040
leaq 0x6456(%rip), %r8       # 0x905d
xorl %edi, %edi
movl $0x30, %ecx
xorl %eax, %eax
callq 0x42c5
jmp 0x2b44
// File: /workspace/github_c_makefile_star2_O3/xiaowenhuyuehu[P]remote_access/src/connectivity/ws_nopoll.c
// Function: ws_nopoll_destroy
int ws_nopoll_destroy(void *handle)
{
    noPollConn *conn = (noPollConn *)handle;
    noPollCtx *ctx = NULL;

	/* finish connection */
	if (NULL != conn) {
        ctx = nopoll_conn_ctx(conn);
    	nopoll_conn_close(conn);
	}
	
	/* finish */
	if (NULL != ctx) {
    	nopoll_loop_stop(ctx);
        nopoll_ctx_unref(ctx);
	}

	/* call to cleanup */
	nopoll_cleanup_library ();

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2c4b
movq %rdi, %r14
callq 0x2040
movq %rax, %rbx
movq %r14, %rdi
callq 0x2060
testq %rbx, %rbx
je 0x2c4b
movq %rbx, %rdi
callq 0x2550
movq %rbx, %rdi
callq 0x25e0
callq 0x2200
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/xiaowenhuyuehu[P]remote_access/src/connectivity/ws_nopoll.c
// Function: ws_nopoll_loop_wait
int ws_nopoll_loop_wait(void *handle)
{
    noPollConn *conn = (noPollConn *)handle;
    noPollCtx *ctx = NULL;

    if (NULL == conn) {
        log_debug("ERROR: conn is NULL ");
        return -1;
    }

    ctx = nopoll_conn_ctx(conn);
    if (NULL == ctx) {
        log_debug("ERROR: ctx is NULL ");
        return -1;
    }

    nopoll_loop_wait(ctx, 0);
	return 0;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x307f
callq 0x2040
testq %rax, %rax
je 0x309d
xorl %ebx, %ebx
movq %rax, %rdi
xorl %esi, %esi
callq 0x22b0
jmp 0x30c5
leaq 0x5f7e(%rip), %rsi      # 0x9004
leaq 0x5fb3(%rip), %rdx      # 0x9040
leaq 0x623c(%rip), %r8       # 0x92d0
xorl %edi, %edi
movl $0xd8, %ecx
jmp 0x30b9
leaq 0x5f60(%rip), %rsi      # 0x9004
leaq 0x5f95(%rip), %rdx      # 0x9040
leaq 0x6233(%rip), %r8       # 0x92e5
xorl %edi, %edi
movl $0xde, %ecx
xorl %eax, %eax
callq 0x42c5
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
retq