// File: /workspace/github_c_makefile_star2_O1/MikeGray-APH[P]LibLouisAPH/source/languages/generic-backward.c
// Function: convert_indicators_mode
static int convert_indicators_mode(struct translate *translate, const struct mode *mode, const unichar delimiter)
{
	int cnt;

	cnt = 0;
	translate->input_crs =
	translate->output_len = 0;
	while(translate->input_crs < translate->input_len)
	{
		if(translate_copy_marked_indicators_or_modifiers(translate) > 0)
			continue;

		if(translate_is_equal(translate, mode->begin, mode->begin_len))
		{
			if(!translate_insert_dot(translate, delimiter))
				return -1;
			if(!translate_copy_to_output(translate, mode->begin_len, 1))
				return -1;
			if(!translate_insert_dot(translate, delimiter))
				return -1;
			cnt++;
		}
		else if(translate_is_equal(translate, mode->end, mode->end_len))
		{
			if(!translate_insert_dot(translate, delimiter))
				return -1;
			if(!translate_copy_to_output(translate, mode->end_len, 1))
				return -1;
			if(!translate_insert_dot(translate, delimiter))
				return -1;
			cnt++;
		}
		else if(translate_is_equal(translate, mode->word, mode->word_len))
		{
			if(!translate_insert_dot(translate, delimiter))
				return -1;
			if(!translate_copy_to_output(translate, mode->word_len, 1))
				return -1;
			if(!translate_insert_dot(translate, delimiter))
				return -1;
			cnt++;
		}
		else if(translate_is_equal(translate, mode->term, mode->term_len))
		{
			if(!translate_insert_dot(translate, delimiter))
				return -1;
			if(!translate_copy_to_output(translate, mode->term_len, 1))
				return -1;
			if(!translate_insert_dot(translate, delimiter))
				return -1;
			cnt++;
		}
		else if(translate_is_equal(translate, mode->symbol, mode->symbol_len))
		{
			if(!translate_insert_dot(translate, delimiter))
				return -1;
			if(!translate_copy_to_output(translate, mode->symbol_len, 1))
				return -1;
			if(!translate_insert_dot(translate, delimiter))
				return -1;
			cnt++;
		}
		else if(!translate_copy_to_output(translate, 1, 1))
			return -1;
	}

	return cnt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
movl %r13d, 0x68(%rdi)
movl %r13d, 0x40(%rdi)
leaq 0x6(%rsp), %r12
movl 0x40(%r15), %eax
cmpl 0x44(%r15), %eax
jge 0xf6c0
movq %r15, %rdi
callq 0x7933
testl %eax, %eax
jg 0xf45f
movl 0x54(%r14), %ecx
movslq 0x40(%r15), %rax
testq %rcx, %rcx
je 0xf48f
leal (%rcx,%rax), %edx
cmpl 0x44(%r15), %edx
jle 0xf506
movl 0x58(%r14), %ecx
testq %rcx, %rcx
je 0xf4a5
leal (%rax,%rcx), %edx
cmpl 0x44(%r15), %edx
jle 0xf557
movl 0x5c(%r14), %ecx
testq %rcx, %rcx
je 0xf4bb
leal (%rax,%rcx), %edx
cmpl 0x44(%r15), %edx
jle 0xf5a8
movl 0x60(%r14), %ecx
testq %rcx, %rcx
je 0xf4d1
leal (%rax,%rcx), %edx
cmpl 0x44(%r15), %edx
jle 0xf5f9
movl 0x64(%r14), %ecx
testq %rcx, %rcx
je 0xf4e7
leal (%rax,%rcx), %edx
cmpl 0x44(%r15), %edx
jle 0xf647
movq %r15, %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x7666
testl %eax, %eax
jne 0xf45f
jmp 0xf6d4
testl %ecx, %ecx
jle 0xf52c
leaq (%rax,%rax), %rdx
addq 0x38(%r15), %rdx
xorl %esi, %esi
movzwl (%rdx,%rsi,2), %edi
cmpw 0xc(%r14,%rsi,2), %di
jne 0xf48f
incq %rsi
cmpq %rsi, %rcx
jne 0xf514
movw %bx, 0x6(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x7473
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0xf6c3
movl 0x54(%r14), %esi
jmp 0xf68e
testl %ecx, %ecx
jle 0xf57d
leaq (%rax,%rax), %rdx
addq 0x38(%r15), %rdx
xorl %esi, %esi
movzwl (%rdx,%rsi,2), %edi
cmpw 0x1a(%r14,%rsi,2), %di
jne 0xf4a5
incq %rsi
cmpq %rsi, %rcx
jne 0xf565
movw %bx, 0x6(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x7473
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0xf6c3
movl 0x58(%r14), %esi
jmp 0xf68e
testl %ecx, %ecx
jle 0xf5ce
leaq (%rax,%rax), %rdx
addq 0x38(%r15), %rdx
xorl %esi, %esi
movzwl (%rdx,%rsi,2), %edi
cmpw 0x28(%r14,%rsi,2), %di
jne 0xf4bb
incq %rsi
cmpq %rsi, %rcx
jne 0xf5b6
movw %bx, 0x6(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x7473
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0xf6c3
movl 0x5c(%r14), %esi
jmp 0xf68e
testl %ecx, %ecx
jle 0xf61f
leaq (%rax,%rax), %rdx
addq 0x38(%r15), %rdx
xorl %esi, %esi
movzwl (%rdx,%rsi,2), %edi
cmpw 0x36(%r14,%rsi,2), %di
jne 0xf4d1
incq %rsi
cmpq %rsi, %rcx
jne 0xf607
movw %bx, 0x6(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x7473
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0xf6c3
movl 0x60(%r14), %esi
jmp 0xf68e
testl %ecx, %ecx
jle 0xf66c
addq %rax, %rax
addq 0x38(%r15), %rax
xorl %edx, %edx
movzwl (%rax,%rdx,2), %esi
cmpw 0x44(%r14,%rdx,2), %si
jne 0xf4e7
incq %rdx
cmpq %rdx, %rcx
jne 0xf654
movw %bx, 0x6(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x7473
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0xf6c3
movl 0x64(%r14), %esi
movq %r15, %rdi
movl $0x1, %edx
callq 0x7666
testl %eax, %eax
je 0xf6c3
movw %bx, 0x6(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x7473
testl %eax, %eax
je 0xf6c3
incl %r13d
jmp 0xf45f
movl %r13d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0xf6c3
nop