// File: gersteinlab[P]MUSIC/src/ms_min_max_utils.cpp
// Function: prune_extrema_derivative_map(std::vector<t_extrema_node*, std::allocator<t_extrema_node*>>*, std::vector<t_extrema_node*, std::allocator<t_extrema_node*>>*, int*, int, int, std::vector<t_extrema_node*, std::allocator<t_extrema_node*>>*, std::vector<t_extrema_node*, std::allocator<t_extrema_node*>>*, int*)
void prune_extrema_derivative_map(vector<t_extrema_node*>* mins,
	vector<t_extrema_node*>* maxes,
	signed int* derivative_map, 
	int l_smallest_side,
	int l_signal, 
	vector<t_extrema_node*>* pruned_mins,
	vector<t_extrema_node*>* pruned_maxes,
	signed int* pruned_derivative_map)
{
	vector<t_extrema_node*>* extrema = new vector<t_extrema_node*>();
	extrema->insert(extrema->end(), mins->begin(), mins->end());
	extrema->insert(extrema->end(), maxes->begin(), maxes->end());

	sort(extrema->begin(), extrema->end(), sort_extremas_per_posn);

	// Copy pruned derivative map.
	for(int i = 0; i < l_signal; i++)
	{
		pruned_derivative_map[i] = derivative_map[i];
	}	
	
	int i_ext = 0;
	while(i_ext < (int)extrema->size()-1)
	{
		int l_cur_side = extrema->at(i_ext+1)->extrema_posn - extrema->at(i_ext)->extrema_posn;

		if(l_cur_side < l_smallest_side)
		{
			if(extrema->at(i_ext)->extrema_type == EXTREMA_MAX)
			{
				// This is from MAX to MIN: Fix the derivative map, do not add these extrema to the pruned list.
if(__DUMP_MIN_MAX_UTILS_MSGS__)
				fprintf(stderr, "Pruning MAX-MIN transition at %d, %d\n",extrema->at(i_ext)->extrema_posn, extrema->at(i_ext+1)->extrema_posn);
				for(int i = extrema->at(i_ext)->extrema_posn; i <= extrema->at(i_ext+1)->extrema_posn; i++)
				{
					if(derivative_map[i] > 0)
					{
						fprintf(stderr, "The derivative is set to negative from max to min transition.\n");
						exit(0);
					}
					else
					{
						pruned_derivative_map[i] = 1;
					}
				} // i loop.
			}
			else if(extrema->at(i_ext)->extrema_type == EXTREMA_MIN)
			{
if(__DUMP_MIN_MAX_UTILS_MSGS__)
				fprintf(stderr, "Pruning MIN-MAX transition at %d, %d\n",extrema->at(i_ext)->extrema_posn, extrema->at(i_ext+1)->extrema_posn);
				// This is from MIN to MAX: Fix the derivative map, do not add these extrema to the pruned list.
				for(int i = extrema->at(i_ext)->extrema_posn; i <= extrema->at(i_ext+1)->extrema_posn; i++)
				{
					if(derivative_map[i] < 0)
					{
						fprintf(stderr, "The derivative is set to negative from max to min transition.\n");
						exit(0);
					}
					else
					{
						pruned_derivative_map[i] = -1;
					}
				} // i loop.
			}

			// Remove the extrema at i_ext and i_ext+1.
			extrema->erase(extrema->begin()+i_ext);
			extrema->erase(extrema->begin()+i_ext);

			// At this point, we are basically at the next element.
		}
		else
		{
			// This side's length is ok. Move to the next side.
			i_ext++;
		}
	} // i_ext loop.

	// Must check whether the last extrema nodes are removed, then make sure those are added for correct tracing.
	if(pruned_derivative_map[0] != 0)
	{
		fprintf(stderr, "The first extrema is removed, adding it back.\n");
		//getc(stdin);

		t_extrema_node* begin_ext_node = new t_extrema_node();
		begin_ext_node->extrema_posn = 0;
		begin_ext_node->extrema_type = EXTREMA_MIN;
		begin_ext_node->higher_node = NULL;
		begin_ext_node->lower_node = NULL;
		begin_ext_node->scale = extrema->at(0)->scale;

		if(pruned_derivative_map[0] > 0)
		{
			// Add a minima to the beginning.
			begin_ext_node->extrema_type = EXTREMA_MIN;
		}
		else if(pruned_derivative_map[0] < 0)
		{
			// Add a maxima to the beginning.
			begin_ext_node->extrema_type = EXTREMA_MAX;
		}

		pruned_derivative_map[0] = 0;
		extrema->push_back(begin_ext_node);
	}

	if(pruned_derivative_map[l_signal-1] != 0)
	{
		fprintf(stderr, "The last extrema is removed, adding it back.\n");
		//getc(stdin);

		t_extrema_node* end_ext_node = new t_extrema_node();
		end_ext_node->extrema_posn = l_signal-1;
		end_ext_node->extrema_type = EXTREMA_MIN;
		end_ext_node->higher_node = NULL;
		end_ext_node->lower_node = NULL;
		end_ext_node->scale = extrema->back()->scale;

		if(pruned_derivative_map[l_signal-1] > 0)
		{
			end_ext_node->extrema_type = EXTREMA_MAX;
		}
		else if(pruned_derivative_map[l_signal-1] < 0)
		{
			end_ext_node->extrema_type = EXTREMA_MIN;
		}

		pruned_derivative_map[l_signal-1] = 0;
		extrema->push_back(end_ext_node);
	}

	// Sort the extrema.
	sort(extrema->begin(), extrema->end(), sort_extremas_per_posn);

	// Separate the total list into two lists.
	for(i_ext = 0; i_ext < (int)extrema->size(); i_ext++)
	{
		if(extrema->at(i_ext)->extrema_type == EXTREMA_MIN)
		{
			pruned_mins->push_back(extrema->at(i_ext));
		}
		else if(extrema->at(i_ext)->extrema_type == EXTREMA_MAX)
		{
			pruned_maxes->push_back(extrema->at(i_ext));
		}
	} // i_ext loop.

	//vector<t_extrema_node*>* all_pruned_nodes = new vector<t_extrema_node*>();
	//all_pruned_nodes->insert(all_pruned_nodes->begin(), pruned_mins->begin(), pruned_mins->end());
	//all_pruned_nodes->insert(all_pruned_nodes->begin(), pruned_maxes->begin(), pruned_maxes->end());

	//sort(all_pruned_nodes->begin(), all_pruned_nodes->end(), sort_extremas);

	// Set the derivative map.
	//int i_cur_nuc = 0;
	for(int i_ext = 0; i_ext < (int)extrema->size(); i_ext++)
	{
		if(i_ext > 0 &&
			extrema->at(i_ext-1)->extrema_type == extrema->at(i_ext)->extrema_type)
		{
			fprintf(stderr, "Consecutive same extrema: %d, %d: %d\n", 
				extrema->at(i_ext-1)->extrema_posn, 
				extrema->at(i_ext)->extrema_posn, 
				extrema->at(i_ext)->extrema_type);
			exit(0);
		}
	} // i_ext loop.
}

