// File: /workspace/github_c_makefile_star2_O2/MikeGray-APH[P]LibLouisAPH/source/outputs/table-output.c
// Function: table_output
void table_output(FILE *output, const struct table *table)
{
	int i;

	if(!table)
		return;

	for(i = 0; i < 32; i++)
		attrs_chars[i] = table->attrs_chars[i];

	fprintf(output, "%s\n", table->file_name);
	fputs("\n", output);
	process_output(output, table->process);
	fprintf(output, "\ncontrol:  0x%04x   0x%04x   0x%04x   0x%04x   0x%04x   0x%04x   0x%04x\n", table->marker_user, table->marker_begin, table->marker_end, table->marker_modifier, table->marker_hard, table->marker_soft, table->marker_internal);
	fputs("\ncharacters:\n", output);
	character_output_all(output, table);
	fputs("\ncharacter hash:\n", output);
	character_hash_output(output, table);
	fprintf(output, "\nmodes:  [%d]\n", table->emphases_cnt);
	mode_output(output, &table->nocontract, "nocontract");
	mode_output(output, &table->capital, "capital");
	mode_output(output, &table->numeric, "numeric");
	fprintf(output, "\nemphases:  [%d]\n", table->emphases_cnt);
	mode_output(output, table->emphases, NULL);
	fputs("\nsubpatterns:\n", output);
	subpattern_output(output, table->subpatterns);
	fputs("\nfilters:\n", output);
	filter_output(output, table->filters);

	fprintf(output, "\ninit chars hash:  [%d]\n", table->init_chars_hash_cnt);
	rules_output(output, (const struct rule* const*)table->init_chars_hash, TABLE_INIT_HASH_SIZE, FORWARD, 0);
	fprintf(output, "\ninit dots hash:  [%d]\n", table->init_dots_hash_cnt);
	rules_output(output, (const struct rule* const*)table->init_dots_hash, TABLE_DOTS_HASH_SIZE, BACKWARD, 0);

	fprintf(output, "\npremode chars hash:  [%d]\n", table->premode_chars_hash_cnt);
	rules_output(output, (const struct rule* const*)table->premode_chars_hash, TABLE_PREMODE_HASH_SIZE, FORWARD, 0);
	fprintf(output, "\npremode dots hash:  [%d]\n", table->premode_dots_hash_cnt);
	rules_output(output, (const struct rule* const*)table->premode_dots_hash, TABLE_DOTS_HASH_SIZE, BACKWARD, 0);

	fprintf(output, "\npostmode chars hash:  [%d]\n", table->postmode_chars_hash_cnt);
	rules_output(output, (const struct rule* const*)table->postmode_chars_hash, TABLE_POSTMODE_HASH_SIZE, FORWARD, 0);
	fprintf(output, "\npostmode dots hash:  [%d]\n", table->postmode_dots_hash_cnt);
	rules_output(output, (const struct rule* const*)table->postmode_dots_hash, TABLE_DOTS_HASH_SIZE, BACKWARD, 0);

	fprintf(output, "\npretrans chars hash:  [%d]\n", table->pretrans_chars_hash_cnt);
	rules_output(output, (const struct rule* const*)table->pretrans_chars_hash, TABLE_PRETRANS_HASH_SIZE, FORWARD, 0);
	fprintf(output, "\npretrans dots hash:  [%d]\n", table->pretrans_dots_hash_cnt);
	rules_output(output, (const struct rule* const*)table->pretrans_dots_hash, TABLE_DOTS_HASH_SIZE, BACKWARD, 0);

	fprintf(output, "\ntrans chars hash:  [%d]\n", table->trans_chars_hash_cnt);
	rules_output(output, (const struct rule* const*)table->trans_chars_hash, TABLE_TRANS_HASH_SIZE, FORWARD, 0);
	fprintf(output, "\ntrans dots hash:  [%d]\n", table->trans_dots_hash_cnt);
	rules_output(output, (const struct rule* const*)table->trans_dots_hash, TABLE_DOTS_HASH_SIZE, BACKWARD, 0);

	fprintf(output, "\nposttrans chars hash:  [%d]\n", table->posttrans_chars_hash_cnt);
	rules_output(output, (const struct rule* const*)table->posttrans_chars_hash, TABLE_POSTTRANS_HASH_SIZE, FORWARD, 0);
	fprintf(output, "\nposttrans dots hash:  [%d]\n", table->posttrans_dots_hash_cnt);
	rules_output(output, (const struct rule* const*)table->posttrans_dots_hash, TABLE_DOTS_HASH_SIZE, BACKWARD, 0);

	fprintf(output, "\nfini chars hash:  [%d]\n", table->fini_chars_hash_cnt);
	rules_output(output, (const struct rule* const*)table->fini_chars_hash, TABLE_FINI_HASH_SIZE, FORWARD, 0);
	fprintf(output, "\nfini dots hash:  [%d]\n", table->fini_dots_hash_cnt);
	rules_output(output, (const struct rule* const*)table->fini_dots_hash, TABLE_DOTS_HASH_SIZE, BACKWARD, 0);

	fflush(output);
}

