// File: /workspace/github_c_makefile_star2_O0/DrYerzinia[P]C_DigiMode/src/filter/filter_test.cpp
// Function: main
int main(int argc, char **argv){

	std::string args;
	for(int i = 0; i < argc; i++) args += std::string(argv[i]) + std::string(" ");
	util::readInArguments(args);

	std::string fn = util::getArgument("-fn");
	std::string filename = "dat/psk/0_5000hz_sweep.raw";
	if(fn.compare("NULL")){
		filename = fn;
	}

	std::string of = util::getArgument("-of");
	std::string output_filename = "dat/data_filtered.raw";
	if(of.compare("NULL")){
		output_filename = of;
	}

	FIR_filter test_filter;

	// filter parameteres ////////////////////////////////////////////////

	std::string ft = util::getArgument("-ft");
	std::string filter_type = "highpass";
	if(filter_type.compare("NULL")){
		filter_type = ft;
	}
	
	int points = 127;
	float low_cutoff_freq = 800;
	float high_cutoff_freq = 900;
	float cutoff_freq = 2500;

	std::string pts = util::getArgument("-pts");
	if(pts.compare("NULL")){
		points = atoi(pts.c_str());
	}
	
	std::string co = util::getArgument("-co");
	if(co.compare("NULL")){
		cutoff_freq = atof(co.c_str());
	}
	
	std::string lco = util::getArgument("-lco");
	if(lco.compare("NULL")){
		low_cutoff_freq = atof(lco.c_str());
	}


	std::string hco = util::getArgument("-hco");
	if(hco.compare("NULL")){
		high_cutoff_freq = atof(hco.c_str());
	}

	test_filter.set_sample_rate(22050);

	// Setup Filter ///////////////////////////////////////////////////////

	if(filter_type.compare("bandpass") == 0){
		test_filter.set_up_bandpass(points, low_cutoff_freq, high_cutoff_freq);
	} else if(filter_type.compare("lowpass") == 0){
		test_filter.set_up_lowpass(points, cutoff_freq);
	} else if(filter_type.compare("highpass") == 0){
		test_filter.set_up_highpass(points, cutoff_freq);
	}  else if(filter_type.compare("bandstop") == 0){
		test_filter.set_up_bandreject(points, low_cutoff_freq, high_cutoff_freq);
	} else if(filter_type.compare("90deg") == 0){
		test_filter.set_up_90deg();
	} else {
		std::cout << "Invalid Filter Type: " << filter_type << std::endl;
		exit(0);
	}

	// Filter Data and Write Data ////////////////////////////////////////

	std::ostream *output_file;
	if(output_filename.compare("stdout") == 0) output_file = &std::cout;
	else output_file = new std::fstream(output_filename.c_str(), std::fstream::out | std::fstream::binary);

	char wbuf[1];
	float max = 0.0001;

	std::istream *data_file;

	if(filename.compare("stdin") == 0){
		data_file = &std::cin;
	} else {
		data_file = new std::fstream(filename.c_str(), std::fstream::in | std::fstream::binary);

		if(!((std::fstream*)data_file)->is_open()){
			std::cout << "Error: couldn't open input file" << std::endl;
			exit(0);
		}
	}

	while(!data_file->eof()){		
		data_file->read(wbuf, 1);
		if(test_filter.proccess_byte(wbuf[0])){
			float dat = test_filter.get_next_datapoint();
			if(max < dat)
				max = dat;
			wbuf[0] = (char) dat*(127/max);
			output_file->write(wbuf, 1);
			output_file->flush();
		}
	}

	if(filename.compare("stdin") != 0) ((std::fstream*)data_file)->close();

	if(output_filename.compare("stdout") != 0){
		((std::fstream*)output_file)->close();
		delete output_file;
	}

	// The End ////////////////////////////////////////////////////////////

	return 0;

}

