LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::unread_token(neteruhsp::parse_context_t&, unsigned long)
void unread_token( parse_context_t& c, size_t num )
{
	if ( num <= 0 )
	{
		return;
	}

	if ( c.token_current_ == nullptr )
	{
		c.token_current_ = c.token_list_->tail_;
		--num;
	}

	while( num-- > 0 )
	{
		assert( c.token_current_ != nullptr );
		c.token_current_ = c.token_current_->prev_;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
ja 0x527c
jmp 0x52fe
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x52a6
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x52a8
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x10(%rbp)
cmpq $0x0, %rax
jbe 0x52fe
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x52ca
jmp 0x52e9
leaq 0xdb12(%rip), %rdi      # 0x12de3
leaq 0xd779(%rip), %rsi      # 0x12a51
movl $0x7ad, %edx            # imm = 0x7AD
leaq 0xdb4d(%rip), %rcx      # 0x12e31
callq 0x30f0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x52a8
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::prev_token(neteruhsp::parse_context_t&, unsigned long)
token_t* prev_token( parse_context_t& c, size_t num )
{
	auto current = c.token_current_;
	if ( current == nullptr )
	{
		current = c.token_list_->tail_;
	}
	while( num-- > 0 )
	{
		assert( current != nullptr );
		current = current->prev_;
	}
	return reinterpret_cast<token_t*>( current->value_ );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x5342
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x5344
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x10(%rbp)
cmpq $0x0, %rax
jbe 0x538e
cmpq $0x0, -0x18(%rbp)
je 0x5362
jmp 0x5381
leaq 0xdb00(%rip), %rdi      # 0x12e69
leaq 0xd6e1(%rip), %rsi      # 0x12a51
movl $0x7bb, %edx            # imm = 0x7BB
leaq 0xdb00(%rip), %rcx      # 0x12e7c
callq 0x30f0
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x5344
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::query_preprocessor(char const*)
int query_preprocessor( const char* s )
{
	static const struct
	{
		int				tag_;
		const char*		word_;
	} table[] =
	{
		{ PREPRO_DEFINE,	"define", },
		{ PREPRO_UNDEF,		"undef", },
		{ PREPRO_IF,		"if", },
		{ PREPRO_IFDEF,		"ifdef", },
		{ PREPRO_ENDIF,		"endif", },
		{ PREPRO_ENUM,		"enum", },
		{ -1,				nullptr },
	};

	// 全探索
	for( int i=0; table[i].tag_!=-1; ++i )
	{
		if ( string_equal_igcase( s, table[i].word_ ) )
		{
			return table[i].tag_;
		}
	}
	return PREPRO_UNKNOWN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x165e2(%rip), %rax     # 0x1b9a0
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $-0x1, (%rax)
je 0x541a
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rcx
leaq 0x165c7(%rip), %rax     # 0x1b9a0
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4190
testb $0x1, %al
jne 0x53f4
jmp 0x540d
movslq -0x14(%rbp), %rcx
leaq 0x165a1(%rip), %rax     # 0x1b9a0
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x5421
jmp 0x540f
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x53b3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::create_macro()
macro_t* create_macro()
{
	auto* const res = reinterpret_cast<macro_t*>( xmalloc( sizeof(macro_t) ) );
	res->name_ = nullptr;
	res->is_ctype_ = false;
	res->param_num_ = 0;
	for ( auto& it : res->params_ )
	{
		it.default_param_ = nullptr;
	}
	res->replacing_ = nullptr;
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0xa0, %edi
callq 0x3800
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x5511
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
jmp 0x54e6
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::macro_free_content(neteruhsp::macro_t*)
void macro_free_content( macro_t* macro )
{
	if ( macro->name_ != nullptr )
	{
		destroy_string( macro->name_ );
		macro->name_ = nullptr;
	}

	if ( macro->replacing_ != nullptr )
	{
		destroy_string( macro->replacing_ );
		macro->replacing_ = nullptr;
	}

	for ( auto& it : macro->params_ )
	{
		if ( it.default_param_ != nullptr )
		{
			destroy_string( it.default_param_ );
			it.default_param_ = nullptr;
		}
	}
	macro->param_num_ = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x558d
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5030
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x55b1
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5030
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x5616
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
je 0x5606
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x5030
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
jmp 0x5608
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
jmp 0x55d3
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::create_prepro_context()
prepro_context_t* create_prepro_context()
{
	auto res = reinterpret_cast<prepro_context_t*>( xmalloc( sizeof(prepro_context_t) ) );
	res->macro_list_ = create_list();
	res->line_ = 0;
	res->out_buffer_ = nullptr;
	res->is_current_region_valid_ = true;
	res->pp_region_idx_ = 0;
	res->pp_region_[0].is_valid_ = true;
	res->pp_region_[0].line_ = true;
	res->enum_next_ = 0;
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0xa0, %edi
callq 0x3800
movq %rax, -0x8(%rbp)
callq 0x3e90
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x14(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x1c(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x20(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x9c(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::destroy_prepro_context(neteruhsp::prepro_context_t*)
void destroy_prepro_context( prepro_context_t* pctx )
{
	assert( pctx != nullptr );
	{
		auto* node = pctx->macro_list_->head_;
		while( node != nullptr )
		{
			auto* macro = reinterpret_cast<macro_t*>( node->value_ );
			destroy_macro( macro );
			node = node->next_;;
		}
	}
	list_free_all( *pctx->macro_list_ );
	destroy_list( pctx->macro_list_ );

	if ( pctx->out_buffer_ != nullptr )
	{
		destroy_string_buffer( pctx->out_buffer_ );
		pctx->out_buffer_ = nullptr;
	}
	xfree( pctx );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x56c5
jmp 0x56e4
leaq 0xd808(%rip), %rdi      # 0x12ed4
leaq 0xd37e(%rip), %rsi      # 0x12a51
movl $0x82a, %edx            # imm = 0x82A
leaq 0xd805(%rip), %rcx      # 0x12ee4
callq 0x30f0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x571c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5530
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x56f2
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x40b0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x3ed0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x5758
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3a80
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rdi
callq 0x3900
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::prepro_register_default_macros(neteruhsp::prepro_context_t*)
void prepro_register_default_macros( prepro_context_t* pctx )
{
	{
		auto* const nm = create_macro();
		nm->name_ = create_string( "M_PI" );
		nm->replacing_ = create_string( "3.141592653589793238" );
		prepro_register_macro( pctx, nm );
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
callq 0x5490
movq %rax, -0x10(%rbp)
leaq 0xd793(%rip), %rdi      # 0x12f1f
callq 0x57d0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
leaq 0xd782(%rip), %rdi      # 0x12f24
callq 0x57d0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5800
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::prepro_register_macro(neteruhsp::prepro_context_t*, neteruhsp::macro_t*)
bool prepro_register_macro( prepro_context_t* pctx, macro_t* macro )
{
	const auto* d = prepro_find_macro( pctx, macro->name_ );

	if ( d != nullptr )
	{
		raise_error( "プリプロセス：マクロが再定義されました（%s）", macro->name_ );
		return false;
	}

	auto* const lnode = create_list_node();
	lnode->value_ = macro;

	list_append( *pctx->macro_list_, lnode );

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x7820
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x5846
movq -0x18(%rbp), %rax
movq (%rax), %rsi
leaq 0xe687(%rip), %rdi      # 0x13ec0
movb $0x0, %al
callq 0x4cd0
movb $0x0, -0x1(%rbp)
jmp 0x586f
callq 0x3c70
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x3f70
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::(anonymous namespace)::create_string(char const*, unsigned long)
char* create_string( const char* s, size_t len )
{
	char* res = create_string( len );
	strncpy( res, s, len );
	res[len] = '\0';
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3b30
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x30c0
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::prepro_erase_macro(neteruhsp::prepro_context_t*, char const*)
bool prepro_erase_macro( prepro_context_t* pctx, const char* name )
{
	list_node_t* found_node = nullptr;
	auto* node = pctx->macro_list_->head_;
	while( node != nullptr )
	{
		auto* const macro = reinterpret_cast<macro_t*>( node->value_ );
		if ( string_equal_igcase( macro->name_, name ) )
		{
			found_node = node;
			break;
		}
		node = node->next_;
	}

	if ( found_node == nullptr )
	{ return false; }

	list_erase( *pctx->macro_list_, found_node );
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x75ec
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4190
testb $0x1, %al
jne 0x75d4
jmp 0x75de
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x75ec
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x75a6
cmpq $0x0, -0x20(%rbp)
jne 0x75f9
movb $0x0, -0x1(%rbp)
jmp 0x760d
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x3ff0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::evaluate_ast_immediate(neteruhsp::ast_node_t*)
value_t* evaluate_ast_immediate( ast_node_t* ast )
{
	value_stack_t stack{};
	initialize_value_stack( &stack );

	const bool is_succeeded = evaluate_ast_node( ast, &stack );

	// 戻り値
	value_t* res = nullptr;
	if ( is_succeeded && stack.top_ == 1 )
	{
		res = create_value( *stack_peek( &stack, 0 ) );
		value_isolate( *res );
	}
	uninitialize_value_stack( &stack );
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x30d0
leaq -0x18(%rbp), %rdi
callq 0xba40
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xe6a0
andb $0x1, %al
movb %al, -0x19(%rbp)
movq $0x0, -0x28(%rbp)
testb $0x1, -0x19(%rbp)
je 0x76ab
cmpl $0x1, -0x10(%rbp)
jne 0x76ab
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xbca0
movq %rax, %rdi
callq 0xa750
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x78a0
leaq -0x18(%rbp), %rdi
callq 0xbac0
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::value_calc_boolean(neteruhsp::value_t const&)
bool value_calc_boolean( const value_t& r )
{
	switch( value_get_primitive_tag( r ) )
	{
		case VALUE_INT:			return value_calc_int(r) != 0;
		case VALUE_DOUBLE:		return value_calc_double(r) != 0.0;
		case VALUE_STRING:		return value_calc_int(r) != 0;
		default: assert( false ); break;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7990
movl %eax, %ecx
movl %ecx, -0x14(%rbp)
subl $0x1, %eax
je 0x76f5
jmp 0x76e1
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x770b
jmp 0x76eb
movl -0x14(%rbp), %eax
subl $0x3, %eax
je 0x772a
jmp 0x7740
movq -0x10(%rbp), %rdi
callq 0x79c0
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x775f
movq -0x10(%rbp), %rdi
callq 0xaa40
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
setne %al
setp %cl
orb %cl, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x775f
movq -0x10(%rbp), %rdi
callq 0x79c0
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x775f
leaq 0xc228(%rip), %rdi      # 0x1396f
leaq 0xb303(%rip), %rsi      # 0x12a51
movl $0x118c, %edx           # imm = 0x118C
leaq 0xd913(%rip), %rcx      # 0x1506d
callq 0x30f0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::destroy_ast_node(neteruhsp::ast_node_t*)
void destroy_ast_node( ast_node_t* node )
{
	assert( node != nullptr );
	if ( node->left_ != nullptr )
	{ destroy_ast_node( node->left_ ); }
	if ( node->right_ != nullptr )
	{ destroy_ast_node( node->right_ ); }
	xfree( node );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x7785
jmp 0x77a4
leaq 0xe9f0(%rip), %rdi      # 0x1617c
leaq 0xb2be(%rip), %rsi      # 0x12a51
movl $0xbd6, %edx            # imm = 0xBD6
leaq 0xc763(%rip), %rcx      # 0x13f02
callq 0x30f0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x77bc
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x7770
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x77d4
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x7770
movq -0x8(%rbp), %rdi
callq 0x3900
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::prepro_find_macro(neteruhsp::prepro_context_t*, char const*)
macro_t* prepro_find_macro( prepro_context_t* pctx, const char* name )
{
	auto* node = pctx->macro_list_->head_;
	while( node != nullptr )
	{
		auto* const macro = reinterpret_cast<macro_t*>( node->value_ );
		if ( string_equal_igcase( macro->name_, name ) )
		{
			return macro;
		}
		node = node->next_;
	}

	return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x7884
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4190
testb $0x1, %al
jne 0x786c
jmp 0x7876
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x788c
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x783e
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::value_isolate(neteruhsp::value_t&)
void value_isolate( value_t& v )
{
	if ( v.type_ != VALUE_VARIABLE )
	{ return; }

	switch( v.variable_->type_ )
	{
		case VALUE_INT:
			value_set( &v, variable_calc_int( *v.variable_, v.index_ ) );
			break;
		case VALUE_DOUBLE:
			value_set( &v, variable_calc_double( *v.variable_, v.index_ ) );
			break;
		case VALUE_STRING:
			value_move( &v, variable_calc_string( *v.variable_, v.index_ ) );
			break;
		default:
			assert( false );
			break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x4, (%rax)
je 0x78ba
jmp 0x797c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0xc(%rbp)
subl $0x1, %eax
je 0x78e3
jmp 0x78cf
movl -0xc(%rbp), %eax
subl $0x2, %eax
je 0x790c
jmp 0x78d9
movl -0xc(%rbp), %eax
subl $0x3, %eax
je 0x7933
jmp 0x795d
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x10(%rax), %esi
callq 0xa360
movq -0x18(%rbp), %rdi
movl %eax, %esi
callq 0xa8e0
jmp 0x797c
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x10(%rax), %esi
callq 0xa400
movq -0x20(%rbp), %rdi
callq 0xa920
jmp 0x797c
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x10(%rax), %esi
callq 0xa4f0
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0xa9a0
jmp 0x797c
leaq 0xc00b(%rip), %rdi      # 0x1396f
leaq 0xb0e6(%rip), %rsi      # 0x12a51
movl $0x11ea, %edx           # imm = 0x11EA
leaq 0xd805(%rip), %rcx      # 0x1517c
callq 0x30f0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::value_calc_int(neteruhsp::value_t const&)
int value_calc_int( const value_t& r )
{
	switch( r.type_ )
	{
		case VALUE_INT:			return r.ivalue_;
		case VALUE_DOUBLE:		return static_cast<int>( r.dvalue_ );
		case VALUE_STRING:		return atoi( r.svalue_ );
		case VALUE_VARIABLE:	return variable_calc_int( *r.variable_, r.index_ ); break;
		default: assert( false ); break;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x3, %eax
ja 0x7a38
movq -0x18(%rbp), %rax
leaq 0xab6e(%rip), %rcx      # 0x12558
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x7a57
movq -0x10(%rbp), %rax
cvttsd2si 0x8(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x7a57
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3230
movl %eax, -0x4(%rbp)
jmp 0x7a57
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %esi
callq 0xa360
movl %eax, -0x4(%rbp)
jmp 0x7a57
leaq 0xbf30(%rip), %rdi      # 0x1396f
leaq 0xb00b(%rip), %rsi      # 0x12a51
movl $0x1199, %edx           # imm = 0x1199
leaq 0xd64f(%rip), %rcx      # 0x150a1
callq 0x30f0
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::(anonymous namespace)::create_string_from(int)
char* create_string_from( int v )
{
	const auto len = snprintf( nullptr, 0, "%d", v );
	auto res = create_string( len );
	sprintf( res, "%d", v );
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %ecx
xorl %eax, %eax
movl %eax, %esi
leaq 0xf358(%rip), %rdx      # 0x16dd1
movq %rsi, %rdi
movb $0x0, %al
callq 0x3250
movl %eax, -0x8(%rbp)
movslq -0x8(%rbp), %rdi
callq 0x3b30
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl -0x4(%rbp), %edx
leaq 0xf330(%rip), %rsi      # 0x16dd1
movb $0x0, %al
callq 0x3080
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::create_ast_node(neteruhsp::node_tag, neteruhsp::ast_node_t*, neteruhsp::ast_node_t*)
ast_node_t* create_ast_node( node_tag tag, ast_node_t* left, ast_node_t* right )
{
	auto res = reinterpret_cast<ast_node_t*>( xmalloc( sizeof(ast_node_t) ) );
	res->tag_ = tag;
	res->token_ = nullptr;
	res->left_ = left;
	res->right_ = right;
	res->flag_ = 0;
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x28, %edi
callq 0x3800
movq %rax, -0x20(%rbp)
movl -0x4(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::create_ast_node(neteruhsp::node_tag, neteruhsp::token_t*, neteruhsp::ast_node_t*)
ast_node_t* create_ast_node( node_tag tag, token_t* token, ast_node_t* left )
{
	auto res = reinterpret_cast<ast_node_t*>( xmalloc( sizeof(ast_node_t) ) );
	res->tag_ = tag;
	res->token_ = token;
	res->left_ = left;
	res->right_ = nullptr;
	res->flag_ = 0;
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x28, %edi
callq 0x3800
movq %rax, -0x20(%rbp)
movl -0x4(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::parse_script(neteruhsp::parse_context_t&)
list_t* parse_script( parse_context_t& c )
{
	auto res = create_list();

	for( ; ; )
	{
		auto statement = parse_statement( c );
		if ( statement == nullptr )
		{ break; }

		auto node = create_list_node();
		node->value_ = statement;
		list_append( *res, node );
	}

	{
		const auto token = read_token( c );
		if ( token->tag_ != TOKEN_EOF )
		{
			raise_error( "スクリプトを最後まで正しくパースできませんでした@@ %d行目", token->appear_line_ );
		}
	}

	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
callq 0x3e90
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7c70
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x7c0b
jmp 0x7c2f
callq 0x3c70
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3f70
jmp 0x7bf5
movq -0x8(%rbp), %rdi
callq 0x5160
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x7c5a
movq -0x28(%rbp), %rax
movl 0x18(%rax), %esi
leaq 0xc2de(%rip), %rdi      # 0x13f31
movb $0x0, %al
callq 0x4cd0
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::parse_statement(neteruhsp::parse_context_t&)
ast_node_t* parse_statement( parse_context_t& c )
{
	// 何もない？
	{
		const auto token = read_token( c );
		if ( token->tag_ == TOKEN_EOF )
		{ return nullptr; }
		if ( is_eos_like_token( token->tag_ ) )
		{ return create_ast_node( NODE_EMPTY ); }
		unread_token( c );
	}

	ast_node_t* statement = nullptr;

	// ラベルを試す
	if ( statement == nullptr )
	{
		statement = parse_label_safe( c );
	}

	// 制御構文を試す
	if ( statement == nullptr )
	{
		statement = parse_control_safe( c );
	}

	// コマンドを試す
	if ( statement == nullptr )
	{
		statement = parse_command_safe( c );
	}

	// それ以外は全て代入
	if ( statement == nullptr )
	{
		statement = parse_assign_safe( c );
	}

	// ここまで来て何もないなら、パース不能
	if ( statement == nullptr )
	{
		const auto token = read_token( c );
		raise_error( "ステートメントが解析不能です@@ %d行目", token->appear_line_ );
	}

	// 最後の改行チェック
	{
		const auto token = read_token( c );
		if ( !is_eos_like_token( token->tag_ ) )
		{
			raise_error( "ステートメントをすべて正しく解析できませんでした@@ %d行目", token->appear_line_ );
		}
	}

	return statement;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5160
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x7c9f
movq $0x0, -0x8(%rbp)
jmp 0x7d8f
movq -0x18(%rbp), %rax
movl (%rax), %edi
callq 0x7ba0
testb $0x1, %al
jne 0x7cb0
jmp 0x7cc7
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x7ac0
movq %rax, -0x8(%rbp)
jmp 0x7d8f
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x5260
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7cf1
movq -0x10(%rbp), %rdi
callq 0x7e00
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7d05
movq -0x10(%rbp), %rdi
callq 0x7e90
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7d19
movq -0x10(%rbp), %rdi
callq 0x84d0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7d2d
movq -0x10(%rbp), %rdi
callq 0x85e0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7d56
movq -0x10(%rbp), %rdi
callq 0x5160
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x18(%rax), %esi
leaq 0xc236(%rip), %rdi      # 0x13f85
movb $0x0, %al
callq 0x4cd0
movq -0x10(%rbp), %rdi
callq 0x5160
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %edi
callq 0x7ba0
testb $0x1, %al
jne 0x7d87
movq -0x30(%rbp), %rax
movl 0x18(%rax), %esi
leaq 0xc23b(%rip), %rdi      # 0x13fbb
movb $0x0, %al
callq 0x4cd0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::destroy_ast(neteruhsp::list_t*)
void destroy_ast( list_t* ast )
{
	auto node = ast->head_;
	while( node != nullptr )
	{
		const auto ast_node = reinterpret_cast<ast_node_t*>( node->value_ );
		destroy_ast_node( ast_node );
		node = node->next_;
	}

	list_free_all( *ast );
	destroy_list( ast );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x7de1
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x7770
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x7db7
movq -0x8(%rbp), %rdi
callq 0x40b0
movq -0x8(%rbp), %rdi
callq 0x3ed0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::parse_label_safe(neteruhsp::parse_context_t&)
ast_node_t* parse_label_safe( parse_context_t& c )
{
	const auto token = read_token( c );
	if ( token->tag_ != TOKEN_OP_MUL )
	{
		unread_token( c );
		return nullptr;
	}

	const auto ident = read_token( c );
	if ( ident->tag_ != TOKEN_IDENTIFIER )
	{
		unread_token( c, 2 );
		return nullptr;
	}

	return create_ast_node( NODE_LABEL, ident );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5160
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x17, (%rax)
je 0x7e3a
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x5260
movq $0x0, -0x8(%rbp)
jmp 0x7e7e
movq -0x10(%rbp), %rdi
callq 0x5160
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x23, (%rax)
je 0x7e68
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x5260
movq $0x0, -0x8(%rbp)
jmp 0x7e7e
movq -0x20(%rbp), %rsi
movl $0x1, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0x7b30
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::parse_command_safe(neteruhsp::parse_context_t&)
ast_node_t* parse_command_safe( parse_context_t& c )
{
	const auto ident = read_token( c );
	if ( ident->tag_ != TOKEN_IDENTIFIER )
	{
		unread_token( c );
		return nullptr;
	}

	const auto next = read_token( c );

	bool is_not_command = false;
	switch( next->tag_ )
	{
	case TOKEN_ASSIGN:
	case TOKEN_ADD_ASSIGN:
	case TOKEN_SUB_ASSIGN:
	case TOKEN_MUL_ASSIGN:
	case TOKEN_DIV_ASSIGN:
	case TOKEN_MOD_ASSIGN:
	case TOKEN_BOR_ASSIGN:
	case TOKEN_BAND_ASSIGN:
	case TOKEN_BXOR_ASSIGN:
		is_not_command = true;
		break;
	default: break;
	}

	// "("チェック
	if ( !ident->right_space_ && next->tag_==TOKEN_LPARENTHESIS )
	{ is_not_command = true; }

	if ( is_not_command )
	{
		unread_token( c, 2 );
		return nullptr;
	}

	// あるなら引数の解析
	ast_node_t* args = nullptr;
	if ( !is_eos_like_token( next->tag_ ) )
	{
		unread_token( c );
		args = parse_arguments( c );
	}
	else
	{
		unread_token( c );
	}

	const auto command = create_ast_node( NODE_COMMAND, ident, args );
 	return command;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5160
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x23, (%rax)
je 0x850d
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x5260
movq $0x0, -0x8(%rbp)
jmp 0x85cb
movq -0x10(%rbp), %rdi
callq 0x5160
movq %rax, -0x20(%rbp)
movb $0x0, -0x21(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
addl $-0x1a, %eax
subl $0x8, %eax
ja 0x8534
jmp 0x852e
movb $0x1, -0x21(%rbp)
jmp 0x8536
jmp 0x8536
movq -0x18(%rbp), %rax
testb $0x1, 0x1d(%rax)
jne 0x854d
movq -0x20(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x854d
movb $0x1, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
je 0x856b
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x5260
movq $0x0, -0x8(%rbp)
jmp 0x85cb
movq $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %edi
callq 0x7ba0
testb $0x1, %al
jne 0x859f
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x5260
movq -0x10(%rbp), %rdi
callq 0x8740
movq %rax, -0x30(%rbp)
jmp 0x85ad
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x5260
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl $0x3, %edi
callq 0x7b30
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::parse_assign_safe(neteruhsp::parse_context_t&)
ast_node_t* parse_assign_safe( parse_context_t& c )
{
	auto variable = parse_variable_safe( c );
	if ( variable == nullptr )
	{ return nullptr; }

	const auto next = read_token( c );

	int node =-1;
	switch( next->tag_ )
	{
	case TOKEN_ASSIGN:			node = NODE_ASSIGN; break;
	case TOKEN_ADD_ASSIGN:		node = NODE_ADD_ASSIGN; break;
	case TOKEN_SUB_ASSIGN:		node = NODE_SUB_ASSIGN; break;
	case TOKEN_MUL_ASSIGN:		node = NODE_MUL_ASSIGN; break;
	case TOKEN_DIV_ASSIGN:		node = NODE_DIV_ASSIGN; break;
	case TOKEN_MOD_ASSIGN:		node = NODE_MOD_ASSIGN; break;
	case TOKEN_BOR_ASSIGN:		node = NODE_BOR_ASSIGN; break;
	case TOKEN_BAND_ASSIGN:		node = NODE_BAND_ASSIGN; break;
	case TOKEN_BXOR_ASSIGN:		node = NODE_BXOR_ASSIGN; break;
	default:
		raise_error( "代入 : =が必要です@@ %d行目", next->appear_line_ );
		break;
	}

	if ( node == -1 )
	{ return nullptr; }

	auto expr = parse_expression( c );
	auto assign = create_ast_node( static_cast<node_tag>( node ), variable, expr );
	return assign;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x87e0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x860d
movq $0x0, -0x8(%rbp)
jmp 0x86e8
movq -0x10(%rbp), %rdi
callq 0x5160
movq %rax, -0x20(%rbp)
movl $0xffffffff, -0x24(%rbp) # imm = 0xFFFFFFFF
movq -0x20(%rbp), %rax
movl (%rax), %eax
addl $-0x1a, %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0x8, %eax
ja 0x869a
movq -0x40(%rbp), %rax
leaq 0x9f50(%rip), %rcx      # 0x12590
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x5, -0x24(%rbp)
jmp 0x86af
movl $0x6, -0x24(%rbp)
jmp 0x86af
movl $0x7, -0x24(%rbp)
jmp 0x86af
movl $0x8, -0x24(%rbp)
jmp 0x86af
movl $0x9, -0x24(%rbp)
jmp 0x86af
movl $0xa, -0x24(%rbp)
jmp 0x86af
movl $0xb, -0x24(%rbp)
jmp 0x86af
movl $0xc, -0x24(%rbp)
jmp 0x86af
movl $0xd, -0x24(%rbp)
jmp 0x86af
movq -0x20(%rbp), %rax
movl 0x18(%rax), %esi
leaq 0xbb71(%rip), %rdi      # 0x14219
movb $0x0, %al
callq 0x4cd0
cmpl $-0x1, -0x24(%rbp)
jne 0x86bf
movq $0x0, -0x8(%rbp)
jmp 0x86e8
movq -0x10(%rbp), %rdi
callq 0x7620
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x7ac0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::parse_arguments(neteruhsp::parse_context_t&)
ast_node_t* parse_arguments( parse_context_t& c )
{
	auto arg = parse_expression( c );
	auto res = create_ast_node( NODE_ARGUMENTS, arg );
	auto args = res;

	for( ; ; )
	{
		const auto token = read_token( c );
		if ( token->tag_ != TOKEN_COMMA )
		{
			unread_token( c );
			break;
		}

		auto next =parse_expression( c );
		args->right_ = create_ast_node( NODE_ARGUMENTS, next );
		args = args->right_;
	}
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7620
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rsi
movl $0x4, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0x7ac0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5160
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x8, (%rax)
je 0x879d
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x5260
jmp 0x87d5
movq -0x8(%rbp), %rdi
callq 0x7620
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
movl $0x4, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0x7ac0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x8777
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::parse_variable_safe(neteruhsp::parse_context_t&)
ast_node_t* parse_variable_safe( parse_context_t& c )
{
	const auto ident = read_token( c );
	if ( ident->tag_ != TOKEN_IDENTIFIER )
	{
		unread_token( c );
		return nullptr;
	}

	const auto next = read_token( c );
	if ( next->tag_ != TOKEN_LPARENTHESIS )
	{
		unread_token( c );
		return create_ast_node( NODE_VARIABLE, ident );
	}

	const auto idx = parse_expression( c );
	const auto nn = read_token( c );
	if ( nn->tag_ != TOKEN_RPARENTHESIS )
	{
		// 多そうなので個別対処
		if ( nn->tag_ == TOKEN_COMMA )
		{ raise_error( "配列変数 : 二次元以上の配列はサポートしていません@@ %d行目", nn->appear_line_ ); }
		raise_error( "配列変数 : 括弧が正しく閉じられていません@@ %d行目", nn->appear_line_ );
	}

	return create_ast_node( NODE_VARIABLE, ident, idx );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5160
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x23, (%rax)
je 0x881d
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x5260
movq $0x0, -0x8(%rbp)
jmp 0x88c5
movq -0x10(%rbp), %rdi
callq 0x5160
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x6, (%rax)
je 0x8859
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x5260
movq -0x18(%rbp), %rsi
movl $0xe, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0x7b30
movq %rax, -0x8(%rbp)
jmp 0x88c5
movq -0x10(%rbp), %rdi
callq 0x7620
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5160
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x7, (%rax)
je 0x88af
movq -0x30(%rbp), %rax
cmpl $0x8, (%rax)
jne 0x889a
movq -0x30(%rbp), %rax
movl 0x18(%rax), %esi
leaq 0xb9ab(%rip), %rdi      # 0x1423e
movb $0x0, %al
callq 0x4cd0
movq -0x30(%rbp), %rax
movl 0x18(%rax), %esi
leaq 0xbd99(%rip), %rdi      # 0x14641
movb $0x0, %al
callq 0x4cd0
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0xe, %edi
callq 0x7b30
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::parse_borand(neteruhsp::parse_context_t&)
ast_node_t* parse_borand( parse_context_t& c )
{
	auto node =parse_eqneq(c);

	for( ; ; )
	{
		bool is_continue = true;
		const auto token = read_token( c );
		switch( token->tag_ )
		{
			case TOKEN_OP_BOR:
			case TOKEN_OP_BAND:
			case TOKEN_OP_BXOR:
			{
				auto r = parse_eqneq( c );
				if ( r == nullptr )
				{ raise_error( "|,&の演算子で、右項の解析が出来ません@@ %d行目", token->appear_line_ ); }

				switch( token->tag_ )
				{
					case TOKEN_OP_BOR:	node = create_ast_node( NODE_BOR, node, r ); break;
					case TOKEN_OP_BAND:	node = create_ast_node( NODE_BAND, node, r ); break;
					case TOKEN_OP_BXOR:	node = create_ast_node( NODE_BXOR, node, r ); break;
					default: assert( false ); break;
				}
				break;
			}
			default:
				is_continue = false;
				break;
		}
		if ( !is_continue )
		{
			unread_token( c );
			break;
		}
	}
	return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x89f0
movq %rax, -0x10(%rbp)
movb $0x1, -0x11(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5160
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
addl $-0xc, %eax
subl $0x2, %eax
ja 0x89c4
jmp 0x890e
movq -0x8(%rbp), %rdi
callq 0x89f0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x8937
movq -0x20(%rbp), %rax
movl 0x18(%rax), %esi
leaq 0xb962(%rip), %rdi      # 0x14292
movb $0x0, %al
callq 0x4cd0
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
subl $0xc, %eax
je 0x895b
jmp 0x8947
movl -0x2c(%rbp), %eax
subl $0xd, %eax
je 0x8973
jmp 0x8951
movl -0x2c(%rbp), %eax
subl $0xe, %eax
je 0x898b
jmp 0x89a3
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x10, %edi
callq 0x7ac0
movq %rax, -0x10(%rbp)
jmp 0x89c2
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x11, %edi
callq 0x7ac0
movq %rax, -0x10(%rbp)
jmp 0x89c2
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x12, %edi
callq 0x7ac0
movq %rax, -0x10(%rbp)
jmp 0x89c2
leaq 0xafc5(%rip), %rdi      # 0x1396f
leaq 0xa0a0(%rip), %rsi      # 0x12a51
movl $0xdd2, %edx            # imm = 0xDD2
leaq 0xb917(%rip), %rcx      # 0x142d4
callq 0x30f0
jmp 0x89c8
movb $0x0, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x89de
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x5260
jmp 0x89e3
jmp 0x88e9
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::parse_eqneq(neteruhsp::parse_context_t&)
ast_node_t* parse_eqneq( parse_context_t& c )
{
	auto node =parse_gtlt(c);

	for( ; ; )
	{
		bool is_continue = true;
		const auto token = read_token( c );
		switch( token->tag_ )
		{
			case TOKEN_OP_EQ:
			case TOKEN_OP_NEQ:
			case TOKEN_ASSIGN:
			{
				auto r = parse_gtlt( c );
				if ( r == nullptr )
				{ raise_error( "==,!=の演算子で、右項の解析が出来ません@@ %d行目", token->appear_line_ ); }

				switch( token->tag_ )
				{
					case TOKEN_OP_EQ:
					case TOKEN_ASSIGN:
						node = create_ast_node( NODE_EQ, node, r );
						break;
					case TOKEN_OP_NEQ:	node = create_ast_node( NODE_NEQ, node, r ); break;
					default: assert( false ); break;
				}
				break;
			}
			default:
				is_continue = false;
				break;
		}
		if ( !is_continue )
		{
			unread_token( c );
			break;
		}
	}
	return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x8b10
movq %rax, -0x10(%rbp)
movb $0x1, -0x11(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5160
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
addl $-0xf, %eax
subl $0x2, %eax
jb 0x8a3b
jmp 0x8a2d
movl -0x2c(%rbp), %eax
subl $0x1a, %eax
jne 0x8ad9
jmp 0x8a3b
movq -0x8(%rbp), %rdi
callq 0x8b10
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x8a64
movq -0x20(%rbp), %rax
movl 0x18(%rax), %esi
leaq 0xb8ae(%rip), %rdi      # 0x1430b
movb $0x0, %al
callq 0x4cd0
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x30(%rbp)
subl $0xf, %eax
je 0x8a88
jmp 0x8a74
movl -0x30(%rbp), %eax
subl $0x10, %eax
je 0x8aa0
jmp 0x8a7e
movl -0x30(%rbp), %eax
subl $0x1a, %eax
jne 0x8ab8
jmp 0x8a88
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x13, %edi
callq 0x7ac0
movq %rax, -0x10(%rbp)
jmp 0x8ad7
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x14, %edi
callq 0x7ac0
movq %rax, -0x10(%rbp)
jmp 0x8ad7
leaq 0xaeb0(%rip), %rdi      # 0x1396f
leaq 0x9f8b(%rip), %rsi      # 0x12a51
movl $0xdfc, %edx            # imm = 0xDFC
leaq 0xb87d(%rip), %rcx      # 0x1434f
callq 0x30f0
jmp 0x8add
movb $0x0, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x8af3
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x5260
jmp 0x8af8
jmp 0x8a09
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::parse_gtlt(neteruhsp::parse_context_t&)
ast_node_t* parse_gtlt( parse_context_t& c )
{
	auto node =parse_addsub(c);

	for( ; ; )
	{
		bool is_continue = true;
		const auto token = read_token( c );
		switch( token->tag_ )
		{
			case TOKEN_OP_GT:
			case TOKEN_OP_GTOE:
			case TOKEN_OP_LT:
			case TOKEN_OP_LTOE:
			{
				auto r = parse_addsub( c );
				if ( r == nullptr )
				{ raise_error( ">,>=,<,<=の演算子で、右項の解析が出来ません@@ %d行目", token->appear_line_ ); }

				switch( token->tag_ )
				{
					case TOKEN_OP_GT:	node = create_ast_node( NODE_GT, node, r ); break;
					case TOKEN_OP_GTOE:	node = create_ast_node( NODE_GTOE, node, r ); break;
					case TOKEN_OP_LT:	node = create_ast_node( NODE_LT, node, r ); break;
					case TOKEN_OP_LTOE:	node = create_ast_node( NODE_LTOE, node, r ); break;
					default: assert( false ); break;
				}
				break;
			}
			default:
				is_continue = false;
				break;
		}
		if ( !is_continue )
		{
			unread_token( c );
			break;
		}
	}
	return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x8c50
movq %rax, -0x10(%rbp)
movb $0x1, -0x11(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5160
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
addl $-0x11, %eax
subl $0x3, %eax
ja 0x8c20
jmp 0x8b4e
movq -0x8(%rbp), %rdi
callq 0x8c50
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x8b77
movq -0x20(%rbp), %rax
movl 0x18(%rax), %esi
leaq 0xb815(%rip), %rdi      # 0x14385
movb $0x0, %al
callq 0x4cd0
movq -0x20(%rbp), %rax
movl (%rax), %eax
addl $-0x11, %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x3, %eax
ja 0x8bff
movq -0x30(%rbp), %rax
leaq 0x9a1e(%rip), %rcx      # 0x125b4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x15, %edi
callq 0x7ac0
movq %rax, -0x10(%rbp)
jmp 0x8c1e
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x16, %edi
callq 0x7ac0
movq %rax, -0x10(%rbp)
jmp 0x8c1e
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x17, %edi
callq 0x7ac0
movq %rax, -0x10(%rbp)
jmp 0x8c1e
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x18, %edi
callq 0x7ac0
movq %rax, -0x10(%rbp)
jmp 0x8c1e
leaq 0xad69(%rip), %rdi      # 0x1396f
leaq 0x9e44(%rip), %rsi      # 0x12a51
movl $0xe26, %edx            # imm = 0xE26
leaq 0xb7b4(%rip), %rcx      # 0x143cd
callq 0x30f0
jmp 0x8c24
movb $0x0, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x8c3a
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x5260
jmp 0x8c3f
jmp 0x8b29
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::parse_addsub(neteruhsp::parse_context_t&)
ast_node_t* parse_addsub( parse_context_t& c )
{
	auto node =parse_muldivmod(c);

	for( ; ; )
	{
		bool is_continue = true;
		const auto token = read_token( c );
		switch( token->tag_ )
		{
			case TOKEN_OP_ADD:
			case TOKEN_OP_SUB:
			{
				auto r = parse_muldivmod( c );
				if ( r == nullptr )
				{ raise_error( "+-の演算子で、右項の解析が出来ません@@ %d行目", token->appear_line_ ); }

				switch( token->tag_ )
				{
					case TOKEN_OP_ADD:	node = create_ast_node( NODE_ADD, node, r ); break;
					case TOKEN_OP_SUB:	node = create_ast_node( NODE_SUB, node, r ); break;
					default: assert( false ); break;
				}
				break;
			}
			default:
				is_continue = false;
				break;
		}
		if ( !is_continue )
		{
			unread_token( c );
			break;
		}
	}
	return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x8d50
movq %rax, -0x10(%rbp)
movb $0x1, -0x11(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5160
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
addl $-0x15, %eax
subl $0x1, %eax
ja 0x8d22
jmp 0x8c8e
movq -0x8(%rbp), %rdi
callq 0x8d50
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x8cb7
movq -0x20(%rbp), %rax
movl 0x18(%rax), %esi
leaq 0xb752(%rip), %rdi      # 0x14402
movb $0x0, %al
callq 0x4cd0
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
subl $0x15, %eax
je 0x8cd1
jmp 0x8cc7
movl -0x2c(%rbp), %eax
subl $0x16, %eax
je 0x8ce9
jmp 0x8d01
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x19, %edi
callq 0x7ac0
movq %rax, -0x10(%rbp)
jmp 0x8d20
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x1a, %edi
callq 0x7ac0
movq %rax, -0x10(%rbp)
jmp 0x8d20
leaq 0xac67(%rip), %rdi      # 0x1396f
leaq 0x9d42(%rip), %rsi      # 0x12a51
movl $0xe4c, %edx            # imm = 0xE4C
leaq 0xb728(%rip), %rcx      # 0x14443
callq 0x30f0
jmp 0x8d26
movb $0x0, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x8d3c
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x5260
jmp 0x8d41
jmp 0x8c69
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)