// Assembly:
testq %rsi, %rsi
je 0xf7d6
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x9b36(%rip), %rcx      # 0x192b0
cmpq $0x20, %rax
je 0xf78d
movb 0x30(%r15,%rax), %dl
movb %dl, (%rax,%rcx)
incq %rax
jmp 0xf77a
movq 0x10(%r15), %rdx
leaq 0x2350(%rip), %rsi      # 0x11ae8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
leaq 0x27d7(%rip), %rdi      # 0x11f80
movq %rbx, %rsi
callq 0x1100
movl 0x18(%r15), %ebp
leaq 0x297a(%rip), %rdi      # 0x12136
movq %rbx, %rsi
callq 0x1100
testl %ebp, %ebp
je 0xf7d7
cmpl $0x1, %ebp
jne 0xf7e6
leaq 0x2976(%rip), %rdi      # 0x1214a
jmp 0xf7de
retq
leaq 0x2963(%rip), %rdi      # 0x12141
movq %rbx, %rsi
callq 0x1100
movzwl 0x1e8(%r15), %edx
movzwl 0x1ea(%r15), %ecx
movzwl 0x1ec(%r15), %r8d
movzwl 0x1ee(%r15), %r9d
movzwl 0x1f0(%r15), %r10d
movzwl 0x1f2(%r15), %r11d
movzwl 0x1f4(%r15), %r14d
subq $0x8, %rsp
leaq 0x26f0(%rip), %rsi      # 0x11f19
movq %rbx, %rdi
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r10
callq 0x1160
addq $0x20, %rsp
leaq 0x271e(%rip), %rdi      # 0x11f62
movq %rbx, %rsi
callq 0x1100
movq %r15, 0x10(%rsp)
leaq 0x1f8(%r15), %r13
leaq 0x25b2(%rip), %r14      # 0x11e11
leaq 0x2931(%rip), %r15      # 0x12197
leaq 0x28fd(%rip), %r12      # 0x1216a
xorl %eax, %eax
movq %r13, 0x8(%rsp)
cmpq $0x10, %rax
je 0xf945
leaq (%r13,%rax,8), %r13
movq %rax, (%rsp)
movq (%r13), %r13
testq %r13, %r13
je 0xf938
movzwl 0x20(%r13), %esi
movq %rbx, %rdi
callq 0xed51
leaq 0x2623(%rip), %rdi      # 0x11ecb
movq %rbx, %rsi
callq 0x1100
movzwl 0x20(%r13), %edx
movl 0x24(%r13), %ecx
movq %rbx, %rdi
leaq 0x2893(%rip), %rsi      # 0x12156
xorl %eax, %eax
callq 0x1160
leaq 0x28c4(%rip), %rdi      # 0x12195
movq %rbx, %rsi
callq 0x1100
pushq $0x1
popq %rbp
cmpq $0x4, %rbp
je 0xf920
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1100
movq (%r13,%rbp,8), %rax
testq %rax, %rax
je 0xf905
movzwl 0x20(%rax), %esi
movq %rbx, %rdi
callq 0xed51
jmp 0xf910
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1100
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1100
incq %rbp
jmp 0xf8dc
leaq 0x2659(%rip), %rdi      # 0x11f80
movq %rbx, %rsi
callq 0x1100
movq (%rsp), %rax
jmp 0xf887
incq %rax
movq 0x8(%rsp), %r13
jmp 0xf874
leaq 0x2624(%rip), %rdi      # 0x11f70
movq %rbx, %rsi
callq 0x1100
xorl %r15d, %r15d
leaq 0x2839(%rip), %r12      # 0x12197
movabsq $0x100002600, %r14      # imm = 0x100002600
xorl %edx, %edx
cmpq $0x10, %r15
je 0xfa1d
cmpq $0x0, (%r13,%r15,8)
je 0xfa15
movl %edx, (%rsp)
leaq (,%r15,8), %rbp
addq %r13, %rbp
xorl %r13d, %r13d
movq %rbx, %rdi
leaq 0x27cb(%rip), %rsi      # 0x12166
movl %r15d, %edx
xorl %eax, %eax
callq 0x1160
movq (%rbp), %rbp
testq %rbp, %rbp
je 0xf9f7
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1100
movzwl 0x20(%rbp), %esi
leal -0x2000(%rsi), %eax
cmpl $0xc, %eax
jb 0xf9d5
cmpl $0x20, %esi
ja 0xf9e5
movl %esi, %eax
btq %rax, %r14
jae 0xf9e5
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1100
incl %r13d
jmp 0xf9a5
cmpl $0xa0, %esi
je 0xf9d5
movq %rbx, %rdi
callq 0xed51
jmp 0xf9e0
leaq 0x2582(%rip), %rdi      # 0x11f80
movq %rbx, %rsi
callq 0x1100
movl (%rsp), %edx
cmpl %edx, %r13d
cmovgl %r13d, %edx
movq 0x8(%rsp), %r13
incq %r15
jmp 0xf96a
leaq 0x2748(%rip), %rsi      # 0x1216c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x10(%rsp), %r14
movl 0x1e4(%r14), %edx
leaq 0x2541(%rip), %rsi      # 0x11f82
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
leaq 0x50(%r14), %rsi
leaq 0x1c42(%rip), %rdx      # 0x11698
movq %rbx, %rdi
callq 0xfd4b
leaq 0xd0(%r14), %rsi
leaq 0x1c37(%rip), %rdx      # 0x116a3
movq %rbx, %rdi
callq 0xfd4b
leaq 0x150(%r14), %rsi
leaq 0x1c29(%rip), %rdx      # 0x116ab
movq %rbx, %rdi
callq 0xfd4b
movl 0x1e4(%r14), %edx
leaq 0x24f9(%rip), %rsi      # 0x11f91
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x1d0(%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xfd4b
leaq 0x24e9(%rip), %rdi      # 0x11fa3
movq %rbx, %rsi
callq 0x1100
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0xff76
leaq 0x24dd(%rip), %rdi      # 0x11fb2
movq %rbx, %rsi
callq 0x1100
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x10029
movl 0x288(%r14), %edx
leaq 0x24c6(%rip), %rsi      # 0x11fbd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x278(%r14), %rsi
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %edx
callq 0x100f9
movl 0x28c(%r14), %edx
leaq 0x24b3(%rip), %rsi      # 0x11fd6
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x280(%r14), %rsi
pushq $-0x1
popq %r15
movq %rbx, %rdi
movl %r15d, %edx
callq 0x100f9
movl 0x2a0(%r14), %edx
leaq 0x249d(%rip), %rsi      # 0x11fee
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x290(%r14), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x100f9
movl 0x2a4(%r14), %edx
leaq 0x2490(%rip), %rsi      # 0x1200a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x298(%r14), %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0x100f9
movl 0x2b8(%r14), %edx
leaq 0x2481(%rip), %rsi      # 0x12025
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x2a8(%r14), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x100f9
movl 0x2bc(%r14), %edx
leaq 0x2475(%rip), %rsi      # 0x12042
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x2b0(%r14), %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0x100f9
movl 0x2d0(%r14), %edx
leaq 0x2467(%rip), %rsi      # 0x1205e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x2c0(%r14), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x100f9
movl 0x2d4(%r14), %edx
leaq 0x245b(%rip), %rsi      # 0x1207b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x2c8(%r14), %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0x100f9
movl 0x2e8(%r14), %edx
leaq 0x244d(%rip), %rsi      # 0x12097
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x2d8(%r14), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x100f9
movl 0x2ec(%r14), %edx
leaq 0x243e(%rip), %rsi      # 0x120b1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x2e0(%r14), %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0x100f9
movl 0x300(%r14), %edx
leaq 0x242d(%rip), %rsi      # 0x120ca
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x2f0(%r14), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x100f9
movl 0x304(%r14), %edx
leaq 0x2422(%rip), %rsi      # 0x120e8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x2f8(%r14), %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0x100f9
movl 0x318(%r14), %edx
leaq 0x2415(%rip), %rsi      # 0x12105
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x308(%r14), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x100f9
movl 0x31c(%r14), %edx
leaq 0x2405(%rip), %rsi      # 0x1211e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x310(%r14), %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0x100f9
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11a0