LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/pvineet44[P]minishell/libft/ft_atoi.c
// Function: ft_atoi
int		ft_atoi(const char *s1)
{
	int					neg;
	unsigned long int	val;
	int					i;

	neg = 1;
	val = 0;
	i = 0;
	while ((s1[i] >= 9 && s1[i] <= 13) || s1[i] == 32)
		i++;
	if (s1[i] == '-')
		neg = -1;
	if (s1[i] == '-' || s1[i] == '+')
		i++;
	while ((ft_isdigit(s1[i])) && s1[i] != '\0')
		val = val * 10 + ((const char)s1[i++] - '0');
	return (val * neg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %eax, %eax
movzbl (%rbx,%rax), %ecx
leal -0x9(%rcx), %edx
cmpb $0x5, %dl
jb 0x4bc4
cmpl $0x20, %ecx
jne 0x4bc9
incq %rax
jmp 0x4bb3
cmpl $0x2d, %ecx
jne 0x4bd7
movq $-0x1, %r14
jmp 0x4bdd
movl $0x1, %r14d
cmpl $0x2b, %ecx
je 0x4be7
cmpl $0x2d, %ecx
jne 0x4be9
incl %eax
movslq %eax, %r15
movsbl (%rbx,%r15), %edi
callq 0x4c74
testl %eax, %eax
je 0x4c2a
addq %rbx, %r15
incq %r15
xorl %ebx, %ebx
movsbq -0x1(%r15), %rax
testq %rax, %rax
je 0x4c2c
leaq (%rbx,%rbx,4), %rcx
leaq (%rax,%rcx,2), %rbx
addq $-0x30, %rbx
movsbl (%r15), %edi
callq 0x4c74
incq %r15
testl %eax, %eax
jne 0x4c02
jmp 0x4c2c
xorl %ebx, %ebx
imull %r14d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/pvineet44[P]minishell/libft/ft_itoa.c
// Function: ft_itoa
char			*ft_itoa(int nbr)
{
	int		length;
	int		sig;
	int		i;
	char	*result;

	i = 0;
	sig = nbr < 0 ? 1 : 0;
	length = ft_nbr_len(nbr);
	if ((nbr == 0) || (nbr == -2147483648))
		return (preturn(nbr));
	if (!(result = (char *)malloc(sizeof(char) * (length + 1 + sig))))
		return (NULL);
	if (sig)
	{
		result[0] = '-';
		nbr = -nbr;
	}
	while (++i <= length)
	{
		result[length + sig - i] = (nbr % 10) + '0';
		nbr = nbr / 10;
	}
	result[length + sig] = '\0';
	return (result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
testl %edi, %edi
je 0x4cdd
movl %ebx, %eax
negl %eax
cmovsl %ebx, %eax
xorl %r14d, %r14d
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
movl %eax, %edx
imulq %rcx, %rdx
shrq $0x23, %rdx
incl %r14d
cmpl $0x9, %eax
movl %edx, %eax
ja 0x4cc7
jmp 0x4ce3
movl $0x1, %r14d
testl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
je 0x4d53
movl %ebx, %r15d
shrl $0x1f, %r15d
leal (%r15,%r14), %eax
incl %eax
movslq %eax, %rdi
callq 0x1120
testq %rax, %rax
je 0x4d60
testl %ebx, %ebx
jns 0x4d0e
movb $0x2d, (%rax)
negl %ebx
movl %r14d, %ecx
leaq -0x1(%r15), %rdx
movslq %ebx, %rsi
imulq $0x66666667, %rsi, %rbx # imm = 0x66666667
movq %rbx, %rdi
shrq $0x3f, %rdi
sarq $0x22, %rbx
addl %edi, %ebx
leal (%rbx,%rbx), %edi
leal (%rdi,%rdi,4), %edi
subl %edi, %esi
addb $0x30, %sil
leal (%rdx,%rcx), %edi
movslq %edi, %rdi
movb %sil, (%rax,%rdi)
decq %rcx
jne 0x4d15
addl %r15d, %r14d
movslq %r14d, %rcx
movb $0x0, (%rax,%rcx)
jmp 0x4d62
testl %ebx, %ebx
je 0x4d6d
leaq 0x1458(%rip), %rdi      # 0x61b6
jmp 0x4d74
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x144e(%rip), %rdi      # 0x61c2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1818
nop
// File: /workspace/github_c_makefile_star2_O1/pvineet44[P]minishell/libft/ft_putendl_fd.c
// Function: ft_putendl_fd
void	ft_putendl_fd(char *s, int fd)
{
	int		i;
	char	c;

	i = 0;
	c = '\n';
	if (s == NULL)
		return ;
	while (s[i] != '\0')
		write(fd, &s[i++], 1);
	write(fd, &c, 1);
	return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movb $0xa, -0x11(%rbp)
testq %rdi, %rdi
je 0x4e04
movl %esi, %ebx
movq %rdi, %r14
cmpb $0x0, (%rdi)
je 0x4df4
movl $0x1, %edx
movl %ebx, %edi
movq %r14, %rsi
callq 0x1050
cmpb $0x0, 0x1(%r14)
leaq 0x1(%r14), %r14
jne 0x4dda
leaq -0x11(%rbp), %rsi
movl $0x1, %edx
movl %ebx, %edi
callq 0x1050
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/pvineet44[P]minishell/libft/ft_putstr_fd.c
// Function: ft_putstr_fd
void	ft_putstr_fd(char *s, int fd)
{
	int i;

	i = 0;
	if (s == NULL)
		return ;
	while (s[i] != '\0')
		write(fd, &s[i++], 1);
	return ;
}

// Assembly:
testq %rdi, %rdi
je 0x4e68
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
cmpb $0x0, (%rdi)
je 0x4e64
movl %esi, %ebx
movl $0x1, %edx
movl %ebx, %edi
movq %r14, %rsi
callq 0x1050
cmpb $0x0, 0x1(%r14)
leaq 0x1(%r14), %r14
jne 0x4e4a
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/pvineet44[P]minishell/libft/ft_split.c
// Function: ft_split
char			**ft_split(const char *s, char c)
{
	char		**result;

	result = NULL;
	if (s == NULL)
		return (NULL);
	if (s[0] == '\0')
		return (ft_return_zero(result));
	result = (char**)malloc(sizeof(char*) + (ft_strlen(s) * sizeof(char*)));
	if (result == NULL)
		return (NULL);
	return (ft_pre_process_split(result, s, c));
}

// Assembly:
testq %rdi, %rdi
je 0x4ffd
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpb $0x0, (%rdi)
je 0x5001
movl %esi, %r13d
movq %rdi, %rbx
callq 0x1802
cltq
leaq 0x8(,%rax,8), %rdi
callq 0x1120
testq %rax, %rax
je 0x5013
movq %rax, %rsi
movabsq $-0x200000000, %r15     # imm = 0xFFFFFFFE00000000
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rbx, %rcx
movq %rbx, %rdi
addq %rax, %r15
leaq 0x1(%rcx), %rdx
cmpb %r13b, (%rcx)
movq %rdx, %rcx
je 0x4ecf
sarq $0x20, %r15
movb 0x1(%rdi,%r15), %bl
xorl %eax, %eax
testb %bl, %bl
je 0x5017
movq %rsi, -0x40(%rbp)
leaq 0x1(%r15), %r14
movq $0x0, -0x38(%rbp)
xorl %r12d, %r12d
movl %r13d, -0x2c(%rbp)
movq %rdi, -0x48(%rbp)
cmpb %r13b, %bl
jne 0x4f75
cmpb %r13b, 0x2(%rdi,%r15)
je 0x4fe0
movq %r12, %rdi
callq 0x1802
incl %eax
movslq %eax, %rdi
callq 0x1120
movq -0x38(%rbp), %r13
movslq %r13d, %r13
movq -0x40(%rbp), %rcx
movq %rax, (%rcx,%r13,8)
testq %rax, %rax
je 0x5013
movq %rax, %rbx
movq %r12, %rdi
callq 0x1802
incl %eax
movslq %eax, %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x52b0
movq -0x40(%rbp), %rcx
movq %rax, (%rcx,%r13,8)
incl %r13d
movq %r13, -0x38(%rbp)
xorl %r13d, %r13d
jmp 0x4fc8
testq %r12, %r12
je 0x4f84
movq %r12, %rdi
callq 0x1802
jmp 0x4f86
xorl %eax, %eax
movq %rax, -0x50(%rbp)
addl $0x2, %eax
movslq %eax, %rdi
callq 0x1120
testq %rax, %rax
je 0x4fd5
movq %rax, %r13
testq %r12, %r12
je 0x4fb9
xorl %eax, %eax
movb (%r12,%rax), %cl
testb %cl, %cl
je 0x4fb9
movb %cl, (%r13,%rax)
incq %rax
testq %r12, %r12
jne 0x4fa4
movslq -0x50(%rbp), %rax
movb %bl, (%r13,%rax)
movb $0x0, 0x1(%r13,%rax)
movq %r12, %rdi
callq 0x1030
movq %r13, %r12
jmp 0x4fd8
xorl %r12d, %r12d
movl -0x2c(%rbp), %r13d
movq -0x48(%rbp), %rdi
movb 0x1(%rdi,%r14), %bl
incq %r14
incq %r15
testb %bl, %bl
jne 0x4f0c
movslq -0x38(%rbp), %rax
movq -0x40(%rbp), %rsi
jmp 0x501a
xorl %esi, %esi
jmp 0x503b
movl $0x8, %edi
callq 0x1120
movq %rax, %rsi
testq %rax, %rax
jne 0x5026
xorl %esi, %esi
jmp 0x502d
xorl %r12d, %r12d
movq %r12, (%rsi,%rax,8)
leaq (%rsi,%rax,8), %rax
addq $0x8, %rax
movq $0x0, (%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
movq %rsi, %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/pvineet44[P]minishell/libft/ft_strcmp.c
// Function: ft_strcmp
int		ft_strcmp(char *s1, char *s2)
{
	unsigned char	a;
	unsigned char	b;
	unsigned int	i;

	i = 0;
	while (s1[i] != '\0' && s1[i] == s2[i])
	{
		i++;
	}
	a = s1[i];
	b = s2[i];
	return (a - b);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
testb %al, %al
je 0x50b3
movl $0x1, %edx
xorl %ecx, %ecx
cmpb (%rsi,%rcx), %al
jne 0x50b5
movl %edx, %ecx
movb (%rdi,%rcx), %al
incl %edx
testb %al, %al
jne 0x50a1
jmp 0x50b5
xorl %ecx, %ecx
movzbl (%rsi,%rcx), %ecx
movzbl %al, %eax
subl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pvineet44[P]minishell/libft/ft_strncmp.c
// Function: ft_strncmp
int		ft_strncmp(const char *s1, const char *s2, size_t n)
{
	while (n && (*s1 || *s2))
	{
		if (*s1 != *s2)
			return ((unsigned char)*s1 - (unsigned char)*s2);
		s1++;
		s2++;
		n--;
	}
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdx, %rdx
je 0x50eb
xorl %ecx, %ecx
movzbl (%rdi,%rcx), %eax
testl %eax, %eax
jne 0x50d9
cmpb $0x0, (%rsi,%rcx)
je 0x50eb
movzbl (%rsi,%rcx), %r8d
cmpb %r8b, %al
jne 0x50ef
incq %rcx
cmpq %rcx, %rdx
jne 0x50cb
xorl %eax, %eax
jmp 0x50f2
subl %r8d, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pvineet44[P]minishell/libft/ft_strtrim.c
// Function: ft_strtrim
char	*ft_strtrim(const char *s1, const char *set)
{
	int last_index;
	int start_trim;
	int i;

	if (s1 == NULL)
		return (NULL);
	if (set == NULL)
		return (ft_strdup(s1));
	if (s1[0] == '\0')
		return (ft_calloc(1, sizeof(char)));
	last_index = ft_strlen(s1) - 1;
	i = 0;
	while (s1[i] != '\0' && (ft_strchr(set, s1[i]) != 0))
		i++;
	start_trim = i;
	if (start_trim > last_index)
		return (ft_calloc(1, sizeof(char)));
	while (ft_strchr(set, s1[last_index]))
		last_index--;
	return (ft_substr(s1, start_trim, last_index - start_trim + 1));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x514d
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x51c4
cmpb $0x0, (%rbx)
je 0x51a7
movq %rbx, %rdi
callq 0x1802
movl %eax, %r15d
movb (%rbx), %al
xorl %r12d, %r12d
testb %al, %al
je 0x515e
movsbl %al, %esi
movq %r14, %rdi
callq 0x5040
testq %rax, %rax
je 0x515e
movb 0x1(%rbx,%r12), %al
incq %r12
jmp 0x512f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl %r15d, %r12d
jge 0x51a7
movslq %r15d, %rax
subl %r12d, %r15d
incl %r15d
leaq (%rax,%rbx), %r13
decq %r13
movsbl (%r13), %esi
movq %r14, %rdi
callq 0x5040
decl %r15d
decq %r13
testq %rax, %rax
jne 0x5173
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x51dc
movl $0x1, %edi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5278
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1818
nop
// File: /workspace/github_c_makefile_star2_O1/pvineet44[P]minishell/libft/ft_substr.c
// Function: ft_substr
char	*ft_substr(char const *s, unsigned int start, int len)
{
	char				*substr;
	unsigned int		i;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x5260
movl %edx, %r15d
movl %esi, %ebx
movq %rdi, %r14
callq 0x1802
cmpl %ebx, %eax
jae 0x5215
movl $0x1, %edi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5278
movslq %r15d, %rdi
incq %rdi
callq 0x1120
testq %rax, %rax
je 0x5260
movl %ebx, %ecx
movb (%r14,%rcx), %cl
testb %cl, %cl
sete %dl
testl %r15d, %r15d
setle %sil
orb %dl, %sil
jne 0x5264
incl %ebx
xorl %edx, %edx
leal (%rbx,%rdx), %esi
movb %cl, (%rax,%rdx)
incq %rdx
movb (%r14,%rsi), %cl
testb %cl, %cl
je 0x5266
leal -0x1(%r15), %esi
cmpl $0x1, %r15d
movl %esi, %r15d
jg 0x5240
jmp 0x5266
xorl %eax, %eax
jmp 0x526a
xorl %edx, %edx
movb $0x0, (%rax,%rdx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/pvineet44[P]minishell/libft/ft_memcpy.c
// Function: ft_memcpy
void	*ft_memcpy(void *dst, const void *src, size_t n)
{
	unsigned char	*source;
	unsigned char	*dest;
	size_t			i;

	if (!dst && !src)
		return (0);
	source = (unsigned char *)src;
	dest = (unsigned char *)dst;
	i = 0;
	while (i < n)
	{
		dest[i] = source[i];
		i++;
	}
	return (dst);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rcx
orq %rsi, %rcx
je 0x52d8
movq %rdi, %rax
testq %rdx, %rdx
je 0x52da
xorl %ecx, %ecx
movb (%rsi,%rcx), %dil
movb %dil, (%rax,%rcx)
incq %rcx
cmpq %rcx, %rdx
jne 0x52c6
jmp 0x52da
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc.c
// Function: help
static void help(char *np)
{
	struct Command *cp;

	printf("Usage:\n");
	for( cp = commands; cp->verb; cp++ )
		print_help(np, cp, BASIC_HELP);

	printf("\n\t%s help|--help|-h\n\t\tShow the help.\n",np);
	printf("\n\t%s <cmd> --help\n\t\tShow detailed help for a command or subset of commands.\n",np);
	printf("\n%s\n", MMC_VERSION);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x9323(%rip), %rsi      # 0xd00e
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
cmpq $0x0, 0x13461(%rip)     # 0x17160
je 0x3d20
leaq 0x13448(%rip), %r14     # 0x17150
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3d6d
cmpq $0x0, 0x48(%r14)
leaq 0x38(%r14), %r14
jne 0x3d08
leaq 0x9378(%rip), %rsi      # 0xd09f
movl $0x1, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x31c0
leaq 0x9388(%rip), %rsi      # 0xd0c5
movl $0x1, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x31c0
leaq 0x92c3(%rip), %rsi      # 0xd016
leaq 0x92c1(%rip), %rdx      # 0xd01b
movl $0x1, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x31c0
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc.c
// Function: print_help
static void print_help(char *programname, struct Command *cmd, int helptype)
{
	char	*pc;

	printf("\t%s %s ", programname, cmd->verb );

	if (helptype == ADVANCED_HELP && cmd->adv_help)
		for(pc = cmd->adv_help; *pc; pc++){
			putchar(*pc);
			if(*pc == '\n')
				printf("\t\t");
		}
	else
		for(pc = cmd->help; *pc; pc++){
			putchar(*pc);
			if(*pc == '\n')
				printf("\t\t");
		}

	putchar('\n');
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %rdx
movq 0x10(%rsi), %rcx
leaq 0xa86e(%rip), %rsi      # 0xe5f2
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
cmpl $0x1, %ebp
jne 0x3dd9
movq 0x20(%rbx), %r14
testq %r14, %r14
je 0x3dd9
movb (%r14), %al
testb %al, %al
je 0x3e16
incq %r14
leaq 0xa84b(%rip), %rbx      # 0xe5fa
movsbl %al, %edi
callq 0x3040
cmpb $0xa, -0x1(%r14)
jne 0x3dcd
movl $0x1, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x31c0
movb (%r14), %al
incq %r14
testb %al, %al
jne 0x3daf
jmp 0x3e16
movq 0x18(%rbx), %r14
movb (%r14), %al
testb %al, %al
je 0x3e16
incq %r14
leaq 0xa80c(%rip), %rbx      # 0xe5fa
movsbl %al, %edi
callq 0x3040
cmpb $0xa, -0x1(%r14)
jne 0x3e0c
movl $0x1, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x31c0
movb (%r14), %al
incq %r14
testb %al, %al
jne 0x3dee
movl $0xa, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x3040
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc.c
// Function: prepare_args
static int prepare_args(int *ac, char ***av, char *prgname, struct Command *cmd ){

	char	**ret;
	int	i;
	char	*newname;

	ret = (char **)malloc(sizeof(char*)*(*ac+1));
	newname = (char*)malloc(strlen(prgname)+strlen(cmd->verb)+2);
	if( !ret || !newname ){
		free(ret);
		free(newname);
		return -1;
	}

	ret[0] = newname;
	for(i=0; i < *ac ; i++ )
		ret[i+1] = (*av)[i];

	strcpy(newname, prgname);
	strcat(newname, " ");
	strcat(newname, cmd->verb);

	(*ac)++;
	*av = ret;

	return 0;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, (%rsp)
movq %rdi, %r14
movslq (%rdi), %rbx
leaq 0x8(,%rbx,8), %rdi
callq 0x31a0
movq %rax, %r12
movq %r13, %rdi
callq 0x30a0
movq %rax, %rbp
movq 0x10(%r15), %rdi
callq 0x30a0
leaq (%rax,%rbp), %rdi
addq $0x2, %rdi
callq 0x31a0
movq %rax, %rbp
testq %r12, %r12
je 0x3ed3
testq %rbp, %rbp
je 0x3ed3
movq %rbp, (%r12)
testl %ebx, %ebx
jle 0x3e9f
movq (%rsp), %rax
movq (%rax), %rax
xorl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq %rdx, 0x8(%r12,%rcx,8)
incq %rcx
cmpq %rcx, %rbx
jne 0x3e8e
movq %rbp, %rdi
movq %r13, %rsi
callq 0x3060
movq %rbp, %rdi
callq 0x30a0
movw $0x20, (%rbp,%rax)
movq 0x10(%r15), %rsi
movq %rbp, %rdi
callq 0x3210
incl (%r14)
movq (%rsp), %rax
movq %r12, (%rax)
xorl %eax, %eax
jmp 0x3ee8
movq %r12, %rdi
callq 0x3030
movq %rbp, %rdi
callq 0x3030
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: read_extcsd
int read_extcsd(int fd, __u8 *ext_csd)
{
	int ret = 0;
	struct mmc_ioc_cmd idata;
	memset(&idata, 0, sizeof(idata));
	memset(ext_csd, 0, sizeof(__u8) * 512);
	idata.write_flag = 0;
	idata.opcode = MMC_SEND_EXT_CSD;
	idata.arg = 0;
	idata.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;
	idata.blksz = 512;
	idata.blocks = 1;
	mmc_ioc_cmd_set_data(idata, ext_csd);

	ret = ioctl(fd, MMC_IOC_CMD, &idata);
	if (ret)
		perror("ioctl");

	return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movl %edi, %ebp
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movq $0x0, 0x40(%r14)
movl $0x200, %edx            # imm = 0x200
movq %rsi, %rdi
xorl %esi, %esi
callq 0x30e0
movl $0x0, (%r14)
movq $0x8, 0x8(%r14)
movabsq $0x200000000b5, %rax    # imm = 0x200000000B5
movq %rax, 0x20(%r14)
movl $0x1, 0x28(%r14)
movq %rbx, 0x40(%r14)
movl $0xc048b300, %esi       # imm = 0xC048B300
movl %ebp, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x30f0
movl %eax, %ebx
testl %eax, %eax
jne 0x3f80
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xd5b6(%rip), %rdi      # 0x1153d
callq 0x31e0
jmp 0x3f75
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: write_extcsd_value
int write_extcsd_value(int fd, __u8 index, __u8 value)
{
	int ret = 0;
	struct mmc_ioc_cmd idata;

	memset(&idata, 0, sizeof(idata));
	idata.write_flag = 1;
	idata.opcode = MMC_SWITCH;
	idata.arg = (MMC_SWITCH_MODE_WRITE_BYTE << 24) |
			(index << 16) |
			(value << 8) |
			EXT_CSD_CMD_SET_NORMAL;
	idata.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;

	ret = ioctl(fd, MMC_IOC_CMD, &idata);
	if (ret)
		perror("ioctl");

	return ret;
}

// Assembly:
pushq %rbx
subq $0x50, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x10(%rax)
movq $0x0, 0x40(%rax)
movl $0x1, (%rax)
movl $0x6, 0x8(%rax)
shll $0x10, %esi
shll $0x8, %edx
leal (%rdx,%rsi), %ecx
addl $0x3000001, %ecx        # imm = 0x3000001
movl %ecx, 0xc(%rax)
movl $0x49d, 0x20(%rax)      # imm = 0x49D
movl $0xc048b300, %esi       # imm = 0xC048B300
movq %rax, %rdx
xorl %eax, %eax
callq 0x30f0
movl %eax, %ebx
testl %eax, %eax
jne 0x3ff3
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
retq
leaq 0xd543(%rip), %rdi      # 0x1153d
callq 0x31e0
jmp 0x3feb
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: send_status
int send_status(int fd, __u32 *response)
{
	int ret = 0;
	struct mmc_ioc_cmd idata;

	memset(&idata, 0, sizeof(idata));
	idata.opcode = MMC_SEND_STATUS;
	idata.arg = (1 << 16);
	idata.flags = MMC_RSP_R1 | MMC_CMD_AC;

	ret = ioctl(fd, MMC_IOC_CMD, &idata);
	if (ret)
	perror("ioctl");

	*response = idata.response[0];

	return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x20(%rdx)
movaps %xmm0, 0x30(%rdx)
movaps %xmm0, 0x10(%rdx)
movq $0x0, 0x40(%rdx)
movabsq $0x100000000000d, %rax  # imm = 0x100000000000D
movq %rax, 0x8(%rdx)
movl $0x15, 0x20(%rdx)
movl $0xc048b300, %esi       # imm = 0xC048B300
xorl %eax, %eax
callq 0x30f0
movl %eax, %ebp
testl %eax, %eax
jne 0x405d
movl 0x10(%rsp), %eax
movl %eax, (%rbx)
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
leaq 0xd4d9(%rip), %rdi      # 0x1153d
callq 0x31e0
jmp 0x404e
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: do_writeprotect_boot_get
int do_writeprotect_boot_get(int nargs, char **argv)
{
	__u8 ext_csd[512];
	int fd, ret;
	char *device;

	if (nargs != 2) {
		fprintf(stderr, "Usage: mmc writeprotect boot get </path/to/mmcblkX>\n");
		exit(1);
	}

	device = argv[1];

	fd = open(device, O_RDWR);
	if (fd < 0) {
		perror("open");
		exit(1);
	}

	ret = read_extcsd(fd, ext_csd);
	if (ret) {
		fprintf(stderr, "Could not read EXT_CSD from %s\n", device);
		exit(1);
	}

	print_writeprotect_boot_status(ext_csd);

	return ret;
}

// Assembly:
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
cmpl $0x2, %edi
jne 0x40b0
movq 0x8(%rsi), %rbx
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x31d0
testl %eax, %eax
js 0x40cf
movq %rsp, %rsi
movl %eax, %edi
callq 0x3ef8
testl %eax, %eax
jne 0x40d4
movq %rsp, %rdi
callq 0x40fe
xorl %eax, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
retq
movq 0x12f39(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0xa60f(%rip), %rdx      # 0xe6d0
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
jmp 0x40f4
callq 0x3280
movq 0x12f15(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0xa620(%rip), %rdx      # 0xe705
movl $0x1, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3240
movl $0x1, %edi
callq 0x3220
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: print_writeprotect_boot_status
static void print_writeprotect_boot_status(__u8 *ext_csd)
{
	__u8 reg;
	__u8 ext_csd_rev = ext_csd[EXT_CSD_REV];

	/* A43: reserved [174:0] */
	if (ext_csd_rev >= 5) {
		printf("Boot write protection status registers"
			" [BOOT_WP_STATUS]: 0x%02x\n", ext_csd[174]);

		reg = ext_csd[EXT_CSD_BOOT_WP];
		printf("Boot Area Write protection [BOOT_WP]: 0x%02x\n", reg);
		printf(" Power ro locking: ");
		if (reg & EXT_CSD_BOOT_WP_B_PWR_WP_DIS)
			printf("not possible\n");
		else
			printf("possible\n");

		printf(" Permanent ro locking: ");
		if (reg & EXT_CSD_BOOT_WP_B_PERM_WP_DIS)
			printf("not possible\n");
		else
			printf("possible\n");

		printf(" ro lock status: ");
		if (reg & EXT_CSD_BOOT_WP_B_PWR_WP_EN)
			printf("locked until next power on\n");
		else if (reg & EXT_CSD_BOOT_WP_B_PERM_WP_EN)
			printf("locked permanently\n");
		else
			printf("not locked\n");
	}
}

// Assembly:
cmpb $0x5, 0xc0(%rdi)
jb 0x41f0
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movzbl 0xae(%rdi), %edx
leaq 0xd6ac(%rip), %rsi      # 0x117cd
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
movzbl 0xad(%rbx), %ebx
leaq 0xd6d3(%rip), %rsi      # 0x1180e
movl $0x1, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0x31c0
leaq 0xd6ec(%rip), %rsi      # 0x1183c
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
testb $0x40, %bl
leaq 0xd6ee(%rip), %r15      # 0x11854
leaq 0xd6e3(%rip), %r14      # 0x11850
movq %r14, %rsi
cmoveq %r15, %rsi
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
leaq 0xd6d7(%rip), %rsi      # 0x1185e
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
testb $0x10, %bl
cmoveq %r15, %r14
movl $0x1, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x31c0
leaq 0xd6c6(%rip), %rsi      # 0x11876
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
testb $0x4, %bl
leaq 0xd6f2(%rip), %rax      # 0x118b8
leaq 0xd6d7(%rip), %rcx      # 0x118a4
cmoveq %rax, %rcx
testb $0x1, %bl
leaq 0xd6ad(%rip), %rsi      # 0x11888
cmoveq %rcx, %rsi
movl $0x1, %edi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x31c0
retq
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: do_writeprotect_boot_set
int do_writeprotect_boot_set(int nargs, char **argv)
{
	__u8 ext_csd[512], value;
	int fd, ret;
	char *device;

	if (nargs != 2) {
		fprintf(stderr, "Usage: mmc writeprotect boot set </path/to/mmcblkX>\n");
		exit(1);
	}

	device = argv[1];

	fd = open(device, O_RDWR);
	if (fd < 0) {
		perror("open");
		exit(1);
	}

	ret = read_extcsd(fd, ext_csd);
	if (ret) {
		fprintf(stderr, "Could not read EXT_CSD from %s\n", device);
		exit(1);
	}

	value = ext_csd[EXT_CSD_BOOT_WP] |
		EXT_CSD_BOOT_WP_B_PWR_WP_EN;
	ret = write_extcsd_value(fd, EXT_CSD_BOOT_WP, value);
	if (ret) {
		fprintf(stderr, "Could not write 0x%02x to "
			"EXT_CSD[%d] in %s\n",
			value, EXT_CSD_BOOT_WP, device);
		exit(1);
	}

	return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
cmpl $0x2, %edi
jne 0x4255
movq 0x8(%rsi), %rbx
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x31d0
testl %eax, %eax
js 0x4274
movl %eax, %r14d
movq %rsp, %rsi
movl %eax, %edi
callq 0x3ef8
testl %eax, %eax
jne 0x4279
movzbl 0xad(%rsp), %ebp
orl $0x1, %ebp
movl %r14d, %edi
movl $0xad, %esi
movl %ebp, %edx
callq 0x3f8e
testl %eax, %eax
jne 0x429b
xorl %eax, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
movq 0x12d94(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0xa4bf(%rip), %rdx      # 0xe725
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
jmp 0x42c3
callq 0x3295
movq 0x12d70(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0xa47b(%rip), %rdx      # 0xe705
movl $0x1, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3240
jmp 0x42c3
movq 0x12d4e(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0xa4ae(%rip), %rdx      # 0xe75a
movl $0x1, %esi
movl %ebp, %ecx
movl $0xad, %r8d
movq %rbx, %r9
xorl %eax, %eax
callq 0x3240
movl $0x1, %edi
callq 0x3220
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: do_disable_512B_emulation
int do_disable_512B_emulation(int nargs, char **argv)
{
	__u8 ext_csd[512], native_sector_size, data_sector_size, wr_rel_param;
	int fd, ret;
	char *device;

	if (nargs != 2) {
		fprintf(stderr, "Usage: mmc disable 512B emulation </path/to/mmcblkX>\n");
		exit(1);
	}

	device = argv[1];

	fd = open(device, O_RDWR);
	if (fd < 0) {
		perror("open");
		exit(1);
	}

	ret = read_extcsd(fd, ext_csd);
	if (ret) {
		fprintf(stderr, "Could not read EXT_CSD from %s\n", device);
		exit(1);
	}

	wr_rel_param = ext_csd[EXT_CSD_WR_REL_PARAM];
	native_sector_size = ext_csd[EXT_CSD_NATIVE_SECTOR_SIZE];
	data_sector_size = ext_csd[EXT_CSD_DATA_SECTOR_SIZE];

	if (native_sector_size && !data_sector_size &&
	   (wr_rel_param & EN_REL_WR)) {
		ret = write_extcsd_value(fd, EXT_CSD_USE_NATIVE_SECTOR, 1);

		if (ret) {
			fprintf(stderr, "Could not write 0x%02x to EXT_CSD[%d] in %s\n",
					1, EXT_CSD_NATIVE_SECTOR_SIZE, device);
			exit(1);
		}
		printf("MMC disable 512B emulation successful.  Now reset the device to switch to 4KB native sector mode.\n");
	} else if (native_sector_size && data_sector_size) {
		printf("MMC 512B emulation mode is already disabled; doing nothing.\n");
	} else {
		printf("MMC does not support disabling 512B emulation mode.\n");
	}

	return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
cmpl $0x2, %edi
jne 0x49a4
movq 0x8(%rsi), %rbx
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x31d0
testl %eax, %eax
js 0x49c3
movl %eax, %ebp
movq %rsp, %rsi
movl %eax, %edi
callq 0x3ef8
testl %eax, %eax
jne 0x49c8
movb 0x3d(%rsp), %cl
movb 0x3f(%rsp), %al
testb %al, %al
sete %dl
testb %cl, %cl
setne %sil
orb %dl, %sil
jne 0x4954
testb $0x4, 0xa6(%rsp)
jne 0x4970
testb %cl, %cl
leaq 0xa063(%rip), %rsi      # 0xe9c0
leaq 0xa099(%rip), %rcx      # 0xe9fd
cmoveq %rcx, %rsi
testb %al, %al
cmoveq %rcx, %rsi
jmp 0x498c
movl %ebp, %edi
movl $0x3e, %esi
movl $0x1, %edx
callq 0x3f8e
testl %eax, %eax
jne 0x49f2
leaq 0x9fd1(%rip), %rsi      # 0xe95d
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %rbp
retq
movq 0x12645(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0x9f72(%rip), %rdx      # 0xe927
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
jmp 0x49e8
callq 0x3341
movq 0x12621(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0x9d2c(%rip), %rdx      # 0xe705
movl $0x1, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3240
movl $0x1, %edi
callq 0x3220
movq 0x125f7(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0x9d57(%rip), %rdx      # 0xe75a
movl $0x1, %esi
movl $0x1, %ecx
movl $0x3f, %r8d
movq %rbx, %r9
xorl %eax, %eax
callq 0x3240
jmp 0x49e8
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: do_hwreset
int do_hwreset(int value, int nargs, char **argv)
{
	__u8 ext_csd[512];
	int fd, ret;
	char *device;

	if (nargs != 2) {
		fprintf(stderr, "Usage: mmc hwreset enable </path/to/mmcblkX>\n");
		exit(1);
	}

	device = argv[1];

	fd = open(device, O_RDWR);
	if (fd < 0) {
		perror("open");
		exit(1);
	}

	ret = read_extcsd(fd, ext_csd);
	if (ret) {
		fprintf(stderr, "Could not read EXT_CSD from %s\n", device);
		exit(1);
	}

	if ((ext_csd[EXT_CSD_RST_N_FUNCTION] & EXT_CSD_RST_N_EN_MASK) ==
	    EXT_CSD_HW_RESET_EN) {
		fprintf(stderr,
			"H/W Reset is already permanently enabled on %s\n",
			device);
		exit(1);
	}
	if ((ext_csd[EXT_CSD_RST_N_FUNCTION] & EXT_CSD_RST_N_EN_MASK) ==
	    EXT_CSD_HW_RESET_DIS) {
		fprintf(stderr,
			"H/W Reset is already permanently disabled on %s\n",
			device);
		exit(1);
	}

	ret = write_extcsd_value(fd, EXT_CSD_RST_N_FUNCTION, value);
	if (ret) {
		fprintf(stderr,
			"Could not write 0x%02x to EXT_CSD[%d] in %s\n",
			value, EXT_CSD_RST_N_FUNCTION, device);
		exit(1);
	}

	return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
cmpl $0x2, %esi
jne 0x4dfb
movl %edi, %ebp
movq 0x8(%rdx), %rbx
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x31d0
testl %eax, %eax
js 0x4e1a
movl %eax, %r14d
movq %rsp, %rsi
movl %eax, %edi
callq 0x3ef8
testl %eax, %eax
jne 0x4e1f
movzbl 0xa2(%rsp), %eax
andl $0x3, %eax
cmpl $0x2, %eax
je 0x4e32
cmpl $0x1, %eax
je 0x4e45
movzbl %bpl, %edx
movl %r14d, %edi
movl $0xa2, %esi
callq 0x3f8e
testl %eax, %eax
jne 0x4e67
xorl %eax, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
movq 0x121ee(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0x9dc9(%rip), %rdx      # 0xebd5
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
jmp 0x4e8f
callq 0x3380
movq 0x121ca(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0x98d5(%rip), %rdx      # 0xe705
jmp 0x4e56
movq 0x121b7(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0x9df0(%rip), %rdx      # 0xec33
jmp 0x4e56
movq 0x121a4(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0x9dad(%rip), %rdx      # 0xec03
movl $0x1, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3240
jmp 0x4e8f
movq 0x12182(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0x98e2(%rip), %rdx      # 0xe75a
movl $0x1, %esi
movl %ebp, %ecx
movl $0xa2, %r8d
movq %rbx, %r9
xorl %eax, %eax
callq 0x3240
movl $0x1, %edi
callq 0x3220
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: do_write_bkops_en
int do_write_bkops_en(int nargs, char **argv)
{
	__u8 ext_csd[512], value = 0;
	int fd, ret;
	char *device;

	if (nargs != 2) {
	       fprintf(stderr, "Usage: mmc bkops enable </path/to/mmcblkX>\n");
	       exit(1);
	}

	device = argv[1];

	fd = open(device, O_RDWR);
	if (fd < 0) {
		perror("open");
		exit(1);
	}

	ret = read_extcsd(fd, ext_csd);
	if (ret) {
		fprintf(stderr, "Could not read EXT_CSD from %s\n", device);
		exit(1);
	}

	if (!(ext_csd[EXT_CSD_BKOPS_SUPPORT] & 0x1)) {
		fprintf(stderr, "%s doesn't support BKOPS\n", device);
		exit(1);
	}

	ret = write_extcsd_value(fd, EXT_CSD_BKOPS_EN, BKOPS_ENABLE);
	if (ret) {
		fprintf(stderr, "Could not write 0x%02x to EXT_CSD[%d] in %s\n",
			value, EXT_CSD_BKOPS_EN, device);
		exit(1);
	}

	return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
cmpl $0x2, %edi
jne 0x4f21
movq 0x8(%rsi), %rbx
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x31d0
testl %eax, %eax
js 0x4f40
movl %eax, %ebp
movq %rsp, %rsi
movl %eax, %edi
callq 0x3ef8
testl %eax, %eax
jne 0x4f45
testb $0x1, 0x1f6(%rsp)
je 0x4f58
movl %ebp, %edi
movl $0xa3, %esi
movl $0x1, %edx
callq 0x3f8e
testl %eax, %eax
jne 0x4f7a
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %rbp
retq
movq 0x120c8(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0x9d32(%rip), %rdx      # 0xec64
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
jmp 0x4fa2
callq 0x3395
movq 0x120a4(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0x97af(%rip), %rdx      # 0xe705
jmp 0x4f69
movq 0x12091(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0x9d27(%rip), %rdx      # 0xec90
movl $0x1, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3240
jmp 0x4fa2
movq 0x1206f(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0x97cf(%rip), %rdx      # 0xe75a
movl $0x1, %esi
xorl %ecx, %ecx
movl $0xa3, %r8d
movq %rbx, %r9
xorl %eax, %eax
callq 0x3240
movl $0x1, %edi
callq 0x3220
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: do_status_get
int do_status_get(int nargs, char **argv)
{
	__u32 response;
	int fd, ret;
	char *device;

	if (nargs != 2) {
		fprintf(stderr, "Usage: mmc status get </path/to/mmcblkX>\n");
		exit(1);
	}

	device = argv[1];

	fd = open(device, O_RDWR);
	if (fd < 0) {
		perror("open");
		exit(1);
	}

	ret = send_status(fd, &response);
	if (ret) {
		fprintf(stderr, "Could not read response to SEND_STATUS from %s\n", device);
		exit(1);
	}

	printf("SEND_STATUS response: 0x%08x\n", response);

	return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
cmpl $0x2, %edi
jne 0x4ffc
movq 0x8(%rsi), %rbx
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x31d0
testl %eax, %eax
js 0x501b
leaq 0xc(%rsp), %rsi
movl %eax, %edi
callq 0x4001
testl %eax, %eax
jne 0x5020
movl 0xc(%rsp), %edx
leaq 0x9d1c(%rip), %rsi      # 0xed04
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
movq 0x11fed(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0x9c9d(%rip), %rdx      # 0xecaa
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
jmp 0x5040
callq 0x33aa
movq 0x11fc9(%rip), %rax     # 0x16ff0
movq (%rax), %rdi
leaq 0x9ca3(%rip), %rdx      # 0xecd4
movl $0x1, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3240
movl $0x1, %edi
callq 0x3220
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: set_partitioning_setting_completed
int set_partitioning_setting_completed(int dry_run, const char * const device,
		int fd)
{
	int ret;

	if (dry_run == 1) {
		fprintf(stderr, "NOT setting PARTITION_SETTING_COMPLETED\n");
		fprintf(stderr, "These changes will not take effect neither "
			"now nor after a power cycle\n");
		return 1;
	} else if (dry_run == 2) {
		printf("-c given, expecting more partition settings before "
			"writing PARTITION_SETTING_COMPLETED\n");
		return 0;
	}

	fprintf(stderr, "setting OTP PARTITION_SETTING_COMPLETED!\n");
	ret = write_extcsd_value(fd, EXT_CSD_PARTITION_SETTING_COMPLETED, 0x1);
	if (ret) {
		fprintf(stderr, "Could not write 0x1 to "
			"EXT_CSD[%d] in %s\n",
			EXT_CSD_PARTITION_SETTING_COMPLETED, device);
		return 1;
	}

	__u32 response;
	ret = send_status(fd, &response);
	if (ret) {
		fprintf(stderr, "Could not get response to SEND_STATUS "
			"from %s\n", device);
		return 1;
	}

	if (response & R1_SWITCH_ERROR) {
		fprintf(stderr, "Setting OTP PARTITION_SETTING_COMPLETED "
			"failed on %s\n", device);
		return 1;
	}

	fprintf(stderr, "Setting OTP PARTITION_SETTING_COMPLETED on "
		"%s SUCCESS\n", device);
	fprintf(stderr, "Device power cycle needed for settings to "
		"take effect.\n"
		"Confirm that PARTITION_SETTING_COMPLETED bit is set "
		"using 'extcsd read' after power cycle\n");

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x2, %edi
je 0x50bf
cmpl $0x1, %edi
jne 0x50d9
movq 0x11f67(%rip), %r14     # 0x16ff0
movq (%r14), %rdi
leaq 0x9c8f(%rip), %rdx      # 0xed22
movl $0x1, %ebx
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
movq (%r14), %rdi
leaq 0x9c9d(%rip), %rdx      # 0xed4b
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
jmp 0x519d
leaq 0x9ccd(%rip), %rsi      # 0xed93
xorl %ebx, %ebx
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
jmp 0x519d
movl %edx, %ebp
movq %rsi, %r14
movq 0x11f0b(%rip), %r15     # 0x16ff0
movq (%r15), %rdi
leaq 0x9cfc(%rip), %rdx      # 0xedeb
movl $0x1, %ebx
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
movl %ebp, %edi
movl $0x9b, %esi
movl $0x1, %edx
callq 0x3f8e
testl %eax, %eax
je 0x5135
movq (%r15), %rdi
leaq 0x9cf6(%rip), %rdx      # 0xee15
movl $0x1, %esi
movl $0x9b, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x3240
jmp 0x519d
leaq 0x4(%rsp), %rsi
movl %ebp, %edi
callq 0x4001
testl %eax, %eax
je 0x5151
movq (%r15), %rdi
leaq 0x9cf0(%rip), %rdx      # 0xee3f
jmp 0x5189
testb $-0x80, 0x4(%rsp)
movq (%r15), %rdi
jne 0x5182
leaq 0x9d42(%rip), %rdx      # 0xeea4
xorl %ebx, %ebx
movl $0x1, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x3240
movq (%r15), %rdi
leaq 0x9d5e(%rip), %rdx      # 0xeedb
jmp 0x50ae
leaq 0x9ce5(%rip), %rdx      # 0xee6e
movl $0x1, %ebx
movl $0x1, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x3240
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: do_sanitize
int do_sanitize(int nargs, char **argv)
{
	int fd, ret;
	char *device;

	if (nargs != 2) {
		fprintf(stderr, "Usage: mmc sanitize </path/to/mmcblkX>\n");
		exit(1);
	}

	device = argv[1];

	fd = open(device, O_RDWR);
	if (fd < 0) {
		perror("open");
		exit(1);
	}

	ret = write_extcsd_value(fd, EXT_CSD_SANITIZE_START, 1);
	if (ret) {
		fprintf(stderr, "Could not write 0x%02x to EXT_CSD[%d] in %s\n",
			1, EXT_CSD_SANITIZE_START, device);
		exit(1);
	}

	return ret;

}

// Assembly:
pushq %rbx
cmpl $0x2, %edi
jne 0x70af
movq 0x8(%rsi), %rbx
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x31d0
testl %eax, %eax
js 0x70ce
movl %eax, %edi
movl $0xa5, %esi
movl $0x1, %edx
callq 0x3f8e
testl %eax, %eax
jne 0x70d3
xorl %eax, %eax
popq %rbx
retq
movq 0xff3a(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x9ec4(%rip), %rdx      # 0x10f84
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
jmp 0x70fe
callq 0x3413
movq 0xff16(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x7676(%rip), %rdx      # 0xe75a
movl $0x1, %esi
movl $0x1, %ecx
movl $0xa5, %r8d
movq %rbx, %r9
xorl %eax, %eax
callq 0x3240
movl $0x1, %edi
callq 0x3220
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: rpmb_read_counter
int rpmb_read_counter(int dev_fd, unsigned int *cnt)
{
	int ret;
	struct rpmb_frame frame_in = {
		.req_resp = htobe16(MMC_RPMB_READ_CNT)
	}, frame_out;

	/* Execute RPMB op */
	ret = do_rpmb_op(dev_fd, &frame_in, &frame_out, 1);
	if (ret != 0) {
		perror("RPMB ioctl failed");
		exit(1);
	}

	/* Check RPMB response */
	if (frame_out.result != 0)
		return be16toh(frame_out.result);

	*cnt = be32toh(frame_out.write_counter);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x200(%rsp), %r14
movl $0x200, %edx            # imm = 0x200
movq %r14, %rdi
xorl %esi, %esi
callq 0x30e0
movw $0x200, 0x1fe(%r14)     # imm = 0x200
movq %rsp, %rdx
movl %ebp, %edi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x72af
testl %eax, %eax
jne 0x756a
movzwl 0x1fc(%rsp), %eax
testw %ax, %ax
je 0x7551
rolw $0x8, %ax
movzwl %ax, %eax
jmp 0x755e
movl 0x1f4(%rsp), %eax
bswapl %eax
movl %eax, (%rbx)
xorl %eax, %eax
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %rbp
retq
callq 0x347c
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: do_rpmb_read_counter
int do_rpmb_read_counter(int nargs, char **argv)
{
	int ret, dev_fd;
	unsigned int cnt;

	if (nargs != 2) {
		fprintf(stderr, "Usage: mmc rpmb read-counter </path/to/mmcblkXrpmb>\n");
		exit(1);
	}

	dev_fd = open(argv[1], O_RDWR);
	if (dev_fd < 0) {
		perror("device open");
		exit(1);
	}

	ret = rpmb_read_counter(dev_fd, &cnt);

	/* Check RPMB response */
	if (ret != 0) {
		printf("RPMB operation failed, retcode 0x%04x\n", ret);
		exit(1);
	}

	close(dev_fd);

	printf("Counter value: 0x%08x\n", cnt);

	return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
cmpl $0x2, %edi
jne 0x75c5
movq 0x8(%rsi), %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x31d0
testl %eax, %eax
js 0x75e4
movl %eax, %ebx
leaq 0xc(%rsp), %rsi
movl %eax, %edi
callq 0x74f4
testl %eax, %eax
jne 0x75e9
movl %ebx, %edi
callq 0x3100
movl 0xc(%rsp), %edx
leaq 0x9b15(%rip), %rsi      # 0x110c6
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
movq 0xfa24(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x9abb(%rip), %rdx      # 0x11091
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
jmp 0x75fe
callq 0x3491
leaq 0x9a7a(%rip), %rsi      # 0x1106a
movl $0x1, %edi
movl %eax, %edx
xorl %eax, %eax
callq 0x31c0
movl $0x1, %edi
callq 0x3220
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: do_cache_ctrl
int do_cache_ctrl(int value, int nargs, char **argv)
{
	__u8 ext_csd[512];
	int fd, ret;
	char *device;

	if (nargs != 2) {
	       fprintf(stderr, "Usage: mmc cache enable </path/to/mmcblkX>\n");
	       exit(1);
	}

	device = argv[1];

	fd = open(device, O_RDWR);
	if (fd < 0) {
		perror("open");
		exit(1);
	}

	ret = read_extcsd(fd, ext_csd);
	if (ret) {
		fprintf(stderr, "Could not read EXT_CSD from %s\n", device);
		exit(1);
	}

	if (ext_csd[EXT_CSD_REV] < EXT_CSD_REV_V4_5) {
		fprintf(stderr,
			"The CACHE option is only availabe on devices >= "
			"MMC 4.5 %s\n", device);
		exit(1);
	}

	/* If the cache size is zero, this device does not have a cache */
	if (!(ext_csd[EXT_CSD_CACHE_SIZE_3] ||
			ext_csd[EXT_CSD_CACHE_SIZE_2] ||
			ext_csd[EXT_CSD_CACHE_SIZE_1] ||
			ext_csd[EXT_CSD_CACHE_SIZE_0])) {
		fprintf(stderr,
			"The CACHE option is not available on %s\n",
			device);
		exit(1);
	}
	ret = write_extcsd_value(fd, EXT_CSD_CACHE_CTRL, value);
	if (ret) {
		fprintf(stderr,
			"Could not write 0x%02x to EXT_CSD[%d] in %s\n",
			value, EXT_CSD_CACHE_CTRL, device);
		exit(1);
	}

	return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
cmpl $0x2, %esi
jne 0x7df5
movl %edi, %ebp
movq 0x8(%rdx), %rbx
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x31d0
testl %eax, %eax
js 0x7e14
movl %eax, %r14d
movq %rsp, %rsi
movl %eax, %edi
callq 0x3ef8
testl %eax, %eax
jne 0x7e19
cmpb $0x5, 0xc0(%rsp)
jbe 0x7e3f
cmpb $0x0, 0xfc(%rsp)
jne 0x7dd2
cmpb $0x0, 0xfb(%rsp)
jne 0x7dd2
cmpb $0x0, 0xfa(%rsp)
jne 0x7dd2
cmpb $0x0, 0xf9(%rsp)
je 0x7e2c
movzbl %bpl, %edx
movl %r14d, %edi
movl $0x21, %esi
callq 0x3f8e
testl %eax, %eax
jne 0x7e61
xorl %eax, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
movq 0xf1f4(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x9560(%rip), %rdx      # 0x11366
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
jmp 0x7e89
callq 0x35e1
movq 0xf1d0(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x68db(%rip), %rdx      # 0xe705
jmp 0x7e50
movq 0xf1bd(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x9591(%rip), %rdx      # 0x113ce
jmp 0x7e50
movq 0xf1aa(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x9542(%rip), %rdx      # 0x11392
movl $0x1, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3240
jmp 0x7e89
movq 0xf188(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x68e8(%rip), %rdx      # 0xe75a
movl $0x1, %esi
movl %ebp, %ecx
movl $0x21, %r8d
movq %rbx, %r9
xorl %eax, %eax
callq 0x3240
movl $0x1, %edi
callq 0x3220
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: do_PPEU
int do_PPEU(int nargs, char **argv)
{
 int cmd56_arg = 0x110005FB;
 char data_in[SD_BLOCK_SIZE];
 int fd, ret;
 char *device;
 if (!((nargs == 2)||(nargs == 3))) {
	 printf("Usage mmc ppeu read <-d>");
	 exit(1);
 }
 device = argv[nargs-1];
 fd = open(device, O_RDWR);
 if (fd < 0) {
 perror("open");
 exit(1);
 }
 //execute CMD56 and get one 512-byte data block
 ret = CMD56_data_in(fd, cmd56_arg, data_in);
 if (ret) {
 fprintf(stderr, "CMD56 CALL FAILED, %s\n", device);
 exit(1);
 }
 if (!strcmp("-d", argv[1]))
 dump_data_block(data_in); //data block dumping
 /* write data to stdout in CSV format */
 printf("Fixed Filed Header: %02Xh %02Xh %02Xh %02Xh\n",
 data_in[0], data_in[1], data_in[2], data_in[3]);
 printf("Percentage Step Size: %d\n", data_in[7]);
 printf("TLC/QLC Percentage Utilization: %d%%\n", data_in[8]);
 printf("SLC Percentage Utilization: %d%%\n", data_in[9]);

 return ret;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movl %edi, %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x84d1
movq %rsi, %r14
movl %edi, %eax
movq -0x8(%rsi,%rax,8), %rbx
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x31d0
testl %eax, %eax
js 0x84e6
movq %rsp, %rdx
movl %eax, %edi
movl $0x110005fb, %esi       # imm = 0x110005FB
callq 0x8515
testl %eax, %eax
jne 0x84eb
movq 0x8(%r14), %rsi
leaq 0x92d0(%rip), %rdi      # 0x11713
callq 0x3150
testl %eax, %eax
jne 0x8454
movq %rsp, %rdi
callq 0x85b7
movsbl (%rsp), %edx
movsbl 0x1(%rsp), %ecx
movsbl 0x2(%rsp), %r8d
movsbl 0x3(%rsp), %r9d
leaq 0x92a6(%rip), %rsi      # 0x11716
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
movsbl 0x7(%rsp), %edx
leaq 0x92bb(%rip), %rsi      # 0x11743
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
movsbl 0x8(%rsp), %edx
leaq 0x92bd(%rip), %rsi      # 0x1175d
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
movsbl 0x9(%rsp), %edx
leaq 0x92cb(%rip), %rsi      # 0x11783
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
retq
leaq 0x920b(%rip), %rsi      # 0x116e3
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
jmp 0x850b
callq 0x3629
movq 0xeafe(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x9200(%rip), %rdx      # 0x116fc
movl $0x1, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3240
movl $0x1, %edi
callq 0x3220
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: CMD56_data_in
int CMD56_data_in(int fd, int cmd56_arg, char *lba_block_data)
{
 int ret = 0;
 struct mmc_ioc_cmd idata;
 memset(&idata, 0, sizeof(idata));
 memset(lba_block_data, 0, sizeof(__u8) * 512);
 idata.write_flag = 0;
 idata.opcode = SD_GEN_CMD;
 idata.arg = cmd56_arg;
 idata.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;
 idata.blksz = SD_BLOCK_SIZE;
 idata.blocks = 1;
 mmc_ioc_cmd_set_data(idata, lba_block_data);
 ret = ioctl(fd, MMC_IOC_CMD, &idata);
 if (ret)
 perror("ioctl");
 return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r14d
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movq $0x0, 0x40(%r15)
movl $0x200, %edx            # imm = 0x200
movq %rbx, %rdi
xorl %esi, %esi
callq 0x30e0
movl $0x0, (%r15)
movl $0x38, 0x8(%r15)
movl %ebp, 0xc(%r15)
movabsq $0x200000000b5, %rax    # imm = 0x200000000B5
movq %rax, 0x20(%r15)
movl $0x1, 0x28(%r15)
movq %rbx, 0x40(%r15)
movl $0xc048b300, %esi       # imm = 0xC048B300
movl %r14d, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x30f0
movl %eax, %ebx
testl %eax, %eax
jne 0x85a9
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8f8d(%rip), %rdi      # 0x1153d
callq 0x31e0
jmp 0x859c
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/mmc_cmds.c
// Function: dump_data_block
void dump_data_block(char *lba_block_data)
{
 int count=0;
 printf("CMD56 data block dumping:");
 while( count < SD_BLOCK_SIZE) {
 if(count % 16 == 0)
 printf("\n%03d: ", count);
 printf("%02x ", lba_block_data[count]);
 count++;
 }
 printf("\n");

 return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x91dc(%rip), %rsi      # 0x117a5
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
leaq 0x91e3(%rip), %r14      # 0x117bf
leaq 0x91e4(%rip), %r15      # 0x117c7
xorl %r12d, %r12d
testb $0xf, %r12b
jne 0x85fe
movl $0x1, %edi
movq %r14, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x31c0
movsbl (%rbx,%r12), %edx
movl $0x1, %edi
movq %r15, %rsi
xorl %eax, %eax
callq 0x31c0
incq %r12
cmpq $0x200, %r12            # imm = 0x200
jne 0x85e6
leaq 0xa4c5(%rip), %rsi      # 0x12aea
movl $0x1, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x31c0