// File: /workspace/github_c_makefile_star2_O0/MikeGray-APH[P]LibLouisAPH/source/compile.c
// Function: token_convert_to_int
static int token_convert_to_int(void)
{
	struct variable *var;

	switch(token_crs[0])
	{
	case u'0':  case u'1':  case u'2':  case u'3':  case u'4':
	case u'5':  case u'6':  case u'7':  case u'8':  case u'9':

		token_int = utf16_convert_to_int(token_crs, token_len);
		return 1;

	case u'$':

		var = variable_find(&token_crs[1], token_len - 1);
		if(!var)
		{
			log_message(LOG_ERROR, "%s:%d  variable $%#S not found", table_file_names[include_depth], table_file_lines[include_depth], &token_crs[1], token_len - 1);
			return 0;
		}
		token_int = var->value;
		return 1;

	case u'b':

		if(token_len < 3)
			break;
		if(token_crs[1] != u'i' || token_crs[2] != u't')
			break;
		if(token_len < 5)
			token_int = BIT(token_crs[3] - u'0');
		else
			token_int = BIT(((token_crs[3] - u'0') * 10) + (token_crs[4] - u'0'));
		return 1;
	}

	log_message(LOG_ERROR, "%s:%d  invalid value %#S", table_file_names[include_depth], table_file_lines[include_depth], token_crs, token_len);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq 0x1cb49(%rip), %rax     # 0x26208
movzwl (%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x24, %eax
je 0x970e
jmp 0x96cc
movl -0x14(%rbp), %eax
addl $-0x30, %eax
subl $0xa, %eax
jb 0x96ea
jmp 0x96d9
movl -0x14(%rbp), %eax
subl $0x62, %eax
je 0x97a3
jmp 0x983a
movq 0x1cb17(%rip), %rdi     # 0x26208
movl 0x1cb09(%rip), %esi     # 0x26200
callq 0x12a0
movl %eax, 0x1cb16(%rip)     # 0x26218
movl $0x1, -0x4(%rbp)
jmp 0x9885
movq 0x1caf3(%rip), %rdi     # 0x26208
addq $0x2, %rdi
movl 0x1cae1(%rip), %esi     # 0x26200
subl $0x1, %esi
callq 0x99a0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x978a
movslq 0x1aa5f(%rip), %rcx     # 0x24198
leaq 0x1aa80(%rip), %rax     # 0x241c0
movq (%rax,%rcx,8), %rdx
movslq 0x1aa4d(%rip), %rcx     # 0x24198
leaq 0x1aa4e(%rip), %rax     # 0x241a0
movl (%rax,%rcx,4), %ecx
movq 0x1caac(%rip), %r8      # 0x26208
addq $0x2, %r8
movl 0x1ca99(%rip), %r9d     # 0x26200
subl $0x1, %r9d
movl $0x6, %edi
leaq 0x14f0f(%rip), %rsi     # 0x1e686
movb $0x0, %al
callq 0xf610
movl $0x0, -0x4(%rbp)
jmp 0x9885
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, 0x1ca81(%rip)     # 0x26218
movl $0x1, -0x4(%rbp)
jmp 0x9885
cmpl $0x3, 0x1ca56(%rip)     # 0x26200
jge 0x97b1
jmp 0x983a
movq 0x1ca50(%rip), %rax     # 0x26208
movzwl 0x2(%rax), %eax
cmpl $0x69, %eax
jne 0x97d1
movq 0x1ca40(%rip), %rax     # 0x26208
movzwl 0x4(%rax), %eax
cmpl $0x74, %eax
je 0x97d3
jmp 0x983a
cmpl $0x5, 0x1ca26(%rip)     # 0x26200
jge 0x97fe
movq 0x1ca25(%rip), %rax     # 0x26208
movzwl 0x6(%rax), %eax
subl $0x30, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movl %eax, 0x1ca1c(%rip)     # 0x26218
jmp 0x9831
movq 0x1ca03(%rip), %rax     # 0x26208
movzwl 0x6(%rax), %eax
subl $0x30, %eax
imull $0xa, %eax, %eax
movq 0x1c9f2(%rip), %rcx     # 0x26208
movzwl 0x8(%rcx), %ecx
subl $0x30, %ecx
addl %ecx, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movl %eax, 0x1c9e7(%rip)     # 0x26218
movl $0x1, -0x4(%rbp)
jmp 0x9885
movslq 0x1a957(%rip), %rcx     # 0x24198
leaq 0x1a978(%rip), %rax     # 0x241c0
movq (%rax,%rcx,8), %rdx
movslq 0x1a945(%rip), %rcx     # 0x24198
leaq 0x1a946(%rip), %rax     # 0x241a0
movl (%rax,%rcx,4), %ecx
movq 0x1c9a4(%rip), %r8      # 0x26208
movl 0x1c995(%rip), %r9d     # 0x26200
movl $0x6, %edi
leaq 0x14e2e(%rip), %rsi     # 0x1e6a5
movb $0x0, %al
callq 0xf610
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop