// File: dudulu233[P]EMA-Tool/ema_tool.cpp
// Function: main
int main(int argc, char* argv[])
{
	if (2 != argc)
	{
		printf("Usage: ./ema_tool config_file_name\n");
		exit(-1);
	}

	if (0 != access(argv[1], F_OK))
	{
		printf("Error, config file %s not exist\n");
		exit(-1);
	}

	_time_analysis.set_start_time();

	bool get_reuse_dis = false;
	uint64 total_trace_cnt = 0;

	cfg_ema* cfg = new cfg_ema();
	string conf_file_name(argv[1]);
	assert(NULL != cfg);
	get_cfg(conf_file_name.c_str(), cfg);

	StatCache* sc = new StatCache(cfg->io_trace_start_time);
	IoRecord* io_trace = new IoRecord();
	LogClear();
	
	LogWrite(1, "process start~");

	FILE* fp = fopen(cfg->cache_file.c_str(), "r");

	_time_analysis.set_end_time();
	_time_analysis.add_time("ema init time");

	while (1) {
		assert(NULL != fp);
		assert(NULL != io_trace);

		_time_analysis.set_start_time();

		if(fscanf(fp, "%lu,%lu",
			&io_trace->alloc_time,
			&io_trace->cache_addr
		) == EOF) break;

		_time_analysis.set_end_time();
		_time_analysis.add_time("read trace");

		//program begin

		if (io_trace->alloc_time < cfg->io_trace_start_time) {
			continue;
		}
		//begin to get the reuse distance
		if (io_trace->alloc_time >= cfg->re_dis_start_time) {
			get_reuse_dis = true;
		}

		//hash(A) mod P < T, sampling rate = T / P * 100%
		//e.g. P=100, T=1,so the sampling rate = 0.01
		string str_cache_addr = to_string(static_cast<long long>(io_trace->cache_addr));
		uint32_t hash = murmurhash(str_cache_addr.c_str(), (str_cache_addr).length(), 0);

		total_trace_cnt++;
		if (hash % cfg->sampling_P < cfg->sampling_T) {
			sc->main_operation(io_trace, get_reuse_dis, cfg->cache_size, cfg->sampling_P, cfg->sampling_T);
		}

		//finish
		if (io_trace->alloc_time >= cfg->io_trace_end_time) {
			sc->main_operation(io_trace, get_reuse_dis, cfg->cache_size, cfg->sampling_P, cfg->sampling_T);
			break;
		}

		
	}


	_time_analysis.set_start_time();
	sc->output_reuse_distance();
	_time_analysis.set_end_time();
	_time_analysis.add_time("output time");

	_time_analysis.print_all_latency();

	string map_size_info = "map_size: " + to_string(static_cast<long long>(sc->get_map_size()));
	int unique_ratio = total_trace_cnt * cfg->sampling_T / sc->get_map_size() / cfg->sampling_P;
	LogWrite(1, map_size_info.c_str());
	string unique_ratio_info = "unique_ratio: 1/" + to_string(static_cast<long long>(unique_ratio));
	LogWrite(1, unique_ratio_info.c_str());
	LogWrite(1, "process end~~");

	delete io_trace;
	io_trace = NULL;
	delete sc;
	sc = NULL;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x390, %rsp            # imm = 0x390
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x2, %eax
cmpl -0x8(%rbp), %eax
je 0x474b
leaq 0x7a1c(%rip), %rdi      # 0xc156
movb $0x0, %al
callq 0x3050
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3320
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0x3430
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x477a
leaq 0x7a11(%rip), %rdi      # 0xc17a
movb $0x0, %al
callq 0x3050
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3320
leaq 0xdf1f(%rip), %rdi      # 0x126a0
callq 0xa050
movb $0x0, -0x11(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x50, %edi
callq 0x32c0
movq %rax, %rdi
movq %rdi, -0x258(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0x5440
movq -0x258(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x250(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x248(%rbp)
callq 0x3470
movq -0x250(%rbp), %rsi
movq -0x248(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x3390
jmp 0x4804
leaq -0x49(%rbp), %rdi
callq 0x32e0
xorl %eax, %eax
cmpq -0x28(%rbp), %rax
je 0x4817
jmp 0x4850
leaq 0x797d(%rip), %rdi      # 0xc19b
leaq 0x7982(%rip), %rsi      # 0xc1a7
movl $0xb0, %edx
leaq 0x7983(%rip), %rcx      # 0xc1b4
callq 0x31c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x49(%rbp), %rdi
callq 0x32e0
jmp 0x53a5
leaq -0x48(%rbp), %rdi
callq 0x3130
movq %rax, %rdi
movq -0x28(%rbp), %rsi
callq 0x3850
jmp 0x4867
movl $0x25a0, %edi           # imm = 0x25A0
callq 0x32c0
movq %rax, -0x260(%rbp)
jmp 0x487a
movq -0x260(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rsi
callq 0x5a00
jmp 0x4890
movq -0x260(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x10, %edi
callq 0x32c0
movq %rax, -0x268(%rbp)
jmp 0x48ae
movq -0x268(%rbp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq %rax, -0x70(%rbp)
callq 0x3790
jmp 0x48c6
movq 0xd6f3(%rip), %rax      # 0x11fc0
movq (%rax), %rdi
leaq 0x78f4(%rip), %rsi      # 0xc1cb
xorl %eax, %eax
movb %al, -0x269(%rbp)
callq 0x33b0
movb -0x269(%rbp), %al
leaq 0x7824(%rip), %rdi      # 0xc115
callq 0x3050
jmp 0x48f8
movq 0xd979(%rip), %rdi      # 0x12278
leaq 0x78d4(%rip), %rsi      # 0xc1da
callq 0x3300
movq %rax, -0x278(%rbp)
jmp 0x4914
movq -0x278(%rbp), %rax
movq %rax, 0xd986(%rip)      # 0x122a8
movq 0xd97f(%rip), %rax      # 0x122a8
movq %rax, -0x288(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0x280(%rbp)
callq 0x3470
movq -0x280(%rbp), %rdx
leaq 0x787a(%rip), %rsi      # 0xc1cb
leaq -0x90(%rbp), %rdi
callq 0x3390
jmp 0x495f
movl $0x1, %edi
leaq -0x90(%rbp), %rsi
movq %rsi, -0x290(%rbp)
callq 0x3690
movq -0x288(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x33b0
movq -0x290(%rbp), %rdi
callq 0x31b0
leaq -0x91(%rbp), %rdi
callq 0x32e0
movq 0xd901(%rip), %rdi      # 0x122a8
callq 0x32f0
jmp 0x49ae
movq 0xd8f3(%rip), %rdi      # 0x122a8
callq 0x32b0
jmp 0x49bc
movq -0x28(%rbp), %rdi
callq 0x3130
movq %rax, %rdi
leaq 0x780d(%rip), %rsi      # 0xc1dc
callq 0x3300
movq %rax, -0x298(%rbp)
jmp 0x49dd
movq -0x298(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq 0xdcae(%rip), %rdi      # 0x126a0
callq 0xa070
jmp 0x49f9
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
callq 0x3470
movq -0x2a0(%rbp), %rdx
leaq 0x77c4(%rip), %rsi      # 0xc1de
leaq -0xc0(%rbp), %rdi
callq 0x3390
jmp 0x4a28
leaq 0xdc71(%rip), %rdi      # 0x126a0
leaq -0xc0(%rbp), %rsi
callq 0xa0a0
jmp 0x4a3d
leaq -0xc0(%rbp), %rdi
callq 0x31b0
leaq -0xc1(%rbp), %rdi
callq 0x32e0
jmp 0x4a57
xorl %eax, %eax
cmpq -0xa0(%rbp), %rax
je 0x4a67
jmp 0x4b08
leaq 0x777e(%rip), %rdi      # 0xc1ec
leaq 0x7732(%rip), %rsi      # 0xc1a7
movl $0xbf, %edx
leaq 0x7733(%rip), %rcx      # 0xc1b4
callq 0x31c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x539c
movq -0x260(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
callq 0x3290
jmp 0x539c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x91(%rbp), %rdi
callq 0x32e0
jmp 0x539c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x4af7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x31b0
leaq -0xc1(%rbp), %rdi
callq 0x32e0
jmp 0x539c
xorl %eax, %eax
cmpq -0x70(%rbp), %rax
je 0x4b12
jmp 0x4b31
leaq 0x76de(%rip), %rdi      # 0xc1f7
leaq 0x7687(%rip), %rsi      # 0xc1a7
movl $0xc0, %edx
leaq 0x7688(%rip), %rcx      # 0xc1b4
callq 0x31c0
leaq 0xdb68(%rip), %rdi      # 0x126a0
callq 0xa050
jmp 0x4b3f
movq -0xa0(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq %rdx, %rcx
addq $0x8, %rcx
leaq 0x76b0(%rip), %rsi      # 0xc208
xorl %eax, %eax
callq 0x34a0
movl %eax, -0x2a4(%rbp)
jmp 0x4b67
movl -0x2a4(%rbp), %eax
cmpl $-0x1, %eax
jne 0x4b77
jmp 0x4d61
leaq 0xdb22(%rip), %rdi      # 0x126a0
callq 0xa070
jmp 0x4b85
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x2b0(%rbp)
callq 0x3470
movq -0x2b0(%rbp), %rdx
leaq 0x766a(%rip), %rsi      # 0xc210
leaq -0xe8(%rbp), %rdi
callq 0x3390
jmp 0x4bb4
leaq 0xdae5(%rip), %rdi      # 0x126a0
leaq -0xe8(%rbp), %rsi
callq 0xa0a0
jmp 0x4bc9
leaq -0xe8(%rbp), %rdi
callq 0x31b0
leaq -0xe9(%rbp), %rdi
callq 0x32e0
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jae 0x4c2e
jmp 0x4a55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x4c1d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x31b0
leaq -0xe9(%rbp), %rdi
callq 0x32e0
jmp 0x539c
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jb 0x4c43
movb $0x1, -0x11(%rbp)
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x110(%rbp), %rdi
callq 0x5460
jmp 0x4c59
leaq -0x110(%rbp), %rdi
callq 0x3130
movq %rax, -0x2b8(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x33e0
movq -0x2b8(%rbp), %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x4500
movl %eax, -0x114(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movl -0x114(%rbp), %eax
movq -0x28(%rbp), %rcx
xorl %edx, %edx
divl 0x24(%rcx)
movq -0x28(%rbp), %rax
cmpl 0x28(%rax), %edx
jae 0x4cf6
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq -0x28(%rbp), %rax
movl 0x20(%rax), %ecx
movl 0x24(%rax), %r8d
movl 0x28(%rax), %r9d
movzbl -0x11(%rbp), %edx
andl $0x1, %edx
callq 0x5c00
jmp 0x4cd7
jmp 0x4cf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x31b0
jmp 0x539c
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jb 0x4d38
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq -0x28(%rbp), %rax
movl 0x20(%rax), %ecx
movl 0x24(%rax), %r8d
movl 0x28(%rax), %r9d
movzbl -0x11(%rbp), %edx
andl $0x1, %edx
callq 0x5c00
jmp 0x4d2c
movl $0x3, -0x118(%rbp)
jmp 0x4d42
movl $0x0, -0x118(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x31b0
movl -0x118(%rbp), %eax
testl %eax, %eax
je 0x4d5c
jmp 0x4d5a
jmp 0x4d61
jmp 0x4a55
leaq 0xd938(%rip), %rdi      # 0x126a0
callq 0xa050
jmp 0x4d6f
movq -0x68(%rbp), %rdi
callq 0x6820
jmp 0x4d7a
leaq 0xd91f(%rip), %rdi      # 0x126a0
callq 0xa070
jmp 0x4d88
leaq -0x139(%rbp), %rdi
movq %rdi, -0x2c0(%rbp)
callq 0x3470
movq -0x2c0(%rbp), %rdx
leaq 0x7472(%rip), %rsi      # 0xc21b
leaq -0x138(%rbp), %rdi
callq 0x3390
jmp 0x4db7
leaq 0xd8e2(%rip), %rdi      # 0x126a0
leaq -0x138(%rbp), %rsi
callq 0xa0a0
jmp 0x4dcc
leaq -0x138(%rbp), %rdi
callq 0x31b0
leaq -0x139(%rbp), %rdi
callq 0x32e0
leaq 0xd8b5(%rip), %rdi      # 0x126a0
callq 0xa2f0
jmp 0x4df2
movq -0x68(%rbp), %rdi
callq 0x6940
movq %rax, -0x2c8(%rbp)
jmp 0x4e04
movq -0x2c8(%rbp), %rsi
leaq -0x180(%rbp), %rdi
callq 0x5460
jmp 0x4e19
leaq 0x7407(%rip), %rsi      # 0xc227
leaq -0x160(%rbp), %rdi
leaq -0x180(%rbp), %rdx
callq 0x5590
jmp 0x4e35
leaq -0x180(%rbp), %rdi
callq 0x31b0
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movslq 0x28(%rcx), %rcx
imulq %rcx, %rax
movq %rax, -0x2d8(%rbp)
movq -0x68(%rbp), %rdi
callq 0x6940
movq %rax, -0x2d0(%rbp)
jmp 0x4e6a
movq -0x2d0(%rbp), %rcx
movq -0x2d8(%rbp), %rax
xorl %edx, %edx
movl %edx, -0x2e0(%rbp)
movq %rdx, -0x2f0(%rbp)
divq %rcx
movq -0x2f0(%rbp), %rdx
movq -0x28(%rbp), %rcx
movslq 0x24(%rcx), %rcx
divq %rcx
movl %eax, -0x184(%rbp)
movq 0xd117(%rip), %rax      # 0x11fc0
movq (%rax), %rax
movq %rax, -0x2e8(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x3130
movq -0x2e8(%rbp), %rdi
movq %rax, %rsi
movl -0x2e0(%rbp), %eax
movb %al, -0x2d9(%rbp)
callq 0x33b0
movb -0x2d9(%rbp), %al
leaq 0x722e(%rip), %rdi      # 0xc115
callq 0x3050
jmp 0x4eee
movq 0xd383(%rip), %rdi      # 0x12278
leaq 0x72de(%rip), %rsi      # 0xc1da
callq 0x3300
movq %rax, -0x2f8(%rbp)
jmp 0x4f0a
movq -0x2f8(%rbp), %rax
movq %rax, 0xd390(%rip)      # 0x122a8
movq 0xd389(%rip), %rax      # 0x122a8
movq %rax, -0x310(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x3130
movq %rax, -0x308(%rbp)
leaq -0x1a9(%rbp), %rdi
movq %rdi, -0x300(%rbp)
callq 0x3470
movq -0x308(%rbp), %rsi
movq -0x300(%rbp), %rdx
leaq -0x1a8(%rbp), %rdi
callq 0x3390
jmp 0x4f68
movl $0x1, %edi
leaq -0x1a8(%rbp), %rsi
movq %rsi, -0x318(%rbp)
callq 0x3690
movq -0x310(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x33b0
movq -0x318(%rbp), %rdi
callq 0x31b0
leaq -0x1a9(%rbp), %rdi
callq 0x32e0
movq 0xd2f8(%rip), %rdi      # 0x122a8
callq 0x32f0
jmp 0x4fb7
movq 0xd2ea(%rip), %rdi      # 0x122a8
callq 0x32b0
jmp 0x4fc5
movslq -0x184(%rbp), %rsi
leaq -0x1f0(%rbp), %rdi
callq 0x5460
jmp 0x4fda
leaq 0x7251(%rip), %rsi      # 0xc232
leaq -0x1d0(%rbp), %rdi
leaq -0x1f0(%rbp), %rdx
callq 0x5590
jmp 0x4ff6
leaq -0x1f0(%rbp), %rdi
callq 0x31b0
movq 0xcfb7(%rip), %rax      # 0x11fc0
movq (%rax), %rax
movq %rax, -0x328(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x3130
movq -0x328(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movb %al, -0x319(%rbp)
callq 0x33b0
movb -0x319(%rbp), %al
leaq 0x70d2(%rip), %rdi      # 0xc115
callq 0x3050
jmp 0x504a
movq 0xd227(%rip), %rdi      # 0x12278
leaq 0x7182(%rip), %rsi      # 0xc1da
callq 0x3300
movq %rax, -0x330(%rbp)
jmp 0x5066
movq -0x330(%rbp), %rax
movq %rax, 0xd234(%rip)      # 0x122a8
movq 0xd22d(%rip), %rax      # 0x122a8
movq %rax, -0x348(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x3130
movq %rax, -0x340(%rbp)
leaq -0x211(%rbp), %rdi
movq %rdi, -0x338(%rbp)
callq 0x3470
movq -0x340(%rbp), %rsi
movq -0x338(%rbp), %rdx
leaq -0x210(%rbp), %rdi
callq 0x3390
jmp 0x50c4
movl $0x1, %edi
leaq -0x210(%rbp), %rsi
movq %rsi, -0x350(%rbp)
callq 0x3690
movq -0x348(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x33b0
movq -0x350(%rbp), %rdi
callq 0x31b0
leaq -0x211(%rbp), %rdi
callq 0x32e0
movq 0xd19c(%rip), %rdi      # 0x122a8
callq 0x32f0
jmp 0x5113
movq 0xd18e(%rip), %rdi      # 0x122a8
callq 0x32b0
jmp 0x5121
movq 0xce98(%rip), %rax      # 0x11fc0
movq (%rax), %rdi
leaq 0x7111(%rip), %rsi      # 0xc243
xorl %eax, %eax
movb %al, -0x351(%rbp)
callq 0x33b0
movb -0x351(%rbp), %al
leaq 0x6fc9(%rip), %rdi      # 0xc115
callq 0x3050
jmp 0x5153
movq 0xd11e(%rip), %rdi      # 0x12278
leaq 0x7079(%rip), %rsi      # 0xc1da
callq 0x3300
movq %rax, -0x360(%rbp)
jmp 0x516f
movq -0x360(%rbp), %rax
movq %rax, 0xd12b(%rip)      # 0x122a8
movq 0xd124(%rip), %rax      # 0x122a8
movq %rax, -0x370(%rbp)
leaq -0x239(%rbp), %rdi
movq %rdi, -0x368(%rbp)
callq 0x3470
movq -0x368(%rbp), %rdx
leaq 0x7097(%rip), %rsi      # 0xc243
leaq -0x238(%rbp), %rdi
callq 0x3390
jmp 0x51ba
movl $0x1, %edi
leaq -0x238(%rbp), %rsi
movq %rsi, -0x378(%rbp)
callq 0x3690
movq -0x370(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x33b0
movq -0x378(%rbp), %rdi
callq 0x31b0
leaq -0x239(%rbp), %rdi
callq 0x32e0
movq 0xd0a6(%rip), %rdi      # 0x122a8
callq 0x32f0
jmp 0x5209
movq 0xd098(%rip), %rdi      # 0x122a8
callq 0x32b0
jmp 0x5217
movq -0x70(%rbp), %rax
movq %rax, -0x380(%rbp)
cmpq $0x0, %rax
je 0x5234
movq -0x380(%rbp), %rdi
callq 0x3290
movq $0x0, -0x70(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x388(%rbp)
cmpq $0x0, %rax
je 0x5265
movq -0x388(%rbp), %rdi
callq 0x5bc0
movq -0x388(%rbp), %rdi
callq 0x3290
movq $0x0, -0x68(%rbp)
movl $0x0, -0x4(%rbp)
movl $0x1, -0x118(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x31b0
leaq -0x160(%rbp), %rdi
callq 0x31b0
leaq -0x48(%rbp), %rdi
callq 0x31b0
movl -0x4(%rbp), %eax
addq $0x390, %rsp            # imm = 0x390
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x52d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x31b0
leaq -0x139(%rbp), %rdi
callq 0x32e0
jmp 0x539c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x31b0
jmp 0x539c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x5390
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x1a9(%rbp), %rdi
callq 0x32e0
jmp 0x5390
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x31b0
jmp 0x5390
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x5384
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x211(%rbp), %rdi
callq 0x32e0
jmp 0x5384
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x239(%rbp), %rdi
callq 0x32e0
leaq -0x1d0(%rbp), %rdi
callq 0x31b0
leaq -0x160(%rbp), %rdi
callq 0x31b0
leaq -0x48(%rbp), %rdi
callq 0x31b0
movq -0x58(%rbp), %rdi
callq 0x3460
nop