// File: /workspace/github_c_makefile_star2_O0/MikeGray-APH[P]LibLouisAPH/source/compile.c
// Function: compile_mode
static int compile_mode(void)
{
	struct mode mode_auto, *mode;
	unichar *name;
	int name_len;

	if(!token_parse())
	{
		log_message(LOG_ERROR, "%s:%d  missing indicator name", table_file_names[include_depth], table_file_lines[include_depth]);
		return 0;
	}

	token_convert_escapes();
	name = token_crs;
	name_len = token_len;

	if(!mode_compile(&mode_auto))
		return 0;

	if(utf16_is_equal_cchars(name, name_len, "nocontract", 10))
	{
		table->nocontract = mode_auto;
		table->nocontract_set = 1;
		ASSERT(!table->nocontract.nxt)
		return 1;
	}
	if(utf16_is_equal_cchars(name, name_len, "capital", 7))
	{
		table->capital = mode_auto;
		table->capital_set = 1;
		ASSERT(!table->capital.nxt)
		return 1;
	}
	if(utf16_is_equal_cchars(name, name_len, "numeric", 7))
	{
		table->numeric = mode_auto;
		table->numeric_set = 1;
		ASSERT(!table->numeric.nxt)
		return 1;
	}

	mode_auto.name = MALLOC((name_len + 1) * sizeof(unichar));
	if(!mode_auto.name)
	{
		LOG_ALLOCATE_FAIL
		return 0;
	}
	utf16_copy(mode_auto.name, name, name_len + 1);
	mode_auto.name_len = name_len;

	mode = mode_allocate();
	if(!mode)
	{
		LOG_ALLOCATE_FAIL
		FREE(mode_auto.name);
		return 0;
	}
	*mode = mode_auto;

	mode->id = table->emphases_cnt++;

	mode->nxt = table->emphases;
	table->emphases = mode;

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
callq 0x6190
cmpl $0x0, %eax
jne 0x6c97
movslq 0x1d53c(%rip), %rcx     # 0x24198
leaq 0x1d55d(%rip), %rax     # 0x241c0
movq (%rax,%rcx,8), %rdx
movslq 0x1d52a(%rip), %rcx     # 0x24198
leaq 0x1d52b(%rip), %rax     # 0x241a0
movl (%rax,%rcx,4), %ecx
movl $0x6, %edi
leaq 0x17a3a(%rip), %rsi     # 0x1e6be
movb $0x0, %al
callq 0xf610
movl $0x0, -0x4(%rbp)
jmp 0x6f4d
callq 0x9670
movq 0x1f565(%rip), %rax     # 0x26208
movq %rax, -0x98(%rbp)
movl 0x1f550(%rip), %eax     # 0x26200
movl %eax, -0x9c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x9a00
cmpl $0x0, %eax
jne 0x6cd3
movl $0x0, -0x4(%rbp)
jmp 0x6f4d
movq -0x98(%rbp), %rdi
movl -0x9c(%rbp), %esi
leaq 0x179f5(%rip), %rdx     # 0x1e6dc
movl $0xa, %ecx
callq 0x9e50
cmpl $0x0, %eax
je 0x6d42
movq 0x1d463(%rip), %rdi     # 0x24160
addq $0x50, %rdi
leaq -0x88(%rbp), %rsi
movl $0x80, %edx
callq 0x1150
movq 0x1d447(%rip), %rax     # 0x24160
movl $0x1, 0x1d8(%rax)
movq 0x1d436(%rip), %rax     # 0x24160
cmpq $0x0, 0x50(%rax)
je 0x6d36
callq 0x1050
movl $0x1, -0x4(%rbp)
jmp 0x6f4d
movq -0x98(%rbp), %rdi
movl -0x9c(%rbp), %esi
leaq 0x17991(%rip), %rdx     # 0x1e6e7
movl $0x7, %ecx
callq 0x9e50
cmpl $0x0, %eax
je 0x6db7
movq 0x1d3f4(%rip), %rdi     # 0x24160
addq $0xd0, %rdi
leaq -0x88(%rbp), %rsi
movl $0x80, %edx
callq 0x1150
movq 0x1d3d5(%rip), %rax     # 0x24160
movl $0x1, 0x1dc(%rax)
movq 0x1d3c4(%rip), %rax     # 0x24160
cmpq $0x0, 0xd0(%rax)
je 0x6dab
callq 0x1050
movl $0x1, -0x4(%rbp)
jmp 0x6f4d
movq -0x98(%rbp), %rdi
movl -0x9c(%rbp), %esi
leaq 0x17924(%rip), %rdx     # 0x1e6ef
movl $0x7, %ecx
callq 0x9e50
cmpl $0x0, %eax
je 0x6e2c
movq 0x1d37f(%rip), %rdi     # 0x24160
addq $0x150, %rdi            # imm = 0x150
leaq -0x88(%rbp), %rsi
movl $0x80, %edx
callq 0x1150
movq 0x1d360(%rip), %rax     # 0x24160
movl $0x1, 0x1e0(%rax)
movq 0x1d34f(%rip), %rax     # 0x24160
cmpq $0x0, 0x150(%rax)
je 0x6e20
callq 0x1050
movl $0x1, -0x4(%rbp)
jmp 0x6f4d
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq %rdi
callq 0x1160
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x6e76
movl $0x7, %edi
leaq 0x17421(%rip), %rsi     # 0x1e278
leaq 0x174c3(%rip), %rdx     # 0x1e321
movl $0x27e, %ecx            # imm = 0x27E
movb $0x0, %al
callq 0xf610
movl $0x0, -0x4(%rbp)
jmp 0x6f4d
movq -0x18(%rbp), %rdi
movq -0x98(%rbp), %rsi
movl -0x9c(%rbp), %edx
addl $0x1, %edx
callq 0x6290
movl -0x9c(%rbp), %eax
movl %eax, -0x10(%rbp)
callq 0x2a80
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x90(%rbp)
jne 0x6edf
movl $0x7, %edi
leaq 0x173be(%rip), %rsi     # 0x1e278
leaq 0x17460(%rip), %rdx     # 0x1e321
movl $0x287, %ecx            # imm = 0x287
movb $0x0, %al
callq 0xf610
movq -0x18(%rbp), %rdi
callq 0x1040
movl $0x0, -0x4(%rbp)
jmp 0x6f4d
movq -0x90(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movl $0x80, %edx
callq 0x1150
movq 0x1d262(%rip), %rax     # 0x24160
movl 0x1e4(%rax), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0x1e4(%rax)
movq -0x90(%rbp), %rax
movl %ecx, 0x8(%rax)
movq 0x1d240(%rip), %rax     # 0x24160
movq 0x1d0(%rax), %rcx
movq -0x90(%rbp), %rax
movq %rcx, (%rax)
movq -0x90(%rbp), %rcx
movq 0x1d221(%rip), %rax     # 0x24160
movq %rcx, 0x1d0(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)