// File: /workspace/github_c_makefile_star2_O3/MikeGray-APH[P]LibLouisAPH/source/outputs/table-output.c
// Function: mode_output
static void mode_output(FILE *output, const struct mode *mode, const char *name)
{
	int i;

	if(!mode)
		return;

	mode_output(output, mode->nxt, name);

	fputs("   ", output);

	if(!mode->begin_len)
		fputs("-", output);
	else
	for(i = 0; i < mode->begin_len; i++)
	if(mode->begin[i])
		utf16_output_char(output, mode->begin[i]);

	fputs("  ", output);


	if(!mode->end_len)
		fputs("-", output);
	else
	for(i = 0; i < mode->end_len; i++)
	if(mode->end[i])
		utf16_output_char(output, mode->end[i]);

	if(mode->word_len)
	{

		fputs("  ", output);

		if(!mode->word_len)
			fputs("-", output);
		else
		for(i = 0; i < mode->word_len; i++)
		if(mode->word[i])
			utf16_output_char(output, mode->word[i]);

		fputs("  ", output);

		if(!mode->term_len)
			fputs("-", output);
		else
		for(i = 0; i < mode->term_len; i++)
		if(mode->term[i])
			utf16_output_char(output, mode->term[i]);

		fputs("  ", output);

		if(!mode->symbol_len)
			fputs("-", output);
		else
		for(i = 0; i < mode->symbol_len; i++)
		if(mode->symbol[i])
			utf16_output_char(output, mode->symbol[i]);

		fprintf(output, "  %d", mode->passage_len);
	}
	else
		fprintf(output, "  -  -  -  %d", mode->passage_len);

	fputs("  ", output);

	if(name)
		fprintf(output, "%s", name);
	else
		utf16_output(output, mode->name, mode->name_len);

	fputs("\n", output);

	mode = mode->nxt;
}

// Assembly:
testq %rsi, %rsi
je 0x11b43
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rsi), %rsi
callq 0x11ae1
leaq 0x275a(%rip), %rdi      # 0x14261
movq %rbx, %rsi
callq 0x1100
movl 0x54(%r15), %eax
testl %eax, %eax
je 0x11b44
jle 0x11b53
xorl %r12d, %r12d
movzwl 0xc(%r15,%r12,2), %ecx
testw %cx, %cx
je 0x11b36
movzwl %cx, %esi
movq %rbx, %rdi
callq 0x10929
movl 0x54(%r15), %eax
incq %r12
movslq %eax, %rcx
cmpq %rcx, %r12
jl 0x11b1c
jmp 0x11b53
retq
leaq 0x2709(%rip), %rdi      # 0x14254
movq %rbx, %rsi
callq 0x1100
leaq 0x2708(%rip), %rdi      # 0x14262
movq %rbx, %rsi
callq 0x1100
movl 0x58(%r15), %eax
testl %eax, %eax
je 0x11b96
jle 0x11ba5
xorl %r12d, %r12d
movzwl 0x1a(%r15,%r12,2), %ecx
testw %cx, %cx
je 0x11b89
movzwl %cx, %esi
movq %rbx, %rdi
callq 0x10929
movl 0x58(%r15), %eax
incq %r12
movslq %eax, %rcx
cmpq %rcx, %r12
jl 0x11b6f
jmp 0x11ba5
leaq 0x26b7(%rip), %rdi      # 0x14254
movq %rbx, %rsi
callq 0x1100
cmpl $0x0, 0x5c(%r15)
je 0x11bef
leaq 0x26af(%rip), %rdi      # 0x14262
movq %rbx, %rsi
callq 0x1100
movl 0x5c(%r15), %eax
testl %eax, %eax
je 0x11bfb
jle 0x11c0a
xorl %r12d, %r12d
movzwl 0x28(%r15,%r12,2), %ecx
testw %cx, %cx
je 0x11be2
movzwl %cx, %esi
movq %rbx, %rdi
callq 0x10929
movl 0x5c(%r15), %eax
incq %r12
movslq %eax, %rcx
cmpq %rcx, %r12
jl 0x11bc8
jmp 0x11c0a
leaq 0x264d(%rip), %r12      # 0x14243
jmp 0x11cbc
leaq 0x2652(%rip), %rdi      # 0x14254
movq %rbx, %rsi
callq 0x1100
leaq 0x2651(%rip), %rdi      # 0x14262
movq %rbx, %rsi
callq 0x1100
movl 0x60(%r15), %eax
testl %eax, %eax
je 0x11c4d
jle 0x11c5c
xorl %r12d, %r12d
movzwl 0x36(%r15,%r12,2), %ecx
testw %cx, %cx
je 0x11c40
movzwl %cx, %esi
movq %rbx, %rdi
callq 0x10929
movl 0x60(%r15), %eax
incq %r12
movslq %eax, %rcx
cmpq %rcx, %r12
jl 0x11c26
jmp 0x11c5c
leaq 0x2600(%rip), %rdi      # 0x14254
movq %rbx, %rsi
callq 0x1100
leaq 0x25ff(%rip), %rdi      # 0x14262
movq %rbx, %rsi
callq 0x1100
movl 0x64(%r15), %eax
testl %eax, %eax
je 0x11ca6
leaq 0x25d2(%rip), %r12      # 0x1424c
jle 0x11cbc
xorl %r13d, %r13d
movzwl 0x44(%r15,%r13,2), %ecx
testw %cx, %cx
je 0x11c99
movzwl %cx, %esi
movq %rbx, %rdi
callq 0x10929
movl 0x64(%r15), %eax
incq %r13
movslq %eax, %rcx
cmpq %rcx, %r13
jl 0x11c7f
jmp 0x11cbc
leaq 0x25a7(%rip), %rdi      # 0x14254
movq %rbx, %rsi
callq 0x1100
leaq 0x2590(%rip), %r12      # 0x1424c
movl 0x68(%r15), %edx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x1160
leaq 0x258e(%rip), %rdi      # 0x14262
movq %rbx, %rsi
callq 0x1100
testq %r14, %r14
je 0x11cee
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1100
jmp 0x11cfe
movq 0x70(%r15), %rsi
movl 0x78(%r15), %edx
movq %rbx, %rdi
callq 0x108bc
leaq 0x2347(%rip), %rdi      # 0x1404c
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1100