// Assembly:
subq $0x1a8, %rsp            # imm = 0x1A8
movq 0x1b8(%rsp), %rax
movq 0x1b0(%rsp), %rax
movq %rdi, 0x1a0(%rsp)
movq %rsi, 0x198(%rsp)
movq %rdx, 0x190(%rsp)
movl %ecx, 0x18c(%rsp)
movl %r8d, 0x188(%rsp)
movq %r9, 0x180(%rsp)
movl $0x18, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x80(%rsp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq 0x80(%rsp), %rdi
callq 0x1ae90
movq 0x80(%rsp), %rax
movq %rax, 0x178(%rsp)
movq 0x178(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x178(%rsp), %rdi
callq 0x1af40
movq %rax, 0x168(%rsp)
leaq 0x170(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0x41c40
movq 0x1a0(%rsp), %rdi
callq 0x1af10
movq %rax, 0x160(%rsp)
movq 0x1a0(%rsp), %rdi
callq 0x1af40
movq 0x88(%rsp), %rdi
movq %rax, 0x158(%rsp)
movq 0x170(%rsp), %rsi
movq 0x160(%rsp), %rdx
movq 0x158(%rsp), %rcx
callq 0x41b80
movq %rax, 0x150(%rsp)
movq 0x178(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x178(%rsp), %rdi
callq 0x1af40
movq %rax, 0x140(%rsp)
leaq 0x148(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x41c40
movq 0x198(%rsp), %rdi
callq 0x1af10
movq %rax, 0x138(%rsp)
movq 0x198(%rsp), %rdi
callq 0x1af40
movq 0x90(%rsp), %rdi
movq %rax, 0x130(%rsp)
movq 0x148(%rsp), %rsi
movq 0x138(%rsp), %rdx
movq 0x130(%rsp), %rcx
callq 0x41b80
movq %rax, 0x128(%rsp)
movq 0x178(%rsp), %rdi
callq 0x1af10
movq %rax, 0x120(%rsp)
movq 0x178(%rsp), %rdi
callq 0x1af40
movq %rax, 0x118(%rsp)
movq 0x120(%rsp), %rdi
movq 0x118(%rsp), %rsi
leaq 0x949(%rip), %rdx       # 0x40960
callq 0x1aec0
movl $0x0, 0x114(%rsp)
movl 0x114(%rsp), %eax
cmpl 0x188(%rsp), %eax
jge 0x40070
movq 0x190(%rsp), %rax
movslq 0x114(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x1b8(%rsp), %rax
movslq 0x114(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x114(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x114(%rsp)
jmp 0x40027
movl $0x0, 0x110(%rsp)
movl 0x110(%rsp), %eax
movl %eax, 0x7c(%rsp)
movq 0x178(%rsp), %rdi
callq 0x1aea0
movq %rax, %rcx
movl 0x7c(%rsp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x4048d
movq 0x178(%rsp), %rdi
movl 0x110(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x1af70
movq (%rax), %rax
movl (%rax), %eax
movl %eax, 0x78(%rsp)
movq 0x178(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x1af70
movq %rax, %rcx
movl 0x78(%rsp), %eax
movq (%rcx), %rcx
subl (%rcx), %eax
movl %eax, 0x10c(%rsp)
movl 0x10c(%rsp), %eax
cmpl 0x18c(%rsp), %eax
jge 0x40477
movq 0x178(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x1af70
movq (%rax), %rax
cmpl $0x0, 0x4(%rax)
jne 0x4024f
testb $0x1, 0x250b6(%rip)     # 0x651e3
je 0x40192
movq 0x24eaa(%rip), %rax     # 0x64fe0
movq (%rax), %rax
movq %rax, 0x68(%rsp)
movq 0x178(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x1af70
movq (%rax), %rax
movl (%rax), %eax
movl %eax, 0x74(%rsp)
movq 0x178(%rsp), %rdi
movl 0x110(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x1af70
movq 0x68(%rsp), %rdi
movl 0x74(%rsp), %edx
movq (%rax), %rax
movl (%rax), %ecx
leaq 0x1670d(%rip), %rsi     # 0x56898
movb $0x0, %al
callq 0x2250
movq 0x178(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x1af70
movq (%rax), %rax
movl (%rax), %eax
movl %eax, 0x108(%rsp)
movl 0x108(%rsp), %eax
movl %eax, 0x64(%rsp)
movq 0x178(%rsp), %rdi
movl 0x110(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x1af70
movq %rax, %rcx
movl 0x64(%rsp), %eax
movq (%rcx), %rcx
cmpl (%rcx), %eax
jg 0x4024a
movq 0x190(%rsp), %rax
movslq 0x108(%rsp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jle 0x4021b
movq 0x24ddd(%rip), %rax     # 0x64fe0
movq (%rax), %rdi
leaq 0x166b1(%rip), %rsi     # 0x568be
movb $0x0, %al
callq 0x2250
xorl %edi, %edi
callq 0x21f0
movq 0x1b8(%rsp), %rax
movslq 0x108(%rsp), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0x40234
movl 0x108(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x108(%rsp)
jmp 0x401b3
jmp 0x40399
movq 0x178(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x1af70
movq (%rax), %rax
cmpl $0x1, 0x4(%rax)
jne 0x40397
testb $0x1, 0x24f6b(%rip)     # 0x651e3
je 0x402dd
movq 0x24d5f(%rip), %rax     # 0x64fe0
movq (%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x178(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x1af70
movq (%rax), %rax
movl (%rax), %eax
movl %eax, 0x60(%rsp)
movq 0x178(%rsp), %rdi
movl 0x110(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x1af70
movq 0x58(%rsp), %rdi
movl 0x60(%rsp), %edx
movq (%rax), %rax
movl (%rax), %ecx
leaq 0x16627(%rip), %rsi     # 0x568fd
movb $0x0, %al
callq 0x2250
movq 0x178(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x1af70
movq (%rax), %rax
movl (%rax), %eax
movl %eax, 0x104(%rsp)
movl 0x104(%rsp), %eax
movl %eax, 0x54(%rsp)
movq 0x178(%rsp), %rdi
movl 0x110(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x1af70
movq %rax, %rcx
movl 0x54(%rsp), %eax
movq (%rcx), %rcx
cmpl (%rcx), %eax
jg 0x40395
movq 0x190(%rsp), %rax
movslq 0x104(%rsp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jge 0x40366
movq 0x24c92(%rip), %rax     # 0x64fe0
movq (%rax), %rdi
leaq 0x16566(%rip), %rsi     # 0x568be
movb $0x0, %al
callq 0x2250
xorl %edi, %edi
callq 0x21f0
movq 0x1b8(%rsp), %rax
movslq 0x104(%rsp), %rcx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
jmp 0x4037f
movl 0x104(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x104(%rsp)
jmp 0x402fe
jmp 0x40397
jmp 0x40399
movq 0x178(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x178(%rsp), %rdi
callq 0x1af10
movq %rax, 0xe8(%rsp)
movslq 0x110(%rsp), %rsi
leaq 0xe8(%rsp), %rdi
callq 0x1c7e0
movq %rax, 0xf0(%rsp)
leaq 0xf8(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x41c40
movq 0x40(%rsp), %rdi
movq 0xf8(%rsp), %rsi
callq 0x41c80
movq %rax, 0xe0(%rsp)
movq 0x178(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x178(%rsp), %rdi
callq 0x1af10
movq %rax, 0xc8(%rsp)
movslq 0x110(%rsp), %rsi
leaq 0xc8(%rsp), %rdi
callq 0x1c7e0
movq %rax, 0xd0(%rsp)
leaq 0xd8(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x41c40
movq 0x48(%rsp), %rdi
movq 0xd8(%rsp), %rsi
callq 0x41c80
movq %rax, 0xc0(%rsp)
jmp 0x40488
movl 0x110(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x110(%rsp)
jmp 0x4007b
movq 0x1b8(%rsp), %rax
cmpl $0x0, (%rax)
je 0x4059f
movq 0x24b3b(%rip), %rax     # 0x64fe0
movq (%rax), %rdi
leaq 0x16474(%rip), %rsi     # 0x56923
movb $0x0, %al
callq 0x2250
movl $0x30, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x38(%rsp)
xorl %esi, %esi
movl $0x30, %edx
callq 0x2110
movq 0x38(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
movl $0x0, (%rax)
movq 0xb8(%rsp), %rax
movl $0x1, 0x4(%rax)
movq 0xb8(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0xb8(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x178(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1af70
movq (%rax), %rax
movl 0x8(%rax), %ecx
movq 0xb8(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x1b8(%rsp), %rax
cmpl $0x0, (%rax)
jle 0x4055e
movq 0xb8(%rsp), %rax
movl $0x1, 0x4(%rax)
jmp 0x4057c
movq 0x1b8(%rsp), %rax
cmpl $0x0, (%rax)
jge 0x4057a
movq 0xb8(%rsp), %rax
movl $0x0, 0x4(%rax)
jmp 0x4057c
movq 0x1b8(%rsp), %rax
movl $0x0, (%rax)
movq 0x178(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x41cf0
movq 0x1b8(%rsp), %rax
movl 0x188(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x406eb
movq 0x24a1b(%rip), %rax     # 0x64fe0
movq (%rax), %rdi
leaq 0x16383(%rip), %rsi     # 0x56952
movb $0x0, %al
callq 0x2250
movl $0x30, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x30(%rsp)
xorl %esi, %esi
movl $0x30, %edx
callq 0x2110
movq 0x30(%rsp), %rax
movq %rax, 0xb0(%rsp)
movl 0x188(%rsp), %ecx
subl $0x1, %ecx
movq 0xb0(%rsp), %rax
movl %ecx, (%rax)
movq 0xb0(%rsp), %rax
movl $0x1, 0x4(%rax)
movq 0xb0(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0xb0(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x178(%rsp), %rdi
callq 0x41d60
movq (%rax), %rax
movl 0x8(%rax), %ecx
movq 0xb0(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x1b8(%rsp), %rax
movl 0x188(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
cmpl $0x0, (%rax,%rcx,4)
jle 0x4068e
movq 0xb0(%rsp), %rax
movl $0x0, 0x4(%rax)
jmp 0x406ba
movq 0x1b8(%rsp), %rax
movl 0x188(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
cmpl $0x0, (%rax,%rcx,4)
jge 0x406b8
movq 0xb0(%rsp), %rax
movl $0x1, 0x4(%rax)
jmp 0x406ba
movq 0x1b8(%rsp), %rax
movl 0x188(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl $0x0, (%rax,%rcx,4)
movq 0x178(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x41cf0
movq 0x178(%rsp), %rdi
callq 0x1af10
movq %rax, 0xa8(%rsp)
movq 0x178(%rsp), %rdi
callq 0x1af40
movq %rax, 0xa0(%rsp)
movq 0xa8(%rsp), %rdi
movq 0xa0(%rsp), %rsi
leaq 0x234(%rip), %rdx       # 0x40960
callq 0x1aec0
movl $0x0, 0x110(%rsp)
movl 0x110(%rsp), %eax
movl %eax, 0x2c(%rsp)
movq 0x178(%rsp), %rdi
callq 0x1aea0
movq %rax, %rcx
movl 0x2c(%rsp), %eax
cmpl %ecx, %eax
jge 0x40819
movq 0x178(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x1af70
movq (%rax), %rax
cmpl $0x1, 0x4(%rax)
jne 0x407b2
movq 0x180(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x178(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x1af70
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x41cf0
jmp 0x40801
movq 0x178(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x1af70
movq (%rax), %rax
cmpl $0x0, 0x4(%rax)
jne 0x407ff
movq 0x1b0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x178(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x1af70
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x41cf0
jmp 0x40801
jmp 0x40803
movl 0x110(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x110(%rsp)
jmp 0x4073c
movl $0x0, 0x9c(%rsp)
movl 0x9c(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x178(%rsp), %rdi
callq 0x1aea0
movq %rax, %rcx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x40949
cmpl $0x0, 0x9c(%rsp)
jle 0x40931
movq 0x178(%rsp), %rdi
movl 0x9c(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x1af70
movq (%rax), %rax
movl 0x4(%rax), %eax
movl %eax, 0x10(%rsp)
movq 0x178(%rsp), %rdi
movslq 0x9c(%rsp), %rsi
callq 0x1af70
movq %rax, %rcx
movl 0x10(%rsp), %eax
movq (%rcx), %rcx
cmpl 0x4(%rcx), %eax
jne 0x40931
movq 0x24734(%rip), %rax     # 0x64fe0
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x178(%rsp), %rdi
movl 0x9c(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x1af70
movq (%rax), %rax
movl (%rax), %eax
movl %eax, 0x8(%rsp)
movq 0x178(%rsp), %rdi
movslq 0x9c(%rsp), %rsi
callq 0x1af70
movq (%rax), %rax
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x178(%rsp), %rdi
movslq 0x9c(%rsp), %rsi
callq 0x1af70
movq (%rsp), %rdi
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %ecx
movq (%rax), %rax
movl 0x4(%rax), %r8d
leaq 0x1605d(%rip), %rsi     # 0x56980
movb $0x0, %al
callq 0x2250
xorl %edi, %edi
callq 0x21f0
jmp 0x40933
movl 0x9c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x9c(%rsp)
jmp 0x40824
addq $0x1a8, %rsp            # imm = 0x1A8
retq
nopw %cs:(%rax,%rax)