// File: /workspace/github_c_makefile_star2_O1/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 0x11bb8
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rsi), %rsi
callq 0x11b55
leaq 0x25da(%rip), %rdi      # 0x14155
movq %rbx, %rsi
callq 0x1100
cmpl $0x0, 0x54(%r15)
je 0x11bb9
cmpl $0x0, 0x54(%r15)
jle 0x11bc8
xorl %r12d, %r12d
movzwl 0xc(%r15,%r12,2), %eax
testw %ax, %ax
je 0x11baa
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x10aa9
incq %r12
movslq 0x54(%r15), %rax
cmpq %rax, %r12
jl 0x11b94
jmp 0x11bc8
retq
leaq 0x2588(%rip), %rdi      # 0x14148
movq %rbx, %rsi
callq 0x1100
leaq 0x2587(%rip), %rdi      # 0x14156
movq %rbx, %rsi
callq 0x1100
cmpl $0x0, 0x58(%r15)
je 0x11c0c
cmpl $0x0, 0x58(%r15)
jle 0x11c1b
xorl %r12d, %r12d
movzwl 0x1a(%r15,%r12,2), %eax
testw %ax, %ax
je 0x11bfe
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x10aa9
incq %r12
movslq 0x58(%r15), %rax
cmpq %rax, %r12
jl 0x11be8
jmp 0x11c1b
leaq 0x2535(%rip), %rdi      # 0x14148
movq %rbx, %rsi
callq 0x1100
cmpl $0x0, 0x5c(%r15)
je 0x11c66
leaq 0x252d(%rip), %rdi      # 0x14156
movq %rbx, %rsi
callq 0x1100
cmpl $0x0, 0x5c(%r15)
je 0x11c72
cmpl $0x0, 0x5c(%r15)
jle 0x11c81
xorl %r12d, %r12d
movzwl 0x28(%r15,%r12,2), %eax
testw %ax, %ax
je 0x11c58
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x10aa9
incq %r12
movslq 0x5c(%r15), %rax
cmpq %rax, %r12
jl 0x11c42
jmp 0x11c81
leaq 0x24ca(%rip), %r12      # 0x14137
jmp 0x11d35
leaq 0x24cf(%rip), %rdi      # 0x14148
movq %rbx, %rsi
callq 0x1100
leaq 0x24ce(%rip), %rdi      # 0x14156
movq %rbx, %rsi
callq 0x1100
cmpl $0x0, 0x60(%r15)
je 0x11cc5
cmpl $0x0, 0x60(%r15)
jle 0x11cd4
xorl %r12d, %r12d
movzwl 0x36(%r15,%r12,2), %eax
testw %ax, %ax
je 0x11cb7
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x10aa9
incq %r12
movslq 0x60(%r15), %rax
cmpq %rax, %r12
jl 0x11ca1
jmp 0x11cd4
leaq 0x247c(%rip), %rdi      # 0x14148
movq %rbx, %rsi
callq 0x1100
leaq 0x247b(%rip), %rdi      # 0x14156
movq %rbx, %rsi
callq 0x1100
cmpl $0x0, 0x64(%r15)
je 0x11d1f
leaq 0x244f(%rip), %r12      # 0x14140
cmpl $0x0, 0x64(%r15)
jle 0x11d35
xorl %r13d, %r13d
movzwl 0x44(%r15,%r13,2), %eax
testw %ax, %ax
je 0x11d11
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x10aa9
incq %r13
movslq 0x64(%r15), %rax
cmpq %rax, %r13
jl 0x11cfb
jmp 0x11d35
leaq 0x2422(%rip), %rdi      # 0x14148
movq %rbx, %rsi
callq 0x1100
leaq 0x240b(%rip), %r12      # 0x14140
movl 0x68(%r15), %edx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x1150
leaq 0x2409(%rip), %rdi      # 0x14156
movq %rbx, %rsi
callq 0x1100
testq %r14, %r14
je 0x11d67
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1100
jmp 0x11d77
movq 0x70(%r15), %rsi
movl 0x78(%r15), %edx
movq %rbx, %rdi
callq 0x10a3c
leaq 0x21c2(%rip), %rdi      # 0x13f40
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1100