LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
cmpl $0x2, %edi
jne 0x3b5f
movq 0x8(%rsi), %rbx
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x31e0
testl %eax, %eax
js 0x3b83
movq %rsp, %rsi
movl %eax, %edi
callq 0x39b8
testl %eax, %eax
jne 0x3b97
movq %rsp, %rdi
callq 0x3bbe
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %rbp
retq
movq 0x1448a(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xab60(%rip), %rdx      # 0xe6d0
pushq $0x1
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x3250
movl %ebx, %edi
callq 0x3230
leaq 0xd45b(%rip), %rdi      # 0x10fe5
callq 0x31f0
pushq $0x1
popq %rdi
callq 0x3230
movq 0x14452(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xab5d(%rip), %rdx      # 0xe705
pushq $0x1
popq %rbp
movl %ebp, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3250
movl %ebp, %edi
callq 0x3230
// File: /workspace/github_c_makefile_star2_O2/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 0x3ca7
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movzbl 0xae(%rdi), %edx
leaq 0xdc12(%rip), %rsi      # 0x117f5
pushq $0x1
popq %rbx
movl %ebx, %edi
xorl %eax, %eax
callq 0x31d0
movzbl 0xad(%r14), %ebp
leaq 0xdc38(%rip), %rsi      # 0x11836
movl %ebx, %edi
movl %ebp, %edx
xorl %eax, %eax
callq 0x31d0
leaq 0xdc54(%rip), %rsi      # 0x11864
movl %ebx, %edi
xorl %eax, %eax
callq 0x31d0
testb $0x40, %bpl
leaq 0xdc58(%rip), %r15      # 0x1187c
leaq 0xdc4d(%rip), %r14      # 0x11878
movq %r14, %rsi
cmoveq %r15, %rsi
movl %ebx, %edi
xorl %eax, %eax
callq 0x31d0
leaq 0xdc44(%rip), %rsi      # 0x11886
movl %ebx, %edi
xorl %eax, %eax
callq 0x31d0
testb $0x10, %bpl
cmoveq %r15, %r14
movl %ebx, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x31d0
leaq 0xdc38(%rip), %rsi      # 0x1189e
movl %ebx, %edi
xorl %eax, %eax
callq 0x31d0
testb $0x4, %bpl
leaq 0xdc66(%rip), %rax      # 0x118e0
leaq 0xdc4b(%rip), %rcx      # 0x118cc
cmoveq %rax, %rcx
testb $0x1, %bpl
leaq 0xdc20(%rip), %rsi      # 0x118b0
cmoveq %rcx, %rsi
movl %ebx, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x31d0
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3d0a
movq 0x8(%rsi), %rbx
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x31e0
testl %eax, %eax
js 0x3d2e
movl %eax, %r14d
movq %rsp, %rsi
movl %eax, %edi
callq 0x39b8
testl %eax, %eax
jne 0x3d42
movzbl 0xad(%rsp), %ebp
orl $0x1, %ebp
movl %r14d, %edi
movl $0xad, %esi
movl %ebp, %edx
callq 0x3a43
testl %eax, %eax
jne 0x3d69
xorl %eax, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
movq 0x142df(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xaa0a(%rip), %rdx      # 0xe725
pushq $0x1
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x3250
movl %ebx, %edi
callq 0x3230
leaq 0xd2b0(%rip), %rdi      # 0x10fe5
callq 0x31f0
pushq $0x1
popq %rdi
callq 0x3230
movq 0x142a7(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xa9b2(%rip), %rdx      # 0xe705
pushq $0x1
popq %rbp
movl %ebp, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3250
movl %ebp, %edi
callq 0x3230
movq 0x14280(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xa9e0(%rip), %rdx      # 0xe75a
pushq $0x1
popq %r14
movl %r14d, %esi
movl %ebp, %ecx
movl $0xad, %r8d
movq %rbx, %r9
xorl %eax, %eax
callq 0x3250
movl %r14d, %edi
callq 0x3230
// File: /workspace/github_c_makefile_star2_O2/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 0x4468
movq 0x8(%rsi), %rbx
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x31e0
testl %eax, %eax
js 0x448c
movl %eax, %ebp
movq %rsp, %rsi
movl %eax, %edi
callq 0x39b8
testl %eax, %eax
jne 0x44a0
movb 0x3d(%rsp), %cl
movb 0x3f(%rsp), %al
testb %al, %al
sete %dl
testb %cl, %cl
setne %sil
orb %dl, %sil
je 0x4427
testb %cl, %cl
setne %cl
testb %al, %al
setne %al
testb %cl, %al
je 0x4431
leaq 0xa59b(%rip), %rsi      # 0xe9c0
jmp 0x4452
testb $0x4, 0xa6(%rsp)
jne 0x443a
leaq 0xa5c5(%rip), %rsi      # 0xe9fd
jmp 0x4452
pushq $0x3e
popq %rsi
pushq $0x1
popq %rdx
movl %ebp, %edi
callq 0x3a43
testl %eax, %eax
jne 0x44c7
leaq 0xa50b(%rip), %rsi      # 0xe95d
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x31d0
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %rbp
retq
movq 0x13b81(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xa4ae(%rip), %rdx      # 0xe927
pushq $0x1
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x3250
movl %ebx, %edi
callq 0x3230
leaq 0xcb52(%rip), %rdi      # 0x10fe5
callq 0x31f0
pushq $0x1
popq %rdi
callq 0x3230
movq 0x13b49(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xa254(%rip), %rdx      # 0xe705
pushq $0x1
popq %rbp
movl %ebp, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3250
movl %ebp, %edi
callq 0x3230
movq 0x13b22(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xa282(%rip), %rdx      # 0xe75a
pushq $0x1
popq %rbp
pushq $0x3f
popq %r8
movl %ebp, %esi
movl %ebp, %ecx
movq %rbx, %r9
xorl %eax, %eax
callq 0x3250
jmp 0x44c0
// File: /workspace/github_c_makefile_star2_O2/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 0x48e7
movl %edi, %ebp
movq 0x8(%rdx), %rbx
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x31e0
testl %eax, %eax
js 0x490b
movl %eax, %r14d
movq %rsp, %rsi
movl %eax, %edi
callq 0x39b8
testl %eax, %eax
jne 0x491f
movzbl 0xa2(%rsp), %eax
andl $0x3, %eax
cmpl $0x2, %eax
je 0x4932
cmpl $0x1, %eax
je 0x4945
movzbl %bpl, %edx
movl %r14d, %edi
movl $0xa2, %esi
callq 0x3a43
testl %eax, %eax
jne 0x496c
xorl %eax, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
movq 0x13702(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xa2d4(%rip), %rdx      # 0xebcc
pushq $0x1
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x3250
movl %ebx, %edi
callq 0x3230
leaq 0xc6d3(%rip), %rdi      # 0x10fe5
callq 0x31f0
pushq $0x1
popq %rdi
callq 0x3230
movq 0x136ca(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0x9dd5(%rip), %rdx      # 0xe705
jmp 0x4956
movq 0x136b7(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xa2e7(%rip), %rdx      # 0xec2a
jmp 0x4956
movq 0x136a4(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xa2a4(%rip), %rdx      # 0xebfa
pushq $0x1
popq %rbp
movl %ebp, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3250
movl %ebp, %edi
callq 0x3230
movq 0x1367d(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0x9ddd(%rip), %rdx      # 0xe75a
pushq $0x1
popq %r14
movl %r14d, %esi
movl %ebp, %ecx
movl $0xa2, %r8d
movq %rbx, %r9
xorl %eax, %eax
callq 0x3250
movl %r14d, %edi
callq 0x3230
// File: /workspace/github_c_makefile_star2_O2/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 0x4a1e
movq 0x8(%rsi), %rbx
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x31e0
testl %eax, %eax
js 0x4a42
movl %eax, %ebp
movq %rsp, %rsi
movl %eax, %edi
callq 0x39b8
testl %eax, %eax
jne 0x4a56
testb $0x1, 0x1f6(%rsp)
je 0x4a69
pushq $0x1
popq %rdx
movl %ebp, %edi
movl $0xa3, %esi
callq 0x3a43
testl %eax, %eax
jne 0x4a8b
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %rbp
retq
movq 0x135cb(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xa22c(%rip), %rdx      # 0xec5b
pushq $0x1
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x3250
movl %ebx, %edi
callq 0x3230
leaq 0xc59c(%rip), %rdi      # 0x10fe5
callq 0x31f0
pushq $0x1
popq %rdi
callq 0x3230
movq 0x13593(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0x9c9e(%rip), %rdx      # 0xe705
jmp 0x4a7a
movq 0x13580(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xa20d(%rip), %rdx      # 0xec87
pushq $0x1
popq %rbp
movl %ebp, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3250
jmp 0x4ab3
movq 0x1355e(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0x9cbe(%rip), %rdx      # 0xe75a
pushq $0x1
popq %rbp
movl %ebp, %esi
xorl %ecx, %ecx
movl $0xa3, %r8d
movq %rbx, %r9
xorl %eax, %eax
callq 0x3250
movl %ebp, %edi
callq 0x3230
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
pushq %rax
cmpl $0x2, %edi
jne 0x4b05
movq 0x8(%rsi), %rbx
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x31e0
testl %eax, %eax
js 0x4b29
leaq 0x4(%rsp), %rsi
movl %eax, %edi
callq 0x3ab3
testl %eax, %eax
jne 0x4b3d
movl 0x4(%rsp), %edx
leaq 0xa209(%rip), %rsi      # 0xecfb
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x31d0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x134e4(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xa18b(%rip), %rdx      # 0xeca1
pushq $0x1
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x3250
movl %ebx, %edi
callq 0x3230
leaq 0xc4b5(%rip), %rdi      # 0x10fe5
callq 0x31f0
pushq $0x1
popq %rdi
callq 0x3230
movq 0x134ac(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xa17d(%rip), %rdx      # 0xeccb
pushq $0x1
popq %rbp
movl %ebp, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3250
movl %ebp, %edi
callq 0x3230
// File: /workspace/github_c_makefile_star2_O2/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 0x4bd1
cmpl $0x1, %edi
jne 0x4be9
movq 0x1344d(%rip), %r14     # 0x17ff0
movq (%r14), %rdi
leaq 0xa16c(%rip), %rdx      # 0xed19
pushq $0x1
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x3250
movq (%r14), %rdi
leaq 0xa17f(%rip), %rdx      # 0xed42
movl %ebx, %esi
xorl %eax, %eax
callq 0x3250
jmp 0x4c9f
leaq 0xa1b2(%rip), %rsi      # 0xed8a
xorl %ebx, %ebx
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x31d0
jmp 0x4c9f
movl %edx, %ebp
movq %rsi, %r14
movq 0x133fb(%rip), %r15     # 0x17ff0
movq (%r15), %rdi
leaq 0xa1e3(%rip), %rdx      # 0xede2
pushq $0x1
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x3250
movl %ebp, %edi
movl $0x9b, %esi
movl %ebx, %edx
callq 0x3a43
testl %eax, %eax
je 0x4c3a
movq (%r15), %rdi
leaq 0xa1e5(%rip), %rdx      # 0xee0c
movl %ebx, %esi
movl $0x9b, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x3250
jmp 0x4c9f
leaq 0x4(%rsp), %rsi
movl %ebp, %edi
callq 0x3ab3
testl %eax, %eax
je 0x4c56
movq (%r15), %rdi
leaq 0xa1e2(%rip), %rdx      # 0xee36
jmp 0x4c90
testb $-0x80, 0x4(%rsp)
movq (%r15), %rdi
jne 0x4c89
leaq 0xa234(%rip), %rdx      # 0xee9b
xorl %ebx, %ebx
pushq $0x1
popq %rbp
movl %ebp, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x3250
movq (%r15), %rdi
leaq 0xa250(%rip), %rdx      # 0xeed2
movl %ebp, %esi
jmp 0x4bc5
leaq 0xa1d5(%rip), %rdx      # 0xee65
pushq $0x1
popq %rbx
movl %ebx, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x3250
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
pushq %rax
cmpl $0x2, %edi
jne 0x6a34
movq 0x8(%rsi), %rbx
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x31e0
testl %eax, %eax
js 0x6a58
pushq $0x1
popq %rdx
movl %eax, %edi
movl $0xa5, %esi
callq 0x3a43
testl %eax, %eax
jne 0x6a6c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x115b5(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xa530(%rip), %rdx      # 0x10f75
pushq $0x1
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x3250
movl %ebx, %edi
callq 0x3230
leaq 0xa586(%rip), %rdi      # 0x10fe5
callq 0x31f0
pushq $0x1
popq %rdi
callq 0x3230
movq 0x1157d(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0x7cdd(%rip), %rdx      # 0xe75a
pushq $0x1
popq %rbp
movl %ebp, %esi
movl %ebp, %ecx
movl $0xa5, %r8d
movq %rbx, %r9
xorl %eax, %eax
callq 0x3250
movl %ebp, %edi
callq 0x3230
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rcx
movl %ebp, %edi
movq %r14, %rsi
callq 0x6c66
testl %eax, %eax
jne 0x6f04
movzwl 0x1fc(%rsp), %eax
testw %ax, %ax
je 0x6eeb
rolw $0x8, %ax
movzwl %ax, %eax
jmp 0x6ef8
movl 0x1f4(%rsp), %eax
bswapl %eax
movl %eax, (%rbx)
xorl %eax, %eax
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xa13e(%rip), %rdi      # 0x11049
callq 0x31f0
pushq $0x1
popq %rdi
callq 0x3230
// File: /workspace/github_c_makefile_star2_O2/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 0x6f6a
movq 0x8(%rsi), %rdi
pushq $0x2
popq %rsi
xorl %eax, %eax
callq 0x31e0
testl %eax, %eax
js 0x6f89
movl %eax, %ebx
leaq 0xc(%rsp), %rsi
movl %eax, %edi
callq 0x6e90
testl %eax, %eax
jne 0x6f9d
movl %ebx, %edi
callq 0x3100
movl 0xc(%rsp), %edx
leaq 0xa15f(%rip), %rsi      # 0x110b7
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x31d0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
movq 0x1107f(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0xa107(%rip), %rdx      # 0x11082
pushq $0x1
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x3250
jmp 0x6fb2
leaq 0xa04e(%rip), %rdi      # 0x10fde
callq 0x31f0
pushq $0x1
popq %rdi
callq 0x3230
leaq 0xa0b7(%rip), %rsi      # 0x1105b
pushq $0x1
popq %rbx
movl %ebx, %edi
movl %eax, %edx
xorl %eax, %eax
callq 0x31d0
movl %ebx, %edi
callq 0x3230
// File: /workspace/github_c_makefile_star2_O2/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 0x77b7
movl %edi, %ebp
movq 0x8(%rdx), %rbx
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x31e0
testl %eax, %eax
js 0x77db
movl %eax, %r14d
movq %rsp, %rsi
movl %eax, %edi
callq 0x39b8
testl %eax, %eax
jne 0x77ef
cmpb $0x5, 0xc0(%rsp)
jbe 0x7802
cmpl $0x0, 0xf9(%rsp)
je 0x7815
movzbl %bpl, %edx
pushq $0x21
popq %rsi
movl %r14d, %edi
callq 0x3a43
testl %eax, %eax
jne 0x783c
xorl %eax, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
movq 0x10832(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0x9bc9(%rip), %rdx      # 0x11391
pushq $0x1
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x3250
movl %ebx, %edi
callq 0x3230
leaq 0x9803(%rip), %rdi      # 0x10fe5
callq 0x31f0
pushq $0x1
popq %rdi
callq 0x3230
movq 0x107fa(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0x6f05(%rip), %rdx      # 0xe705
jmp 0x7826
movq 0x107e7(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0x9baa(%rip), %rdx      # 0x113bd
jmp 0x7826
movq 0x107d4(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0x9bd3(%rip), %rdx      # 0x113f9
pushq $0x1
popq %rbp
movl %ebp, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3250
movl %ebp, %edi
callq 0x3230
movq 0x107ad(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0x6f0d(%rip), %rdx      # 0xe75a
pushq $0x1
popq %r14
pushq $0x21
popq %r8
movl %r14d, %esi
movl %ebp, %ecx
movq %rbx, %r9
xorl %eax, %eax
callq 0x3250
movl %r14d, %edi
callq 0x3230
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movl %edi, %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x7e6c
movq %rsi, %r14
movl %edi, %eax
movq -0x8(%rsi,%rax,8), %rbx
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x31e0
testl %eax, %eax
js 0x7e86
movq %rsp, %rdx
movl %eax, %edi
movl $0x110005fb, %esi       # imm = 0x110005FB
callq 0x7ec1
testl %eax, %eax
jne 0x7e9a
movq 0x8(%r14), %rcx
movzbl (%rcx), %eax
subl $0x2d, %eax
jne 0x7de9
movzbl 0x1(%rcx), %eax
subl $0x64, %eax
jne 0x7de9
movzbl 0x2(%rcx), %eax
negl %eax
testl %eax, %eax
jne 0x7df7
movq %rsp, %rdi
callq 0x7f58
movsbl (%rsp), %edx
movsbl 0x1(%rsp), %ecx
movsbl 0x2(%rsp), %r8d
movsbl 0x3(%rsp), %r9d
leaq 0x992b(%rip), %rsi      # 0x1173e
pushq $0x1
popq %rbx
movl %ebx, %edi
xorl %eax, %eax
callq 0x31d0
movsbl 0x7(%rsp), %edx
leaq 0x9940(%rip), %rsi      # 0x1176b
movl %ebx, %edi
xorl %eax, %eax
callq 0x31d0
movsbl 0x8(%rsp), %edx
leaq 0x9945(%rip), %rsi      # 0x11785
movl %ebx, %edi
xorl %eax, %eax
callq 0x31d0
movsbl 0x9(%rsp), %edx
leaq 0x9956(%rip), %rsi      # 0x117ab
movl %ebx, %edi
xorl %eax, %eax
callq 0x31d0
xorl %eax, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x989b(%rip), %rsi      # 0x1170e
pushq $0x1
popq %rbx
movl %ebx, %edi
xorl %eax, %eax
callq 0x31d0
movl %ebx, %edi
callq 0x3230
leaq 0x9158(%rip), %rdi      # 0x10fe5
callq 0x31f0
pushq $0x1
popq %rdi
callq 0x3230
movq 0x1014f(%rip), %rax     # 0x17ff0
movq (%rax), %rdi
leaq 0x987c(%rip), %rdx      # 0x11727
pushq $0x1
popq %rbp
movl %ebp, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3250
movl %ebp, %edi
callq 0x3230
// File: /workspace/github_c_makefile_star2_O2/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)
movl $0x200, %edx            # imm = 0x200
movq %rbx, %rdi
xorl %esi, %esi
callq 0x30e0
andl $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 0x7f4a
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9617(%rip), %rdi      # 0x11568
callq 0x31f0
jmp 0x7f3d
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x9863(%rip), %rsi      # 0x117cd
pushq $0x1
popq %rbp
movl %ebp, %edi
xorl %eax, %eax
callq 0x31d0
leaq 0x986a(%rip), %r14      # 0x117e7
leaq 0x986b(%rip), %r15      # 0x117ef
xorl %r12d, %r12d
cmpq $0x200, %r12            # imm = 0x200
je 0x7fbb
testb $0xf, %r12b
jne 0x7fa5
movl %ebp, %edi
movq %r14, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x31d0
movsbl (%rbx,%r12), %edx
movl %ebp, %edi
movq %r15, %rsi
xorl %eax, %eax
callq 0x31d0
incq %r12
jmp 0x7f87
leaq 0xab58(%rip), %rsi      # 0x12b1a
pushq $0x1
popq %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x31d0
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
leaq 0x9c74(%rip), %rsi      # 0x11c50
pushq $0x1
popq %rbx
movl %ebx, %edi
xorl %eax, %eax
callq 0x31d0
leaq 0xab2b(%rip), %rsi      # 0x12b1a
movl %ebx, %edi
xorl %eax, %eax
callq 0x31d0
leaq 0x9c7f(%rip), %rsi      # 0x11c7e
movl %ebx, %edi
xorl %eax, %eax
callq 0x31d0
leaq 0x9c79(%rip), %rsi      # 0x11c88
movl %ebx, %edi
xorl %eax, %eax
callq 0x31d0
leaq 0x9c7e(%rip), %rsi      # 0x11c9d
movl %ebx, %edi
xorl %eax, %eax
popq %rbx
jmp 0x31d0
// File: /workspace/github_c_makefile_star2_O2/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 0x9c74(%rip), %r15      # 0x11cb7
leaq 0x9cb7(%rip), %r12      # 0x11d01
pushq $0x1
popq %r13
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3200
cmpl $0x76, %eax
je 0x8093
cmpl $-0x1, %eax
je 0x8099
cmpl $0x3a, %eax
je 0x80b8
cmpl $0x3f, %eax
je 0x80d0
cmpl $0x68, %eax
je 0x810b
movq 0xff71(%rip), %rcx      # 0x17ff0
movq (%rcx), %rdi
movl %r13d, %esi
movq %r12, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x3250
jmp 0x804e
movb $0x1, 0x10(%rbx)
jmp 0x804e
movq 0xff30(%rip), %rax      # 0x17fd0
movslq (%rax), %rax
cmpl %ebp, %eax
jge 0x80f0
movq (%r14,%rax,8), %rdi
callq 0x3260
movq %rax, 0x8(%rbx)
xorl %eax, %eax
jmp 0x8113
movq 0xff31(%rip), %rax      # 0x17ff0
movq (%rax), %rdi
leaq 0x9c14(%rip), %rdx      # 0x11cdd
pushq $0x1
popq %rsi
pushq $0x3a
jmp 0x80e6
movq 0xff19(%rip), %rax      # 0x17ff0
movq (%rax), %rdi
leaq 0x9bd9(%rip), %rdx      # 0x11cba
pushq $0x1
popq %rsi
pushq $0x3f
popq %rcx
xorl %eax, %eax
callq 0x3250
jmp 0x810b
movq 0xfef9(%rip), %rax      # 0x17ff0
movq (%rax), %rdi
leaq 0x9c28(%rip), %rdx      # 0x11d29
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0x3250
callq 0x7fd4
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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), %r12
addq $0x20, %r14
pushq $0x10
popq %r13
leaq 0x1062d(%rip), %rbp     # 0x18770
leaq 0x9ac7(%rip), %r15      # 0x11c11
cmpq $0x2b0, %r13            # imm = 0x2B0
je 0x81c5
movq -0x10(%r13,%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3150
movq %r14, %rcx
testl %eax, %eax
je 0x817e
cmpb $0x73, (%rbx)
jne 0x81a5
cmpb $0x64, 0x1(%rbx)
jne 0x81a5
cmpb $0x0, 0x2(%rbx)
movq %r12, %rcx
jne 0x81a5
movl -0x8(%r13,%rbp), %r8d
cmpq $0x100, %r8             # imm = 0x100
jae 0x81c9
movq (%rcx), %rax
cmpq $0x0, (%rax,%r8,8)
jne 0x81e6
movq (%r13,%rbp), %rcx
movq %rcx, (%rax,%r8,8)
addq $0x18, %r13
jmp 0x814a
movq 0xfe44(%rip), %rax      # 0x17ff0
movq (%rax), %rdi
leaq 0x9b97(%rip), %rdx      # 0x11d4d
pushq $0x1
popq %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3250
jmp 0x8204
xorl %eax, %eax
jmp 0x8207
movq 0xfe20(%rip), %rax      # 0x17ff0
movq (%rax), %rdi
leaq 0x9b9f(%rip), %rdx      # 0x11d79
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0x3250
jmp 0x8204
movq 0xfe03(%rip), %rax      # 0x17ff0
movq (%rax), %rdi
leaq 0x9bab(%rip), %rdx      # 0x11da2
pushq $0x1
popq %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3250
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x9fd3(%rip), %rsi      # 0x12202
callq 0x3170
testq %rax, %rax
je 0x826d
movq %rax, %r15
movq %rsp, %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %rax, %rdx
callq 0x3130
testq %rax, %rax
je 0x8280
movq %r15, %rdi
callq 0x3090
testl %eax, %eax
je 0x82f1
movq 0xfd88(%rip), %rax      # 0x17ff0
movq (%rax), %rdi
jmp 0x82c7
movq 0xfd7c(%rip), %rax      # 0x17ff0
movq (%rax), %rdi
leaq 0x9b4f(%rip), %rdx      # 0x11dcd
jmp 0x82ce
movq %r15, %rdi
callq 0x3070
testl %eax, %eax
movq 0xfd5f(%rip), %r12      # 0x17ff0
movq (%r12), %rdi
leaq 0x9b75(%rip), %rax      # 0x11e11
leaq 0x9b4c(%rip), %rdx      # 0x11def
cmoveq %rax, %rdx
xorl %r14d, %r14d
pushq $0x1
popq %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3250
movq %r15, %rdi
callq 0x3090
testl %eax, %eax
je 0x82de
movq (%r12), %rdi
leaq 0x9b6f(%rip), %rdx      # 0x11e3d
xorl %r14d, %r14d
pushq $0x1
popq %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3250
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 0x8337
callq 0x3270
movq (%rax), %rax
movsbq -0x1(%rsp,%r15), %rcx
decq %r15
decl %r14d
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x8315
jmp 0x833a
movl %ebp, %r14d
movl %r14d, %ebp
sarl $0x1f, %ebp
andl %r14d, %ebp
testl %r14d, %r14d
jle 0x8366
callq 0x3270
movq (%rax), %rax
movsbq (%rbx), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x8363
incq %rbx
decl %r14d
jmp 0x8343
movl %r14d, %ebp
movslq %ebp, %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 0x3260
movq %rax, %r14
jmp 0x82de
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x3140
testq %rax, %rax
je 0x8429
movq %rax, %rbx
pushq $-0x30
popq %r12
leaq 0x9676(%rip), %r13      # 0x11a40
movq %rax, %r15
testq %r14, %r14
je 0x842b
movsbq (%r14), %rbp
testq %rbp, %rbp
je 0x842b
callq 0x3270
movq (%rax), %rax
movzwl (%rax,%rbp,2), %eax
btl $0xc, %eax
jae 0x8421
xorl %ecx, %ecx
btl $0x9, %eax
setae %cl
shll $0x5, %ecx
addq $-0x57, %rcx
btl $0xb, %eax
cmovbq %r12, %rcx
addq %rbp, %rcx
movslq (%r13,%rcx,4), %rsi
addq %r13, %rsi
movq %r15, %rdi
callq 0x3220
incq %r14
addq $0x4, %r15
jmp 0x83cd
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_O2/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
andl $0x0, (%rdi)
cmpl $0x20, %edx
jg 0x8471
xorl %eax, %eax
testq %rsi, %rsi
je 0x846f
cmpb $0x0, (%rsi)
je 0x846f
testl %edx, %edx
jle 0x846f
leal (%rax,%rax), %ecx
movl %ecx, (%rdi)
xorl %ecx, %ecx
cmpb $0x30, (%rsi)
setne %cl
leal (%rcx,%rax,2), %eax
movl %eax, (%rdi)
incq %rsi
decl %edx
jmp 0x8448
popq %rax
retq
leaq 0x9a38(%rip), %rdi      # 0x11eb0
leaq 0x9a3d(%rip), %rsi      # 0x11ebc
leaq 0x9a3e(%rip), %rcx      # 0x11ec4
movl $0x19a, %edx            # imm = 0x19A
callq 0x30d0
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
testb $0x7, %bl
jne 0x8505
movq %rsi, %r14
movq %rdi, %r15
movb $0x0, (%rdi)
leaq 0x4(%rsp), %r12
pushq $0x8
popq %rbp
leaq 0x2(%rsp), %r13
testq %r14, %r14
je 0x84f6
cmpb $0x0, (%r14)
je 0x84f6
testl %ebx, %ebx
jle 0x84f6
andw $0x0, 0x2(%rsp)
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x843d
movb 0x4(%rsp), %al
movb %al, 0x2(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x3220
addq $0x8, %r14
addl $-0x8, %ebx
jmp 0x84b8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x99ea(%rip), %rdi      # 0x11ef6
leaq 0x99a9(%rip), %rsi      # 0x11ebc
leaq 0x99eb(%rip), %rcx      # 0x11f05
movl $0x1a7, %edx            # imm = 0x1A7
callq 0x30d0
// File: /workspace/github_c_makefile_star2_O2/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, %r15
leaq 0x20(%rsp), %r14
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
testb %al, %al
je 0x8588
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 0x8394
movq %rax, %rbx
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r14, 0x10(%rsp)
pushq $0xa
popq %rbp
movq %rbx, %r13
xorl %r12d, %r12d
testq %r13, %r13
je 0x86d4
testq %r15, %r15
je 0x86d4
movsbq (%r15), %r14
testq %r14, %r14
je 0x86d4
callq 0x3270
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r14,2)
jne 0x8605
cmpb $0x61, %r14b
je 0x8653
movzbl %r14b, %eax
cmpl $0x72, %eax
je 0x86c9
cmpl $0x75, %eax
je 0x866c
incq %r15
jmp 0x85b9
callq 0x3050
movq %rax, %r14
andl $0x0, (%rax)
movq %r15, %rdi
leaq 0x18(%rsp), %rsi
movl %ebp, %edx
callq 0x3210
movq %rax, %r12
cmpq $-0x1, %rax
jne 0x8649
cmpl $0x0, (%r14)
je 0x8649
movq 0xf9bb(%rip), %rax      # 0x17ff0
movq (%rax), %rdi
pushq $0x1
popq %rsi
leaq 0x98ea(%rip), %rdx      # 0x11f2c
xorl %eax, %eax
callq 0x3250
movq 0x18(%rsp), %r15
jmp 0x85b9
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x8685
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x8693
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x86a8
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x86b6
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rdi
testq %rdi, %rdi
je 0x86c9
movq %r13, %rsi
movl %r12d, %edx
callq 0x8490
jmp 0x86c9
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rdi
testq %rdi, %rdi
je 0x86c9
movq %r13, %rsi
movl %r12d, %edx
callq 0x843d
incq %r15
addq %r12, %r13
jmp 0x85b6
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_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
leaq 0x891f(%rip), %rsi      # 0x134a0
pushq $0x1
popq %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x31d0
cmpb $0x53, (%r15)
jne 0xabb8
cmpb $0x44, 0x1(%r15)
jne 0xabb8
testq %r13, %r13
setne %bpl
je 0xabbf
cmpb $0x0, 0x2(%r15)
jne 0xabbf
movq %r14, %rdi
movq %r13, %rsi
callq 0x86ee
jmp 0xabe2
testq %r13, %r13
setne %bpl
leaq 0x885f(%rip), %rsi      # 0x13425
movq %r15, %rdi
callq 0x3150
testb %bpl, %bpl
je 0xabe2
testl %eax, %eax
jne 0xabe2
movq %r14, %rdi
movq %r13, %rsi
callq 0x892a
cmpb $0x53, (%r15)
jne 0xac06
cmpb $0x44, 0x1(%r15)
jne 0xac06
testq %r12, %r12
je 0xac06
cmpb $0x0, 0x2(%r15)
jne 0xac06
movq %r14, %rdi
movq %r12, %rsi
callq 0xa840
leaq 0x8818(%rip), %rsi      # 0x13425
movq %r15, %rdi
callq 0x3150
testq %rbx, %rbx
je 0xac37
testl %eax, %eax
jne 0xac37
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9934
cmpb $0x53, (%r15)
jne 0xac69
cmpb $0x44, 0x1(%r15)
jne 0xac69
testq %rbx, %rbx
je 0xac69
cmpb $0x0, 0x2(%r15)
jne 0xac69
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8b92
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
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)
andq $0x0, 0x50(%rdi)
pushq $0x8
popq %r15
movl $0x100, %edi            # imm = 0x100
movq %r15, %rsi
callq 0x3140
movq %rax, %r12
movq %rax, 0x20(%rbx)
movl $0x100, %edi            # imm = 0x100
movq %r15, %rsi
callq 0x3140
movq %rax, 0x28(%rbx)
testq %r12, %r12
setne %cl
testq %rax, %rax
setne %al
testb %al, %cl
jne 0xaf30
movq 0xd0d6(%rip), %rax      # 0x17ff0
movq (%rax), %rdi
leaq 0x866f(%rip), %rdx      # 0x13593
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0x3250
jmp 0xaf41
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x8029
testl %eax, %eax
je 0xaf4d
pushq $-0x1
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x8122