// File: JenTus[P]TCEM/src_TCEM/anyoption.cc
// Function: AnyOption::alloc()
bool
AnyOption::alloc()
{
	int i = 0 ;
	int size = 0 ;

	if( mem_allocated )
		return true;

	size = (max_options+1) * sizeof(const char*);
	options = (const char**)malloc( size );	
	optiontype = (int*) malloc( (max_options+1)*sizeof(int) );	
	optionindex = (int*) malloc( (max_options+1)*sizeof(int) );	
	if( options == NULL || optiontype == NULL || optionindex == NULL )
		return false;
	else
		mem_allocated  = true;
	for( i = 0 ; i < max_options ; i++ ){
		options[i] = NULL;
		optiontype[i] = 0 ;
		optionindex[i] = -1 ;
	}
	optionchars = (char*) malloc( (max_char_options+1)*sizeof(char) );
	optchartype = (int*) malloc( (max_char_options+1)*sizeof(int) );	
	optcharindex = (int*) malloc( (max_char_options+1)*sizeof(int) );	
	if( optionchars == NULL || 
            optchartype == NULL || 
            optcharindex == NULL )
        {
		mem_allocated = false;
		return false;
	}
	for( i = 0 ; i < max_char_options ; i++ ){
		optionchars[i] = '0';
		optchartype[i] = 0 ;
		optcharindex[i] = -1 ;
	}

	size = (max_usage_lines+1) * sizeof(const char*) ;
	usage = (const char**) malloc( size );

	if( usage == NULL  ){
		mem_allocated = false;
		return false;
	}
	for( i = 0 ; i < max_usage_lines ; i++ )
		usage[i] = NULL;

	return true;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
testb $0x1, 0x9a(%rax)
je 0x1efa6
movb $0x1, 0x27(%rsp)
jmp 0x1f216
movq 0x8(%rsp), %rax
movl 0x30(%rax), %eax
addl $0x1, %eax
cltq
shlq $0x3, %rax
movl %eax, 0x10(%rsp)
movslq 0x10(%rsp), %rdi
callq 0x44b0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x38(%rax)
movl 0x30(%rax), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x44b0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x40(%rax)
movl 0x30(%rax), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x44b0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x48(%rax)
cmpq $0x0, 0x38(%rax)
je 0x1f02c
movq 0x8(%rsp), %rax
cmpq $0x0, 0x40(%rax)
je 0x1f02c
movq 0x8(%rsp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x1f036
movb $0x0, 0x27(%rsp)
jmp 0x1f216
movq 0x8(%rsp), %rax
movb $0x1, 0x9a(%rax)
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x30(%rcx), %eax
jge 0x1f09b
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rcx
movslq 0x14(%rsp), %rdx
movq $0x0, (%rcx,%rdx,8)
movq 0x40(%rax), %rcx
movslq 0x14(%rsp), %rdx
movl $0x0, (%rcx,%rdx,4)
movq 0x48(%rax), %rax
movslq 0x14(%rsp), %rcx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x1f04a
movq 0x8(%rsp), %rax
movl 0x54(%rax), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x0, %rdi
callq 0x44b0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x58(%rax)
movl 0x54(%rax), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x44b0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x60(%rax)
movl 0x54(%rax), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x44b0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x68(%rax)
cmpq $0x0, 0x58(%rax)
je 0x1f119
movq 0x8(%rsp), %rax
cmpq $0x0, 0x60(%rax)
je 0x1f119
movq 0x8(%rsp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x1f12f
movq 0x8(%rsp), %rax
movb $0x0, 0x9a(%rax)
movb $0x0, 0x27(%rsp)
jmp 0x1f216
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x54(%rcx), %eax
jge 0x1f184
movq 0x8(%rsp), %rax
movq 0x58(%rax), %rcx
movslq 0x14(%rsp), %rdx
movb $0x30, (%rcx,%rdx)
movq 0x60(%rax), %rcx
movslq 0x14(%rsp), %rdx
movl $0x0, (%rcx,%rdx,4)
movq 0x68(%rax), %rax
movslq 0x14(%rsp), %rcx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x1f137
movq 0x8(%rsp), %rax
movl 0x90(%rax), %eax
addl $0x1, %eax
cltq
shlq $0x3, %rax
movl %eax, 0x10(%rsp)
movslq 0x10(%rsp), %rdi
callq 0x44b0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x88(%rax)
cmpq $0x0, 0x88(%rax)
jne 0x1f1d2
movq 0x8(%rsp), %rax
movb $0x0, 0x9a(%rax)
movb $0x0, 0x27(%rsp)
jmp 0x1f216
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x90(%rcx), %eax
jge 0x1f211
movq 0x8(%rsp), %rax
movq 0x88(%rax), %rax
movslq 0x14(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x1f1da
movb $0x1, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)