// File: /workspace/github_c_makefile_star2_O1/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 0x115d0
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x8d2a(%rip), %rcx      # 0x1a2a0
movb 0x30(%r14,%rax), %dl
movb %dl, (%rax,%rcx)
incq %rax
cmpq $0x20, %rax
jne 0x11576
movq 0x10(%r14), %rdx
leaq 0x2516(%rip), %rsi      # 0x13aa8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
leaq 0x299d(%rip), %rdi      # 0x13f40
movq %rbx, %rsi
callq 0x1100
movl 0x18(%r14), %ebp
leaq 0x2b40(%rip), %rdi      # 0x140f6
movq %rbx, %rsi
callq 0x1100
testl %ebp, %ebp
je 0x115d1
cmpl $0x1, %ebp
jne 0x115e0
leaq 0x2b3c(%rip), %rdi      # 0x1410a
jmp 0x115d8
retq
leaq 0x2b29(%rip), %rdi      # 0x14101
movq %rbx, %rsi
callq 0x1100
movzwl 0x1e8(%r14), %edx
movzwl 0x1ea(%r14), %ecx
movzwl 0x1ec(%r14), %r8d
movzwl 0x1ee(%r14), %r9d
movzwl 0x1f0(%r14), %r10d
movzwl 0x1f2(%r14), %r11d
movq %r14, 0x8(%rsp)
movzwl 0x1f4(%r14), %r14d
subq $0x8, %rsp
leaq 0x28b1(%rip), %rsi      # 0x13ed9
movq %rbx, %rdi
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r10
callq 0x1150
addq $0x20, %rsp
leaq 0x28df(%rip), %rdi      # 0x13f22
movq %rbx, %rsi
callq 0x1100
leaq 0x277f(%rip), %rbp      # 0x13dd1
leaq 0x2afe(%rip), %r14      # 0x14157
leaq 0x2aca(%rip), %r15      # 0x1412a
xorl %ecx, %ecx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rsp)
movq 0x1f8(%rax,%rcx,8), %r13
testq %r13, %r13
je 0x11722
movzwl 0x20(%r13), %esi
movq %rbx, %rdi
callq 0x10b1e
leaq 0x27fa(%rip), %rdi      # 0x13e8b
movq %rbx, %rsi
callq 0x1100
movzwl 0x20(%r13), %edx
movl 0x24(%r13), %ecx
movq %rbx, %rdi
leaq 0x2a6a(%rip), %rsi      # 0x14116
xorl %eax, %eax
callq 0x1150
leaq 0x2a9b(%rip), %rdi      # 0x14155
movq %rbx, %rsi
callq 0x1100
movl $0x1, %r12d
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x1100
movq (%r13,%r12,8), %rax
testq %rax, %rax
je 0x116eb
movzwl 0x20(%rax), %esi
movq %rbx, %rdi
callq 0x10b1e
jmp 0x116f6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1100
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1100
incq %r12
cmpq $0x4, %r12
jne 0x116c8
leaq 0x282f(%rip), %rdi      # 0x13f40
movq %rbx, %rsi
callq 0x1100
movq (%r13), %r13
jmp 0x11674
movq 0x10(%rsp), %rcx
incq %rcx
cmpq $0x10, %rcx
jne 0x11662
leaq 0x27f5(%rip), %rdi      # 0x13f30
movq %rbx, %rsi
callq 0x1100
xorl %r15d, %r15d
leaq 0x2a0a(%rip), %r12      # 0x14157
xorl %ebp, %ebp
movq 0x8(%rsp), %r14
cmpq $0x0, 0x1f8(%r14,%r15,8)
je 0x11801
xorl %r13d, %r13d
movq %rbx, %rdi
leaq 0x29b6(%rip), %rsi      # 0x14126
movl %r15d, %edx
xorl %eax, %eax
callq 0x1150
movq 0x1f8(%r14,%r15,8), %r14
testq %r14, %r14
je 0x117e6
xorl %r13d, %r13d
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1100
movzwl 0x20(%r14), %esi
leal -0x2000(%rsi), %eax
cmpl $0xc, %eax
jb 0x117bc
cmpl $0x20, %esi
ja 0x117d4
movl %esi, %eax
movabsq $0x100002600, %rcx      # imm = 0x100002600
btq %rax, %rcx
jae 0x117d4
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1100
movq (%r14), %r14
incl %r13d
testq %r14, %r14
jne 0x1178a
jmp 0x117e6
cmpl $0xa0, %esi
je 0x117bc
movq %rbx, %rdi
callq 0x10b1e
jmp 0x117c7
leaq 0x2753(%rip), %rdi      # 0x13f40
movq %rbx, %rsi
callq 0x1100
cmpl %ebp, %r13d
cmovgl %r13d, %ebp
movq 0x8(%rsp), %r14
incq %r15
cmpq $0x10, %r15
jne 0x11754
leaq 0x2917(%rip), %rsi      # 0x1412c
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1150
movl 0x1e4(%r14), %edx
leaq 0x2713(%rip), %rsi      # 0x13f42
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
leaq 0x50(%r14), %rsi
leaq 0x1e18(%rip), %rdx      # 0x1365c
movq %rbx, %rdi
callq 0x11b55
leaq 0xd0(%r14), %rsi
leaq 0x1e0d(%rip), %rdx      # 0x13667
movq %rbx, %rdi
callq 0x11b55
leaq 0x150(%r14), %rsi
leaq 0x1dff(%rip), %rdx      # 0x1366f
movq %rbx, %rdi
callq 0x11b55
movl 0x1e4(%r14), %edx
leaq 0x26cb(%rip), %rsi      # 0x13f51
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
movq 0x1d0(%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11b55
leaq 0x26bb(%rip), %rdi      # 0x13f63
movq %rbx, %rsi
callq 0x1100
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x11d8f
leaq 0x26af(%rip), %rdi      # 0x13f72
movq %rbx, %rsi
callq 0x1100
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x11e46
movl 0x288(%r14), %edx
leaq 0x2698(%rip), %rsi      # 0x13f7d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
movq 0x278(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x11f16
movl 0x28c(%r14), %edx
leaq 0x2685(%rip), %rsi      # 0x13f96
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
movq 0x280(%r14), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11f16
movl 0x2a0(%r14), %edx
leaq 0x2671(%rip), %rsi      # 0x13fae
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
movq 0x290(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x11f16
movl 0x2a4(%r14), %edx
leaq 0x2661(%rip), %rsi      # 0x13fca
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
movq 0x298(%r14), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11f16
movl 0x2b8(%r14), %edx
leaq 0x2650(%rip), %rsi      # 0x13fe5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
movq 0x2a8(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x11f16
movl 0x2bc(%r14), %edx
leaq 0x2641(%rip), %rsi      # 0x14002
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
movq 0x2b0(%r14), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11f16
movl 0x2d0(%r14), %edx
leaq 0x2631(%rip), %rsi      # 0x1401e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
movq 0x2c0(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x11f16
movl 0x2d4(%r14), %edx
leaq 0x2622(%rip), %rsi      # 0x1403b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
movq 0x2c8(%r14), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11f16
movl 0x2e8(%r14), %edx
leaq 0x2612(%rip), %rsi      # 0x14057
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
movq 0x2d8(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x11f16
movl 0x2ec(%r14), %edx
leaq 0x2600(%rip), %rsi      # 0x14071
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
movq 0x2e0(%r14), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11f16
movl 0x300(%r14), %edx
leaq 0x25ed(%rip), %rsi      # 0x1408a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
movq 0x2f0(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x11f16
movl 0x304(%r14), %edx
leaq 0x25df(%rip), %rsi      # 0x140a8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
movq 0x2f8(%r14), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11f16
movl 0x318(%r14), %edx
leaq 0x25d0(%rip), %rsi      # 0x140c5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
movq 0x308(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x11f16
movl 0x31c(%r14), %edx
leaq 0x25bd(%rip), %rsi      # 0x140de
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1150
movq 0x310(%r14), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11f16
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1190