// File: /workspace/github_cpp_makefile_star2_O3/CK7[P]abawaca/src/ClusterData.cpp
// Function: ClusterData::ClusterData(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ScafDpData const&)
ClusterData::ClusterData(string esom_lrn_file, const ScafDpData& scaf_db)
{
        FILE* fp = fopen(esom_lrn_file.c_str(), "r");

        if(!fp) {
                cerr << __FILE__ << " (" << __LINE__ << "): Fatal error: could not read " << esom_lrn_file << endl << endl;
                exit(-1);
        }

        char line[8192] = {};

	/********** Read # of dps **********/
	// % 8430
        if(!fgets(line, 8192, fp)) {
                cerr << __FILE__ << " (" << __LINE__ << "): Fatal error: " << esom_lrn_file << " is empty" << endl << endl;
                exit(-1);
        }

        // % 8430
        unsigned int ndps;
        char    c;
        if((sscanf(line, "%c %u", &c, &ndps) != 2) || (c != '%')) {
                cerr << __FILE__ << " (" << __LINE__ << "): Fatal error: unexpected line 1 in " << esom_lrn_file << ": " << endl << line << endl << endl;
                exit(-1);
        }

	/********** Read # of dimensions **********/
	// % 12
        if(!fgets(line, 8192, fp)) {
                cerr << __FILE__ << " (" << __LINE__ << "): Fatal error: failed to read line 2 in " << esom_lrn_file << endl << endl;
                exit(-1);
        }

        unsigned int ndimensions;
        if((sscanf(line, "%c %u", &c, &ndimensions) != 2) || (c != '%')) {
                cerr << __FILE__ << " (" << __LINE__ << "): Fatal error: unexpected line 2 in " << esom_lrn_file << ": " << endl << line << endl << endl;
                exit(-1);
        }
	ndimensions--;		// Count in the file contains the dp column

	/********** Read weights for dimensions. We don't use it but just verify that the number found is right **********/
	// % 9	1	1	1	1	1	1	1	1	1	1	1
        if(!fgets(line, 8192, fp)) {
                cerr << __FILE__ << " (" << __LINE__ << "): Fatal error: failed to read line 3 in " << esom_lrn_file << endl << endl;
                exit(-1);
        }

        unsigned int t = 1;
	while(strrchr(line, '\t') != NULL) {
		t++;
		*strrchr(line, '\t') = 0;
	}
        if(t != (ndimensions+1)) {
                cerr << __FILE__ << " (" << __LINE__ << "): Fatal error: unexpected line 3 in " << esom_lrn_file << ": number of fileds is differemt that " << ndimensions << endl << line << endl << endl;
                exit(-1);
        }

	/********** Read dimension names **********/
	// % key	74-1	74-10	74-11	74-12	74-2	74-3	74-4	74-5	74-6	74-7	74-9
        if(!fgets(line, 8192, fp)) {
                cerr << __FILE__ << " (" << __LINE__ << "): Fatal error: failed to read line 4 in " << esom_lrn_file << endl << endl;
                exit(-1);
        }

	// Chomp
	while((strlen(line)>0) && isspace(*(line+strlen(line)-1)))
		*(line+strlen(line)-1) = 0;

	dimensions.push_back(NULL);
	// We skip the first column which contains the dp title
	char *p1=strchr(line, '\t')+1, *p2=strchr(p1, '\t');
	size_t	i = 1;
	while(p2) {
		*p2 = 0;
		dimensions.push_back(new Dimension(i++, string(p1)));
		p1 = p2+1;
		p2=strchr(p1, '\t');
	}
	// Last dimension is not accompanied by a tab
	dimensions.push_back(new Dimension(i, string(p1)));

	if(i != ndimensions) {
                cerr << __FILE__ << " (" << __LINE__ << "): Fatal error: number of dimensions found in line 4 (" << i << ") is different than expected (" << ndimensions << ") in file " << esom_lrn_file << ":" << endl << line << endl << endl;
                exit(-1);
	}

	/********** And finally, read the values themselves **********/	
	size_t entry=0;
	map<size_t, string>	data;

	while(fgets(line, 8192, fp)) {
		// Chomp
		while((strlen(line)>0) && isspace(*(line+strlen(line)-1)))
			*(line+strlen(line)-1) = 0;

		// Skip empty or comment lines
		if((line[0] == '%') || (strlen(line) == 0))
			continue;

		// The following means that we have more lines than expected by the % dps information
		if(entry >= ndps) {
			cerr << __FILE__ << " (" << __LINE__ << "): Fatal error: number of datapoint lines found is higher than expected (" << ndps << "), file " << esom_lrn_file << endl << endl;
			exit(-1);
		}

		char *p1, *p2;
		size_t t=1;
		// Count the number of values and make sure it's what we would expect
		for(p1=line, p2=strchr(p1, '\t'); p2!=NULL; p1=p2+1, p2=strchr(p1, '\t'))
			t++;
		if(t != (ndimensions+1)) {
			cerr << __FILE__ << " (" << __LINE__ << "): Fatal error: number of dimensions found is " << t << ", expected to find " << ndimensions << ": " << line << endl << endl; 
			exit(-1);
		}

		// 1	0.181737916437441	0	0.00990659188488923	0.551726686306843	0.0250488966425045	0.0706148967876072	0	0	0.00324475022645163	0.0147897529305731	0.142930508783691
		p1=line;
		p2=strchr(p1, '\t');
		*p2=0;
		int dp = scaf_db.dp_name2id(atoi(p1));

		if(dp != 0) {
			data.insert(pair<size_t, string>(dp, string(p2+1)));
		}
		entry++;
	}

	for(auto it=data.begin(); it!=data.end(); it++) {
		size_t dp = it->first;
		dps.insert(dp);
		int p1, p2, t;
		for(t=1, p1=0, p2=it->second.find('\t', 0); p2!=string::npos; t++, p1=p2+1, p2=p2=it->second.find('\t', p1)) {
			dimensions[t]->insert(dp, atof(it->second.substr(p1, p2-p1).c_str()));
		}
		// Last value
		dimensions[t]->insert(dp, atof(it->second.substr(p1).c_str()));
	}
	if(entry != ndps) {
		cerr << __FILE__ << " (" << __LINE__ << "): Fatal error: number of datapoint lines found (" << entry << ") is different than expected (" << ndps << "), file " << esom_lrn_file << endl << endl;
		exit(-1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2108, %rsp           # imm = 0x2108
movq %rdx, -0xb0(%rbp)
movq %rsi, %r15
movq %rdi, -0x40(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x18(%rdi), %rax
movq %rax, -0xb8(%rbp)
leaq 0x48(%rdi), %rax
movq %rax, 0x18(%rdi)
movq $0x1, 0x20(%rdi)
movups %xmm0, 0x28(%rdi)
movl $0x3f800000, 0x38(%rdi) # imm = 0x3F800000
movups %xmm0, 0x40(%rdi)
movq (%rsi), %rdi
leaq 0x9145(%rip), %rsi      # 0x19131
callq 0x5450
testq %rax, %rax
je 0x106f7
movq %rax, %r14
leaq -0x2130(%rbp), %rbx
movl $0x2000, %edx           # imm = 0x2000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x51f0
movq %rbx, %rdi
movl $0x2000, %esi           # imm = 0x2000
movq %r14, -0x50(%rbp)
movq %r14, %rdx
callq 0x55e0
testq %rax, %rax
je 0x10773
leaq 0x97ec(%rip), %rsi      # 0x19823
leaq -0x2130(%rbp), %rdi
leaq -0x29(%rbp), %rdx
leaq -0x34(%rbp), %rcx
xorl %eax, %eax
callq 0x5370
cmpl $0x2, %eax
jne 0x10806
cmpb $0x25, -0x29(%rbp)
jne 0x10806
leaq -0x2130(%rbp), %rdi
movl $0x2000, %esi           # imm = 0x2000
movq -0x50(%rbp), %rdx
callq 0x55e0
testq %rax, %rax
je 0x108c1
leaq 0x979e(%rip), %rsi      # 0x19823
leaq -0x2130(%rbp), %rdi
leaq -0x29(%rbp), %rdx
leaq -0x30(%rbp), %rcx
xorl %eax, %eax
callq 0x5370
cmpl $0x2, %eax
jne 0x1093d
cmpb $0x25, -0x29(%rbp)
jne 0x1093d
decl -0x30(%rbp)
leaq -0x2130(%rbp), %rdi
movl $0x2000, %esi           # imm = 0x2000
movq -0x50(%rbp), %rdx
callq 0x55e0
testq %rax, %rax
je 0x109f8
leaq -0x2130(%rbp), %rdi
movl $0x9, %esi
callq 0x53f0
movl $0x1, %r14d
testq %rax, %rax
je 0x10100
incl %r14d
movb $0x0, (%rax)
movq %rbx, %rdi
movl $0x9, %esi
callq 0x53f0
jmp 0x100e6
movl -0x30(%rbp), %eax
incl %eax
cmpl %eax, %r14d
jne 0x10a74
leaq -0x2130(%rbp), %rdi
movl $0x2000, %esi           # imm = 0x2000
movq -0x50(%rbp), %rdx
callq 0x55e0
testq %rax, %rax
je 0x10b37
leaq -0x2130(%rbp), %rdi
callq 0x5180
testq %rax, %rax
je 0x10172
movq %rax, %r14
leaq -0x2130(%rbp), %rbx
movsbl -0x2131(%rbp,%r14), %edi
callq 0x5070
testl %eax, %eax
je 0x10172
movb $0x0, -0x2131(%rbp,%r14)
movq %rbx, %rdi
callq 0x5180
movq %rax, %r14
testq %rax, %rax
jne 0x10147
movq $0x0, -0xe8(%rbp)
movq -0x40(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x10199
movq $0x0, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x101a5
leaq -0xe8(%rbp), %rdx
callq 0x112e8
movq %r15, -0xa8(%rbp)
leaq -0x2130(%rbp), %rdi
movl $0x9, %esi
callq 0x5150
movq %rax, %r14
incq %r14
movq %r14, %rdi
movl $0x9, %esi
callq 0x5150
testq %rax, %rax
je 0x102a3
movq %rax, %r13
movl $0x1, %r15d
leaq -0x118(%rbp), %rbx
movq %r15, -0x58(%rbp)
movb $0x0, (%r13)
movl $0xa0, %edi
callq 0x53a0
movq %rax, %r12
movq %rbx, %r15
movq %rbx, -0x128(%rbp)
movq %r14, %rdi
callq 0x5180
leaq (%rax,%r14), %rdx
leaq -0x128(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb226
movb $0x1, %r14b
movq %r12, %rdi
movq -0x58(%rbp), %rsi
movq %rbx, %rdx
movq %r15, %rbx
callq 0xf9b8
movq %r12, -0xe8(%rbp)
movq -0x40(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x1025b
movq %r12, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x1026a
xorl %r14d, %r14d
leaq -0xe8(%rbp), %rdx
callq 0x112e8
movq -0x128(%rbp), %rdi
cmpq %rbx, %rdi
je 0x1027b
callq 0x5340
movq %r13, %r14
incq %r14
movq %r14, %rdi
movl $0x9, %esi
callq 0x5150
movq %rax, %r13
movq -0x58(%rbp), %r15
incq %r15
testq %rax, %rax
jne 0x101e9
jmp 0x102a9
movl $0x1, %r15d
movl $0xa0, %edi
callq 0x53a0
movq %rax, %r12
leaq -0xf8(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq %r14, %rdi
callq 0x5180
leaq (%rax,%r14), %rdx
leaq -0x108(%rbp), %rdi
movq %r14, %rsi
callq 0xb226
movb $0x1, %r14b
leaq -0x108(%rbp), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0xf9b8
movq %r12, -0xe8(%rbp)
movq -0x40(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x10310
movq %r12, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x1031f
xorl %r14d, %r14d
leaq -0xe8(%rbp), %rdx
callq 0x112e8
movq -0x108(%rbp), %rdi
cmpq %rbx, %rdi
je 0x10330
callq 0x5340
movl -0x30(%rbp), %eax
cmpq %rax, %r15
jne 0x10bb8
leaq -0xe0(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq $0x0, -0x48(%rbp)
movq %rax, 0x20(%rcx)
leaq -0x2130(%rbp), %rdi
movl $0x2000, %esi           # imm = 0x2000
movq -0x50(%rbp), %r15
movq %r15, %rdx
callq 0x55e0
testq %rax, %rax
je 0x10582
movq -0xb0(%rbp), %rax
leaq 0x38(%rax), %r13
movq $0x0, -0x48(%rbp)
leaq -0x2130(%rbp), %r12
movq %r12, %rdi
callq 0x5180
testq %rax, %rax
je 0x103d7
movq %rax, %rbx
movsbl -0x2131(%rbp,%rbx), %edi
callq 0x5070
testl %eax, %eax
je 0x103d7
movb $0x0, -0x2131(%rbp,%rbx)
movq %r12, %rdi
callq 0x5180
movq %rax, %rbx
testq %rax, %rax
jne 0x103ae
movzbl -0x2130(%rbp), %eax
cmpl $0x25, %eax
je 0x103e7
testl %eax, %eax
jne 0x10401
movq %r12, %rdi
movl $0x2000, %esi           # imm = 0x2000
movq %r15, %rdx
callq 0x55e0
testq %rax, %rax
jne 0x1039e
jmp 0x10582
movl -0x34(%rbp), %eax
cmpq %rax, -0x48(%rbp)
jae 0x10d86
movq %r12, %rdi
movl $0x9, %esi
callq 0x5150
movq %rax, %r14
movl $0x1, %r15d
testq %rax, %rax
je 0x10444
movq %r14, %rax
incq %r15
incq %rax
movq %rax, %rdi
movl $0x9, %esi
callq 0x5150
testq %rax, %rax
jne 0x1042c
movl -0x30(%rbp), %eax
incl %eax
cmpq %rax, %r15
jne 0x10e2b
movb $0x0, (%r14)
movq %r12, %rdi
callq 0x55c0
movq -0xb0(%rbp), %rcx
movq 0x40(%rcx), %rdx
testq %rdx, %rdx
je 0x1056d
movslq %eax, %rcx
movq %r13, %rax
xorl %esi, %esi
cmpq %rcx, 0x20(%rdx)
setb %sil
cmovaeq %rdx, %rax
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x10478
cmpq %r13, %rax
je 0x1056d
cmpq %rcx, 0x20(%rax)
ja 0x1056d
movl 0x28(%rax), %r15d
testq %r15, %r15
je 0x1056d
leaq 0x1(%r14), %rbx
leaq -0x90(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq %rbx, %rdi
callq 0x5180
leaq (%r14,%rax), %rdx
incq %rdx
leaq -0xa0(%rbp), %rdi
movq %rbx, %rsi
callq 0xb226
movslq %r15d, %rax
movq %rax, -0x80(%rbp)
leaq -0x68(%rbp), %r14
movq %r14, -0x78(%rbp)
movq -0xa0(%rbp), %rax
leaq -0x90(%rbp), %rbx
cmpq %rbx, %rax
je 0x10513
movq %rax, -0x78(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x1051a
movups (%rbx), %xmm0
movups %xmm0, (%r14)
movq -0x98(%rbp), %rax
movq %rax, -0x70(%rbp)
movq %rbx, -0xa0(%rbp)
movq $0x0, -0x98(%rbp)
movb $0x0, -0x90(%rbp)
leaq -0xe8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x11422
movq -0x78(%rbp), %rdi
cmpq %r14, %rdi
je 0x1055c
callq 0x5340
movq -0xa0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x1056d
callq 0x5340
incq -0x48(%rbp)
movq %r12, %rdi
movl $0x2000, %esi           # imm = 0x2000
movq -0x50(%rbp), %r15
jmp 0x103ef
movq -0xd0(%rbp), %r15
leaq -0xe0(%rbp), %rax
cmpq %rax, %r15
je 0x106cc
movq 0x20(%r15), %rax
movq %rax, -0xa0(%rbp)
movq -0xb8(%rbp), %rdi
movq %rdi, -0x80(%rbp)
leaq -0xa0(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x115d2
leaq 0x28(%r15), %r13
movq %r13, %rdi
movl $0x9, %esi
xorl %edx, %edx
callq 0x54e0
movq %rax, %rcx
movl $0x1, %eax
movl $0x0, %ebx
cmpl $-0x1, %ecx
je 0x1066e
movq %r15, -0x58(%rbp)
xorl %r14d, %r14d
movl $0x1, %r15d
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq (%rax,%r15,8), %rbx
movq -0xa0(%rbp), %r12
movslq %r14d, %rdx
movq %rcx, %r14
movl %ecx, %eax
subl %edx, %eax
movslq %eax, %rcx
leaq -0x80(%rbp), %rdi
movq %r13, %rsi
callq 0x53c0
movq -0x80(%rbp), %rdi
callq 0x54a0
movq %rbx, %rdi
movq %r12, %rsi
callq 0xf7d6
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x10646
callq 0x5340
incq %r15
incl %r14d
movslq %r14d, %rbx
movq %r13, %rdi
movl $0x9, %esi
movq %rbx, %rdx
callq 0x54e0
movq %rax, %rcx
cmpl $-0x1, %ecx
jne 0x105f5
movl %r15d, %eax
movq -0x58(%rbp), %r15
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
movq (%rcx,%rax,8), %r12
movq -0xa0(%rbp), %r14
leaq -0x80(%rbp), %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq $-0x1, %rcx
callq 0x53c0
movq -0x80(%rbp), %rdi
callq 0x54a0
movq %r12, %rdi
movq %r14, %rsi
callq 0xf7d6
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x106bc
callq 0x5340
movq %r15, %rdi
callq 0x5260
movq %rax, %r15
jmp 0x10589
movl -0x34(%rbp), %eax
cmpq %rax, -0x48(%rbp)
jne 0x10cbe
leaq -0xe8(%rbp), %rdi
callq 0x11254
addq $0x2108, %rsp           # imm = 0x2108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x118ea(%rip), %rdi     # 0x21fe8
leaq 0x9699(%rip), %rsi      # 0x19d9e
movl $0x13, %edx
callq 0x5420
movq 0x118d2(%rip), %rdi     # 0x21fe8
leaq 0x9810(%rip), %rsi      # 0x19f2d
movl $0x2, %edx
callq 0x5420
movq 0x118ba(%rip), %rdi     # 0x21fe8
movl $0x20, %esi
callq 0x5670
movq %rax, %rbx
leaq 0x9670(%rip), %rsi      # 0x19db2
movl $0x1f, %edx
movq %rax, %rdi
callq 0x5420
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x5420
movq %rax, %rdi
callq 0x51a0
movq %rax, %rdi
callq 0x51a0
jmp 0x10bae
movq 0x1186e(%rip), %rdi     # 0x21fe8
leaq 0x961d(%rip), %rsi      # 0x19d9e
movl $0x13, %edx
callq 0x5420
movq 0x11856(%rip), %rdi     # 0x21fe8
leaq 0x9794(%rip), %rsi      # 0x19f2d
movl $0x2, %edx
callq 0x5420
movq 0x1183e(%rip), %rdi     # 0x21fe8
movl $0x29, %esi
callq 0x5670
movq %rax, %rbx
leaq 0x9614(%rip), %rsi      # 0x19dd2
movl $0x10, %edx
movq %rax, %rdi
callq 0x5420
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x5420
movq %rax, %rbx
leaq 0x9035(%rip), %rsi      # 0x19819
movl $0x9, %edx
movq %rax, %rdi
callq 0x5420
movq %rbx, %rdi
callq 0x51a0
movq %rax, %rdi
callq 0x51a0
jmp 0x10bae
movq 0x117db(%rip), %rdi     # 0x21fe8
leaq 0x958a(%rip), %rsi      # 0x19d9e
movl $0x13, %edx
callq 0x5420
movq 0x117c3(%rip), %rdi     # 0x21fe8
leaq 0x9701(%rip), %rsi      # 0x19f2d
movl $0x2, %edx
callq 0x5420
movq 0x117ab(%rip), %rdi     # 0x21fe8
movl $0x31, %esi
callq 0x5670
movq %rax, %rbx
leaq 0x9592(%rip), %rsi      # 0x19de3
movl $0x25, %edx
movq %rax, %rdi
callq 0x5420
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x5420
movq %rax, %rbx
leaq 0x9b49(%rip), %rsi      # 0x1a3c0
movl $0x2, %edx
movq %rax, %rdi
callq 0x5420
movq %rbx, %rdi
callq 0x51a0
movq %rax, %rbx
leaq -0x2130(%rbp), %r14
movq %r14, %rdi
callq 0x5180
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x5420
movq %rbx, %rdi
callq 0x51a0
movq %rax, %rdi
callq 0x51a0
jmp 0x10bae
movq 0x11720(%rip), %rdi     # 0x21fe8
leaq 0x94cf(%rip), %rsi      # 0x19d9e
movl $0x13, %edx
callq 0x5420
movq 0x11708(%rip), %rdi     # 0x21fe8
leaq 0x9646(%rip), %rsi      # 0x19f2d
movl $0x2, %edx
callq 0x5420
movq 0x116f0(%rip), %rdi     # 0x21fe8
movl $0x38, %esi
callq 0x5670
movq %rax, %rbx
leaq 0x94fd(%rip), %rsi      # 0x19e09
movl $0x29, %edx
movq %rax, %rdi
callq 0x5420
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x5420
movq %rax, %rdi
callq 0x51a0
movq %rax, %rdi
callq 0x51a0
jmp 0x10bae
movq 0x116a4(%rip), %rdi     # 0x21fe8
leaq 0x9453(%rip), %rsi      # 0x19d9e
movl $0x13, %edx
callq 0x5420
movq 0x1168c(%rip), %rdi     # 0x21fe8
leaq 0x95ca(%rip), %rsi      # 0x19f2d
movl $0x2, %edx
callq 0x5420
movq 0x11674(%rip), %rdi     # 0x21fe8
movl $0x3e, %esi
callq 0x5670
movq %rax, %rbx
leaq 0x94ab(%rip), %rsi      # 0x19e33
movl $0x25, %edx
movq %rax, %rdi
callq 0x5420
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x5420
movq %rax, %rbx
leaq 0x9a12(%rip), %rsi      # 0x1a3c0
movl $0x2, %edx
movq %rax, %rdi
callq 0x5420
movq %rbx, %rdi
callq 0x51a0
movq %rax, %rbx
leaq -0x2130(%rbp), %r14
movq %r14, %rdi
callq 0x5180
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x5420
movq %rbx, %rdi
callq 0x51a0
movq %rax, %rdi
callq 0x51a0
jmp 0x10bae
movq 0x115e9(%rip), %rdi     # 0x21fe8
leaq 0x9398(%rip), %rsi      # 0x19d9e
movl $0x13, %edx
callq 0x5420
movq 0x115d1(%rip), %rdi     # 0x21fe8
leaq 0x950f(%rip), %rsi      # 0x19f2d
movl $0x2, %edx
callq 0x5420
movq 0x115b9(%rip), %rdi     # 0x21fe8
movl $0x46, %esi
callq 0x5670
movq %rax, %rbx
leaq 0x9416(%rip), %rsi      # 0x19e59
movl $0x29, %edx
movq %rax, %rdi
callq 0x5420
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x5420
movq %rax, %rdi
callq 0x51a0
movq %rax, %rdi
callq 0x51a0
jmp 0x10bae
movq 0x1156d(%rip), %rdi     # 0x21fe8
leaq 0x931c(%rip), %rsi      # 0x19d9e
movl $0x13, %edx
callq 0x5420
movq 0x11555(%rip), %rdi     # 0x21fe8
leaq 0x9493(%rip), %rsi      # 0x19f2d
movl $0x2, %edx
callq 0x5420
movq 0x1153d(%rip), %rdi     # 0x21fe8
movl $0x50, %esi
callq 0x5670
movq %rax, %rbx
leaq 0x93c4(%rip), %rsi      # 0x19e83
movl $0x25, %edx
movq %rax, %rdi
callq 0x5420
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x5420
movq %rax, %rbx
leaq 0x93c4(%rip), %rsi      # 0x19ea9
movl $0x25, %edx
movq %rax, %rdi
callq 0x5420
movl -0x30(%rbp), %esi
movq %rbx, %rdi
callq 0x5240
movq %rax, %rdi
callq 0x51a0
movq %rax, %rbx
leaq -0x2130(%rbp), %r14
movq %r14, %rdi
callq 0x5180
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x5420
movq %rbx, %rdi
callq 0x51a0
movq %rax, %rdi
callq 0x51a0
jmp 0x10bae
movq 0x114aa(%rip), %rdi     # 0x21fe8
leaq 0x9259(%rip), %rsi      # 0x19d9e
movl $0x13, %edx
callq 0x5420
movq 0x11492(%rip), %rdi     # 0x21fe8
leaq 0x93d0(%rip), %rsi      # 0x19f2d
movl $0x2, %edx
callq 0x5420
movq 0x1147a(%rip), %rdi     # 0x21fe8
movl $0x57, %esi
callq 0x5670
movq %rax, %rbx
leaq 0x934d(%rip), %rsi      # 0x19ecf
movl $0x29, %edx
movq %rax, %rdi
callq 0x5420
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x5420
movq %rax, %rdi
callq 0x51a0
movq %rax, %rdi
callq 0x51a0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x5480
movq 0x11429(%rip), %rdi     # 0x21fe8
leaq 0x91d8(%rip), %rsi      # 0x19d9e
movl $0x13, %edx
callq 0x5420
movq 0x11411(%rip), %rdi     # 0x21fe8
leaq 0x934f(%rip), %rsi      # 0x19f2d
movl $0x2, %edx
callq 0x5420
movq 0x113f9(%rip), %rdi     # 0x21fe8
movl $0x6d, %esi
callq 0x5670
movq %rax, %rbx
leaq 0x92f6(%rip), %rsi      # 0x19ef9
movl $0x36, %edx
movq %rax, %rdi
callq 0x5420
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5240
movq %rax, %rbx
leaq 0x930b(%rip), %rsi      # 0x19f30
movl $0x1e, %edx
movq %rax, %rdi
callq 0x5420
movl -0x30(%rbp), %esi
movq %rbx, %rdi
callq 0x5240
movq %rax, %rbx
leaq 0x9308(%rip), %rsi      # 0x19f4f
movl $0xa, %edx
movq %rax, %rdi
callq 0x5420
movq -0xa8(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x5420
movq %rax, %rbx
leaq 0x87e3(%rip), %rsi      # 0x19457
movl $0x1, %edx
movq %rax, %rdi
callq 0x5420
movq %rbx, %rdi
callq 0x51a0
movq %rax, %rbx
leaq -0x2130(%rbp), %r14
movq %r14, %rdi
callq 0x5180
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x5420
movq %rbx, %rdi
callq 0x51a0
movq %rax, %rdi
callq 0x51a0
jmp 0x10bae
movq 0x11323(%rip), %rdi     # 0x21fe8
leaq 0x90d2(%rip), %rsi      # 0x19d9e
movl $0x13, %edx
callq 0x5420
movq 0x1130b(%rip), %rdi     # 0x21fe8
leaq 0x9249(%rip), %rsi      # 0x19f2d
movl $0x2, %edx
callq 0x5420
movq 0x112f3(%rip), %rdi     # 0x21fe8
movl $0xa5, %esi
callq 0x5670
movq %rax, %rbx
leaq 0x92e7(%rip), %rsi      # 0x19ff0
movl $0x31, %edx
movq %rax, %rdi
callq 0x5420
movq %rbx, %rdi
movq -0x48(%rbp), %rsi
callq 0x5240
movq %rax, %rbx
leaq 0x9204(%rip), %rsi      # 0x19f30
movl $0x1e, %edx
movq %rax, %rdi
callq 0x5420
movl -0x34(%rbp), %esi
movq %rbx, %rdi
callq 0x5240
movq %rax, %rbx
leaq 0x9256(%rip), %rsi      # 0x19fa4
movl $0x8, %edx
movq %rax, %rdi
callq 0x5420
movq -0xa8(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x5420
movq %rax, %rdi
callq 0x51a0
movq %rax, %rdi
callq 0x51a0
jmp 0x10bae
movq 0x1125b(%rip), %rdi     # 0x21fe8
leaq 0x900a(%rip), %rsi      # 0x19d9e
movl $0x13, %edx
callq 0x5420
movq 0x11243(%rip), %rdi     # 0x21fe8
leaq 0x9181(%rip), %rsi      # 0x19f2d
movl $0x2, %edx
callq 0x5420
movq 0x1122b(%rip), %rdi     # 0x21fe8
movl $0x80, %esi
callq 0x5670
movq %rax, %rbx
leaq 0x9189(%rip), %rsi      # 0x19f5a
movl $0x49, %edx
movq %rax, %rdi
callq 0x5420
movl -0x34(%rbp), %esi
movq %rbx, %rdi
callq 0x5240
movq %rax, %rbx
leaq 0x91b1(%rip), %rsi      # 0x19fa4
movl $0x8, %edx
movq %rax, %rdi
callq 0x5420
movq -0xa8(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x5420
movq %rax, %rdi
callq 0x51a0
movq %rax, %rdi
callq 0x51a0
jmp 0x10bae
movq 0x111b6(%rip), %rdi     # 0x21fe8
leaq 0x8f65(%rip), %rsi      # 0x19d9e
movl $0x13, %edx
callq 0x5420
movq 0x1119e(%rip), %rdi     # 0x21fe8
leaq 0x90dc(%rip), %rsi      # 0x19f2d
movl $0x2, %edx
callq 0x5420
movq 0x11186(%rip), %rdi     # 0x21fe8
movl $0x8a, %esi
callq 0x5670
movq %rax, %rbx
leaq 0x9137(%rip), %rsi      # 0x19fad
movl $0x2e, %edx
movq %rax, %rdi
callq 0x5420
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5240
movq %rax, %rbx
leaq 0x9144(%rip), %rsi      # 0x19fdc
movl $0x13, %edx
movq %rax, %rdi
callq 0x5420
movl -0x30(%rbp), %esi
movq %rbx, %rdi
callq 0x5240
movq %rax, %rbx
leaq 0x9506(%rip), %rsi      # 0x1a3c0
movl $0x2, %edx
movq %rax, %rdi
callq 0x5420
leaq -0x2130(%rbp), %r14
movq %r14, %rdi
callq 0x5180
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x5420
movq %rbx, %rdi
callq 0x51a0
movq %rax, %rdi
callq 0x51a0
jmp 0x10bae
movq %rax, %r15
movq -0x78(%rbp), %rdi
cmpq %r14, %rdi
je 0x10f0a
callq 0x5340
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
jmp 0x10f81
jmp 0x10f71
jmp 0x10f71
jmp 0x10f44
jmp 0x10f44
jmp 0x10f44
jmp 0x10f44
jmp 0x10f49
jmp 0x10f44
jmp 0x10f71
movq %rax, %r15
movq -0x108(%rbp), %rdi
jmp 0x10f58
jmp 0x10f44
jmp 0x10f44
jmp 0x10f44
jmp 0x10f71
jmp 0x10f76
jmp 0x10f71
movq %rax, %r15
jmp 0x10f97
movq %rax, %r15
jmp 0x10f67
movq %rax, %r15
movq -0x128(%rbp), %rdi
cmpq %rbx, %rdi
je 0x10f62
callq 0x5340
testb %r14b, %r14b
je 0x10f97
movq %r12, %rdi
callq 0x5340
jmp 0x10f97
movq %rax, %r15
jmp 0x10f8b
movq %rax, %r15
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x10f8b
callq 0x5340
leaq -0xe8(%rbp), %rdi
callq 0x11254
movq -0xb8(%rbp), %rdi
callq 0x9bec
movq -0x40(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x10fb4
callq 0x5340
movq %r15, %rdi
callq 0x56a0