// File: /workspace/github_c_makefile_star2_O0/MikeGray-APH[P]LibLouisAPH/source/languages/generic-forward.c
// Function: reset_words_in_passages
static void reset_words_in_passages(unsigned int *indicators, unsigned char *words, const struct translate *translate, const struct table *table)
{
	int pass_in, word_in, word_begin, word_reset, letter_cnt, indicator_in, at, i;

	word_begin =
	word_in =
	pass_in =
	word_reset =
	letter_cnt = 0;
	indicator_in = 0;

	for(i = 0; i < translate->input_len; i++)
	{
		/*   indicators   */
		if(indicator_in)
		{
			if(is_indicator_delimiter(table, translate->input[i]))
				indicator_in = 0;
			continue;
		}
		else if(is_indicator_delimiter(table, translate->input[i]))
		{
			indicator_in = 1;
			continue;
		}

		if(pass_in)
		if(indicators[i] & EMP_END)
			pass_in = 0;

		if(!pass_in)
		if(indicators[i] & EMP_BEGIN)
			pass_in = 1;
		else
		{
			/*   beginning of word   */
			if(!word_in)
			if(indicators[i] & EMP_WORD)
			{
				/*   handle case when reset
				     was at beginning of word   */
				if(!(translate_get_attributes_at(translate, i) & CHAR_LETTER))
				{
					at = i;

					/*   reset followed by marked sequence   */
					while(i + 1 < translate->input_len && words[i + 1] & WORD_INDICATOR)
						i++;

					/*   not just one reset by itself   */
					if(words[i + 1] & WORD_CHAR)
					{
						indicators[i + 1] |= EMP_WORD;
						if(words[at] & WORD_WHOLE)
							words[i + 1] |= WORD_WHOLE;
					}
					indicators[at] &= ~EMP_WORD;
					words[at] &= ~WORD_WHOLE;

					/*   if reset is a letter, make it a symbol   */
					if(translate_get_attributes_at(translate, at) & CHAR_LETTER)
						indicators[at] |= EMP_SYMBOL;

					continue;
				}

				word_in = 1;
				word_begin = i;
				letter_cnt = 0;
				word_reset = 0;
			}
			else if(indicators[i] & EMP_SYMBOL && words[i] & WORD_WHOLE)
			{
				/*   handle case when symbol is not a letter   */
				if(!(translate_get_attributes_at(translate, i) & CHAR_LETTER))
				{
					indicators[i] &= ~EMP_SYMBOL;
					words[i] &= ~WORD_WHOLE;
					continue;
				}
			}

			if(word_in)

			/*   end of word   */
			if(!(words[i] & WORD_CHAR) || (indicators[i] & EMP_WORD && indicators[i] & EMP_END))
			{
				word_in = 0;

				/*   handle symbol   */
				if(EMP_SYMBOL && letter_cnt == 1)
				{
					indicators[word_begin] |= EMP_SYMBOL;
					indicators[word_begin] &= ~EMP_WORD;
					words[word_begin] &= ~WORD_WHOLE;
					indicators[i] &= ~(EMP_END | EMP_WORD);
				}

				/*   if word ended on a reset or last char was a reset,
				     get rid of end bits   */
				if(word_reset || !(translate_get_attributes_at(translate, i) & CHAR_LETTER))
					indicators[i] &= ~(EMP_END | EMP_WORD);

				/*   if word ended when it began, get rid of all bits   */
				if(i == word_begin)
				{
					words[word_begin] &= ~WORD_WHOLE;
					indicators[i] &= ~(EMP_END | EMP_WORD);
				}
			}
			else
			{
				if(!(translate_get_attributes_at(translate, i) & CHAR_LETTER))
				{
					/*   handle symbol not already resetting   */
					if(EMP_SYMBOL && letter_cnt == 1)
					{
						indicators[word_begin] |= EMP_SYMBOL;
						indicators[word_begin] &= ~EMP_WORD;
						words[word_begin] &= ~WORD_WHOLE;
					}
					word_reset = 1;

					continue;
				}

				if(word_reset)
				{
					word_reset = 0;
					word_begin = i;
					letter_cnt = 0;
					indicators[i] |= EMP_WORD;
				}

				letter_cnt++;
			}
		}
	}

	/*   input end   */
	if(word_in)
	{
		/*   handle symbol   */
		if(EMP_SYMBOL && letter_cnt == 1)
		{
			indicators[word_begin] |= EMP_SYMBOL;
			indicators[word_begin] &= ~EMP_WORD;
			words[word_begin] &= ~WORD_WHOLE;
			indicators[i] &= ~(EMP_END | EMP_WORD);
		}

		if(word_reset)
			indicators[i] &= ~(EMP_END | EMP_WORD);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x44(%rcx), %eax
jge 0x15aad
cmpl $0x0, -0x38(%rbp)
je 0x156e9
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x40(%rbp), %rcx
movzwl (%rax,%rcx,2), %esi
callq 0x15d50
cmpl $0x0, %eax
je 0x156e4
movl $0x0, -0x38(%rbp)
jmp 0x15a9f
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x40(%rbp), %rcx
movzwl (%rax,%rcx,2), %esi
callq 0x15d50
cmpl $0x0, %eax
je 0x15713
movl $0x1, -0x38(%rbp)
jmp 0x15a9f
jmp 0x15715
cmpl $0x0, -0x24(%rbp)
je 0x15737
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x15735
movl $0x0, -0x24(%rbp)
jmp 0x15737
cmpl $0x0, -0x24(%rbp)
jne 0x15a9d
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x15760
movl $0x1, -0x24(%rbp)
jmp 0x15a9b
cmpl $0x0, -0x28(%rbp)
jne 0x15913
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x158aa
movq -0x18(%rbp), %rdi
movl -0x40(%rbp), %esi
callq 0x14240
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x1588d
movl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rdx
xorl %eax, %eax
cmpl 0x44(%rdx), %ecx
movb %al, -0x41(%rbp)
jge 0x157d0
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
andl $0x4, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x157d9
jmp 0x157e4
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x1579f
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x15840
movq -0x8(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
orl $0x4, %edx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1583e
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
orl $0x2, %edx
movb %dl, (%rax,%rcx)
jmp 0x15840
movq -0x8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
andl $-0x5, %edx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movzbl (%rax,%rcx), %edx
andl $-0x3, %edx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x14240
andl $0x40, %eax
cmpl $0x0, %eax
je 0x15888
movq -0x8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
orl $0x8, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x15a9f
movl $0x1, -0x28(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x30(%rbp)
jmp 0x15911
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x1590f
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1590f
movq -0x18(%rbp), %rdi
movl -0x40(%rbp), %esi
callq 0x14240
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x1590d
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %edx
andl $-0x9, %edx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %edx
andl $-0x3, %edx
movb %dl, (%rax,%rcx)
jmp 0x15a9f
jmp 0x1590f
jmp 0x15911
jmp 0x15913
cmpl $0x0, -0x28(%rbp)
je 0x15a99
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1595f
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x15a0c
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x15a0c
movl $0x0, -0x28(%rbp)
cmpl $0x1, -0x34(%rbp)
jne 0x159b1
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
orl $0x8, %edx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
andl $-0x5, %edx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %edx
andl $-0x3, %edx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %edx
andl $-0x7, %edx
movl %edx, (%rax,%rcx,4)
cmpl $0x0, -0x30(%rbp)
jne 0x159cb
movq -0x18(%rbp), %rdi
movl -0x40(%rbp), %esi
callq 0x14240
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x159dc
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %edx
andl $-0x7, %edx
movl %edx, (%rax,%rcx,4)
movl -0x40(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jne 0x15a07
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %edx
andl $-0x3, %edx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %edx
andl $-0x7, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x15a97
movq -0x18(%rbp), %rdi
movl -0x40(%rbp), %esi
callq 0x14240
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x15a63
cmpl $0x1, -0x34(%rbp)
jne 0x15a5a
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
orl $0x8, %edx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
andl $-0x5, %edx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %edx
andl $-0x3, %edx
movb %dl, (%rax,%rcx)
movl $0x1, -0x30(%rbp)
jmp 0x15a9f
cmpl $0x0, -0x30(%rbp)
je 0x15a8e
movl $0x0, -0x30(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %edx
orl $0x4, %edx
movl %edx, (%rax,%rcx,4)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x15a99
jmp 0x15a9b
jmp 0x15a9d
jmp 0x15a9f
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x156a9
cmpl $0x0, -0x28(%rbp)
je 0x15b17
cmpl $0x1, -0x34(%rbp)
jne 0x15afe
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
orl $0x8, %edx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
andl $-0x5, %edx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %edx
andl $-0x3, %edx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %edx
andl $-0x7, %edx
movl %edx, (%rax,%rcx,4)
cmpl $0x0, -0x30(%rbp)
je 0x15b15
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %edx
andl $-0x7, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x15b17
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)