// File: /workspace/github_c_makefile_star2_O3/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 0x1155c
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 0x8d9e(%rip), %rcx      # 0x1a2a0
movb 0x30(%r14,%rax), %dl
movb %dl, (%rax,%rcx)
incq %rax
cmpq $0x20, %rax
jne 0x11502
movq 0x10(%r14), %rdx
leaq 0x265a(%rip), %rsi      # 0x13b78
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
leaq 0x2b1d(%rip), %rdi      # 0x1404c
movq %rbx, %rsi
callq 0x1100
movl 0x18(%r14), %ebp
leaq 0x2cc0(%rip), %rdi      # 0x14202
movq %rbx, %rsi
callq 0x1100
testl %ebp, %ebp
je 0x1155d
cmpl $0x1, %ebp
jne 0x1156c
leaq 0x2cbc(%rip), %rdi      # 0x14216
jmp 0x11564
retq
leaq 0x2ca9(%rip), %rdi      # 0x1420d
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 0x2a31(%rip), %rsi      # 0x13fe5
movq %rbx, %rdi
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r10
callq 0x1160
addq $0x20, %rsp
leaq 0x2a5f(%rip), %rdi      # 0x1402e
movq %rbx, %rsi
callq 0x1100
leaq 0x28ff(%rip), %rbp      # 0x13edd
leaq 0x2c7e(%rip), %r14      # 0x14263
leaq 0x2c4a(%rip), %r15      # 0x14236
xorl %ecx, %ecx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rsp)
movq 0x1f8(%rax,%rcx,8), %r13
testq %r13, %r13
je 0x116ae
movzwl 0x20(%r13), %esi
movq %rbx, %rdi
callq 0x1099e
leaq 0x297a(%rip), %rdi      # 0x13f97
movq %rbx, %rsi
callq 0x1100
movzwl 0x20(%r13), %edx
movl 0x24(%r13), %ecx
movq %rbx, %rdi
leaq 0x2bea(%rip), %rsi      # 0x14222
xorl %eax, %eax
callq 0x1160
leaq 0x2c1b(%rip), %rdi      # 0x14261
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 0x11677
movzwl 0x20(%rax), %esi
movq %rbx, %rdi
callq 0x1099e
jmp 0x11682
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1100
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1100
incq %r12
cmpq $0x4, %r12
jne 0x11654
leaq 0x29af(%rip), %rdi      # 0x1404c
movq %rbx, %rsi
callq 0x1100
movq (%r13), %r13
jmp 0x11600
movq 0x10(%rsp), %rcx
incq %rcx
cmpq $0x10, %rcx
jne 0x115ee
leaq 0x2975(%rip), %rdi      # 0x1403c
movq %rbx, %rsi
callq 0x1100
xorl %r15d, %r15d
leaq 0x2b8a(%rip), %r12      # 0x14263
xorl %ebp, %ebp
movq 0x8(%rsp), %r14
cmpq $0x0, 0x1f8(%r14,%r15,8)
je 0x1178d
xorl %r13d, %r13d
movq %rbx, %rdi
leaq 0x2b36(%rip), %rsi      # 0x14232
movl %r15d, %edx
xorl %eax, %eax
callq 0x1160
movq 0x1f8(%r14,%r15,8), %r14
testq %r14, %r14
je 0x11772
xorl %r13d, %r13d
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1100
movzwl 0x20(%r14), %esi
leal -0x2000(%rsi), %eax
cmpl $0xc, %eax
jb 0x11748
cmpl $0x20, %esi
ja 0x11760
movl %esi, %eax
movabsq $0x100002600, %rcx      # imm = 0x100002600
btq %rax, %rcx
jae 0x11760
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1100
movq (%r14), %r14
incl %r13d
testq %r14, %r14
jne 0x11716
jmp 0x11772
cmpl $0xa0, %esi
je 0x11748
movq %rbx, %rdi
callq 0x1099e
jmp 0x11753
leaq 0x28d3(%rip), %rdi      # 0x1404c
movq %rbx, %rsi
callq 0x1100
cmpl %ebp, %r13d
cmovgl %r13d, %ebp
movq 0x8(%rsp), %r14
incq %r15
cmpq $0x10, %r15
jne 0x116e0
leaq 0x2a97(%rip), %rsi      # 0x14238
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1160
movl 0x1e4(%r14), %edx
leaq 0x2893(%rip), %rsi      # 0x1404e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
leaq 0x50(%r14), %rsi
leaq 0x1f28(%rip), %rdx      # 0x136f8
movq %rbx, %rdi
callq 0x11ae1
leaq 0xd0(%r14), %rsi
leaq 0x1f1d(%rip), %rdx      # 0x13703
movq %rbx, %rdi
callq 0x11ae1
leaq 0x150(%r14), %rsi
leaq 0x1f0f(%rip), %rdx      # 0x1370b
movq %rbx, %rdi
callq 0x11ae1
movl 0x1e4(%r14), %edx
leaq 0x284b(%rip), %rsi      # 0x1405d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x1d0(%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11ae1
leaq 0x283b(%rip), %rdi      # 0x1406f
movq %rbx, %rsi
callq 0x1100
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x11d16
leaq 0x282f(%rip), %rdi      # 0x1407e
movq %rbx, %rsi
callq 0x1100
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x11dcd
movl 0x288(%r14), %edx
leaq 0x2818(%rip), %rsi      # 0x14089
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x278(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x11e9d
movl 0x28c(%r14), %edx
leaq 0x2805(%rip), %rsi      # 0x140a2
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x280(%r14), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11e9d
movl 0x2a0(%r14), %edx
leaq 0x27f1(%rip), %rsi      # 0x140ba
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x290(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x11e9d
movl 0x2a4(%r14), %edx
leaq 0x27e1(%rip), %rsi      # 0x140d6
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x298(%r14), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11e9d
movl 0x2b8(%r14), %edx
leaq 0x27d0(%rip), %rsi      # 0x140f1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x2a8(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x11e9d
movl 0x2bc(%r14), %edx
leaq 0x27c1(%rip), %rsi      # 0x1410e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x2b0(%r14), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11e9d
movl 0x2d0(%r14), %edx
leaq 0x27b1(%rip), %rsi      # 0x1412a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x2c0(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x11e9d
movl 0x2d4(%r14), %edx
leaq 0x27a2(%rip), %rsi      # 0x14147
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x2c8(%r14), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11e9d
movl 0x2e8(%r14), %edx
leaq 0x2792(%rip), %rsi      # 0x14163
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x2d8(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x11e9d
movl 0x2ec(%r14), %edx
leaq 0x2780(%rip), %rsi      # 0x1417d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x2e0(%r14), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11e9d
movl 0x300(%r14), %edx
leaq 0x276d(%rip), %rsi      # 0x14196
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x2f0(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x11e9d
movl 0x304(%r14), %edx
leaq 0x275f(%rip), %rsi      # 0x141b4
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x2f8(%r14), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11e9d
movl 0x318(%r14), %edx
leaq 0x2750(%rip), %rsi      # 0x141d1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x308(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x11e9d
movl 0x31c(%r14), %edx
leaq 0x273d(%rip), %rsi      # 0x141ea
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
movq 0x310(%r14), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11e9d
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11a0