// File: /workspace/github_c_makefile_star2_O2/MikeGray-APH[P]LibLouisAPH/source/pattern.c
// Function: pattern_compile_expression
static int pattern_compile_expression(
	const unichar *input,
	const int input_len,
	int *input_crs,
	unichar *expr_data,
	const int expr_len,
	unichar *expr_crs,
	unichar *loop_cnts,
	struct subpattern *subpatterns)
{
	struct subpattern *subpattern;
	unichar *data, attrs0, attrs1;;
	int expr_start, expr_end, expr_sub, expr_crs_prv;
	int input_end, subinput_crs;
	int set, esc, nest, i;

	switch(input[*input_crs])
	{
	case '(':

		if(*expr_crs + 10 >= expr_len)
			return 0;

		(*input_crs)++;
		if(*input_crs >= input_len)
			return 0;

		/*   find closing parenthesis   */
		nest = esc = 0;
		for(input_end = *input_crs; input_end < input_len; input_end++)
		{
			if(input[input_end] == '\\' && !esc)
			{
				esc = 1;
				continue;
			}

			if(input[input_end] == '(' && !esc)
				nest++;
			else if(input[input_end] == ')' && !esc)
			{
				if(nest)
					nest--;
				else
					break;
			}

			esc = 0;
		}
		if(input_end >= input_len)
			return 0;

		EXPR_TYPE(*expr_crs) = PTN_GROUP;

		/*   compile sub expressions   */
		expr_crs_prv = *expr_crs;
		*expr_crs += 4;
		EXPR_DATA_0(expr_crs_prv) = *expr_crs;
		expr_sub = *expr_crs;
		EXPR_TYPE(expr_sub) = PTN_ERROR;
		EXPR_PRV(expr_sub) = PTN_END;
		EXPR_NXT(expr_sub) = PTN_END;
		if(!pattern_compile_1(input, input_end, input_crs, expr_data, expr_len, expr_crs, loop_cnts, subpatterns))
			return 0;
		(*input_crs)++;

		/*   reset end expression   */
		expr_end = *expr_crs;
		EXPR_NXT(expr_end) = expr_crs_prv;

		return *expr_crs += 3;

	case '!':

		if(*expr_crs + 10 >= expr_len)
			return 0;

		(*input_crs)++;
		if(*input_crs >= input_len)
			return 0;

		EXPR_TYPE(*expr_crs) = PTN_NOT;
		expr_crs_prv = *expr_crs;
		*expr_crs += 4;
		EXPR_DATA_0(expr_crs_prv) = *expr_crs;

		/*   create start expression   */
		expr_start = *expr_crs;
		EXPR_TYPE(expr_start) = PTN_START;
		EXPR_PRV(expr_start) = PTN_END;
		*expr_crs += 3;
		EXPR_NXT(expr_start) = *expr_crs;

		/*   compile sub expression   */
		expr_sub = *expr_crs;
		EXPR_TYPE(expr_sub) = PTN_ERROR;
		EXPR_PRV(expr_sub) = expr_start;
		EXPR_NXT(expr_sub) = PTN_END;

		if(!pattern_compile_expression(input, input_len, input_crs, expr_data, expr_len, expr_crs, loop_cnts, subpatterns))
			return 0;

		EXPR_NXT(expr_sub) = *expr_crs;

		/*   create end expression   */
		expr_end = *expr_crs;
		EXPR_TYPE(expr_end) = PTN_END;
		EXPR_PRV(expr_end) = expr_sub;
		EXPR_NXT(expr_end) = expr_crs_prv;

		return *expr_crs += 3;

	case '+':

		if(*expr_crs + 4 >= expr_len)
			return 0;
		EXPR_TYPE(*expr_crs) = PTN_ONE_MORE;
		EXPR_DATA_1(*expr_crs) = (*loop_cnts)++;
		(*input_crs)++;
		return *expr_crs += 5;

	case '*':

		if(*expr_crs + 4 >= expr_len)
			return 0;
		EXPR_TYPE(*expr_crs) = PTN_ZERO_MORE;
		EXPR_DATA_1(*expr_crs) = (*loop_cnts)++;
		(*input_crs)++;
		return *expr_crs += 5;

	case '?':

		if(*expr_crs + 4 >= expr_len)
			return 0;
		EXPR_TYPE(*expr_crs) = PTN_OPTIONAL;
		(*input_crs)++;
		return *expr_crs += 4;

	case '|':

		if(*expr_crs + 5 >= expr_len)
			return 0;
		EXPR_TYPE(*expr_crs) = PTN_ALTERNATE;
		(*input_crs)++;
		return *expr_crs += 5;

	case '.':

		if(*expr_crs + 3 >= expr_len)
			return 0;
		EXPR_TYPE(*expr_crs) = PTN_ANY;
		(*input_crs)++;
		return *expr_crs += 3;

	case '%':

		if(*expr_crs + 5 >= expr_len)
			return 0;

		(*input_crs)++;
		if(*input_crs >= input_len)
			return 0;

		/*   find closing bracket   */
		if(input[*input_crs] == '[')
		{
			set = 1;
			(*input_crs)++;
			for(input_end = *input_crs; input_end < input_len; input_end++)
			if(input[input_end] == ']')
				break;
			if(input_end >= input_len)
				return 0;
		}
		else
		{
			set = 0;
			input_end = *input_crs + 1;
		}

		EXPR_TYPE(*expr_crs) = PTN_ATTRIBUTES;

		attrs0 = attrs1 = 0;
		for( ; (*input_crs) < input_end; (*input_crs)++)
			attr_from_char(&attrs0, &attrs1, input[*input_crs]);

		EXPR_DATA_0(*expr_crs) = attrs0;
		EXPR_DATA_1(*expr_crs) = attrs1;

		if(set)
			(*input_crs)++;
		return *expr_crs += 5;

	case '[':

		(*input_crs)++;
		if(*input_crs >= input_len)
			return 0;

		/*   find closing bracket   */
		esc = 0;
		for(input_end = *input_crs; input_end < input_len; input_end++)
		{
			if(input[input_end] == '\\' && !esc)
			{
				esc = 1;
				continue;
			}

			if(input[input_end] == ']' && !esc)
				break;
			esc = 0;
		}
		if(input_end >= input_len)
			return 0;

		if(*expr_crs + 4 + (input_end - *input_crs) >= expr_len)
			return 0;

		EXPR_TYPE(*expr_crs) = PTN_CHARS;

		esc = 0;
		data = EXPR_DATA(*expr_crs);
		for(i = 1; *input_crs < input_end; (*input_crs)++)
		{
			if(input[*input_crs] == '\\' && !esc)
			{
				esc = 1;
				continue;
			}

			esc = 0;
			data[i++] = (unichar)input[*input_crs];
		}
		data[0] = i - 1;
		(*input_crs)++;
		return *expr_crs += 4 + data[0];

	case '@':

		if(*expr_crs + 10 >= expr_len)
			return 0;

		(*input_crs)++;
		if(*input_crs >= input_len)
			return 0;

		/*   which bracket   */
		if(input[*input_crs] == '{')
		{
			set = 1;
			(*input_crs)++;
			for(input_end = *input_crs; input_end < input_len; input_end++)
			if(input[input_end] == '}')
				break;
			if(input_end >= input_len)
				return 0;

			if(*expr_crs + 4 + (input_end - *input_crs) >= expr_len)
				return 0;

			EXPR_TYPE(*expr_crs) = PTN_SUBPATTERN;

			esc = 0;
			data = EXPR_DATA(*expr_crs);
			for(i = 1; *input_crs < input_end; (*input_crs)++)
			{
				if(input[*input_crs] == '\\' && !esc)
				{
					esc = 1;
					continue;
				}

				esc = 0;
				data[i++] = (unichar)input[*input_crs];
			}
			data[0] = i - 1;
			(*input_crs)++;
			return *expr_crs += 4 + data[0];
		}

		/*   find closing bracket   */
		else if(input[*input_crs] == '[')
		{
			set = 1;
			(*input_crs)++;
			for(input_end = *input_crs; input_end < input_len; input_end++)
			if(input[input_end] == ']')
				break;
			if(input_end >= input_len)
				return 0;

			subpattern = subpattern_find(subpatterns, &input[*input_crs], input_end - *input_crs);
			if(!subpattern)
				return 0;
			if(subpattern->processing)
				return 0;

			EXPR_TYPE(*expr_crs) = PTN_GROUP;

			/*   compile sub pattern   */
			expr_crs_prv = *expr_crs;
			*expr_crs += 4;
			EXPR_DATA_0(expr_crs_prv) = *expr_crs;
			expr_sub = *expr_crs;
			EXPR_TYPE(expr_sub) = PTN_ERROR;
			EXPR_PRV(expr_sub) = PTN_END;
			EXPR_NXT(expr_sub) = PTN_END;
			subinput_crs = 0;
			subpattern->processing = 1;
			if(!pattern_compile_1(subpattern->src_data, subpattern->src_len, &subinput_crs, expr_data, expr_len, expr_crs, loop_cnts, subpatterns))
				return 0;
			subpattern->processing = 0;
			*input_crs = input_end + 1;

			/*   reset end expression   */
			expr_end = *expr_crs;
			EXPR_NXT(expr_end) = expr_crs_prv;

			return *expr_crs += 3;
		}

		return 0;

	case '^':
	case '$':

		if(*expr_crs + 3 >= expr_len)
			return 0;
		EXPR_TYPE(*expr_crs) = PTN_END_OF_INPUT;
		(*input_crs)++;
		return *expr_crs += 3;

	case '\\':

		(*input_crs)++;
		if(*input_crs >= input_len)
			return 0;

	default:

		if(*expr_crs + 5 >= expr_len)
			return 0;
		EXPR_TYPE(*expr_crs) = PTN_CHARS;
		EXPR_DATA_0(*expr_crs) = 1;
		EXPR_DATA_1(*expr_crs) = (unichar)input[*input_crs];
		(*input_crs)++;
		return *expr_crs += 5;
	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %r13
movl %r8d, %ebp
movq %rcx, %r10
movq %rdx, %r14
movl %esi, %eax
movq 0x78(%rsp), %r11
movq 0x70(%rsp), %r8
movl (%rdx), %r15d
movslq %r15d, %rsi
movzwl (%rdi,%rsi,2), %ecx
leal -0x21(%rcx), %edx
cmpl $0xd, %edx
ja 0x7be8
leaq 0x9f1d(%rip), %rcx      # 0x11a38
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movzwl (%r13), %ecx
leal 0xa(%rcx), %edx
xorl %r12d, %r12d
cmpl %ebp, %edx
jge 0x8230
incl %r15d
movl %r15d, (%r14)
cmpl %eax, %r15d
jge 0x8230
movw $0x3, (%r10,%rcx,2)
movzwl (%r13), %r15d
leal 0x4(%r15), %ecx
movw %cx, (%r13)
movw %cx, 0x6(%r10,%r15,2)
movzwl (%r13), %ecx
movl $0xffff0001, (%r10,%rcx,2) # imm = 0xFFFF0001
movzwl (%r13), %edx
addl $0x3, %edx
movw %dx, (%r13)
movw %dx, 0x4(%r10,%rcx,2)
movq %r13, %r9
movzwl (%r13), %r13d
andw $0x0, (%r10,%r13,2)
movw %cx, 0x2(%r10,%r13,2)
orw $-0x1, 0x4(%r10,%r13,2)
movl %eax, %esi
movq %r14, %rdx
movq %r10, %rcx
movq %r8, %rax
movl %ebp, %r8d
movq %r9, %rbx
pushq %r11
pushq %rax
movq %r10, %r14
callq 0x7ad8
popq %rcx
popq %rdx
testl %eax, %eax
je 0x8230
movzwl (%rbx), %eax
movw %ax, 0x4(%r14,%r13,2)
orw $-0x1, (%r14,%rax,2)
movw %r13w, 0x2(%r14,%rax,2)
movq %rbx, %r13
movw %r15w, 0x4(%r14,%rax,2)
movzwl (%rbx), %eax
jmp 0x7ccb
cmpl $0x3f, %ecx
je 0x7f07
cmpl $0x40, %ecx
je 0x7e87
cmpl $0x5b, %ecx
je 0x7db0
cmpl $0x5c, %ecx
je 0x7e27
cmpl $0x5e, %ecx
je 0x7c36
cmpl $0x7c, %ecx
jne 0x7e36
movzwl (%r13), %eax
leal 0x5(%rax), %ecx
cmpl %ebp, %ecx
jge 0x822d
movw $0x7, (%r10,%rax,2)
jmp 0x7da5
movzwl (%r13), %eax
leal 0x3(%rax), %ecx
cmpl %ebp, %ecx
jge 0x822d
movw $0xc, (%r10,%rax,2)
jmp 0x7cc0
movzwl (%r13), %ecx
leal 0x5(%rcx), %edx
xorl %r12d, %r12d
cmpl %ebp, %edx
jge 0x8230
leaq 0x1(%rsi), %rdx
movl %edx, (%r14)
cmpl %eax, %edx
jge 0x8230
movzwl 0x2(%rdi,%rsi,2), %esi
addl $0x2, %r15d
cmpw $0x5b, %si
jne 0x7f31
movl %r15d, (%r14)
movslq %r15d, %rdx
cltq
movq %rdx, %r15
cmpq %rax, %r15
jge 0x8230
cmpw $0x5d, (%rdi,%r15,2)
je 0x7f31
incq %r15
jmp 0x7c8f
movzwl (%r13), %eax
leal 0x3(%rax), %ecx
cmpl %ebp, %ecx
jge 0x822d
movw $0x8, (%r10,%rax,2)
incl %r15d
movl %r15d, (%r14)
movzwl (%r13), %eax
addl $0x3, %eax
jmp 0x7e79
movzwl (%r13), %eax
leal 0x4(%rax), %ecx
cmpl %ebp, %ecx
jge 0x822d
movw $0x4, (%r10,%rax,2)
jmp 0x7d8e
movzwl (%r13), %ecx
leal 0xa(%rcx), %edx
xorl %r12d, %r12d
cmpl %ebp, %edx
jge 0x8230
incq %rsi
movl %esi, (%r14)
cmpl %eax, %esi
jge 0x8230
movq %r10, %rbx
cltq
xorl %r12d, %r12d
pushq $0x1
popq %rdx
xorl %r10d, %r10d
xorl %r8d, %r8d
cmpq %rax, %rsi
jge 0x8230
movzwl (%rdi,%rsi,2), %r11d
testl %r10d, %r10d
jne 0x7d40
cmpw $0x5c, %r11w
jne 0x7d40
movl %edx, %r9d
jmp 0x7d6f
testl %r10d, %r10d
jne 0x7d54
cmpw $0x28, %r11w
jne 0x7d54
incl %r8d
xorl %r9d, %r9d
jmp 0x7d6f
xorl %r9d, %r9d
testl %r10d, %r10d
jne 0x7d6f
cmpw $0x29, %r11w
jne 0x7d6f
testl %r8d, %r8d
je 0x81cf
decl %r8d
incq %rsi
movl %r9d, %r10d
jmp 0x7d21
movzwl (%r13), %eax
leal 0x4(%rax), %ecx
cmpl %ebp, %ecx
jge 0x822d
movw $0x5, (%r10,%rax,2)
movzwl (%r8), %eax
movl %eax, %ecx
incl %ecx
movw %cx, (%r8)
movzwl (%r13), %ecx
movw %ax, 0x8(%r10,%rcx,2)
incl %r15d
movl %r15d, (%r14)
jmp 0x7e71
incq %rsi
movl %esi, (%r14)
cmpl %eax, %esi
jge 0x822d
movq %r10, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movabsq $0x100000000, %rcx      # imm = 0x100000000
movslq %eax, %r8
movq %rsi, %rax
shlq $0x20, %rax
xorl %r12d, %r12d
pushq $0x4
popq %rdx
pushq $0x1
popq %r9
movq %rsi, %r10
xorl %r13d, %r13d
cmpq %r8, %r10
jge 0x8230
movzwl (%rdi,%r10,2), %ebx
testl %r13d, %r13d
jne 0x7e08
movl %r9d, %r11d
cmpw $0x5c, %bx
je 0x7e1a
xorl %r11d, %r11d
testl %r13d, %r13d
jne 0x7e1a
cmpw $0x5d, %bx
je 0x7fe9
incq %r10
addq %rcx, %rax
incl %edx
movl %r11d, %r13d
jmp 0x7dec
incl %r15d
movl %r15d, (%r14)
cmpl %eax, %r15d
jge 0x822d
movzwl (%r13), %eax
leal 0x5(%rax), %ecx
cmpl %ebp, %ecx
jge 0x822d
movw $0xa, (%r10,%rax,2)
movzwl (%r13), %eax
movw $0x1, 0x6(%r10,%rax,2)
movslq %r15d, %rax
movzwl (%rdi,%rax,2), %ecx
movzwl (%r13), %edx
movw %cx, 0x8(%r10,%rdx,2)
incl %eax
movl %eax, (%r14)
movzwl (%r13), %eax
addl $0x5, %eax
movw %ax, (%r13)
movzwl %ax, %r12d
jmp 0x8230
movzwl (%r13), %ebx
leal 0xa(%rbx), %ecx
xorl %r12d, %r12d
cmpl %ebp, %ecx
jge 0x8230
leal 0x1(%rsi), %ecx
movl %ecx, (%r14)
cmpl %eax, %ecx
jge 0x8230
movzwl 0x2(%rdi,%rsi,2), %ecx
cmpl $0x5b, %ecx
je 0x805a
cmpl $0x7b, %ecx
jne 0x8230
movabsq $0x100000000, %rdx      # imm = 0x100000000
leal 0x2(%r15), %ecx
movl %ecx, (%r14)
movslq %ecx, %rcx
movslq %eax, %rsi
movq %rcx, %rax
shlq $0x20, %rax
movl %ebx, %r8d
addl $0x4, %r8d
movq %rcx, %r9
cmpq %rsi, %r9
jge 0x8230
cmpw $0x7d, (%rdi,%r9,2)
je 0x80aa
incq %r9
addq %rdx, %rax
incl %r8d
jmp 0x7ee7
movzwl (%r13), %eax
leal 0x4(%rax), %ecx
cmpl %ebp, %ecx
jge 0x822d
movw $0x6, (%r10,%rax,2)
incl %r15d
movl %r15d, (%r14)
movzwl (%r13), %eax
addl $0x4, %eax
jmp 0x7e79
movq %r10, 0x10(%rsp)
movw $0x9, (%r10,%rcx,2)
leaq 0xc(%rsp), %rax
andw $0x0, (%rax)
leaq 0xe(%rsp), %r8
andw $0x0, (%r8)
movslq %r15d, %r9
pushq $-0x1
popq %r10
leaq 0xf1b2(%rip), %r11      # 0x17110
pushq $0x1
popq %r15
cmpq %r9, %rdx
jge 0x7fb2
movzwl (%rdi,%rdx,2), %ebp
movq %r10, %rcx
cmpq $0xf, %rcx
je 0x7f86
movsbl 0x1(%rcx,%r11), %ebx
incq %rcx
cmpl %ebp, %ebx
jne 0x7f6e
movq %r8, %rbx
jmp 0x7fa0
xorl %ecx, %ecx
cmpq $0x10, %rcx
je 0x7faa
movsbl 0x10(%rcx,%r11), %ebx
cmpl %ebp, %ebx
je 0x7f9d
incq %rcx
jmp 0x7f88
movq %rax, %rbx
movq %r15, %r12
shlq %cl, %r12
orw %r12w, (%rbx)
incq %rdx
movl %edx, (%r14)
jmp 0x7f62
movzwl 0xe(%rsp), %eax
movzwl (%r13), %ecx
movq 0x10(%rsp), %rdi
movw %ax, 0x6(%rdi,%rcx,2)
movzwl 0xc(%rsp), %eax
movzwl (%r13), %ecx
movw %ax, 0x8(%rdi,%rcx,2)
cmpw $0x5b, %si
jne 0x7e71
incl %edx
movl %edx, (%r14)
jmp 0x7e71
movq 0x18(%rsp), %r13
movzwl (%r13), %ecx
addl %ecx, %edx
cmpl %ebp, %edx
jge 0x822d
movq 0x10(%rsp), %rdx
movw $0xa, (%rdx,%rcx,2)
movzwl (%r13), %ecx
leaq (%rdx,%rcx,2), %rcx
addq $0x6, %rcx
sarq $0x20, %rax
addl $0x2, %r15d
pushq $0x1
popq %r8
xorl %r9d, %r9d
movl %r8d, %edx
cmpq %rax, %rsi
jge 0x8093
movzwl (%rdi,%rsi,2), %r10d
testl %r9d, %r9d
jne 0x8042
cmpw $0x5c, %r10w
jne 0x8042
movl %r8d, %r9d
jmp 0x804f
movslq %edx, %r9
incl %edx
movw %r10w, (%rcx,%r9,2)
xorl %r9d, %r9d
incq %rsi
movl %r15d, (%r14)
incl %r15d
jmp 0x8027
movq %r13, 0x18(%rsp)
leal 0x2(%r15), %ecx
movl %ecx, (%r14)
movslq %ecx, %rcx
cltq
leaq (%rdi,%rcx,2), %rsi
xorl %r12d, %r12d
xorl %r13d, %r13d
leaq (%rcx,%r13), %rdx
cmpq %rax, %rdx
jge 0x8230
cmpw $0x5d, (%rsi,%r13,2)
je 0x8110
incq %r13
jmp 0x8075
movl %edx, %eax
decl %eax
movw %ax, (%rcx)
movl %r15d, (%r14)
movzwl (%r13), %eax
addw %dx, %ax
jmp 0x7ccb
cmpl %ebp, %r8d
jge 0x8230
movw $0xb, (%r10,%rbx,2)
movzwl (%r13), %edx
leaq (%r10,%rdx,2), %rdx
addq $0x6, %rdx
sarq $0x20, %rax
addl $0x3, %r15d
pushq $0x1
popq %r8
xorl %r9d, %r9d
movl %r8d, %esi
cmpq %rax, %rcx
jge 0x8242
movzwl (%rdi,%rcx,2), %r10d
testl %r9d, %r9d
jne 0x80f8
cmpw $0x5c, %r10w
jne 0x80f8
movl %r8d, %r9d
jmp 0x8105
movslq %esi, %r9
incl %esi
movw %r10w, (%rdx,%r9,2)
xorl %r9d, %r9d
incq %rcx
movl %r15d, (%r14)
incl %r15d
jmp 0x80d9
movq %r11, %rdi
movq %r10, 0x10(%rsp)
movl %r13d, %edx
callq 0x8259
testq %rax, %rax
je 0x8230
cmpl $0x0, 0x2c(%rax)
jne 0x8230
movl %ebx, %ecx
movq 0x10(%rsp), %rbx
movw $0x2, (%rbx,%rcx,2)
movq 0x18(%rsp), %r9
movzwl (%r9), %edx
leal 0x4(%rdx), %ecx
movw %cx, (%r9)
movq %rdx, 0x20(%rsp)
movw %cx, 0x6(%rbx,%rdx,2)
movzwl (%r9), %ecx
movl $0xffff0000, (%rbx,%rcx,2) # imm = 0xFFFF0000
orw $-0x1, 0x4(%rbx,%rcx,2)
leaq 0x34(%rsp), %rdx
andl $0x0, (%rdx)
movl $0x1, 0x2c(%rax)
movq 0x18(%rax), %rdi
movq %rax, 0x28(%rsp)
movl 0x28(%rax), %esi
movq %rbx, %rcx
movl %ebp, %r8d
pushq 0x78(%rsp)
pushq 0x78(%rsp)
callq 0x755d
popq %rcx
popq %rdx
testl %eax, %eax
je 0x8230
movq 0x28(%rsp), %rax
andl $0x0, 0x2c(%rax)
leal (%r15,%r13), %eax
addl $0x3, %eax
movl %eax, (%r14)
movq 0x18(%rsp), %r13
movzwl (%r13), %eax
movq 0x20(%rsp), %rcx
movw %cx, 0x4(%rbx,%rax,2)
jmp 0x7cc6
movw $0x2, (%rbx,%rcx,2)
movzwl (%r13), %r15d
leal 0x4(%r15), %eax
movw %ax, (%r13)
movw %ax, 0x6(%rbx,%r15,2)
movzwl (%r13), %eax
movl $0xffff0000, (%rbx,%rax,2) # imm = 0xFFFF0000
orw $-0x1, 0x4(%rbx,%rax,2)
movq %r14, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
movq %r13, %r9
pushq 0x78(%rsp)
pushq 0x78(%rsp)
callq 0x755d
popq %rcx
popq %rdx
testl %eax, %eax
je 0x822d
incl (%r14)
movzwl (%r13), %eax
movw %r15w, 0x4(%rbx,%rax,2)
jmp 0x7cc6
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %esi, %eax
decl %eax
movw %ax, (%rdx)
movl %r15d, (%r14)
movzwl (%r13), %eax
addw %si, %ax
jmp 0x7ccb