LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/goodix[P]gdix_hid_firmware_update/gtx9/gtx9.cpp
// Function: GTx9Device::WriteSpeCmd(unsigned char const*, unsigned int)
int GTx9Device::WriteSpeCmd(const unsigned char *buf, unsigned int len)
{
	unsigned char cmdBuf[16] = {0};
	uint16_t checksum = 0;
	uint32_t i;
	int ret;

	if (len > 11) {
		gdix_err("Cmd data len is invalid len=%d\n", len);
		return -EINVAL;
	}

	cmdBuf[0] = 0;
	cmdBuf[1] = 0;
	cmdBuf[2] = len + 3;
	memcpy(&cmdBuf[3], buf, len);
	for (i = 2; i < len + 3; i++)
		checksum += cmdBuf[i];

	cmdBuf[len + 3] = checksum & 0xFF;
	cmdBuf[len + 4] = (checksum >> 8) & 0XFF;
	ret = Write(0x10174, cmdBuf, len + 5);
	if (ret < 0) {
		gdix_err("Failed write cmd\n");
		return ret;
	}
	for (i = 0; i < 20; i++) {
		ret = Read(0x10174, cmdBuf, 2);
		if (ret < 0) {
			gdix_err("Failed read cmd status\n");
			return ret;
		}
		if (cmdBuf[1] == 0x80 && cmdBuf[0] == 0x80) {
			usleep(5000);
			return 0;
		}
		usleep(15000);
	}

	gdix_err("Failed get valid cmd ack:0x%02x sta:0x%02x\n", cmdBuf[1],
			 cmdBuf[0]);
	return -EINVAL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %r14d
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
cmpl $0xc, %edx
jb 0x106e4
leaq 0x10be7(%rip), %rax     # 0x21291
movl $0xffffffea, %ebp       # imm = 0xFFFFFFEA
cmpb $0x1, (%rax)
jne 0x107f7
movq 0x10919(%rip), %rax     # 0x20fd8
movq (%rax), %rdi
leaq 0x8429(%rip), %rsi      # 0x18af2
leaq 0x7ed2(%rip), %rdx      # 0x185a2
movl $0xcb, %ecx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x5180
jmp 0x107f7
movq %rdi, %rbx
movl %r14d, %ebp
leaq 0x3(%rbp), %r15
leaq 0x3(%rsp), %rdi
movb %r15b, -0x1(%rdi)
movq %rbp, %rdx
callq 0x5090
movl $0x2, %ecx
xorl %eax, %eax
movzbl (%rsp,%rcx), %edx
addl %edx, %eax
incq %rcx
cmpq %rcx, %r15
jne 0x10706
movb %al, (%rsp,%r15)
movq %rsp, %rdx
movb %ah, 0x4(%rbp,%rdx)
addl $0x5, %r14d
movq (%rbx), %rax
movq %rbx, %rdi
movl $0x10174, %esi          # imm = 0x10174
movl %r14d, %ecx
callq *0x30(%rax)
testl %eax, %eax
js 0x107c1
movl $0x14, %r15d
movq %rsp, %r14
xorl %r12d, %r12d
movq (%rbx), %rax
movq %rbx, %rdi
movl $0x10174, %esi          # imm = 0x10174
movq %r14, %rdx
movl $0x2, %ecx
callq *0x20(%rax)
testl %eax, %eax
js 0x107d6
cmpb 0x1(%rsp), %r12b
jno 0x10770
movb (%rsp), %al
negb %al
jo 0x107eb
movl $0x3a98, %edi           # imm = 0x3A98
callq 0x5170
decl %r15d
jne 0x10748
leaq 0x10b0b(%rip), %rax     # 0x21291
movl $0xffffffea, %ebp       # imm = 0xFFFFFFEA
cmpb $0x1, (%rax)
jne 0x107f7
movq 0x10841(%rip), %rax     # 0x20fd8
movq (%rax), %rdi
movzbl 0x1(%rsp), %r8d
movzbl (%rsp), %r9d
leaq 0x83c3(%rip), %rsi      # 0x18b6f
leaq 0x7def(%rip), %rdx      # 0x185a2
movl $0xeb, %ecx
xorl %eax, %eax
callq 0x5180
jmp 0x107f7
movl %eax, %ebp
leaq 0x10ac7(%rip), %rax     # 0x21291
cmpb $0x1, (%rax)
jne 0x107f7
callq 0x5eff
jmp 0x107f7
movl %eax, %ebp
leaq 0x10ab2(%rip), %rax     # 0x21291
cmpb $0x1, (%rax)
jne 0x107f7
callq 0x5ed5
jmp 0x107f7
movl $0x1388, %edi           # imm = 0x1388
callq 0x5170
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/goodix[P]gdix_hid_firmware_update/gtx9/gtx9.cpp
// Function: GTx9Device::SendConfig(unsigned char*, int)
int GTx9Device::SendConfig(unsigned char *config, int len)
{
	int ret;
	uint8_t cmdBuf[5] = {0};
	uint8_t tmpBuf[4096] = {0};

	/* start write cfg */
	cmdBuf[0] = 0x04;
	ret = WriteSpeCmd(cmdBuf, 1);
	if (ret < 0) {
		gdix_err("Failed write cfg prepare cmd\n");
		return ret;
	}

	/* try send config */
	ret = Write(0x13B74, config, len);
	if (ret < 0) {
		gdix_err("Failed write config data\n");
		goto exit;
	}

	/* read back config */
	ret = Read(0x13B74, tmpBuf, len);
	if (ret < 0) {
		gdix_err("Failed read back config\n");
		goto exit;
	}

	if (memcmp(config, tmpBuf, len)) {
		gdix_err("Config data read back compare file\n");
		ret = -EINVAL;
		goto exit;
	}
	cmdBuf[0] = 0x05;
	ret = WriteSpeCmd(cmdBuf, 1);
	if (ret < 0)
		gdix_err("Failed send config data ready cmd\n");

exit:
	cmdBuf[0] = 0x06;
	ret = WriteSpeCmd(cmdBuf, 1);
	if (ret < 0)
		gdix_err("Failed send config write end command\n");

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xb(%rsp), %r15
movl $0x0, 0x1(%r15)
leaq 0x10(%rsp), %rdi
movl $0x1000, %edx           # imm = 0x1000
xorl %esi, %esi
callq 0x5080
movb $0x4, (%r15)
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq *0x40(%rax)
testl %eax, %eax
js 0x108a9
movq (%rbx), %rax
movq %rbx, %rdi
movl $0x13b74, %esi          # imm = 0x13B74
movq %r14, %rdx
movl %ebp, %ecx
callq *0x30(%rax)
testl %eax, %eax
js 0x108bf
movq (%rbx), %rax
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x13b74, %esi          # imm = 0x13B74
movl %ebp, %ecx
callq *0x20(%rax)
testl %eax, %eax
js 0x108d2
movslq %ebp, %rdx
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x50f0
testl %eax, %eax
je 0x108e5
leaq 0x109f4(%rip), %rax     # 0x21291
cmpb $0x1, (%rax)
jne 0x1090b
callq 0x5f29
jmp 0x1090b
movl %eax, %r15d
leaq 0x109de(%rip), %rax     # 0x21291
cmpb $0x1, (%rax)
jne 0x10934
callq 0x5ffb
jmp 0x10934
leaq 0x109cb(%rip), %rax     # 0x21291
cmpb $0x1, (%rax)
jne 0x1090b
callq 0x5fa7
jmp 0x1090b
leaq 0x109b8(%rip), %rax     # 0x21291
cmpb $0x1, (%rax)
jne 0x1090b
callq 0x5f7d
jmp 0x1090b
leaq 0xb(%rsp), %rsi
movb $0x5, (%rsi)
movq (%rbx), %rax
movq %rbx, %rdi
movl $0x1, %edx
callq *0x40(%rax)
testl %eax, %eax
jns 0x1090b
leaq 0x1098b(%rip), %rax     # 0x21291
cmpb $0x1, (%rax)
je 0x1094c
leaq 0xb(%rsp), %rsi
movb $0x6, (%rsi)
movq (%rbx), %rax
movq %rbx, %rdi
movl $0x1, %edx
callq *0x40(%rax)
movl %eax, %r15d
testl %eax, %eax
jns 0x10934
leaq 0x10962(%rip), %rax     # 0x21291
cmpb $0x1, (%rax)
je 0x10945
movl %r15d, %eax
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x5fd1
jmp 0x10934
callq 0x5f53
jmp 0x1090b
nop
// File: /workspace/github_cpp_makefile_star2_O3/goodix[P]gdix_hid_firmware_update/gtx9/gtx9.cpp
// Function: GTx9Device::SendCmd(unsigned char, unsigned char*, int)
int GTx9Device::SendCmd(unsigned char cmd, unsigned char *data, int dataLen)
{
	uint8_t HidBuf[PACKAGE_LEN] = {0};
	int ret;

	if (!m_deviceOpen) {
		gdix_err("Device not open\n");
		return -EINVAL;
	}

	HidBuf[0] = REPORT_ID;
	HidBuf[1] = cmd;
	HidBuf[2] = 0x00;
	HidBuf[3] = 0x00;
	HidBuf[4] = (uint8_t)dataLen;
	memcpy(&HidBuf[5], data, dataLen);
	ret = SetReport(HidBuf, dataLen + 5);
	if (ret < 0)
		gdix_err("Failed send cmd 0x%02x\n", cmd);

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movb $0x0, 0x40(%rsp)
cmpb $0x0, 0x8(%rdi)
je 0x109d1
movl %esi, %ebx
movq %rdi, %r14
leaq 0x5(%rsp), %rdi
movb $0xe, -0x5(%rdi)
movb %bl, -0x4(%rdi)
movb $0x0, -0x2(%rdi)
movb %cl, -0x1(%rdi)
movslq %ecx, %r15
movq %rdx, %rsi
movq %r15, %rdx
callq 0x5090
addl $0x5, %r15d
movq %rsp, %rsi
movq %r14, %rdi
movl %r15d, %edx
callq 0x10300
xorl %ebp, %ebp
testl %eax, %eax
jns 0x109e2
movl %eax, %r14d
leaq 0x108ca(%rip), %rax     # 0x21291
cmpb $0x1, (%rax)
je 0x109f6
movl %r14d, %ebp
jmp 0x109e2
leaq 0x108b9(%rip), %rax     # 0x21291
movl $0xffffffea, %ebp       # imm = 0xFFFFFFEA
cmpb $0x1, (%rax)
je 0x109ef
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x6025
jmp 0x109e2
movzbl %bl, %edi
callq 0x6049
jmp 0x109cc
// File: /workspace/github_cpp_makefile_star2_O3/goodix[P]gdix_hid_firmware_update/gtx9/gtx9_firmware_image.cpp
// Function: GTX9FirmwareImage::Initialize(char const*)
int GTX9FirmwareImage::Initialize(const char *filename)
{
	int ret;

	m_initialized = false;

	if (GetDataFromFile(filename) < 0) {
		gdix_err("Failed get firmware\n");
		return -EINVAL;
	}

	gdix_info("Parse firmware file\n");
	ret = ParseFirmware();
	if (ret < 0) {
		gdix_err("Failed parse firmware\n");
		return ret;
	}

	m_initialized = true;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movb $0x0, 0x8(%rdi)
movq (%rdi), %rax
callq *0xb0(%rax)
leaq 0x1057a(%rip), %r14     # 0x21291
movb (%r14), %cl
testl %eax, %eax
js 0x10d5a
testb %cl, %cl
je 0x10d46
movq 0x1028f(%rip), %rax     # 0x20fb8
movq (%rax), %rdi
leaq 0x816a(%rip), %rsi      # 0x18e9d
leaq 0x52f1(%rip), %rdx      # 0x1602b
movl $0x37, %ecx
xorl %eax, %eax
callq 0x5180
movq %rbx, %rdi
callq 0x10d80
testl %eax, %eax
js 0x10d6a
movb $0x1, 0x8(%rbx)
xorl %ebp, %ebp
jmp 0x10d72
movl $0xffffffea, %ebp       # imm = 0xFFFFFFEA
testb %cl, %cl
je 0x10d72
callq 0x60f0
jmp 0x10d72
movl %eax, %ebp
cmpb $0x1, (%r14)
je 0x10d79
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
callq 0x60ce
jmp 0x10d72
// File: /workspace/github_cpp_makefile_star2_O3/goodix[P]gdix_hid_firmware_update/gtx9/gtx9_i2c_update.cpp
// Function: checksum_cmp(unsigned char const*, int, int)
int checksum_cmp(const uint8_t *data, int size, int mode)
{
	uint32_t cal_checksum = 0;
	uint32_t r_checksum = 0;
	int i;

	if (mode == CHECKSUM_MODE_U8_LE) {
		if (size < 2)
			return 1;
		for (i = 0; i < size - 2; i++)
			cal_checksum += data[i];

		r_checksum = data[size - 2] + (data[size - 1] << 8);
		return (cal_checksum & 0xFFFF) == r_checksum ? 0 : 1;
	}

	if (size < 4)
		return 1;
	for (i = 0; i < size - 4; i += 2)
		cal_checksum += data[i] + (data[i + 1] << 8);
	r_checksum = data[size - 4] + (data[size - 3] << 8) +
				 (data[size - 2] << 16) + (data[size - 1] << 24);
	return cal_checksum == r_checksum ? 0 : 1;
}

// Assembly:
movb $0x1, %al
testl %edx, %edx
je 0x11340
cmpl $0x4, %esi
jl 0x1137c
leal -0x4(%rsi), %ecx
xorl %eax, %eax
movl %ecx, %ecx
cmpl $0x4, %esi
je 0x11318
xorl %edx, %edx
xorl %eax, %eax
movzwl (%rdi,%rdx), %r8d
addl %r8d, %eax
addq $0x2, %rdx
cmpq %rcx, %rdx
jb 0x11307
movzbl (%rdi,%rcx), %ecx
movl %esi, %edx
movzbl -0x3(%rdi,%rdx), %esi
shll $0x8, %esi
orl %ecx, %esi
movzbl -0x2(%rdi,%rdx), %ecx
shll $0x10, %ecx
orl %esi, %ecx
movzbl -0x1(%rdi,%rdx), %edx
shll $0x18, %edx
orl %ecx, %edx
cmpl %edx, %eax
jmp 0x11379
cmpl $0x2, %esi
jl 0x1137c
jne 0x1134d
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x11367
leal -0x2(%rsi), %eax
xorl %ecx, %ecx
xorl %edx, %edx
movzbl (%rdi,%rcx), %r8d
addl %r8d, %edx
incq %rcx
cmpq %rcx, %rax
jne 0x11354
movzwl %dx, %ecx
movzbl (%rdi,%rax), %eax
movl %esi, %edx
movzbl -0x1(%rdi,%rdx), %edx
shll $0x8, %edx
orl %eax, %edx
cmpl %edx, %ecx
setne %al
movzbl %al, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/goodix[P]gdix_hid_firmware_update/gtx9/gtx9_i2c_update.cpp
// Function: gdix_append_checksum(unsigned char*, int, int)
uint32_t gdix_append_checksum(uint8_t *data, int len, int mode)
{
	uint32_t checksum = 0;
	int i;

	checksum = 0;
	if (mode == CHECKSUM_MODE_U8_LE) {
		for (i = 0; i < len; i++)
			checksum += data[i];
	} else {
		for (i = 0; i < len; i += 2)
			checksum += (data[i] + (data[i + 1] << 8));
	}

	if (mode == CHECKSUM_MODE_U8_LE) {
		data[len] = checksum & 0xff;
		data[len + 1] = (checksum >> 8) & 0xff;
		return 0xFFFF & checksum;
	}
	data[len] = checksum & 0xff;
	data[len + 1] = (checksum >> 8) & 0xff;
	data[len + 2] = (checksum >> 16) & 0xff;
	data[len + 3] = (checksum >> 24) & 0xff;
	return checksum;
}

// Assembly:
testl %edx, %edx
je 0x113a2
testl %esi, %esi
jle 0x113c3
movl %esi, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
movzwl (%rdi,%r8), %r9d
addl %r9d, %eax
addq $0x2, %r8
cmpq %rcx, %r8
jb 0x1138f
jmp 0x113bd
testl %esi, %esi
jle 0x113cc
movl %esi, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
movzbl (%rdi,%r8), %r9d
addl %r9d, %eax
incq %r8
cmpq %r8, %rcx
jne 0x113ad
testl %edx, %edx
jne 0x113c5
jmp 0x113ce
xorl %eax, %eax
movslq %esi, %rcx
movl %eax, (%rdi,%rcx)
retq
xorl %eax, %eax
movslq %esi, %rcx
movw %ax, (%rdi,%rcx)
movzwl %ax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/goodix[P]gdix_hid_firmware_update/gtx9/gtx9_update.cpp
// Function: GTx9Update::Run(void*)
int GTx9Update::Run(void *para)
{
	int ret;

	if (!m_Initialized) {
		gdix_err("Can't Process Update Before Initialized.\n");
		return -EINVAL;
	}
	// get all parameter
	pGTUpdatePara parameter = (pGTUpdatePara)para;

	if (!parameter->force) {
		ret = check_update();
		if (ret < 0) {
			gdix_info("Upgrades are not allowed\n");
			return ret;
		} else if (ret == 0) {
			gdix_info("Skip upgrade\n");
			return 0;
		}
		gdix_info("Ready to upgrade\n");
	} else {
		gdix_info("Force to upgrade\n");
	}

	ret = prepareUpdate();
	if (ret < 0) {
		gdix_err("Failed prepare update\n");
		return ret;
	}

	ret = fw_update(parameter->firmwareFlag);
	if (ret < 0) {
		gdix_err("Failed update\n");
		return ret;
	}

	gdix_info("Success update\n");

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpb $0x0, 0x18(%rdi)
je 0x12c31
movq %rsi, %r15
movq %rdi, %r14
cmpb $0x0, (%rsi)
je 0x12c50
leaq 0xe688(%rip), %rax      # 0x21291
cmpb $0x1, (%rax)
jne 0x12c98
movq 0xe39f(%rip), %rax      # 0x20fb8
movq (%rax), %rdi
leaq 0x7415(%rip), %rsi      # 0x1a038
leaq 0x442a(%rip), %rdx      # 0x17054
movl $0x3c, %ecx
jmp 0x12c91
leaq 0xe659(%rip), %rax      # 0x21291
movl $0xffffffea, %ebx       # imm = 0xFFFFFFEA
cmpb $0x1, (%rax)
jne 0x12d64
callq 0x65ce
jmp 0x12d64
movq (%r14), %rax
movq %r14, %rdi
callq *0x20(%rax)
testl %eax, %eax
js 0x12cfe
leaq 0xe629(%rip), %rax      # 0x21291
movb (%rax), %al
je 0x12d36
testb %al, %al
je 0x12c98
movq 0xe33d(%rip), %rax      # 0x20fb8
movq (%rax), %rdi
leaq 0x7390(%rip), %rsi      # 0x1a015
leaq 0x43c8(%rip), %rdx      # 0x17054
movl $0x3a, %ecx
xorl %eax, %eax
callq 0x5180
movq %r14, %rdi
callq 0x12d6c
testl %eax, %eax
js 0x12ce9
movl 0x4(%r15), %esi
movq (%r14), %rax
movq %r14, %rdi
callq *0x30(%rax)
movl %eax, %ebx
leaq 0xe5d7(%rip), %rax      # 0x21291
movb (%rax), %al
testl %ebx, %ebx
js 0x12d2b
testb %al, %al
je 0x12d62
movq 0xe2e9(%rip), %rax      # 0x20fb8
movq (%rax), %rdi
leaq 0x73ca(%rip), %rsi      # 0x1a0a3
leaq 0x4374(%rip), %rdx      # 0x17054
xorl %ebx, %ebx
movl $0x4b, %ecx
jmp 0x12d59
movl %eax, %ebx
leaq 0xe59f(%rip), %rax      # 0x21291
cmpb $0x1, (%rax)
jne 0x12d64
callq 0x6612
jmp 0x12d64
movl %eax, %ebx
leaq 0xe58a(%rip), %rax      # 0x21291
cmpb $0x1, (%rax)
jne 0x12d64
movq 0xe2a5(%rip), %rax      # 0x20fb8
movq (%rax), %rdi
leaq 0x72ae(%rip), %rsi      # 0x19fcb
leaq 0x4330(%rip), %rdx      # 0x17054
movl $0x34, %ecx
jmp 0x12d59
testb %al, %al
je 0x12d64
callq 0x65f0
jmp 0x12d64
testb %al, %al
je 0x12d62
movq 0xe277(%rip), %rax      # 0x20fb8
movq (%rax), %rdi
leaq 0x72ab(%rip), %rsi      # 0x19ff6
leaq 0x4302(%rip), %rdx      # 0x17054
xorl %ebx, %ebx
movl $0x37, %ecx
xorl %eax, %eax
callq 0x5180
jmp 0x12d64
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/goodix[P]gdix_hid_firmware_update/gtx9/gtx9_update.cpp
// Function: GTx9Update::check_update()
int GTx9Update::check_update()
{
	int ret;

	ret = memcmp(dev->GetProductID(), image->GetProductID(), 8);
	if (ret != 0) {
		gdix_info("Product ID mismatch %s != %s\n", dev->GetProductID(),
				  image->GetProductID());
		return -1;
	}

	if ((dev->GetFirmwareVersionMajor() != image->GetFirmwareVersionMajor()) ||
		(dev->GetFirmwareVersionMinor() != image->GetFirmwareVersionMinor())) {
		gdix_info("Current version:%d.%d\n", dev->GetFirmwareVersionMajor(),
				  dev->GetFirmwareVersionMinor());
		gdix_info("Firmware version:%d.%d\n", image->GetFirmwareVersionMajor(),
				  image->GetFirmwareVersionMinor());
		return 1;
	}

	gdix_info("No need to upgrade\n");
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
movq %rax, %r14
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq (%r14), %rcx
cmpq (%rax), %rcx
je 0x13065
leaq 0xe283(%rip), %rax      # 0x21291
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpb $0x1, (%rax)
jne 0x13177
movq 0xdf95(%rip), %rax      # 0x20fb8
movq (%rax), %r14
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
movq %rax, %r15
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
leaq 0x7080(%rip), %rsi      # 0x1a0c4
leaq 0x3262(%rip), %rdx      # 0x162ad
movq %r14, %rdi
movl $0x57, %ecx
movq %r15, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x5180
jmp 0x13177
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movl %eax, %ebp
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
cmpl %eax, %ebp
jne 0x130d6
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movl %eax, %ebp
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
cmpl %eax, %ebp
jne 0x130d6
leaq 0xe1f1(%rip), %rax      # 0x21291
xorl %ebp, %ebp
cmpb $0x1, (%rax)
jne 0x13177
movq 0xdf06(%rip), %rax      # 0x20fb8
movq (%rax), %rdi
leaq 0x7088(%rip), %rsi      # 0x1a144
leaq 0x31ea(%rip), %rdx      # 0x162ad
xorl %ebp, %ebp
movl $0x64, %ecx
xorl %eax, %eax
callq 0x5180
jmp 0x13177
leaq 0xe1b4(%rip), %r15      # 0x21291
movb (%r15), %al
cmpb $0x1, %al
jne 0x1312a
movq 0xdecd(%rip), %rax      # 0x20fb8
movq (%rax), %r14
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movl %eax, %ebp
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
leaq 0x6fe8(%rip), %rsi      # 0x1a0f3
leaq 0x319b(%rip), %rdx      # 0x162ad
movq %r14, %rdi
movl $0x5e, %ecx
movl %ebp, %r8d
movl %eax, %r9d
xorl %eax, %eax
callq 0x5180
movb (%r15), %al
movl $0x1, %ebp
testb $0x1, %al
je 0x13177
movq 0xde7e(%rip), %rax      # 0x20fb8
movq (%rax), %r14
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movl %eax, %r15d
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
leaq 0x6fc0(%rip), %rsi      # 0x1a11b
leaq 0x314b(%rip), %rdx      # 0x162ad
movq %r14, %rdi
movl $0x60, %ecx
movl %r15d, %r8d
movl %eax, %r9d
xorl %eax, %eax
callq 0x5180
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/goodix[P]gdix_hid_firmware_update/berlin_a/brla.cpp
// Function: BrlADevice::Open(char const*)
int BrlADevice::Open(const char *filename)
{
	if (!filename)
		return -EINVAL;

	m_fd = open(filename, O_RDWR);
	if (m_fd < 0)
		return -EINVAL;

	m_deviceOpen = true;

	return SetBasicProperties();
}

// Assembly:
pushq %rbx
testq %rsi, %rsi
je 0x138b0
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x51e0
movl %eax, 0xc(%rbx)
testl %eax, %eax
js 0x138b0
movb $0x1, 0x8(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
jmpq *0xa0(%rax)
movl $0xffffffea, %eax       # imm = 0xFFFFFFEA
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/goodix[P]gdix_hid_firmware_update/berlin_a/brla.cpp
// Function: BrlADevice::Close()
void BrlADevice::Close()
{
	if (!m_deviceOpen)
		return;
	close(m_fd);
	m_fd = -1;
	m_deviceOpen = false;
}

// Assembly:
cmpb $0x1, 0x8(%rdi)
jne 0x138d6
pushq %rbx
movq %rdi, %rbx
movl 0xc(%rdi), %edi
callq 0x5210
movl $0xffffffff, 0xc(%rbx)  # imm = 0xFFFFFFFF
movb $0x0, 0x8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/AGWA[P]logmailer/logmailer.cpp
// Function: set_cloexec(int, bool)
static void set_cloexec (int fd, bool cloexec)
{
	int		old_flags = fcntl(fd, F_GETFD);
	if (old_flags == -1) {
		throw System_error("fcntl(F_GETFD)", "", errno);
	}
	int		new_flags = old_flags;
	if (cloexec) {
		new_flags |= FD_CLOEXEC;
	} else {
		new_flags &= ~FD_CLOEXEC;
	}
	if (new_flags != old_flags && fcntl(fd, F_SETFD, new_flags) == -1) {
		throw System_error("fcntl(F_SETFD)", "", errno);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %edi, %ebx
movl $0x1, %esi
xorl %eax, %eax
callq 0x2150
cmpl $-0x1, %eax
je 0x33e3
movl %eax, %edx
orl $0x1, %edx
cmpl %eax, %edx
je 0x33d6
movl %ebx, %edi
movl $0x2, %esi
xorl %eax, %eax
callq 0x2150
cmpl $-0x1, %eax
je 0x3461
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x48, %edi
callq 0x2130
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1d6c(%rip), %rsi      # 0x516c
leaq 0x1d73(%rip), %rdx      # 0x517a
movq %rsp, %rdi
callq 0x3d16
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1db1(%rip), %rdx      # 0x51d1
leaq 0x20(%rsp), %rdi
movq %rdx, %rsi
callq 0x3d16
callq 0x2040
movl (%rax), %ecx
movb $0x1, %bpl
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x3c70
xorl %ebp, %ebp
leaq 0x3930(%rip), %rsi      # 0x6d80
leaq 0x889(%rip), %rdx       # 0x3ce0
movq %rbx, %rdi
callq 0x2430
jmp 0x34dd
movl $0x48, %edi
callq 0x2130
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1cfd(%rip), %rsi      # 0x517b
leaq 0x1d04(%rip), %rdx      # 0x5189
movq %rsp, %rdi
callq 0x3d16
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1d33(%rip), %rdx      # 0x51d1
leaq 0x20(%rsp), %rdi
movq %rdx, %rsi
callq 0x3d16
callq 0x2040
movl (%rax), %ecx
movb $0x1, %bpl
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x3c70
xorl %ebp, %ebp
leaq 0x38b2(%rip), %rsi      # 0x6d80
leaq 0x80b(%rip), %rdx       # 0x3ce0
movq %rbx, %rdi
callq 0x2430
jmp 0x34e3
jmp 0x351a
jmp 0x3535
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x34fd
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2280
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3513
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2280
testb %bpl, %bpl
jne 0x3538
jmp 0x3540
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3538
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2280
jmp 0x3538
movq %rax, %r14
movq %rbx, %rdi
callq 0x2190
movq %r14, %rdi
callq 0x2450
// File: /workspace/github_cpp_makefile_star2_O3/AGWA[P]logmailer/logmailer.cpp
// Function: Log_mailer::open_fifo()
void open_fifo ()
	{
		close_fifo();

		if ((fd = open(fifo_path.c_str(), O_RDONLY | O_NONBLOCK)) == -1) {
			throw System_error("open", fifo_path.c_str(), errno);
		}
		set_cloexec(fd, true);

		// try opening the FIFO for write so that we never get end-of-file when reading from it
		wfd = open(fifo_path.c_str(), O_WRONLY | O_NONBLOCK);
		if (wfd != -1) {
			set_cloexec(wfd, true);
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
callq 0x3e42
movq (%r14), %rdi
movl $0x800, %esi            # imm = 0x800
xorl %eax, %eax
callq 0x21a0
movl %eax, 0x78(%r14)
cmpl $-0x1, %eax
je 0x36ed
movl %eax, %edi
callq 0x3397
movq (%r14), %rdi
movl $0x801, %esi            # imm = 0x801
xorl %eax, %eax
callq 0x21a0
movl %eax, 0x7c(%r14)
cmpl $-0x1, %eax
je 0x36e2
movl %eax, %edi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3397
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x48, %edi
callq 0x2130
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1abb(%rip), %rsi      # 0x51c5
leaq 0x1ab8(%rip), %rdx      # 0x51c9
leaq 0x8(%rsp), %rdi
callq 0x3d16
movq (%r14), %rsi
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3c32
callq 0x2040
movl (%rax), %ecx
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x3c70
xorl %ebp, %ebp
leaq 0x362e(%rip), %rsi      # 0x6d80
leaq 0x587(%rip), %rdx       # 0x3ce0
movq %rbx, %rdi
callq 0x2430
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x377f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2280
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3796
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2280
testb %bpl, %bpl
jne 0x37bc
jmp 0x37c4
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x37bc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2280
jmp 0x37bc
movq %rax, %r14
movq %rbx, %rdi
callq 0x2190
movq %r14, %rdi
callq 0x2450
// File: /workspace/github_cpp_makefile_star2_O3/AGWA[P]logmailer/logmailer.cpp
// Function: Log_mailer::close_fifo()
void close_fifo ()
	{
		if (wfd != -1) {
			close(wfd);
			wfd = -1;
		}
		if (fd != -1) {
			close(fd);
			fd = -1;
		}
	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x7c(%rdi), %edi
cmpl $-0x1, %edi
je 0x3e5a
callq 0x24a0
movl $0xffffffff, 0x7c(%rbx) # imm = 0xFFFFFFFF
movl 0x78(%rbx), %edi
cmpl $-0x1, %edi
je 0x3e6e
callq 0x24a0
movl $0xffffffff, 0x78(%rbx) # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/AGWA[P]logmailer/logmailer.cpp
// Function: Log_mailer::format_subject[abi:cxx11](char const*, unsigned long) const
std::string format_subject (const char* message, std::size_t message_len) const
	{
		std::ostringstream	subject;
		const char*		p = subject_format.c_str();
		while (p[0]) {
			if (p[0] == '%' && p[1] == 'h') {
				subject << hostname;
				p += 2;
			} else if (p[0] == '%' && p[1] == 'c') {
				subject << count_newlines(message, message_len);
				p += 2;
			} else if (p[0] == '%' && p[1] == '%') {
				subject << '%';
				p += 2;
			} else if (p[0] == '%' && p[1]) {
				p += 2;
			} else if (p[0] == '%') {
				++p;
			} else {
				subject << p[0];
				++p;
			}
		}
		return subject.str();
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x2330
movq 0x40(%r13), %rax
leaq 0xf(%rsp), %r13
movq %rax, %rbp
movzbl (%rax), %eax
cmpl $0x25, %eax
je 0x423c
testl %eax, %eax
je 0x42c1
movb %al, 0xf(%rsp)
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x22d0
incq %rbp
movq %rbp, %rax
jmp 0x420d
movzbl 0x1(%rbp), %ecx
cmpl $0x62, %ecx
jg 0x4269
leaq 0x1(%rbp), %rax
testl %ecx, %ecx
je 0x420d
cmpl $0x25, %ecx
jne 0x42b5
movb $0x25, 0xf(%rsp)
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x22d0
jmp 0x42b5
cmpl $0x63, %ecx
je 0x428b
cmpl $0x68, %ecx
jne 0x42b5
movq 0x3016(%rip), %rsi      # 0x7290
movq 0x3017(%rip), %rdx      # 0x7298
movq %r12, %rdi
callq 0x22d0
jmp 0x42b5
testq %r14, %r14
je 0x42ab
xorl %eax, %eax
xorl %esi, %esi
xorl %ecx, %ecx
cmpb $0xa, (%r15,%rax)
sete %cl
addq %rcx, %rsi
incq %rax
cmpq %rax, %r14
jne 0x4294
jmp 0x42ad
xorl %esi, %esi
movq %r12, %rdi
callq 0x2160
addq $0x2, %rbp
movq %rbp, %rax
jmp 0x420d
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x23e0
movq 0x2cfb(%rip), %rsi      # 0x6fd0
leaq 0x10(%rsp), %rdi
callq 0x2140
leaq 0x80(%rsp), %rdi
callq 0x20c0
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4303
movq %rax, %rbx
movq 0x2cc3(%rip), %rsi      # 0x6fd0
leaq 0x10(%rsp), %rdi
callq 0x2140
leaq 0x80(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2450
// File: /workspace/github_cpp_makefile_star2_O3/ljc2154[P]Rummy/rummy.cpp
// Function: initializeState()
State initializeState()
{
	State state;
	state.deck = getNewDeck();
	state.remaining = initializeRemaining();
	dealCards(state.deck, state.userHand, state.agentHand);
	adjustRemaining(state.remaining, state.agentHand);
	mergeSort(state.userHand, 0, state.userHand.size());
	state.turnCard = 52;
	return state;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x48(%rdi), %r14
xorl %eax, %eax
movq %rax, 0x40(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq %r14, 0x50(%rdi)
movq %r14, 0x48(%rdi)
movq %rax, 0x58(%rdi)
movq %rsp, %rdi
callq 0x2227
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x169d
subq %rdi, %rsi
callq 0x1100
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x169d
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq %rsp, %r15
movq %r15, %rdi
callq 0x22ad
movq %r14, %rdi
movq %r15, %rsi
callq 0x3e7c
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x16d1
movq (%rdi), %r12
movl $0x18, %esi
callq 0x1100
movq %r12, %rdi
cmpq %r15, %r12
jne 0x16bc
leaq 0x30(%rbx), %r15
leaq 0x18(%rbx), %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2321
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x3c2e
movq 0x18(%rsp), %rsi
cmpq %rsi, 0x20(%rsp)
je 0x172e
xorl %r12d, %r12d
xorl %r13d, %r13d
addq %r12, %rsi
movq %r14, %rdi
callq 0x3b9e
incq %r13
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rax
subq %rsi, %rax
sarq $0x2, %rax
addq $0x4, %r12
cmpq %r13, %rax
ja 0x1706
testq %rsi, %rsi
je 0x1746
movq 0x28(%rsp), %rax
subq %rsi, %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x1100
movq 0x38(%rbx), %rdx
subq 0x30(%rbx), %rdx
shrq $0x2, %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x23f4
movl $0x34, 0x60(%rbx)
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x1778
jmp 0x1778
movq %rax, %r14
movq %rbx, %rdi
callq 0x3b2a
movq %r14, %rdi
callq 0x1150
// File: /workspace/github_cpp_makefile_star2_O3/ljc2154[P]Rummy/rummy.cpp
// Function: printState(State)
void printState(State state)
{
	//printHand(state.agentHand);
	printOpponentHandandDeck();
	if (state.turnCard < 52)
		printTurnCard(state.turnCard);
	printHand(state.userHand);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x255a
movl 0x60(%rbx), %edi
cmpl $0x33, %edi
jg 0x17a7
callq 0x26cc
addq $0x30, %rbx
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3c2e
movq %r14, %rdi
callq 0x286a
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x17d7
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x17f8
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq %rbx, %rdi
callq 0x1150
// File: /workspace/github_cpp_makefile_star2_O3/ljc2154[P]Rummy/rummy.cpp
// Function: gameOver(State)
bool gameOver(State state)
{
	/* Check if user won */
	if (isWinner(state.userHand))
	{
		cout << "You won the game!" << endl;
		printHand(state.userHand);
		return true;
	}

	/* Check if agent won */
	if (isWinner(state.agentHand))
	{
		cout << "Read 'em and weep!" << endl;
		printHand(state.agentHand);
		cout << "You lost the game :(" << endl;
		return true;
	}

	/* No player has won */
	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
leaq 0x30(%rdi), %r14
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3c2e
movq %r15, %rdi
callq 0x2b79
movl %eax, %ebp
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x1844
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
testb %bpl, %bpl
je 0x18ce
leaq 0x40(%rsp), %r12
movq 0x4777(%rip), %rbx      # 0x5fd0
leaq 0x27c7(%rip), %rsi      # 0x4027
movl $0x11, %edx
movq %rbx, %rdi
callq 0x1110
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c2e
movq %rbx, %rdi
callq 0x286a
movq 0x30(%rsp), %rdi
movb $0x1, %bl
testq %rdi, %rdi
je 0x19c5
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
jmp 0x19c5
leaq 0x28(%rsp), %r12
addq $0x18, %rbx
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3c2e
movq %r14, %rdi
callq 0x2b79
movl %eax, %ebp
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1908
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
testb %bpl, %bpl
je 0x19c3
leaq 0x10(%rsp), %r12
movq 0x46b3(%rip), %r14      # 0x5fd0
leaq 0x2715(%rip), %rsi      # 0x4039
movl $0x12, %edx
movq %r14, %rdi
callq 0x1110
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3c2e
movq %r15, %rdi
callq 0x286a
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x1984
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
leaq 0x26c1(%rip), %rsi      # 0x404c
movl $0x14, %edx
movq %r14, %rdi
callq 0x1110
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
movb $0x1, %bl
jmp 0x19c5
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
jmp 0x19ef
movq %rax, %rbx
movq 0x18(%rsp), %rdi
jmp 0x19ef
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
jne 0x1a08
jmp 0x1a14
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x1a14
leaq 0x58(%rsp), %r12
movq (%r12), %rsi
subq %rdi, %rsi
callq 0x1100
movq %rbx, %rdi
callq 0x1150
// File: /workspace/github_cpp_makefile_star2_O3/ljc2154[P]Rummy/rummy.cpp
// Function: playAgentTurn(State&)
void playAgentTurn(State &state)
{
	/* Must be rewritten with dropCard function */
	if (takeTurnCard(state))
	{
		cout << "The computer took the turn card!" << endl;
		int turnCard = state.turnCard;
		state.agentHand.push_back(turnCard);
		state.turnCard = removeWorstCard(state);
	}
	else
	{
		cout << "The computer drew from the deck." << endl;
		state.agentHand.push_back(state.deck.back());
		state.remaining.remove(state.deck.back());
		state.deck.pop_back();
		state.turnCard = removeWorstCard(state);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3a84
movq %r14, %rdi
callq 0x3443
movl %eax, %ebp
leaq 0x58(%rsp), %r14
movq (%r14), %rdi
cmpq %r14, %rdi
je 0x2048
movq (%rdi), %r15
movl $0x18, %esi
callq 0x1100
movq %r15, %rdi
cmpq %r14, %r15
jne 0x2033
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x205f
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x2076
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x208d
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq 0x3f3c(%rip), %r14      # 0x5fd0
testb %bpl, %bpl
je 0x20f4
leaq 0x20ea(%rip), %rsi      # 0x418a
movl $0x20, %edx
movq %r14, %rdi
callq 0x1110
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
movl 0x60(%rbx), %eax
movl %eax, 0xc(%rsp)
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0x214f
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x20(%rbx)
jmp 0x2181
leaq 0x20b0(%rip), %rsi      # 0x41ab
movl $0x20, %edx
movq %r14, %rdi
callq 0x1110
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
movq 0x8(%rbx), %rsi
movq 0x20(%rbx), %rax
leaq -0x4(%rsi), %rdx
cmpq 0x28(%rbx), %rax
je 0x215f
movl (%rdx), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x20(%rbx)
jmp 0x216f
leaq 0x18(%rbx), %rdi
leaq 0xc(%rsp), %rdx
callq 0x3d5c
jmp 0x2181
leaq 0x18(%rbx), %rdi
movq %rax, %rsi
callq 0x3d5c
movq 0x8(%rbx), %rsi
leaq 0x48(%rbx), %rdi
addq $-0x4, %rsi
callq 0x3b9e
addq $-0x4, 0x8(%rbx)
movq %rbx, %rdi
callq 0x3815
movl %eax, 0x60(%rbx)
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3b2a
movq %rbx, %rdi
callq 0x1150
// File: /workspace/github_cpp_makefile_star2_O3/ljc2154[P]Rummy/rummy.cpp
// Function: shuffle(std::vector<int, std::allocator<int>>&)
void shuffle(vector<int> &deck)
{
	srand(time(NULL));
	int size = deck.size();
	for (int i = size-1; i >0; i--)
	{
		int swapPos = rand() % i;
		swap(deck, i, swapPos);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %edi, %edi
callq 0x10c0
movl %eax, %edi
callq 0x10d0
movq 0x8(%rbx), %r14
subq (%rbx), %r14
shrq $0x2, %r14
cmpl $0x2, %r14d
jl 0x221f
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
decq %r14
callq 0x1050
cltd
idivl %r14d
movq (%rbx), %rax
movl (%rax,%r14,4), %ecx
movslq %edx, %rdx
movl (%rax,%rdx,4), %esi
movl %esi, (%rax,%r14,4)
movl %ecx, (%rax,%rdx,4)
leaq -0x1(%r14), %rax
incq %r14
cmpq $0x2, %r14
movq %rax, %r14
ja 0x21f2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/ljc2154[P]Rummy/rummy.cpp
// Function: getNewDeck()
vector<int> getNewDeck()
{
	vector<int> deck;
	for (int i = 0; i < 52; i++)
	{
		deck.push_back(i);
	}
	shuffle(deck);
	return deck;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x4(%rsp), %r14
movl $0x0, (%r14)
xorl %eax, %eax
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2260
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x226b
movq %rbx, %rdi
movq %r14, %rdx
callq 0x3d5c
movl 0x4(%rsp), %ecx
leal 0x1(%rcx), %eax
movl %eax, 0x4(%rsp)
cmpl $0x33, %ecx
jl 0x224a
movq %rbx, %rdi
callq 0x21c2
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x22a5
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %r14, %rdi
callq 0x1150
// File: /workspace/github_cpp_makefile_star2_O3/ljc2154[P]Rummy/rummy.cpp
// Function: initializeRemaining[abi:cxx11]()
list<int> initializeRemaining()
{
	list<int> remaining;
	for (int i = 0; i < 52; i++)
		remaining.push_back(i);
	return remaining;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
movq $0x0, 0x10(%rdi)
xorl %ebp, %ebp
movl $0x18, %edi
callq 0x10f0
movl %ebp, 0x10(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1040
incq 0x10(%rbx)
incl %ebp
cmpl $0x34, %ebp
jne 0x22c8
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x2319
movq (%rdi), %r15
movl $0x18, %esi
callq 0x1100
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x2304
movq %r14, %rdi
callq 0x1150
// File: /workspace/github_cpp_makefile_star2_O3/ljc2154[P]Rummy/rummy.cpp
// Function: dealCards(std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&)
void dealCards(vector<int> &deck, vector<int> &userHand, vector<int> &agentHand)
{
	for (int i = 0; i < 14; i ++)
	{
		int topCard = deck.back();
		deck.pop_back();
		if (i%2 == 0)
			userHand.push_back(topCard);
		else
			agentHand.push_back(topCard);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebp, %ebp
leaq 0xc(%rsp), %r12
movq 0x8(%r15), %rcx
movl -0x4(%rcx), %eax
addq $-0x4, %rcx
movl %eax, 0xc(%rsp)
movq %rcx, 0x8(%r15)
testb $0x1, %bpl
jne 0x236c
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x2382
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x2392
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2387
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2392
movq %r14, %rdi
jmp 0x238a
movq %rbx, %rdi
movq %r12, %rdx
callq 0x3d5c
incl %ebp
cmpl $0xe, %ebp
jne 0x233d
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ljc2154[P]Rummy/rummy.cpp
// Function: mergeSort(std::vector<int, std::allocator<int>>&, int, int)
void mergeSort(vector<int> &integers, int start, int finish)
{
	if ((finish - start) <= 1)
		return;
	int m = (finish - start) / 2;
	mergeSort(integers, start, start+m);
	mergeSort(integers, start+m, finish);

	vector<int> temp;
	merge(integers, start, start+m, finish, temp);
	int tempIndex = 0;
	for (int i = start; i < finish; i++)
		integers[i] = temp[tempIndex++];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %edx, %r12d
subl %esi, %r12d
cmpl $0x2, %r12d
jl 0x24be
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
movl %r12d, %r15d
shrl %r15d
addl %esi, %r15d
movl %r15d, %edx
callq 0x23f4
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x23f4
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x3c2e
leaq 0x18(%rsp), %rdi
movq %rsp, %r8
movl %ebp, %esi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x2a71
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2480
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq (%rsp), %rdi
cmpl %ebp, %r14d
jle 0x24ac
movslq %ebp, %rax
movl %r12d, %ecx
shlq $0x2, %rax
addq (%rbx), %rax
xorl %edx, %edx
movl (%rdi,%rdx,4), %esi
movl %esi, (%rax,%rdx,4)
leaq 0x1(%rdx), %rsi
movq %rsi, %rdx
cmpq %rsi, %rcx
jne 0x2498
jmp 0x24b1
testq %rdi, %rdi
je 0x24be
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x24ea
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
jmp 0x24ea
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2500
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1100
movq %rbx, %rdi
callq 0x1150
// File: /workspace/github_cpp_makefile_star2_O3/ljc2154[P]Rummy/rummy.cpp
// Function: printOpponentHandandDeck()
void printOpponentHandandDeck()
{
	/* Printing out what looks like opponent's hand */
	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 56; j++)
		{
			int k = j % 8;
			if (k == 7)
				cout << "* ";
			else if (i == 0 || i == 9 || k == 0)
				cout << "*";
			else
				cout << "?";
		}
		cout << endl;
	}
	cout << endl;

	/* Printing out what looks like a deck */
	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 8; j++)
		{
			if (i == 0 || i == 9 || j == 0 || j == 7)
				cout << "*";
			else
				cout << "?";
		}
		cout << endl;
	}
	cout << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebp, %ebp
movq 0x3a62(%rip), %rbx      # 0x5fd0
leaq 0x1aae(%rip), %r14      # 0x4023
leaq 0x1aa4(%rip), %r12      # 0x4020
leaq 0x1aa2(%rip), %r15      # 0x4025
xorl %r13d, %r13d
movl %r13d, %eax
andl $0x7, %eax
je 0x25a9
cmpl $0x7, %eax
jne 0x25a0
movl $0x2, %edx
movq %rbx, %rdi
movq %r12, %rsi
jmp 0x25b4
cmpl $0x9, %ebp
je 0x25a9
testl %ebp, %ebp
jne 0x25c4
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1110
incl %r13d
cmpl $0x38, %r13d
jne 0x2586
jmp 0x25d1
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x25b4
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
incl %ebp
cmpl $0xa, %ebp
jne 0x2583
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
xorl %ebp, %ebp
testl %ebp, %ebp
sete %al
cmpl $0x9, %ebp
sete %r12b
orb %al, %r12b
movl $0x8, %r13d
cmpl $0x8, %r13d
movq %r15, %rsi
cmoveq %r14, %rsi
testb %r12b, %r12b
cmovneq %r14, %rsi
cmpl $0x1, %r13d
cmoveq %r14, %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x1110
decl %r13d
jne 0x263d
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
incl %ebp
cmpl $0xa, %ebp
jne 0x2628
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1090
// File: /workspace/github_cpp_makefile_star2_O3/ljc2154[P]Rummy/rummy.cpp
// Function: printTurnCard(int)
void printTurnCard(int v)
{
	char suit = getSuit(v);
	char rank = getRank(v);
	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 8; j++)
		{
			if (i == 0 || i == 9 || j == 0 || j == 7)
				cout << "*";
			else if ((j == 1 && i == 1) || (j == 6 && i == 8) || (j == 3 && i == 4))
				cout << rank;
			else if ((j == 6 && i == 1) || (j == 1 && i == 8) || (j == 4 && i == 5))
				cout << suit;
			else
				cout << " ";
		}
		cout << endl;
	}
	cout << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movb $0x26, %al
movl %eax, 0xc(%rsp)
cmpl $0xd, %edi
jl 0x2704
movb $0x25, %al
movl %eax, 0xc(%rsp)
cmpl $0x1a, %edi
jb 0x2704
cmpl $0x27, %edi
movl $0x24, %eax
movl $0x40, %ecx
cmovbl %eax, %ecx
movl %ecx, 0xc(%rsp)
callq 0x2527
movb %al, 0x9(%rsp)
xorl %ecx, %ecx
movq 0x38ba(%rip), %rbx      # 0x5fd0
testl %ecx, %ecx
sete %al
cmpl $0x9, %ecx
sete %r12b
orb %al, %r12b
movl $0x4, %r15d
movl %ecx, %r13d
xorl $0x1, %r13d
movl %ecx, %r14d
xorl $0x4, %r14d
movl %ecx, %ebp
xorl $0x8, %ebp
movl %ecx, 0x10(%rsp)
xorl $0x5, %ecx
movl %ecx, 0x14(%rsp)
cmpl $0x4, %r15d
sete %al
cmpl $-0x3, %r15d
je 0x277f
orb %r12b, %al
jne 0x277f
movl %r15d, %eax
xorl $0x3, %eax
movl %r13d, %ecx
orl %eax, %ecx
jne 0x279e
movb 0x9(%rsp), %al
movb %al, 0xa(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
leaq 0xa(%rsp), %rsi
jmp 0x278e
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x1895(%rip), %rsi      # 0x4023
callq 0x1110
decl %r15d
cmpl $-0x4, %r15d
jne 0x2749
jmp 0x27fe
movl %r15d, %ecx
xorl $-0x2, %ecx
movl %r15d, %edx
xorl $0x1, %edx
orl %r14d, %edx
sete %dl
movl %ebp, %esi
orl %ecx, %esi
je 0x2768
testb %dl, %dl
jne 0x2768
orl %ebp, %eax
sete %dl
movl 0x14(%rsp), %eax
orl %r15d, %eax
sete %al
orl %r13d, %ecx
je 0x27e7
testb %dl, %dl
jne 0x27e7
testb %al, %al
jne 0x27e7
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x183c(%rip), %rsi      # 0x4021
jmp 0x278e
movl 0xc(%rsp), %eax
movb %al, 0xb(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
leaq 0xb(%rsp), %rsi
jmp 0x278e
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
movl 0x10(%rsp), %ecx
incl %ecx
cmpl $0xa, %ecx
jne 0x2716
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ljc2154[P]Rummy/rummy.cpp
// Function: merge(std::vector<int, std::allocator<int>>, int, int, int, std::vector<int, std::allocator<int>>&)
void merge(vector<int> integers, int a1, int m, int b2, vector<int> &output)
{
	int a2, b1;
	a2 = b1 = m;
	while (a1 < a2 && b1 < b2)
	{
		if (integers[a1] <= integers[b1])
			output.push_back(integers[a1++]);
		else
			output.push_back(integers[b1++]);
	}

	while (a1 < a2)
		output.push_back(integers[a1++]);
	while (b1 < b2)
		output.push_back(integers[b1++]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r14
cmpl %edx, %esi
setge %al
cmpl %ecx, %edx
setge %cl
movl %edx, %r13d
orb %al, %cl
jne 0x2af5
movslq %r12d, %rcx
movq (%r14), %rax
movl (%rax,%rcx,4), %edx
movslq %r13d, %rdi
movl (%rax,%rdi,4), %r8d
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %r9
cmpl %r8d, %edx
jle 0x2ac5
incl %r13d
cmpq %r9, %rsi
je 0x2ad9
movl %r8d, (%rsi)
jmp 0x2acf
incl %r12d
cmpq %r9, %rsi
je 0x2adf
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2aeb
leaq (%rax,%rdi,4), %rdx
jmp 0x2ae3
leaq (%rax,%rcx,4), %rdx
movq %rbx, %rdi
callq 0x3d5c
cmpl %r15d, %r12d
jge 0x2af5
cmpl %ebp, %r13d
jl 0x2a9b
subl %r12d, %r15d
jle 0x2b30
movslq %r12d, %r12
shlq $0x2, %r12
movq (%r14), %rdx
addq %r12, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2b1f
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2b27
movq %rbx, %rdi
callq 0x3d5c
addq $0x4, %r12
decl %r15d
jne 0x2b01
subl %r13d, %ebp
jle 0x2b6a
movslq %r13d, %r15
shlq $0x2, %r15
movq (%r14), %rdx
addq %r15, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2b5a
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2b62
movq %rbx, %rdi
callq 0x3d5c
addq $0x4, %r15
decl %ebp
jne 0x2b3c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq