// File: gauravtewari[P]netlist/main.cpp
// Function: main
int main(int argc, char **argv){
	class circuit c;

	if(argc != 2){
		cout<<"Error: No input file specified.\n";
		cout<<"Usage: ./parser <input_file_name>\n";
		return 1;
	}

	/* Parse the input file and generate the graph data structures */
	if(c.parse_input(argv[1]) != 0){
		cerr<<"Error while Parsing input \n";
		return 1;
	}

	/* Figuring the name of the outfile */
	char *ofile = strtok(argv[1],".");
	char *out_file = new char[strlen(ofile)+5];
	strncpy(out_file, ofile, strlen(ofile));
	strncpy(out_file+strlen(ofile), ".out",4);
	out_file[strlen(ofile)+4]='\0';

	/* Opening the output file for storing result */
	ofstream fout(out_file);
	if(!fout.is_open()){
		cerr<<"Can't open output file for writing\n";
		return -1;
	}
	
	/* Calculate the fan out for all the gates in the netlist */
	c.update_fan_out();
	
	/* Calculating the maximum fanout */
	u32 max_fout=0;
	for(vector<struct gate>::const_iterator i = c.gate_list.begin(); i != c.gate_list.end(); i++)
		if(i->fan_out > max_fout)
			max_fout = i->fan_out;
	fout<<max_fout<<endl;
	
	
	/* find the number of gates with similar fanouts */
	int *fan_count = new int[max_fout+1];
	for(u32 i=0; i<max_fout+1; i++) fan_count[i]=0;
	for(vector<struct gate>::const_iterator i = c.gate_list.begin(); i != c.gate_list.end(); i++)
		fan_count[i->fan_out]++;
	
	/* Printing result for number of gates with similar fanout */
	for(u32 i=0; i<max_fout+1; i++){
		fout<<fan_count[i]<<endl;
	}
	
	/* Generating the index of adjacency list entries for INPUT gates */
	u32 gtype = c.get_gate_type("INPUT");
	fout<<c.gate_type[gtype]<<" ";
	for(vector<struct gate>::const_iterator i = c.gate_list.begin(); i != c.gate_list.end(); i++)
		if(i->type==gtype) {
			fout<<i->id<<" ";
		}
	fout<<endl;

	/* Generating the index of adjacency list entries for OUTPUT gates */
	gtype=c.get_gate_type("OUTPUT");
	fout<<c.gate_type[gtype]<<" ";
	for(vector<struct gate>::const_iterator i = c.gate_list.begin(); i != c.gate_list.end(); i++)
		if(i->type==gtype){
			fout<<i->id<<" ";
		}
	fout<<endl;
	
	/* Calculate the number of gate types that drive the same type gate, and the fanin counterpart */
	c.update_same_faninout();
	for (u32 i=0; i<c.gate_t.size(); i++){
		if((c.gate_type[i]!=0) && (i != c.get_gate_type("INPUT")) && (i != c.get_gate_type("OUTPUT"))){
			fout<<c.get_gate_name(i)<<" "<<c.gate_type[i]<<" "<<c.same_fanout[i]<<" "<<c.same_fanin[i]<<endl;

		}
	}
	
	/* Clean up */
	fout.close();
	delete []out_file;
	delete []fan_count;
	cout<<"Statistics Generated, check output file\n";
	cout<<"Output file generated: "<<ofile<<".out\n";
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x5e0, %rsp            # imm = 0x5E0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x32e0
cmpl $0x2, -0x8(%rbp)
je 0x2622
movq 0xe9fe(%rip), %rdi      # 0x10fd0
leaq 0x8a2b(%rip), %rsi      # 0xb004
callq 0x2220
jmp 0x25e0
movq 0xe9e9(%rip), %rdi      # 0x10fd0
leaq 0x8a37(%rip), %rsi      # 0xb025
callq 0x2220
jmp 0x25f5
movl $0x1, -0x4(%rbp)
movl $0x1, -0x140(%rbp)
jmp 0x32a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x32c0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x130(%rbp), %rdi
callq 0x4b60
movl %eax, -0x4bc(%rbp)
jmp 0x263e
movl -0x4bc(%rbp), %eax
cmpl $0x0, %eax
je 0x2674
movq 0xe9a0(%rip), %rdi      # 0x10ff0
leaq 0x89f1(%rip), %rsi      # 0xb048
callq 0x2220
jmp 0x265e
movl $0x1, -0x4(%rbp)
movl $0x1, -0x140(%rbp)
jmp 0x32a8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x89e1(%rip), %rsi      # 0xb064
callq 0x2370
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rdi
callq 0x2120
movq %rax, %rdi
addq $0x5, %rdi
callq 0x2030
movq %rax, -0x4c8(%rbp)
jmp 0x26b0
movq -0x4c8(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rax
movq %rax, -0x4e8(%rbp)
movq -0x148(%rbp), %rdi
movq %rdi, -0x4e0(%rbp)
callq 0x2120
movq -0x4e8(%rbp), %rdi
movq -0x4e0(%rbp), %rsi
movq %rax, %rdx
callq 0x2140
movq -0x150(%rbp), %rax
movq %rax, -0x4d8(%rbp)
movq -0x148(%rbp), %rdi
callq 0x2120
movq -0x4d8(%rbp), %rdi
addq %rax, %rdi
leaq 0x8946(%rip), %rsi      # 0xb066
movl $0x4, %edx
callq 0x2140
movq -0x150(%rbp), %rax
movq %rax, -0x4d0(%rbp)
movq -0x148(%rbp), %rdi
callq 0x2120
movq -0x4d0(%rbp), %rcx
movb $0x0, 0x4(%rax,%rcx)
movq -0x150(%rbp), %rsi
leaq -0x350(%rbp), %rdi
movl $0x10, %edx
callq 0x2290
jmp 0x276a
leaq -0x350(%rbp), %rdi
callq 0x21c0
movb %al, -0x4e9(%rbp)
jmp 0x277e
movb -0x4e9(%rbp), %al
testb $0x1, %al
jne 0x27cc
jmp 0x278a
movq 0xe85f(%rip), %rdi      # 0x10ff0
leaq 0x88d3(%rip), %rsi      # 0xb06b
callq 0x2220
jmp 0x279f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x140(%rbp)
jmp 0x328c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x329a
leaq -0x130(%rbp), %rdi
callq 0x63b0
jmp 0x27da
movl $0x0, -0x354(%rbp)
leaq -0x130(%rbp), %rdi
addq $0x90, %rdi
callq 0x33b0
movq %rax, -0x368(%rbp)
leaq -0x360(%rbp), %rdi
leaq -0x368(%rbp), %rsi
callq 0x33e0
leaq -0x130(%rbp), %rdi
addq $0x90, %rdi
callq 0x3460
movq %rax, -0x370(%rbp)
leaq -0x360(%rbp), %rdi
leaq -0x370(%rbp), %rsi
callq 0x3420
testb $0x1, %al
jne 0x2844
jmp 0x2889
leaq -0x360(%rbp), %rdi
callq 0x3490
movl 0xc(%rax), %eax
cmpl -0x354(%rbp), %eax
jbe 0x2870
leaq -0x360(%rbp), %rdi
callq 0x3490
movl 0xc(%rax), %eax
movl %eax, -0x354(%rbp)
jmp 0x2872
leaq -0x360(%rbp), %rdi
xorl %esi, %esi
callq 0x34b0
movq %rax, -0x378(%rbp)
jmp 0x2811
movl -0x354(%rbp), %esi
leaq -0x350(%rbp), %rdi
callq 0x2310
movq %rax, -0x4f8(%rbp)
jmp 0x28a4
movq -0x4f8(%rbp), %rdi
movq 0xe70e(%rip), %rsi      # 0x10fc0
callq 0x2260
jmp 0x28b9
movl -0x354(%rbp), %eax
incl %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0x2030
movq %rax, -0x500(%rbp)
jmp 0x28d5
movq -0x500(%rbp), %rax
movq %rax, -0x380(%rbp)
movl $0x0, -0x384(%rbp)
movl -0x384(%rbp), %eax
movl -0x354(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jae 0x2925
movq -0x380(%rbp), %rax
movl -0x384(%rbp), %ecx
movl $0x0, (%rax,%rcx,4)
movl -0x384(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x384(%rbp)
jmp 0x28ed
leaq -0x130(%rbp), %rdi
addq $0x90, %rdi
callq 0x33b0
movq %rax, -0x398(%rbp)
leaq -0x390(%rbp), %rdi
leaq -0x398(%rbp), %rsi
callq 0x33e0
leaq -0x130(%rbp), %rdi
addq $0x90, %rdi
callq 0x3460
movq %rax, -0x3a0(%rbp)
leaq -0x390(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x3420
testb $0x1, %al
jne 0x2985
jmp 0x29cc
movq -0x380(%rbp), %rax
movq %rax, -0x508(%rbp)
leaq -0x390(%rbp), %rdi
callq 0x3490
movq %rax, %rcx
movq -0x508(%rbp), %rax
movl 0xc(%rcx), %ecx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
leaq -0x390(%rbp), %rdi
xorl %esi, %esi
callq 0x34b0
movq %rax, -0x3a8(%rbp)
jmp 0x2952
movl $0x0, -0x3ac(%rbp)
movl -0x3ac(%rbp), %eax
movl -0x354(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jae 0x2a36
movq -0x380(%rbp), %rax
movl -0x3ac(%rbp), %ecx
movl (%rax,%rcx,4), %esi
leaq -0x350(%rbp), %rdi
callq 0x23b0
movq %rax, -0x510(%rbp)
jmp 0x2a0e
movq -0x510(%rbp), %rdi
movq 0xe5a4(%rip), %rsi      # 0x10fc0
callq 0x2260
jmp 0x2a23
jmp 0x2a25
movl -0x3ac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3ac(%rbp)
jmp 0x29d6
leaq -0x3d1(%rbp), %rdi
movq %rdi, -0x518(%rbp)
callq 0x23d0
movq -0x518(%rbp), %rdx
leaq 0x8638(%rip), %rsi      # 0xb08f
leaq -0x3d0(%rbp), %rdi
callq 0x34f0
jmp 0x2a65
leaq -0x130(%rbp), %rdi
leaq -0x3d0(%rbp), %rsi
callq 0x5c30
movl %eax, -0x51c(%rbp)
jmp 0x2a80
leaq -0x3d0(%rbp), %rdi
callq 0x2170
leaq -0x3d1(%rbp), %rdi
callq 0x2280
movl -0x51c(%rbp), %eax
movl %eax, -0x3b0(%rbp)
movl -0x3b0(%rbp), %eax
movl -0x128(%rbp,%rax,4), %esi
leaq -0x350(%rbp), %rdi
callq 0x2310
movq %rax, -0x528(%rbp)
jmp 0x2ac6
movq -0x528(%rbp), %rdi
leaq 0x8607(%rip), %rsi      # 0xb0db
callq 0x2220
jmp 0x2adb
leaq -0x130(%rbp), %rdi
addq $0x90, %rdi
callq 0x33b0
movq %rax, -0x3e8(%rbp)
leaq -0x3e0(%rbp), %rdi
leaq -0x3e8(%rbp), %rsi
callq 0x33e0
leaq -0x130(%rbp), %rdi
addq $0x90, %rdi
callq 0x3460
movq %rax, -0x3f0(%rbp)
leaq -0x3e0(%rbp), %rdi
leaq -0x3f0(%rbp), %rsi
callq 0x3420
testb $0x1, %al
jne 0x2b3e
jmp 0x2bee
leaq -0x3e0(%rbp), %rdi
callq 0x3490
movl 0x4(%rax), %eax
cmpl -0x3b0(%rbp), %eax
jne 0x2bd2
leaq -0x3e0(%rbp), %rdi
callq 0x3490
movl (%rax), %esi
leaq -0x350(%rbp), %rdi
callq 0x2310
movq %rax, -0x530(%rbp)
jmp 0x2b78
movq -0x530(%rbp), %rdi
leaq 0x8555(%rip), %rsi      # 0xb0db
callq 0x2220
jmp 0x2b8d
jmp 0x2bd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x2bc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
leaq -0x3d0(%rbp), %rdi
callq 0x2170
leaq -0x3d1(%rbp), %rdi
callq 0x2280
jmp 0x329a
jmp 0x2bd4
leaq -0x3e0(%rbp), %rdi
xorl %esi, %esi
callq 0x34b0
movq %rax, -0x3f8(%rbp)
jmp 0x2b08
movq 0xe3cb(%rip), %rsi      # 0x10fc0
leaq -0x350(%rbp), %rdi
callq 0x2260
jmp 0x2c03
leaq -0x419(%rbp), %rdi
movq %rdi, -0x538(%rbp)
callq 0x23d0
movq -0x538(%rbp), %rdx
leaq 0x8471(%rip), %rsi      # 0xb095
leaq -0x418(%rbp), %rdi
callq 0x34f0
jmp 0x2c32
leaq -0x130(%rbp), %rdi
leaq -0x418(%rbp), %rsi
callq 0x5c30
movl %eax, -0x53c(%rbp)
jmp 0x2c4d
movl -0x53c(%rbp), %eax
movl %eax, -0x3b0(%rbp)
leaq -0x418(%rbp), %rdi
callq 0x2170
leaq -0x419(%rbp), %rdi
callq 0x2280
movl -0x3b0(%rbp), %eax
movl -0x128(%rbp,%rax,4), %esi
leaq -0x350(%rbp), %rdi
callq 0x2310
movq %rax, -0x548(%rbp)
jmp 0x2c93
movq -0x548(%rbp), %rdi
leaq 0x843a(%rip), %rsi      # 0xb0db
callq 0x2220
jmp 0x2ca8
leaq -0x130(%rbp), %rdi
addq $0x90, %rdi
callq 0x33b0
movq %rax, -0x430(%rbp)
leaq -0x428(%rbp), %rdi
leaq -0x430(%rbp), %rsi
callq 0x33e0
leaq -0x130(%rbp), %rdi
addq $0x90, %rdi
callq 0x3460
movq %rax, -0x438(%rbp)
leaq -0x428(%rbp), %rdi
leaq -0x438(%rbp), %rsi
callq 0x3420
testb $0x1, %al
jne 0x2d0b
jmp 0x2dbb
leaq -0x428(%rbp), %rdi
callq 0x3490
movl 0x4(%rax), %eax
cmpl -0x3b0(%rbp), %eax
jne 0x2d9f
leaq -0x428(%rbp), %rdi
callq 0x3490
movl (%rax), %esi
leaq -0x350(%rbp), %rdi
callq 0x2310
movq %rax, -0x550(%rbp)
jmp 0x2d45
movq -0x550(%rbp), %rdi
leaq 0x8388(%rip), %rsi      # 0xb0db
callq 0x2220
jmp 0x2d5a
jmp 0x2d9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x2d8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
leaq -0x418(%rbp), %rdi
callq 0x2170
leaq -0x419(%rbp), %rdi
callq 0x2280
jmp 0x329a
jmp 0x2da1
leaq -0x428(%rbp), %rdi
xorl %esi, %esi
callq 0x34b0
movq %rax, -0x440(%rbp)
jmp 0x2cd5
movq 0xe1fe(%rip), %rsi      # 0x10fc0
leaq -0x350(%rbp), %rdi
callq 0x2260
jmp 0x2dd0
leaq -0x130(%rbp), %rdi
callq 0x5e10
jmp 0x2dde
movl $0x0, -0x444(%rbp)
movl -0x444(%rbp), %eax
movq %rax, -0x558(%rbp)
leaq -0x130(%rbp), %rdi
addq $0xf0, %rdi
callq 0x35a0
movq %rax, %rcx
movq -0x558(%rbp), %rax
cmpq %rcx, %rax
jae 0x31cb
movl -0x444(%rbp), %eax
movl -0x128(%rbp,%rax,4), %ecx
movb $0x0, -0x46a(%rbp)
movb $0x0, -0x46b(%rbp)
movb $0x0, -0x492(%rbp)
movb $0x0, -0x493(%rbp)
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x559(%rbp)
je 0x2f4c
movl -0x444(%rbp), %eax
movl %eax, -0x56c(%rbp)
leaq -0x469(%rbp), %rdi
movq %rdi, -0x568(%rbp)
callq 0x23d0
movq -0x568(%rbp), %rdx
movb $0x1, -0x46a(%rbp)
leaq 0x8206(%rip), %rsi      # 0xb08f
leaq -0x468(%rbp), %rdi
callq 0x34f0
jmp 0x2e97
movb $0x1, -0x46b(%rbp)
leaq -0x130(%rbp), %rdi
leaq -0x468(%rbp), %rsi
callq 0x5c30
movl %eax, -0x570(%rbp)
jmp 0x2eb9
movl -0x56c(%rbp), %ecx
movl -0x570(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x559(%rbp)
je 0x2f4c
movl -0x444(%rbp), %eax
movl %eax, -0x57c(%rbp)
leaq -0x491(%rbp), %rdi
movq %rdi, -0x578(%rbp)
callq 0x23d0
movq -0x578(%rbp), %rdx
movb $0x1, -0x492(%rbp)
leaq 0x8190(%rip), %rsi      # 0xb095
leaq -0x490(%rbp), %rdi
callq 0x34f0
jmp 0x2f13
movb $0x1, -0x493(%rbp)
leaq -0x130(%rbp), %rdi
leaq -0x490(%rbp), %rsi
callq 0x5c30
movl %eax, -0x580(%rbp)
jmp 0x2f35
movl -0x57c(%rbp), %eax
movl -0x580(%rbp), %ecx
cmpl %ecx, %eax
setne %al
movb %al, -0x559(%rbp)
movb -0x559(%rbp), %al
movb %al, -0x581(%rbp)
testb $0x1, -0x493(%rbp)
jne 0x2f63
jmp 0x2f6f
leaq -0x490(%rbp), %rdi
callq 0x2170
testb $0x1, -0x492(%rbp)
jne 0x2f7a
jmp 0x2f86
leaq -0x491(%rbp), %rdi
callq 0x2280
testb $0x1, -0x46b(%rbp)
jne 0x2f91
jmp 0x2f9d
leaq -0x468(%rbp), %rdi
callq 0x2170
testb $0x1, -0x46a(%rbp)
jne 0x2fa8
jmp 0x2fb4
leaq -0x469(%rbp), %rdi
callq 0x2280
movb -0x581(%rbp), %al
testb $0x1, %al
jne 0x2fc3
jmp 0x31b5
movl -0x444(%rbp), %edx
leaq -0x4b8(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x65f0
jmp 0x2fde
leaq -0x350(%rbp), %rdi
leaq -0x4b8(%rbp), %rsi
callq 0x2210
movq %rax, -0x590(%rbp)
jmp 0x2ffa
movq -0x590(%rbp), %rdi
leaq 0x80d3(%rip), %rsi      # 0xb0db
callq 0x2220
movq %rax, -0x598(%rbp)
jmp 0x3016
movq -0x598(%rbp), %rdi
movl -0x444(%rbp), %eax
movl -0x128(%rbp,%rax,4), %esi
callq 0x2310
movq %rax, -0x5a0(%rbp)
jmp 0x3038
movq -0x5a0(%rbp), %rdi
leaq 0x8095(%rip), %rsi      # 0xb0db
callq 0x2220
movq %rax, -0x5a8(%rbp)
jmp 0x3054
movq -0x5a8(%rbp), %rdi
movl -0x444(%rbp), %eax
movl -0xec(%rbp,%rax,4), %esi
callq 0x2310
movq %rax, -0x5b0(%rbp)
jmp 0x3076
movq -0x5b0(%rbp), %rdi
leaq 0x8057(%rip), %rsi      # 0xb0db
callq 0x2220
movq %rax, -0x5b8(%rbp)
jmp 0x3092
movq -0x5b8(%rbp), %rdi
movl -0x444(%rbp), %eax
movl -0xc8(%rbp,%rax,4), %esi
callq 0x2310
movq %rax, -0x5c0(%rbp)
jmp 0x30b4
movq -0x5c0(%rbp), %rdi
movq 0xdefe(%rip), %rsi      # 0x10fc0
callq 0x2260
jmp 0x30c9
leaq -0x4b8(%rbp), %rdi
callq 0x2170
jmp 0x31b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x3176
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x315d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x3144
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
testb $0x1, -0x493(%rbp)
jne 0x3136
jmp 0x3142
leaq -0x490(%rbp), %rdi
callq 0x2170
jmp 0x3144
testb $0x1, -0x492(%rbp)
jne 0x314f
jmp 0x315b
leaq -0x491(%rbp), %rdi
callq 0x2280
jmp 0x315d
testb $0x1, -0x46b(%rbp)
jne 0x3168
jmp 0x3174
leaq -0x468(%rbp), %rdi
callq 0x2170
jmp 0x3176
testb $0x1, -0x46a(%rbp)
jne 0x3181
jmp 0x318d
leaq -0x469(%rbp), %rdi
callq 0x2280
jmp 0x329a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
leaq -0x4b8(%rbp), %rdi
callq 0x2170
jmp 0x329a
jmp 0x31b7
movl -0x444(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x444(%rbp)
jmp 0x2de8
leaq -0x350(%rbp), %rdi
callq 0x2330
jmp 0x31d9
movq -0x150(%rbp), %rax
movq %rax, -0x5c8(%rbp)
cmpq $0x0, %rax
je 0x31f9
movq -0x5c8(%rbp), %rdi
callq 0x2300
movq -0x380(%rbp), %rax
movq %rax, -0x5d0(%rbp)
cmpq $0x0, %rax
je 0x3219
movq -0x5d0(%rbp), %rdi
callq 0x2300
movq 0xddb0(%rip), %rdi      # 0x10fd0
leaq 0x7e75(%rip), %rsi      # 0xb09c
callq 0x2220
jmp 0x322e
movq 0xdd9b(%rip), %rdi      # 0x10fd0
leaq 0x7e89(%rip), %rsi      # 0xb0c5
callq 0x2220
movq %rax, -0x5d8(%rbp)
jmp 0x324a
movq -0x5d8(%rbp), %rdi
movq -0x148(%rbp), %rsi
callq 0x2220
movq %rax, -0x5e0(%rbp)
jmp 0x3266
movq -0x5e0(%rbp), %rdi
leaq 0x7e69(%rip), %rsi      # 0xb0dd
callq 0x2220
jmp 0x327b
movl $0x0, -0x4(%rbp)
movl $0x1, -0x140(%rbp)
leaq -0x350(%rbp), %rdi
callq 0x2350
jmp 0x32a8
leaq -0x350(%rbp), %rdi
callq 0x2350
jmp 0x32c0
leaq -0x130(%rbp), %rdi
callq 0x35c0
movl -0x4(%rbp), %eax
addq $0x5e0, %rsp            # imm = 0x5E0
popq %rbp
retq
leaq -0x130(%rbp), %rdi
callq 0x35c0
movq -0x138(%rbp), %rdi
callq 0x23c0
nopl (%rax,%rax)