// File: neubig[P]egret/Egret/src/Binarization.cpp
// Function: binarize(Rule&, InterNodes&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Direct)
int binarize(Rule& rule, InterNodes& interNodes,string prefix, Direct dir)
{
	vector<string> wrds;
	wrds.clear();
	stringstream rss(rule.right.c_str());
	while(!rss.eof())
	{
		string curWrd="";
		rss>>curWrd;
		if(curWrd=="")break;
		wrds.push_back(curWrd);
	}
	vector<vector<string> > strMatrix;
	strMatrix.clear();
	for(int i=0;(size_t)i<wrds.size();i++)
	{
		vector<string> temp;
		strMatrix.push_back(temp);
		for(int j=0;(size_t)j<wrds.size();j++)
		{
			if(i==j)
				strMatrix[i].push_back(wrds[i]);
			else
				strMatrix[i].push_back("");
		}
	}
	for(int i=0;(size_t)i<wrds.size();i++)
	{
		for(int j=i+1;(size_t)j<wrds.size();j++)
		{
			strMatrix[i][j]=strMatrix[i][j-1]+wrds[j];
		}
	}
	jout<<"rightPart length:"<<(unsigned int)wrds.size()<<endl;

	for(int k=(int)wrds.size();k>1;k--)
	{
		for(int i=0;i<=(int)wrds.size()-k;i++)
		{
			if(dir==LEFT&&i!=wrds.size()-k)continue;
			if(dir==RIGHT&&i!=0)break;
			for(int j=i;j<i+k-1;j++)
			{
				if(dir==LEFT&&j!=i)break;
				if(dir==RIGHT&&j!=i+k-2)continue;
				cout<<i<<","<<j<<","<<k<<":["<<i<<","<<j<<"] ["<<j+1<<","<<i+k-1<<"]"<<endl;
				
				string par="";
				if(k==wrds.size())
					par=rule.left;
				else
					par=interNodes.query(strMatrix[i][i+k-1],prefix);
				string leftSon=strMatrix[i][j];
				if(j-i>0)
					leftSon=interNodes.query(leftSon,prefix);
				string rightSon=strMatrix[j+1][i+k-1];
				if(i+k-1-j-1>0)
					rightSon=interNodes.query(rightSon,prefix);
				Rule newRule;
				newRule.left=par;
				newRule.right=leftSon+" "+rightSon;
				if(dir==PERMUTE)
					newRule.prob=double(1)/(double)(k-1);
				else 
					newRule.prob=1;
				if(k==wrds.size())
					newRule.prob*=rule.prob;
				//newRule.print(cout);
				//cout<<endl;
			}
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x500, %rsp            # imm = 0x500
movq %rdx, -0x3d0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x3c8(%rbp)
callq 0x8340
movq -0x3c8(%rbp), %rdi
callq 0x8360
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x4150
movq %rax, -0x3c0(%rbp)
leaq -0x1e1(%rbp), %rdi
movq %rdi, -0x3b8(%rbp)
callq 0x4660
movq -0x3c0(%rbp), %rsi
movq -0x3b8(%rbp), %rdx
leaq -0x1e0(%rbp), %rdi
callq 0x1c730
jmp 0x34890
movl $0x10, %edi
movl $0x8, %esi
callq 0x1c7e0
movl %eax, -0x3d4(%rbp)
jmp 0x348a7
movl -0x3d4(%rbp), %edx
leaq -0x1c0(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x45b0
jmp 0x348c2
leaq -0x1e0(%rbp), %rdi
callq 0x4728
leaq -0x1e1(%rbp), %rdi
callq 0x43f0
movq -0x1c0(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x1c0(%rbp,%rax), %rdi
callq 0x46a0
movb %al, -0x3d5(%rbp)
jmp 0x348fa
movb -0x3d5(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x3490b
jmp 0x34a6f
leaq -0x219(%rbp), %rdi
movq %rdi, -0x3e0(%rbp)
callq 0x4660
movq -0x3e0(%rbp), %rdx
leaq 0x5c52a(%rip), %rsi     # 0x90e56
leaq -0x218(%rbp), %rdi
callq 0x1c730
jmp 0x3493a
leaq -0x219(%rbp), %rdi
callq 0x43f0
leaq -0x1c0(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x44a0
jmp 0x3495b
leaq 0x5c4f4(%rip), %rsi     # 0x90e56
leaq -0x218(%rbp), %rdi
callq 0xa020
movb %al, -0x3e1(%rbp)
jmp 0x34976
movb -0x3e1(%rbp), %al
testb $0x1, %al
jne 0x34985
jmp 0x34a34
movl $0x3, -0x220(%rbp)
jmp 0x34a50
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
jmp 0x349c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x4728
leaq -0x1e1(%rbp), %rdi
callq 0x43f0
jmp 0x35553
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
jmp 0x35547
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
leaq -0x219(%rbp), %rdi
callq 0x43f0
jmp 0x35547
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x4728
jmp 0x35547
leaq -0x38(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x37000
jmp 0x34a46
movl $0x0, -0x220(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x4728
movl -0x220(%rbp), %eax
testl %eax, %eax
je 0x34a6a
jmp 0x34a68
jmp 0x34a6f
jmp 0x348da
leaq -0x238(%rbp), %rdi
callq 0x37070
leaq -0x238(%rbp), %rdi
callq 0x37090
movl $0x0, -0x23c(%rbp)
movslq -0x23c(%rbp), %rax
movq %rax, -0x3f0(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x87f0
movq %rax, %rcx
movq -0x3f0(%rbp), %rax
cmpq %rcx, %rax
jae 0x34c7b
leaq -0x258(%rbp), %rdi
movq %rdi, -0x3f8(%rbp)
callq 0x8340
movq -0x3f8(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x370b0
jmp 0x34ae3
movl $0x0, -0x25c(%rbp)
movslq -0x25c(%rbp), %rax
movq %rax, -0x400(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x87f0
movq %rax, %rcx
movq -0x400(%rbp), %rax
cmpq %rcx, %rax
jae 0x34c4a
movl -0x23c(%rbp), %eax
cmpl -0x25c(%rbp), %eax
jne 0x34b7c
movslq -0x23c(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x37120
movq %rax, -0x408(%rbp)
movslq -0x23c(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x8810
movq -0x408(%rbp), %rdi
movq %rax, %rsi
callq 0x37000
jmp 0x34b60
jmp 0x34c34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
jmp 0x34c6a
movslq -0x23c(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x37120
movq %rax, -0x418(%rbp)
leaq -0x281(%rbp), %rdi
movq %rdi, -0x410(%rbp)
callq 0x4660
movq -0x410(%rbp), %rdx
leaq 0x5c29f(%rip), %rsi     # 0x90e56
leaq -0x280(%rbp), %rdi
callq 0x1c730
jmp 0x34bc5
movq -0x418(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x8540
jmp 0x34bda
leaq -0x280(%rbp), %rdi
callq 0x4728
leaq -0x281(%rbp), %rdi
callq 0x43f0
jmp 0x34c34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
jmp 0x34c26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
leaq -0x280(%rbp), %rdi
callq 0x4728
leaq -0x281(%rbp), %rdi
callq 0x43f0
jmp 0x34c6a
jmp 0x34c36
movl -0x25c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x25c(%rbp)
jmp 0x34aed
leaq -0x258(%rbp), %rdi
callq 0x8830
movl -0x23c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x23c(%rbp)
jmp 0x34a91
leaq -0x258(%rbp), %rdi
callq 0x8830
jmp 0x3553b
movl $0x0, -0x288(%rbp)
movslq -0x288(%rbp), %rax
movq %rax, -0x420(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x87f0
movq %rax, %rcx
movq -0x420(%rbp), %rax
cmpq %rcx, %rax
jae 0x34dbb
movl -0x288(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28c(%rbp)
movslq -0x28c(%rbp), %rax
movq %rax, -0x428(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x87f0
movq %rax, %rcx
movq -0x428(%rbp), %rax
cmpq %rcx, %rax
jae 0x34da5
movslq -0x288(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x37120
movq %rax, %rdi
movl -0x28c(%rbp), %eax
decl %eax
movslq %eax, %rsi
callq 0x8810
movq %rax, -0x430(%rbp)
movslq -0x28c(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x8810
movq -0x430(%rbp), %rsi
movq %rax, %rdx
leaq -0x2b0(%rbp), %rdi
callq 0x37140
jmp 0x34d3d
movslq -0x288(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x37120
movq %rax, %rdi
movslq -0x28c(%rbp), %rsi
callq 0x8810
movq %rax, %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x4470
leaq -0x2b0(%rbp), %rdi
callq 0x4728
movl -0x28c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28c(%rbp)
jmp 0x34cbe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
jmp 0x3553b
jmp 0x34da7
movl -0x288(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x288(%rbp)
jmp 0x34c85
leaq 0x9a60e(%rip), %rdi     # 0xcf3d0
leaq 0x5b3a7(%rip), %rsi     # 0x90170
callq 0x371c0
movq %rax, -0x438(%rbp)
jmp 0x34dd7
leaq -0x38(%rbp), %rdi
callq 0x87f0
movq -0x438(%rbp), %rdi
movl %eax, %esi
callq 0x37200
movq %rax, -0x440(%rbp)
jmp 0x34df7
movq -0x440(%rbp), %rdi
movq 0x9a1b3(%rip), %rsi     # 0xcefb8
callq 0x37240
jmp 0x34e0c
leaq -0x38(%rbp), %rdi
callq 0x87f0
movl %eax, -0x2b4(%rbp)
cmpl $0x1, -0x2b4(%rbp)
jle 0x35505
movl $0x0, -0x2b8(%rbp)
movl -0x2b8(%rbp), %eax
movl %eax, -0x444(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x87f0
movq %rax, %rcx
movl -0x444(%rbp), %eax
subl -0x2b4(%rbp), %ecx
cmpl %ecx, %eax
jg 0x354ef
cmpl $0x0, -0x1c(%rbp)
jne 0x34e99
movslq -0x2b8(%rbp), %rax
movq %rax, -0x450(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x87f0
movq %rax, %rcx
movq -0x450(%rbp), %rax
movslq -0x2b4(%rbp), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
je 0x34e99
jmp 0x354db
cmpl $0x1, -0x1c(%rbp)
jne 0x34ead
cmpl $0x0, -0x2b8(%rbp)
je 0x34ead
jmp 0x354ef
movl -0x2b8(%rbp), %eax
movl %eax, -0x2bc(%rbp)
movl -0x2bc(%rbp), %eax
movl -0x2b8(%rbp), %ecx
addl -0x2b4(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x354d9
cmpl $0x0, -0x1c(%rbp)
jne 0x34eef
movl -0x2bc(%rbp), %eax
cmpl -0x2b8(%rbp), %eax
je 0x34eef
jmp 0x354d9
cmpl $0x1, -0x1c(%rbp)
jne 0x34f13
movl -0x2bc(%rbp), %eax
movl -0x2b8(%rbp), %ecx
addl -0x2b4(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
je 0x34f13
jmp 0x35493
movl -0x2b8(%rbp), %esi
movq 0x9a0b0(%rip), %rdi     # 0xcefd0
callq 0x4630
movq %rax, -0x458(%rbp)
jmp 0x34f2e
movq -0x458(%rbp), %rdi
leaq 0x5b0f3(%rip), %rsi     # 0x9002f
callq 0x4380
movq %rax, -0x460(%rbp)
jmp 0x34f4a
movq -0x460(%rbp), %rdi
movl -0x2bc(%rbp), %esi
callq 0x4630
movq %rax, -0x468(%rbp)
jmp 0x34f65
movq -0x468(%rbp), %rdi
leaq 0x5b0bc(%rip), %rsi     # 0x9002f
callq 0x4380
movq %rax, -0x470(%rbp)
jmp 0x34f81
movq -0x470(%rbp), %rdi
movl -0x2b4(%rbp), %esi
callq 0x4630
movq %rax, -0x478(%rbp)
jmp 0x34f9c
movq -0x478(%rbp), %rdi
leaq 0x5b1d8(%rip), %rsi     # 0x90182
callq 0x4380
movq %rax, -0x480(%rbp)
jmp 0x34fb8
movq -0x480(%rbp), %rdi
movl -0x2b8(%rbp), %esi
callq 0x4630
movq %rax, -0x488(%rbp)
jmp 0x34fd3
movq -0x488(%rbp), %rdi
leaq 0x5b04e(%rip), %rsi     # 0x9002f
callq 0x4380
movq %rax, -0x490(%rbp)
jmp 0x34fef
movq -0x490(%rbp), %rdi
movl -0x2bc(%rbp), %esi
callq 0x4630
movq %rax, -0x498(%rbp)
jmp 0x3500a
movq -0x498(%rbp), %rdi
leaq 0x5b16d(%rip), %rsi     # 0x90185
callq 0x4380
movq %rax, -0x4a0(%rbp)
jmp 0x35026
movq -0x4a0(%rbp), %rdi
movl -0x2bc(%rbp), %esi
incl %esi
callq 0x4630
movq %rax, -0x4a8(%rbp)
jmp 0x35043
movq -0x4a8(%rbp), %rdi
leaq 0x5afde(%rip), %rsi     # 0x9002f
callq 0x4380
movq %rax, -0x4b0(%rbp)
jmp 0x3505f
movq -0x4b0(%rbp), %rdi
movl -0x2b8(%rbp), %edx
movl -0x2b4(%rbp), %eax
movl %eax, %ecx
movl %edx, %eax
leal -0x1(%rax,%rcx), %esi
callq 0x4630
movq %rax, -0x4b8(%rbp)
jmp 0x35088
movq -0x4b8(%rbp), %rdi
leaq 0x5b977(%rip), %rsi     # 0x90a0d
callq 0x4380
movq %rax, -0x4c0(%rbp)
jmp 0x350a4
movq -0x4c0(%rbp), %rdi
movq 0x99f06(%rip), %rsi     # 0xcefb8
callq 0x43d0
jmp 0x350b9
leaq -0x2e1(%rbp), %rdi
movq %rdi, -0x4c8(%rbp)
callq 0x4660
movq -0x4c8(%rbp), %rdx
leaq 0x5bd7c(%rip), %rsi     # 0x90e56
leaq -0x2e0(%rbp), %rdi
callq 0x1c730
jmp 0x350e8
leaq -0x2e1(%rbp), %rdi
callq 0x43f0
movslq -0x2b4(%rbp), %rax
movq %rax, -0x4d0(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x87f0
movq %rax, %rcx
movq -0x4d0(%rbp), %rax
cmpq %rcx, %rax
jne 0x3516b
movq -0x8(%rbp), %rsi
leaq -0x2e0(%rbp), %rdi
callq 0x4050
jmp 0x3512c
jmp 0x351de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
leaq -0x2e1(%rbp), %rdi
callq 0x43f0
jmp 0x3553b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
jmp 0x354cb
movq -0x10(%rbp), %rax
movq %rax, -0x4e0(%rbp)
movslq -0x2b8(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x37120
movq %rax, %rdi
movl -0x2b8(%rbp), %edx
movl -0x2b4(%rbp), %eax
movl %eax, %ecx
movl %edx, %eax
leal -0x1(%rax,%rcx), %eax
movslq %eax, %rsi
callq 0x8810
movq -0x4e0(%rbp), %rdi
movq -0x3d0(%rbp), %rdx
movq %rax, %rsi
callq 0x35570
movq %rax, -0x4d8(%rbp)
jmp 0x351c7
movq -0x4d8(%rbp), %rsi
leaq -0x2e0(%rbp), %rdi
callq 0x4050
jmp 0x351dc
jmp 0x351de
movslq -0x2b8(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x37120
movq %rax, %rdi
movslq -0x2bc(%rbp), %rsi
callq 0x8810
movq %rax, %rsi
leaq -0x308(%rbp), %rdi
callq 0x4160
jmp 0x35211
movl -0x2bc(%rbp), %eax
subl -0x2b8(%rbp), %eax
cmpl $0x0, %eax
jle 0x35270
movq -0x3d0(%rbp), %rdx
movq -0x10(%rbp), %rdi
leaq -0x308(%rbp), %rsi
callq 0x35570
movq %rax, -0x4e8(%rbp)
jmp 0x35242
movq -0x4e8(%rbp), %rsi
leaq -0x308(%rbp), %rdi
callq 0x4050
jmp 0x35257
jmp 0x35270
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
jmp 0x354bf
movl -0x2bc(%rbp), %eax
incl %eax
movslq %eax, %rsi
leaq -0x238(%rbp), %rdi
callq 0x37120
movq %rax, %rdi
movl -0x2b8(%rbp), %edx
movl -0x2b4(%rbp), %eax
movl %eax, %ecx
movl %edx, %eax
leal -0x1(%rax,%rcx), %eax
movslq %eax, %rsi
callq 0x8810
movq %rax, %rsi
leaq -0x328(%rbp), %rdi
callq 0x4160
jmp 0x352b7
movl -0x2b8(%rbp), %eax
addl -0x2b4(%rbp), %eax
subl $0x1, %eax
subl -0x2bc(%rbp), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jle 0x35322
movq -0x3d0(%rbp), %rdx
movq -0x10(%rbp), %rdi
leaq -0x328(%rbp), %rsi
callq 0x35570
movq %rax, -0x4f0(%rbp)
jmp 0x352f4
movq -0x4f0(%rbp), %rsi
leaq -0x328(%rbp), %rdi
callq 0x4050
jmp 0x35309
jmp 0x35322
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
jmp 0x354b3
leaq -0x370(%rbp), %rdi
movq %rdi, -0x4f8(%rbp)
callq 0x37280
movq -0x4f8(%rbp), %rdi
leaq -0x2e0(%rbp), %rsi
callq 0x4050
jmp 0x3534a
leaq 0x5bb01(%rip), %rdx     # 0x90e52
leaq -0x3b0(%rbp), %rdi
leaq -0x308(%rbp), %rsi
callq 0x21540
jmp 0x35366
leaq -0x390(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
leaq -0x328(%rbp), %rdx
callq 0x214f0
jmp 0x35382
leaq -0x370(%rbp), %rdi
addq $0x20, %rdi
leaq -0x390(%rbp), %rsi
callq 0x4470
leaq -0x390(%rbp), %rdi
callq 0x4728
leaq -0x3b0(%rbp), %rdi
callq 0x4728
cmpl $0x2, -0x1c(%rbp)
jne 0x35414
movl -0x2b4(%rbp), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
movsd 0x5ad9c(%rip), %xmm0    # 0x90168
divsd %xmm1, %xmm0
movsd %xmm0, -0x330(%rbp)
jmp 0x35424
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
jmp 0x354a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f0(%rbp)
movl %eax, -0x1f4(%rbp)
leaq -0x3b0(%rbp), %rdi
callq 0x4728
jmp 0x354a7
movsd 0x5ad4c(%rip), %xmm0    # 0x90168
movsd %xmm0, -0x330(%rbp)
movslq -0x2b4(%rbp), %rax
movq %rax, -0x500(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x87f0
movq %rax, %rcx
movq -0x500(%rbp), %rax
cmpq %rcx, %rax
jne 0x35463
movq -0x8(%rbp), %rax
movsd 0x40(%rax), %xmm0
mulsd -0x330(%rbp), %xmm0
movsd %xmm0, -0x330(%rbp)
leaq -0x370(%rbp), %rdi
callq 0x372b0
leaq -0x328(%rbp), %rdi
callq 0x4728
leaq -0x308(%rbp), %rdi
callq 0x4728
leaq -0x2e0(%rbp), %rdi
callq 0x4728
movl -0x2bc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2bc(%rbp)
jmp 0x34eb9
leaq -0x370(%rbp), %rdi
callq 0x372b0
leaq -0x328(%rbp), %rdi
callq 0x4728
leaq -0x308(%rbp), %rdi
callq 0x4728
leaq -0x2e0(%rbp), %rdi
callq 0x4728
jmp 0x3553b
jmp 0x354db
movl -0x2b8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2b8(%rbp)
jmp 0x34e32
jmp 0x354f1
movl -0x2b4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2b4(%rbp)
jmp 0x34e1b
movl $0x1, -0x220(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x372e0
leaq -0x1c0(%rbp), %rdi
callq 0x42d0
leaq -0x38(%rbp), %rdi
callq 0x8830
xorl %eax, %eax
addq $0x500, %rsp            # imm = 0x500
popq %rbp
retq
leaq -0x238(%rbp), %rdi
callq 0x372e0
leaq -0x1c0(%rbp), %rdi
callq 0x42d0
leaq -0x38(%rbp), %rdi
callq 0x8830
movq -0x1f0(%rbp), %rdi
callq 0x4650
nopl (%rax,%rax)