// File: /workspace/github_c_makefile_star2_O0/MikeGray-APH[P]LibLouisAPH/source/table.c
// Function: table_fini
void table_fini(struct table *table)
{
	struct rule rule_auto;
	int i;

	if(!table)
		return;

	memset(&rule_auto, 0, sizeof(struct rule));

	for(i = 0; i < TABLE_UNICHAR_HASH_SIZE; i++)
		character_free(table->character_hash[i]);

#ifdef TABLE_ALLOCATE_HASHES

	if(table->init_dots_hash)
	{
		for(i = 0; i < TABLE_DOTS_HASH_SIZE; i++)
		{
			rule_auto.dots_nxt = table->init_dots_hash[i];
			rule_free_backward(&rule_auto);
		}
		FREE(table->init_dots_hash);
	}
	if(table->init_chars_hash)
	{
		for(i = 0; i < TABLE_INIT_HASH_SIZE; i++)
			rule_free(table->init_chars_hash[i]);
		FREE(table->init_chars_hash);
	}

	if(table->premode_dots_hash)
	{
		for(i = 0; i < TABLE_DOTS_HASH_SIZE; i++)
		{
			rule_auto.dots_nxt = table->premode_dots_hash[i];
			rule_free_backward(&rule_auto);
		}
		FREE(table->premode_dots_hash);
	}
	if(table->premode_chars_hash)
	{
		for(i = 0; i < TABLE_PREMODE_HASH_SIZE; i++)
			rule_free(table->premode_chars_hash[i]);
		FREE(table->premode_chars_hash);
	}

	if(table->postmode_dots_hash)
	{
		for(i = 0; i < TABLE_DOTS_HASH_SIZE; i++)
		{
			rule_auto.dots_nxt = table->postmode_dots_hash[i];
			rule_free_backward(&rule_auto);
		}
		FREE(table->postmode_dots_hash);
	}
	if(table->postmode_chars_hash)
	{
		for(i = 0; i < TABLE_POSTMODE_HASH_SIZE; i++)
			rule_free(table->postmode_chars_hash[i]);
		FREE(table->postmode_chars_hash);
	}

	if(table->pretrans_dots_hash)
	{
		for(i = 0; i < TABLE_DOTS_HASH_SIZE; i++)
		{
			rule_auto.dots_nxt = table->pretrans_dots_hash[i];
			rule_free_backward(&rule_auto);
		}
		FREE(table->pretrans_dots_hash);
	}
	if(table->pretrans_chars_hash)
	{
		for(i = 0; i < TABLE_PRETRANS_HASH_SIZE; i++)
			rule_free(table->pretrans_chars_hash[i]);
		FREE(table->pretrans_chars_hash);
	}

	if(table->trans_dots_hash)
	{
		for(i = 0; i < TABLE_DOTS_HASH_SIZE; i++)
		{
			rule_auto.dots_nxt = table->trans_dots_hash[i];
			rule_free_backward(&rule_auto);
		}
		FREE(table->trans_dots_hash);
	}
	if(table->trans_chars_hash)
	{
		for(i = 0; i < TABLE_TRANS_HASH_SIZE; i++)
			rule_free(table->trans_chars_hash[i]);
		FREE(table->trans_chars_hash);
	}

	if(table->posttrans_dots_hash)
	{
		for(i = 0; i < TABLE_DOTS_HASH_SIZE; i++)
		{
			rule_auto.dots_nxt = table->posttrans_dots_hash[i];
			rule_free_backward(&rule_auto);
		}
		FREE(table->posttrans_dots_hash);
	}
	if(table->posttrans_chars_hash)
	{
		for(i = 0; i < TABLE_POSTTRANS_HASH_SIZE; i++)
			rule_free(table->posttrans_chars_hash[i]);
		FREE(table->posttrans_chars_hash);
	}

	if(table->fini_dots_hash)
	{
		for(i = 0; i < TABLE_DOTS_HASH_SIZE; i++)
		{
			rule_auto.dots_nxt = table->fini_dots_hash[i];
			rule_free_backward(&rule_auto);
		}
		FREE(table->fini_dots_hash);
	}
	if(table->fini_chars_hash)
	{
		for(i = 0; i < TABLE_FINI_HASH_SIZE; i++)
			rule_free(table->fini_chars_hash[i]);
		FREE(table->fini_chars_hash);
	}

#else

	for(i = 0; i < TABLE_DOTS_HASH_SIZE; i++)
	{
		rule_auto.dots_nxt = table->init_dots_hash[i];
		rule_free_backward(&rule_auto);
	}
	for(i = 0; i < TABLE_INIT_HASH_SIZE; i++)
		rule_free(table->init_chars_hash[i]);

	for(i = 0; i < TABLE_DOTS_HASH_SIZE; i++)
	{
		rule_auto.dots_nxt = table->premode_dots_hash[i];
		rule_free_backward(&rule_auto);
	}
	for(i = 0; i < TABLE_PREMODE_HASH_SIZE; i++)
		rule_free(table->premode_chars_hash[i]);

	for(i = 0; i < TABLE_DOTS_HASH_SIZE; i++)
	{
		rule_auto.dots_nxt = table->postmode_dots_hash[i];
		rule_free_backward(&rule_auto);
	}
	for(i = 0; i < TABLE_POSTMODE_HASH_SIZE; i++)
		rule_free(table->postmode_chars_hash[i]);

	for(i = 0; i < TABLE_DOTS_HASH_SIZE; i++)
	{
		rule_auto.dots_nxt = table->pretrans_dots_hash[i];
		rule_free_backward(&rule_auto);
	}
	for(i = 0; i < TABLE_PRETRANS_HASH_SIZE; i++)
		rule_free(table->pretrans_chars_hash[i]);

	for(i = 0; i < TABLE_DOTS_HASH_SIZE; i++)
	{
		rule_auto.dots_nxt = table->trans_dots_hash[i];
		rule_free_backward(&rule_auto);
	}
	for(i = 0; i < TABLE_TRANS_HASH_SIZE; i++)
		rule_free(table->trans_chars_hash[i]);

	for(i = 0; i < TABLE_DOTS_HASH_SIZE; i++)
	{
		rule_auto.dots_nxt = table->posttrans_dots_hash[i];
		rule_free_backward(&rule_auto);
	}
	for(i = 0; i < TABLE_POSTTRANS_HASH_SIZE; i++)
		rule_free(table->posttrans_chars_hash[i]);

	for(i = 0; i < TABLE_DOTS_HASH_SIZE; i++)
	{
		rule_auto.dots_nxt = table->fini_dots_hash[i];
		rule_free_backward(&rule_auto);
	}
	for(i = 0; i < TABLE_FINI_HASH_SIZE; i++)
		rule_free(table->fini_chars_hash[i]);

#endif

	mode_free(table->emphases);
	filter_free(table->filters);
	subpattern_free(table->subpatterns);
	if(table->file_name)
		FREE(table->file_name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x1f4b
jmp 0x257e
leaq -0x98(%rbp), %rdi
xorl %esi, %esi
movl $0x90, %edx
callq 0x1100
movl $0x0, -0x9c(%rbp)
cmpl $0x10, -0x9c(%rbp)
jge 0x1f9a
movq -0x8(%rbp), %rax
movslq -0x9c(%rbp), %rcx
movq 0x1f8(%rax,%rcx,8), %rdi
callq 0x2590
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x1f68
movq -0x8(%rbp), %rax
cmpq $0x0, 0x280(%rax)
je 0x2008
movl $0x0, -0x9c(%rbp)
cmpl $0x100, -0x9c(%rbp)     # imm = 0x100
jge 0x1ff8
movq -0x8(%rbp), %rax
movq 0x280(%rax), %rax
movslq -0x9c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x88(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x25c0
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x1fb2
movq -0x8(%rbp), %rax
movq 0x280(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x278(%rax)
je 0x2068
movl $0x0, -0x9c(%rbp)
cmpl $0x100, -0x9c(%rbp)     # imm = 0x100
jge 0x2058
movq -0x8(%rbp), %rax
movq 0x278(%rax), %rax
movslq -0x9c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2640
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x2020
movq -0x8(%rbp), %rax
movq 0x278(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x298(%rax)
je 0x20d6
movl $0x0, -0x9c(%rbp)
cmpl $0x100, -0x9c(%rbp)     # imm = 0x100
jge 0x20c6
movq -0x8(%rbp), %rax
movq 0x298(%rax), %rax
movslq -0x9c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x88(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x25c0
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x2080
movq -0x8(%rbp), %rax
movq 0x298(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x290(%rax)
je 0x2136
movl $0x0, -0x9c(%rbp)
cmpl $0x100, -0x9c(%rbp)     # imm = 0x100
jge 0x2126
movq -0x8(%rbp), %rax
movq 0x290(%rax), %rax
movslq -0x9c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2640
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x20ee
movq -0x8(%rbp), %rax
movq 0x290(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2b0(%rax)
je 0x21a4
movl $0x0, -0x9c(%rbp)
cmpl $0x100, -0x9c(%rbp)     # imm = 0x100
jge 0x2194
movq -0x8(%rbp), %rax
movq 0x2b0(%rax), %rax
movslq -0x9c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x88(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x25c0
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x214e
movq -0x8(%rbp), %rax
movq 0x2b0(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2a8(%rax)
je 0x2204
movl $0x0, -0x9c(%rbp)
cmpl $0x100, -0x9c(%rbp)     # imm = 0x100
jge 0x21f4
movq -0x8(%rbp), %rax
movq 0x2a8(%rax), %rax
movslq -0x9c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2640
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x21bc
movq -0x8(%rbp), %rax
movq 0x2a8(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2c8(%rax)
je 0x2272
movl $0x0, -0x9c(%rbp)
cmpl $0x100, -0x9c(%rbp)     # imm = 0x100
jge 0x2262
movq -0x8(%rbp), %rax
movq 0x2c8(%rax), %rax
movslq -0x9c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x88(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x25c0
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x221c
movq -0x8(%rbp), %rax
movq 0x2c8(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2c0(%rax)
je 0x22d2
movl $0x0, -0x9c(%rbp)
cmpl $0x100, -0x9c(%rbp)     # imm = 0x100
jge 0x22c2
movq -0x8(%rbp), %rax
movq 0x2c0(%rax), %rax
movslq -0x9c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2640
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x228a
movq -0x8(%rbp), %rax
movq 0x2c0(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2e0(%rax)
je 0x2340
movl $0x0, -0x9c(%rbp)
cmpl $0x100, -0x9c(%rbp)     # imm = 0x100
jge 0x2330
movq -0x8(%rbp), %rax
movq 0x2e0(%rax), %rax
movslq -0x9c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x88(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x25c0
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x22ea
movq -0x8(%rbp), %rax
movq 0x2e0(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2d8(%rax)
je 0x23a0
movl $0x0, -0x9c(%rbp)
cmpl $0x100, -0x9c(%rbp)     # imm = 0x100
jge 0x2390
movq -0x8(%rbp), %rax
movq 0x2d8(%rax), %rax
movslq -0x9c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2640
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x2358
movq -0x8(%rbp), %rax
movq 0x2d8(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2f8(%rax)
je 0x240e
movl $0x0, -0x9c(%rbp)
cmpl $0x100, -0x9c(%rbp)     # imm = 0x100
jge 0x23fe
movq -0x8(%rbp), %rax
movq 0x2f8(%rax), %rax
movslq -0x9c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x88(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x25c0
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x23b8
movq -0x8(%rbp), %rax
movq 0x2f8(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2f0(%rax)
je 0x246e
movl $0x0, -0x9c(%rbp)
cmpl $0x100, -0x9c(%rbp)     # imm = 0x100
jge 0x245e
movq -0x8(%rbp), %rax
movq 0x2f0(%rax), %rax
movslq -0x9c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2640
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x2426
movq -0x8(%rbp), %rax
movq 0x2f0(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x310(%rax)
je 0x24dc
movl $0x0, -0x9c(%rbp)
cmpl $0x100, -0x9c(%rbp)     # imm = 0x100
jge 0x24cc
movq -0x8(%rbp), %rax
movq 0x310(%rax), %rax
movslq -0x9c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x88(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x25c0
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x2486
movq -0x8(%rbp), %rax
movq 0x310(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x308(%rax)
je 0x253c
movl $0x0, -0x9c(%rbp)
cmpl $0x100, -0x9c(%rbp)     # imm = 0x100
jge 0x252c
movq -0x8(%rbp), %rax
movq 0x308(%rax), %rax
movslq -0x9c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2640
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x24f4
movq -0x8(%rbp), %rax
movq 0x308(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
movq 0x1d0(%rax), %rdi
callq 0x2710
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2760
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0xbf10
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x257e
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1040
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)