// File: /workspace/github_c_makefile_star2_O0/MikeGray-APH[P]LibLouisAPH/source/pattern.c
// Function: pattern_check_expression
static int pattern_check_expression(
	const unichar * const input,
	int *input_crs,
	const int input_minmax,
	const int input_dir,
	const unichar * const expr_data,
	struct subpattern *subpatterns,
	int expr_crs,
	int not,
	int loop_crs,
	int *loop_cnts)
{
	struct subpattern *subpattern;
	int input_crs_prv, input_start, loop_crs_prv, loop_cnt_prv, ret;

	loop_crs_prv =
	loop_cnt_prv = 0;

	/*   save input_crs to know if loop consumed input   */
	input_start = *input_crs;

	CHECK_OUTPUT(START, 0, "check start")

	while(EXPR_TYPE(expr_crs) != PTN_END)
	{
		/*   end of input expression   */
		if(EXPR_TYPE(expr_crs) == PTN_END_OF_INPUT)
		if(*input_crs * input_dir >= input_minmax * input_dir)
		{
			if(not)
				CHECK_OUTPUT(RETURN, 0, "end of input failed:  no input and not ")
			else
				CHECK_OUTPUT(RETURN, 1, "end of input passed:  no input")
			return !not;
		}
		else
		{
			if(not)
				CHECK_OUTPUT(RETURN, 1, "end of input passed:  input and not")
			else
				CHECK_OUTPUT(RETURN, 0, "end of input failed:  input")
			return not;
		}

		/*   no more input   */
		if(*input_crs * input_dir >= input_minmax * input_dir)
		{
			switch(EXPR_TYPE(expr_crs))
			{
			case PTN_ATTRIBUTES:
			case PTN_ANY:
			case PTN_CHARS:

				CHECK_OUTPUT(RETURN, 0, "chars failed:  no input")
				return 0;
			}
		}

		switch(EXPR_TYPE(expr_crs))
		{

		case PTN_START:

			expr_crs = EXPR_NXT(expr_crs);
			break;

		case PTN_GROUP:

			CHECK_OUTPUT(SHOW, 0, "group start")
			expr_crs = EXPR_DATA_0(expr_crs);
			break;

		case PTN_NOT:

			CHECK_OUTPUT(SHOW, 0, "not start")
			not = !not;
			expr_crs = EXPR_DATA_0(expr_crs);
			break;

		case PTN_ONE_MORE:
		case PTN_ZERO_MORE:

			/*   check if loop already started   */
			if(expr_crs == loop_crs)
			{
				loop_cnts[EXPR_DATA_1(loop_crs)]++;
				CHECK_OUTPUT(SHOW, 0, "loop again")
			}
			else
			{
				/*   start loop   */
				loop_crs_prv = loop_crs;
				loop_crs = expr_crs;
				loop_cnt_prv = loop_cnts[EXPR_DATA_1(loop_crs)];
				loop_cnts[EXPR_DATA_1(loop_crs)] = 1;

#ifdef PATTERN_OUTPUT_TRACE
				if(EXPR_TYPE(expr_crs) == PTN_ONE_MORE)
					CHECK_OUTPUT(SHOW, 0, "loop+ start")
				else
					CHECK_OUTPUT(SHOW, 0, "loop start")
#endif
			}

			/*   start loop expression   */
			input_crs_prv = *input_crs;
			ret = pattern_check_expression(input, input_crs, input_minmax, input_dir, expr_data, subpatterns, EXPR_DATA_0(expr_crs), not, loop_crs, loop_cnts);
			if(ret)
			{
				CHECK_OUTPUT(RETURN, 1, "loop passed")
				return 1;
			}
			if(EXPR_TYPE(expr_crs) != PTN_ONE_MORE)
				CHECK_OUTPUT(SHOW, 0, "loop failed")
			*input_crs = input_crs_prv;

			/*   check loop count   */
			loop_cnts[EXPR_DATA_1(loop_crs)]--;
			if(EXPR_TYPE(expr_crs) == PTN_ONE_MORE)
			{
				if(loop_cnts[EXPR_DATA_1(loop_crs)] < 1)
				{
					CHECK_OUTPUT(RETURN, 0, "loop+ failed")
					return 0;
				}
				else
					CHECK_OUTPUT(SHOW, 0, "loop+ passed")
			}

			/*   continue after loop   */
			loop_cnts[EXPR_DATA_1(loop_crs)] = loop_cnt_prv;
			loop_crs = loop_crs_prv;

			expr_crs = EXPR_NXT(expr_crs);
			break;

		case PTN_OPTIONAL:

			/*   save current state   */
			input_crs_prv = *input_crs;

			/*   start optional expression   */
			CHECK_OUTPUT(CALL, 0, "option start")
			if(pattern_check_expression(input, input_crs, input_minmax, input_dir, expr_data, subpatterns, EXPR_DATA_0(expr_crs), not, loop_crs, loop_cnts))
			{
				CHECK_OUTPUT(RETURN, 1, "option passed")
				return 1;
			}
			CHECK_OUTPUT(SHOW, 0, "option failed")

			/*   continue after optional expression   */
			*input_crs = input_crs_prv;
			CHECK_OUTPUT(SHOW, 0, "no option start")
			expr_crs = EXPR_NXT(expr_crs);
			break;

		case PTN_ALTERNATE:

			/*   save current state   */
			input_crs_prv = *input_crs;

			/*   start first expression   */
			CHECK_OUTPUT(CALL, 0, "or 1 start")
			if(pattern_check_expression(input, input_crs, input_minmax, input_dir, expr_data, subpatterns, EXPR_DATA_0(expr_crs), not, loop_crs, loop_cnts))
			{
				CHECK_OUTPUT(RETURN, 1, "or 1 passed")
				return 1;
			}
			CHECK_OUTPUT(SHOW, 0, "or 1 failed")

			/*   start second expression (no need to push)   */
			*input_crs = input_crs_prv;
			CHECK_OUTPUT(SHOW, 1, "or 2 start")
			expr_crs = EXPR_DATA_1(expr_crs);
			break;

		case PTN_ANY:

			CHECK_OUTPUT(SHOW, 0, "any")
			*input_crs += input_dir;
			expr_crs = EXPR_NXT(expr_crs);
			break;

		case PTN_ATTRIBUTES:

			ret = pattern_check_attrs(input[*input_crs], EXPR_CONST_DATA(expr_crs));
			if(ret && not)
			{
				CHECK_OUTPUT(RETURN, 0, "attributes failed:  not");
				return 0;
			}
			if(!ret && !not)
			{
				CHECK_OUTPUT(RETURN, 0, "attributes failed");
				return 0;
			}
			CHECK_OUTPUT(SHOW, 0, "attributes passed")
			*input_crs += input_dir;
			expr_crs = EXPR_NXT(expr_crs);
			break;

		case PTN_CHARS:

			ret = pattern_check_chars(input[*input_crs], EXPR_CONST_DATA(expr_crs));
			if(ret && not)
			{
				CHECK_OUTPUT(RETURN, 0, "chars failed:  not");
				return 0;
			}
			if(!ret && !not)
			{
				CHECK_OUTPUT(RETURN, 0, "chars failed");
				return 0;
			}
			CHECK_OUTPUT(SHOW, 0, "chars passed")
			*input_crs += input_dir;
			expr_crs = EXPR_NXT(expr_crs);
			break;

		case PTN_SUBPATTERN:

			if(subpatterns == NULL)
			{
				CHECK_OUTPUT(RETURN, 0, "subpatterns failed:  NULL");
				return 0;
			}

			subpattern = subpattern_find(subpatterns, EXPR_CONST_DATA(expr_crs + 1), EXPR_DATA_0(expr_crs));
			if(!subpattern)
			{
				CHECK_OUTPUT(RETURN, 0, "subpattern failed:  NULL");
				return 0;
			}
			if(subpattern->processing)
			{
				CHECK_OUTPUT(RETURN, 0, "subpattern failed:  recursive");
				return 0;
			}

			/*   call subpattern   */
			subpattern->processing = 1;
			subpattern_level++;
			ret = subpattern_check(input, input_crs, input_minmax, input_dir, subpattern->expr_data, subpatterns);
			subpattern->processing = 0;
			subpattern_level--;
			if(ret && not)
			{
				CHECK_OUTPUT(RETURN, 0, "subpattern failed:  not");
				return 0;
			}
			if(!ret && !not)
			{
				CHECK_OUTPUT(RETURN, 0, "subpattern failed");
				return 0;
			}
			CHECK_OUTPUT(SHOW, 0, "subpattern passed")
			expr_crs = EXPR_NXT(expr_crs);
			break;

		case PTN_END:  break;

		default:

			CHECK_OUTPUT(RETURN, 0, "unknown opcode")
			return 0;
		}

		/*   check end expression    */
		while(EXPR_TYPE(expr_crs) == PTN_END)
		{
			/*   check for end of expressions   */
			if(EXPR_NXT(expr_crs) == PTN_END)
				break;

			expr_crs = EXPR_NXT(expr_crs);

			/*   returning loop   */
			if(EXPR_TYPE(expr_crs) == PTN_ZERO_MORE || EXPR_TYPE(expr_crs) == PTN_ONE_MORE)
			{
				CHECK_OUTPUT(SHOW, 0, "end loop")

				/*   check that loop consumed input   */
				if(*input_crs == input_start)
				{
					CHECK_OUTPUT(RETURN, 0, "loop failed:  did not consume")
					return 0;
				}

				/*   loops do not continue to the next expression   */
				break;
			}

			/*   returning not   */
			if(EXPR_TYPE(expr_crs) == PTN_NOT)
				not = !not;

			expr_crs = EXPR_NXT(expr_crs);
		}
	}

	CHECK_OUTPUT(RETURN, 1, "check passed:  end of expression");
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
movq 0x28(%rbp), %rax
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movl %ecx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x50(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0xe509
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0xc, %eax
jne 0xde0f
movq -0x20(%rbp), %rax
movl (%rax), %eax
imull -0x28(%rbp), %eax
movl -0x24(%rbp), %ecx
imull -0x28(%rbp), %ecx
cmpl %ecx, %eax
jl 0xddfa
cmpl $0x0, 0x18(%rbp)
je 0xdde2
jmp 0xdde4
jmp 0xdde4
cmpl $0x0, 0x18(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xc(%rbp)
jmp 0xe510
cmpl $0x0, 0x18(%rbp)
je 0xde02
jmp 0xde04
jmp 0xde04
movl 0x18(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0xe510
movq -0x20(%rbp), %rax
movl (%rax), %eax
imull -0x28(%rbp), %eax
movl -0x24(%rbp), %ecx
imull -0x28(%rbp), %ecx
cmpl %ecx, %eax
jl 0xde48
movq -0x30(%rbp), %rax
movslq 0x10(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
addl $-0x8, %eax
subl $0x2, %eax
ja 0xde46
jmp 0xde3a
movl $0x0, -0xc(%rbp)
jmp 0xe510
jmp 0xde48
movq -0x30(%rbp), %rax
movslq 0x10(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x58(%rbp)
subl $0x1, %eax
je 0xdef6
jmp 0xde62
movl -0x58(%rbp), %eax
subl $0x2, %eax
je 0xdf0f
jmp 0xde70
movl -0x58(%rbp), %eax
subl $0x3, %eax
je 0xdf28
jmp 0xde7e
movl -0x58(%rbp), %eax
addl $-0x4, %eax
subl $0x2, %eax
jb 0xdf52
jmp 0xde8f
movl -0x58(%rbp), %eax
subl $0x6, %eax
je 0xe0e2
jmp 0xde9d
movl -0x58(%rbp), %eax
subl $0x7, %eax
je 0xe16b
jmp 0xdeab
movl -0x58(%rbp), %eax
subl $0x8, %eax
je 0xe1f4
jmp 0xdeb9
movl -0x58(%rbp), %eax
subl $0x9, %eax
je 0xe218
jmp 0xdec7
movl -0x58(%rbp), %eax
subl $0xa, %eax
je 0xe299
jmp 0xded5
movl -0x58(%rbp), %eax
subl $0xb, %eax
je 0xe31a
jmp 0xdee3
movl -0x58(%rbp), %eax
subl $0xffff, %eax           # imm = 0xFFFF
je 0xe425
jmp 0xe427
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, 0x10(%rbp)
jmp 0xe433
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, 0x10(%rbp)
jmp 0xe433
cmpl $0x0, 0x18(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x18(%rbp)
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, 0x10(%rbp)
jmp 0xe433
movl 0x10(%rbp), %eax
cmpl 0x20(%rbp), %eax
jne 0xdf7a
movq 0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x20(%rbp), %edx
addl $0x4, %edx
movslq %edx, %rdx
movzwl (%rcx,%rdx,2), %ecx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
jmp 0xdfbd
movl 0x20(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl 0x10(%rbp), %eax
movl %eax, 0x20(%rbp)
movq 0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x20(%rbp), %edx
addl $0x4, %edx
movslq %edx, %rdx
movzwl (%rcx,%rdx,2), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x50(%rbp)
movq 0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x20(%rbp), %edx
addl $0x4, %edx
movslq %edx, %rdx
movzwl (%rcx,%rdx,2), %ecx
movl $0x1, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %r10d
addl $0x3, %r10d
movslq %r10d, %r10
movzwl (%rax,%r10,2), %ebx
movl 0x18(%rbp), %r11d
movl 0x20(%rbp), %r10d
movq 0x28(%rbp), %rax
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0xdd50
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0xe028
movl $0x1, -0xc(%rbp)
jmp 0xe510
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0x4, %eax
je 0xe040
jmp 0xe040
movl -0x44(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq 0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x20(%rbp), %edx
addl $0x4, %edx
movslq %edx, %rdx
movzwl (%rcx,%rdx,2), %ecx
movl (%rax,%rcx,4), %edx
addl $-0x1, %edx
movl %edx, (%rax,%rcx,4)
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0x4, %eax
jne 0xe0a8
movq 0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x20(%rbp), %edx
addl $0x4, %edx
movslq %edx, %rdx
movzwl (%rcx,%rdx,2), %ecx
cmpl $0x1, (%rax,%rcx,4)
jge 0xe0a4
movl $0x0, -0xc(%rbp)
jmp 0xe510
jmp 0xe0a6
jmp 0xe0a8
movl -0x50(%rbp), %edx
movq 0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x20(%rbp), %esi
addl $0x4, %esi
movslq %esi, %rsi
movzwl (%rcx,%rsi,2), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x4c(%rbp), %eax
movl %eax, 0x20(%rbp)
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, 0x10(%rbp)
jmp 0xe433
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %r10d
addl $0x3, %r10d
movslq %r10d, %r10
movzwl (%rax,%r10,2), %ebx
movl 0x18(%rbp), %r11d
movl 0x20(%rbp), %r10d
movq 0x28(%rbp), %rax
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0xdd50
cmpl $0x0, %eax
je 0xe149
movl $0x1, -0xc(%rbp)
jmp 0xe510
movl -0x44(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, 0x10(%rbp)
jmp 0xe433
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %r10d
addl $0x3, %r10d
movslq %r10d, %r10
movzwl (%rax,%r10,2), %ebx
movl 0x18(%rbp), %r11d
movl 0x20(%rbp), %r10d
movq 0x28(%rbp), %rax
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0xdd50
cmpl $0x0, %eax
je 0xe1d2
movl $0x1, -0xc(%rbp)
jmp 0xe510
movl -0x44(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, 0x10(%rbp)
jmp 0xe433
movl -0x28(%rbp), %ecx
movq -0x20(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, 0x10(%rbp)
jmp 0xe433
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq (%rcx), %rcx
movw (%rax,%rcx,2), %ax
movq -0x30(%rbp), %rsi
movl 0x10(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rsi
movzwl %ax, %edi
callq 0xe520
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0xe25d
cmpl $0x0, 0x18(%rbp)
je 0xe25d
movl $0x0, -0xc(%rbp)
jmp 0xe510
cmpl $0x0, -0x54(%rbp)
jne 0xe275
cmpl $0x0, 0x18(%rbp)
jne 0xe275
movl $0x0, -0xc(%rbp)
jmp 0xe510
movl -0x28(%rbp), %ecx
movq -0x20(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, 0x10(%rbp)
jmp 0xe433
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq (%rcx), %rcx
movw (%rax,%rcx,2), %ax
movq -0x30(%rbp), %rsi
movl 0x10(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rsi
movzwl %ax, %edi
callq 0xe590
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0xe2de
cmpl $0x0, 0x18(%rbp)
je 0xe2de
movl $0x0, -0xc(%rbp)
jmp 0xe510
cmpl $0x0, -0x54(%rbp)
jne 0xe2f6
cmpl $0x0, 0x18(%rbp)
jne 0xe2f6
movl $0x0, -0xc(%rbp)
jmp 0xe510
movl -0x28(%rbp), %ecx
movq -0x20(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, 0x10(%rbp)
jmp 0xe433
cmpq $0x0, -0x38(%rbp)
jne 0xe32d
movl $0x0, -0xc(%rbp)
jmp 0xe510
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl 0x10(%rbp), %eax
addl $0x1, %eax
addl $0x3, %eax
cltq
shlq %rax
addq %rax, %rsi
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %edx
callq 0xdc40
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xe373
movl $0x0, -0xc(%rbp)
jmp 0xe510
movq -0x40(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
je 0xe389
movl $0x0, -0xc(%rbp)
jmp 0xe510
movq -0x40(%rbp), %rax
movl $0x1, 0x2c(%rax)
movl 0x17e8e(%rip), %eax     # 0x26228
addl $0x1, %eax
movl %eax, 0x17e85(%rip)     # 0x26228
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
movq -0x40(%rbp), %rax
movq 0x10(%rax), %r8
movq -0x38(%rbp), %r9
callq 0xcc90
movl %eax, -0x54(%rbp)
movq -0x40(%rbp), %rax
movl $0x0, 0x2c(%rax)
movl 0x17e52(%rip), %eax     # 0x26228
addl $-0x1, %eax
movl %eax, 0x17e49(%rip)     # 0x26228
cmpl $0x0, -0x54(%rbp)
je 0xe3f7
cmpl $0x0, 0x18(%rbp)
je 0xe3f7
movl $0x0, -0xc(%rbp)
jmp 0xe510
cmpl $0x0, -0x54(%rbp)
jne 0xe40f
cmpl $0x0, 0x18(%rbp)
jne 0xe40f
movl $0x0, -0xc(%rbp)
jmp 0xe510
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, 0x10(%rbp)
jmp 0xe433
jmp 0xe433
movl $0x0, -0xc(%rbp)
jmp 0xe510
jmp 0xe435
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0xe504
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0xe46e
jmp 0xe504
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, 0x10(%rbp)
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0x5, %eax
je 0xe4ae
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0x4, %eax
jne 0xe4c4
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl -0x48(%rbp), %eax
jne 0xe4c2
movl $0x0, -0xc(%rbp)
jmp 0xe510
jmp 0xe504
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0x3, %eax
jne 0xe4eb
cmpl $0x0, 0x18(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x18(%rbp)
movq -0x30(%rbp), %rax
movl 0x10(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, 0x10(%rbp)
jmp 0xe435
jmp 0xdd93
movl $0x1, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
nopw (%rax,%rax)