LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/AndreIglesias[P]quick_ls/libft/libstd/depo/.././src//c/stdio/ft_printf/caster.c
// Function: flags_uoxx
uintmax_t	flags_uoxx(t_flags flags, va_list ap)
{
	uintmax_t	x;

	if (flags.l)
		return (va_arg(ap, unsigned long int));
	else if (flags.ll)
		return (va_arg(ap, unsigned long long int));
	else
		x = (va_arg(ap, unsigned int));
	if (flags.hh)
		x = (unsigned char)x;
	else if (flags.h)
		x = (unsigned short int)x;
	return (x);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq %rdi, -0x10(%rbp)
cmpl $0x0, 0x24(%rax)
je 0x6eb8
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl (%rax), %eax
movl %eax, -0x24(%rbp)
cmpl $0x28, %eax
ja 0x6e91
movq -0x30(%rbp), %rcx
movl -0x24(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x38(%rbp)
jmp 0x6ea8
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x6f98
movq -0x20(%rbp), %rax
cmpl $0x0, 0x28(%rax)
je 0x6f14
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x28, %eax
ja 0x6eed
movq -0x48(%rbp), %rcx
movl -0x3c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x50(%rbp)
jmp 0x6f04
movq -0x48(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x6f98
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movl (%rax), %eax
movl %eax, -0x54(%rbp)
cmpl $0x28, %eax
ja 0x6f3f
movq -0x60(%rbp), %rcx
movl -0x54(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x68(%rbp)
jmp 0x6f56
movq -0x60(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
jmp 0x6f62
movq -0x20(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
je 0x6f79
movq -0x18(%rbp), %rax
movzbl %al, %eax
movq %rax, -0x18(%rbp)
jmp 0x6f90
movq -0x20(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x6f8e
movq -0x18(%rbp), %rax
movzwl %ax, %eax
movq %rax, -0x18(%rbp)
jmp 0x6f90
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/AndreIglesias[P]quick_ls/libft/libstring/depo/.././src//c/allocate/ft_strjoin.c
// Function: ft_strjoin
char	*ft_strjoin(char const *s1, char const *s2)
{
	char	*str;
	int		l1;
	int		l2;
	int		i;

	if (s1 && s2)
	{
		l1 = ft_strlen(s1);
		l2 = ft_strlen(s2);
		str = ft_strnew(l1 + l2);
		if (!str)
			return (NULL);
		i = 0;
		while (i < l1 + l2)
		{
			if (i < l1)
				str[i] = s1[i];
			else
				str[i] = s2[i - l1];
			i++;
		}
		str[i] = '\0';
		return (str);
	}
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x70b1
cmpq $0x0, -0x18(%rbp)
je 0x70b1
movq -0x10(%rbp), %rdi
callq 0x6fa0
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6fa0
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
addl -0x28(%rbp), %eax
movslq %eax, %rdi
callq 0x70d0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7041
movq $0x0, -0x8(%rbp)
jmp 0x70b9
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl -0x24(%rbp), %ecx
addl -0x28(%rbp), %ecx
cmpl %ecx, %eax
jge 0x709b
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x7075
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x7090
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl -0x24(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %dl
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7048
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x70b9
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/AndreIglesias[P]quick_ls/libft/libstring/depo/.././src//c/allocate/ft_strnew.c
// Function: ft_strnew
char	*ft_strnew(size_t size)
{
	char			*fresh;
	unsigned int	i;

	i = 0;
	fresh = (char *)malloc(sizeof(char) * (size + 1));
	if (!fresh)
		return (NULL);
	while (i <= size)
		fresh[i++] = '\0';
	return (fresh);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq 0x1100
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x7109
movq $0x0, -0x8(%rbp)
jmp 0x7133
jmp 0x710b
movl -0x1c(%rbp), %eax
cmpq -0x10(%rbp), %rax
ja 0x712b
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
jmp 0x710b
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/AndreIglesias[P]quick_ls/libft/libstring/depo/.././src//c/allocate/strins.c
// Function: strins
void	strins(char array[][256], char *str, size_t pos, size_t size)
{
	long	last;

	if (size == 0)
	{
		element_copy(array, pos, str);
		return ;
	}
	last = (long)size;
	last--;
	while (4 <= (last - (long)pos) && 0 <= (last - (long)pos))
	{
		element_copy(array, last + 1, array[last]);
		element_copy(array, last, array[last - 1]);
		element_copy(array, last - 1, array[last - 2]);
		element_copy(array, last - 2, array[last - 3]);
		last -= 4;
	}
	while ((long)pos <= last && 0 <= last)
	{
		element_copy(array, last + 1, array[last]);
		last--;
	}
	element_copy(array, pos, str);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7175
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x72d0
jmp 0x72bd
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdx
subq -0x18(%rbp), %rdx
xorl %eax, %eax
movl $0x4, %ecx
cmpq %rdx, %rcx
movb %al, -0x29(%rbp)
jg 0x71b3
movq -0x28(%rbp), %rcx
subq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq %rcx, %rax
setle %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x71bf
jmp 0x7258
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x1, %rsi
movq -0x8(%rbp), %rdx
movq -0x28(%rbp), %rax
shlq $0x8, %rax
addq %rax, %rdx
callq 0x72d0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x28(%rbp), %rax
subq $0x1, %rax
shlq $0x8, %rax
addq %rax, %rdx
callq 0x72d0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
subq $0x1, %rsi
movq -0x8(%rbp), %rdx
movq -0x28(%rbp), %rax
subq $0x2, %rax
shlq $0x8, %rax
addq %rax, %rdx
callq 0x72d0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
subq $0x2, %rsi
movq -0x8(%rbp), %rdx
movq -0x28(%rbp), %rax
subq $0x3, %rax
shlq $0x8, %rax
addq %rax, %rdx
callq 0x72d0
movq -0x28(%rbp), %rax
subq $0x4, %rax
movq %rax, -0x28(%rbp)
jmp 0x7189
jmp 0x725a
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x2a(%rbp)
jg 0x7275
xorl %eax, %eax
cmpq -0x28(%rbp), %rax
setle %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0x727e
jmp 0x72ac
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x1, %rsi
movq -0x8(%rbp), %rdx
movq -0x28(%rbp), %rax
shlq $0x8, %rax
addq %rax, %rdx
callq 0x72d0
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x725a
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x72d0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AndreIglesias[P]quick_ls/libft/libstring/depo/.././src//c/allocated/ft_countchr.c
// Function: ft_countchr
int	ft_countchr(const char *s, int c)
{
	int	i;
	int	q;

	i = 0;
	q = 0;
	while (s[i])
	{
		if (s[i] == (char)c)
			q++;
		i++;
	}
	return (q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x7371
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl -0xc(%rbp), %ecx
movsbl %cl, %ecx
cmpl %ecx, %eax
jne 0x7366
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x7339
movl -0x14(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AndreIglesias[P]quick_ls/libft/libstring/depo/.././src//c/allocated/ft_strcat.c
// Function: ft_strcat
char	*ft_strcat(char *restrict s1, const char *restrict s2)
{
	unsigned int	i;
	unsigned int	j;

	i = 0;
	while (s1[i])
		i++;
	j = 0;
	while (s2[j])
		s1[i++] = s2[j++];
	s1[i] = '\0';
	return (s1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
je 0x73ab
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7393
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
je 0x73e9
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x18(%rbp)
movl %ecx, %ecx
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x14(%rbp)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
jmp 0x73b2
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x0, (%rax,%rcx)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AndreIglesias[P]quick_ls/libft/libstring/depo/.././src//c/allocated/ft_memset.c
// Function: ft_memset
void	*ft_memset(void *dstpp, int c, size_t len)
{
	long int	dstp;
	t_u_long	cccc;

	dstp = (long int) dstpp;
	if (len >= 8)
	{
		cccc = (unsigned char) c;
		cccc |= cccc << 8;
		cccc |= cccc << 16;
		if ((sizeof(t_u_long)) > 4)
			cccc |= (cccc << 16) << 16;
		while (dstp % (sizeof(t_u_long)) != 0)
		{
			((t_byte *)dstp)[0] = c;
			dstp += 1;
			len -= 1;
		}
		bwritex(len, &dstp, cccc);
		len = bwrite(len, &dstp, cccc);
	}
	blast_bytes(len, &dstp, c);
	return (dstpp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x8, -0x18(%rbp)
jb 0x74bd
movl -0xc(%rbp), %eax
movzbl %al, %eax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x8, %rax
orq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x10, %rax
orq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
shlq $0x10, %rax
shlq $0x10, %rax
orq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
andq $0x7, %rax
cmpq $0x0, %rax
je 0x7497
movl -0xc(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x7464
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq -0x20(%rbp), %rsi
callq 0x74e0
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq -0x20(%rbp), %rsi
callq 0x75a0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq -0x20(%rbp), %rsi
callq 0x7610
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AndreIglesias[P]quick_ls/libft/libstring/depo/.././src//c/allocated/ft_memset.c
// Function: bwritex
static void	bwritex(size_t len, long int *dstp, t_u_long cccc)
{
	size_t	xlen;

	xlen = len / ((sizeof(t_u_long)) * 8);
	while (xlen > 0)
	{
		((t_u_long *)(*dstp))[0] = cccc;
		((t_u_long *)(*dstp))[1] = cccc;
		((t_u_long *)(*dstp))[2] = cccc;
		((t_u_long *)(*dstp))[3] = cccc;
		((t_u_long *)(*dstp))[4] = cccc;
		((t_u_long *)(*dstp))[5] = cccc;
		((t_u_long *)(*dstp))[6] = cccc;
		((t_u_long *)(*dstp))[7] = cccc;
		(*dstp) += 8 * (sizeof(t_u_long));
		xlen -= 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x759d
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x40, %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x74fc
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/AndreIglesias[P]quick_ls/libft/libstring/depo/.././src//c/allocated/ft_memset.c
// Function: bwrite
static size_t	bwrite(size_t len, long int *dstp, t_u_long cccc)
{
	size_t	xlen;

	len %= (sizeof(t_u_long)) * 8;
	xlen = len / (sizeof(t_u_long));
	while (xlen > 0)
	{
		((t_u_long *)(*dstp))[0] = cccc;
		(*dstp) += (sizeof(t_u_long));
		xlen -= 1;
	}
	len %= (sizeof(t_u_long));
	return (len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
andq $0x3f, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
shrq $0x3, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x75f9
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x8, %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x75c8
movq -0x8(%rbp), %rax
andq $0x7, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/AndreIglesias[P]quick_ls/libft/libstring/depo/.././src//c/allocated/ft_memset.c
// Function: blast_bytes
static void	blast_bytes(size_t len, long int *dstp, int c)
{
	while (len > 0)
	{
		((t_byte *)(*dstp))[0] = c;
		dstp += 1;
		len -= 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
cmpq $0x0, -0x8(%rbp)
jbe 0x764e
movl -0x14(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x761f
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/AndreIglesias[P]quick_ls/libft/libstring/depo/.././src//c/eqasm/ft_strcpy.c
// Function: ft_strcpy
char	*ft_strcpy(char *dst, const char *src)
{
	int	i;

	i = 0;
	while (src[i])
	{
		dst[i] = src[i];
		i++;
	}
	dst[i] = '\0';
	return (dst);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x76c2
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7693
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x8(%rbp), %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/dkr_decompressor.cpp
// Function: printHelp()
void printHelp()
{
    std::cout 
    << "---- Usage ----" << std::endl
    << " Compress file: ./dkr_decompressor -c <input_filename> <output_filename>" << std::endl
    << " Decompress file: ./dkr_decompressor -d <input_filename> <output_filename>" << std::endl
    << " Decompress section from a ROM file: ./dkr_decompressor -r <rom_filename> <output_filename> <rom_offset> <length>" << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xda85(%rip), %rdi      # 0xffd0
leaq 0x9ab2(%rip), %rsi      # 0xc004
callq 0x21c0
movq %rax, %rdi
movq 0xda5f(%rip), %rsi      # 0xffc0
callq 0x21f0
movq %rax, %rdi
leaq 0x9aa4(%rip), %rsi      # 0xc014
callq 0x21c0
movq %rax, %rdi
movq 0xda41(%rip), %rsi      # 0xffc0
callq 0x21f0
movq %rax, %rdi
leaq 0x9acf(%rip), %rsi      # 0xc05d
callq 0x21c0
movq %rax, %rdi
movq 0xda23(%rip), %rsi      # 0xffc0
callq 0x21f0
movq %rax, %rdi
leaq 0x9afc(%rip), %rsi      # 0xc0a8
callq 0x21c0
movq %rax, %rdi
movq 0xda05(%rip), %rsi      # 0xffc0
callq 0x21f0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/DKRCompression.cpp
// Function: DKRCompression::decompressBuffer(std::vector<unsigned char, std::allocator<unsigned char>>)
std::vector<uint8_t> DKRCompression::decompressBuffer(std::vector<uint8_t> data) 
{
    compressed.SetCompressedBuffer(&data[0], data.size());
    
    int fileSize = 0, fileSizeCompressed = 0;
    uint8_t* decompressed = compressed.OutputDecompressedBuffer(fileSize, fileSizeCompressed);
    
    std::vector<uint8_t> out(decompressed, decompressed + fileSize);
    
    delete[] decompressed;
    
    return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdx, -0x78(%rbp)
movq %rdi, %rax
movq -0x78(%rbp), %rdi
movq %rax, -0x60(%rbp)
movq %rax, %rcx
movq %rcx, -0x80(%rbp)
movq %rax, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x4f30
movq -0x78(%rbp), %rdi
movq %rax, -0x70(%rbp)
callq 0x3970
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdi
movl %eax, %edx
callq 0x6390
movq -0x68(%rbp), %rdi
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
leaq -0x1c(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x6600
movq %rax, -0x28(%rbp)
movb $0x0, -0x29(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movslq -0x1c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
leaq -0x2a(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x3290
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x4f50
jmp 0x4ac8
leaq -0x2a(%rbp), %rdi
callq 0x3330
movq -0x28(%rbp), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, %rax
je 0x4aee
movq -0x88(%rbp), %rdi
callq 0x2280
movb $0x1, -0x29(%rbp)
testb $0x1, -0x29(%rbp)
jne 0x4b1a
jmp 0x4b11
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x2a(%rbp), %rdi
callq 0x3330
jmp 0x4b27
movq -0x60(%rbp), %rdi
callq 0x3180
movq -0x80(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x2340
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/DKRCompression.cpp
// Function: DKRCompression::writeBinaryFile(std::vector<unsigned char, std::allocator<unsigned char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool DKRCompression::writeBinaryFile(std::vector<uint8_t>& output, std::string filename)
{
    try 
    {
        std::ofstream wf(filename.c_str(), std::ios::out | std::ios::binary);
        for(int i = 0; i < output.size(); i++)
            wf.write((char *)&output[i], 1);
        wf.close();
    } 
    catch (int e)
    {
        return false;
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rdx, -0x248(%rbp)
movq %rdi, %rax
movq -0x248(%rbp), %rdi
movq %rax, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdi, -0x20(%rbp)
callq 0x20c0
movq %rax, -0x240(%rbp)
movl $0x10, %edi
movl $0x4, %esi
callq 0x5080
movl %eax, -0x238(%rbp)
jmp 0x4b7b
movl -0x238(%rbp), %edx
movq -0x240(%rbp), %rsi
leaq -0x220(%rbp), %rdi
callq 0x2220
jmp 0x4b96
movl $0x0, -0x230(%rbp)
movslq -0x230(%rbp), %rax
movq %rax, -0x250(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3970
movq %rax, %rcx
movq -0x250(%rbp), %rax
cmpq %rcx, %rax
jae 0x4c63
movq -0x18(%rbp), %rdi
movslq -0x230(%rbp), %rsi
callq 0x4f30
movq %rax, %rsi
leaq -0x220(%rbp), %rdi
movl $0x1, %edx
callq 0x2290
jmp 0x4bf0
jmp 0x4bf2
movl -0x230(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x230(%rbp)
jmp 0x4ba0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
jmp 0x4c35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x22f0
movl -0x22c(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x4c8f
movq -0x228(%rbp), %rdi
callq 0x20b0
movl (%rax), %eax
movl %eax, -0x234(%rbp)
movb $0x0, -0x1(%rbp)
callq 0x2320
jmp 0x4c81
leaq -0x220(%rbp), %rdi
callq 0x22c0
jmp 0x4c71
leaq -0x220(%rbp), %rdi
callq 0x22f0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
movq -0x228(%rbp), %rdi
callq 0x2340
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/DKRCompression.cpp
// Function: DKRCompression::readBinaryFile(std::vector<unsigned char, std::allocator<unsigned char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool DKRCompression::readBinaryFile(std::vector<uint8_t>& input, std::string filename)
{
    try 
    {
        std::ifstream is;
        is.open(filename.c_str(), std::ios::binary);
        is.seekg(0, std::ios::end);
        size_t filesize = is.tellg();
        is.seekg(0, std::ios::beg);
        input.resize(filesize);
        is.read((char *)input.data(), filesize);
    } 
    catch (int e)
    {
        return false;
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movq %rdx, -0x260(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x2250
jmp 0x4ccc
movq -0x260(%rbp), %rdi
callq 0x20c0
movq %rax, %rsi
leaq -0x228(%rbp), %rdi
movl $0x4, %edx
callq 0x2130
jmp 0x4cee
xorl %eax, %eax
movl %eax, %esi
leaq -0x228(%rbp), %rdi
movl $0x2, %edx
callq 0x22a0
jmp 0x4d05
leaq -0x228(%rbp), %rdi
callq 0x2330
movq %rdx, -0x270(%rbp)
movq %rax, -0x268(%rbp)
jmp 0x4d21
movq -0x270(%rbp), %rax
movq -0x268(%rbp), %rcx
movq %rcx, -0x250(%rbp)
movq %rax, -0x248(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x50a0
movq %rax, -0x278(%rbp)
jmp 0x4d52
movq -0x278(%rbp), %rax
movq %rax, -0x240(%rbp)
xorl %edx, %edx
movl %edx, %esi
leaq -0x228(%rbp), %rdi
callq 0x22a0
jmp 0x4d72
movq -0x18(%rbp), %rdi
movq -0x240(%rbp), %rsi
callq 0x50c0
jmp 0x4d84
movq -0x18(%rbp), %rdi
callq 0x5150
movq %rax, %rsi
movq -0x240(%rbp), %rdx
leaq -0x228(%rbp), %rdi
callq 0x2270
jmp 0x4da5
leaq -0x228(%rbp), %rdi
callq 0x2070
jmp 0x4e13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x230(%rbp)
movl %eax, -0x234(%rbp)
jmp 0x4de5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x230(%rbp)
movl %eax, -0x234(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x2070
movl -0x234(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x4e25
movq -0x230(%rbp), %rdi
callq 0x20b0
movl (%rax), %eax
movl %eax, -0x254(%rbp)
movb $0x0, -0x1(%rbp)
callq 0x2320
jmp 0x4e17
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
movq -0x230(%rbp), %rdi
callq 0x2340
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/GECompression.cpp
// Function: GECompression::GECompression()
GECompression::GECompression()
{
//	inputBuffer = NULL;
	compressedBuffer = NULL;
//	inputBufferSize = 0;
	compressedBufferSize = 0;
	wordTable = NULL;
	unpackTable = NULL;
	game = GOLDENEYE;

	unpackTable = new tableEntry[0xFFFF];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
addq $0x8, %rdi
movq %rdi, -0x30(%rbp)
callq 0x22b0
movq -0x28(%rbp), %rax
movq $0x0, 0x50(%rax)
movl $0x0, 0x58(%rax)
movq $0x0, 0x78(%rax)
movq $0x0, 0x28(%rax)
movl $0x0, (%rax)
movl $0x17ffe8, %edi         # imm = 0x17FFE8
callq 0x2030
movq %rax, -0x20(%rbp)
jmp 0x627a
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x28(%rax)
addq $0x30, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x2120
movq -0x10(%rbp), %rdi
callq 0x2340
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/GECompression.cpp
// Function: GECompression::~GECompression()
GECompression::~GECompression(void)
{
	if (unpackTable != NULL)
	{
		delete [] unpackTable;
		unpackTable = NULL;
	}
	if (wordTable != NULL)
	{
		delete [] wordTable;
		wordTable = NULL;
	}
	if (compressedBuffer != NULL)
	{
		delete [] compressedBuffer;
		compressedBuffer = NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, 0x28(%rax)
je 0x62f2
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x62e6
movq -0x18(%rbp), %rdi
callq 0x2280
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x6324
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x6318
movq -0x20(%rbp), %rdi
callq 0x2280
movq -0x10(%rbp), %rax
movq $0x0, 0x78(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x6356
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x634a
movq -0x28(%rbp), %rdi
callq 0x2280
movq -0x10(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x2120
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/GECompression.cpp
// Function: GECompression::SetCompressedBuffer(unsigned char*, int)
void GECompression::SetCompressedBuffer(unsigned char* Buffer, int bufferSize)
{
	if (compressedBuffer == NULL)
	{
		compressedBuffer = new unsigned char[bufferSize];
	}
	else
	{
		delete [] compressedBuffer;
		compressedBuffer = new unsigned char[bufferSize];
	}

	for (int x = 0; x < bufferSize; x++)
	{
		compressedBuffer[x] = Buffer[x];
	}

	compressedBufferSize = bufferSize;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, 0x50(%rax)
jne 0x63c8
movslq -0x14(%rbp), %rdi
callq 0x2030
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x50(%rax)
jmp 0x63f7
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x63e3
movq -0x28(%rbp), %rdi
callq 0x2280
movslq -0x14(%rbp), %rdi
callq 0x2030
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x50(%rax)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x642b
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq -0x18(%rbp), %rdx
movb (%rcx,%rdx), %dl
movq 0x50(%rax), %rax
movslq -0x18(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x63fe
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, 0x58(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/GECompression.cpp
// Function: GECompression::GetNBits(int)
unsigned long GECompression::GetNBits(int nBits)
{
	while (bitsRemain < nBits)
	{
		if (bytesIndex >= maxByteSize)
			return 0; // bad decompression
		if (bytesIndex >= compressedBufferSize)
			return 0; // bad decompression
		bitsCache = ((bitsCache) | (compressedBuffer[bytesIndex] << bitsRemain));
		bitsRemain = bitsRemain + 8;
		bytesIndex++;
	}

	unsigned long result = (bitsCache & ((1 << nBits)-1));
	bitsCache = bitsCache >> nBits;
	bitsRemain = bitsRemain - nBits;
	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x40(%rax), %eax
cmpl -0x14(%rbp), %eax
jge 0x64dd
movq -0x28(%rbp), %rax
cmpq $0x800000, 0x48(%rax)   # imm = 0x800000
jb 0x647a
movq $0x0, -0x8(%rbp)
jmp 0x6526
movq -0x28(%rbp), %rcx
movq 0x48(%rcx), %rax
movslq 0x58(%rcx), %rcx
cmpq %rcx, %rax
jb 0x6498
movq $0x0, -0x8(%rbp)
jmp 0x6526
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x50(%rax), %rcx
movq 0x48(%rax), %rdx
movzbl (%rcx,%rdx), %edx
movl 0x40(%rax), %ecx
shll %cl, %edx
movq -0x30(%rbp), %rcx
movslq %edx, %rdx
orq %rdx, %rcx
movq %rcx, 0x38(%rax)
movl 0x40(%rax), %ecx
addl $0x8, %ecx
movl %ecx, 0x40(%rax)
movq 0x48(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x48(%rax)
jmp 0x6453
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x38(%rbp)
movl -0x14(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movq -0x38(%rbp), %rcx
subl $0x1, %edx
movslq %edx, %rdx
andq %rdx, %rcx
movq %rcx, -0x20(%rbp)
movq 0x38(%rax), %rdx
movl -0x14(%rbp), %ecx
shrq %cl, %rdx
movq %rdx, %rcx
movq %rcx, 0x38(%rax)
movl 0x40(%rax), %ecx
subl -0x14(%rbp), %ecx
movl %ecx, 0x40(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/GECompression.cpp
// Function: GECompression::GetNBitsAndPreserve(int)
unsigned long GECompression::GetNBitsAndPreserve(int nBits)
{
	while (bitsRemain < nBits)
	{
		if (bytesIndex >= maxByteSize)
			return 0; // bad decompression
		if (bytesIndex >= compressedBufferSize)
			return 0; // bad decompression
		bitsCache = ((bitsCache) | (compressedBuffer[bytesIndex] << bitsRemain));
		bitsRemain = bitsRemain + 8;
		bytesIndex++;
	}

	unsigned long result = (bitsCache & ((1 << nBits)-1));
	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x40(%rax), %eax
cmpl -0x14(%rbp), %eax
jge 0x65ca
movq -0x28(%rbp), %rax
cmpq $0x800000, 0x48(%rax)   # imm = 0x800000
jb 0x656a
movq $0x0, -0x8(%rbp)
jmp 0x65f3
movq -0x28(%rbp), %rcx
movq 0x48(%rcx), %rax
movslq 0x58(%rcx), %rcx
cmpq %rcx, %rax
jb 0x6585
movq $0x0, -0x8(%rbp)
jmp 0x65f3
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x50(%rax), %rcx
movq 0x48(%rax), %rdx
movzbl (%rcx,%rdx), %edx
movl 0x40(%rax), %ecx
shll %cl, %edx
movq -0x30(%rbp), %rcx
movslq %edx, %rdx
orq %rdx, %rcx
movq %rcx, 0x38(%rax)
movl 0x40(%rax), %ecx
addl $0x8, %ecx
movl %ecx, 0x40(%rax)
movq 0x48(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x48(%rax)
jmp 0x6543
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movl -0x14(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
andq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/GECompression.cpp
// Function: GECompression::UncompressType0(unsigned char*, int&)
bool GECompression::UncompressType0(unsigned char* returnBuffer, int& fileSize)
{
	// discard bits

	unsigned long discardBits = bitsRemain & 0x7;
	GetNBits(discardBits); // discard begins

	unsigned short copyLen = GetNBits(16);
	GetNBits(16); // discarded

	for (int x = 0; x < copyLen; x++)
	{
		if (fileSize >= maxByteSize)
		{
			fileSize = 0;
			return false;
		}
		returnBuffer[fileSize] = GetNBits(8);
		fileSize++;

		if (iterationCounter > 268435455)
		{
			fileSize = 0;
			return false;
		}
		iterationCounter++;
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movl 0x40(%rdi), %eax
andl $0x7, %eax
cltq
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl %eax, %esi
callq 0x6440
movq -0x38(%rbp), %rdi
movl $0x10, %esi
callq 0x6440
movq -0x38(%rbp), %rdi
movw %ax, -0x2a(%rbp)
movl $0x10, %esi
callq 0x6440
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movzwl -0x2a(%rbp), %ecx
cmpl %ecx, %eax
jge 0x6db8
movq -0x20(%rbp), %rax
cmpl $0x800000, (%rax)       # imm = 0x800000
jl 0x6d45
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movb $0x0, -0x1(%rbp)
jmp 0x6dbc
movq -0x38(%rbp), %rdi
movl $0x8, %esi
callq 0x6440
movq %rax, %rcx
movq -0x38(%rbp), %rax
movb %cl, %sil
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rdx
movslq (%rdx), %rdx
movb %sil, (%rcx,%rdx)
movq -0x20(%rbp), %rcx
movl (%rcx), %edx
addl $0x1, %edx
movl %edx, (%rcx)
cmpq $0xfffffff, 0x80(%rax) # imm = 0xFFFFFFF
jbe 0x6d94
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movb $0x0, -0x1(%rbp)
jmp 0x6dbc
movq -0x38(%rbp), %rax
movq 0x80(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x80(%rax)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x6d1a
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: put_int(int)
void put_int(int i) {
    outbuf[outcnt++] = i & 0xFF;
    outbuf[outcnt++] = (i >> 8) & 0xFF;
    outbuf[outcnt++] = (i >> 16) & 0xFF;
    outbuf[outcnt++] = (i >> 24) & 0xFF;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0xff, %eax
movb %al, %dl
movl 0x100b1f9(%rip), %eax   # 0x1013b70
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x100b1ee(%rip)   # 0x1013b70
movslq %eax, %rcx
leaq 0xb1e4(%rip), %rax      # 0x13b70
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %dl
movl 0x100b1ce(%rip), %eax   # 0x1013b70
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x100b1c3(%rip)   # 0x1013b70
movslq %eax, %rcx
leaq 0xb1b9(%rip), %rax      # 0x13b70
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
sarl $0x10, %eax
andl $0xff, %eax
movb %al, %dl
movl 0x100b1a3(%rip), %eax   # 0x1013b70
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x100b198(%rip)   # 0x1013b70
movslq %eax, %rcx
leaq 0xb18e(%rip), %rax      # 0x13b70
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
sarl $0x18, %eax
andl $0xff, %eax
movb %al, %dl
movl 0x100b178(%rip), %eax   # 0x1013b70
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x100b16d(%rip)   # 0x1013b70
movslq %eax, %rcx
leaq 0xb163(%rip), %rax      # 0x13b70
movb %dl, (%rax,%rcx)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: updcrc(char*, unsigned int)
u32 updcrc(char* bytes, u32 numBytes) {
    u32 c;

    static u32 crc = 0xffffffff;

    if (bytes == NULL) {
        c = 0xffffffff;
    } else {
        c = crc;
        if (numBytes) do {
            c = crc_32_tab[((int)c ^ (*bytes++)) & 0xff] ^ (c >> 8);
        } while (--numBytes);
    }
    crc = c;
    return c ^ 0xffffffff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x8a3b
movl $0xffffffff, -0x10(%rbp) # imm = 0xFFFFFFFF
jmp 0x8a92
movl 0x81a3(%rip), %eax      # 0x10be4
movl %eax, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x8a90
jmp 0x8a4c
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbl (%rcx), %ecx
xorl %ecx, %eax
andl $0xff, %eax
movslq %eax, %rcx
leaq 0x7d6e(%rip), %rax      # 0x107e0
movl (%rax,%rcx,4), %eax
movl -0x10(%rbp), %ecx
shrl $0x8, %ecx
xorl %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jne 0x8a4c
jmp 0x8a90
jmp 0x8a92
movl -0x10(%rbp), %eax
movl %eax, 0x8149(%rip)      # 0x10be4
movl -0x10(%rbp), %eax
xorl $-0x1, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: read_buf(char*, unsigned int)
int read_buf(char* buf, u32 size){
    u32 len;
    
    if(incnt + size >= inbufSize) {
        len = inbufSize - incnt;
    } else {
        len = size;
    }
    
    memcpy(buf, inbuf + incnt, len);

    crc = updcrc((char*)buf, len);
    incnt += (u32)len;
    return (int)len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl 0x100b0bf(%rip), %eax   # 0x1013b84
addl -0xc(%rbp), %eax
cmpl 0x100b0b2(%rip), %eax   # 0x1013b80
jb 0x8ae1
movl 0x100b0aa(%rip), %eax   # 0x1013b80
subl 0x100b0a8(%rip), %eax   # 0x1013b84
movl %eax, -0x10(%rbp)
jmp 0x8ae7
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq 0x100b086(%rip), %rsi   # 0x1013b78
movslq 0x100b08b(%rip), %rax   # 0x1013b84
addq %rax, %rsi
movl -0x10(%rbp), %eax
movl %eax, %edx
callq 0x2180
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x8a20
movl %eax, 0x100b078(%rip)   # 0x1013b90
movl -0x10(%rbp), %eax
addl 0x100b063(%rip), %eax   # 0x1013b84
movl %eax, 0x100b05d(%rip)   # 0x1013b84
movl -0x10(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: send_bits(int, int)
void send_bits(int value, int length){
    // printf("send_bits(%d, %d);\n", value, length);
    /* If not enough room in bi_buf, use (valid) bits from bi_buf and
     * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))
     * unused bits in value.
     */
    if (bi_valid > (int)Buf_size - length) {
        bi_buf |= (value << bi_valid);
        put_short(bi_buf);
        bi_buf = (u16)value >> (Buf_size - bi_valid);
        bi_valid += length - Buf_size;
    } else {
        bi_buf |= value << bi_valid;
        bi_valid += length;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl 0x7d54(%rip), %eax      # 0x10c38
movl $0x10, %ecx
subl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jle 0x8f51
movl -0x4(%rbp), %eax
movl 0x7d3f(%rip), %ecx      # 0x10c38
shll %cl, %eax
movl %eax, %ecx
movzwl 0x7d30(%rip), %eax      # 0x10c34
orl %ecx, %eax
movw %ax, 0x7d27(%rip)       # 0x10c34
movswl 0x7d20(%rip), %edi      # 0x10c34
callq 0x88f0
movl -0x4(%rbp), %eax
movzwl %ax, %eax
movslq 0x7d12(%rip), %rdx      # 0x10c38
movl $0x10, %ecx
subq %rdx, %rcx
sarl %cl, %eax
movw %ax, 0x7cfd(%rip)       # 0x10c34
movslq -0x8(%rbp), %rcx
subq $0x10, %rcx
movslq 0x7cf2(%rip), %rax      # 0x10c38
addq %rcx, %rax
movl %eax, 0x7ce9(%rip)      # 0x10c38
jmp 0x8f7d
movl -0x4(%rbp), %eax
movl 0x7cde(%rip), %ecx      # 0x10c38
shll %cl, %eax
movl %eax, %ecx
movzwl 0x7ccf(%rip), %eax      # 0x10c34
orl %ecx, %eax
movw %ax, 0x7cc6(%rip)       # 0x10c34
movl -0x8(%rbp), %eax
addl 0x7cc1(%rip), %eax      # 0x10c38
movl %eax, 0x7cbb(%rip)      # 0x10c38
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: gen_codes(ct_data*, int)
void gen_codes (ct_data* tree, int max_code) {
    u16 next_code[MAX_BITS+1]; /* next code value for each bit length */
    u16 code = 0;              /* running code value */
    int bits;                  /* bit index */
    int n;                     /* code index */

    /* The distribution counts are first used to generate the code values
     * without bit reversal.
     */
    for (bits = 1; bits <= MAX_BITS; bits++) {
        next_code[bits] = code = (code + bl_count[bits-1]) << 1;
    }
    /* Check that the bit counts in bl_count are consistent. The last code
     * must be all ones.
     */
    // Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1, "inconsistent bit counts");
    // Tracev((stderr,"\ngen_codes: max_code %d ", max_code));

    for (n = 0;  n <= max_code; n++) {
        int len = tree[n].Len;
        if (len == 0) continue;
        /* Now reverse the bits */
        tree[n].Code = bi_reverse(next_code[len]++, len);
        //Tracec(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ", n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movw $0x0, -0x32(%rbp)
movl $0x1, -0x38(%rbp)
cmpl $0xf, -0x38(%rbp)
jg 0x9039
movzwl -0x32(%rbp), %eax
movl -0x38(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rdx
leaq 0x8bca(%rip), %rcx      # 0x11be0
movzwl (%rcx,%rdx,2), %ecx
addl %ecx, %eax
shll %eax
movw %ax, %cx
movw %cx, -0x32(%rbp)
movslq -0x38(%rbp), %rax
movw %cx, -0x30(%rbp,%rax,2)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x8ffc
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jg 0x909a
movq -0x8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movzwl 0x2(%rax,%rcx,4), %eax
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jne 0x9060
jmp 0x908f
movslq -0x40(%rbp), %rcx
movw -0x30(%rbp,%rcx,2), %ax
movw %ax, %dx
addw $0x1, %dx
movw %dx, -0x30(%rbp,%rcx,2)
movzwl %ax, %edi
movl -0x40(%rbp), %esi
callq 0x8f90
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movw %dx, (%rax,%rcx,4)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x9040
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: init_block()
void init_block() {
    int n; /* iterates over tree elements */

    /* Initialize the trees. */
    for (n = 0; n < L_CODES;  n++) dyn_ltree[n].Freq = 0;
    for (n = 0; n < D_CODES;  n++) dyn_dtree[n].Freq = 0;
    for (n = 0; n < B_CODES; n++) bl_tree[n].Freq = 0;

    dyn_ltree[END_BLOCK].Freq = 1;
    opt_len = static_len = 0;
    last_lit = last_dist = last_flags = 0;
    flags = 0; 
    flag_bit = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, -0x4(%rbp)
cmpl $0x11e, -0x4(%rbp)      # imm = 0x11E
jge 0x90d0
movslq -0x4(%rbp), %rcx
leaq 0x7b81(%rip), %rax      # 0x10c40
movw $0x0, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x90ab
movl $0x0, -0x4(%rbp)
cmpl $0x1e, -0x4(%rbp)
jge 0x90f9
movslq -0x4(%rbp), %rcx
leaq 0x8458(%rip), %rax      # 0x11540
movw $0x0, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x90d7
movl $0x0, -0x4(%rbp)
cmpl $0x13, -0x4(%rbp)
jge 0x9122
movslq -0x4(%rbp), %rcx
leaq 0x8a2f(%rip), %rax      # 0x11b40
movw $0x0, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x9100
movw $0x1, 0x7f15(%rip)      # 0x11040
movl $0x0, 0xaa1f(%rip)      # 0x13b54
movl $0x0, 0xaa11(%rip)      # 0x13b50
movl $0x0, 0xa9ff(%rip)      # 0x13b48
movl $0x0, 0xa9f1(%rip)      # 0x13b44
movl $0x0, 0xa9e3(%rip)      # 0x13b40
movb $0x0, 0xa9e8(%rip)      # 0x13b4c
movb $0x1, 0xa9e2(%rip)      # 0x13b4d
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: build_bl_tree()
int build_bl_tree(){
    int max_blindex;  /* index of last bit length code of non zero freq */

    /* Determine the bit length frequencies for literal and distance trees */
    scan_tree((ct_data *)dyn_ltree, l_desc.max_code);
    scan_tree((ct_data *)dyn_dtree, d_desc.max_code);

    /* Build the bit length tree: */
    build_tree_1((tree_desc *)(&bl_desc));
    /* opt_len now includes the length of the tree representations, except
     * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
     */

    /* Determine the number of bit length codes to send. The pkzip format
     * requires that at least 4 bit length codes be sent. (appnote.txt says
     * 3 but the actual value used is 4.)
     */
    for (max_blindex = B_CODES-1; max_blindex >= 3; max_blindex--) {
        if (bl_tree[bl_order[max_blindex]].Len != 0) break;
    }
    /* Update opt_len to include the bit length tree and counts */
    opt_len += 3*(max_blindex+1) + 5+5+4;
    //Tracev((stderr, "\ndyn trees: dyn %lu, stat %lu", opt_len, static_len));

    return max_blindex;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl 0x68e6(%rip), %esi      # 0x10614
leaq 0x6f0b(%rip), %rdi      # 0x10c40
callq 0x9990
movl 0x68fc(%rip), %esi      # 0x1063c
leaq 0x77f9(%rip), %rdi      # 0x11540
callq 0x9990
leaq 0x68ed(%rip), %rdi      # 0x10640
callq 0x9660
movl $0x12, -0x4(%rbp)
cmpl $0x3, -0x4(%rbp)
jl 0x9d96
movslq -0x4(%rbp), %rcx
leaq 0x6900(%rip), %rax      # 0x10670
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x7dc3(%rip), %rax      # 0x11b40
movzwl 0x2(%rax,%rcx,4), %eax
cmpl $0x0, %eax
je 0x9d89
jmp 0x9d96
jmp 0x9d8b
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x9d5f
movl -0x4(%rbp), %eax
addl $0x1, %eax
imull $0x3, %eax, %eax
addl $0x5, %eax
addl $0x5, %eax
addl $0x4, %eax
addl 0x9da2(%rip), %eax      # 0x13b50
movl %eax, 0x9d9c(%rip)      # 0x13b50
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: send_all_trees(int, int, int)
void send_all_trees(int lcodes, int dcodes, int blcodes){
    int rank;                    /* index in bl_order */

    //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
    //Assert (lcodes <= _CODES && dcodes <= D_CODES && blcodes <= B_CODES, "too many codes");
    //Tracev((stderr, "\nbl counts: "));
    send_bits(lcodes-257, 5); /* not +255 as stated in appnote.txt */
    send_bits(dcodes-1,   5);
    send_bits(blcodes-4,  4); /* not -3 as stated in appnote.txt */
    for (rank = 0; rank < blcodes; rank++) {
        //Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
        send_bits(bl_tree[bl_order[rank]].Len, 3);
    }

    send_tree((ct_data *)dyn_ltree, lcodes-1); /* send the literal tree */

    send_tree((ct_data *)dyn_dtree, dcodes-1); /* send the distance tree */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl -0x4(%rbp), %edi
subl $0x101, %edi            # imm = 0x101
movl $0x5, %esi
callq 0x8ed0
movl -0x8(%rbp), %edi
subl $0x1, %edi
movl $0x5, %esi
callq 0x8ed0
movl -0xc(%rbp), %edi
subl $0x4, %edi
movl $0x4, %esi
callq 0x8ed0
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x9e45
movslq -0x10(%rbp), %rcx
leaq 0x6852(%rip), %rax      # 0x10670
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x7d15(%rip), %rax      # 0x11b40
movzwl 0x2(%rax,%rcx,4), %edi
movl $0x3, %esi
callq 0x8ed0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x9e0b
movl -0x4(%rbp), %esi
subl $0x1, %esi
leaq 0x6dee(%rip), %rdi      # 0x10c40
callq 0x9b30
movl -0x8(%rbp), %esi
subl $0x1, %esi
leaq 0x76dc(%rip), %rdi      # 0x11540
callq 0x9b30
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: bi_windup()
void bi_windup()
{
    if (bi_valid > 8) {
        put_short(bi_buf);
    } else if (bi_valid > 0) {
        put_byte(bi_buf);
    }
    bi_buf = 0;
    bi_valid = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x8, 0x6dbd(%rip)      # 0x10c38
jle 0x9e8b
movswl 0x6db0(%rip), %edi      # 0x10c34
callq 0x88f0
jmp 0x9ea5
cmpl $0x0, 0x6da6(%rip)      # 0x10c38
jle 0x9ea3
movw 0x6d99(%rip), %ax       # 0x10c34
movsbl %al, %edi
callq 0x88c0
jmp 0x9ea5
movw $0x0, 0x6d86(%rip)      # 0x10c34
movl $0x0, 0x6d80(%rip)      # 0x10c38
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: copy_block(char*, unsigned int, int)
void copy_block(char* buf, u32 len, int header){
    bi_windup();              /* align on byte boundary */

    if (header) {
        put_short((u16)len);   
        put_short((u16)~len);
    }
    while (len--) {
        put_byte(*buf++);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
callq 0x9e70
cmpl $0x0, -0x10(%rbp)
je 0x9ef6
movl -0xc(%rbp), %eax
movswl %ax, %edi
callq 0x88f0
movl -0xc(%rbp), %eax
xorl $-0x1, %eax
movswl %ax, %edi
callq 0x88f0
jmp 0x9ef8
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
je 0x9f21
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movsbl (%rax), %edi
callq 0x88c0
jmp 0x9ef8
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)