LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: address::to_string(char*, unsigned long, bool) const
char *address::to_string(char *str, size_t len, bool printport) const {
	uint16_t port;

	if (stor.ss_family == AF_INET6) {
		inet_ntop(AF_INET6, &v6()->sin6_addr, str, len);
		port = ntohs(v6()->sin6_port);
	} else if (stor.ss_family == AF_INET) {
		inet_ntop(AF_INET, &v4()->sin_addr, str, len);
		port = ntohs(v4()->sin_port);
	} else {
		return NULL;
	}

	if (printport)
		snprintf(str + strlen(str), len - strlen(str), "/%u", port);

	return str;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movzwl (%rdi), %edi
cmpl $0xa, %edi
je 0x9e66
cmpl $0x2, %edi
jne 0x9eaa
pushq $0x2
popq %rdi
pushq $0x4
jmp 0x9e68
pushq $0x8
popq %rsi
addq %r15, %rsi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0x33f0
testb %bpl, %bpl
je 0x9eac
movzwl 0x2(%r15), %ebp
rolw $0x8, %bp
movq %rbx, %rdi
callq 0x3180
leaq (%rbx,%rax), %rdi
subq %rax, %r14
movzwl %bp, %ecx
leaq 0x27f6(%rip), %rdx      # 0xc694
movq %r14, %rsi
xorl %eax, %eax
callq 0x3560
jmp 0x9eac
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: address::is_equal(address const&) const
bool address::is_equal(const address &a) const {
	if (stor.ss_family != a.stor.ss_family)
		return false;
	if (stor.ss_family == AF_INET6)
		return memcmp(&v6()->sin6_addr, &a.v6()->sin6_addr, sizeof(in6_addr)) == 0;
	else if (stor.ss_family == AF_INET)
		return v4()->sin_addr.s_addr == a.v4()->sin_addr.s_addr;
	return false;
}

// Assembly:
movzwl (%rdi), %eax
cmpw (%rsi), %ax
jne 0x9f47
cmpl $0x2, %eax
je 0x9f4a
cmpl $0xa, %eax
jne 0x9f47
movdqu 0x8(%rsi), %xmm0
movdqu 0x8(%rdi), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jmp 0x9f50
xorl %eax, %eax
retq
movl 0x4(%rdi), %eax
cmpl 0x4(%rsi), %eax
sete %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: dbeacon_daemonize(char const*)
int
dbeacon_daemonize(const char *pidfile)
{
	if (chdir("/") < 0)
		return -1;

	int ch = fork();
	if (ch < 0)
		return -1;

	/* exit parent */
	if (ch != 0)
		_exit(0);

	/* child, lets prepare for daemonizing */

	int null = open("/dev/null", O_RDWR);
	if (null >= 0) {
		dup2(null, 0);
		dup2(null, 1);
		dup2(null, 2);
	}

	umask(022);
	setsid();

	if (pidfile) {
		FILE *f = fopen(pidfile, "w");
		if (f) {
			fprintf(f, "%u\n", getpid());
			fclose(f);
		} else {
			d_log(LOG_ERR, "Failed to open PID file to write.");
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x26d7(%rip), %rdi      # 0xc698
callq 0x3520
pushq $-0x1
popq %rbx
testl %eax, %eax
js 0xa07a
callq 0x30e0
testl %eax, %eax
js 0xa07a
jne 0xa081
leaq 0x26af(%rip), %rdi      # 0xc69a
xorl %ebx, %ebx
pushq $0x2
popq %rsi
xorl %eax, %eax
callq 0x3290
testl %eax, %eax
js 0xa01a
movl %eax, %ebp
movl %eax, %edi
xorl %esi, %esi
callq 0x3370
pushq $0x1
popq %rsi
movl %ebp, %edi
callq 0x3370
pushq $0x2
popq %rsi
movl %ebp, %edi
callq 0x3370
pushq $0x12
popq %rdi
callq 0x35f0
callq 0x3410
testq %r14, %r14
je 0xa07a
leaq 0x1efd(%rip), %rsi      # 0xbf30
movq %r14, %rdi
callq 0x3430
testq %rax, %rax
je 0xa067
movq %rax, %r14
callq 0x3510
leaq 0x2655(%rip), %rsi      # 0xc6a4
xorl %ebx, %ebx
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x34f0
movq %r14, %rdi
callq 0x33b0
jmp 0xa07a
leaq 0x263a(%rip), %rsi      # 0xc6a8
xorl %ebx, %ebx
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x3dfc
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
xorl %edi, %edi
callq 0x35a0
// File: /workspace/github_cpp_makefile_star2_O2/hugosantos[P]dbeacon/dbeacon_posix.cpp
// Function: get_local_address_for(address const&)
address get_local_address_for(const address &remote)
{
	int tmpSock = socket(remote.family(), SOCK_DGRAM, 0);
	if (tmpSock < 0) {
		perror("Failed to create socket to discover local addr");
		exit(-1);
	}

	if (connect(tmpSock, remote.saddr(), remote.addrlen()) != 0) {
		perror("Failed to connect multicast socket");
		exit(-1);
	}

	address result(remote.family());
	if (result.fromsocket(tmpSock) < 0) {
		perror("getsockname");
		exit(-1);
	}

	close(tmpSock);
	return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movzwl (%rsi), %edi
pushq $0x2
popq %rsi
xorl %edx, %edx
callq 0x30d0
testl %eax, %eax
js 0xa107
movl %eax, %ebp
cmpw $0xa, (%r14)
pushq $0x1c
popq %rax
pushq $0x10
popq %rdx
cmovel %eax, %edx
movl %ebp, %edi
movq %r14, %rsi
callq 0x3310
testl %eax, %eax
jne 0xa110
movzwl (%r14), %eax
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x70(%rbx)
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movw %ax, (%rbx)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x9ef8
testl %eax, %eax
js 0xa119
movl %ebp, %edi
callq 0x3670
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x25bc(%rip), %rdi      # 0xc6ca
jmp 0xa120
leaq 0x25e2(%rip), %rdi      # 0xc6f9
jmp 0xa120
leaq 0x19ba(%rip), %rdi      # 0xbada
callq 0x3320
pushq $-0x1
popq %rdi
callq 0x3450
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/hugosantos[P]dbeacon/protocol.cpp
// Function: write_tlv_string(unsigned char*, int, int&, unsigned char, char const*)
static inline bool write_tlv_string(uint8_t *buf, int maxlen, int &pointer,
					uint8_t type, const char *str) {
	int len = strlen(str);
	if ((pointer + 2 + len) > maxlen)
		return false;
	buf[pointer + 0] = type;
	buf[pointer + 1] = len;
	memcpy(buf + pointer + 2, str, len);
	pointer += len + 2;
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movl %ecx, %ebp
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r12
movq %r8, %rdi
callq 0x3180
movslq (%r14), %rcx
leal (%rax,%rcx), %r13d
addl $0x2, %r13d
cmpl %ebx, %r13d
jg 0xa512
leal 0x2(%rax), %edx
movl %edx, 0x4(%rsp)
movb %bpl, (%r12,%rcx)
movslq (%r14), %rcx
movb %al, 0x1(%r12,%rcx)
movslq (%r14), %rcx
leaq (%r12,%rcx), %rdi
addq $0x2, %rdi
movslq %eax, %rdx
movq %r15, %rsi
callq 0x3300
movl 0x4(%rsp), %eax
addl %eax, (%r14)
cmpl %ebx, %r13d
setle %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/hugosantos[P]dbeacon/protocol.cpp
// Function: write_tlv_stats(unsigned char*, int, int&, unsigned char, unsigned int, int, beaconMcastState const&)
static bool write_tlv_stats(uint8_t *buff, int maxlen, int &ptr, uint8_t type,
			uint32_t age, int sttl, const beaconMcastState &st) {
	if (!write_tlv_start(buff, maxlen, ptr, type, 20))
		return false;

	uint8_t *b = buff + ptr;

	write_u32(b + 0, st.s.timestamp);
	write_u32(b + 4, age);

	b[8] = (sttl ? sttl : defaultTTL) - st.s.rttl;

	write_f(b + 9, st.s.avgdelay);
	write_f(b + 13, st.s.avgjitter);

	/* average loss in 0..255 range */
	b[17] = (uint8_t)(st.s.avgloss * 0xff);
	b[18] = st.s.avgdup > 10. ? 0xff : ((uint8_t)ceil(st.s.avgdup * 25.5));
	b[19] = (uint8_t)(st.s.avgooo * 0xff);

	ptr += 20;

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movslq (%rdx), %rax
leal 0x16(%rax), %edx
cmpl %esi, %edx
jg 0xa600
movq %rdi, %r14
movq 0x30(%rsp), %r12
movb %cl, (%rdi,%rax)
movslq (%rbx), %rax
movb $0x14, 0x1(%rdi,%rax)
movslq (%rbx), %rax
leaq 0x2(%rax), %r15
movl %r15d, (%rbx)
movl 0x28(%r12), %ecx
bswapl %ecx
movl %ecx, 0x2(%rdi,%rax)
bswapl %r8d
movl %r8d, 0x6(%rdi,%rax)
testl %r9d, %r9d
jne 0xa57f
leaq 0xbdc(%rip), %rcx       # 0xb158
movl (%rcx), %r9d
subb 0x4d(%r12), %r9b
movb %r9b, 0xa(%r14,%rax)
movl 0x38(%r12), %ecx
bswapl %ecx
movl %ecx, 0xb(%r14,%rax)
movl 0x3c(%r12), %ecx
bswapl %ecx
movl %ecx, 0xf(%r14,%rax)
movss 0x40(%r12), %xmm0
mulss 0x216c(%rip), %xmm0     # 0xc71c
cvttss2si %xmm0, %ecx
movb %cl, 0x13(%r14,%rax)
movss 0x44(%r12), %xmm0
movb $-0x1, %al
ucomiss 0x2157(%rip), %xmm0     # 0xc720
ja 0xa5e0
cvtss2sd %xmm0, %xmm0
mulsd 0x2151(%rip), %xmm0     # 0xc728
callq 0x30a0
cvttsd2si %xmm0, %eax
movb %al, 0x12(%r14,%r15)
movss 0x48(%r12), %xmm0
mulss 0x2128(%rip), %xmm0     # 0xc71c
cvttss2si %xmm0, %eax
movb %al, 0x13(%r14,%r15)
addl $0x14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/hugosantos[P]dbeacon/protocol.cpp
// Function: check_string(char*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
static inline bool check_string(char *hd, int len, string &result) {
	for (int i = 0; i < len; i++) {
		if (!isprint(hd[i]))
			return false;
	}
	result = string(hd, len);
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
xorl %ecx, %ecx
testl %esi, %esi
movl $0x0, %r12d
cmovgl %esi, %r12d
movq %rcx, %r13
cmpq %rcx, %r12
je 0xac0d
movsbl (%r15,%r13), %edi
callq 0x35e0
leaq 0x1(%r13), %rcx
testl %eax, %eax
jne 0xabf1
jmp 0xac3c
movl %ebx, %edx
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
addq %r15, %rdx
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x9176
movq %r14, %rdi
movq %r12, %rsi
callq 0x3460
movq %r12, %rdi
callq 0x3688
movslq %ebx, %rax
cmpq %rax, %r13
setge %al
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/hugosantos[P]dbeacon/ssmping.cpp
// Function: SetupSSMPing()
int SetupSSMPing() {
	address addr(beaconUnicastAddr.family());

	if (!addr.set_port(4321))
		return -1;

	ssmPingSocket = SetupSocket(addr, true, false);
	if (ssmPingSocket < 0)
		return -1;

	if (!SetHops(ssmPingSocket, addr, 64)) {
		close(ssmPingSocket);
		return -1;
	}

	if (!RequireToAddress(ssmPingSocket, addr)) {
		close(ssmPingSocket);
		return -1;
	}

	assert(SSMPingV4Addr.set_addr(SSMPingV4ResponseChannel));
	assert(SSMPingV6Addr.set_addr(SSMPingV6ResponseChannel));

	ListenTo(ssmPingSocket, handle_ssmping);

	return 0;
}

// Assembly:
pushq %rbx
subq $0x80, %rsp
leaq 0x7855(%rip), %rdi      # 0x124b8
callq 0x9686
movq %rsp, %rbx
movq %rbx, %rdi
movl %eax, %esi
callq 0x9c24
movq %rbx, %rdi
movl $0x10e1, %esi           # imm = 0x10E1
callq 0x9e08
pushq $-0x1
popq %rbx
testb %al, %al
je 0xad16
movq %rsp, %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x9773
movl %eax, 0x7730(%rip)      # 0x123d0
testl %eax, %eax
js 0xad16
movq %rsp, %rsi
pushq $0x40
popq %rdx
movl %eax, %edi
callq 0x98d6
movl 0x7719(%rip), %edi      # 0x123d0
testb %al, %al
je 0xad11
movq %rsp, %rsi
callq 0x994d
testb %al, %al
je 0xad0b
leaq 0x9cca(%rip), %rdi      # 0x14998
leaq 0x1b4d(%rip), %rsi      # 0xc822
callq 0x9dd6
testb %al, %al
je 0xad21
leaq 0x9c33(%rip), %rdi      # 0x14918
leaq 0x1b45(%rip), %rsi      # 0xc831
callq 0x9dd6
testb %al, %al
je 0xad3a
movl 0x76d5(%rip), %edi      # 0x123d0
leaq 0x55(%rip), %rsi        # 0xad57
callq 0x5674
xorl %ebx, %ebx
jmp 0xad16
movl 0x76bf(%rip), %edi      # 0x123d0
callq 0x3670
movl %ebx, %eax
addq $0x80, %rsp
popq %rbx
retq
leaq 0x1a79(%rip), %rdi      # 0xc7a1
leaq 0x1aa3(%rip), %rsi      # 0xc7d2
leaq 0x1aa8(%rip), %rcx      # 0xc7de
pushq $0x47
jmp 0xad51
leaq 0x1ab0(%rip), %rdi      # 0xc7f1
leaq 0x1a8a(%rip), %rsi      # 0xc7d2
leaq 0x1a8f(%rip), %rcx      # 0xc7de
pushq $0x48
popq %rdx
callq 0x3260
// File: /workspace/github_cpp_makefile_star2_O2/hugosantos[P]dbeacon/ssmping.cpp
// Function: handle_ssmping(int, Message const&)
static void handle_ssmping(int s, const Message &msg)
{
	if (msg.buffer[0] != SSMPING_REQUEST || msg.len > maxSSMPingMessage)
		return;

	if (verbose > 1) {
		char tmp[64];
		info("Got SSM Ping Request from %s",
			msg.from.to_string(tmp, sizeof(tmp)));
	}

	msg.buffer[0] = SSMPING_ANSWER;

	if (SendTo(s, msg.buffer, msg.len, msg.to, msg.from) < 0)
		return;

	address mcastDest(msg.from.family() == AF_INET6 ?
			SSMPingV6Addr : SSMPingV4Addr);
	mcastDest.set_port(msg.from.port());

	SendTo(s, msg.buffer, msg.len, msg.to, mcastDest);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq 0x110(%rsi), %rax
cmpb $0x51, (%rax)
jne 0xae3e
movq %rsi, %r14
cmpq $0x3e8, 0x118(%rsi) # imm = 0x3E8
ja 0xae3e
movl %edi, %ebx
leaq 0x77a6(%rip), %rcx      # 0x12538
cmpl $0x2, (%rcx)
jl 0xadc0
movq %rsp, %rsi
pushq $0x40
popq %rdx
pushq $0x1
popq %rcx
movq %r14, %rdi
callq 0x9e40
leaq 0x1a92(%rip), %rdi      # 0xc841
movq %rax, %rsi
xorl %eax, %eax
callq 0x3f31
movq 0x110(%r14), %rax
movb $0x41, (%rax)
movq 0x110(%r14), %rsi
movl 0x118(%r14), %edx
leaq 0x80(%r14), %r15
movl %ebx, %edi
movq %r15, %rcx
movq %r14, %r8
callq 0x9b5d
testl %eax, %eax
js 0xae3e
movq %r14, %rdi
callq 0x9686
cmpl $0xa, %eax
leaq 0x9b1d(%rip), %rax      # 0x14918
leaq 0x9b96(%rip), %rsi      # 0x14998
cmoveq %rax, %rsi
movq %rsp, %r12
movq %r12, %rdi
callq 0x9c4a
movq %r14, %rdi
callq 0x9e22
movq %r12, %rdi
movl %eax, %esi
callq 0x9e08
movq 0x110(%r14), %rsi
movl 0x118(%r14), %edx
movl %ebx, %edi
movq %r15, %rcx
movq %r12, %r8
callq 0x9b5d
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/Marcos30004347[P]JSS-with-VNS/main.cpp
// Function: total_cost(std::vector<unsigned int, std::allocator<unsigned int>>)
unsigned total_cost(solution s) {
  vector<unsigned> positions(costs.size(), 0);
  vector<unsigned> job_time(costs.size(), 0);
  vector<unsigned> machine_time(costs[0].size(), 0);

  for(unsigned j : s) {
    unsigned o = positions[j];
    unsigned m = ops[j][o].machine;
    unsigned time = costs[j][m] + max(job_time[j], machine_time[m]);
    job_time[j] = time;
    machine_time[m] = time;
    positions[j]++;
  }

  unsigned total = 0;
  for(unsigned m : machine_time)
    total = max(total, m);

  return total;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq 0x5d21(%rip), %rax      # 0x7118
subq 0x5d12(%rip), %rax      # 0x7110
pushq $0x18
popq %r15
cqto
idivq %r15
leaq -0x50(%rbp), %rdx
andl $0x0, (%rdx)
leaq -0x68(%rbp), %rdi
leaq -0x38(%rbp), %r14
movq %rax, %rsi
movq %r14, %rcx
callq 0x246e
movq 0x5cf0(%rip), %rax      # 0x7118
subq 0x5ce1(%rip), %rax      # 0x7110
cqto
idivq %r15
andl $0x0, (%r14)
leaq -0x50(%rbp), %rdi
leaq -0x38(%rbp), %rdx
leaq -0x20(%rbp), %rcx
movq %rax, %rsi
callq 0x246e
movq 0x5cbd(%rip), %rax      # 0x7110
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x2, %rsi
leaq -0x20(%rbp), %rdx
andl $0x0, (%rdx)
leaq -0x38(%rbp), %rdi
leaq -0x19(%rbp), %rcx
callq 0x246e
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq -0x68(%rbp), %rdx
movq 0x5ca4(%rip), %rsi      # 0x7128
movq 0x5c85(%rip), %rdi      # 0x7110
movq -0x50(%rbp), %r8
movq -0x38(%rbp), %r9
cmpq %rcx, %rax
je 0x14d4
movl (%rax), %r10d
movl (%rdx,%r10,4), %r11d
imulq $0x18, %r10, %rbx
movq (%rsi,%rbx), %r14
movl (%r14,%r11,8), %r11d
movq (%rdi,%rbx), %rbx
movl (%r8,%r10,4), %r14d
movl (%r9,%r11,4), %r15d
cmpl %r15d, %r14d
cmoval %r14d, %r15d
addl (%rbx,%r11,4), %r15d
movl %r15d, (%r8,%r10,4)
movl %r15d, (%r9,%r11,4)
incl (%rdx,%r10,4)
addq $0x4, %rax
jmp 0x1493
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
xorl %ebx, %ebx
cmpq %rcx, %rax
je 0x14f0
movl (%rax), %edx
cmpl %edx, %ebx
cmovbel %edx, %ebx
addq $0x4, %rax
jmp 0x14de
leaq -0x38(%rbp), %rdi
callq 0x2722
leaq -0x50(%rbp), %rdi
callq 0x2722
leaq -0x68(%rbp), %rdi
callq 0x2722
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2722
jmp 0x1529
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x2722
movq %rbx, %rdi
callq 0x11b0
// File: /workspace/github_cpp_makefile_star2_O2/Marcos30004347[P]JSS-with-VNS/main.cpp
// Function: permutate(std::vector<unsigned int, std::allocator<unsigned int>>&)
solution permutate(solution &s) {
  unsigned size = s.size();
	int pos1 = 1 + rand() % (size / 4);
	int pos2 = pos1 + 1 + rand() % (size / 4);
	int pos3 = pos2 + 1 + rand() % (size / 4);

	int i;
  solution s_;

	for (i = 0; i < pos1; i++)
    s_.push_back(s[i]);
	for (i = pos3; i < size; i++)
    s_.push_back(s[i]);
	for (i = pos2; i < pos3; i++)
    s_.push_back(s[i]);
	for (i = pos1; i < pos2; i++)
    s_.push_back(s[i]);

  return s_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r15
subq (%rsi), %r15
shrq $0x2, %r15
callq 0x1060
movq %r15, -0x40(%rbp)
movl %r15d, %r13d
shrl $0x2, %r13d
xorl %r12d, %r12d
xorl %edx, %edx
divl %r13d
movl %edx, %r15d
callq 0x1060
xorl %edx, %edx
divl %r13d
leal (%r15,%rdx), %eax
movq %rax, -0x30(%rbp)
leal (%r15,%rdx), %eax
addl $0x2, %eax
movl %eax, -0x34(%rbp)
callq 0x1060
xorl %edx, %edx
divl %r13d
movq -0x30(%rbp), %rax
addl %edx, %eax
addl $0x3, %eax
movl %eax, -0x30(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
xorl %r13d, %r13d
cmpq %r15, %r13
ja 0x15d3
movq (%r14), %rsi
addq %r12, %rsi
movq %rbx, %rdi
callq 0x24ce
incq %r13
addq $0x4, %r12
jmp 0x15b7
movslq -0x30(%rbp), %r12
movq -0x40(%rbp), %r13
cmpl %r13d, %r12d
jae 0x15f8
leaq (,%r12,4), %rsi
addq (%r14), %rsi
movq %rbx, %rdi
callq 0x24ce
incq %r12
jmp 0x15db
movl -0x34(%rbp), %r12d
movq %r12, %r13
cmpl %r13d, -0x30(%rbp)
jle 0x1630
leaq (,%r13,4), %rsi
addq (%r14), %rsi
movq %rbx, %rdi
callq 0x24ce
incq %r13
jmp 0x15ff
leaq (,%r15,4), %rsi
addq (%r14), %rsi
movq %rbx, %rdi
callq 0x24ce
incq %r15
cmpq %r12, %r15
jb 0x161d
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1650
jmp 0x1650
jmp 0x1650
movq %rax, %r14
movq %rbx, %rdi
callq 0x2722
movq %r14, %rdi
callq 0x11b0
// File: /workspace/github_cpp_makefile_star2_O2/Marcos30004347[P]JSS-with-VNS/main.cpp
// Function: opt_2(std::vector<unsigned int, std::allocator<unsigned int>>)
solution opt_2(solution s) {
  unsigned i = rand() % s.size();
  unsigned j = rand() % s.size();
  unsigned tmp = s[i];

  s[i] = s[j];
  s[j] = tmp;

  return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1060
cltq
movq 0x8(%rbx), %rcx
subq (%rbx), %rcx
sarq $0x2, %rcx
xorl %edx, %edx
divq %rcx
movq %rdx, %r15
callq 0x1060
cltq
movq (%rbx), %rcx
movq 0x8(%rbx), %rsi
movq %rsi, %rdi
subq %rcx, %rdi
sarq $0x2, %rdi
xorl %edx, %edx
divq %rdi
movl %r15d, %eax
movl (%rcx,%rax,4), %edi
movl %edx, %edx
movl (%rcx,%rdx,4), %r8d
movl %r8d, (%rcx,%rax,4)
movl %edi, (%rcx,%rdx,4)
movq %rcx, (%r14)
movq %rsi, 0x8(%r14)
movq 0x10(%rbx), %rax
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Marcos30004347[P]JSS-with-VNS/main.cpp
// Function: argmin(std::vector<unsigned int, std::allocator<unsigned int>>, unsigned int&, unsigned int)
solution argmin(solution s, unsigned& k, unsigned p) {
  solution s_ = s;
  for(int i=0; i<p; i++) {
    solution tmp;

    switch (k) {
    case 1: tmp = opt_2(s); break;
    case 2: tmp = opt_3(s); break;
    default: break;
    }

    if(total_cost(tmp) < total_cost(s_))
      s_ = tmp;
  }

  return s_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %ecx, %r14d
movq %rdx, -0x58(%rbp)
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
callq 0x24f4
leaq -0xa0(%rbp), %r13
subl $0x1, %r14d
jb 0x1c6c
andq $0x0, -0x40(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq -0x58(%rbp), %rax
movl (%rax), %eax
cmpl $0x2, %eax
je 0x1bc8
cmpl $0x1, %eax
jne 0x1c05
leaq -0xd0(%rbp), %r15
movq %r15, %rdi
movq -0x38(%rbp), %rsi
callq 0x24f4
leaq -0xb8(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1663
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x2a48
movq %rbx, %rdi
callq 0x2722
movq %r15, %rdi
jmp 0x1c00
movq %r13, %rbx
movq %r13, %rdi
movq -0x38(%rbp), %rsi
callq 0x24f4
leaq -0xb8(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x16e5
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x2a48
movq %r15, %rdi
callq 0x2722
movq %rbx, %rdi
callq 0x2722
leaq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x24f4
leaq -0x70(%rbp), %rdi
callq 0x13e0
leaq -0x88(%rbp), %r12
movl %eax, %ebx
movq %r12, %rdi
movq -0x30(%rbp), %rsi
callq 0x24f4
movq %r12, %rdi
callq 0x13e0
movl %eax, %r15d
movq %r12, %rdi
callq 0x2722
leaq -0x70(%rbp), %rdi
callq 0x2722
cmpl %r15d, %ebx
jae 0x1c5e
movq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x254c
leaq -0x50(%rbp), %rdi
callq 0x2722
jmp 0x1b64
movq -0x30(%rbp), %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0xa0(%rbp), %rdi
jmp 0x1caf
jmp 0x1ca3
jmp 0x1ca3
movq %rax, %r14
leaq -0x88(%rbp), %rdi
callq 0x2722
jmp 0x1cab
movq %rax, %r14
jmp 0x1cb4
movq %rax, %r14
leaq -0x70(%rbp), %rdi
callq 0x2722
leaq -0x50(%rbp), %rdi
callq 0x2722
movq -0x30(%rbp), %rdi
callq 0x2722
movq %r14, %rdi
callq 0x11b0
// File: /workspace/github_cpp_makefile_star2_O2/Marcos30004347[P]JSS-with-VNS/main.cpp
// Function: sequential_neighborhood_change_step(std::vector<unsigned int, std::allocator<unsigned int>>&, std::vector<unsigned int, std::allocator<unsigned int>>&, unsigned int&)
void sequential_neighborhood_change_step(solution &s, solution &s_, unsigned &k) {
  if(total_cost(s_) < total_cost(s)) {
    s = s_;
    k = 1;
  } else
    k = k + 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq -0x58(%rbp), %r12
movq %r12, %rdi
callq 0x24f4
movq %r12, %rdi
callq 0x13e0
movl %eax, %r12d
leaq -0x40(%rbp), %rdi
movq %r15, %rsi
callq 0x24f4
leaq -0x40(%rbp), %rdi
callq 0x13e0
movl %eax, %r13d
leaq -0x40(%rbp), %rdi
callq 0x2722
leaq -0x58(%rbp), %rdi
callq 0x2722
cmpl %r13d, %r12d
jae 0x1d3e
movq %r15, %rdi
movq %r14, %rsi
callq 0x254c
pushq $0x1
popq %rax
jmp 0x1d42
movl (%rbx), %eax
incl %eax
movl %eax, (%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x2722
jmp 0x1d64
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x2722
movq %rbx, %rdi
callq 0x11b0
// File: /workspace/github_cpp_makefile_star2_O2/Marcos30004347[P]JSS-with-VNS/main.cpp
// Function: vnd_best_improvement(std::vector<unsigned int, std::allocator<unsigned int>>&, unsigned int, unsigned int&, unsigned int)
solution vnd_best_improvement(solution &s, unsigned l_max, unsigned& k, unsigned p) {
    unsigned l;
    bool stop;
    solution s_;

    do {
      stop = false;
      l = 1;
      s_ = s;
      do {
        solution s__ = argmin(s, k, p);
        sequential_neighborhood_change_step(s, s__, l);
      } while(l != l_max);
  
      if(total_cost(s_) <= total_cost(s))
        stop = true;
    
    } while(!stop);
    return s_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %r8d, -0x44(%rbp)
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, %r13
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x38(%rbp)
andq $0x0, 0x10(%rdi)
leaq -0x90(%rbp), %rbx
leaq -0xa8(%rbp), %r14
movl $0x1, -0x2c(%rbp)
movq -0x38(%rbp), %rdi
movq %r13, %rsi
callq 0x254c
movq %rbx, %rdi
movq %r13, %rsi
callq 0x24f4
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl -0x44(%rbp), %ecx
callq 0x1b35
movq %rbx, %rdi
callq 0x2722
movq %r13, %rdi
movq %r14, %rsi
leaq -0x2c(%rbp), %rdx
callq 0x1cce
movq %r14, %rdi
callq 0x2722
cmpl %r12d, -0x2c(%rbp)
jne 0x1dc6
leaq -0x78(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x24f4
leaq -0x78(%rbp), %rdi
callq 0x13e0
movl %eax, -0x40(%rbp)
leaq -0x60(%rbp), %rdi
movq %r13, %rsi
callq 0x24f4
leaq -0x60(%rbp), %rdi
callq 0x13e0
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x2722
leaq -0x78(%rbp), %rdi
callq 0x2722
movl -0x3c(%rbp), %eax
cmpl %eax, -0x40(%rbp)
ja 0x1db3
movq -0x38(%rbp), %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x2722
jmp 0x1e7d
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
jmp 0x1ea0
jmp 0x1e91
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
jmp 0x1ea0
movq %rax, %rbx
jmp 0x1ea5
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x2722
movq -0x38(%rbp), %rdi
callq 0x2722
movq %rbx, %rdi
callq 0x11b0
// File: /workspace/github_cpp_makefile_star2_O2/Marcos30004347[P]JSS-with-VNS/main.cpp
// Function: general_vns(std::vector<unsigned int, std::allocator<unsigned int>>)
solution general_vns(solution s) {
	unsigned it = 0, k = 0;
  ///TODO tirar daqui
  unsigned k_max = 2;
  unsigned l_max = 2;

	do {
    k = 1;
    while(k <= k_max) {
      solution s_ = permutate(s);
      solution s__ = vnd_best_improvement(s_, l_max, k, NEIGHBORHOOD_SIZE);
      sequential_neighborhood_change_step(s, s__, k);
    }
    it++;
	} while (it < it_max);
  
  return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, -0x38(%rbp)
xorl %eax, %eax
leaq -0x68(%rbp), %r15
leaq -0x50(%rbp), %r12
leaq -0x2c(%rbp), %r14
pushq $0xf
popq %r13
movl %eax, -0x30(%rbp)
movl $0x1, -0x2c(%rbp)
pushq $0x1
popq %rax
cmpl $0x2, %eax
ja 0x1f34
movq %r15, %rdi
movq %rbx, %rsi
callq 0x153a
movq %r12, %rdi
movq %r15, %rsi
pushq $0x2
popq %rdx
movq %r14, %rcx
movl %r13d, %r8d
callq 0x1d75
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1cce
movq %r12, %rdi
callq 0x2722
movq %r15, %rdi
callq 0x2722
movl -0x2c(%rbp), %eax
jmp 0x1eed
movl -0x30(%rbp), %eax
incl %eax
cmpl 0x5209(%rip), %eax      # 0x7148
jb 0x1ee0
movq (%rbx), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2722
jmp 0x1f86
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x2722
movq %rbx, %rdi
callq 0x11b0
// File: /workspace/github_cpp_makefile_star2_O2/Marcos30004347[P]JSS-with-VNS/main.cpp
// Function: build_cost_matrix(std::vector<std::vector<op, std::allocator<op>>, std::allocator<std::vector<op, std::allocator<op>>>>&)
vector<vector<unsigned>> build_cost_matrix(vector<job> &ops) {
  vector<vector<unsigned>> costs;

  for(job j : ops){
    job j_sorted = sort_by(j);
    
    vector<unsigned> j_cost;

    for(op o : j_sorted)
      j_cost.push_back(o.cost);

    costs.push_back(j_cost);
  }
  return costs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movq %rdi, -0x30(%rbp)
movups %xmm0, (%rdi)
movq (%rsi), %r14
movq 0x8(%rsi), %rax
movq %rax, -0x38(%rbp)
leaq -0x44(%rbp), %r15
leaq -0xb0(%rbp), %r12
leaq -0x98(%rbp), %r13
leaq -0x80(%rbp), %rbx
cmpq -0x38(%rbp), %r14
je 0x20dc
movq %r12, %rdi
movq %r14, %rsi
callq 0x2620
movq %r13, %rdi
movq %r12, %rsi
callq 0x2620
movq %r14, -0x40(%rbp)
movq %r12, %r14
leaq -0x60(%rbp), %rdi
movq %r13, %rsi
callq 0x1fa6
movq %r13, %rdi
callq 0x30de
andq $0x0, -0x70(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x80(%rbp)
movq -0x60(%rbp), %r12
movq -0x58(%rbp), %r13
cmpq %r13, %r12
je 0x20a0
movq (%r12), %rax
movq %rax, -0x48(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x24ce
addq $0x8, %r12
jmp 0x2082
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x2678
movq %rbx, %rdi
callq 0x2722
leaq -0x60(%rbp), %rdi
callq 0x30de
movq %r14, %r12
movq %r14, %rdi
callq 0x30de
movq -0x40(%rbp), %r14
addq $0x18, %r14
leaq -0x98(%rbp), %r13
jmp 0x2033
movq -0x30(%rbp), %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x210a
movq %rax, %rbx
jmp 0x212b
movq %rax, %rbx
jmp 0x211f
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
jmp 0x211a
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x2722
leaq -0x60(%rbp), %rdi
callq 0x30de
leaq -0xb0(%rbp), %rdi
callq 0x30de
movq -0x30(%rbp), %rdi
callq 0x2416
movq %rbx, %rdi
callq 0x11b0
// File: /workspace/github_cpp_makefile_star2_O2/chinmayachaudhry[P]Branch-Predictor/btb.cpp
// Function: btb::mask(int)
ll btb :: mask(int N)
{
	ll mask = 0;
	for(int i = 0; i<(int)N; i++)
	{	
		mask <<= 1;
		mask |= 1;
	}
	return (mask);
}

// Assembly:
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
subl $0x1, %esi
jb 0x2e72
leaq 0x1(,%rax,2), %rax
jmp 0x2e63
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/chinmayachaudhry[P]Branch-Predictor/btb.cpp
// Function: btb::btb(long long, long long)
btb :: btb(ll index_bits, ll btb_assoc)
{
	this->index_bits = (int)index_bits;
	this->btb_assoc = (int)btb_assoc;
//	std::cout << "I: " << index_bits << " A: " << btb_assoc << std::endl;
	sets = (ll)pow(2.0, index_bits);
	mispredictions = branch_count = 0;
	index_mask = mask(index_bits + 2);
	tag_mask = mask(64);			// Assuming the pc address can be upto 64 bits long

	cacheline = new btb_cacheline*[sets];
	for(ll i = 0; i<sets; i++)
		cacheline[i] = new btb_cacheline[btb_assoc];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r12
pushq $0x38
popq %rcx
movq %rdx, %rax
mulq %rcx
seto %dl
addq $0x8, %rax
pushq $-0x1
popq %rcx
cmovbq %rcx, %rax
movq %rdi, %r14
movl %r12d, 0x20(%rdi)
cvtsi2sd %rsi, %xmm0
movl %ebx, 0x24(%rdi)
testb %dl, %dl
cmovneq %rcx, %rax
movq %rax, (%rsp)
callq 0x2160
cvttsd2si %xmm0, %r13
movq %r13, 0x18(%r14)
leal 0x2(%r12), %esi
callq 0x2e5c
xorpd %xmm0, %xmm0
movupd %xmm0, 0x28(%r14)
movq %rax, 0x8(%r14)
pushq $0x40
popq %rsi
callq 0x2e5c
movq %rax, 0x10(%r14)
movq %r13, %rax
shrq $0x3d, %rax
leaq (,%r13,8), %rcx
xorl %ebp, %ebp
negq %rax
movl $0x0, %edi
sbbq %rdi, %rdi
orq %rcx, %rdi
callq 0x2030
movq %r14, 0x8(%rsp)
movq %rax, (%r14)
movq %rbx, 0x10(%rsp)
imulq $-0x38, %rbx, %rbx
cmpq %r13, %rbp
jge 0x2f77
movq (%rsp), %rdi
callq 0x2030
movq %rax, %r12
leaq 0x8(%rax), %r14
movq 0x10(%rsp), %rax
movq %rax, (%r12)
testq %rax, %rax
je 0x2f66
movq %r14, %r13
xorl %r15d, %r15d
movq %r13, %rdi
callq 0x33de
addq $-0x38, %r15
addq $0x38, %r13
cmpq %r15, %rbx
jne 0x2f48
movq 0x8(%rsp), %rax
movq 0x18(%rax), %r13
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %r14, (%rax,%rbp,8)
incq %rbp
jmp 0x2f1f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
testq %r15, %r15
je 0x2fa7
negq %r15
movq %r12, %rbx
addq $-0x18, %rbx
leaq (%rbx,%r15), %rdi
callq 0x20c0
addq $-0x38, %r15
jne 0x2f98
movq %r12, %rdi
movq (%rsp), %rsi
callq 0x22a0
movq %r14, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O2/chinmayachaudhry[P]Branch-Predictor/btb.cpp
// Function: btb::find_cacheline(long long)
btb_cacheline * btb :: find_cacheline(ll address)
{
	ll tag = calcTag(address);
	ll index = calcIndex(address);

	for(int i = 0; i<(int)btb_assoc; i++)
	{
		if((cacheline[index][i].getTag() == tag) && (cacheline[index][i].getValidity() == "Valid"))
			return (&cacheline[index][i]);
	}	
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq 0x10(%rdi), %rbx
andq %rsi, %rbx
movb 0x20(%rdi), %cl
addb $0x2, %cl
sarq %cl, %rbx
andq 0x8(%rdi), %rsi
sarq $0x2, %rsi
xorl %r13d, %r13d
xorl %r12d, %r12d
movq %rsi, (%rsp)
movslq 0x24(%r14), %rax
cmpq %rax, %r12
jge 0x3092
movq (%r14), %rax
movq (%rax,%rsi,8), %rax
cmpq %rbx, 0x8(%rax,%r13)
jne 0x3089
leaq (%rax,%r13), %rsi
addq $0x18, %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x21f0
movq %r15, %rdi
leaq 0x202d(%rip), %rsi      # 0x509e
callq 0x342e
movl %eax, %ebp
movq %r15, %rdi
callq 0x20c0
movq (%rsp), %rsi
testb %bpl, %bpl
jne 0x3096
incq %r12
addq $0x38, %r13
jmp 0x303b
xorl %eax, %eax
jmp 0x30a0
movq (%r14), %rax
addq (%rax,%rsi,8), %r13
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/chinmayachaudhry[P]Branch-Predictor/btb.cpp
// Function: btb::replace_cacheline(long long)
void btb :: replace_cacheline(ll address)
{
	ll tag = calcTag(address);
	ll index = calcIndex(address);
	btb_cacheline *evicted_cacheline = cacheline_to_replace(index);

	evicted_cacheline->setAddress(address);
	evicted_cacheline->setTag(tag);
	evicted_cacheline->setSequence_num(branch_count);
	evicted_cacheline->setValidity("Valid");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %r12
andq %rsi, %r12
movb 0x20(%rdi), %cl
addb $0x2, %cl
sarq %cl, %r12
movq 0x8(%rdi), %rsi
andq %rbx, %rsi
sarq $0x2, %rsi
callq 0x3146
movq %rax, %r15
movq %rbx, (%rax)
movq %r12, 0x8(%rax)
movq 0x30(%r14), %rax
movq %rax, 0x10(%r15)
leaq 0x1fa4(%rip), %rsi      # 0x509e
leaq 0x8(%rsp), %rbx
leaq 0x7(%rsp), %rdx
movq %rbx, %rdi
callq 0x343c
addq $0x18, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x20f0
leaq 0x8(%rsp), %rdi
callq 0x20c0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O2/chinmayachaudhry[P]Branch-Predictor/btb.cpp
// Function: btb::cacheline_to_replace(long long)
btb_cacheline * btb :: cacheline_to_replace(ll index)
{
	btb_cacheline * cacheline_invalid = invalid_cacheline(index);
	ll minimum = branch_count;
	int assoc_to_replace = 0;
	if(cacheline_invalid == NULL)
	{
		for(int i = 0; i<(int)btb_assoc; i++)
		{
			if(cacheline[index][i].getSequence_num() < minimum)
			{
				assoc_to_replace = i;
				minimum = cacheline[index][i].getSequence_num();
//				cacheline_invalid = &cacheline[index][i];
			}
		}
		return (&cacheline[index][assoc_to_replace]);
	}
	return cacheline_invalid;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x31a6
testq %rax, %rax
jne 0x319d
movq 0x30(%r14), %rcx
movl 0x24(%r14), %edx
xorl %esi, %esi
testl %edx, %edx
cmovlel %esi, %edx
movq (%r14), %rax
movq (%rax,%rbx,8), %rax
leaq 0x10(%rax), %rdi
xorl %r8d, %r8d
cmpq %rsi, %rdx
je 0x3193
movq (%rdi), %r9
cmpq %rcx, %r9
cmovlq %r9, %rcx
cmovll %esi, %r8d
incq %rsi
addq $0x38, %rdi
jmp 0x3177
movslq %r8d, %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/chinmayachaudhry[P]Branch-Predictor/btb.cpp
// Function: btb::invalid_cacheline(long long)
btb_cacheline * btb :: invalid_cacheline(ll index)
{
	for(int i = 0; i<(int)btb_assoc; i++)
	{
		if(cacheline[index][i].getValidity() == "Invalid")
			return (&cacheline[index][i]);
	}
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r15
pushq $-0x38
popq %r14
pushq $-0x1
popq %r13
leaq 0x8(%rsp), %r12
movslq 0x24(%r15), %rax
incq %r13
cmpq %rax, %r13
jge 0x3218
movq (%r15), %rax
movq (%rax,%rbx,8), %rax
leaq (%rax,%r14), %rsi
addq $0x50, %rsi
addq $0x38, %r14
movq %r12, %rdi
callq 0x21f0
movq %r12, %rdi
leaq 0x1eac(%rip), %rsi      # 0x50a4
callq 0x342e
movl %eax, %ebp
movq %r12, %rdi
callq 0x20c0
testb %bpl, %bpl
je 0x31c7
movq (%r15), %rax
addq (%rax,%rbx,8), %r14
movq %r14, %rax
jmp 0x321a
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/chinmayachaudhry[P]Branch-Predictor/btb.cpp
// Function: btb::display()
void btb :: display()
{
	cout << endl << "Final BTB Tag  Array Contents {valid, pc}:" << endl;
	for(int i = 0; i<sets; i++)
	{
		cout << "Set" << setfill(' ') << setw(6) << i << ":   ";
		for(int j = 0; j<(int)btb_assoc; j++)
		{
			if(cacheline[i][j].getValidity() == "Valid")
				cout << "{1, " << showbase << internal << setfill(' ') << hex << setw(10) << cacheline[i][j].getAddress() << "} " << dec;
			else
				cout << "{0, " << showbase << internal << setfill(' ') << hex << setw(10) << cacheline[i][j].getAddress() << "} " << dec;
		}
		cout << endl;	
	}
	cout << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x4d96(%rip), %rdi      # 0x7fd8
callq 0x20d0
leaq 0x1e5e(%rip), %rsi      # 0x50ac
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
xorl %r15d, %r15d
leaq 0x8(%rsp), %r12
cmpq %r15, 0x18(%rbx)
jle 0x33c2
movq 0x4d61(%rip), %rdi      # 0x7fd8
leaq 0x1e59(%rip), %rsi      # 0x50d7
callq 0x2180
movq %rax, %rdi
pushq $0x20
popq %rsi
callq 0x2240
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x6, 0x10(%rax,%rcx)
movq %rax, %rdi
movl %r15d, %esi
callq 0x2260
movq %rax, %rdi
leaq 0x1e28(%rip), %rsi      # 0x50db
callq 0x2180
pushq $0x18
popq %rbp
xorl %r14d, %r14d
movslq 0x24(%rbx), %rax
cmpq %rax, %r14
jge 0x33ae
movq (%rbx), %rax
movq (%rax,%r15,8), %rsi
addq %rbp, %rsi
movq %r12, %rdi
callq 0x21f0
movq %r12, %rdi
leaq 0x1db7(%rip), %rsi      # 0x509e
callq 0x342e
movl %eax, %r13d
movq %r12, %rdi
callq 0x20c0
testb %r13b, %r13b
leaq 0x1de7(%rip), %rsi      # 0x50e8
leaq 0x1dd8(%rip), %rax      # 0x50e0
cmovneq %rax, %rsi
movq 0x4cc5(%rip), %rdi      # 0x7fd8
callq 0x2180
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
orl $0x200, 0x18(%rax,%rdx) # imm = 0x200
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
movl $0xffffff4f, %esi       # imm = 0xFFFFFF4F
andl %esi, %edx
orl $0x10, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
pushq $0x20
popq %rsi
callq 0x2240
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
andl $-0x4b, %esi
orl $0x8, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0xa, 0x10(%rax,%rcx)
movq (%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movq -0x18(%rcx,%rbp), %rsi
movq %rax, %rdi
callq 0x2090
movq %rax, %rdi
leaq 0x1d5d(%rip), %rsi      # 0x50e5
callq 0x2180
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
incq %r14
addq $0x38, %rbp
jmp 0x32be
movq 0x4c23(%rip), %rdi      # 0x7fd8
callq 0x20d0
incq %r15
jmp 0x3266
movq 0x4c0f(%rip), %rdi      # 0x7fd8
callq 0x20d0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/chinmayachaudhry[P]Branch-Predictor/bimodal.cpp
// Function: bimodal::bimodal(long long, btb*)
bimodal :: bimodal(ll index_bits, btb * branch_buffer)
{
	predictions = mispredictions = true_predictions = 0;
	index_mask = mask(index_bits + 2);				// 4-Byte instruction. Hence lowest 2 bits are always 0 for address. Hence ignored
	sets = (ll)pow(2.0, index_bits);
	for(ll i = 0; i<sets; i++)
		predictor_table.push_back(2);				// Initialize 'Weakly Taken' i.e 2

	this->branch_buffer = branch_buffer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
leaq 0x38(%rdi), %rbx
addq $0x2, %rsi
callq 0x3510
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
andq $0x0, 0x10(%r15)
movups %xmm0, 0x38(%r15)
movups %xmm0, 0x48(%r15)
movq %rax, 0x18(%r15)
cvtsi2sd %r12, %xmm0
callq 0x2160
cvttsd2si %xmm0, %rax
movq %rax, 0x30(%r15)
xorl %r13d, %r13d
leaq 0xc(%rsp), %r12
cmpq %rax, %r13
jge 0x35a3
movl $0x2, 0xc(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x39e2
incq %r13
movq 0x30(%r15), %rax
jmp 0x3582
movq %r14, 0x58(%r15)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x39ae
movq %r14, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O2/chinmayachaudhry[P]Branch-Predictor/bimodal.cpp
// Function: bimodal::update_prediction_table(long long, int, char)
void bimodal :: update_prediction_table(ll address, int predicted_branch, char actual_branch)
{
	ll index = calc_Index(address);
	if(actual_branch == 't')
	{
		if(predictor_table.at(index) < 3)
			predictor_table.at(index) = predictor_table.at(index) + 1;
		if(predicted_branch == 0)
			mispredictions++;
		else
			true_predictions++;
	}		
	else if(actual_branch == 'n')
	{	
		if(predictor_table.at(index) > 0)
			predictor_table.at(index) = predictor_table.at(index) - 1;
		if(predicted_branch == 1)
			mispredictions++;
		else
			true_predictions++;
	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
andq 0x18(%rdi), %r14
sarq $0x2, %r14
cmpl $0x6e, %ecx
je 0x3626
cmpl $0x74, %ecx
jne 0x366b
leaq 0x38(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3982
xorl %r12d, %r12d
cmpl $0x3, (%rax)
jge 0x365e
pushq $0x1
jmp 0x3640
leaq 0x38(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3982
pushq $0x1
popq %r12
cmpl $0x0, (%rax)
jle 0x365e
pushq $-0x1
popq %r13
movq %r15, %rdi
movq %r14, %rsi
callq 0x3982
addl (%rax), %r13d
movq %r15, %rdi
movq %r14, %rsi
callq 0x3982
movl %r13d, (%rax)
xorl %eax, %eax
cmpl %ebp, %r12d
setne %al
incq 0x8(%rbx,%rax,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chinmayachaudhry[P]Branch-Predictor/bimodal.cpp
// Function: bimodal::display_table()
void bimodal :: display_table()
{
	if(branch_buffer != NULL)
		branch_buffer->display();
	
	cout << endl << "Final Bimodal Table Contents:" << endl;
	for(it = predictor_table.begin(); it != predictor_table.end(); it++)
	{
		int index = distance(predictor_table.begin(), it); 
		cout << "table[" << index << "]: " << predictor_table.at(index) << endl;	
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x58(%rdi), %rdi
testq %rdi, %rdi
je 0x36c6
callq 0x322a
movq 0x490b(%rip), %rdi      # 0x7fd8
callq 0x20d0
leaq 0x1a43(%rip), %rsi      # 0x511c
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x38(%rbx), %r15
movq 0x38(%rbx), %rbp
leaq 0x1bf7(%rip), %r12      # 0x52ef
leaq 0x1a3b(%rip), %r13      # 0x513a
movq %rbp, 0x50(%rbx)
cmpq 0x40(%rbx), %rbp
je 0x375f
subq 0x38(%rbx), %rbp
shrq $0x2, %rbp
movq 0x48c0(%rip), %rdi      # 0x7fd8
movq %r12, %rsi
callq 0x2180
movq %rax, %rdi
movl %ebp, %esi
callq 0x2260
movq %rax, %rdi
movq %r13, %rsi
callq 0x2180
movq %rax, %r14
movslq %ebp, %rsi
movq %r15, %rdi
callq 0x3982
movl (%rax), %esi
movq %r14, %rdi
callq 0x2260
movq %rax, %rdi
callq 0x20d0
movq 0x50(%rbx), %rbp
addq $0x4, %rbp
jmp 0x36ff
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/chinmayachaudhry[P]Branch-Predictor/gshare.cpp
// Function: gshare::gshare(long long, long long, btb*)
gshare :: gshare(ll index_bits, ll ghr_bits, btb * branch_buffer)
{
	predictions = mispredictions = true_predictions = 0;
	this->index_bits = index_bits;
	this->ghr_bits = ghr_bits;
	index_mask = mask(index_bits + 2);				// 4-Byte instruction. Hence lowest 2 bits are always 0 for address. Hence ignored
	sets = (ll)pow(2.0, index_bits);
	for(ll i = 0; i<sets; i++)
		predictor_table.push_back(2);				// Initialize 'Weakly Taken' i.e 2
	
	ghr_register = 0;

	this->branch_buffer = branch_buffer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rsi, %r12
movq %rdi, %r15
leaq 0x60(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movq %rsi, 0x28(%rdi)
movq %rdx, 0x30(%rdi)
addq $0x2, %rsi
callq 0x3b78
movq %rax, 0x18(%r15)
cvtsi2sd %r12, %xmm0
callq 0x2160
cvttsd2si %xmm0, %rax
movq %rax, 0x58(%r15)
xorl %r13d, %r13d
leaq 0xc(%rsp), %r12
cmpq %rax, %r13
jge 0x3c10
movl $0x2, 0xc(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x39e2
incq %r13
movq 0x58(%r15), %rax
jmp 0x3bef
andq $0x0, 0x38(%r15)
movq %rbx, 0x80(%r15)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x39ae
movq %rbx, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O2/chinmayachaudhry[P]Branch-Predictor/gshare.cpp
// Function: gshare::update_prediction_table(long long, int, char)
void gshare :: update_prediction_table(ll address, int predicted_branch, char actual_branch)
{
	if(actual_branch == 't')
	{
		if(predictor_table.at(index) < 3)
			predictor_table.at(index) = predictor_table.at(index) + 1;
		if(predicted_branch == 0)
			mispredictions++;
		else
			true_predictions++;
	}		
	else if(actual_branch == 'n')
	{	
		if(predictor_table.at(index) > 0)
			predictor_table.at(index) = predictor_table.at(index) - 1;
		if(predicted_branch == 1)
			mispredictions++;
		else
			true_predictions++;
	}
	
	update_ghr_register(actual_branch);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movq %rdi, %r14
cmpl $0x6e, %ecx
je 0x3cbc
cmpl $0x74, %ebx
jne 0x3d10
leaq 0x60(%r14), %r15
movq 0x40(%r14), %rsi
movq %r15, %rdi
callq 0x3982
xorl %r12d, %r12d
cmpl $0x3, (%rax)
jge 0x3d03
movl %ebp, 0x4(%rsp)
leaq 0x40(%r14), %rbp
pushq $0x1
jmp 0x3cdf
leaq 0x60(%r14), %r15
movq 0x40(%r14), %rsi
movq %r15, %rdi
callq 0x3982
pushq $0x1
popq %r12
cmpl $0x0, (%rax)
jle 0x3d03
movl %ebp, 0x4(%rsp)
leaq 0x40(%r14), %rbp
pushq $-0x1
popq %r13
movq (%rbp), %rsi
movq %r15, %rdi
callq 0x3982
addl (%rax), %r13d
movq (%rbp), %rsi
movq %r15, %rdi
callq 0x3982
movl %r13d, (%rax)
movl 0x4(%rsp), %ebp
xorl %eax, %eax
cmpl %ebp, %r12d
setne %al
incq 0x8(%r14,%rax,8)
movsbl %bl, %esi
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3d2a
nop
// File: /workspace/github_cpp_makefile_star2_O2/chinmayachaudhry[P]Branch-Predictor/gshare.cpp
// Function: gshare::update_ghr_register(char)
void gshare :: update_ghr_register(char actual_branch)
{
	if(ghr_bits != 0)
	{
		ghr_register = ghr_register >> 1;
		if(actual_branch == 't')
			ghr_register |= (1U << (ghr_bits - 1));
		else if(actual_branch == 'n')
			ghr_register &= ~(1U << (ghr_bits - 1));
	}
}

// Assembly:
movq 0x30(%rdi), %rcx
testq %rcx, %rcx
je 0x3d61
movq 0x38(%rdi), %rax
sarq %rax
movq %rax, 0x38(%rdi)
movsbl %sil, %edx
cmpl $0x6e, %edx
je 0x3d58
cmpl $0x74, %edx
jne 0x3d61
decb %cl
pushq $0x1
popq %rdx
shll %cl, %edx
orq %rdx, %rax
jmp 0x3d5d
decb %cl
btrl %ecx, %eax
movq %rax, 0x38(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/chinmayachaudhry[P]Branch-Predictor/gshare.cpp
// Function: gshare::display_table()
void gshare :: display_table()
{
	if(branch_buffer != NULL)
		branch_buffer->display();
	
	cout << endl << "Final GShare Table Contents:" << endl;
	for(it = predictor_table.begin(); it != predictor_table.end(); it++)
	{
		int index = distance(predictor_table.begin(), it); 
		cout << "table[" << index << "]: " << predictor_table.at(index) << endl;	
	}

	cout << showbase << internal << setfill(' ');
	cout << endl << "Final GHR Contents: " << hex << setw(10) << ghr_register << dec << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x80(%rdi), %rdi
testq %rdi, %rdi
je 0x3dab
callq 0x322a
movq 0x4226(%rip), %rdi      # 0x7fd8
callq 0x20d0
leaq 0x14da(%rip), %rsi      # 0x5298
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x60(%rbx), %r15
movq 0x60(%rbx), %rbp
leaq 0x1512(%rip), %r12      # 0x52ef
leaq 0x1356(%rip), %r13      # 0x513a
movq %rbp, 0x78(%rbx)
cmpq 0x68(%rbx), %rbp
je 0x3e44
subq 0x60(%rbx), %rbp
shrq $0x2, %rbp
movq 0x41db(%rip), %rdi      # 0x7fd8
movq %r12, %rsi
callq 0x2180
movq %rax, %rdi
movl %ebp, %esi
callq 0x2260
movq %rax, %rdi
movq %r13, %rsi
callq 0x2180
movq %rax, %r14
movslq %ebp, %rsi
movq %r15, %rdi
callq 0x3982
movl (%rax), %esi
movq %r14, %rdi
callq 0x2260
movq %rax, %rdi
callq 0x20d0
movq 0x78(%rbx), %rbp
addq $0x4, %rbp
jmp 0x3de4
movq 0x418d(%rip), %r14      # 0x7fd8
movq (%r14), %rax
movq -0x18(%rax), %rcx
orl $0x200, 0x18(%r14,%rcx) # imm = 0x200
movq -0x18(%rax), %rax
movl $0xffffff4f, %ecx       # imm = 0xFFFFFF4F
andl 0x18(%r14,%rax), %ecx
orl $0x10, %ecx
movl %ecx, 0x18(%r14,%rax)
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x2240
movq %r14, %rdi
callq 0x20d0
leaq 0x142a(%rip), %rsi      # 0x52b5
movq %rax, %rdi
callq 0x2180
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
andl $-0x4b, %esi
orl $0x8, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0xa, 0x10(%rax,%rcx)
movq 0x38(%rbx), %rsi
movq %rax, %rdi
callq 0x2090
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20d0