LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/lsmmc.c
// Function: usage
void usage(void)
{
	printf("Usage: print mmc [-h] [-v] <device path ...>\n");
	printf("\n");
	printf("Options:\n");
	printf("\t-h\tShow this help.\n");
	printf("\t-v\tEnable verbose mode.\n");
}

// Assembly:
pushq %rax
leaq 0x95dc(%rip), %rsi      # 0x11c20
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
leaq 0xa493(%rip), %rsi      # 0x12aea
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
leaq 0x95e4(%rip), %rsi      # 0x11c4e
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
leaq 0x95db(%rip), %rsi      # 0x11c58
movl $0x1, %edi
xorl %eax, %eax
callq 0x31c0
leaq 0x95dd(%rip), %rsi      # 0x11c6d
movl $0x1, %edi
xorl %eax, %eax
popq %rcx
jmp 0x31c0
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/lsmmc.c
// Function: parse_opts
int parse_opts(int argc, char **argv, struct config *config)
{
	int c;

	while ((c = getopt(argc, argv, "hv")) != -1) {
		switch (c) {
		case 'h':
			usage();
			return -1;
		case 'v':
			config->verbose = true;
			break;
		case '?':
			fprintf(stderr,
				"Unknown option '%c' encountered.\n\n", c);
			usage();
			return -1;
		case ':':
			fprintf(stderr,
				"Argument for option '%c' missing.\n\n", c);
			usage();
			return -1;
		default:
			fprintf(stderr,
				"Unimplemented option '%c' encountered.\n", c);
			break;
		}
	}

	if (optind >= argc) {
		fprintf(stderr, "Expected mmc directory arguments.\n\n");
		usage();
		return -1;
	}

	config->dir = strdup(argv[optind]);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
leaq 0x95d0(%rip), %r15      # 0x11c87
movq 0xe932(%rip), %r13      # 0x16ff0
leaq 0x960c(%rip), %r12      # 0x11cd1
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x31f0
cmpl $0x67, %eax
jle 0x86e2
cmpl $0x76, %eax
jne 0x86f3
movb $0x1, 0x10(%rbx)
jmp 0x86c5
cmpl $-0x1, %eax
je 0x870f
cmpl $0x3a, %eax
je 0x873b
cmpl $0x3f, %eax
jne 0x86f8
jmp 0x872e
cmpl $0x68, %eax
je 0x876d
movq (%r13), %rdi
movl $0x1, %esi
movq %r12, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x3240
jmp 0x86c5
movq 0xe8ba(%rip), %rax      # 0x16fd0
movslq (%rax), %rax
cmpl %ebp, %eax
jge 0x8756
movq (%r14,%rax,8), %rdi
callq 0x3250
movq %rax, 0x8(%rbx)
xorl %eax, %eax
jmp 0x8777
movq (%r13), %rdi
leaq 0x9551(%rip), %rdx      # 0x11c8a
jmp 0x8746
movq (%r13), %rdi
leaq 0x9567(%rip), %rdx      # 0x11cad
movl $0x1, %esi
movl %eax, %ecx
xorl %eax, %eax
callq 0x3240
jmp 0x876d
movq (%r13), %rdi
leaq 0x9598(%rip), %rdx      # 0x11cf9
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
callq 0x863c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/lsmmc.c
// Function: parse_ids
int parse_ids(struct config *config)
{
	unsigned int ids_cnt = sizeof(database) / sizeof(struct ids_database);
	unsigned int value;
	char **ids;
	char *type;
	int i;

	for (i = 0; i < ids_cnt; i++) {
		type = database[i].type;

		if (!strcmp(type, "mmc")) {
			ids = config->mmc_ids;
		} else if (!strcmp(type, "sd")) {
			ids = config->sd_ids;
		} else {
			fprintf(stderr,
				"MMC/SD id parse error, unknown type: '%s'.\n",
				type);
			return -1;
		}

		value = database[i].id;

		if (value >= IDS_MAX) {
			fprintf(stderr,
				"MMC/SD id parse error, id out of range.\n");
			return -1;
		}

		if (ids[value]) {
			fprintf(stderr,
				"Duplicate entries: type='%s', id='0x%1x'.\n",
				type, value);
			return -1;
		}

		ids[value] = database[i].manufacturer;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x28(%rdi), %r13
addq $0x20, %r14
movl $0x10, %ebp
leaq 0xefc8(%rip), %r12      # 0x17770
leaq 0x9432(%rip), %r15      # 0x11be1
movq -0x10(%rbp,%r12), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3150
movq %r14, %rcx
testl %eax, %eax
je 0x87dc
movq %rbx, %rdi
leaq 0xad5c(%rip), %rsi      # 0x1352c
callq 0x3150
movq %r13, %rcx
testl %eax, %eax
jne 0x884f
movl -0x8(%rbp,%r12), %r8d
cmpq $0x100, %r8             # imm = 0x100
jae 0x880e
movq (%rcx), %rax
cmpq $0x0, (%rax,%r8,8)
jne 0x882d
movq (%rbp,%r12), %rcx
movq %rcx, (%rax,%r8,8)
addq $0x18, %rbp
cmpq $0x2b0, %rbp            # imm = 0x2B0
jne 0x87af
xorl %eax, %eax
jmp 0x8874
movq 0xe7db(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x952a(%rip), %rdx      # 0x11d49
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
jmp 0x886f
movq 0xe7bc(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x9534(%rip), %rdx      # 0x11d72
movl $0x1, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3240
jmp 0x886f
movq 0xe79a(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x94bd(%rip), %rdx      # 0x11d1d
movl $0x1, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3240
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/lsmmc.c
// Function: read_file
char *read_file(char *name)
{
	char line[4096];
	char *preparsed, *start = line;
	int len;
	FILE *f;

	f = fopen(name, "r");
	if (!f) {
		fprintf(stderr, "Could not open MMC/SD file '%s'.\n", name);
		return NULL;
	}

	preparsed = fgets(line, sizeof(line), f);
	if (!preparsed) {
		if (ferror(f))
			fprintf(stderr, "Could not read MMC/SD file '%s'.\n",
				name);
		else
			fprintf(stderr,
				"Could not read data from MMC/SD file '%s'.\n",
				name);

		if (fclose(f))
			fprintf(stderr, "Could not close MMC/SD file '%s'.\n",
				name);
		return NULL;
	}

	if (fclose(f)) {
		fprintf(stderr, "Could not close MMC/SD file '%s'.\n", name);
		return NULL;
	}

	line[sizeof(line) - 1] = '\0';
	len = strlen(line);

	while (len > 0 && isspace(line[len - 1]))
		len--;

	while (len > 0 && isspace(*start)) {
		start++;
		len--;
	}
	memmove(line, start, len);
	line[len] = '\0';

	return strdup(line);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %rbx
leaq 0x9936(%rip), %rsi      # 0x121d2
callq 0x3170
testq %rax, %rax
je 0x88da
movq %rax, %r15
movq %rsp, %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %rax, %rdx
callq 0x3130
testq %rax, %rax
je 0x88ed
movq %r15, %rdi
callq 0x3090
testl %eax, %eax
je 0x8962
movq 0xe71b(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
jmp 0x8936
movq 0xe70f(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x94b2(%rip), %rdx      # 0x11d9d
jmp 0x893d
movq %r15, %rdi
callq 0x3070
testl %eax, %eax
movq 0xe6f2(%rip), %r12      # 0x16ff0
movq (%r12), %rdi
leaq 0x94d8(%rip), %rax      # 0x11de1
leaq 0x94af(%rip), %rdx      # 0x11dbf
cmoveq %rax, %rdx
xorl %r14d, %r14d
movl $0x1, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3240
movq %r15, %rdi
callq 0x3090
testl %eax, %eax
je 0x894f
movq (%r12), %rdi
leaq 0x94d0(%rip), %rdx      # 0x11e0d
xorl %r14d, %r14d
movl $0x1, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3240
movq %r14, %rax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %rbx
movb $0x0, 0xfff(%rbx)
movq %rbx, %rdi
callq 0x30a0
movq %rax, %r14
movl %r14d, %r15d
movl %r14d, %ebp
sarl $0x1f, %ebp
andl %r14d, %ebp
incl %r14d
testl %r15d, %r15d
jle 0x89a8
callq 0x3260
movq (%rax), %rax
movsbq -0x1(%rsp,%r15), %rcx
decq %r15
decl %r14d
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x8986
jmp 0x89ab
movl %ebp, %r14d
testl %r14d, %r14d
jle 0x89e6
callq 0x3260
movq (%rax), %rcx
leal -0x1(%r14), %eax
movl %r14d, %edx
addq %rsp, %rdx
incq %rax
movq %rsp, %rbx
movsbq (%rbx), %rsi
testb $0x20, 0x1(%rcx,%rsi,2)
je 0x89e3
incq %rbx
decq %rax
jne 0x89c8
xorl %r14d, %r14d
movq %rdx, %rbx
jmp 0x89e6
movl %eax, %r14d
movslq %r14d, %r14
movq %rsp, %r15
movl $0x1000, %ecx           # imm = 0x1000
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3160
movb $0x0, (%rsp,%r14)
movq %r15, %rdi
callq 0x3250
movq %rax, %r14
jmp 0x894f
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/lsmmc.c
// Function: to_binstr
char *to_binstr(char *hexstr)
{
	char *bindigits[] = {
		"0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111",
		"1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111",
	};
	char *binstr, *tail;

	binstr = calloc(strlen(hexstr) * 4 + 1, sizeof(char));
	if (!binstr)
		return NULL;

	tail = binstr;

	while (hexstr && *hexstr != '\0') {
		if (!isxdigit(*hexstr)) {
			free(binstr);
			return NULL;
		}

		if (isdigit(*hexstr))
			strcat(tail, bindigits[*hexstr - '0']);
		else if (islower(*hexstr))
			strcat(tail, bindigits[*hexstr - 'a' + 10]);
		else
			strcat(tail, bindigits[*hexstr - 'A' + 10]);

		hexstr++;
		tail += 4;
	}

	return binstr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x30a0
leaq 0x1(,%rax,4), %rdi
movl $0x1, %esi
callq 0x3140
testq %rax, %rax
je 0x8ac3
movq %rax, %rbx
testq %r14, %r14
je 0x8ac5
movb (%r14), %r13b
testb %r13b, %r13b
je 0x8ac5
callq 0x3260
movq %rax, %r15
incq %r14
leaq 0x8fac(%rip), %rbp      # 0x11a10
movq %rbx, %r12
movq (%r15), %rcx
movsbq %r13b, %rax
movzwl (%rcx,%rax,2), %ecx
btl $0xc, %ecx
jae 0x8abb
xorl %edx, %edx
btl $0x9, %ecx
setae %dl
shll $0x5, %edx
addq $-0x57, %rdx
btl $0xb, %ecx
movq $-0x30, %rcx
cmovbq %rcx, %rdx
addq %rax, %rdx
movslq (%rbp,%rdx,4), %rsi
addq %rbp, %rsi
movq %r12, %rdi
callq 0x3210
addq $0x4, %r12
movb (%r14), %r13b
incq %r14
testb %r13b, %r13b
jne 0x8a67
jmp 0x8ac5
movq %rbx, %rdi
callq 0x3030
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/lsmmc.c
// Function: bin_to_unsigned
void bin_to_unsigned(unsigned int *u, char *binstr, int width)
{
	*u = 0;
	assert(width <= 32);

	while (binstr && *binstr != '\0' && width > 0) {
		*u <<= 1;
		*u |= *binstr == '0' ? 0 : 1;

		binstr++;
		width--;
	}
}

// Assembly:
pushq %rax
movl $0x0, (%rdi)
cmpl $0x20, %edx
jg 0x8b23
testq %rsi, %rsi
je 0x8b21
cmpb $0x0, (%rsi)
sete %al
testl %edx, %edx
setle %cl
orb %al, %cl
jne 0x8b21
movl (%rdi), %eax
incq %rsi
leal (%rax,%rax), %ecx
movl %ecx, (%rdi)
xorl %ecx, %ecx
cmpb $0x30, -0x1(%rsi)
setne %cl
leal (%rcx,%rax,2), %eax
movl %eax, (%rdi)
cmpb $0x0, (%rsi)
je 0x8b21
leal -0x1(%rdx), %ecx
incq %rsi
cmpl $0x1, %edx
movl %ecx, %edx
jg 0x8afc
popq %rax
retq
leaq 0x9356(%rip), %rdi      # 0x11e80
leaq 0x935b(%rip), %rsi      # 0x11e8c
leaq 0x935c(%rip), %rcx      # 0x11e94
movl $0x19a, %edx            # imm = 0x19A
callq 0x30d0
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/lsmmc.c
// Function: bin_to_ascii
void bin_to_ascii(char *a, char *binstr, int width)
{
	assert(width % 8 == 0);
	*a = '\0';

	while (binstr && *binstr != '\0' && width > 0) {
		unsigned int u;
		char c[2] = { '\0', '\0' };
		char *s = &c[0];

		bin_to_unsigned(&u, binstr, 8);
		c[0] = u;

		strcat(a, s);
		binstr += 8;
		width -= 8;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %r15d
testb $0x7, %r15b
jne 0x8bf1
movq %rsi, %rbx
movq %rdi, %r14
movb $0x0, (%rdi)
testq %rsi, %rsi
je 0x8be3
cmpb $0x0, (%rbx)
sete %al
testl %r15d, %r15d
setle %cl
orb %al, %cl
jne 0x8be3
leaq 0x1(%rbx), %r13
leaq 0xe(%rsp), %r12
movw $0x0, 0xe(%rsp)
movb (%rbx), %dl
xorl %eax, %eax
testb %dl, %dl
je 0x8bb9
movl $0x8, %esi
movq %r13, %rcx
xorl %edi, %edi
cmpb $0x30, %dl
setne %dil
leal (%rdi,%rax,2), %eax
movb (%rcx), %dl
testb %dl, %dl
je 0x8bb9
leal -0x1(%rsi), %edi
incq %rcx
cmpl $0x1, %esi
movl %edi, %esi
ja 0x8b9a
movb %al, 0xe(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x3210
cmpb $0x0, 0x8(%rbx)
je 0x8be3
addq $0x8, %rbx
leal -0x8(%r15), %eax
addq $0x8, %r13
cmpl $0x8, %r15d
movl %eax, %r15d
jg 0x8b83
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x92ce(%rip), %rdi      # 0x11ec6
leaq 0x928d(%rip), %rsi      # 0x11e8c
leaq 0x92cf(%rip), %rcx      # 0x11ed5
movl $0x1a7, %edx            # imm = 0x1A7
callq 0x30d0
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/lsmmc.c
// Function: parse_bin
void parse_bin(char *hexstr, char *fmt, ...)
{
	va_list args;
	char *origstr;
	char *binstr;
	unsigned long width = 0;

	binstr = to_binstr(hexstr);
	origstr = binstr;

	va_start(args, fmt);

	while (binstr && fmt && *fmt != '\0') {
		if (isdigit(*fmt)) {
			char *rest;

			errno = 0;
			width = strtoul(fmt, &rest, 10);
			if (width == ULONG_MAX && errno != 0)
				fprintf(stderr, "strtoul()");
			fmt = rest;
		} else if (*fmt == 'u') {
			unsigned int *u = va_arg(args, unsigned int *);

			if (u)
				bin_to_unsigned(u, binstr, width);
			binstr += width;
			width = 0;
			fmt++;
		} else if (*fmt == 'r') {
			binstr += width;
			width = 0;
			fmt++;
		} else if (*fmt == 'a') {
			char *c = va_arg(args, char *);

			if (c)
				bin_to_ascii(c, binstr, width);
			binstr += width;
			width = 0;
			fmt++;
		} else {
			fmt++;
		}
	}

	va_end(args);
	free(origstr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r14
leaq 0x20(%rsp), %r15
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0x8c74
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
callq 0x8a14
movq %rax, %rbx
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r15, 0x10(%rsp)
testq %rbx, %rbx
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x8ddf
leaq 0x18(%rsp), %r15
movq %rbx, %r13
xorl %ebp, %ebp
movsbq (%r14), %r12
testq %r12, %r12
je 0x8ddf
callq 0x3260
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r12,2)
jne 0x8d17
cmpb $0x61, %r12b
je 0x8d69
movzbl %r12b, %eax
cmpl $0x72, %eax
je 0x8dc9
cmpl $0x75, %eax
jne 0x8d82
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x8da9
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x8db7
callq 0x3050
movq %rax, %r12
movl $0x0, (%rax)
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x3200
movq %rax, %rbp
cmpq $-0x1, %rax
jne 0x8d62
cmpl $0x0, (%r12)
je 0x8d62
movq 0xe2a4(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
movl $0x1, %esi
leaq 0x91a1(%rip), %rdx      # 0x11efc
xorl %eax, %eax
callq 0x3240
movq 0x18(%rsp), %r14
jmp 0x8dd1
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x8d87
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x8d95
incq %r14
jmp 0x8dd1
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rdi
testq %rdi, %rdi
je 0x8dc9
movq %r13, %rsi
movl %ebp, %edx
callq 0x8b42
jmp 0x8dc9
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rdi
testq %rdi, %rdi
je 0x8dc9
movq %r13, %rsi
movl %ebp, %edx
callq 0x8ad7
addq %rbp, %r13
incq %r14
xorl %ebp, %ebp
testq %r13, %r13
je 0x8ddf
testq %r14, %r14
jne 0x8cba
movq %rbx, %rdi
callq 0x3030
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/lsmmc.c
// Function: speed_class_name
char speed_class_name(unsigned char id)
{
	switch (id) {
	case 0x00: return '?';
	case 0x08: return 'A';
	case 0x0a: return 'B';
	case 0x0f: return 'C';
	case 0x14: return 'D';
	case 0x1e: return 'E';
	case 0x28: return 'F';
	case 0x32: return 'G';
	case 0x3c: return 'H';
	case 0x46: return 'J';
	case 0x50: return 'K';
	case 0x64: return 'M';
	case 0x78: return 'O';
	case 0x8c: return 'R';
	case 0xa0: return 'T';
	default: return '?';
	}
}

// Assembly:
movb $0x3f, %al
cmpl $0x3b, %edi
jg 0xafe1
cmpl $0x13, %edi
jle 0xaffb
cmpl $0x27, %edi
jg 0xb01f
cmpl $0x14, %edi
je 0xb03f
cmpl $0x1e, %edi
jne 0xb04a
movb $0x45, %al
retq
cmpl $0x63, %edi
jle 0xb00d
cmpl $0x8b, %edi
jg 0xb02c
cmpl $0x64, %edi
je 0xb042
cmpl $0x78, %edi
jne 0xb04a
movb $0x4f, %al
retq
cmpl $0x8, %edi
je 0xb04b
cmpl $0xa, %edi
je 0xb051
cmpl $0xf, %edi
jne 0xb04a
movb $0x43, %al
retq
cmpl $0x3c, %edi
je 0xb04e
cmpl $0x46, %edi
je 0xb054
cmpl $0x50, %edi
jne 0xb04a
movb $0x4b, %al
retq
cmpl $0x28, %edi
je 0xb045
cmpl $0x32, %edi
jne 0xb04a
movb $0x47, %al
retq
cmpl $0x8c, %edi
je 0xb048
cmpl $0xa0, %edi
jne 0xb04a
movb $0x54, %al
retq
movb $0x44, %al
retq
movb $0x4d, %al
retq
movb $0x46, %al
retq
movb $0x52, %al
retq
movb $0x41, %al
retq
movb $0x48, %al
retq
movb $0x42, %al
retq
movb $0x4a, %al
retq
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/lsmmc.c
// Function: print_info
void print_info(struct config *config, char *type,
	char *cid, char *csd, char *scr, char *ext_csd)
{
	printf("type: '%s'\n", type);

	if (!strcmp(type, "SD") && cid)
		print_sd_cid(config, cid);
	else if (!strcmp(type, "MMC") && cid)
		print_mmc_cid(config, cid);

	if (!strcmp(type, "SD") && scr)
		print_sd_scr(config, scr);

	if (!strcmp(type, "MMC") && csd)
		print_mmc_csd(config, csd);
	else if (!strcmp(type, "SD") && csd)
		print_sd_csd(config, csd);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
leaq 0x8076(%rip), %rsi      # 0x13473
movl $0x1, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x31c0
leaq 0x7fe2(%rip), %rsi      # 0x133f5
movq %r15, %rdi
callq 0x3150
testq %r13, %r13
je 0xb431
testl %eax, %eax
jne 0xb431
movq %r14, %rdi
movq %r13, %rsi
callq 0x8df9
jmp 0xb454
leaq 0x7fc0(%rip), %rsi      # 0x133f8
movq %r15, %rdi
callq 0x3150
testq %r13, %r13
je 0xb454
testl %eax, %eax
jne 0xb454
movq %r14, %rdi
movq %r13, %rsi
callq 0x9058
leaq 0x7f9a(%rip), %rsi      # 0x133f5
movq %r15, %rdi
callq 0x3150
testq %r12, %r12
je 0xb477
testl %eax, %eax
jne 0xb477
movq %r14, %rdi
movq %r12, %rsi
callq 0xb09e
leaq 0x7f7a(%rip), %rsi      # 0x133f8
movq %r15, %rdi
callq 0x3150
testq %rbx, %rbx
je 0xb4a3
testl %eax, %eax
jne 0xb4a3
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xa12b
leaq 0x7f4b(%rip), %rsi      # 0x133f5
movq %r15, %rdi
callq 0x3150
testq %rbx, %rbx
je 0xb4cf
testl %eax, %eax
jne 0xb4cf
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x92e7
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/lsmmc.c
// Function: lsmmc_main
int lsmmc_main(struct config *config, int argc, char **argv)
{
	int ret;

	memset(config, 0, sizeof(*config));
	config->mmc_ids = calloc(IDS_MAX, sizeof(char *));
	config->sd_ids = calloc(IDS_MAX, sizeof(char *));
	if (!config->mmc_ids || !config->sd_ids) {
		fprintf(stderr, "Could not allocate memory for lsmmc.\n");
		return -1;
	}

	ret = parse_opts(argc, argv, config);
	if (ret)
		return ret;

	return parse_ids(config);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x50(%rdi)
movl $0x100, %edi            # imm = 0x100
movl $0x8, %esi
callq 0x3140
movq %rax, %r15
movq %rax, 0x20(%rbx)
movl $0x100, %edi            # imm = 0x100
movl $0x8, %esi
callq 0x3140
movq %rax, 0x28(%rbx)
testq %r15, %r15
setne %cl
testq %rax, %rax
setne %al
testb %al, %cl
jne 0xb7a3
movq 0xb865(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x7dd1(%rip), %rdx      # 0x13566
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
jmp 0xb7b4
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x869d
testl %eax, %eax
je 0xb7c4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x8786
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/lsmmc.c
// Function: do_read_csd
int do_read_csd(int argc, char **argv)
{
	struct config config;
	int ret;

	if (argc != 2 && argc != 3) {
		fprintf(stderr, "Usage: Print CSD data from <device path>.\n");
		exit(1);
	}

	ret = lsmmc_main(&config, argc, argv);
	if (ret)
		goto out;

	if (config.dir)
		ret = process_dir(&config, CSD);

out:
	lsmmc_free(&config);

	return ret;
}

// Assembly:
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rdx
movl %edi, %esi
leal -0x4(%rsi), %eax
cmpl $-0x3, %eax
jbe 0xb857
leaq 0x8(%rsp), %rdi
callq 0xb71e
movl %eax, %ebx
testl %eax, %eax
jne 0xb831
cmpq $0x0, 0x10(%rsp)
je 0xb831
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0xb4d9
movl %eax, %ebx
movq 0x28(%rsp), %rdi
callq 0x3030
movq 0x30(%rsp), %rdi
callq 0x3030
movq 0x10(%rsp), %rdi
callq 0x3030
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
retq
movq 0xb792(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x7d24(%rip), %rdx      # 0x1358c
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
movl $0x1, %edi
callq 0x3220
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/lsmmc.c
// Function: do_read_cid
int do_read_cid(int argc, char **argv)
{
	struct config config;
	int ret;

	if (argc != 2 && argc != 3) {
		fprintf(stderr, "Usage: Print CID data from <device path>.\n");
		exit(1);
	}

	ret = lsmmc_main(&config, argc, argv);
	if (ret)
		goto out;

	if (config.dir)
		ret = process_dir(&config, CID);

out:
	lsmmc_free(&config);

	return ret;
}

// Assembly:
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rdx
movl %edi, %esi
leal -0x4(%rsi), %eax
cmpl $-0x3, %eax
jbe 0xb8dc
leaq 0x8(%rsp), %rdi
callq 0xb71e
movl %eax, %ebx
testl %eax, %eax
jne 0xb8b6
cmpq $0x0, 0x10(%rsp)
je 0xb8b6
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0xb4d9
movl %eax, %ebx
movq 0x28(%rsp), %rdi
callq 0x3030
movq 0x30(%rsp), %rdi
callq 0x3030
movq 0x10(%rsp), %rdi
callq 0x3030
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
retq
movq 0xb70d(%rip), %rax      # 0x16ff0
movq (%rax), %rdi
leaq 0x7cca(%rip), %rdx      # 0x135b7
movl $0x1, %esi
xorl %eax, %eax
callq 0x3240
movl $0x1, %edi
callq 0x3220
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/3rdparty/hmac_sha/hmac_sha2.c
// Function: hmac_sha224_init
void hmac_sha224_init(hmac_sha224_ctx *ctx, const unsigned char *key,
                      unsigned int key_size)
{
    unsigned int fill;
    unsigned int num;

    const unsigned char *key_used;
    unsigned char key_temp[SHA224_DIGEST_SIZE];
    int i;

    if (key_size == SHA224_BLOCK_SIZE) {
        key_used = key;
        num = SHA224_BLOCK_SIZE;
    } else {
        if (key_size > SHA224_BLOCK_SIZE){
            num = SHA224_DIGEST_SIZE;
            sha224(key, key_size, key_temp);
            key_used = key_temp;
        } else { /* key_size > SHA224_BLOCK_SIZE */
            key_used = key;
            num = key_size;
        }
        fill = SHA224_BLOCK_SIZE - num;

        memset(ctx->block_ipad + num, 0x36, fill);
        memset(ctx->block_opad + num, 0x5c, fill);
    }

    for (i = 0; i < (int) num; i++) {
        ctx->block_ipad[i] = key_used[i] ^ 0x36;
        ctx->block_opad[i] = key_used[i] ^ 0x5c;
    }

    sha224_init(&ctx->ctx_inside);
    sha224_update(&ctx->ctx_inside, ctx->block_ipad, SHA224_BLOCK_SIZE);

    sha224_init(&ctx->ctx_outside);
    sha224_update(&ctx->ctx_outside, ctx->block_opad,
                  SHA224_BLOCK_SIZE);

    /* for hmac_reinit */
    memcpy(&ctx->ctx_inside_reinit, &ctx->ctx_inside,
           sizeof(sha224_ctx));
    memcpy(&ctx->ctx_outside_reinit, &ctx->ctx_outside,
           sizeof(sha224_ctx));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x40, %eax
cmpl $0x40, %edx
je 0xba02
movl %edx, %ebp
jbe 0xb9c4
movq %rsp, %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0xcc82
movl $0x1c, %ebp
movq %r15, %r14
movl $0x40, %r15d
subl %ebp, %r15d
movl %ebp, %r12d
leaq (%rbx,%r12), %rdi
addq $0x2a0, %rdi            # imm = 0x2A0
movl $0x36, %esi
movq %r15, %rdx
callq 0x30e0
leaq (%rbx,%r12), %rdi
addq $0x2e0, %rdi            # imm = 0x2E0
movl $0x5c, %esi
movq %r15, %rdx
callq 0x30e0
movl %ebp, %eax
testl %eax, %eax
jle 0xba2e
movl %eax, %eax
xorl %ecx, %ecx
movb (%r14,%rcx), %dl
xorb $0x36, %dl
movb %dl, 0x2a0(%rbx,%rcx)
movb (%r14,%rcx), %dl
xorb $0x5c, %dl
movb %dl, 0x2e0(%rbx,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0xba0a
movq %rbx, %rdi
callq 0xccda
leaq 0x2a0(%rbx), %rsi
movq %rbx, %rdi
movl $0x40, %edx
callq 0xccff
leaq 0xa8(%rbx), %r14
movq %r14, %rdi
callq 0xccda
leaq 0x2e0(%rbx), %rsi
movq %r14, %rdi
movl $0x40, %edx
callq 0xccff
leaq 0x150(%rbx), %rdi
movl $0xa8, %edx
movq %rbx, %rsi
callq 0x3190
addq $0x1f8, %rbx            # imm = 0x1F8
movl $0xa8, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3190
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/3rdparty/hmac_sha/hmac_sha2.c
// Function: hmac_sha224_reinit
void hmac_sha224_reinit(hmac_sha224_ctx *ctx)
{
    memcpy(&ctx->ctx_inside, &ctx->ctx_inside_reinit,
           sizeof(sha224_ctx));
    memcpy(&ctx->ctx_outside, &ctx->ctx_outside_reinit,
           sizeof(sha224_ctx));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x150(%rdi), %rsi
movl $0xa8, %edx
callq 0x3190
leaq 0xa8(%rbx), %rdi
addq $0x1f8, %rbx            # imm = 0x1F8
movl $0xa8, %edx
movq %rbx, %rsi
popq %rbx
jmp 0x3190
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/3rdparty/hmac_sha/hmac_sha2.c
// Function: hmac_sha224_final
void hmac_sha224_final(hmac_sha224_ctx *ctx, unsigned char *mac,
                       unsigned int mac_size)
{
    unsigned char digest_inside[SHA224_DIGEST_SIZE];
    unsigned char mac_temp[SHA224_DIGEST_SIZE];

    sha224_final(&ctx->ctx_inside, digest_inside);
    sha224_update(&ctx->ctx_outside, digest_inside, SHA224_DIGEST_SIZE);
    sha224_final(&ctx->ctx_outside, mac_temp);
    memcpy(mac, mac_temp, mac_size);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x20(%rsp), %r12
movq %r12, %rsi
callq 0xcda9
addq $0xa8, %r15
movq %r15, %rdi
movq %r12, %rsi
movl $0x1c, %edx
callq 0xccff
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xcda9
movl %ebx, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x3190
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/3rdparty/hmac_sha/hmac_sha2.c
// Function: hmac_sha256_init
void hmac_sha256_init(hmac_sha256_ctx *ctx, const unsigned char *key,
                      unsigned int key_size)
{
    unsigned int fill;
    unsigned int num;

    const unsigned char *key_used;
    unsigned char key_temp[SHA256_DIGEST_SIZE];
    int i;

    if (key_size == SHA256_BLOCK_SIZE) {
        key_used = key;
        num = SHA256_BLOCK_SIZE;
    } else {
        if (key_size > SHA256_BLOCK_SIZE){
            num = SHA256_DIGEST_SIZE;
            sha256(key, key_size, key_temp);
            key_used = key_temp;
        } else { /* key_size > SHA256_BLOCK_SIZE */
            key_used = key;
            num = key_size;
        }
        fill = SHA256_BLOCK_SIZE - num;

        memset(ctx->block_ipad + num, 0x36, fill);
        memset(ctx->block_opad + num, 0x5c, fill);
    }

    for (i = 0; i < (int) num; i++) {
        ctx->block_ipad[i] = key_used[i] ^ 0x36;
        ctx->block_opad[i] = key_used[i] ^ 0x5c;
    }

    sha256_init(&ctx->ctx_inside);
    sha256_update(&ctx->ctx_inside, ctx->block_ipad, SHA256_BLOCK_SIZE);

    sha256_init(&ctx->ctx_outside);
    sha256_update(&ctx->ctx_outside, ctx->block_opad,
                  SHA256_BLOCK_SIZE);

    /* for hmac_reinit */
    memcpy(&ctx->ctx_inside_reinit, &ctx->ctx_inside,
           sizeof(sha256_ctx));
    memcpy(&ctx->ctx_outside_reinit, &ctx->ctx_outside,
           sizeof(sha256_ctx));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x40, %eax
cmpl $0x40, %edx
je 0xbc03
movl %edx, %ebp
jbe 0xbbc5
movq %rsp, %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0xc384
movl $0x20, %ebp
movq %r15, %r14
movl $0x40, %r15d
subl %ebp, %r15d
movl %ebp, %r12d
leaq (%rbx,%r12), %rdi
addq $0x2a0, %rdi            # imm = 0x2A0
movl $0x36, %esi
movq %r15, %rdx
callq 0x30e0
leaq (%rbx,%r12), %rdi
addq $0x2e0, %rdi            # imm = 0x2E0
movl $0x5c, %esi
movq %r15, %rdx
callq 0x30e0
movl %ebp, %eax
testl %eax, %eax
jle 0xbc2f
movl %eax, %eax
xorl %ecx, %ecx
movb (%r14,%rcx), %dl
xorb $0x36, %dl
movb %dl, 0x2a0(%rbx,%rcx)
movb (%r14,%rcx), %dl
xorb $0x5c, %dl
movb %dl, 0x2e0(%rbx,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0xbc0b
movq %rbx, %rdi
callq 0xc3dc
leaq 0x2a0(%rbx), %rsi
movq %rbx, %rdi
movl $0x40, %edx
callq 0xc401
leaq 0xa8(%rbx), %r14
movq %r14, %rdi
callq 0xc3dc
leaq 0x2e0(%rbx), %rsi
movq %r14, %rdi
movl $0x40, %edx
callq 0xc401
leaq 0x150(%rbx), %rdi
movl $0xa8, %edx
movq %rbx, %rsi
callq 0x3190
addq $0x1f8, %rbx            # imm = 0x1F8
movl $0xa8, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3190
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/3rdparty/hmac_sha/hmac_sha2.c
// Function: hmac_sha256_final
void hmac_sha256_final(hmac_sha256_ctx *ctx, unsigned char *mac,
                       unsigned int mac_size)
{
    unsigned char digest_inside[SHA256_DIGEST_SIZE];
    unsigned char mac_temp[SHA256_DIGEST_SIZE];

    sha256_final(&ctx->ctx_inside, digest_inside);
    sha256_update(&ctx->ctx_outside, digest_inside, SHA256_DIGEST_SIZE);
    sha256_final(&ctx->ctx_outside, mac_temp);
    memcpy(mac, mac_temp, mac_size);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x20(%rsp), %r12
movq %r12, %rsi
callq 0xc4ab
addq $0xa8, %r15
movq %r15, %rdi
movq %r12, %rsi
movl $0x20, %edx
callq 0xc401
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xc4ab
movl %ebx, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x3190
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/3rdparty/hmac_sha/hmac_sha2.c
// Function: hmac_sha384_init
void hmac_sha384_init(hmac_sha384_ctx *ctx, const unsigned char *key,
                      unsigned int key_size)
{
    unsigned int fill;
    unsigned int num;

    const unsigned char *key_used;
    unsigned char key_temp[SHA384_DIGEST_SIZE];
    int i;

    if (key_size == SHA384_BLOCK_SIZE) {
        key_used = key;
        num = SHA384_BLOCK_SIZE;
    } else {
        if (key_size > SHA384_BLOCK_SIZE){
            num = SHA384_DIGEST_SIZE;
            sha384(key, key_size, key_temp);
            key_used = key_temp;
        } else { /* key_size > SHA384_BLOCK_SIZE */
            key_used = key;
            num = key_size;
        }
        fill = SHA384_BLOCK_SIZE - num;

        memset(ctx->block_ipad + num, 0x36, fill);
        memset(ctx->block_opad + num, 0x5c, fill);
    }

    for (i = 0; i < (int) num; i++) {
        ctx->block_ipad[i] = key_used[i] ^ 0x36;
        ctx->block_opad[i] = key_used[i] ^ 0x5c;
    }

    sha384_init(&ctx->ctx_inside);
    sha384_update(&ctx->ctx_inside, ctx->block_ipad, SHA384_BLOCK_SIZE);

    sha384_init(&ctx->ctx_outside);
    sha384_update(&ctx->ctx_outside, ctx->block_opad,
                  SHA384_BLOCK_SIZE);

    /* for hmac_reinit */
    memcpy(&ctx->ctx_inside_reinit, &ctx->ctx_inside,
           sizeof(sha384_ctx));
    memcpy(&ctx->ctx_outside_reinit, &ctx->ctx_outside,
           sizeof(sha384_ctx));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x80, %eax
cmpl $0x80, %edx
je 0xbe07
movl %edx, %ebp
jbe 0xbdc9
movq %rsp, %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0xca18
movl $0x30, %ebp
movq %r15, %r14
movl $0x80, %r15d
subl %ebp, %r15d
movl %ebp, %r12d
leaq (%rbx,%r12), %rdi
addq $0x520, %rdi            # imm = 0x520
movl $0x36, %esi
movq %r15, %rdx
callq 0x30e0
leaq (%rbx,%r12), %rdi
addq $0x5a0, %rdi            # imm = 0x5A0
movl $0x5c, %esi
movq %r15, %rdx
callq 0x30e0
movl %ebp, %eax
testl %eax, %eax
jle 0xbe33
movl %eax, %eax
xorl %ecx, %ecx
movb (%r14,%rcx), %dl
xorb $0x36, %dl
movb %dl, 0x520(%rbx,%rcx)
movb (%r14,%rcx), %dl
xorb $0x5c, %dl
movb %dl, 0x5a0(%rbx,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0xbe0f
movq %rbx, %rdi
callq 0xca8e
leaq 0x520(%rbx), %rsi
movq %rbx, %rdi
movl $0x80, %edx
callq 0xcab5
leaq 0x148(%rbx), %r14
movq %r14, %rdi
callq 0xca8e
leaq 0x5a0(%rbx), %rsi
movq %r14, %rdi
movl $0x80, %edx
callq 0xcab5
leaq 0x290(%rbx), %rdi
movl $0x148, %edx            # imm = 0x148
movq %rbx, %rsi
callq 0x3190
addq $0x3d8, %rbx            # imm = 0x3D8
movl $0x148, %edx            # imm = 0x148
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3190
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/3rdparty/hmac_sha/hmac_sha2.c
// Function: hmac_sha384_reinit
void hmac_sha384_reinit(hmac_sha384_ctx *ctx)
{
    memcpy(&ctx->ctx_inside, &ctx->ctx_inside_reinit,
           sizeof(sha384_ctx));
    memcpy(&ctx->ctx_outside, &ctx->ctx_outside_reinit,
           sizeof(sha384_ctx));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x290(%rdi), %rsi
movl $0x148, %edx            # imm = 0x148
callq 0x3190
leaq 0x148(%rbx), %rdi
addq $0x3d8, %rbx            # imm = 0x3D8
movl $0x148, %edx            # imm = 0x148
movq %rbx, %rsi
popq %rbx
jmp 0x3190
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/3rdparty/hmac_sha/hmac_sha2.c
// Function: hmac_sha384_final
void hmac_sha384_final(hmac_sha384_ctx *ctx, unsigned char *mac,
                       unsigned int mac_size)
{
    unsigned char digest_inside[SHA384_DIGEST_SIZE];
    unsigned char mac_temp[SHA384_DIGEST_SIZE];

    sha384_final(&ctx->ctx_inside, digest_inside);
    sha384_update(&ctx->ctx_outside, digest_inside, SHA384_DIGEST_SIZE);
    sha384_final(&ctx->ctx_outside, mac_temp);
    memcpy(mac, mac_temp, mac_size);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rsp), %r12
movq %r12, %rsi
callq 0xcb61
addq $0x148, %r15            # imm = 0x148
movq %r15, %rdi
movq %r12, %rsi
movl $0x30, %edx
callq 0xcab5
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xcb61
movl %ebx, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x3190
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/3rdparty/hmac_sha/hmac_sha2.c
// Function: hmac_sha512_init
void hmac_sha512_init(hmac_sha512_ctx *ctx, const unsigned char *key,
                      unsigned int key_size)
{
    unsigned int fill;
    unsigned int num;

    const unsigned char *key_used;
    unsigned char key_temp[SHA512_DIGEST_SIZE];
    int i;

    if (key_size == SHA512_BLOCK_SIZE) {
        key_used = key;
        num = SHA512_BLOCK_SIZE;
    } else {
        if (key_size > SHA512_BLOCK_SIZE){
            num = SHA512_DIGEST_SIZE;
            sha512(key, key_size, key_temp);
            key_used = key_temp;
        } else { /* key_size > SHA512_BLOCK_SIZE */
            key_used = key;
            num = key_size;
        }
        fill = SHA512_BLOCK_SIZE - num;

        memset(ctx->block_ipad + num, 0x36, fill);
        memset(ctx->block_opad + num, 0x5c, fill);
    }

    for (i = 0; i < (int) num; i++) {
        ctx->block_ipad[i] = key_used[i] ^ 0x36;
        ctx->block_opad[i] = key_used[i] ^ 0x5c;
    }

    sha512_init(&ctx->ctx_inside);
    sha512_update(&ctx->ctx_inside, ctx->block_ipad, SHA512_BLOCK_SIZE);

    sha512_init(&ctx->ctx_outside);
    sha512_update(&ctx->ctx_outside, ctx->block_opad,
                  SHA512_BLOCK_SIZE);

    /* for hmac_reinit */
    memcpy(&ctx->ctx_inside_reinit, &ctx->ctx_inside,
           sizeof(sha512_ctx));
    memcpy(&ctx->ctx_outside_reinit, &ctx->ctx_outside,
           sizeof(sha512_ctx));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x80, %eax
cmpl $0x80, %edx
je 0xc00b
movl %edx, %ebp
jbe 0xbfcd
movq %rsp, %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0xc7ae
movl $0x40, %ebp
movq %r15, %r14
movl $0x80, %r15d
subl %ebp, %r15d
movl %ebp, %r12d
leaq (%rbx,%r12), %rdi
addq $0x520, %rdi            # imm = 0x520
movl $0x36, %esi
movq %r15, %rdx
callq 0x30e0
leaq (%rbx,%r12), %rdi
addq $0x5a0, %rdi            # imm = 0x5A0
movl $0x5c, %esi
movq %r15, %rdx
callq 0x30e0
movl %ebp, %eax
testl %eax, %eax
jle 0xc037
movl %eax, %eax
xorl %ecx, %ecx
movb (%r14,%rcx), %dl
xorb $0x36, %dl
movb %dl, 0x520(%rbx,%rcx)
movb (%r14,%rcx), %dl
xorb $0x5c, %dl
movb %dl, 0x5a0(%rbx,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0xc013
movq %rbx, %rdi
callq 0xc824
leaq 0x520(%rbx), %rsi
movq %rbx, %rdi
movl $0x80, %edx
callq 0xc84b
leaq 0x148(%rbx), %r14
movq %r14, %rdi
callq 0xc824
leaq 0x5a0(%rbx), %rsi
movq %r14, %rdi
movl $0x80, %edx
callq 0xc84b
leaq 0x290(%rbx), %rdi
movl $0x148, %edx            # imm = 0x148
movq %rbx, %rsi
callq 0x3190
addq $0x3d8, %rbx            # imm = 0x3D8
movl $0x148, %edx            # imm = 0x148
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3190
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/blasphemy[P]mmc-utils/3rdparty/hmac_sha/hmac_sha2.c
// Function: hmac_sha512_final
void hmac_sha512_final(hmac_sha512_ctx *ctx, unsigned char *mac,
                       unsigned int mac_size)
{
    unsigned char digest_inside[SHA512_DIGEST_SIZE];
    unsigned char mac_temp[SHA512_DIGEST_SIZE];

    sha512_final(&ctx->ctx_inside, digest_inside);
    sha512_update(&ctx->ctx_outside, digest_inside, SHA512_DIGEST_SIZE);
    sha512_final(&ctx->ctx_outside, mac_temp);
    memcpy(mac, mac_temp, mac_size);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x40(%rsp), %r12
movq %r12, %rsi
callq 0xc8f7
addq $0x148, %r15            # imm = 0x148
movq %r15, %rdi
movq %r12, %rsi
movl $0x40, %edx
callq 0xc84b
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xc8f7
movl %ebx, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x3190
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/test/test_khash.c
// Function: make_keys
char * make_keys(size_t num, size_t kl) {
    size_t i;
    char *keys;

    if (num > MAX_ENTRIES) return NULL;
    keys = malloc(kl * num);
    if (!keys) {
        perror(NULL);
        return NULL;
    }
    for (i = 0; i < num; i++) {
        if (snprintf(keys + kl * i, kl, "test%zu", i) >= kl) {
            free(keys);
            return NULL;
        }
    }

    return keys;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x5f5e0ff, %rdi        # imm = 0x5F5E0FF
ja 0x134a
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
imulq %r15, %rdi
callq 0x10f0
testq %rax, %rax
je 0x135e
movq %rax, %rbx
testq %r15, %r15
je 0x134c
leaq 0x1d46(%rip), %r12      # 0x305c
movq %rbx, %r13
xorl %ebp, %ebp
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x1140
cltq
cmpq %r14, %rax
jae 0x1342
incq %rbp
addq %r14, %r13
cmpq %rbp, %r15
jne 0x131b
jmp 0x134c
movq %rbx, %rdi
callq 0x10e0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x1090
jmp 0x134c
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/test/test_khash.c
// Function: show_usage
static void show_usage(FILE *out, char *prog) {
    fprintf(out, "Usage : %s [-t <test>] [-i <file>]\n", prog);
    fprintf(out, " Options:\n");
    fprintf(out, "  -t <TEST>   Test to run (str2int, benchmark)\n");
    fprintf(out, "  -i <FILE>   Optional input file for benchmark\n");
    fprintf(out, "  -n <INT>    Number of items to add\n");
    fprintf(out, "  -f <FRAC>   Fraction to delete and re-insert\n");
    fprintf(out, "  -d          Dump hash table stats\n");
    fprintf(out, "  -h          Show this help\n");
}

// Assembly:
pushq %rbx
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0xf65(%rip), %rsi       # 0x30cc
xorl %eax, %eax
callq 0x1110
leaq 0xf7b(%rip), %rdi       # 0x30f0
movl $0xa, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1190
leaq 0xf6d(%rip), %rdi       # 0x30fb
movl $0x2f, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1190
leaq 0xf84(%rip), %rdi       # 0x312b
movl $0x30, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1190
leaq 0xf9c(%rip), %rdi       # 0x315c
movl $0x25, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1190
leaq 0xfa9(%rip), %rdi       # 0x3182
movl $0x2f, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1190
leaq 0xfc0(%rip), %rdi       # 0x31b2
movl $0x24, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1190
leaq 0xfcc(%rip), %rdi       # 0x31d7
movl $0x1d, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/test/test_khash.c
// Function: add_str2int_entry
static int add_str2int_entry(khash_t(str2int) *h, char *key, khint_t val) {
    int ret = 0;
    khint_t k = kh_put(str2int, h, key, &ret);

    if (ret != 1 && ret != 2) {
        fprintf(stderr, "Unexpected return from kh_put(%s) : %d\n", key, ret);
        return -1;
    }
    kh_val(h, k) = val;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x4(%rsp), %r15
movl $0x0, (%r15)
movq %r15, %rdx
callq 0x266f
movl (%r15), %ecx
leal -0x3(%rcx), %edx
cmpl $-0x3, %edx
jbe 0x2262
movq 0x20(%r14), %rcx
movl %eax, %eax
movl %ebp, (%rcx,%rax,4)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x2d77(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
leaq 0xf82(%rip), %rsi       # 0x31f5
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1110
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2257
// File: /workspace/github_c_makefile_star2_O1/leiradel[P]zx48k-libretro/src/ay38910.h
// Function: ay38910_init
void ay38910_init(ay38910_t* ay, const ay38910_desc_t* desc) {
    CHIPS_ASSERT(ay && desc);
    CHIPS_ASSERT(desc->tick_hz > 0);
    CHIPS_ASSERT(desc->sound_hz > 0);
    memset(ay, 0, sizeof(*ay));
    /* note: input and output callbacks are optional */
    ay->in_cb = desc->in_cb;
    ay->out_cb = desc->out_cb;
    ay->user_data = desc->user_data;
    ay->type = desc->type;
    ay->noise.rng = 1;
    ay->sample_period = (desc->tick_hz * AY38910_FIXEDPOINT_SCALE) / desc->sound_hz;
    ay->sample_counter = ay->sample_period;
    ay->mag = desc->magnitude;
    _ay38910_update_values(ay);
    _ay38910_restart_env_shape(ay);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3353
movq %rsi, %r14
testq %rsi, %rsi
je 0x3353
cmpl $0x0, 0x4(%r14)
jle 0x3372
cmpl $0x0, 0x8(%r14)
jle 0x3391
movq %rdi, %rbx
xorl %r15d, %r15d
movl $0x8a0, %edx            # imm = 0x8A0
xorl %esi, %esi
callq 0x30e0
movq 0x10(%r14), %rax
movq %rax, 0x8(%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x20(%r14), %rax
movq %rax, 0x18(%rbx)
movl (%r14), %eax
movl %eax, (%rbx)
movl $0x1, 0x6c(%rbx)
movl 0x4(%r14), %eax
shll $0x4, %eax
cltd
idivl 0x8(%r14)
movl %eax, 0x88(%rbx)
movl %eax, 0x8c(%rbx)
movss 0xc(%r14), %xmm0
movss %xmm0, 0x90(%rbx)
movq %rbx, %rdi
callq 0x33b0
movb %r15b, 0x78(%rbx)
movb %r15b, 0x7a(%rbx)
movb 0x32(%rbx), %al
andb $0x9, %al
cmpb $0x8, %al
setne 0x79(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10846(%rip), %rdi     # 0x13ba0
leaq 0x1084a(%rip), %rsi     # 0x13bab
leaq 0x10851(%rip), %rcx     # 0x13bb9
movl $0x191, %edx            # imm = 0x191
callq 0x30b0
leaq 0x10877(%rip), %rdi     # 0x13bf0
leaq 0x1082b(%rip), %rsi     # 0x13bab
leaq 0x10832(%rip), %rcx     # 0x13bb9
movl $0x192, %edx            # imm = 0x192
callq 0x30b0
leaq 0x1086a(%rip), %rdi     # 0x13c02
leaq 0x1080c(%rip), %rsi     # 0x13bab
leaq 0x10813(%rip), %rcx     # 0x13bb9
movl $0x193, %edx            # imm = 0x193
callq 0x30b0
// File: /workspace/github_c_makefile_star2_O1/leiradel[P]zx48k-libretro/src/ay38910.h
// Function: ay38910_update_values
static void _ay38910_update_values(ay38910_t* ay) {
    for (int i = 0; i < AY38910_NUM_CHANNELS; i++) {
        ay38910_tone_t* chn = &ay->tone[i];
        /* "...Note also that due to the design technique used in the Tone Period
           count-down, the lowest period value is 000000000001 (divide by 1)
           and the highest period value is 111111111111 (divide by 4095)
        */
        chn->period = (ay->reg[2*i+1]<<8)|(ay->reg[2*i]);
        if (0 == chn->period) {
            chn->period = 1;
        }
        /* a set 'enable bit' actually means 'disabled' */
        chn->tone_disable = (ay->enable>>i) & 1;
        chn->noise_disable = (ay->enable>>(3+i)) & 1;
    }
    /* noise generator values */
    ay->noise.period = ay->period_noise;
    if (ay->noise.period == 0) {
        ay->noise.period = 1;
    }
    /* envelope generator values */
    ay->env.period = (ay->period_env_coarse<<8)|ay->period_env_fine;
    if (ay->env.period == 0) {
        ay->env.period = 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl 0x2c(%rdi), %eax
leaq 0x44(%rdi), %rcx
xorl %edx, %edx
movq %rcx, %rsi
movzwl -0x1f(%rcx,%rdx,2), %r8d
cmpw $0x1, %r8w
adcl $0x0, %r8d
movw %r8w, -0xc(%rsi)
xorl %r8d, %r8d
btl %edx, %eax
setb %r8b
movl %r8d, -0x4(%rsi)
leal 0x3(%rdx), %r8d
movzbl %r8b, %r8d
xorl %r9d, %r9d
btl %r8d, %eax
setb %r9b
movl %r9d, (%rsi)
incq %rdx
addq $0x10, %rsi
cmpq $0x3, %rdx
jne 0x33c1
movzbl 0x2b(%rdi), %eax
cmpb $0x1, %al
adcl $0x0, %eax
movzbl %al, %eax
movw %ax, 0x68(%rdi)
movzwl 0x30(%rdi), %eax
cmpw $0x1, %ax
adcl $0x0, %eax
movw %ax, 0x74(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/leiradel[P]zx48k-libretro/src/ay38910.h
// Function: ay38910_reset
void ay38910_reset(ay38910_t* ay) {
    CHIPS_ASSERT(ay);
    ay->addr = 0;
    ay->tick = 0;
    for (int i = 0; i < AY38910_NUM_REGISTERS; i++) {
        ay->reg[i] = 0;
    }
    _ay38910_update_values(ay);
    _ay38910_restart_env_shape(ay);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3463
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movq $0x0, 0x2d(%rdi)
callq 0x33b0
xorl %eax, %eax
movb %al, 0x78(%rbx)
movb %al, 0x7a(%rbx)
movb 0x32(%rbx), %al
andb $0x9, %al
cmpb $0x8, %al
setne 0x79(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x107ab(%rip), %rdi     # 0x13c15
leaq 0x1073a(%rip), %rsi     # 0x13bab
leaq 0x107a0(%rip), %rcx     # 0x13c18
movl $0x1a3, %edx            # imm = 0x1A3
callq 0x30b0
// File: /workspace/github_c_makefile_star2_O1/leiradel[P]zx48k-libretro/src/beeper.h
// Function: beeper_init
void beeper_init(beeper_t* b, int tick_hz, int sound_hz, float magnitude) {
    CHIPS_ASSERT(b);
    CHIPS_ASSERT((tick_hz > 0) && (sound_hz > 0));
    memset(b, 0, sizeof(*b));
    b->period = (tick_hz * BEEPER_FIXEDPOINT_SCALE) / sound_hz;
    b->counter = b->period;
    b->mag = magnitude;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3828
movl %esi, %r15d
movss %xmm0, -0x1c(%rbp)
testl %esi, %esi
jle 0x3847
movl %edx, %r14d
testl %edx, %edx
jle 0x3847
movq %rdi, %rbx
movl $0x81c, %edx            # imm = 0x81C
xorl %esi, %esi
callq 0x30e0
shll $0x4, %r15d
movl %r15d, %eax
xorl %edx, %edx
divl %r14d
movl %eax, 0x4(%rbx)
movl %eax, 0x8(%rbx)
movss -0x1c(%rbp), %xmm0
movss %xmm0, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x108e3(%rip), %rdi     # 0x14112
leaq 0x10402(%rip), %rsi     # 0x13c38
leaq 0x10408(%rip), %rcx     # 0x13c45
movl $0x4c, %edx
callq 0x30b0
leaq 0x10425(%rip), %rdi     # 0x13c73
leaq 0x103e3(%rip), %rsi     # 0x13c38
leaq 0x103e9(%rip), %rcx     # 0x13c45
movl $0x4d, %edx
callq 0x30b0
// File: /workspace/github_c_makefile_star2_O1/leiradel[P]zx48k-libretro/src/beeper.h
// Function: beeper_reset
void beeper_reset(beeper_t* b) {
    CHIPS_ASSERT(b);
    b->state = 0;
    b->counter = b->period;
    b->sample = 0;
}

// Assembly:
testq %rdi, %rdi
je 0x3879
xorl %eax, %eax
movl %eax, (%rdi)
movl 0x4(%rdi), %ecx
movl %ecx, 0x8(%rdi)
movl %eax, 0x10(%rdi)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x1088e(%rip), %rdi     # 0x14112
leaq 0x103ad(%rip), %rsi     # 0x13c38
leaq 0x10401(%rip), %rcx     # 0x13c93
movl $0x55, %edx
callq 0x30b0