// File: /workspace/github_cpp_makefile_star2_O3/ralgond[P]SortedListIntersection/main.cpp
// Function: main
int main(int argc, char* argv[]) {

	string file1 = argv[1];
	string file2 = argv[2];

	uint32_t a_len = 0;
	uint32_t* a = read_sorted_int_from_file(file1, &a_len);
	cout<<"file "<<file1<<": "<<a_len<<endl;

	uint32_t b_len = 0;
	uint32_t* b = read_sorted_int_from_file(file2, &b_len);
	cout<<"file "<<file2<<": "<<b_len<<endl;


	uint32_t rareLen = 0;
	uint32_t* rare = NULL;
	uint32_t freqLen = 0;
	uint32_t* freq = NULL;

	if (a_len < b_len) {
		rareLen = a_len;
		rare = a;
		freqLen = b_len;
		freq = b;
	} else {
		rareLen = b_len;
		rare = b;
		freqLen = a_len;
		freq = a;
	}


	uint32_t* c = new uint32_t[rareLen];

	uint32_t cnt = 0;

	bloom_filter* filter = create_bloom_filter(freq, freqLen);

	long time1, time2;

	int N = 10000;


	time1 = currentTimeMs();
	for (int i = 0; i < 10000; i++)
		cnt = v1_avx2_intersection(freq, freqLen, rare, rareLen, c);
	time2 = currentTimeMs();
	cout << "v1_avx2\t" << (time2-time1) << "ms"<<"\t"<<qps(N, (time2-time1))<<"\t"<<cnt<<endl;

	time1 = currentTimeMs();
	for (int i = 0; i < 10000; i++)
		cnt = v3_avx2_intersection(freq, freqLen, rare, rareLen, c);
	time2 = currentTimeMs();
	cout << "v3_avx2\t" << (time2-time1) << "ms"<<"\t"<<qps(N, (time2-time1))<<"\t"<<cnt<<endl;

	time1 = currentTimeMs();
	for (int i = 0; i < 10000; i++)
		cnt = highlyscalable_SIMD_intersection(freq, freqLen, rare, rareLen, c);
	time2 = currentTimeMs();
	cout << "highlyscalable_SIMD\t" << (time2-time1) << "ms"<<"\t"<<qps(N, (time2-time1))<<"\t"<<cnt<<endl;
	
	prepare_shuffling_dict32();
	time1 = currentTimeMs();
	for (int i = 0; i < 10000; i++)
		cnt = highlyscalable_avx2_intersection(freq, freqLen, rare, rareLen, c);
	time2 = currentTimeMs();
	cout << "highlyscalable_avx2\t" << (time2-time1) << "ms"<<"\t"<<qps(N, (time2-time1))<<"\t"<<cnt<<endl;

	prepare_shuffling_dict64();
	time1 = currentTimeMs();
	for (int i = 0; i < 10000; i++)
		cnt = highlyscalable_avx512_intersection(freq, freqLen, rare, rareLen, c);
	time2 = currentTimeMs();
	cout << "highlyscalable_avx512\t" << (time2-time1) << "ms"<<"\t"<<qps(N, (time2-time1))<<"\t"<<cnt<<endl;




	time1 = currentTimeMs();
	for (int i = 0; i < 10000; i++)
		cnt = lemire_highlyscalable_SIMD_intersection(freq, freqLen, rare, rareLen, c);
	time2 = currentTimeMs();
	cout << "lemire_highlyscalable_SIMD\t" << (time2-time1) << "ms"<<"\t"<<qps(N, (time2-time1))<<"\t"<<cnt<<endl;

	time1 = currentTimeMs();
	for (int i = 0; i < 10000; i++)
		cnt = scalar(freq, freqLen, rare, rareLen, c);
	time2 = currentTimeMs();
	cout << "scalar\t" << (time2-time1) << "ms"<<"\t"<<qps(N, (time2-time1))<<"\t"<<cnt<<endl;

	time1 = currentTimeMs();
	for (int i = 0; i < 10000; i++)
		cnt = block_merge_intersection(freq, freqLen, rare, rareLen, c);
	time2 = currentTimeMs();
	cout << "block_merge\t" << (time2-time1) << "ms"<<"\t"<<qps(N, (time2-time1))<<"\t"<<cnt<<endl;

//	time1 = currentTimeMs();
//	for (int i = 0; i < 10000; i++)
//		cnt = bisearch_intersection(freq, freqLen, rare, rareLen, c);
//	time2 = currentTimeMs();
//	cout << "bisearch\t" << (time2-time1) << "ms"<<"\t"<<qps(N, (time2-time1))<<"\t"<<cnt<<endl;
	
//	time1 = currentTimeMs();
//	for (int i = 0; i < 10000; i++)
//		cnt = bloomfilter_intersection(filter, freq, freqLen, rare, rareLen, c);
//	time2 = currentTimeMs();
//	cout << "bloom\t" << (time2-time1) << "ms"<<"\t"<<qps(N, (time2-time1))<<"\t"<<cnt<<endl;
label1:
	prepare_shuffling_dict16();
	PrefixList* rarePl = buildPrefixList(rare, rareLen);
	PrefixList* freqPl = buildPrefixList(freq, freqLen);

	time1 = currentTimeMs();
	for (int i = 0; i < 10000; i++)
		cnt = intersectPrefixList(freqPl, rarePl, c);
	time2 = currentTimeMs();
	cout << "sttni\t" << (time2-time1) << "ms"<<"\t"<<qps(N, (time2-time1))<<"\t"<<cnt<<endl;

	//for (uint32_t i = 0; i < cnt; i++) {
	//	cout<<c[i]<<endl;
	//}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %rbx
movq 0x8(%rsi), %rsi
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x2cee
movq 0x10(%rbx), %rsi
leaq 0x28(%rsp), %rdi
leaq 0x1c(%rsp), %rdx
callq 0x2cee
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x98(%rsp), %r15
movl $0x0, 0x1c(%rsp)
movq %r15, -0x10(%r15)
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0x2d2c
leaq 0x88(%rsp), %rdi
leaq 0x1c(%rsp), %rsi
callq 0x5500
movq 0x88(%rsp), %rdi
movq %rax, %r14
cmpq %r15, %rdi
je 0x4944
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2170
movq 0x468d(%rip), %rdi      # 0x8fd8
leaq 0x1ef6(%rip), %rsi      # 0x6848
movl $0x5, %edx
callq 0x2180
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rsi
movq 0x466b(%rip), %rdi      # 0x8fd8
callq 0x2180
leaq 0x1ed5(%rip), %rsi      # 0x684e
movl $0x2, %edx
movq %rax, %rdi
movq %rax, %rbx
callq 0x2180
movl 0x1c(%rsp), %esi
movq %rbx, %rdi
callq 0x20c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x78(%rsp), %r15
movl $0x0, 0x24(%rsp)
movq %r15, -0x10(%r15)
addq %rsi, %rdx
leaq 0x68(%rsp), %rdi
callq 0x2d2c
leaq 0x68(%rsp), %rdi
leaq 0x24(%rsp), %rsi
callq 0x5500
movq 0x68(%rsp), %rdi
movq %rax, %rbx
cmpq %r15, %rdi
je 0x4a10
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2170
movq 0x45c1(%rip), %rdi      # 0x8fd8
leaq 0x1e2a(%rip), %rsi      # 0x6848
movl $0x5, %edx
callq 0x2180
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rsi
movq 0x459f(%rip), %rdi      # 0x8fd8
callq 0x2180
leaq 0x1e09(%rip), %rsi      # 0x684e
movl $0x2, %edx
movq %rax, %rdi
movq %rax, %r15
callq 0x2180
movl 0x24(%rsp), %esi
movq %r15, %rdi
callq 0x20c0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movl 0x24(%rsp), %r12d
movl 0x1c(%rsp), %eax
movq %r14, %r15
cmpl %r12d, %eax
movl %r12d, %ebp
cmovbq %rbx, %r15
cmovbq %r14, %rbx
cmovbl %eax, %r12d
cmoval %eax, %ebp
movq %rbx, 0x10(%rsp)
leaq (,%r12,4), %rdi
callq 0x2030
movq %rax, %r14
movq %r15, %rdi
movl %ebp, %esi
movl %ebp, 0x20(%rsp)
callq 0x3055
callq 0x5790
movq %rax, 0x8(%rsp)
movl 0x20(%rsp), %r13d
movl $0x2710, %ebx           # imm = 0x2710
movq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rcx
movq %r14, %r8
callq 0x455c
decl %ebx
jne 0x4ae3
movq %rax, %rbp
callq 0x5790
movq 0x44cc(%rip), %rdi      # 0x8fd8
leaq 0x1d3e(%rip), %rsi      # 0x6851
movl $0x8, %edx
movq %rax, %rbx
callq 0x2180
subq 0x8(%rsp), %rbx
movq 0x44ac(%rip), %rdi      # 0x8fd8
movq %rbx, %rsi
movq %rbx, 0x8(%rsp)
callq 0x2130
leaq 0x1d1a(%rip), %rsi      # 0x685a
movl $0x2, %edx
movq %rax, %rdi
movq %rax, %rbx
callq 0x2180
leaq 0x1d39(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2180
vcvtsi2sdq 0x8(%rsp), %xmm0, %xmm0
vmovsd 0x1ccd(%rip), %xmm1     # 0x6840
vdivsd 0x1cbd(%rip), %xmm0, %xmm0 # 0x6838
vdivsd %xmm0, %xmm1, %xmm0
vcvtsd2ss %xmm0, %xmm0, %xmm0
vcvtss2sd %xmm0, %xmm0, %xmm0
movq %rbx, %rdi
callq 0x21b0
leaq 0x1cfa(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %rax, %rdi
movq %rax, %rbx
callq 0x2180
movl %ebp, %esi
movq %rbx, %rdi
callq 0x20c0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
callq 0x5790
movq %rax, 0x8(%rsp)
movl $0x2710, %ebx           # imm = 0x2710
movq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rcx
movq %r14, %r8
callq 0x4648
decl %ebx
jne 0x4be9
movq %rax, %rbp
callq 0x5790
movq 0x43c6(%rip), %rdi      # 0x8fd8
leaq 0x1c44(%rip), %rsi      # 0x685d
movl $0x8, %edx
movq %rax, %rbx
callq 0x2180
subq 0x8(%rsp), %rbx
movq 0x43a6(%rip), %rdi      # 0x8fd8
movq %rbx, %rsi
movq %rbx, 0x8(%rsp)
callq 0x2130
leaq 0x1c14(%rip), %rsi      # 0x685a
movl $0x2, %edx
movq %rax, %rdi
movq %rax, %rbx
callq 0x2180
leaq 0x1c33(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2180
vcvtsi2sdq 0x8(%rsp), %xmm2, %xmm0
vmovsd 0x1bc7(%rip), %xmm1     # 0x6840
vdivsd 0x1bb7(%rip), %xmm0, %xmm0 # 0x6838
vdivsd %xmm0, %xmm1, %xmm0
vcvtsd2ss %xmm0, %xmm0, %xmm0
vcvtss2sd %xmm0, %xmm0, %xmm0
movq %rbx, %rdi
callq 0x21b0
leaq 0x1bf4(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %rax, %rdi
movq %rax, %rbx
callq 0x2180
movl %ebp, %esi
movq %rbx, %rdi
callq 0x20c0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
callq 0x5790
movq %rax, 0x8(%rsp)
movl $0x2710, %ebx           # imm = 0x2710
movq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rcx
movq %r14, %r8
callq 0x3cb8
decl %ebx
jne 0x4cef
movq %rax, %rbp
callq 0x5790
movq 0x42c0(%rip), %rdi      # 0x8fd8
leaq 0x1b7a(%rip), %rsi      # 0x6899
movl $0x14, %edx
movq %rax, %rbx
callq 0x2180
subq 0x8(%rsp), %rbx
movq 0x42a0(%rip), %rdi      # 0x8fd8
movq %rbx, %rsi
movq %rbx, 0x8(%rsp)
callq 0x2130
leaq 0x1b0e(%rip), %rsi      # 0x685a
movl $0x2, %edx
movq %rax, %rdi
movq %rax, %rbx
callq 0x2180
leaq 0x1b2d(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2180
vcvtsi2sdq 0x8(%rsp), %xmm2, %xmm0
vmovsd 0x1ac1(%rip), %xmm1     # 0x6840
vdivsd 0x1ab1(%rip), %xmm0, %xmm0 # 0x6838
vdivsd %xmm0, %xmm1, %xmm0
vcvtsd2ss %xmm0, %xmm0, %xmm0
vcvtss2sd %xmm0, %xmm0, %xmm0
movq %rbx, %rdi
callq 0x21b0
leaq 0x1aee(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %rax, %rdi
movq %rax, %rbx
callq 0x2180
movl %ebp, %esi
movq %rbx, %rdi
callq 0x20c0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
callq 0x3f88
callq 0x5790
movq %rax, 0x8(%rsp)
movl $0x2710, %ebx           # imm = 0x2710
movq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rcx
movq %r14, %r8
callq 0x3fe2
decl %ebx
jne 0x4dfa
movq %rax, %rbp
callq 0x5790
movq 0x41b5(%rip), %rdi      # 0x8fd8
leaq 0x1a3c(%rip), %rsi      # 0x6866
movl $0x14, %edx
movq %rax, %rbx
callq 0x2180
subq 0x8(%rsp), %rbx
movq 0x4195(%rip), %rdi      # 0x8fd8
movq %rbx, %rsi
movq %rbx, 0x8(%rsp)
callq 0x2130
leaq 0x1a03(%rip), %rsi      # 0x685a
movl $0x2, %edx
movq %rax, %rdi
movq %rax, %rbx
callq 0x2180
leaq 0x1a22(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2180
vcvtsi2sdq 0x8(%rsp), %xmm2, %xmm0
vmovsd 0x19b6(%rip), %xmm1     # 0x6840
vdivsd 0x19a6(%rip), %xmm0, %xmm0 # 0x6838
vdivsd %xmm0, %xmm1, %xmm0
vcvtsd2ss %xmm0, %xmm0, %xmm0
vcvtss2sd %xmm0, %xmm0, %xmm0
movq %rbx, %rdi
callq 0x21b0
leaq 0x19e3(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %rax, %rdi
movq %rax, %rbx
callq 0x2180
movl %ebp, %esi
movq %rbx, %rdi
callq 0x20c0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
callq 0x4284
callq 0x5790
movq %rax, 0x8(%rsp)
movl $0x2710, %ebx           # imm = 0x2710
movq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rcx
movq %r14, %r8
callq 0x42ed
decl %ebx
jne 0x4f05
movq %rax, %rbp
callq 0x5790
movq 0x40aa(%rip), %rdi      # 0x8fd8
leaq 0x1946(%rip), %rsi      # 0x687b
movl $0x16, %edx
movq %rax, %rbx
callq 0x2180
subq 0x8(%rsp), %rbx
movq 0x408a(%rip), %rdi      # 0x8fd8
movq %rbx, %rsi
movq %rbx, 0x8(%rsp)
callq 0x2130
leaq 0x18f8(%rip), %rsi      # 0x685a
movl $0x2, %edx
movq %rax, %rdi
movq %rax, %rbx
callq 0x2180
leaq 0x1917(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2180
vcvtsi2sdq 0x8(%rsp), %xmm2, %xmm0
vmovsd 0x18ab(%rip), %xmm1     # 0x6840
vdivsd 0x189b(%rip), %xmm0, %xmm0 # 0x6838
vdivsd %xmm0, %xmm1, %xmm0
vcvtsd2ss %xmm0, %xmm0, %xmm0
vcvtss2sd %xmm0, %xmm0, %xmm0
movq %rbx, %rdi
callq 0x21b0
leaq 0x18d8(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %rax, %rdi
movq %rax, %rbx
callq 0x2180
movl %ebp, %esi
movq %rbx, %rdi
callq 0x20c0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
callq 0x5790
movq %rax, 0x8(%rsp)
movl $0x2710, %ebx           # imm = 0x2710
movq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rcx
movq %r14, %r8
callq 0x3e13
decl %ebx
jne 0x500b
movq %rax, %rbp
callq 0x5790
movq 0x3fa4(%rip), %rdi      # 0x8fd8
leaq 0x1857(%rip), %rsi      # 0x6892
movl $0x1b, %edx
movq %rax, %rbx
callq 0x2180
subq 0x8(%rsp), %rbx
movq 0x3f84(%rip), %rdi      # 0x8fd8
movq %rbx, %rsi
movq %rbx, 0x8(%rsp)
callq 0x2130
leaq 0x17f2(%rip), %rsi      # 0x685a
movl $0x2, %edx
movq %rax, %rdi
movq %rax, %rbx
callq 0x2180
leaq 0x1811(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2180
vcvtsi2sdq 0x8(%rsp), %xmm2, %xmm0
vmovsd 0x17a5(%rip), %xmm1     # 0x6840
vdivsd 0x1795(%rip), %xmm0, %xmm0 # 0x6838
vdivsd %xmm0, %xmm1, %xmm0
vcvtsd2ss %xmm0, %xmm0, %xmm0
vcvtss2sd %xmm0, %xmm0, %xmm0
movq %rbx, %rdi
callq 0x21b0
leaq 0x17d2(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %rax, %rdi
movq %rax, %rbx
callq 0x2180
movl %ebp, %esi
movq %rbx, %rdi
callq 0x20c0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
callq 0x5790
movq %rax, 0x8(%rsp)
movl $0x2710, %ebx           # imm = 0x2710
movq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rcx
movq %r14, %r8
callq 0x4484
decl %ebx
jne 0x5111
movq %rax, %rbp
callq 0x5790
movq 0x3e9e(%rip), %rdi      # 0x8fd8
leaq 0x176d(%rip), %rsi      # 0x68ae
movl $0x7, %edx
movq %rax, %rbx
callq 0x2180
subq 0x8(%rsp), %rbx
movq 0x3e7e(%rip), %rdi      # 0x8fd8
movq %rbx, %rsi
callq 0x2130
leaq 0x16f1(%rip), %rsi      # 0x685a
movl $0x2, %edx
movq %rax, %rdi
movq %rax, %r13
callq 0x2180
leaq 0x1710(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %r13, %rdi
callq 0x2180
vcvtsi2sd %rbx, %xmm2, %xmm0
vdivsd 0x169e(%rip), %xmm0, %xmm0 # 0x6838
vmovsd 0x169e(%rip), %xmm1     # 0x6840
vdivsd %xmm0, %xmm1, %xmm0
vcvtsd2ss %xmm0, %xmm0, %xmm0
vcvtss2sd %xmm0, %xmm0, %xmm0
movq %r13, %rdi
callq 0x21b0
leaq 0x16d3(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %rax, %rdi
movq %rax, %r13
callq 0x2180
movl %ebp, %esi
movq %r13, %rdi
callq 0x20c0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r13, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
callq 0x5790
movq %rax, 0x8(%rsp)
movl 0x20(%rsp), %ebx
movl $0x2710, %r13d          # imm = 0x2710
movq 0x10(%rsp), %rdx
movq %r15, %rdi
movl %ebx, %esi
movl %r12d, %ecx
movq %r14, %r8
callq 0x2ec0
decl %r13d
jne 0x5215
movl %eax, %ebp
callq 0x5790
movq 0x3d9b(%rip), %rdi      # 0x8fd8
leaq 0x1672(%rip), %rsi      # 0x68b6
movl $0xc, %edx
movq %rax, %rbx
callq 0x2180
subq 0x8(%rsp), %rbx
movq 0x3d7b(%rip), %rdi      # 0x8fd8
movq %rbx, %rsi
callq 0x2130
leaq 0x15ee(%rip), %rsi      # 0x685a
movl $0x2, %edx
movq %rax, %rdi
movq %rax, %r13
callq 0x2180
leaq 0x160d(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %r13, %rdi
callq 0x2180
vcvtsi2sd %rbx, %xmm2, %xmm0
vdivsd 0x159b(%rip), %xmm0, %xmm0 # 0x6838
vmovsd 0x159b(%rip), %xmm1     # 0x6840
vdivsd %xmm0, %xmm1, %xmm0
vcvtsd2ss %xmm0, %xmm0, %xmm0
vcvtss2sd %xmm0, %xmm0, %xmm0
movq %r13, %rdi
callq 0x21b0
leaq 0x15d0(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %rax, %rdi
movq %rax, %r13
callq 0x2180
movl %ebp, %esi
movq %r13, %rdi
callq 0x20c0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r13, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
callq 0x284d
movq 0x10(%rsp), %rdi
movl %r12d, %esi
callq 0x242c
movl 0x20(%rsp), %esi
movq %r15, %rdi
movq %rax, %r12
callq 0x242c
movq %rax, %r13
callq 0x5790
movl $0x2710, %ebp           # imm = 0x2710
movq %rax, %r15
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x279a
decl %ebp
jne 0x5335
movl %eax, %ebx
callq 0x5790
movq 0x3c83(%rip), %rdi      # 0x8fd8
leaq 0x1567(%rip), %rsi      # 0x68c3
movl $0x6, %edx
movq %rax, %r14
callq 0x2180
subq %r15, %r14
movq 0x3c65(%rip), %rdi      # 0x8fd8
movq %r14, %rsi
callq 0x2130
leaq 0x14d8(%rip), %rsi      # 0x685a
movl $0x2, %edx
movq %rax, %rdi
movq %rax, %r15
callq 0x2180
leaq 0x14f7(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %r15, %rdi
callq 0x2180
vcvtsi2sd %r14, %xmm2, %xmm0
vdivsd 0x1485(%rip), %xmm0, %xmm0 # 0x6838
vmovsd 0x1485(%rip), %xmm1     # 0x6840
vdivsd %xmm0, %xmm1, %xmm0
vcvtsd2ss %xmm0, %xmm0, %xmm0
vcvtss2sd %xmm0, %xmm0, %xmm0
movq %r15, %rdi
callq 0x21b0
leaq 0x14ba(%rip), %rsi      # 0x6890
movl $0x1, %edx
movq %rax, %rdi
movq %rax, %r14
callq 0x2180
movl %ebx, %esi
movq %r14, %rdi
callq 0x20c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5435
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2170
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5450
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2170
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x54bd
jmp 0x54bd
jmp 0x54bd
movq 0x68(%rsp), %rdi
movq %rax, %rbx
cmpq %r15, %rdi
je 0x54c0
movq 0x78(%rsp), %rsi
jmp 0x5496
movq 0x88(%rsp), %rdi
movq %rax, %rbx
cmpq %r15, %rdi
je 0x54c0
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x54c0
movq %rax, %rbx
jmp 0x54db
jmp 0x54bd
jmp 0x54bd
jmp 0x54bd
jmp 0x54bd
jmp 0x54bd
jmp 0x54bd
jmp 0x54bd
jmp 0x54bd
jmp 0x54bd
jmp 0x54bd
jmp 0x54bd
jmp 0x54bd
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x54db
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2170
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x54f6
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2200
nop