// File: /workspace/github_c_makefile_star2_O2/DrYerzinia[P]C_DigiMode/src/NOAA_ATP/NOAA_ATP.cpp
// Function: NOAA_ATP::proccess_byte(char)
bool NOAA_ATP::proccess_byte(char input_data_point){

	ef_buffer.push_back(input_data_point);

	if(ef_buffer.size() > sample_rate/(NOAA_SUBCARRIER_FREQ)){

		char max = 0;
		for(std::list<char>::iterator it = ef_buffer.begin(); it != ef_buffer.end(); it++){
			char val = std::abs(*it);
			if(val > max) max = val;
		}

		envelope_follower_out.push_back(max);
		sample_count++;

		if(max > 64) max = 1;
		else max = 0;
		sync_pulse_detect_buf.push_back(max);

		bool sync_a_detected = false;
		bool sync_b_detected = false;

		if(sync_pulse_detect_buf.size() > 7.0*sample_rate/SYNC_B_FREQ+10){
			int last_state = (*sync_pulse_detect_buf.begin());
			int count_p_high = 0;
			int count_p_low = 0;
			int count_high = 0;
			int p_count_last = 0;
			int count_low = 0;
			int count_sample = 0;
			bool start_count = false;
			for(std::list<char>::iterator it = sync_pulse_detect_buf.begin(); it != sync_pulse_detect_buf.end(); it++){
				if((*it) != last_state){
					if(last_state == 0){
						count_low++;
						start_count = true;
					} else {
						if(start_count) count_high++;
					}
					last_state = *it;
					p_count_last = 0;
				}
				if(start_count){
					if((*it) == 0){
						count_p_low++;
					} else {
						count_p_high++;
					}
				}
				if(start_count){
					if(p_count_last > 14) break;
					p_count_last++;
				}
				if(count_high == 7){
					float pulse_average = float(count_p_high)/float(count_p_low);
					if((std::abs(count_sample-(7.0*sample_rate/SYNC_A_FREQ)) < detection_threshold+4)
					&& (pulse_average > 2.0-(detection_threshold/4.0))){
						sync_a_detected = true;
					}
					if((std::abs(count_sample-(7.0*sample_rate/SYNC_B_FREQ)) < detection_threshold+4)
					&& (pulse_average > 2.0-(detection_threshold/4.0))){
						sync_b_detected = true;
					}
					//std::cout << "thrsh: " << std::abs(count_sample-(7.0*sample_rate/SYNC_B_FREQ)) << ", PA: " << pulse_average << std::endl;
					//std::cout << envelope_follower_out.size() << ", " << count_sample << std::endl;
					break;
				}
				if(start_count) count_sample++;
			}
			sync_pulse_detect_buf.pop_front();
		}

		if(sync_a_detected && (sync_a_positions.empty() || (sample_count-(*(sync_a_positions.rbegin())) > 110)))
			sync_a_positions.push_back(sample_count);
		if(sync_b_detected && (sync_b_positions.empty() || (sample_count-(*(sync_b_positions.rbegin())) > 110)))
			sync_b_positions.push_back(sample_count);

		if(sync_a_positions.size() >= 10){
			int prob_arr[10][2];
			int count = 0;

			for(std::list<int>::iterator it = sync_a_positions.begin(); it != sync_a_positions.end(); it++, count++)
				prob_arr[count][0] = *it;

			for(int i = 0; i < 10; i++)
				prob_arr[i][1] = 0;

			for(int i = 0; i < 10; i++){
				for(int j = 0; j < 10; j++){
					prob_arr[i][1] += int(std::abs(prob_arr[i][0]-prob_arr[j][0]))%int(sample_rate/2);
				}
			}

			std::list<int>::iterator it_sap = sync_a_positions.begin();
			for(int i = 0; i < 10; i++){
				if(prob_arr[i][1] > sample_rate/8){
					it_sap = sync_a_positions.erase(it_sap);
				} else it_sap++;
			}

			if(!sync_a_positions.empty()){
				sync_a_positions_cnf.push_back(sync_a_positions.front());
				sync_a_positions.pop_front();
			}

		}

		if(sync_b_positions.size() >= 10){
			int prob_arr[10][2];
			int count = 0;

			for(std::list<int>::iterator it = sync_b_positions.begin(); it != sync_b_positions.end(); it++, count++)
				prob_arr[count][0] = *it;

			for(int i = 0; i < 10; i++)
				prob_arr[i][1] = 0;

			for(int i = 0; i < 10; i++){
				for(int j = 0; j < 10; j++){
					prob_arr[i][1] += int(std::abs(prob_arr[i][0]-prob_arr[j][0]))%int(sample_rate/2);
				}
			}

			std::list<int>::iterator it_sap = sync_b_positions.begin();
			for(int i = 0; i < 10; i++){
				if(prob_arr[i][1] > sample_rate/8){
					it_sap = sync_b_positions.erase(it_sap);
				} else it_sap++;
			}

			if(!sync_b_positions.empty()){
				sync_b_positions_cnf.push_back(sync_b_positions.front());
				sync_b_positions.pop_front();
			}

		}

		if(sync_b_positions_cnf.size() >= 2){

			int cnf_sync_pos = sync_b_positions_cnf.front()-int(7.0*sample_rate/SYNC_B_FREQ+10);
			std::cout << "CSP: " << cnf_sync_pos << std::endl;
			while(cnf_sync_pos > input_buffer_start){

				int front_sync_offset = (cnf_sync_pos-input_buffer_start)%int(sample_rate/2);

				std::cout << "IBS: " << input_buffer_start << std::endl;
				std::cout << "FSO: " << front_sync_offset << std::endl;

				if(front_sync_offset != 0){

					std::list<char>::iterator it_efb_ers = envelope_follower_out.begin();
					std::advance(it_efb_ers,front_sync_offset);

					envelope_follower_out.erase(envelope_follower_out.begin(), it_efb_ers);

					input_buffer_start += front_sync_offset;

				}

				std::vector<char> nextLine;
				std::list<char>::iterator it_efb = envelope_follower_out.begin();
				if(cnf_sync_pos - input_buffer_start >= int(sample_rate/2)){

					for(int i = 0; i < int(sample_rate/2); i++){
						nextLine.push_back(*it_efb);
						it_efb++;
					}

					input_buffer_start += int(sample_rate/2);
					line_data.push_back(nextLine);

					envelope_follower_out.erase(envelope_follower_out.begin(), it_efb);

				} else {

					int excess_buffer = cnf_sync_pos - input_buffer_start;

					std::cout << "EB : " << excess_buffer << std::endl;

					std::list<char>::iterator it_efb_ers = envelope_follower_out.begin();
					std::advance(it_efb_ers, excess_buffer);

					envelope_follower_out.erase(envelope_follower_out.begin(), it_efb_ers);	

					input_buffer_start += excess_buffer;

				}

			}

			sync_b_positions_cnf.pop_front();

			int cnf_sync_pos_2 = sync_b_positions_cnf.front()-int(7.0*sample_rate/SYNC_B_FREQ+10);

			int data_in_frames = cnf_sync_pos_2-cnf_sync_pos;

			std::cout << "SNCDIF: " << data_in_frames << std::endl;

			int frames = int(((data_in_frames)/(sample_rate/2))+0.5);

			std::cout << "FRAMES: " << frames << std::endl;

			std::cout << "IBS2: " << input_buffer_start << std::endl;

			int count_total = 0;
			for(int i = 0; i < frames; i++){

				std::list<char>::iterator it_efb = envelope_follower_out.begin();
				std::vector<char> nextLine;
				for(int i = 0; i < int(sample_rate/2); i++){

					if(count_total < data_in_frames){
						nextLine.push_back(*it_efb);
						it_efb++;
					} else {
						nextLine.push_back(0);
					}

					count_total++;

				}

				input_buffer_start += int(sample_rate/2);
				line_data.push_back(nextLine);

				envelope_follower_out.erase(envelope_follower_out.begin(), it_efb);

			}

		}

		ef_buffer.pop_front();

	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x7(%rsp), %rax
movb %sil, (%rax)
leaq 0x28(%rdi), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x34a6
xorl %edx, %edx
movq %r14, %rax
movl %edx, %ecx
movq (%rax), %rax
cmpq %r14, %rax
je 0x2cb5
movb 0x10(%rax), %dl
movl %edx, %esi
sarb $0x7, %sil
xorb %sil, %dl
subb %sil, %dl
cmpb %cl, %dl
jle 0x2c98
jmp 0x2c96
movq %r14, 0x80(%rsp)
leaq 0x6(%rsp), %r15
movb %cl, (%r15)
leaq 0x40(%rbx), %rbp
movq %rbp, %rdi
movq %r15, %rsi
callq 0x34a6
incl (%rbx)
cmpb $0x41, (%r15)
setge (%r15)
leaq 0x58(%rbx), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x34a6
movsd 0x68(%rbx), %xmm0
unpcklps 0x2397(%rip), %xmm0     # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x239f(%rip), %xmm0     # 0x50a0
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
cvtss2sd 0x8(%rbx), %xmm1
mulsd 0x23ba(%rip), %xmm1     # 0x50d0
addsd %xmm0, %xmm2
movapd %xmm1, %xmm0
divsd 0x23b2(%rip), %xmm0     # 0x50d8
movsd 0x23b2(%rip), %xmm3     # 0x50e0
addsd %xmm0, %xmm3
ucomisd %xmm3, %xmm2
movq %rbp, 0x8(%rsp)
jbe 0x2ede
movq (%r12), %rax
movsbl 0x10(%rax), %r10d
xorl %edx, %edx
pushq $0x1
popq %rsi
xorl %ecx, %ecx
xorl %r9d, %r9d
xorl %ebp, %ebp
xorl %edi, %edi
xorl %r8d, %r8d
cmpq %r12, %rax
je 0x2ddb
movsbl 0x10(%rax), %r11d
cmpl %r11d, %r10d
jne 0x2d7a
testb $0x1, %dl
je 0x2dc8
movl %ebp, %r15d
cmpl $0xe, %r9d
jle 0x2da1
jmp 0x2ddb
movzbl %dl, %r9d
andb $0x1, %dl
testl %r10d, %r10d
cmovel %esi, %r9d
movzbl %dl, %r15d
movl %r9d, %edx
cmovel %r10d, %r15d
addl %ebp, %r15d
xorl %r9d, %r9d
movl %r11d, %r10d
testb $0x1, %dl
je 0x2dbc
xorl %ebp, %ebp
xorl %r13d, %r13d
testb %r11b, %r11b
sete %bpl
setne %r13b
addl %r13d, %r8d
addl %ebp, %edi
incl %r9d
movl %r10d, %r11d
cmpl $0x7, %r15d
je 0x2de5
movl %r15d, %ebp
movl %r11d, %r10d
movl %edx, %r11d
andb $0x1, %r11b
movzbl %r11b, %r11d
addl %r11d, %ecx
movq (%rax), %rax
jmp 0x2d5b
xorl %ebp, %ebp
xorl %r15d, %r15d
jmp 0x2e7e
cvtsi2ss %r8d, %xmm3
cvtsi2ss %edi, %xmm4
cvtsi2sd %ecx, %xmm2
divsd 0x22ee(%rip), %xmm1     # 0x50e8
divss %xmm4, %xmm3
addsd %xmm2, %xmm1
andpd 0x22a6(%rip), %xmm1     # 0x50b0
movss 0xc(%rbx), %xmm5
movss 0x22f1(%rip), %xmm4     # 0x5108
addss %xmm5, %xmm4
cvtss2sd %xmm4, %xmm4
ucomisd %xmm1, %xmm4
cvtss2sd %xmm3, %xmm1
cvtss2sd %xmm5, %xmm3
jbe 0x2e4c
movsd 0x22bb(%rip), %xmm5     # 0x50f0
mulsd %xmm3, %xmm5
addsd 0x22b7(%rip), %xmm5     # 0x50f8
ucomisd %xmm5, %xmm1
jbe 0x2e4c
movb $0x1, %r15b
jmp 0x2e4f
xorl %r15d, %r15d
subsd %xmm0, %xmm2
andpd 0x2255(%rip), %xmm2     # 0x50b0
ucomisd %xmm2, %xmm4
jbe 0x2e7c
mulsd 0x2287(%rip), %xmm3     # 0x50f0
addsd 0x2287(%rip), %xmm3     # 0x50f8
ucomisd %xmm3, %xmm1
jbe 0x2e7c
movb $0x1, %bpl
jmp 0x2e7e
xorl %ebp, %ebp
movq %r12, %rdi
callq 0x34b2
testb %r15b, %r15b
je 0x2eab
leaq 0x70(%rbx), %rdi
cmpq %rdi, 0x70(%rbx)
je 0x2ea3
movl (%rbx), %eax
movq 0x78(%rbx), %rcx
subl 0x10(%rcx), %eax
cmpl $0x6f, %eax
jl 0x2eab
movq %rbx, %rsi
callq 0x34ba
testb %bpl, %bpl
movq 0x8(%rsp), %rbp
je 0x2ede
leaq 0x88(%rbx), %rdi
cmpq %rdi, 0x88(%rbx)
je 0x2ed6
movl (%rbx), %eax
movq 0x90(%rbx), %rcx
subl 0x10(%rcx), %eax
cmpl $0x6f, %eax
jl 0x2ede
movq %rbx, %rsi
callq 0x34ba
cmpq $0xa, 0x80(%rbx)
jb 0x2fd9
leaq 0x70(%rbx), %r12
movq (%r12), %rsi
leaq 0x30(%rsp), %rax
movq %rsi, %rcx
cmpq %r12, %rcx
je 0x2f0f
movl 0x10(%rcx), %edx
movl %edx, (%rax)
movq (%rcx), %rcx
addq $0x8, %rax
jmp 0x2efc
pushq $0x4
popq %rax
cmpq $0x54, %rax
je 0x2f23
andl $0x0, 0x30(%rsp,%rax)
addq $0x8, %rax
jmp 0x2f12
movss 0x8(%rbx), %xmm0
mulss 0x21dc(%rip), %xmm0     # 0x510c
cvttss2si %xmm0, %ecx
xorl %edi, %edi
cmpq $0xa, %rdi
je 0x2f73
movl 0x30(%rsp,%rdi,8), %r9d
movl 0x34(%rsp,%rdi,8), %r8d
xorl %r10d, %r10d
cmpq $0xa, %r10
je 0x2f69
movl %r9d, %edx
subl 0x30(%rsp,%r10,8), %edx
movl %edx, %eax
negl %eax
cmovsl %edx, %eax
cltd
idivl %ecx
addl %edx, %r8d
incq %r10
jmp 0x2f49
movl %r8d, 0x34(%rsp,%rdi,8)
incq %rdi
jmp 0x2f36
pushq $0x4
popq %r15
movss 0x2191(%rip), %xmm2     # 0x5110
cmpq $0x54, %r15
je 0x2fb8
cvtsi2ssl 0x30(%rsp,%r15), %xmm0
movss 0x8(%rbx), %xmm1
mulss %xmm2, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x2faf
movq %r12, %rdi
callq 0x34c6
movss 0x2166(%rip), %xmm2     # 0x5110
movq %rax, %rsi
jmp 0x2fb2
movq (%rsi), %rsi
addq $0x8, %r15
jmp 0x2f7f
movq (%r12), %rsi
cmpq %r12, %rsi
je 0x2fd9
leaq 0xa0(%rbx), %rdi
addq $0x10, %rsi
callq 0x34ba
movq %r12, %rdi
callq 0x34d4
cmpq $0xa, 0x98(%rbx)
jb 0x30d5
leaq 0x30(%rsp), %rcx
pushq $0x4
popq %rax
leaq 0x88(%rbx), %r12
movq (%r12), %rsi
movq %rsi, %rdx
cmpq %r12, %rdx
je 0x3019
movl 0x10(%rdx), %edi
movl %edi, (%rcx)
movq (%rdx), %rdx
addq $0x8, %rcx
jmp 0x2ffd
andl $0x0, 0x30(%rsp,%rax)
addq $0x8, %rax
cmpq $0x54, %rax
jne 0x3010
movss 0x8(%rbx), %xmm0
mulss 0x20e0(%rip), %xmm0     # 0x510c
cvttss2si %xmm0, %ecx
xorl %edi, %edi
cmpq $0xa, %rdi
je 0x306f
movl 0x30(%rsp,%rdi,8), %r9d
movl 0x34(%rsp,%rdi,8), %r8d
xorl %r10d, %r10d
cmpq $0xa, %r10
je 0x3065
movl %r9d, %edx
subl 0x30(%rsp,%r10,8), %edx
movl %edx, %eax
negl %eax
cmovsl %edx, %eax
cltd
idivl %ecx
addl %edx, %r8d
incq %r10
jmp 0x3045
movl %r8d, 0x34(%rsp,%rdi,8)
incq %rdi
jmp 0x3032
pushq $0x4
popq %r15
movss 0x2095(%rip), %xmm2     # 0x5110
cmpq $0x54, %r15
je 0x30b4
cvtsi2ssl 0x30(%rsp,%r15), %xmm0
movss 0x8(%rbx), %xmm1
mulss %xmm2, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x30ab
movq %r12, %rdi
callq 0x34c6
movss 0x206a(%rip), %xmm2     # 0x5110
movq %rax, %rsi
jmp 0x30ae
movq (%rsi), %rsi
addq $0x8, %r15
jmp 0x307b
movq (%r12), %rsi
cmpq %r12, %rsi
je 0x30d5
leaq 0xb8(%rbx), %rdi
addq $0x10, %rsi
callq 0x34ba
movq %r12, %rdi
callq 0x34d4
cmpq $0x2, 0xc8(%rbx)
jb 0x346e
leaq 0xb8(%rbx), %rax
movq %rax, 0x18(%rsp)
movq 0xb8(%rbx), %rax
cvtss2sd 0x8(%rbx), %xmm0
mulsd 0x1fcd(%rip), %xmm0     # 0x50d0
divsd 0x1fcd(%rip), %xmm0     # 0x50d8
addsd 0x1fcd(%rip), %xmm0     # 0x50e0
movl 0x10(%rax), %r13d
cvttsd2si %xmm0, %eax
subl %eax, %r13d
movq 0x4ea3(%rip), %rdi      # 0x7fc8
leaq 0x1fe8(%rip), %rsi      # 0x5114
callq 0x21a0
movq %rax, %rdi
movl %r13d, %esi
callq 0x2310
movq %rax, %rdi
callq 0x20f0
leaq 0x10(%rbx), %rax
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %r12
movl %r13d, %eax
subl 0x4(%rbx), %eax
jle 0x32de
movq %rbp, %r14
movss 0x8(%rbx), %xmm0
mulss 0x1f9e(%rip), %xmm0     # 0x510c
cvttss2si %xmm0, %ecx
cltd
idivl %ecx
movl %edx, %r15d
movq 0x4e49(%rip), %rbp      # 0x7fc8
movq %rbp, %rdi
leaq 0x1f91(%rip), %rsi      # 0x511a
callq 0x21a0
movl 0x4(%rbx), %esi
movq %rax, %rdi
callq 0x2310
movq %rax, %rdi
callq 0x20f0
movq %rbp, %rdi
leaq 0x1f75(%rip), %rsi      # 0x5120
callq 0x21a0
movq %rax, %rdi
movl %r15d, %esi
callq 0x2310
movq %rax, %rdi
callq 0x20f0
testl %r15d, %r15d
je 0x31f7
movq 0x40(%rbx), %rax
movq %rax, 0x30(%rsp)
movq %r12, %rdi
movl %r15d, %esi
callq 0x34dc
movq 0x40(%rbx), %rsi
movq 0x30(%rsp), %rdx
movq %r14, %rdi
callq 0x34e4
addl 0x4(%rbx), %r15d
movl %r15d, 0x4(%rbx)
jmp 0x31fb
movl 0x4(%rbx), %r15d
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
movl %r13d, %ebp
subl %r15d, %ebp
movss 0x8(%rbx), %xmm0
movaps %xmm0, %xmm1
mulss 0x1eed(%rip), %xmm1     # 0x510c
cvttss2si %xmm1, %eax
cmpl %eax, %ebp
jge 0x327e
movq 0x4d9a(%rip), %rdi      # 0x7fc8
leaq 0x1ef1(%rip), %rsi      # 0x5126
callq 0x21a0
movq %rax, %rdi
movl %ebp, %esi
callq 0x2310
movq %rax, %rdi
callq 0x20f0
movq 0x8(%rsp), %r15
movq (%r15), %rax
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
movl %ebp, %esi
callq 0x34dc
movq 0x40(%rbx), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x34e4
addl %ebp, 0x4(%rbx)
movq %r15, %rbp
jmp 0x32d1
xorl %ebp, %ebp
movq 0x8(%rsp), %r15
movq (%r15), %r15
mulss 0x1e7c(%rip), %xmm0     # 0x510c
cvttss2si %xmm0, %eax
cmpl %eax, %ebp
jge 0x32ad
leaq 0x10(%r15), %rsi
movq %r12, %rdi
callq 0x350c
incl %ebp
movss 0x8(%rbx), %xmm0
jmp 0x3285
addl %eax, 0x4(%rbx)
movq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x3526
movq 0x8(%rsp), %rbp
movq (%rbp), %rsi
movq %rbp, %rdi
movq %r15, %rdx
callq 0x34e4
movq %r12, %rdi
callq 0x37b6
jmp 0x3152
movq 0x18(%rsp), %rdi
callq 0x34d4
movq 0xb8(%rbx), %rax
movl 0x10(%rax), %r14d
cvtss2sd 0x8(%rbx), %xmm0
mulsd 0x1dd0(%rip), %xmm0     # 0x50d0
divsd 0x1dd0(%rip), %xmm0     # 0x50d8
addsd 0x1dd0(%rip), %xmm0     # 0x50e0
cvttsd2si %xmm0, %eax
addl %eax, %r13d
subl %r13d, %r14d
movq 0x4ca7(%rip), %r15      # 0x7fc8
leaq 0x1e04(%rip), %rsi      # 0x512c
movq %r15, %rdi
callq 0x21a0
movq %rax, %rdi
movl %r14d, %esi
callq 0x2310
movq %rax, %rdi
callq 0x20f0
cvtsi2ss %r14d, %xmm0
movss 0x8(%rbx), %xmm1
mulss 0x1db7(%rip), %xmm1     # 0x510c
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
addsd 0x1d9b(%rip), %xmm0     # 0x5100
cvttsd2si %xmm0, %r12d
leaq 0x1dc4(%rip), %rsi      # 0x5135
movq %r15, %rdi
callq 0x21a0
movq %rax, %rdi
movl %r12d, %esi
callq 0x2310
movq %rax, %rdi
callq 0x20f0
leaq 0x1dab(%rip), %rsi      # 0x513e
movq %r15, %rdi
callq 0x21a0
movl 0x4(%rbx), %esi
movq %rax, %rdi
callq 0x2310
movq %rax, %rdi
callq 0x20f0
xorl %r15d, %r15d
testl %r12d, %r12d
cmovlel %r15d, %r12d
movl %r12d, 0x24(%rsp)
xorl %eax, %eax
cmpl 0x24(%rsp), %eax
je 0x346e
movl %eax, 0x18(%rsp)
movq (%rbp), %rbp
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
xorl %r13d, %r13d
leal (%r15,%r13), %r12d
movss 0x8(%rbx), %xmm0
mulss 0x1d17(%rip), %xmm0     # 0x510c
cvttss2si %xmm0, %eax
cmpl %eax, %r13d
jge 0x3430
cmpl %r14d, %r12d
jge 0x3417
leaq 0x10(%rbp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x350c
movq (%rbp), %rbp
jmp 0x342b
movb $0x0, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3a4e
incl %r13d
jmp 0x33e4
addl %eax, 0x4(%rbx)
movq 0x28(%rsp), %rdi
leaq 0x30(%rsp), %r15
movq %r15, %rsi
callq 0x3526
movq 0x8(%rsp), %rdi
movq (%rdi), %rsi
movq %rbp, %rdx
movq %rdi, %rbp
callq 0x34e4
movq %r15, %rdi
callq 0x37b6
movl 0x18(%rsp), %eax
incl %eax
movl %r12d, %r15d
jmp 0x33bf
movq 0x80(%rsp), %rdi
callq 0x34b2
jmp 0x3487
jmp 0x3487
jmp 0x3487
jmp 0x3487
jmp 0x3487
jmp 0x3487
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x37b6
movq %rbx, %rdi
callq 0x2320