// Assembly:
subq $0x4b8, %rsp            # imm = 0x4B8
movl $0x0, 0x4b4(%rsp)
movl %edi, 0x4b0(%rsp)
movq %rsi, 0x4a8(%rsp)
leaq 0x488(%rsp), %rdi
callq 0x3340
movl $0x0, 0x484(%rsp)
movl 0x484(%rsp), %eax
cmpl 0x4b0(%rsp), %eax
jge 0x3879
movq 0x4a8(%rsp), %rax
movslq 0x484(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0xd8(%rsp)
leaq 0x43f(%rsp), %rdi
movq %rdi, 0xe0(%rsp)
callq 0x3430
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
leaq 0x440(%rsp), %rdi
callq 0x48a0
jmp 0x371d
leaq 0x407(%rsp), %rdi
movq %rdi, 0xd0(%rsp)
callq 0x3430
movq 0xd0(%rsp), %rdx
leaq 0x6961(%rip), %rsi      # 0xa0a2
leaq 0x408(%rsp), %rdi
callq 0x48a0
jmp 0x3750
leaq 0x460(%rsp), %rdi
leaq 0x440(%rsp), %rsi
leaq 0x408(%rsp), %rdx
callq 0x47b0
jmp 0x376f
leaq 0x488(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x3310
jmp 0x3786
leaq 0x460(%rsp), %rdi
callq 0x3150
leaq 0x408(%rsp), %rdi
callq 0x3150
leaq 0x407(%rsp), %rdi
callq 0x3290
leaq 0x440(%rsp), %rdi
callq 0x3150
leaq 0x43f(%rsp), %rdi
callq 0x3290
movl 0x484(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x484(%rsp)
jmp 0x36b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
jmp 0x3867
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
jmp 0x384d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
jmp 0x3840
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
leaq 0x460(%rsp), %rdi
callq 0x3150
leaq 0x408(%rsp), %rdi
callq 0x3150
leaq 0x407(%rsp), %rdi
callq 0x3290
leaq 0x440(%rsp), %rdi
callq 0x3150
leaq 0x43f(%rsp), %rdi
callq 0x3290
jmp 0x4792
leaq 0x3e0(%rsp), %rdi
leaq 0x488(%rsp), %rsi
callq 0x3110
jmp 0x3890
leaq 0x3e0(%rsp), %rdi
callq 0x8960
jmp 0x389f
leaq 0x3e0(%rsp), %rdi
callq 0x3150
leaq 0x39f(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
callq 0x3430
movq 0xc8(%rsp), %rdx
leaq 0x6740(%rip), %rsi      # 0xa010
leaq 0x3a0(%rsp), %rdi
callq 0x48a0
jmp 0x38df
leaq 0x3c0(%rsp), %rdi
leaq 0x3a0(%rsp), %rsi
callq 0x8890
jmp 0x38f6
leaq 0x3a0(%rsp), %rdi
callq 0x3150
leaq 0x39f(%rsp), %rdi
callq 0x3290
leaq 0x377(%rsp), %rdi
movq %rdi, 0xc0(%rsp)
callq 0x3430
movq 0xc0(%rsp), %rdx
leaq 0x66e0(%rip), %rsi      # 0xa014
leaq 0x378(%rsp), %rdi
callq 0x48a0
jmp 0x3943
leaq 0x377(%rsp), %rdi
callq 0x3290
leaq 0x3c0(%rsp), %rdi
leaq 0x66d0(%rip), %rsi      # 0xa02f
callq 0x30d0
cmpl $0x0, %eax
je 0x3a50
leaq 0x378(%rsp), %rdi
leaq 0x3c0(%rsp), %rsi
callq 0x3050
jmp 0x3984
jmp 0x3a50
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
jmp 0x4792
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
leaq 0x3e0(%rsp), %rdi
callq 0x3150
jmp 0x4792
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
jmp 0x39ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
leaq 0x3a0(%rsp), %rdi
callq 0x3150
leaq 0x39f(%rsp), %rdi
callq 0x3290
jmp 0x4792
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
leaq 0x377(%rsp), %rdi
callq 0x3290
jmp 0x4785
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
jmp 0x4778
leaq 0x32f(%rsp), %rdi
movq %rdi, 0xb8(%rsp)
callq 0x3430
movq 0xb8(%rsp), %rdx
leaq 0x65c0(%rip), %rsi      # 0xa034
leaq 0x330(%rsp), %rdi
callq 0x48a0
jmp 0x3a83
leaq 0x350(%rsp), %rdi
leaq 0x330(%rsp), %rsi
callq 0x8890
jmp 0x3a9a
leaq 0x330(%rsp), %rdi
callq 0x3150
leaq 0x32f(%rsp), %rdi
callq 0x3290
leaq 0x307(%rsp), %rdi
movq %rdi, 0xb0(%rsp)
callq 0x3430
movq 0xb0(%rsp), %rdx
leaq 0x6560(%rip), %rsi      # 0xa038
leaq 0x308(%rsp), %rdi
callq 0x48a0
jmp 0x3ae7
leaq 0x307(%rsp), %rdi
callq 0x3290
leaq 0x350(%rsp), %rdi
leaq 0x652c(%rip), %rsi      # 0xa02f
callq 0x30d0
cmpl $0x0, %eax
je 0x3bb5
leaq 0x308(%rsp), %rdi
leaq 0x350(%rsp), %rsi
callq 0x3050
jmp 0x3b28
jmp 0x3bb5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
jmp 0x3b64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
leaq 0x330(%rsp), %rdi
callq 0x3150
leaq 0x32f(%rsp), %rdi
callq 0x3290
jmp 0x4778
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
leaq 0x307(%rsp), %rdi
callq 0x3290
jmp 0x476b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
jmp 0x475e
leaq 0x2a8(%rsp), %rdi
callq 0x5510
jmp 0x3bc4
leaq 0x267(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
callq 0x3430
movq 0xa8(%rsp), %rdx
leaq 0x6466(%rip), %rsi      # 0xa04e
leaq 0x268(%rsp), %rdi
callq 0x48a0
jmp 0x3bf7
leaq 0x288(%rsp), %rdi
leaq 0x268(%rsp), %rsi
callq 0x8890
jmp 0x3c0e
leaq 0x268(%rsp), %rdi
callq 0x3150
leaq 0x267(%rsp), %rdi
callq 0x3290
leaq 0x23f(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
callq 0x3430
movq 0xa0(%rsp), %rdx
leaq 0x6406(%rip), %rsi      # 0xa052
leaq 0x240(%rsp), %rdi
callq 0x48a0
jmp 0x3c5b
leaq 0x23f(%rsp), %rdi
callq 0x3290
leaq 0x240(%rsp), %rdi
leaq 0x63b8(%rip), %rsi      # 0xa02f
callq 0x30d0
cmpl $0x0, %eax
je 0x3d29
leaq 0x240(%rsp), %rdi
leaq 0x288(%rsp), %rsi
callq 0x3050
jmp 0x3c9c
jmp 0x3d29
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
jmp 0x3cd8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
leaq 0x268(%rsp), %rdi
callq 0x3150
leaq 0x267(%rsp), %rdi
callq 0x3290
jmp 0x4751
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
leaq 0x23f(%rsp), %rdi
callq 0x3290
jmp 0x4744
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
jmp 0x4737
movl $0x7f, 0x238(%rsp)
movl $0x44480000, 0x234(%rsp) # imm = 0x44480000
movl $0x44610000, 0x230(%rsp) # imm = 0x44610000
movl $0x451c4000, 0x22c(%rsp) # imm = 0x451C4000
leaq 0x1e7(%rsp), %rdi
movq %rdi, 0x98(%rsp)
callq 0x3430
movq 0x98(%rsp), %rdx
leaq 0x62e2(%rip), %rsi      # 0xa05b
leaq 0x1e8(%rsp), %rdi
callq 0x48a0
jmp 0x3d88
leaq 0x208(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x8890
jmp 0x3d9f
leaq 0x1e8(%rsp), %rdi
callq 0x3150
leaq 0x1e7(%rsp), %rdi
callq 0x3290
leaq 0x208(%rsp), %rdi
leaq 0x6267(%rip), %rsi      # 0xa02f
callq 0x30d0
cmpl $0x0, %eax
je 0x3e39
leaq 0x208(%rsp), %rdi
callq 0x3100
movq %rax, %rdi
callq 0x3380
movl %eax, 0x238(%rsp)
jmp 0x3e39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
jmp 0x3e27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
leaq 0x1e8(%rsp), %rdi
callq 0x3150
leaq 0x1e7(%rsp), %rdi
callq 0x3290
jmp 0x4737
leaq 0x19f(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0x3430
movq 0x90(%rsp), %rdx
leaq 0x6203(%rip), %rsi      # 0xa060
leaq 0x1a0(%rsp), %rdi
callq 0x48a0
jmp 0x3e6c
leaq 0x1c0(%rsp), %rdi
leaq 0x1a0(%rsp), %rsi
callq 0x8890
jmp 0x3e83
leaq 0x1a0(%rsp), %rdi
callq 0x3150
leaq 0x19f(%rsp), %rdi
callq 0x3290
leaq 0x1c0(%rsp), %rdi
leaq 0x6183(%rip), %rsi      # 0xa02f
callq 0x30d0
cmpl $0x0, %eax
je 0x3f23
leaq 0x1c0(%rsp), %rdi
callq 0x3100
movq %rax, %rdi
callq 0x32f0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x22c(%rsp)
jmp 0x3f23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
jmp 0x3f11
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
leaq 0x1a0(%rsp), %rdi
callq 0x3150
leaq 0x19f(%rsp), %rdi
callq 0x3290
jmp 0x472a
leaq 0x157(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x3430
movq 0x88(%rsp), %rdx
leaq 0x611d(%rip), %rsi      # 0xa064
leaq 0x158(%rsp), %rdi
callq 0x48a0
jmp 0x3f56
leaq 0x178(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x8890
jmp 0x3f6d
leaq 0x158(%rsp), %rdi
callq 0x3150
leaq 0x157(%rsp), %rdi
callq 0x3290
leaq 0x178(%rsp), %rdi
leaq 0x6099(%rip), %rsi      # 0xa02f
callq 0x30d0
cmpl $0x0, %eax
je 0x400d
leaq 0x178(%rsp), %rdi
callq 0x3100
movq %rax, %rdi
callq 0x32f0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x234(%rsp)
jmp 0x400d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
jmp 0x3ffb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x3150
leaq 0x157(%rsp), %rdi
callq 0x3290
jmp 0x471d
leaq 0x10f(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0x3430
movq 0x80(%rsp), %rdx
leaq 0x6038(%rip), %rsi      # 0xa069
leaq 0x110(%rsp), %rdi
callq 0x48a0
jmp 0x4040
leaq 0x130(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x8890
jmp 0x4057
leaq 0x110(%rsp), %rdi
callq 0x3150
leaq 0x10f(%rsp), %rdi
callq 0x3290
leaq 0x130(%rsp), %rdi
leaq 0x5faf(%rip), %rsi      # 0xa02f
callq 0x30d0
cmpl $0x0, %eax
je 0x40f7
leaq 0x130(%rsp), %rdi
callq 0x3100
movq %rax, %rdi
callq 0x32f0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x230(%rsp)
jmp 0x40f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
jmp 0x40e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x3150
leaq 0x10f(%rsp), %rdi
callq 0x3290
jmp 0x4710
leaq 0x2a8(%rsp), %rdi
movss 0x5efd(%rip), %xmm0     # 0xa004
callq 0x4cd0
jmp 0x410e
leaq 0x240(%rsp), %rdi
leaq 0x5f51(%rip), %rsi      # 0xa06e
callq 0x30d0
cmpl $0x0, %eax
jne 0x416d
movl 0x238(%rsp), %esi
movss 0x234(%rsp), %xmm0
movss 0x230(%rsp), %xmm1
leaq 0x2a8(%rsp), %rdi
callq 0x59e0
jmp 0x414f
jmp 0x42a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
jmp 0x4703
leaq 0x240(%rsp), %rdi
leaq 0x5efb(%rip), %rsi      # 0xa077
callq 0x30d0
cmpl $0x0, %eax
jne 0x41aa
movl 0x238(%rsp), %esi
movss 0x22c(%rsp), %xmm0
leaq 0x2a8(%rsp), %rdi
callq 0x5720
jmp 0x41a5
jmp 0x42a7
leaq 0x240(%rsp), %rdi
leaq 0x5e99(%rip), %rsi      # 0xa052
callq 0x30d0
cmpl $0x0, %eax
jne 0x41e7
movl 0x238(%rsp), %esi
movss 0x22c(%rsp), %xmm0
leaq 0x2a8(%rsp), %rdi
callq 0x5870
jmp 0x41e2
jmp 0x42a5
leaq 0x240(%rsp), %rdi
leaq 0x5e89(%rip), %rsi      # 0xa07f
callq 0x30d0
cmpl $0x0, %eax
jne 0x422a
movl 0x238(%rsp), %esi
movss 0x234(%rsp), %xmm0
movss 0x230(%rsp), %xmm1
leaq 0x2a8(%rsp), %rdi
callq 0x5be0
jmp 0x4228
jmp 0x42a3
leaq 0x240(%rsp), %rdi
leaq 0x5e4f(%rip), %rsi      # 0xa088
callq 0x30d0
cmpl $0x0, %eax
jne 0x4254
leaq 0x2a8(%rsp), %rdi
callq 0x5df0
jmp 0x4252
jmp 0x42a1
movq 0x9d6d(%rip), %rdi      # 0xdfc8
leaq 0x5e2c(%rip), %rsi      # 0xa08e
callq 0x3230
movq %rax, 0x78(%rsp)
jmp 0x426e
movq 0x78(%rsp), %rdi
leaq 0x240(%rsp), %rsi
callq 0x3210
movq %rax, 0x70(%rsp)
jmp 0x4287
movq 0x70(%rsp), %rdi
movq 0x9d25(%rip), %rsi      # 0xdfb8
callq 0x3270
jmp 0x429a
xorl %edi, %edi
callq 0x32d0
jmp 0x42a3
jmp 0x42a5
jmp 0x42a7
jmp 0x42a9
leaq 0x308(%rsp), %rdi
leaq 0x5dec(%rip), %rsi      # 0xa0a4
callq 0x30d0
cmpl $0x0, %eax
jne 0x42d6
movq 0x9cff(%rip), %rax      # 0xdfc8
movq %rax, 0x100(%rsp)
jmp 0x437a
movl $0x210, %edi            # imm = 0x210
callq 0x3240
movq %rax, 0x68(%rsp)
jmp 0x42e7
leaq 0x308(%rsp), %rdi
callq 0x3100
movq %rax, 0x58(%rsp)
movl $0x10, %edi
movl $0x4, %esi
callq 0x4960
movl %eax, 0x64(%rsp)
jmp 0x430e
movl 0x64(%rsp), %edx
movq 0x58(%rsp), %rsi
movq 0x68(%rsp), %rdi
callq 0x3330
jmp 0x4323
movq 0x68(%rsp), %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, 0x50(%rsp)
je 0x4343
movq 0x68(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x100(%rsp)
jmp 0x437a
movq 0x68(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
movl $0x210, %esi            # imm = 0x210
callq 0x3250
jmp 0x4703
movss 0x5c86(%rip), %xmm0     # 0xa008
movss %xmm0, 0xf8(%rsp)
leaq 0x378(%rsp), %rdi
leaq 0x5d11(%rip), %rsi      # 0xa0ab
callq 0x30d0
cmpl $0x0, %eax
jne 0x43b8
movq 0x9c35(%rip), %rax      # 0xdfe0
movq %rax, 0xf0(%rsp)
jmp 0x448d
movl $0x210, %edi            # imm = 0x210
callq 0x3240
movq %rax, 0x48(%rsp)
jmp 0x43c9
leaq 0x378(%rsp), %rdi
callq 0x3100
movq %rax, 0x38(%rsp)
movl $0x8, %edi
movl $0x4, %esi
callq 0x4960
movl %eax, 0x44(%rsp)
jmp 0x43f0
movl 0x44(%rsp), %edx
movq 0x38(%rsp), %rsi
movq 0x48(%rsp), %rdi
callq 0x3330
jmp 0x4405
movq 0x48(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rdi
callq 0x33f0
movb %al, 0x37(%rsp)
jmp 0x4425
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0x448b
jmp 0x442f
movq 0x9b92(%rip), %rdi      # 0xdfc8
leaq 0x5c74(%rip), %rsi      # 0xa0b1
callq 0x3230
movq %rax, 0x28(%rsp)
jmp 0x4449
movq 0x28(%rsp), %rdi
movq 0x9b63(%rip), %rsi      # 0xdfb8
callq 0x3270
jmp 0x445c
xorl %edi, %edi
callq 0x32d0
movq 0x48(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x430(%rsp)
movl %eax, 0x42c(%rsp)
movl $0x210, %esi            # imm = 0x210
callq 0x3250
jmp 0x4703
jmp 0x448d
jmp 0x448f
movq 0xf0(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3450
movb %al, 0x27(%rsp)
jmp 0x44ac
movb 0x27(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x44bb
jmp 0x45b2
movq 0xf0(%rsp), %rdi
leaq 0xff(%rsp), %rsi
movl $0x1, %edx
callq 0x3300
jmp 0x44d7
movsbl 0xff(%rsp), %esi
leaq 0x2a8(%rsp), %rdi
callq 0x5580
movb %al, 0x26(%rsp)
jmp 0x44f2
movb 0x26(%rsp), %al
testb $0x1, %al
jne 0x44ff
jmp 0x45ad
leaq 0x2a8(%rsp), %rdi
callq 0x56e0
movss %xmm0, 0x20(%rsp)
jmp 0x4514
movss 0x20(%rsp), %xmm0
movss %xmm0, 0xec(%rsp)
movss 0xf8(%rsp), %xmm1
movss 0xec(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x454c
movss 0xec(%rsp), %xmm0
movss %xmm0, 0xf8(%rsp)
cvttss2si 0xec(%rsp), %eax
movsbl %al, %eax
cvtsi2ss %eax, %xmm0
movss 0xf8(%rsp), %xmm2
movss 0x5a9f(%rip), %xmm1     # 0xa00c
divss %xmm2, %xmm1
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movb %al, 0xff(%rsp)
movq 0x100(%rsp), %rdi
leaq 0xff(%rsp), %rsi
movl $0x1, %edx
callq 0x3320
jmp 0x459c
movq 0x100(%rsp), %rdi
callq 0x3160
jmp 0x45ab
jmp 0x45ad
jmp 0x448f
leaq 0x378(%rsp), %rdi
leaq 0x5aea(%rip), %rsi      # 0xa0ab
callq 0x30d0
cmpl $0x0, %eax
je 0x45dc
movq 0xf0(%rsp), %rdi
callq 0x3070
jmp 0x45da
jmp 0x45dc
leaq 0x308(%rsp), %rdi
leaq 0x5ab9(%rip), %rsi      # 0xa0a4
callq 0x30d0
cmpl $0x0, %eax
je 0x464d
movq 0x100(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x4618
movq 0x18(%rsp), %rax
addq $-0x10, %rax
movq %rax, 0x10(%rsp)
jmp 0x4621
xorl %eax, %eax
movq %rax, 0x10(%rsp)
jmp 0x4621
movq 0x10(%rsp), %rdi
callq 0x3070
jmp 0x462d
movq 0x100(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x464b
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x464d
movl $0x0, 0x4b4(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x3150
leaq 0x178(%rsp), %rdi
callq 0x3150
leaq 0x1c0(%rsp), %rdi
callq 0x3150
leaq 0x208(%rsp), %rdi
callq 0x3150
leaq 0x240(%rsp), %rdi
callq 0x3150
leaq 0x288(%rsp), %rdi
callq 0x3150
leaq 0x2a8(%rsp), %rdi
callq 0x5540
leaq 0x308(%rsp), %rdi
callq 0x3150
leaq 0x350(%rsp), %rdi
callq 0x3150
leaq 0x378(%rsp), %rdi
callq 0x3150
leaq 0x3c0(%rsp), %rdi
callq 0x3150
leaq 0x488(%rsp), %rdi
callq 0x3150
movl 0x4b4(%rsp), %eax
addq $0x4b8, %rsp            # imm = 0x4B8
retq
leaq 0x130(%rsp), %rdi
callq 0x3150
leaq 0x178(%rsp), %rdi
callq 0x3150
leaq 0x1c0(%rsp), %rdi
callq 0x3150
leaq 0x208(%rsp), %rdi
callq 0x3150
leaq 0x240(%rsp), %rdi
callq 0x3150
leaq 0x288(%rsp), %rdi
callq 0x3150
leaq 0x2a8(%rsp), %rdi
callq 0x5540
leaq 0x308(%rsp), %rdi
callq 0x3150
leaq 0x350(%rsp), %rdi
callq 0x3150
leaq 0x378(%rsp), %rdi
callq 0x3150
leaq 0x3c0(%rsp), %rdi
callq 0x3150
leaq 0x488(%rsp), %rdi
callq 0x3150
movq 0x430(%rsp), %rdi
callq 0x3420
nopl (%rax)