LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/./source/small_sort.c
// Function: send_to_b
static void	send_to_b(t_stack *stack, t_aux *aux, int total_numbers)
{
	if (ft_dlstsize(stack->a) == 3)
		return ;
	if ((stack->a->index == 0) || (stack->a->index == 1))
	{
		aux->a.higher_index--;
		push(&stack->a, &stack->b, &stack->instr, 'b');
	}
	else
		rotate(&stack->a, &stack->instr, 'a');
	send_to_b(stack, aux, total_numbers);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
leaq 0x10(%rdi), %r12
movq (%r14), %rdi
callq 0x2528
cmpl $0x3, %eax
je 0x1fc9
movq (%r14), %rax
cmpl $0x1, 0x4(%rax)
ja 0x1fb7
decl 0x10(%rbx)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl $0x62, %ecx
callq 0x131c
jmp 0x1f89
movq %r14, %rdi
movq %r12, %rsi
movl $0x61, %edx
callq 0x1389
jmp 0x1f89
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/./source/return_to_a_sorting.c
// Function: finish_sorting
void	finish_sorting(t_stack *stack, t_aux *aux)
{
	int	size_b;

	size_b = ft_dlstsize(stack->b);
	define_b_values(stack, aux);
	if (size_b == 0)
	{
		order_a(stack, aux);
		return ;
	}
	else if (size_b == 1)
		push(&stack->b, &stack->a, &stack->instr, 'a');
	else if (stack->b->index == aux->a.next_index_to_sort)
		send_next_smaller_to_a(stack, aux);
	else if (stack->b->index == aux->b.higher_index)
		send_next_bigger_to_a(stack, aux);
	else if (reverse_rotation_is_quicker(stack->b, aux->a.next_index_to_sort))
		reverse_rotate(&stack->b, &stack->instr, 'b');
	else
		rotate(&stack->b, &stack->instr, 'b');
	finish_sorting(stack, aux);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
leaq 0x10(%rdi), %r12
movq 0x8(%r14), %rdi
callq 0x2528
movl %eax, %ebp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20b9
cmpl $0x1, %ebp
je 0x202b
testl %ebp, %ebp
je 0x20a6
movq (%r15), %rdi
movl 0x4(%rdi), %eax
movl 0x14(%rbx), %esi
cmpl %esi, %eax
jne 0x2040
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2108
jmp 0x1fee
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl $0x61, %ecx
callq 0x131c
jmp 0x1fee
cmpl 0x1c(%rbx), %eax
jne 0x207e
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl $0x61, %ecx
callq 0x131c
decl 0x1c(%rbx)
movq (%r14), %rax
movl 0x4(%rax), %eax
cmpl 0x14(%rbx), %eax
jne 0x1fee
movq %r14, %rdi
movq %r12, %rsi
movl $0x61, %edx
callq 0x1389
incl 0x14(%rbx)
jmp 0x1fee
callq 0x1718
movq %r15, %rdi
movq %r12, %rsi
movl $0x62, %edx
testl %eax, %eax
je 0x209c
callq 0x13ef
jmp 0x1fee
callq 0x1389
jmp 0x1fee
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x158c
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/./source/return_to_a_sorting.c
// Function: define_b_values
static void	define_b_values(t_stack *stack, t_aux *aux)
{
	t_dlist	*stack_b;

	stack_b = stack->b;
	aux->b.higher_index = INT_MIN;
	aux->b.lower_index = INT_MAX;
	while (stack_b)
	{
		if (stack_b->index > aux->b.higher_index)
			aux->b.higher_index = stack_b->index;
		if (stack_b->index < aux->b.lower_index)
			aux->b.lower_index = stack_b->index;
		stack_b = stack_b->next;
	}
	aux->b.mid_index = find_mid_index(aux->b.higher_index, aux->b.lower_index);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq 0x8(%rdi), %rax
movabsq $0x7fffffff80000000, %rcx # imm = 0x7FFFFFFF80000000
movq %rcx, 0x1c(%rsi)
testq %rax, %rax
je 0x20f8
movl 0x1c(%rbx), %ecx
movl 0x20(%rbx), %edx
movl 0x4(%rax), %esi
cmpl %ecx, %esi
jle 0x20e6
movl %esi, 0x1c(%rbx)
movl %esi, %ecx
cmpl %edx, %esi
jge 0x20ef
movl %esi, 0x20(%rbx)
movl %esi, %edx
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x20da
movl 0x1c(%rbx), %edi
movl 0x20(%rbx), %esi
callq 0x1548
movl %eax, 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/./source/return_to_a_sorting.c
// Function: send_next_smaller_to_a
static void	send_next_smaller_to_a(t_stack *stack, t_aux *aux)
{
	push(&stack->b, &stack->a, &stack->instr, 'a');
	rotate(&stack->a, &stack->instr, 'a');
	aux->a.next_index_to_sort++;
	aux->b.lower_index++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rdi
leaq 0x10(%r14), %r15
movq %r14, %rsi
movq %r15, %rdx
movl $0x61, %ecx
callq 0x131c
movq %r14, %rdi
movq %r15, %rsi
movl $0x61, %edx
callq 0x1389
incl 0x14(%rbx)
incl 0x20(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/./source/return_to_a_sorting.c
// Function: start_sorting
void	start_sorting(t_stack *stack, t_aux *aux)
{
	int	size_b;

	size_b = ft_dlstsize(stack->b);
	define_b_values(stack, aux);
	if (size_b == 0)
		return ;
	if ((stack->b->index > aux->b.mid_index) || (size_b == 1))
		push(&stack->b, &stack->a, &stack->instr, 'a');
	else if (stack->b->index == aux->a.next_index_to_sort)
		send_next_smaller_to_a(stack, aux);
	else if (reverse_rotation_is_quicker(stack->b, aux->a.next_index_to_sort))
		reverse_rotate(&stack->b, &stack->instr, 'b');
	else
		rotate(&stack->b, &stack->instr, 'b');
	start_sorting(stack, aux);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
leaq 0x10(%rdi), %r12
movq 0x8(%r14), %rdi
callq 0x2528
movl %eax, %ebp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20b9
testl %ebp, %ebp
je 0x21db
movq (%r15), %rdi
movl 0x4(%rdi), %eax
cmpl 0x18(%rbx), %eax
setg %cl
cmpl $0x1, %ebp
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x21a5
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl $0x61, %ecx
callq 0x131c
jmp 0x215d
movl 0x14(%rbx), %esi
cmpl %esi, %eax
jne 0x21b9
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2108
jmp 0x215d
callq 0x1718
movq %r15, %rdi
movq %r12, %rsi
movl $0x62, %edx
testl %eax, %eax
je 0x21d4
callq 0x13ef
jmp 0x215d
callq 0x1389
jmp 0x215d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_atoi.c
// Function: ft_atoi
double	ft_atoi(const char *nptr)
{
	double	number;
	int		sign;

	number = 0;
	sign = 1;
	while (atoi_isspace(*nptr))
		nptr++;
	if (*nptr == '-' || *nptr == '+')
	{
		if (*nptr == '-')
			sign *= -1;
		nptr++;
	}
	while (ft_isdigit(*nptr))
	{
		number *= 10;
		number += (*nptr - '0');
		nptr++;
	}
	number *= sign;
	return (number);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movb (%rbx), %al
movzbl %al, %ecx
leal -0x9(%rcx), %edx
cmpl $0x5, %edx
jae 0x2216
incq %rbx
jmp 0x2204
cmpl $0x20, %ecx
je 0x2211
cmpl $0x2b, %ecx
je 0x2225
cmpl $0x2d, %ecx
jne 0x2242
xorl %ecx, %ecx
cmpb $0x2d, %al
sete %cl
leaq 0xe35(%rip), %rax       # 0x3068
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x10(%rbp)
incq %rbx
jmp 0x224f
movsd 0xe2e(%rip), %xmm0      # 0x3078
movsd %xmm0, -0x10(%rbp)
movsbl (%rbx), %edi
callq 0x22ac
testl %eax, %eax
je 0x2297
incq %rbx
xorpd %xmm1, %xmm1
mulsd 0xe16(%rip), %xmm1      # 0x3080
movsbl -0x1(%rbx), %eax
addl $-0x30, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
addsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rbp)
movsbl (%rbx), %edi
callq 0x22ac
movsd -0x18(%rbp), %xmm1
incq %rbx
testl %eax, %eax
jne 0x2262
jmp 0x229b
xorpd %xmm1, %xmm1
movsd -0x10(%rbp), %xmm0
mulsd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_split.c
// Function: ft_split
char	**ft_split(char const *s, char c)
{
	char		**str_array;
	t_split		split;

	split.words = word_count(s, c);
	str_array = (char **)malloc((split.words + 1) * sizeof(char *));
	if (!(str_array) || (!s))
		return (NULL);
	split.i = 0;
	split.i_array = 0;
	while (s[split.i] != '\0')
	{
		if (s[split.i] != c)
		{
			split.sub_length = sub_len(&s[split.i], c);
			str_array[split.i_array] = ft_substr(s, split.i, split.sub_length);
			if (!(str_array[split.i_array]))
				return (free_str_array(str_array));
			split.i_array++;
			split.i += split.sub_length - 1;
		}
		split.i++;
	}
	str_array[split.i_array] = NULL;
	return (str_array);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl $0x8, %edi
testq %r14, %r14
je 0x233c
cmpb $0x0, (%r14)
je 0x233c
xorl %ecx, %ecx
xorl %eax, %eax
decq %rcx
movq %rcx, %rdx
movq %rdx, %rcx
movb 0x1(%r14,%rdx), %sil
incq %rdx
cmpb %bl, %sil
jne 0x2302
testb %sil, %sil
jne 0x22ed
testb %sil, %sil
sete %dil
cmpb %bl, %sil
sete %sil
orb %dil, %sil
je 0x231a
movq %rdx, %rcx
jmp 0x232d
movb 0x1(%r14,%rcx), %dl
incq %rcx
cmpb %bl, %dl
je 0x232a
testb %dl, %dl
jne 0x231a
incq %rax
cmpb $0x0, (%r14,%rcx)
jne 0x22e7
leaq 0x8(,%rax,8), %rdi
callq 0x1050
movq %rax, %r15
xorl %eax, %eax
testq %r14, %r14
je 0x23eb
testq %r15, %r15
je 0x23eb
movb (%r14), %cl
xorl %r12d, %r12d
testb %cl, %cl
je 0x23b4
movq %r14, %rax
xorl %esi, %esi
cmpb %bl, %cl
jne 0x2370
movq %rsi, %r13
jmp 0x23a1
leaq -0x2(%rsi), %r13
movq $-0x1, %rdx
movb 0x1(%rax,%rdx), %cl
incq %r13
incq %rdx
testb %cl, %cl
je 0x238d
cmpb %bl, %cl
jne 0x237b
movq %r14, %rdi
callq 0x2724
movq %rax, (%r15,%r12,8)
testq %rax, %rax
je 0x23c1
incq %r12
leaq (%r14,%r13), %rax
incq %rax
incq %r13
movb (%rax), %cl
movq %r13, %rsi
testb %cl, %cl
jne 0x2367
movq $0x0, (%r15,%r12,8)
movq %r15, %rax
jmp 0x23eb
movq (%r15), %rdi
testq %rdi, %rdi
je 0x23e1
movq %r15, %rbx
addq $0x8, %rbx
callq 0x1070
movq (%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
jne 0x23d0
movq %r15, %rdi
callq 0x1070
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_putstr_fd.c
// Function: ft_putstr_fd
void	ft_putstr_fd(char *s, int fd)
{
	if (!s)
		return ;
	while (*s != '\0')
	{
		ft_putchar_fd(*s, fd);
		s++;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x242e
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movb (%rdi), %al
testb %al, %al
je 0x242a
movl %esi, %ebx
incq %r14
movsbl %al, %edi
movl %ebx, %esi
callq 0x27bc
movb (%r14), %al
incq %r14
testb %al, %al
jne 0x2416
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_lstnew.c
// Function: ft_lstnew
t_list	*ft_lstnew(void *content)
{
	t_list	*pointer;

	pointer = (t_list *)malloc(sizeof(t_list));
	if (!pointer)
		return (NULL);
	pointer->content = content;
	pointer->next = NULL;
	return (pointer);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10, %edi
callq 0x1050
testq %rax, %rax
je 0x2455
movq %rbx, (%rax)
movq $0x0, 0x8(%rax)
jmp 0x2457
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_lstadd_back.c
// Function: ft_lstadd_back
void	ft_lstadd_back(t_list **lst, t_list *new)
{
	t_list	*aux;

	if (new == NULL)
		return ;
	if (*lst == NULL)
	{
		*lst = new;
		return ;
	}
	aux = ft_lstlast(*lst);
	aux->next = new;
}

// Assembly:
testq %rsi, %rsi
je 0x248e
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x2485
movq %rax, %rdi
callq 0x27e0
movq %rax, %rdi
addq $0x8, %rdi
movq %rbx, (%rdi)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_lstclear.c
// Function: ft_lstclear
void	ft_lstclear(t_list **lst, void (*del)(void *))
{
	t_list	*aux;
	t_list	*temp;

	aux = *lst;
	if (aux == NULL)
		return ;
	while (aux != NULL)
	{
		temp = aux->next;
		del(aux);
		aux = temp;
	}
	*lst = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x24be
movq %rsi, %r14
movq 0x8(%rdi), %r15
callq *%r14
movq %r15, %rdi
testq %r15, %r15
jne 0x24a8
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_lstiter.c
// Function: ft_lstiter
void	ft_lstiter(t_list *lst, void (*f)(const char *))
{
	t_list	*aux;

	if (lst == NULL)
		return ;
	aux = lst;
	while (aux != NULL)
	{
		f(aux->content);
		aux = aux->next;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x24f0
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%r14), %rdi
callq *%rbx
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x24de
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_dlstnew.c
// Function: ft_dlstnew
t_dlist	*ft_dlstnew(int content)
{
	t_dlist	*pointer;

	pointer = (t_dlist *)malloc(sizeof(t_dlist));
	if (!(pointer))
		return_error();
	pointer->content = content;
	pointer->next = NULL;
	pointer->previous = NULL;
	return (pointer);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
movl $0x18, %edi
callq 0x1050
movq %rax, %r14
testq %rax, %rax
jne 0x2514
callq 0x16c0
movl %ebx, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_dlstsize.c
// Function: ft_dlstsize
int	ft_dlstsize(t_dlist *lst)
{
	t_dlist	*aux;
	int		size;

	aux = lst;
	size = 0;
	while (aux != NULL)
	{
		size++;
		aux = aux->next;
	}
	return (size);
}

// Assembly:
testq %rdi, %rdi
je 0x2540
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
incl %eax
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x2533
popq %rbp
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_dlstadd_back.c
// Function: ft_dlstadd_back
void	ft_dlstadd_back(t_dlist **lst, t_dlist *new)
{
	t_dlist	*aux;

	if (new == NULL)
		return ;
	if (*lst == NULL)
	{
		*lst = new;
		return ;
	}
	aux = ft_dlstlast(*lst);
	aux->next = new;
	new->previous = aux;
}

// Assembly:
testq %rsi, %rsi
je 0x2575
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x256c
movq %rax, %rdi
callq 0x27fc
movq %rbx, 0x8(%rax)
movq %rax, 0x10(%rbx)
jmp 0x256f
movq %rbx, (%rdi)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_dlstclear.c
// Function: ft_dlstclear
void	ft_dlstclear(t_dlist **lst)
{
	t_dlist	*aux;
	t_dlist	*temp;

	aux = *lst;
	if (aux == NULL)
		return ;
	while (aux != NULL)
	{
		temp = aux->next;
		free(aux);
		aux = temp;
	}
	*lst = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x25a2
movq 0x8(%rdi), %r14
callq 0x1070
movq %r14, %rdi
testq %r14, %r14
jne 0x258a
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_dlstiter.c
// Function: ft_dlstiter
void	ft_dlstiter(t_dlist *lst, void (*f)(int))
{
	t_dlist	*aux;

	if (lst == NULL)
		return ;
	aux = lst;
	while (aux != NULL)
	{
		f(aux->content);
		ft_putchar('\n');
		aux = aux->next;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x25d6
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl (%r14), %edi
callq *%rbx
movl $0xa, %edi
callq 0x2610
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x25ba
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_dlstiter.c
// Function: ft_dlstiter_reverse
void	ft_dlstiter_reverse(t_dlist *lst, void (*f)(int))
{
	t_dlist	*aux;

	if (lst == NULL)
		return ;
	aux = lst;
	while (aux->next != NULL)
		aux = aux->next;
	while (aux != NULL)
	{
		f(aux->content);
		ft_putchar('\n');
		aux = aux->previous;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x260e
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x25e6
movl (%r14), %edi
callq *%rbx
movl $0xa, %edi
callq 0x2610
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x25f2
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_putstr.c
// Function: ft_putstr
void	ft_putstr(char const *s)
{
	if (!s)
		return ;
	while (*s != '\0')
	{
		ft_putchar(*s);
		s++;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x2662
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb (%rdi), %al
testb %al, %al
je 0x265c
incq %rbx
movsbl %al, %edi
callq 0x2610
movb (%rbx), %al
incq %rbx
testb %al, %al
jne 0x264b
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_putnbr.c
// Function: ft_putnbr
void	ft_putnbr(int nb)
{
	unsigned int	number;

	if (nb < 0)
	{
		number = nb * -1;
		ft_putchar('-');
	}
	else
	{
		number = nb;
	}
	if (number / 10 < 1)
	{
		ft_putchar(number + '0');
	}
	else
	{
		ft_putnbr(number / 10);
		ft_putnbr(number % 10);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0xcccccccd, %r15d      # imm = 0xCCCCCCCD
testl %ebx, %ebx
jns 0x269a
negl %ebx
movl $0x2d, %edi
callq 0x2610
cmpl $0x9, %ebx
jbe 0x26bd
movl %ebx, %r14d
imulq %r15, %r14
shrq $0x23, %r14
movl %r14d, %edi
callq 0x2678
addl %r14d, %r14d
leal (%r14,%r14,4), %eax
subl %eax, %ebx
jmp 0x268a
orb $0x30, %bl
movsbl %bl, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2610
nop
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_strnequ.c
// Function: ft_strnequ
int	ft_strnequ(char const *s1, char const *s2, size_t n)
{
	size_t	i;

	if (!s1 || !s2)
		return (0);
	i = 0;
	while ((s1[i] != '\0' || s2[i] != '\0') && i < n)
	{
		if (s1[i] != s2[i])
		{
			return (0);
		}
		i++;
	}
	return (1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x2717
xorl %ecx, %ecx
movb (%rdi,%rcx), %r8b
testb %r8b, %r8b
je 0x26fa
cmpq %rdx, %rcx
jb 0x270a
jmp 0x271b
movl $0x1, %eax
cmpq %rdx, %rcx
jae 0x2719
cmpb $0x0, (%rsi,%rcx)
je 0x2719
leaq 0x1(%rcx), %rax
cmpb (%rsi,%rcx), %r8b
movq %rax, %rcx
je 0x26ea
xorl %eax, %eax
popq %rbp
retq
movl $0x1, %eax
jmp 0x2719
nop
// File: /workspace/github_c_makefile_star2_O1/paulahemsi[P]push_swap/libraries/libft/ft_substr.c
// Function: ft_substr
char	*ft_substr(char const *s, unsigned int start, size_t len)
{
	size_t	i;
	char	*new_string;

	if (!s)
		return (NULL);
	new_string = (char *)malloc((len + 1) * sizeof(char));
	if (new_string == NULL)
		return (NULL);
	i = 0;
	while ((i < len) && ((start + i) < ft_strlen(s)) && (s[start + i] != '\0'))
	{
		new_string[i] = s[start + i];
		i++;
	}
	new_string[i] = '\0';
	return (new_string);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x279c
movq %rdx, %r14
movl %esi, %r12d
movq %rdi, %r15
leaq 0x1(%rdx), %rdi
callq 0x1050
testq %rax, %rax
je 0x279c
movq %rax, %rbx
testq %r14, %r14
je 0x27a0
movl %r12d, %eax
movq %rax, -0x38(%rbp)
addq %r15, %rax
movq %rax, -0x30(%rbp)
xorl %r12d, %r12d
movq -0x38(%rbp), %rax
leaq (%rax,%r12), %r13
movq %r15, %rdi
callq 0x2818
cmpq %rax, %r13
jae 0x27a3
movq -0x30(%rbp), %rax
movb (%rax,%r12), %al
testb %al, %al
je 0x27a3
movb %al, (%rbx,%r12)
incq %r12
cmpq %r12, %r14
jne 0x276a
movq %r14, %r12
jmp 0x27a3
xorl %ebx, %ebx
jmp 0x27a8
xorl %r12d, %r12d
movb $0x0, (%rbx,%r12)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/programs/cat/cat.c
// Function: process_file
void process_file(char* filename) {
	// Διαβάζουμε το αρχείο ή την είσοδο. Το io.h module κάνει όλη τη δουλειά.
	Vector vec = strcmp(filename, "-") == 0
		? io_read_stream_as_vector(stdin)
		: io_read_file_as_vector(filename);

	if (vec == NULL) {
		fprintf(stderr, "cat: %s: cannot read file\n", filename);
		return;
	}

	io_write_vector_to_stream(stdout, vec);
	vector_destroy(vec);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xe1a(%rip), %rsi       # 0x2004
callq 0x1080
testl %eax, %eax
je 0x11fd
movq %rbx, %rdi
callq 0x1329
jmp 0x120c
movq 0x2dd4(%rip), %rax      # 0x3fd8
movq (%rax), %rdi
callq 0x12a4
movq %rax, %r14
testq %rax, %rax
je 0x1235
movq 0x2db5(%rip), %rax      # 0x3fd0
movq (%rax), %rdi
movq %r14, %rsi
callq 0x1363
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x15f6
movq 0x2dbc(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xdc0(%rip), %rsi       # 0x2006
movq %rbx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1090
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/programs/cat/cat.c
// Function: main
int main(int argc, char* argv[]) {
	for (int i = 1; i < argc; i++)
		process_file(argv[i]);

	// χωρίς κανένα αρχείο διαβάζουμε από την είσοδο
	if (argc == 1)
		process_file("-");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpl $0x2, %edi
jl 0x1283
movq %rsi, %r14
movl %ebx, %r15d
movl $0x1, %r12d
movq (%r14,%r12,8), %rdi
callq 0x11dc
incq %r12
cmpq %r12, %r15
jne 0x1272
cmpl $0x1, %ebx
jne 0x1294
leaq 0xd75(%rip), %rdi       # 0x2004
callq 0x11dc
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/programs/cat/io.c
// Function: io_read_stream_as_vector
Vector io_read_stream_as_vector(FILE* stream) {
	// TODO: θεωρούμε ότι κάθε γραμμή έχει max 500 χαρακτήρες. Πώς μπορούμε να αφαιρέσουμε αυτόν τον περιορισμό;
	int max_len = 500;
	char line[max_len];

	Vector vec = vector_create(0, free);		// αυτόματο free για κάθε στοιχείο που αφαιρείται

	while (fgets(line, max_len, stream)) {
		// αφαίρεση του newline, αν υπάρχει
		char* newline = strchr(line, '\n');
		if (newline != NULL)
			*newline = '\0';

		// προσθήκη στο vector
		vector_insert_last(vec, strdup(line));
	}

	return vec;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rbx
movq 0x2cfe(%rip), %rsi      # 0x3fb8
xorl %edi, %edi
callq 0x140c
movq %rax, %r14
movq %rsp, %rdi
movl $0x1f4, %esi            # imm = 0x1F4
movq %rbx, %rdx
callq 0x1060
testq %rax, %rax
je 0x1319
movq %rsp, %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x1040
testq %rax, %rax
je 0x12f1
movb $0x0, (%rax)
movq %r15, %rdi
callq 0x10d0
movq %r14, %rdi
movq %rax, %rsi
callq 0x14dd
movq %r15, %rdi
movl $0x1f4, %esi            # imm = 0x1F4
movq %rbx, %rdx
callq 0x1060
testq %rax, %rax
jne 0x12dc
movq %r14, %rax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/programs/cat/io.c
// Function: io_read_file_as_vector
Vector io_read_file_as_vector(char* filename) {
	// απλά ανοίγουμε το αρχείο και καλούμε την io_read_stream_as_vector
	FILE* file = fopen(filename, "r");
	if (file == NULL)
		return NULL;

	Vector vec = io_read_stream_as_vector(file);
	fclose(file);

	return vec;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xced(%rip), %rsi       # 0x2021
callq 0x10c0
testq %rax, %rax
je 0x1359
movq %rax, %rbx
movq %rax, %rdi
callq 0x12a4
movq %rax, %r14
movq %rbx, %rdi
callq 0x1030
movq %r14, %rax
jmp 0x135b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/programs/cat/io.c
// Function: io_write_vector_to_stream
int io_write_vector_to_stream(FILE* stream, Vector vec) {
	int written = 0;
	int size = vector_size(vec);

	// διασχίζουμε το vector και τυπώνουμε κάθε γραμμή
	for (int i = 0; i < size; i++) {
		char* line = vector_get_at(vec, i);
		written += fprintf(stream, "%s\n", line);
	}

	return written;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x144c
testl %eax, %eax
jle 0x13b7
movl %eax, %ebp
leaq 0xc9a(%rip), %r12       # 0x2023
xorl %r15d, %r15d
xorl %r13d, %r13d
movq %rbx, %rdi
movl %r13d, %esi
callq 0x1450
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1090
addl %eax, %r15d
incl %r13d
cmpl %r13d, %ebp
jne 0x138f
jmp 0x13ba
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/programs/cat/io.c
// Function: io_write_vector_to_file
int io_write_vector_to_file(char* filename, Vector vec) {
	// απλά ανοίγουμε το αρχείο και καλούμε την io_write_vector_to_stream
	FILE* file = fopen(filename, "w");
	if (file == NULL)
		return 0;

	int written = io_write_vector_to_stream(file, vec);
	fclose(file);

	return written;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0xc4d(%rip), %rsi       # 0x2027
callq 0x10c0
testq %rax, %rax
je 0x1400
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1363
movl %eax, %ebx
movq %r14, %rdi
callq 0x1030
movl %ebx, %eax
jmp 0x1402
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mikeakohn[P]print_pe/build/../src/cil.c
// Function: read_clr_header
int read_clr_header(FILE *in, struct _clr_header *clr_header, int address, int size, struct section_header_t *section_header)
{
  long marker;
  uint32_t virtual_address, raw_ptr;

  virtual_address = section_header->VirtualAddress;
  raw_ptr = section_header->PointerToRawData;

  address = (address - virtual_address) + raw_ptr;

  marker = ftell(in);
  fseek(in, address, SEEK_SET);

  clr_header->header_size = read_uint32(in);
  clr_header->major_runtime_version = read_uint16(in);
  clr_header->minor_runtime_version = read_uint16(in);
  clr_header->meta_data_directory_address = read_uint32(in);
  clr_header->meta_data_directory_size = read_uint32(in);
  clr_header->flags = read_uint32(in);
  clr_header->entry_point_token = read_uint32(in);
  clr_header->resources_directory_address = read_uint32(in);
  clr_header->resources_directory_size = read_uint32(in);
  clr_header->strong_name_signature_address = read_uint32(in);
  clr_header->strong_name_signature_size = read_uint32(in);
  clr_header->v_table_fixups_address = read_uint32(in);
  clr_header->v_table_fixups_size = read_uint32(in);
  clr_header->export_address_table_jump_address = read_uint32(in);
  clr_header->export_address_table_jump_size = read_uint32(in);
  clr_header->managed_native_header_address = read_uint32(in);
  clr_header->managed_native_header_size = read_uint32(in);

  fseek(in, marker, SEEK_SET);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
subl 0x10(%r8), %ebp
addl 0x18(%r8), %ebp
callq 0x30f0
movq %rax, %r15
movslq %ebp, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3100
movq %rbx, %rdi
callq 0x51ca
movl %eax, (%r14)
movq %rbx, %rdi
callq 0x520c
movw %ax, 0x4(%r14)
movq %rbx, %rdi
callq 0x520c
movw %ax, 0x6(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x8(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0xc(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x10(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x14(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x18(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x1c(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x20(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x24(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x28(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x2c(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x30(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x34(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x38(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x3c(%r14)
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3100
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mikeakohn[P]print_pe/build/../src/cil.c
// Function: print_clr_header
void print_clr_header(struct _clr_header *clr_header)
{
  printf("                Header Size: %d\n", clr_header->header_size);
  printf("      Major Runtime Version: %d\n", clr_header->major_runtime_version);
  printf("      Minor Runtime Version: %d\n", clr_header->minor_runtime_version);
  printf("          MetaData Dir Addr: %d\n", clr_header->meta_data_directory_address);
  printf("          MetaData Dir Size: %d\n", clr_header->meta_data_directory_size);
  printf("                      Flags: %d\n", clr_header->flags);
  printf("          Entry Point Token: %d\n", clr_header->entry_point_token);
  printf("         Resources Dir Addr: %d\n", clr_header->resources_directory_address);
  printf("         Resources Dir Size: %d\n", clr_header->resources_directory_size);
  printf("       Strong Name Sig Addr: %d\n", clr_header->strong_name_signature_address);
  printf("       Strong Name Sig Size: %d\n", clr_header->strong_name_signature_size);
  printf("         VTable Fixups Addr: %d\n", clr_header->v_table_fixups_address);
  printf("         VTable Fixups Size: %d\n", clr_header->v_table_fixups_size);
  printf("Export Addr Table Jump Addr: %d\n", clr_header->export_address_table_jump_address);
  printf("Export Addr Table Jump Size: %d\n", clr_header->export_address_table_jump_size);
  printf("    Mngd Native Header Addr: %d\n", clr_header->managed_native_header_address);
  printf("    Mngd Native Header Size: %d\n", clr_header->managed_native_header_size);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %esi
leaq 0x4d6d(%rip), %rdi      # 0x8795
xorl %eax, %eax
callq 0x3090
movzwl 0x4(%rbx), %esi
leaq 0x4d7c(%rip), %rdi      # 0x87b6
xorl %eax, %eax
callq 0x3090
movzwl 0x6(%rbx), %esi
leaq 0x4d8b(%rip), %rdi      # 0x87d7
xorl %eax, %eax
callq 0x3090
movl 0x8(%rbx), %esi
leaq 0x4d9b(%rip), %rdi      # 0x87f8
xorl %eax, %eax
callq 0x3090
movl 0xc(%rbx), %esi
leaq 0x4dab(%rip), %rdi      # 0x8819
xorl %eax, %eax
callq 0x3090
movl 0x10(%rbx), %esi
leaq 0x4dbb(%rip), %rdi      # 0x883a
xorl %eax, %eax
callq 0x3090
movl 0x14(%rbx), %esi
leaq 0x4dcb(%rip), %rdi      # 0x885b
xorl %eax, %eax
callq 0x3090
movl 0x18(%rbx), %esi
leaq 0x4ddb(%rip), %rdi      # 0x887c
xorl %eax, %eax
callq 0x3090
movl 0x1c(%rbx), %esi
leaq 0x4deb(%rip), %rdi      # 0x889d
xorl %eax, %eax
callq 0x3090
movl 0x20(%rbx), %esi
leaq 0x4dfb(%rip), %rdi      # 0x88be
xorl %eax, %eax
callq 0x3090
movl 0x24(%rbx), %esi
leaq 0x4e0b(%rip), %rdi      # 0x88df
xorl %eax, %eax
callq 0x3090
movl 0x28(%rbx), %esi
leaq 0x4e1b(%rip), %rdi      # 0x8900
xorl %eax, %eax
callq 0x3090
movl 0x2c(%rbx), %esi
leaq 0x4e2b(%rip), %rdi      # 0x8921
xorl %eax, %eax
callq 0x3090
movl 0x30(%rbx), %esi
leaq 0x4e3b(%rip), %rdi      # 0x8942
xorl %eax, %eax
callq 0x3090
movl 0x34(%rbx), %esi
leaq 0x4e4b(%rip), %rdi      # 0x8963
xorl %eax, %eax
callq 0x3090
movl 0x38(%rbx), %esi
leaq 0x4e5b(%rip), %rdi      # 0x8984
xorl %eax, %eax
callq 0x3090
movl 0x3c(%rbx), %esi
leaq 0x4e6b(%rip), %rdi      # 0x89a5
xorl %eax, %eax
popq %rbx
jmp 0x3090
nop
// File: /workspace/github_c_makefile_star2_O1/mikeakohn[P]print_pe/build/../src/clsid.c
// Function: clsid_print
int clsid_print(const uint8_t *clsid)
{
  int t;

  for (t = 0; t < 16; t++)
  {
    printf("%02X", clsid[t]);

    if (t == 3 || t == 5 || t == 7 || t == 9) { printf("-"); }
  }

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x4e4d(%rip), %r14      # 0x89e0
xorl %r15d, %r15d
movzbl (%rbx,%r15), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x3090
movl %r15d, %eax
andl $0xb, %eax
cmpl $0x3, %eax
je 0x3bbc
cmpl $0x9, %r15d
je 0x3bbc
cmpl $0x5, %r15d
jne 0x3bc6
movl $0x2d, %edi
callq 0x3030
incq %r15
cmpq $0x10, %r15
jne 0x3b96
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mikeakohn[P]print_pe/build/../src/com.c
// Function: reg_info_read
int reg_info_read(struct reg_info_t *reg_info, FILE *in, int offset)
{
  int marker;

  marker = ftell(in);
  fseek(in, offset, SEEK_SET);

  reg_info->bNextObject = read_uint32(in);
  reg_info->bObjectName = read_uint32(in);
  reg_info->bObjectDescription = read_uint32(in);
  reg_info->dwInstancing = read_uint32(in);
  reg_info->dwObjectId = read_uint32(in);
  clsid_read((char *)reg_info->uuidObject, in);
  reg_info->fIsInterface = read_uint32(in);
  reg_info->bUidObjectIFace = read_uint32(in);
  reg_info->bUidEventsIFace = read_uint32(in);
  reg_info->fHasEvents = read_uint32(in);
  reg_info->dwMiscStatus = read_uint32(in);
  reg_info->fClassType = read_uint32(in);
  reg_info->fObjectType = read_uint16(in);
  reg_info->wToolboxBitmap32 = read_uint16(in);
  reg_info->wDefaultIcon = read_uint16(in);
  reg_info->fIsDesigner = read_uint16(in);
  reg_info->bDesignerData = read_uint32(in);

  fseek(in, marker, SEEK_SET);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x30f0
movq %rax, %r15
movslq %ebp, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3100
movq %rbx, %rdi
callq 0x51ca
movl %eax, (%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x4(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x8(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0xc(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x10(%r14)
leaq 0x14(%r14), %rdi
movq %rbx, %rsi
callq 0x3b44
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x24(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x28(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x2c(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x30(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x34(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x38(%r14)
movq %rbx, %rdi
callq 0x520c
movw %ax, 0x3c(%r14)
movq %rbx, %rdi
callq 0x520c
movw %ax, 0x3e(%r14)
movq %rbx, %rdi
callq 0x520c
movw %ax, 0x40(%r14)
movq %rbx, %rdi
callq 0x520c
movw %ax, 0x42(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x44(%r14)
movslq %r15d, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3100
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mikeakohn[P]print_pe/build/../src/com.c
// Function: reg_info_print
int reg_info_print(struct reg_info_t *reg_info)
{
  printf("  -- COM Reg Info --\n");
  printf("       bNextObject: %d\n", reg_info->bNextObject);
  printf("       bObjectName: %d (%s)\n", reg_info->bObjectName,reg_info->szObjectName);
  printf("bObjectDescription: %d\n", reg_info->bObjectDescription);
  printf("      dwInstancing: %d\n", reg_info->dwInstancing);
  printf("        dwObjectId: %d\n", reg_info->dwObjectId);
  printf("        uuidObject: ");
  clsid_print(reg_info->uuidObject);
  printf("\n");
  printf("      fIsInterface: %d\n", reg_info->fIsInterface);
  printf("   bUidObjectIFace: %d\n", reg_info->bUidObjectIFace);
  printf("   bUidEventsIFace: %d\n", reg_info->bUidEventsIFace);
  printf("        fHasEvents: %d\n", reg_info->fHasEvents);
  printf("      dwMiscStatus: %d\n", reg_info->dwMiscStatus);
  printf("        fClassType: %d\n", reg_info->fClassType);
  printf("       fObjectType: %d\n", reg_info->fObjectType);
  printf("  wToolboxBitmap32: %d\n", reg_info->wToolboxBitmap32);
  printf("      wDefaultIcon: %d\n", reg_info->wDefaultIcon);
  printf("       fIsDesigner: %d\n", reg_info->fIsDesigner);
  printf("     bDesignerData: %d\n", reg_info->bDesignerData);
  printf("\n");

  return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x4f61(%rip), %rdi      # 0x8c54
callq 0x3060
movl (%rbx), %esi
leaq 0x4ce4(%rip), %rdi      # 0x89e5
xorl %eax, %eax
callq 0x3090
movl 0x4(%rbx), %esi
leaq 0x48(%rbx), %rdx
leaq 0x4ce7(%rip), %rdi      # 0x89fd
xorl %eax, %eax
callq 0x3090
movl 0x8(%rbx), %esi
leaq 0x4cf3(%rip), %rdi      # 0x8a1a
xorl %eax, %eax
callq 0x3090
movl 0xc(%rbx), %esi
leaq 0x4cfa(%rip), %rdi      # 0x8a32
xorl %eax, %eax
callq 0x3090
movl 0x10(%rbx), %esi
leaq 0x4d01(%rip), %rdi      # 0x8a4a
xorl %eax, %eax
callq 0x3090
leaq 0x4d0b(%rip), %rdi      # 0x8a62
xorl %eax, %eax
callq 0x3090
leaq 0x14(%rbx), %rdi
callq 0x3b84
movl $0xa, %edi
callq 0x3030
movl 0x24(%rbx), %esi
leaq 0x4cfc(%rip), %rdi      # 0x8a77
xorl %eax, %eax
callq 0x3090
movl 0x28(%rbx), %esi
leaq 0x4d03(%rip), %rdi      # 0x8a8f
xorl %eax, %eax
callq 0x3090
movl 0x2c(%rbx), %esi
leaq 0x4d0a(%rip), %rdi      # 0x8aa7
xorl %eax, %eax
callq 0x3090
movl 0x30(%rbx), %esi
leaq 0x4d11(%rip), %rdi      # 0x8abf
xorl %eax, %eax
callq 0x3090
movl 0x34(%rbx), %esi
leaq 0x4d18(%rip), %rdi      # 0x8ad7
xorl %eax, %eax
callq 0x3090
movl 0x38(%rbx), %esi
leaq 0x4d1f(%rip), %rdi      # 0x8aef
xorl %eax, %eax
callq 0x3090
movzwl 0x3c(%rbx), %esi
leaq 0x4d25(%rip), %rdi      # 0x8b07
xorl %eax, %eax
callq 0x3090
movzwl 0x3e(%rbx), %esi
leaq 0x4d2b(%rip), %rdi      # 0x8b1f
xorl %eax, %eax
callq 0x3090
movzwl 0x40(%rbx), %esi
leaq 0x4d31(%rip), %rdi      # 0x8b37
xorl %eax, %eax
callq 0x3090
movzwl 0x42(%rbx), %esi
leaq 0x4d37(%rip), %rdi      # 0x8b4f
xorl %eax, %eax
callq 0x3090
movl 0x44(%rbx), %esi
leaq 0x4d3e(%rip), %rdi      # 0x8b67
xorl %eax, %eax
callq 0x3090
movl $0xa, %edi
callq 0x3030
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/mikeakohn[P]print_pe/build/../src/com.c
// Function: com_reg_data_read
int com_reg_data_read(struct com_reg_data_t *com_reg_data, FILE *in, int offset)
{
  int marker;

  marker = ftell(in);
  fseek(in, offset, SEEK_SET);

  com_reg_data->bRegInfo = read_uint32(in);
  com_reg_data->bSZProjectName = read_uint32(in);
  com_reg_data->bSZHelpDirectory = read_uint32(in);
  com_reg_data->bSZProjectDescription = read_uint32(in);
  clsid_read((char *)com_reg_data->uuidProjectClsId, in);
  com_reg_data->dwTlbLcid = read_uint32(in);
  com_reg_data->wUnknown = read_uint16(in);
  com_reg_data->wTlbVerMajor = read_uint16(in);
  com_reg_data->wTlbVerMinor = read_uint16(in);

  fseek(in, marker, SEEK_SET);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x30f0
movq %rax, %r15
movslq %ebp, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3100
movq %rbx, %rdi
callq 0x51ca
movl %eax, (%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x4(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x8(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0xc(%r14)
leaq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x3b44
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x20(%r14)
movq %rbx, %rdi
callq 0x520c
movw %ax, 0x24(%r14)
movq %rbx, %rdi
callq 0x520c
movw %ax, 0x26(%r14)
movq %rbx, %rdi
callq 0x520c
movw %ax, 0x28(%r14)
movslq %r15d, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3100
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mikeakohn[P]print_pe/build/../src/com.c
// Function: com_reg_data_print
int com_reg_data_print(struct com_reg_data_t *com_reg_data)
{
  printf("  -- COM Reg Data --\n");
  printf("          bRegInfo: %d\n", com_reg_data->bRegInfo);
  printf("    bSZProjectName: %d\n", com_reg_data->bSZProjectName);
  printf("  bSZHelpDirectory: %d\n", com_reg_data->bSZHelpDirectory);
  printf("bSZProjectDescrptn: %d\n", com_reg_data->bSZProjectDescription);
  printf("  uuidProjectClsId: ");
  clsid_print(com_reg_data->uuidProjectClsId);
  printf("\n");
  printf("         dwTlbLcid: %d\n", com_reg_data->dwTlbLcid);
  printf("          wUnknown: %d\n", com_reg_data->wUnknown);
  printf("      wTlbVerMajor: %d\n", com_reg_data->wTlbVerMajor);
  printf("      wTlbVerMinor: %d\n", com_reg_data->wTlbVerMinor);
  printf("\n");

  return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x4d71(%rip), %rdi      # 0x8c69
callq 0x3060
movl (%rbx), %esi
leaq 0x4c79(%rip), %rdi      # 0x8b7f
xorl %eax, %eax
callq 0x3090
movl 0x4(%rbx), %esi
leaq 0x4c80(%rip), %rdi      # 0x8b97
xorl %eax, %eax
callq 0x3090
movl 0x8(%rbx), %esi
leaq 0x4c87(%rip), %rdi      # 0x8baf
xorl %eax, %eax
callq 0x3090
movl 0xc(%rbx), %esi
leaq 0x4c8e(%rip), %rdi      # 0x8bc7
xorl %eax, %eax
callq 0x3090
leaq 0x4c98(%rip), %rdi      # 0x8bdf
xorl %eax, %eax
callq 0x3090
leaq 0x10(%rbx), %rdi
callq 0x3b84
movl $0xa, %edi
callq 0x3030
movl 0x20(%rbx), %esi
leaq 0x4c89(%rip), %rdi      # 0x8bf4
xorl %eax, %eax
callq 0x3090
movzwl 0x24(%rbx), %esi
leaq 0x4c8f(%rip), %rdi      # 0x8c0c
xorl %eax, %eax
callq 0x3090
movzwl 0x26(%rbx), %esi
leaq 0x4c95(%rip), %rdi      # 0x8c24
xorl %eax, %eax
callq 0x3090
movzwl 0x28(%rbx), %esi
leaq 0x4c9b(%rip), %rdi      # 0x8c3c
xorl %eax, %eax
callq 0x3090
movl $0xa, %edi
callq 0x3030
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mikeakohn[P]print_pe/build/../src/dos.c
// Function: read_dos_header
int read_dos_header(FILE *in, struct dos_header_t *dos_header)
{
  dos_header->e_magic = read_uint16(in);
  dos_header->e_cblp = read_uint16(in);
  dos_header->e_cp = read_uint16(in);
  dos_header->e_crlc = read_uint16(in);
  dos_header->e_cparhdr = read_uint16(in);
  dos_header->e_minalloc = read_uint16(in);
  dos_header->e_maxalloc = read_uint16(in);
  dos_header->e_ss = read_uint16(in);
  dos_header->e_sp = read_uint16(in);
  dos_header->e_csum = read_uint16(in);
  dos_header->e_ip = read_uint16(in);
  dos_header->e_cs = read_uint16(in);
  dos_header->e_lfarlc = read_uint16(in);
  dos_header->e_ovno = read_uint16(in);
  read_chars_bin(in, dos_header->e_res, 8);
  dos_header->e_oemid = read_uint16(in);
  dos_header->e_oeminfo = read_uint16(in);
  read_chars_bin(in, dos_header->e_res2, 20);
  dos_header->e_lfanew = read_uint32(in);

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x520c
movw %ax, (%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0x2(%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0x4(%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0x6(%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0x8(%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0xa(%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0xc(%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0xe(%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0x10(%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0x12(%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0x14(%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0x16(%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0x18(%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0x1a(%rbx)
leaq 0x1c(%rbx), %rsi
movq %r14, %rdi
movl $0x8, %edx
callq 0x5276
movq %r14, %rdi
callq 0x520c
movw %ax, 0x24(%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0x26(%rbx)
leaq 0x28(%rbx), %rsi
movq %r14, %rdi
movl $0x14, %edx
callq 0x5276
movq %r14, %rdi
callq 0x51ca
movl %eax, 0x3c(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mikeakohn[P]print_pe/build/../src/file_header.c
// Function: file_header_read
int file_header_read(struct file_header_t *file_header, FILE *in)
{
  file_header->Machine = read_uint16(in);
  file_header->NumberOfSections = read_uint16(in);
  file_header->TimeDateStamp = read_uint32(in);
  file_header->PointerToSymbolTable = read_uint32(in);
  file_header->NumberOfSymbols = read_uint32(in);
  file_header->SizeOfOptionalHeader = read_uint16(in);
  file_header->Characteristics = read_uint16(in);

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x520c
movw %ax, (%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0x2(%rbx)
movq %r14, %rdi
callq 0x51ca
movl %eax, 0x4(%rbx)
movq %r14, %rdi
callq 0x51ca
movl %eax, 0x8(%rbx)
movq %r14, %rdi
callq 0x51ca
movl %eax, 0xc(%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0x10(%rbx)
movq %r14, %rdi
callq 0x520c
movw %ax, 0x12(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mikeakohn[P]print_pe/build/../src/imports.c
// Function: import_dir_read
static int import_dir_read(struct import_dir_t *import_dir, FILE *in)
{
  import_dir->FunctionNameList = read_uint32(in);
  import_dir->TimeDateStamp = read_uint32(in);
  import_dir->ForwardChain = read_uint32(in);
  import_dir->ModuleName = read_uint32(in);
  import_dir->FunctionAddressList = read_uint32(in);

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x51ca
movl %eax, (%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x4(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x8(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0xc(%r14)
movq %rbx, %rdi
callq 0x51ca
movl %eax, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mikeakohn[P]print_pe/build/../src/imports.c
// Function: imports_find
int imports_find(
  FILE *in,
  int address,
  int size,
  int address_size,
  struct section_header_t *section_header,
  const char *search_name)
{
  struct import_dir_t import_dir;
  char name[1024];
  long marker;
  int total_size;
  uint32_t virtual_address, raw_ptr;
  int func_addr;
  int t, ptr;

  virtual_address = section_header->VirtualAddress;
  raw_ptr = section_header->PointerToRawData;

  address = (address - virtual_address) + raw_ptr;

  marker = ftell(in);
  fseek(in, address, SEEK_SET);

  total_size = 0;

  while (total_size < size)
  {
    import_dir_read(&import_dir, in);

    if (import_dir.FunctionNameList == 0) { break; }

    t = 0;

    while (1)
    {
      func_addr = get_ptr(in, (import_dir.FunctionAddressList - virtual_address) + raw_ptr + t);

      if (func_addr == 0) { break; }

      ptr = get_ptr(in, (import_dir.FunctionNameList - virtual_address) + raw_ptr + t);
      get_string(in, name, (ptr - virtual_address) + raw_ptr + 2);

      if (strcmp(name, search_name) == 0)
      {
        fseek(in, marker, SEEK_SET);
        return 1;
      }

      t = t + address_size;
    }

    total_size = total_size + sizeof(import_dir);
  }

  fseek(in, marker, SEEK_SET);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x448, %rsp            # imm = 0x448
movq %r9, 0x20(%rsp)
movl %ecx, %ebp
movl %edx, %r13d
movl %esi, %r15d
movq %rdi, %rbx
movl 0x10(%r8), %eax
movl 0x18(%r8), %r12d
movl %eax, 0x4(%rsp)
subl %eax, %r15d
addl %r12d, %r15d
callq 0x30f0
movq %rax, %r14
movslq %r15d, %rsi
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3100
movl %r13d, 0x14(%rsp)
testl %r13d, %r13d
jle 0x57d4
movq %r14, 0x8(%rsp)
movl %r12d, %eax
movl 0x4(%rsp), %ecx
subl %ecx, %eax
movq %rax, 0x18(%rsp)
leal 0x2(%rax), %r14d
addl %ebp, %r12d
subl %ecx, %r12d
leaq 0x2c(%rsp), %rdi
leaq 0x40(%rsp), %r15
xorl %eax, %eax
movl %r12d, 0x10(%rsp)
movl %eax, 0x4(%rsp)
movq %rbx, %rsi
callq 0x565b
movl 0x2c(%rsp), %r12d
testl %r12d, %r12d
je 0x57bf
movl 0x3c(%rsp), %r13d
movq 0x18(%rsp), %rax
leal (%rax,%r13), %esi
movq %rbx, %rdi
callq 0x53e0
testl %eax, %eax
je 0x57a9
addl 0x18(%rsp), %r12d
addl 0x10(%rsp), %r13d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x53e0
leal (%rax,%r14), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x536d
movq %r15, %rdi
movq 0x20(%rsp), %rsi
callq 0x30c0
testl %eax, %eax
je 0x57c9
movq %rbx, %rdi
movl %r13d, %esi
callq 0x53e0
addl %ebp, %r12d
addl %ebp, %r13d
testl %eax, %eax
jne 0x5769
movl 0x4(%rsp), %eax
addl $0x14, %eax
cmpl 0x14(%rsp), %eax
leaq 0x2c(%rsp), %rdi
jl 0x572f
movq 0x8(%rsp), %r14
xorl %r15d, %r15d
jmp 0x57d4
movl $0x1, %r15d
movq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3100
movl %r15d, %eax
addq $0x448, %rsp            # imm = 0x448
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop