// File: /workspace/github_c_makefile_star2_O0/MikeGray-APH[P]LibLouisAPH/source/languages/generic-backward.c
// Function: convert_indicators_numeric
static int convert_indicators_numeric(struct translate *translate)
{
	const struct table *table;
	int numeric_in, numeric_passage_in;
	unichar uchar;

	/*   only remove indicators contained in last table in tables   */
	table = translate->tables[translate->table_cnt - 1];
	translate->table_crs = translate->table_cnt - 1;

	numeric_in =
	numeric_passage_in = 0;
	translate->input_crs =
	translate->output_len = 0;
	while(translate->input_crs < translate->input_len)
	{
		switch(translate_get_mode_indicator(translate, table, &table->numeric))
		{
		case FAIL:  return 0;
		case NONE:  break;

		case BEGIN:  numeric_passage_in = 1;
		case WORD:   numeric_in = 1;  break;

		case END:   numeric_passage_in = 0;
		case TERM:

			/*   numeric terminator is also nocontract symbol   */
			if(!numeric_passage_in)
				numeric_in = 0;
			break;

		/*   numeric space   */
		case SYMBOL:  break;
		}

		/*   treat nocontract symbol like an escape   */
		if(numeric_passage_in)
		if(translate_get_mode_indicator(translate, table, &table->nocontract) == SYMBOL)
		{
			if(!(translate_copy_marked_indicators(translate) > 0))
				return 0;
			if(!translate_copy_to_output(translate, 1, 1))
				return 0;
			continue;
		}

		if(translate_copy_marked_indicators(translate) > 0)
			continue;

		if(numeric_in)
		{
			/*   numeric space   */
			if(translate_is_equal(translate, table->numeric.symbol, table->numeric.symbol_len))
			{
				CHANGE_MARK
				if(!translate_insert_dot_for_chars(translate, u' ', table->numeric.symbol_len))
					return 0;
			}
			else if(!numeric_passage_in && !translate_has_attributes(translate, CHAR_NUMERIC_UCHAR | CHAR_NUMERIC_CONT))
			{
				numeric_in = 0;
				if(!translate_copy_to_output(translate, 1, 1))
					return 0;
			}
			else
			{
				uchar = generic_uchar_to_digit(table, translate->input[translate->input_crs]);
				if(uchar != translate->input[translate->input_crs])
				{
					CHANGE_MARK
					if(!translate_insert_dot_for_chars(translate, uchar, 1))
						return 0;
				}
				else if(!translate_copy_to_output(translate, 1, 1))
					return 0;
			}
		}
		else if(!translate_copy_to_output(translate, 1, 1))
			return 0;
	}

#ifdef DEBUG
	translate->output[translate->output_len] = 0;
#endif

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl 0xc(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
subl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x68(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x40(%rax)
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x44(%rcx), %eax
jge 0x17b1d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq %rsi, %rdx
addq $0x150, %rdx            # imm = 0x150
callq 0xa630
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x6, %eax
ja 0x1793d
movq -0x30(%rbp), %rax
leaq 0x7696(%rip), %rcx      # 0x1ef94
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x4(%rbp)
jmp 0x17b3a
jmp 0x1793d
movl $0x1, -0x20(%rbp)
movl $0x1, -0x1c(%rbp)
jmp 0x1793d
movl $0x0, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x17939
movl $0x0, -0x1c(%rbp)
jmp 0x1793d
jmp 0x1793d
cmpl $0x0, -0x20(%rbp)
je 0x1799f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x50, %rdx
callq 0xa630
cmpl $0x6, %eax
jne 0x1799d
movq -0x10(%rbp), %rdi
callq 0xb160
cmpl $0x0, %eax
jg 0x17977
movl $0x0, -0x4(%rbp)
jmp 0x17b3a
movq -0x10(%rbp), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0xaeb0
cmpl $0x0, %eax
jne 0x17998
movl $0x0, -0x4(%rbp)
jmp 0x17b3a
jmp 0x178bd
jmp 0x1799f
movq -0x10(%rbp), %rdi
callq 0xb160
cmpl $0x0, %eax
jle 0x179b2
jmp 0x178bd
cmpl $0x0, -0x1c(%rbp)
je 0x17af8
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x150, %rsi            # imm = 0x150
addq $0x44, %rsi
movq -0x18(%rbp), %rax
movl 0x1b4(%rax), %edx
callq 0x17f70
cmpl $0x0, %eax
je 0x17a1f
movq -0x10(%rbp), %rax
movl $0x1, 0x94(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x1b4(%rax), %edx
movl $0x20, %esi
callq 0x182d0
cmpl $0x0, %eax
jne 0x17a1a
movl $0x0, -0x4(%rbp)
jmp 0x17b3a
jmp 0x17af6
cmpl $0x0, -0x20(%rbp)
jne 0x17a65
movq -0x10(%rbp), %rdi
movl $0x3000, %esi           # imm = 0x3000
callq 0x18090
cmpl $0x0, %eax
jne 0x17a65
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0xaeb0
cmpl $0x0, %eax
jne 0x17a60
movl $0x0, -0x4(%rbp)
jmp 0x17b3a
jmp 0x17af4
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x40(%rcx), %rcx
movzwl (%rax,%rcx,2), %esi
callq 0x18310
movw %ax, -0x22(%rbp)
movzwl -0x22(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x38(%rcx), %rcx
movq -0x10(%rbp), %rdx
movslq 0x40(%rdx), %rdx
movzwl (%rcx,%rdx,2), %ecx
cmpl %ecx, %eax
je 0x17ad2
movq -0x10(%rbp), %rax
movl $0x1, 0x94(%rax)
movq -0x10(%rbp), %rdi
movl $0x1, %edx
movzwl -0x22(%rbp), %esi
callq 0x182d0
cmpl $0x0, %eax
jne 0x17ad0
movl $0x0, -0x4(%rbp)
jmp 0x17b3a
jmp 0x17af2
movq -0x10(%rbp), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0xaeb0
cmpl $0x0, %eax
jne 0x17af0
movl $0x0, -0x4(%rbp)
jmp 0x17b3a
jmp 0x17af2
jmp 0x17af4
jmp 0x17af6
jmp 0x17b18
movq -0x10(%rbp), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0xaeb0
cmpl $0x0, %eax
jne 0x17b16
movl $0x0, -0x4(%rbp)
jmp 0x17b3a
jmp 0x17b18
jmp 0x178bd
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x68(%rcx), %rcx
movw $0x0, (%rax,%rcx,2)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)