// File: /workspace/github_c_makefile_star2_O0/MikeGray-APH[P]LibLouisAPH/source/languages/generic-forward.c
// Function: indicators_to_words
static void indicators_to_words(unsigned int *indicators, unsigned char *words, const struct translate *translate)
{
	int ind_in, emp_in, emp_len, word_in, word_begin, word_began, word_whole, word_stop, word_len, i;

	ind_in =
	emp_in =
	word_in =
	word_whole = 0;
	word_began = 0;
	word_begin = -1;
	word_len =
	emp_len = 0;

	for(i = 0; i < translate->input_len; i++)
	{
		/*   keep track of indicators   */
		if(words[i] & WORD_INDICATOR)
			ind_in = 1;
		else
			ind_in = 0;

		/*   clear out previous whole word markings   */
		words[i] &= ~WORD_WHOLE;

		/*   beginning of mode   */
		if(!emp_in)
		if(indicators[i] & EMP_BEGIN)
		{
			emp_in = 1;
			emp_len = 0;
			indicators[i] &= ~EMP_BEGIN;

			/*   mode starting inside word   */
			if(words[i] & WORD_CHAR)
			{
				word_begin = i;
				word_len = 0;
				if(word_began)
					word_whole = 0;
				else
					word_whole = WORD_WHOLE;
			}
		}

		/*   end of mode   */
		if(emp_in)
		if(indicators[i] & EMP_END)
		{
			emp_in = 0;
			indicators[i] &= ~EMP_END;

			if(word_in && word_begin >= 0)
			{
				/*   check if mode ended inside a word   */
				word_stop = EMP_END | EMP_WORD;
				if(words[i] & WORD_CHAR)
					word_whole = 0;
				else
					word_stop = 0;

				/*   if whole word is one symbol,
				     turn it into a symbol   */
				if(EMP_SYMBOL && word_len == 1)
					indicators[word_begin] |= EMP_SYMBOL;
				else
				{
					indicators[word_begin] |= EMP_WORD;
					indicators[i] |= word_stop;
				}
				words[word_begin] |= word_whole;
			}
		}
		else if(!ind_in)
			emp_len++;

		/*   beginning of word   */
		if(!word_in)
		if(words[i] & WORD_CHAR)
		{
			if(!(words[i] & WORD_INDICATOR))
				word_began = 1;
			word_in = 1;
			word_len = 0;
			if(emp_in)
			{
				word_begin = i;
				word_whole = WORD_WHOLE;
			}
		}

		/*   end of word   */
		if(word_in)
		if(!(words[i] & WORD_CHAR) && !ind_in)
		{
			/*   made it through whole word   */
			if(emp_in && word_begin >= 0)
			{
				/*   if word is one character,
				     turn it into a symbol   */
				if(EMP_SYMBOL && word_len == 1)
						indicators[word_begin] |= EMP_SYMBOL;
				else
					indicators[word_begin] |= EMP_WORD;
				words[word_begin] |= word_whole;
			}

			word_in = 0;
			word_whole = 0;
			word_begin = -1;
			word_began = 0;
		}
		else
		{
			/*   words don't start on indicators   */
			if(!(words[i] & WORD_INDICATOR))
			{
				word_began = 1;
				word_len++;
			}
		}
	}

	/*   input end   */
	if(emp_in)
	{
		indicators[i] &= ~EMP_END;

		if(word_in)
		if(word_begin >= 0)
		{
			/*   if word is one character,
			     turn it into a symbol   */
			if(EMP_SYMBOL && word_len == 1)
					indicators[word_begin] |= EMP_SYMBOL;
			else
				indicators[word_begin] |= EMP_WORD;
			words[word_begin] |= word_whole;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x30(%rbp)
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x24(%rbp)
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x44(%rcx), %eax
jge 0x13950
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x136cc
movl $0x1, -0x1c(%rbp)
jmp 0x136d3
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %edx
andl $-0x3, %edx
movb %dl, (%rax,%rcx)
cmpl $0x0, -0x20(%rbp)
jne 0x1375a
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x13758
movl $0x1, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %edx
andl $-0x2, %edx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x13756
movl -0x40(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, -0x3c(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0x1374d
movl $0x0, -0x34(%rbp)
jmp 0x13754
movl $0x2, -0x34(%rbp)
jmp 0x13756
jmp 0x13758
jmp 0x1375a
cmpl $0x0, -0x20(%rbp)
je 0x13832
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1381f
movl $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %edx
andl $-0x3, %edx
movl %edx, (%rax,%rcx,4)
cmpl $0x0, -0x28(%rbp)
je 0x1381d
cmpl $0x0, -0x2c(%rbp)
jl 0x1381d
movl $0x6, -0x38(%rbp)
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x137c7
movl $0x0, -0x34(%rbp)
jmp 0x137ce
movl $0x0, -0x38(%rbp)
cmpl $0x1, -0x3c(%rbp)
jne 0x137e7
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
orl $0x8, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x13809
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
orl $0x4, %edx
movl %edx, (%rax,%rcx,4)
movl -0x38(%rbp), %edx
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
orl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl -0x34(%rbp), %esi
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
jmp 0x13830
cmpl $0x0, -0x1c(%rbp)
jne 0x1382e
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x13830
jmp 0x13832
cmpl $0x0, -0x28(%rbp)
jne 0x1388c
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1388a
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x13867
movl $0x1, -0x30(%rbp)
movl $0x1, -0x28(%rbp)
movl $0x0, -0x3c(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x13888
movl -0x40(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl $0x2, -0x34(%rbp)
jmp 0x1388a
jmp 0x1388c
cmpl $0x0, -0x28(%rbp)
je 0x13940
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x13918
cmpl $0x0, -0x1c(%rbp)
jne 0x13918
cmpl $0x0, -0x20(%rbp)
je 0x138fa
cmpl $0x0, -0x2c(%rbp)
jl 0x138fa
cmpl $0x1, -0x3c(%rbp)
jne 0x138d5
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
orl $0x8, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x138e6
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
orl $0x4, %edx
movl %edx, (%rax,%rcx,4)
movl -0x34(%rbp), %esi
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x34(%rbp)
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x30(%rbp)
jmp 0x1393e
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x1393c
movl $0x1, -0x30(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1393e
jmp 0x13940
jmp 0x13942
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x1369f
cmpl $0x0, -0x20(%rbp)
je 0x139b5
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %edx
andl $-0x3, %edx
movl %edx, (%rax,%rcx,4)
cmpl $0x0, -0x28(%rbp)
je 0x139b3
cmpl $0x0, -0x2c(%rbp)
jl 0x139b1
cmpl $0x1, -0x3c(%rbp)
jne 0x1398c
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
orl $0x8, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x1399d
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
orl $0x4, %edx
movl %edx, (%rax,%rcx,4)
movl -0x34(%rbp), %esi
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
jmp 0x139b3
jmp 0x139b5
popq %rbp
retq
nopw (%rax,%rax)