LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/comment.c
// Function: pp_comment_process
void pp_comment_process(
	ResizableString *dst,
	const char *file,
	const char *src,
	int len
) {
	assert(dst);
	assert(file);
	assert(src);

	LexerContext *ctx = lexer_new_context(file, src, len, _matchers);
	lexer_parse_first(ctx);

	LexerToken *token;
	while ((token = lexer_next_token(ctx)) != NULL) {
		switch (token->type) {
			case _TOKEN_LITERAL_CHAR:
			case _TOKEN_LITERAL_STRING:
			case _TOKEN_TEXT: {
				rstr_append_with_raw(dst, token->content, token->len);
				break;
			}
			case _TOKEN_SINGLE_LINE_COMMENT: {
				for (int i = 0; i < token->len; i++) {
					rstr_append_with_char(dst, ' ');
				}
				break;
			}
			case _TOKEN_MULTILINE_COMMENT: {
				for (int i = 0; i < token->len; i++) {
					if (token->content[i] == '\n') {
						rstr_append_with_char(dst, '\n');
					} else {
						rstr_append_with_char(dst, ' ');
					}
				}
				break;
			}
			default: {
				assert(0);
			}
		}
	}

	lexer_free_context(ctx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x24447
testq %rsi, %rsi
je 0x24466
testq %rdx, %rdx
je 0x24485
movq %rdi, %rbx
leaq 0x21cbc(%rip), %rax     # 0x46010
movq %rsi, %rdi
movq %rdx, %rsi
movl %ecx, %edx
movq %rax, %rcx
callq 0xae18
movq %rax, %r14
movq %rax, %rdi
callq 0xb8f0
movq %r14, %rdi
callq 0xb36c
testq %rax, %rax
je 0x24418
movq %rax, %r15
movl (%r15), %eax
leal -0x1000(%rax), %ecx
cmpl $0x3, %ecx
jae 0x243b3
movq 0x8(%r15), %rsi
movl 0x4(%r15), %edx
movq %rbx, %rdi
callq 0xe497
movq %r14, %rdi
callq 0xb36c
movq %rax, %r15
testq %rax, %rax
jne 0x24383
jmp 0x24418
cmpl $0xe000, %eax           # imm = 0xE000
je 0x243f6
cmpl $0xe001, %eax           # imm = 0xE001
jne 0x24428
cmpl $0x0, 0x4(%r15)
jle 0x243a1
xorl %r12d, %r12d
movq 0x8(%r15), %rax
cmpb $0xa, (%rax,%r12)
movl $0xa, %esi
je 0x243e0
movl $0x20, %esi
movq %rbx, %rdi
callq 0xe3fa
incq %r12
movslq 0x4(%r15), %rax
cmpq %rax, %r12
jl 0x243cb
jmp 0x243a1
cmpl $0x0, 0x4(%r15)
jle 0x243a1
xorl %r12d, %r12d
movq %rbx, %rdi
movl $0x20, %esi
callq 0xe3fa
incl %r12d
cmpl 0x4(%r15), %r12d
jl 0x24400
jmp 0x243a1
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xb112
leaq 0x9f41(%rip), %rdi      # 0x2e370
leaq 0x11115(%rip), %rsi     # 0x3554b
leaq 0x1112e(%rip), %rcx     # 0x3556b
movl $0x111, %edx            # imm = 0x111
callq 0xa0b0
leaq 0x8c1b(%rip), %rdi      # 0x2d069
leaq 0x110f6(%rip), %rsi     # 0x3554b
leaq 0x1110f(%rip), %rcx     # 0x3556b
movl $0xf0, %edx
callq 0xa0b0
leaq 0x959c(%rip), %rdi      # 0x2da09
leaq 0x110d7(%rip), %rsi     # 0x3554b
leaq 0x110f0(%rip), %rcx     # 0x3556b
movl $0xf1, %edx
callq 0xa0b0
leaq 0xaa51(%rip), %rdi      # 0x2eedd
leaq 0x110b8(%rip), %rsi     # 0x3554b
leaq 0x110d1(%rip), %rcx     # 0x3556b
movl $0xf2, %edx
callq 0xa0b0
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/evaluator.c
// Function: pp_eval
int pp_eval(
	PPGeneratorContext *genctx,
	const char *expr,
	int len
) {
	assert(genctx);
	assert(expr);

	int result;

	LexerContext *lexctx = lexer_new_context(
		genctx->psrctx->lexctx->file,
		expr,
		len,
		_matchers
	);
	lexer_parse(lexctx);

	ParserContext *psrctx = parser_new_context(lexctx);
	psrctx->arch = genctx->psrctx->arch;
	psrctx->ast = _rule_expr_wrapper(psrctx);

	result = _eval_expr(genctx, psrctx->ast);

	parser_free_context(psrctx);

	lexer_free_context(lexctx);

	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x24a5d
testq %rsi, %rsi
je 0x24a7c
movq %rdi, %rbx
movq (%rdi), %rax
movq (%rax), %rax
movq (%rax), %rdi
leaq 0x216d8(%rip), %rcx     # 0x46070
callq 0xae18
movq %rax, %r14
movq %rax, %rdi
callq 0xb717
movq %r14, %rdi
callq 0xd409
movq %rax, %r15
movq (%rbx), %rax
movl 0x30(%rax), %eax
movl %eax, 0x30(%r15)
movq (%r15), %rdi
testq %rdi, %rdi
je 0x24a9b
callq 0xb5f9
movq %r15, %rdi
callq 0x26c4c
testq %rax, %rax
je 0x24a26
movq %rax, %r12
leaq 0xb90d(%rip), %rdx      # 0x302f2
movq %r15, %rdi
movl $0xe00, %esi            # imm = 0xE00
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xd511
movq 0x20(%r15), %rcx
movq %rcx, 0x18(%r15)
movq %rax, 0x20(%r15)
movq %rax, 0x30(%r12)
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0xd7ef
movq %rax, %r12
movq (%r15), %rdi
callq 0xb6c2
jmp 0x24a31
movq (%r15), %rdi
callq 0xb661
xorl %r12d, %r12d
movq %r12, 0x8(%r15)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x24aba
movl %eax, %ebx
movq %r15, %rdi
callq 0xd417
movq %r14, %rdi
callq 0xb112
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10c34(%rip), %rdi     # 0x35698
leaq 0x10c34(%rip), %rsi     # 0x3569f
leaq 0x10c4f(%rip), %rcx     # 0x356c1
movl $0x585, %edx            # imm = 0x585
callq 0xa0b0
leaq 0xc05d(%rip), %rdi      # 0x30ae0
leaq 0x10c15(%rip), %rsi     # 0x3569f
leaq 0x10c30(%rip), %rcx     # 0x356c1
movl $0x586, %edx            # imm = 0x586
callq 0xa0b0
leaq 0xfea6(%rip), %rdi      # 0x34948
leaq 0x10bf6(%rip), %rsi     # 0x3569f
leaq 0xff45(%rip), %rcx      # 0x349f5
movl $0x2a0, %edx            # imm = 0x2A0
callq 0xa0b0
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/evaluator.c
// Function: get_string_from_node
static void _get_string_from_node(
	PPGeneratorContext *genctx,
	ResizableString *rstr,
	ParserASTNode *node
) {
	assert(rstr);
	assert(node);

	if (node->type == _NODE_IDENTIFIER) {
		ResizableString rstr_tmp;
		rstr_init(&rstr_tmp);

		ResizableString rstr_tmp_trimed;
		rstr_init(&rstr_tmp_trimed);

		expand_macro_rstr(
			&rstr_tmp,
			genctx,
			node->token->content,
			node->token->len
		);

		rstr_trim_ex(&rstr_tmp_trimed, &rstr_tmp, RSTR_SPACE_CHAR_COMPARER);

		if (util_is_literal_string(RSTR_CSTR(&rstr_tmp_trimed), RSTR_LEN(&rstr_tmp_trimed))) {
			util_get_str_val(
				rstr,
				RSTR_CSTR(&rstr_tmp_trimed),
				RSTR_LEN(&rstr_tmp_trimed)
			);
		} else {
			rstr_append_with_rstr(rstr, &rstr_tmp);
		}

		rstr_free(&rstr_tmp);
		rstr_free(&rstr_tmp_trimed);	
	} else if (node->type == _NODE_LITERAL_STRING) {
		util_get_str_val(
			rstr,
			node->token->content,
			node->token->len
		);
	} else {
		assert(0);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rsi, %rsi
je 0x27fa6
movq %rdx, %r15
testq %rdx, %rdx
je 0x27fc5
movq %rsi, %rbx
movl (%r15), %eax
cmpl $0x302, %eax            # imm = 0x302
je 0x27f58
cmpl $0x200, %eax            # imm = 0x200
jne 0x27fe4
movq %rdi, %r14
leaq -0x48(%rbp), %r12
movq %r12, %rdi
callq 0xe274
leaq -0x38(%rbp), %r13
movq %r13, %rdi
callq 0xe274
movq 0x10(%r15), %rax
movq 0x8(%rax), %rdx
movl 0x4(%rax), %ecx
movq %r12, %rdi
movq %r14, %rsi
callq 0x2a6b4
leaq -0x18c5d(%rip), %rdx    # 0xf2b6
movq %r13, %rdi
movq %r12, %rsi
callq 0xf507
movq 0x8(%r13), %rdi
testq %rdi, %rdi
leaq 0x6866(%rip), %r14      # 0x2e792
cmoveq %r14, %rdi
movl 0x4(%r13), %esi
callq 0x1078e
testb %al, %al
je 0x27f79
movq -0x30(%rbp), %rax
testq %rax, %rax
cmovneq %rax, %r14
movl -0x34(%rbp), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10d2a
jmp 0x27f85
movq 0x10(%r15), %rax
movq 0x8(%rax), %rsi
movl 0x4(%rax), %edx
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10d2a
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0xe5be
leaq -0x48(%rbp), %rdi
callq 0xe772
leaq -0x38(%rbp), %rdi
callq 0xe772
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6a93(%rip), %rdi      # 0x2ea40
leaq 0xd6eb(%rip), %rsi      # 0x3569f
leaq 0xd7e4(%rip), %rcx      # 0x3579f
movl $0x49f, %edx            # imm = 0x49F
callq 0xa0b0
leaq 0x9cdf(%rip), %rdi      # 0x31cab
leaq 0xd6cc(%rip), %rsi      # 0x3569f
leaq 0xd7c5(%rip), %rcx      # 0x3579f
movl $0x4a0, %edx            # imm = 0x4A0
callq 0xa0b0
leaq 0x6385(%rip), %rdi      # 0x2e370
leaq 0xd6ad(%rip), %rsi      # 0x3569f
leaq 0xd7a6(%rip), %rcx      # 0x3579f
movl $0x4c5, %edx            # imm = 0x4C5
callq 0xa0b0
nop
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/gen.c
// Function: pp_gen_generate
void pp_gen_generate(PPGeneratorContext *ctx) {
	assert(ctx);
	assert(ctx->psrctx);
	assert(ctx->psrctx->ast);
	assert(ctx->psrctx->ast->type == PP_NODE_MODULE);

	_gen_module(ctx, ctx->psrctx->ast);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x28033
movq (%rdi), %rax
testq %rax, %rax
je 0x28052
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x28071
cmpl $0x100, (%rax)          # imm = 0x100
jne 0x28090
movq 0x48(%rax), %rax
movq (%rax), %rsi
popq %rbp
jmp 0x284a6
leaq 0x7d8a(%rip), %rdi      # 0x2fdc4
leaq 0xd8eb(%rip), %rsi      # 0x3592c
leaq 0xd900(%rip), %rcx      # 0x35948
movl $0x409, %edx            # imm = 0x409
callq 0xa0b0
leaq 0xd91a(%rip), %rdi      # 0x35973
leaq 0xd8cc(%rip), %rsi      # 0x3592c
leaq 0xd8e1(%rip), %rcx      # 0x35948
movl $0x40a, %edx            # imm = 0x40A
callq 0xa0b0
leaq 0xd907(%rip), %rdi      # 0x3597f
leaq 0xd8ad(%rip), %rsi      # 0x3592c
leaq 0xd8c2(%rip), %rcx      # 0x35948
movl $0x40b, %edx            # imm = 0x40B
callq 0xa0b0
leaq 0xd8f9(%rip), %rdi      # 0x35990
leaq 0xd88e(%rip), %rsi      # 0x3592c
leaq 0xd8a3(%rip), %rcx      # 0x35948
movl $0x40c, %edx            # imm = 0x40C
callq 0xa0b0
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/gen.c
// Function: delete_gen_func_macro
static void _delete_gen_func_macro(PPGeneratorFuncMacro *macro) {
	assert(macro);
	llst_free(&(macro->params), true);
	rstr_free(&(macro->body));
	free(macro);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x282e1
movq %rdi, %rbx
movl $0x1, %esi
callq 0xbd25
leaq 0x28(%rbx), %rdi
callq 0xe772
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xa1a0
leaq 0xddcb(%rip), %rdi      # 0x360b3
leaq 0xd63d(%rip), %rsi      # 0x3592c
leaq 0xddc3(%rip), %rcx      # 0x360b9
movl $0x10e, %edx            # imm = 0x10E
callq 0xa0b0
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/gen.c
// Function: pp_gen_free_context
void pp_gen_free_context(PPGeneratorContext *ctx) {
	assert(ctx);

	if (ctx->map_kv != NULL) {
		map_free(ctx->map_kv, true, true);
		free(ctx->map_kv);
	}

	if (ctx->map_kv_with_params != NULL) {
		map_free(ctx->map_kv_with_params, true, true);
		free(ctx->map_kv_with_params);
	}

	llst_free(&(ctx->include_paths), true);

	free(ctx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2836c
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x2832f
movl $0x1, %esi
movl $0x1, %edx
callq 0xc4de
movq 0x18(%rbx), %rdi
callq 0xa1a0
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x28350
movl $0x1, %esi
movl $0x1, %edx
callq 0xc4de
movq 0x20(%rbx), %rdi
callq 0xa1a0
leaq 0x30(%rbx), %rdi
movl $0x1, %esi
callq 0xbd25
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xa1a0
leaq 0x7a51(%rip), %rdi      # 0x2fdc4
leaq 0xd5b2(%rip), %rsi      # 0x3592c
leaq 0xd6f7(%rip), %rcx      # 0x35a78
movl $0x457, %edx            # imm = 0x457
callq 0xa0b0
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/gen.c
// Function: pp_gen_define
void pp_gen_define(
	PPGeneratorContext *ctx,
	ResizableString *k,
	ResizableString *v
) {
	assert(ctx);
	assert(k);

	ResizableString *key = rstr_new_with_rstr(k);
	if (RSTR_LEN(key) == 0) {
		_SYNERR(ctx, "invalid macro name.");
	}
	for (int i = 0; i < RSTR_LEN(key); i++) {
		if (!util_is_identifier_item(RSTR_CHAR(key, i))) {
			_SYNERR(ctx, "invalid macro name.");
		}
	}

	ResizableString *value;
	if (v == NULL) {
		value = rstr_new();
	} else {
		value = rstr_new_with_rstr(v);
	}

	map_remove(ctx->map_kv, key, true, true);
	map_set(ctx->map_kv, key, value, true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x28468
testq %rsi, %rsi
je 0x28487
movq %rdi, %rbx
movq %rdx, -0x30(%rbp)
movq %rsi, %rdi
callq 0xe74d
movq %rax, %r14
movl 0x4(%rax), %eax
testl %eax, %eax
jne 0x283d5
movq (%rbx), %rdi
leaq 0xd72a(%rip), %rsi      # 0x35af8
callq *0x48(%rdi)
movl 0x4(%r14), %eax
testl %eax, %eax
jle 0x28418
xorl %r13d, %r13d
leaq 0x63af(%rip), %r15      # 0x2e792
leaq 0xd70e(%rip), %r12      # 0x35af8
movq 0x8(%r14), %rax
testq %rax, %rax
cmoveq %r15, %rax
movsbl (%rax,%r13), %edi
callq 0x105ca
testb %al, %al
jne 0x2840c
movq (%rbx), %rdi
movq %r12, %rsi
callq *0x48(%rdi)
incq %r13
movslq 0x4(%r14), %rax
cmpq %rax, %r13
jl 0x283ea
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x28428
callq 0xe74d
jmp 0x2842d
callq 0xe665
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0xc765
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x1, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc56c
leaq 0x7955(%rip), %rdi      # 0x2fdc4
leaq 0xd4b6(%rip), %rsi      # 0x3592c
leaq 0xd62a(%rip), %rcx      # 0x35aa7
movl $0x46d, %edx            # imm = 0x46D
callq 0xa0b0
leaq 0xd668(%rip), %rdi      # 0x35af6
leaq 0xd497(%rip), %rsi      # 0x3592c
leaq 0xd60b(%rip), %rcx      # 0x35aa7
movl $0x46e, %edx            # imm = 0x46E
callq 0xa0b0
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/gen.c
// Function: include_file_from_include_path
static void _include_file_from_include_path(
	PPGeneratorContext *ctx,
	ParserASTNode *node,
	ResizableString *filename
) {
	assert(ctx);
	assert(node);
	assert(filename);

	bool included = false;
	LinkedListNode *n = ctx->include_paths.head;
	while (!included && n != NULL) {
		ResizableString filepath;
		rstr_init_with_rstr(&filepath, n->data);
		rstr_append_with_rstr(&filepath, filename);

		if (_include_file(ctx, RSTR_CSTR(&filepath))) {
			included = true;
		}

		rstr_free(&filepath);
		n = n->next;
	}
	if (!included) {
		_SYNERR_NODE(ctx, node, "cannot include file.");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
testq %rdx, %rdx
je 0x2953b
movq %rdi, %r14
movq 0x30(%rdi), %rbx
testq %rbx, %rbx
je 0x29504
movq %rdx, %r15
movq %rsi, -0x30(%rbp)
leaq -0x430(%rbp), %r12
movq 0x8(%rbx), %rsi
movq %r12, %rdi
callq 0xe566
movq %r12, %rdi
movq %r15, %rsi
callq 0xe5be
movq -0x428(%rbp), %rsi
testq %rsi, %rsi
leaq 0x52bc(%rip), %rax      # 0x2e792
cmoveq %rax, %rsi
movq %r14, %rdi
callq 0x2955a
movl %eax, %r13d
movq %r12, %rdi
callq 0xe772
testb %r13b, %r13b
jne 0x294fb
movq 0x18(%rbx), %rbx
testq %rbx, %rbx
jne 0x294ae
testb %r13b, %r13b
movq -0x30(%rbp), %rsi
jne 0x29529
movups 0xc752(%rip), %xmm0     # 0x35c5d
leaq -0x430(%rbp), %rdx
movaps %xmm0, (%rdx)
movabsq $0x2e656c69662065, %rax # imm = 0x2E656C69662065
movq %rax, 0xd(%rdx)
movq (%r14), %rdi
callq *0x58(%rdi)
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc712(%rip), %rdi      # 0x35c54
leaq 0xc3e3(%rip), %rsi      # 0x3592c
leaq 0xc6a5(%rip), %rcx      # 0x35bf5
movl $0xb2, %edx
callq 0xa0b0
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/gen.c
// Function: gen_if_block
static void _gen_if_block(
	PPGeneratorContext *ctx,
	ParserASTNode *node
) {
	assert(ctx);
	assert(node);
	assert(node->type == PP_NODE_BLOCK);

	if (node->nchilds > 0) {
		ParserASTNode *child = node->childs[0];
		_OUT_FMT(ctx, "#line %d \"%s\"", child->line, child->file);
	}

	_gen_block(ctx, node);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
testq %rsi, %rsi
je 0x2983e
movq %rsi, %rbx
cmpl $0x300, (%rsi)          # imm = 0x300
jne 0x2985d
movq %rdi, %r14
cmpl $0x0, 0x44(%rbx)
jle 0x29825
movq 0x48(%rbx), %rax
movq (%rax), %rax
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x297f5
movl 0x20(%rax), %edx
movq 0x18(%rax), %rcx
leaq 0xc3dc(%rip), %rsi      # 0x35bc8
xorl %eax, %eax
callq 0xa100
jmp 0x29825
movl 0x20(%rax), %ecx
movq 0x18(%rax), %r8
leaq 0xc3c5(%rip), %rdx      # 0x35bc8
leaq -0x420(%rbp), %r15
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
xorl %eax, %eax
callq 0xa0a0
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0xe2fb
movq %r14, %rdi
movq %rbx, %rsi
callq 0x284a6
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8466(%rip), %rdi      # 0x31cab
leaq 0xc0e0(%rip), %rsi      # 0x3592c
leaq 0xc532(%rip), %rcx      # 0x35d85
movl $0x3ef, %edx            # imm = 0x3EF
callq 0xa0b0
leaq 0xc2df(%rip), %rdi      # 0x35b43
leaq 0xc0c1(%rip), %rsi      # 0x3592c
leaq 0xc513(%rip), %rcx      # 0x35d85
movl $0x3f0, %edx            # imm = 0x3F0
callq 0xa0b0
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/lexer.c
// Function: pp_lexer_new_context
LexerContext * pp_lexer_new_context(
	const char *file,
	const char *source,
	int len
) {
	assert(file);
	assert(source);
	assert(len >= 0);

	return lexer_new_context(file, source, len, _matchers);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x29ebf
testq %rsi, %rsi
je 0x29ede
testl %edx, %edx
js 0x29efd
leaq 0x1c3b7(%rip), %rcx     # 0x46270
popq %rbp
jmp 0xae18
leaq 0x3b43(%rip), %rdi      # 0x2da09
leaq 0xc220(%rip), %rsi      # 0x360ed
leaq 0xc237(%rip), %rcx      # 0x3610b
movl $0xdc, %edx
callq 0xa0b0
leaq 0x3651(%rip), %rdi      # 0x2d536
leaq 0xc201(%rip), %rsi      # 0x360ed
leaq 0xc218(%rip), %rcx      # 0x3610b
movl $0xdd, %edx
callq 0xa0b0
leaq 0x3639(%rip), %rdi      # 0x2d53d
leaq 0xc1e2(%rip), %rsi      # 0x360ed
leaq 0xc1f9(%rip), %rcx      # 0x3610b
movl $0xde, %edx
callq 0xa0b0
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/line.c
// Function: expand_macro_rstr
void expand_macro_rstr(
	ResizableString *rstr,
	PPGeneratorContext *genctx,
	const char *key,
	int len
) {
	assert(rstr);
	assert(genctx);
	assert(key);

	_expand_macro_rstr(rstr, genctx, key, len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x2a6ca
testq %rsi, %rsi
je 0x2a6e9
testq %rdx, %rdx
je 0x2a708
popq %rbp
jmp 0x2a727
leaq 0x436f(%rip), %rdi      # 0x2ea40
leaq 0xbb6d(%rip), %rsi      # 0x36245
leaq 0xbb83(%rip), %rcx      # 0x36262
movl $0x296, %edx            # imm = 0x296
callq 0xa0b0
leaq 0xafa8(%rip), %rdi      # 0x35698
leaq 0xbb4e(%rip), %rsi      # 0x36245
leaq 0xbb64(%rip), %rcx      # 0x36262
movl $0x297, %edx            # imm = 0x297
callq 0xa0b0
leaq 0x36b2(%rip), %rdi      # 0x2ddc1
leaq 0xbb2f(%rip), %rsi      # 0x36245
leaq 0xbb45(%rip), %rcx      # 0x36262
movl $0x298, %edx            # imm = 0x298
callq 0xa0b0
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/line.c
// Function: expand_macro_rstr
static void _expand_macro_rstr(
	ResizableString *rstr,
	PPGeneratorContext *genctx,
	const char *key,
	int len
) {
	assert(rstr);
	assert(genctx);
	assert(key);

	ResizableString rstr_key;
	rstr_init_with_raw(&rstr_key, key, len);

	if (map_exists_key(genctx->map_kv, &rstr_key)) {
		ResizableString *value = map_get(genctx->map_kv, &rstr_key);
		_expand_rstr(rstr, genctx, RSTR_CSTR(value), RSTR_LEN(value));
	} else {
		rstr_append_with_raw(rstr, key, len);
	}

	rstr_free(&rstr_key);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdx, %rdx
je 0x2a7c6
movl %ecx, %r15d
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x38(%rbp), %r13
movq %r13, %rdi
movq %rdx, %rsi
movl %ecx, %edx
callq 0xe41c
movq 0x18(%r14), %rdi
movq %r13, %rsi
callq 0xc82a
testb %al, %al
je 0x2a7a0
movq 0x18(%r14), %rdi
leaq -0x38(%rbp), %rsi
callq 0xc6f2
movq 0x8(%rax), %rcx
testq %rcx, %rcx
leaq 0x4009(%rip), %rdx      # 0x2e792
cmovneq %rcx, %rdx
movl 0x4(%rax), %ecx
movq %rbx, %rdi
movq %r14, %rsi
xorl %r8d, %r8d
callq 0x2a933
jmp 0x2a7ae
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0xe497
leaq -0x38(%rbp), %rdi
callq 0xe772
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x35f4(%rip), %rdi      # 0x2ddc1
leaq 0xba71(%rip), %rsi      # 0x36245
leaq 0xbb31(%rip), %rcx      # 0x3630c
movl $0x17c, %edx            # imm = 0x17C
callq 0xa0b0
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/line.c
// Function: pp_line_process
void pp_line_process(
	PPGeneratorContext *genctx,
	ParserASTNode *node
) {
	assert(genctx);
	assert(node);
	assert(node->type == PP_NODE_LINE);

	_expand(genctx, node->token->content, node->token->len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x2a8b7
testq %rsi, %rsi
je 0x2a8d6
cmpl $0x302, (%rsi)          # imm = 0x302
jne 0x2a8f5
movq 0x10(%rsi), %rax
movq 0x8(%rax), %r14
testq %r14, %r14
je 0x2a914
movq %rdi, %rbx
movl 0x4(%rax), %r15d
leaq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0xe274
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x2a933
cmpl $0x0, 0x4(%r12)
jle 0x2a8a1
xorl %r14d, %r14d
leaq 0x3f36(%rip), %r15      # 0x2e792
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x2a87c
movq -0x28(%rbp), %rax
testq %rax, %rax
cmoveq %r15, %rax
movsbl (%rax,%r14), %edi
callq 0xa0d0
jmp 0x2a895
movq 0x10(%rbx), %rdi
movq -0x28(%rbp), %rax
testq %rax, %rax
cmoveq %r15, %rax
movsbl (%rax,%r14), %esi
callq 0xe3fa
incq %r14
movslq -0x2c(%rbp), %rax
cmpq %rax, %r14
jl 0x2a85c
leaq -0x30(%rbp), %rdi
callq 0xe772
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xadda(%rip), %rdi      # 0x35698
leaq 0xb980(%rip), %rsi      # 0x36245
leaq 0xb9e9(%rip), %rcx      # 0x362b5
movl $0x2a1, %edx            # imm = 0x2A1
callq 0xa0b0
leaq 0x73ce(%rip), %rdi      # 0x31cab
leaq 0xb961(%rip), %rsi      # 0x36245
leaq 0xb9ca(%rip), %rcx      # 0x362b5
movl $0x2a2, %edx            # imm = 0x2A2
callq 0xa0b0
leaq 0xb9f5(%rip), %rdi      # 0x362f1
leaq 0xb942(%rip), %rsi      # 0x36245
leaq 0xb9ab(%rip), %rcx      # 0x362b5
movl $0x2a3, %edx            # imm = 0x2A3
callq 0xa0b0
leaq 0x45c2(%rip), %rdi      # 0x2eedd
leaq 0xb923(%rip), %rsi      # 0x36245
leaq 0xbc6d(%rip), %rcx      # 0x36596
movl $0x285, %edx            # imm = 0x285
callq 0xa0b0
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/line_concat.c
// Function: process
void _process(
	ResizableString *dst,
	const char *file,
	const char *src,
	int len
) {
	assert(dst);
	assert(file);
	assert(src);
	assert(len >= 0);

	for (int i = 0; i < len; i++) {
		char chr = src[i];
		if (chr == '\\') {
			if (i + 1 < len
					&& src[i + 1] == '\n') {
				i += 2;
				int n = 1;
				for (; i < len; i++) {
					chr = src[i];
					if (chr == '\\') {
						if (i + 1 < len
								&& src[i + 1] == '\n') {
							i++;
							n++;
						} else {
							rstr_append_with_char(dst, chr);
						}
					} else {
						rstr_append_with_char(dst, chr);
						if (chr == '\n') {
							break;
						}
					}
				}
				for (int j = 0; j < n; j++) {
					rstr_append_with_char(dst, '\n');
				}
			} else {
				rstr_append_with_char(dst, chr);
			}
		} else {
			rstr_append_with_char(dst, chr);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, -0x2c(%rbp)
testq %rdi, %rdi
je 0x2b834
testq %rsi, %rsi
je 0x2b853
movq %rdx, %r14
testq %rdx, %rdx
je 0x2b872
cmpl $0x0, -0x2c(%rbp)
js 0x2b891
je 0x2b825
movq %rdi, %r15
xorl %r12d, %r12d
movslq %r12d, %rcx
movb (%r14,%rcx), %al
cmpb $0x5c, %al
jne 0x2b80d
incq %rcx
movb $0x5c, %al
cmpl -0x2c(%rbp), %ecx
jge 0x2b80d
cmpb $0xa, (%r14,%rcx)
jne 0x2b80d
addl $0x2, %r12d
movl $0x1, %r13d
cmpl -0x2c(%rbp), %r12d
jge 0x2b7f9
movslq %r12d, %rax
movq %r14, %rbx
movb (%r14,%rax), %r14b
cmpb $0x5c, %r14b
jne 0x2b7c7
incq %rax
cmpl -0x2c(%rbp), %eax
movq %rbx, %r14
jge 0x2b7de
cmpb $0xa, (%r14,%rax)
jne 0x2b7de
incl %r13d
movl %eax, %r12d
jmp 0x2b7eb
movsbl %r14b, %esi
movq %r15, %rdi
callq 0xe3fa
cmpb $0xa, %r14b
movq %rbx, %r14
jne 0x2b7eb
jmp 0x2b7f4
movq %r15, %rdi
movl $0x5c, %esi
callq 0xe3fa
incl %r12d
cmpl -0x2c(%rbp), %r12d
jl 0x2b79d
testl %r13d, %r13d
jle 0x2b818
movq %r15, %rdi
movl $0xa, %esi
callq 0xe3fa
decl %r13d
jne 0x2b7f9
jmp 0x2b818
movsbl %al, %esi
movq %r15, %rdi
callq 0xe3fa
incl %r12d
cmpl -0x2c(%rbp), %r12d
jl 0x2b765
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x182e(%rip), %rdi      # 0x2d069
leaq 0xad8a(%rip), %rsi      # 0x365cc
leaq 0xada7(%rip), %rcx      # 0x365f0
movl $0xb, %edx
callq 0xa0b0
leaq 0x21af(%rip), %rdi      # 0x2da09
leaq 0xad6b(%rip), %rsi      # 0x365cc
leaq 0xad88(%rip), %rcx      # 0x365f0
movl $0xc, %edx
callq 0xa0b0
leaq 0x3664(%rip), %rdi      # 0x2eedd
leaq 0xad4c(%rip), %rsi      # 0x365cc
leaq 0xad69(%rip), %rcx      # 0x365f0
movl $0xd, %edx
callq 0xa0b0
leaq 0x1ca5(%rip), %rdi      # 0x2d53d
leaq 0xad2d(%rip), %rsi      # 0x365cc
leaq 0xad4a(%rip), %rcx      # 0x365f0
movl $0xe, %edx
callq 0xa0b0
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/line_concat.c
// Function: pp_line_concat_process
void pp_line_concat_process(
	ResizableString *dst,
	const char *file,
	const char *src,
	int len
) {
	assert(dst);
	assert(file);
	assert(src);

	_process(dst, file, src, len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x2b8c9
testq %rsi, %rsi
je 0x2b8e8
testq %rdx, %rdx
je 0x2b907
popq %rbp
jmp 0x2b720
leaq 0x1799(%rip), %rdi      # 0x2d069
leaq 0xacf5(%rip), %rsi      # 0x365cc
leaq 0xad54(%rip), %rcx      # 0x36632
movl $0x3a, %edx
callq 0xa0b0
leaq 0x211a(%rip), %rdi      # 0x2da09
leaq 0xacd6(%rip), %rsi      # 0x365cc
leaq 0xad35(%rip), %rcx      # 0x36632
movl $0x3b, %edx
callq 0xa0b0
leaq 0x35cf(%rip), %rdi      # 0x2eedd
leaq 0xacb7(%rip), %rsi      # 0x365cc
leaq 0xad16(%rip), %rcx      # 0x36632
movl $0x3c, %edx
callq 0xa0b0
nop
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/parser.c
// Function: pp_parser_new_context
_RULE_END

ParserContext * pp_parser_new_context(
	const char *file,
	const char *source,
	int len
) {
	assert(file);
	assert(source);
	assert(len >= 0);

	LexerContext *lexctx = pp_lexer_new_context(file, source, len);
	lexer_parse(lexctx);

	ParserContext *ctx = parser_new_context(lexctx);
	ctx->arch = 0;

	return ctx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2b962
testq %rsi, %rsi
je 0x2b981
testl %edx, %edx
js 0x2b9a0
callq 0x29ea0
movq %rax, %rbx
movq %rax, %rdi
callq 0xb717
movq %rbx, %rdi
callq 0xd409
movl $0x0, 0x30(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x20a0(%rip), %rdi      # 0x2da09
leaq 0xad12(%rip), %rsi      # 0x36682
leaq 0xad2a(%rip), %rcx      # 0x366a1
movl $0x1b4, %edx            # imm = 0x1B4
callq 0xa0b0
leaq 0x1bae(%rip), %rdi      # 0x2d536
leaq 0xacf3(%rip), %rsi      # 0x36682
leaq 0xad0b(%rip), %rcx      # 0x366a1
movl $0x1b5, %edx            # imm = 0x1B5
callq 0xa0b0
leaq 0x1b96(%rip), %rdi      # 0x2d53d
leaq 0xacd4(%rip), %rsi      # 0x36682
leaq 0xacec(%rip), %rcx      # 0x366a1
movl $0x1b6, %edx            # imm = 0x1B6
callq 0xa0b0
// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/parser.c
// Function: print_ast
static void _print_ast(
	ParserASTNode *node,
	FILE *file,
	int level,
	char padchr
) {
	assert(node);
	assert(file);
	assert(level >= 0);

	for (int i = 0; i < level; i++) {
		fputc(padchr, file);
	}

	fprintf(
		file,
		"@%s#%x#%p#%p#%d",
		node->type_name != NULL ? node->type_name : "N/A",
		node->type,
		node->parent,
		node,
		node->nchilds
	);
	if (node->token != NULL) {
		fputc('(', file);
		for (int i = 0; i < node->token->len; i++) {
			fputc(*(node->token->content + i), file);
		}
		fprintf(file, "#%x)", node->token->type);
	}
	fputc('\n', file);

	for (int i = 0; i < node->nchilds; i++) {
		_print_ast(node->childs[i], file, level + 1, padchr);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x2bd04
movl %edx, %ebx
testl %edx, %edx
js 0x2bd23
movq %rsi, %r14
movq %rdi, %r15
je 0x2bc37
movl %ebx, %r12d
movl $0x9, %edi
movq %r14, %rsi
callq 0xa0d0
decl %r12d
jne 0x2bc25
movq 0x8(%r15), %rax
testq %rax, %rax
leaq 0x98db(%rip), %rdx      # 0x35520
cmovneq %rax, %rdx
movl (%r15), %ecx
movq 0x30(%r15), %r8
movl 0x44(%r15), %eax
movl %eax, (%rsp)
leaq 0xaf7f(%rip), %rsi      # 0x36bdd
movq %r14, %rdi
movq %r15, %r9
xorl %eax, %eax
callq 0xa100
cmpq $0x0, 0x10(%r15)
je 0x2bcc0
movl $0x28, %edi
movq %r14, %rsi
callq 0xa0d0
movq 0x10(%r15), %rax
cmpl $0x0, 0x4(%rax)
jle 0x2bcad
xorl %r12d, %r12d
movq 0x8(%rax), %rax
movsbl (%rax,%r12), %edi
movq %r14, %rsi
callq 0xa0d0
incq %r12
movq 0x10(%r15), %rax
movslq 0x4(%rax), %rcx
cmpq %rcx, %r12
jl 0x2bc8c
movl (%rax), %edx
leaq 0x986e(%rip), %rsi      # 0x35524
movq %r14, %rdi
xorl %eax, %eax
callq 0xa100
movl $0xa, %edi
movq %r14, %rsi
callq 0xa0d0
cmpl $0x0, 0x44(%r15)
jle 0x2bcf7
incl %ebx
xorl %r12d, %r12d
movq 0x48(%r15), %rax
movq (%rax,%r12,8), %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x2bbf8
incq %r12
movslq 0x44(%r15), %rax
cmpq %rax, %r12
jl 0x2bcd9
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5fa0(%rip), %rdi      # 0x31cab
leaq 0xa970(%rip), %rsi      # 0x36682
leaq 0x97bb(%rip), %rcx      # 0x354d4
movl $0x1d5, %edx            # imm = 0x1D5
callq 0xa0b0
leaq 0x97de(%rip), %rdi      # 0x35508
leaq 0xa951(%rip), %rsi      # 0x36682
leaq 0x979c(%rip), %rcx      # 0x354d4
movl $0x1d7, %edx            # imm = 0x1D7
callq 0xa0b0
// File: /workspace/github_c_makefile_star2_O3/xtanitfy[P]Murphy/examples/mnist/mnist_train.c
// Function: MnistTrainRun
int MnistTrainRun(SIZE_s *pTrainXSize,SIZE_s *pTrainYSize)
{
	int ret = -1;
	int batchCnt = pTrainXSize->n / netTrainPara.batchsize;
    //int batchCnt = 1;
	int xdim = netTrainPara.batchsize * pTrainXSize->h * pTrainXSize->w;
	int ydim = netTrainPara.batchsize * pTrainYSize->h * pTrainYSize->w;
	int testCnt = 0;

	for (int i = 0;i < batchCnt;i++){
		//CalTimeStart();
		printf("=======Batches:%d==========\n",i);
		NET_setInputData(pNetTrain,gTrainX + xdim * i,xdim);
		NET_setTableYData(pNetTrain,gTrainY + ydim * i,ydim);

		//CalTimeStart();
		ret = NET_Forward(pNetTrain);
		CHECK_EXPR_RET(ret != 0,-1);
		//CalTimeEnd("NET_Forward");
		
		//CalTimeStart();
		ret = NET_Backward(pNetTrain);
		CHECK_EXPR_RET(ret != 0,-1);
		//CalTimeEnd("NET_Backward");

		//CalTimeStart();
		ret = NET_Update(pNetTrain);
		CHECK_EXPR_RET(ret != 0,-1);
		//CalTimeEnd("NET_Update");

		double loss = NET_GetLoss(pNetTrain,"output");
		printf("Output loss:%lf\n",loss);
		//CalTimeEnd("all");

	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl 0x8(%rdi), %eax
movl 0x8e17(%rip), %ebx      # 0xa4e8
cltd
idivl %ebx
testl %eax, %eax
jle 0x17c7
movl (%rdi), %ecx
imull %ebx, %ecx
imull 0x4(%rdi), %ecx
imull (%rsi), %ebx
imull 0x4(%rsi), %ebx
movl %ecx, 0x4(%rsp)
movslq %ecx, %rcx
movslq %ebx, %rdx
movl %eax, %r12d
shlq $0x3, %rdx
movq %rdx, 0x8(%rsp)
shlq $0x3, %rcx
movq %rcx, 0x10(%rsp)
movb $0x1, %r15b
xorl %r14d, %r14d
xorl %ebp, %ebp
xorl %r13d, %r13d
leaq 0x598f(%rip), %rdi      # 0x70ac
movl %r13d, %esi
xorl %eax, %eax
callq 0x1030
movq 0x8ba2(%rip), %rdi      # 0xa2d0
movq 0x8dd3(%rip), %rsi      # 0xa508
addq %r14, %rsi
movl 0x4(%rsp), %edx
callq 0x343c
movq 0x8b88(%rip), %rdi      # 0xa2d0
movq 0x8dc1(%rip), %rsi      # 0xa510
addq %rbp, %rsi
movl %ebx, %edx
callq 0x344c
movq 0x8b70(%rip), %rdi      # 0xa2d0
callq 0x38e1
testl %eax, %eax
jne 0x17cb
movq 0x8b60(%rip), %rdi      # 0xa2d0
callq 0x38f4
testl %eax, %eax
jne 0x17d2
movq 0x8b50(%rip), %rdi      # 0xa2d0
callq 0x2f07
testl %eax, %eax
jne 0x17d9
movq 0x8b40(%rip), %rdi      # 0xa2d0
leaq 0x590e(%rip), %rsi      # 0x70a5
callq 0x37cd
leaq 0x5934(%rip), %rdi      # 0x70d7
movb $0x1, %al
callq 0x1030
incq %r13
cmpq %r12, %r13
setb %r15b
addq 0x8(%rsp), %rbp
addq 0x10(%rsp), %r14
cmpq %r13, %r12
jne 0x1716
xorl %eax, %eax
jmp 0x1803
movl $0xf0, %ecx
jmp 0x17de
movl $0xf5, %ecx
jmp 0x17de
movl $0xfa, %ecx
leaq 0x5860(%rip), %rdi      # 0x7045
leaq 0x586f(%rip), %rsi      # 0x705b
leaq 0x58d6(%rip), %rdx      # 0x70c9
xorl %eax, %eax
callq 0x1030
movzbl %r15b, %eax
andl $0x1, %eax
negl %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xtanitfy[P]Murphy/examples/mnist/mnist_read_input.c
// Function: Mnist_PrintSize
void Mnist_PrintSize(char *name,SIZE_s *pSize)
{
	printf("======name:%s:\n",name);
	printf("pSize->h:%d\n",pSize->h);
	printf("pSize->w:%d\n",pSize->w);
	printf("pSize->n:%d\n",pSize->n);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x57d2(%rip), %rdi      # 0x7168
xorl %eax, %eax
callq 0x1030
movl (%rbx), %esi
leaq 0x57d2(%rip), %rdi      # 0x7178
xorl %eax, %eax
callq 0x1030
movl 0x4(%rbx), %esi
leaq 0x57ce(%rip), %rdi      # 0x7185
xorl %eax, %eax
callq 0x1030
movl 0x8(%rbx), %esi
leaq 0x57ca(%rip), %rdi      # 0x7192
xorl %eax, %eax
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/xtanitfy[P]Murphy/examples/mnist/mnist_read_input.c
// Function: Mnist_GetData
int Mnist_GetData(char *file,double **data,SIZE_s *pSize)
{
	getSizeFromFilename(file,pSize);
	
	int allSize = pSize->w*pSize->h*pSize->n;
	*data = (double *)malloc(sizeof(double)*allSize);
	int ret = readMatFromFile(file,*data,allSize);
	CHECK_EXPR_RET(ret != 0,-1);
	
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rsi
callq 0x1a49
movslq 0x4(%rbx), %rax
movslq (%rbx), %rcx
imulq %rax, %rcx
movslq 0x8(%rbx), %rbx
imulq %rcx, %rbx
movq %rbx, %rdi
shlq $0x3, %rdi
callq 0x10e0
movq %rax, (%r14)
movq %r15, %rdi
movq %rax, %rsi
movl %ebx, %edx
callq 0x1ada
testl %eax, %eax
je 0x1a41
leaq 0x5625(%rip), %rdi      # 0x7045
leaq 0x5778(%rip), %rsi      # 0x719f
leaq 0x5784(%rip), %rdx      # 0x71b2
movl $0x39, %ecx
xorl %eax, %eax
callq 0x1030
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1a43
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/xtanitfy[P]Murphy/examples/mnist/mnist_read_input.c
// Function: getSizeFromFilename
static int getSizeFromFilename(char *file,SIZE_s *pSize)
{
	char buf[256];
	memcpy(buf,file,strlen(file)+1);
	
	char *ptr = strrchr(buf,'_');
	pSize->n = atoi(ptr+1);
	*ptr = '*';
	
	ptr = strrchr(buf,'_');
	pSize->w = atoi(ptr+1);
	*ptr = '*';
	
	ptr = strrchr(buf,'_');
	pSize->h = atoi(ptr+1);
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %rbx
movq %rdi, %r15
callq 0x1060
leaq 0x1(%rax), %rdx
movq %rsp, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x10a0
movq %r14, %rdi
movl $0x5f, %esi
callq 0x10b0
movq %rax, %r15
leaq 0x1(%rax), %rdi
callq 0x1140
movl %eax, 0x8(%rbx)
movb $0x2a, %bpl
movb %bpl, (%r15)
movq %r14, %rdi
movl $0x5f, %esi
callq 0x10b0
movq %rax, %r15
leaq 0x1(%rax), %rdi
callq 0x1140
movl %eax, 0x4(%rbx)
movb %bpl, (%r15)
movq %r14, %rdi
movl $0x5f, %esi
callq 0x10b0
leaq 0x1(%rax), %rdi
callq 0x1140
movl %eax, (%rbx)
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xtanitfy[P]Murphy/examples/mnist/mnist_read_input.c
// Function: readMatFromFile
static int readMatFromFile(char *file,double *data,int size)
{
	FILE *fp = fopen(file,"rb");
	if (fp == NULL) {
		printf("fopen error!\n");
		return -1;
	}
	
	int nread = fread(data,sizeof(double),size,fp);
	if (nread != size) {
		printf("read error,size:%d needreadsize:%d\n",nread,size);
		return -1;
	} else {
		//printf("read success!\n");
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
leaq 0x5701(%rip), %rsi      # 0x71ec
callq 0x10c0
testq %rax, %rax
je 0x1b26
movslq %ebx, %r15
movl $0x8, %esi
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %rcx
callq 0x1120
xorl %ecx, %ecx
cmpl %r15d, %eax
je 0x1b37
leaq 0x56d6(%rip), %rdi      # 0x71ef
movl %eax, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1030
jmp 0x1b32
leaq 0x56e6(%rip), %rdi      # 0x7213
callq 0x1130
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/xtanitfy[P]Murphy/examples/mnist/mnist_read_input.c
// Function: Mnist_dataNormalie
int Mnist_dataNormalie(double *pData,SIZE_s *pSize)
{
	int allSize = pSize->w*pSize->h*pSize->n;
	for (int i= 0;i < allSize;i++) {
		pData[i] /= (double)255; 
	}
	
	return 0;
}

// Assembly:
movl (%rsi), %eax
imull 0x4(%rsi), %eax
imull 0x8(%rsi), %eax
testl %eax, %eax
jle 0x1d61
movl %eax, %eax
xorl %ecx, %ecx
movsd 0x5415(%rip), %xmm0     # 0x7160
movsd (%rdi,%rcx,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rdi,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x1d4b
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/xtanitfy[P]Murphy/src/functions.c
// Function: weightInit
int weightInit(BLOB_s *k)
{
	double arr[][5]= {
		{0.1667,0.0971,0.0427,-0.0349,-0.1637},
        { -0.0996,-0.0161,0.1081,0.1613,-0.0545},
        {0.0396,-0.1783,0.1562,0.1544,0.1160},
        {-0.0052,0.1190,0.0882,-0.0332,-0.1815},
        {0.1449,-0.0205,-0.1199,0.1458,-0.1337}
	};

	BLOB_DATA_PTR(k,ptr);

	int outputNum = k->numSize;
	int inputNum = k->channelSize;
	int sectionY = k->heightSize;
	int sectionX = k->widthSize;
	
	/*��ʱ��������*/
	CHECK_EXPR_RET(sectionY != 5,-1);
	CHECK_EXPR_RET(sectionX != 5,-1);
	
	for (int oy = 0;oy < outputNum;oy++) {	
		for (int ix = 0;ix < inputNum;ix++) {
			for (int y = 0;y < sectionY;y++) {	
				for (int x = 0;x  < sectionX;x++) {
					ptr[oy][ix][y][x] = arr[y][x];
				}
			}
		}
	}
	

	//printf("weightInit OK!\n");
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x20(%rdi), %rax
movl $0x28, %ecx
cmpl $0x5, %eax
jne 0x26d4
movq 0x28(%rdi), %rdx
movl $0x29, %ecx
cmpl $0x5, %edx
jne 0x26d4
movq 0x10(%rdi), %rcx
testl %ecx, %ecx
jle 0x26d0
movq 0x18(%rdi), %rsi
movq 0x8(%rdi), %rdi
imulq %rdx, %rax
movq %rax, %r8
imulq %rsi, %r8
shlq $0x3, %r8
shlq $0x3, %rax
shlq $0x3, %rdx
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
andq %r10, %rcx
movq %rsi, %r9
andq %r10, %r9
xorl %r10d, %r10d
leaq 0x4cc3(%rip), %r11      # 0x7340
testl %esi, %esi
jle 0x26c5
movq %rdi, %rbx
xorl %r14d, %r14d
movq %rbx, %r15
xorl %r12d, %r12d
movq 0x20(%r12,%r11), %r13
movq %r13, 0x20(%r15)
movups (%r12,%r11), %xmm0
movups 0x10(%r12,%r11), %xmm1
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
addq $0x28, %r12
addq %rdx, %r15
cmpq $0xc8, %r12
jne 0x268d
incq %r14
addq %rax, %rbx
cmpq %r9, %r14
jne 0x2687
incq %r10
addq %r8, %rdi
cmpq %rcx, %r10
jne 0x267d
xorl %eax, %eax
jmp 0x26f5
leaq 0x496a(%rip), %rdi      # 0x7045
leaq 0x4d26(%rip), %rsi      # 0x7408
leaq 0x4d2b(%rip), %rdx      # 0x7414
xorl %eax, %eax
callq 0x1030
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/xtanitfy[P]Murphy/src/functions.c
// Function: biasInit
int biasInit(BLOB_s *b)
{
	BLOB_DATA_PTR(b,ptr);
	
	for (int i_batch = 0;i_batch < b->numSize;i_batch++) {
		for (int i_num = 0;i_num < b->channelSize;i_num++) {	
			for (int i_height = 0;i_height < b->heightSize;i_height++) {
				for (int i_width = 0;i_width < b->widthSize;i_width++) {	
					ptr[i_batch][i_num][i_height][i_width] = 0;
				}
			}
		}
	}
	
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x10(%rdi), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x27cb
movq 0x18(%rdi), %rax
movq 0x20(%rdi), %rcx
movq 0x8(%rdi), %rdx
movq %rdx, (%rsp)
movq 0x28(%rdi), %r15
movq %r15, %rdx
movq %rcx, 0x30(%rsp)
imulq %rcx, %rdx
movq %rdx, %rcx
movq %rax, 0x8(%rsp)
imulq %rax, %rcx
shlq $0x3, %rcx
movq %rcx, 0x10(%rsp)
shlq $0x3, %rdx
movq %rdx, 0x28(%rsp)
leaq (,%r15,8), %rbx
xorl %ecx, %ecx
movq %rcx, 0x20(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x27b3
movq (%rsp), %r12
xorl %ebp, %ebp
movq 0x30(%rsp), %rax
movq %rax, %r13
movq %r12, %r14
testq %rax, %rax
je 0x27a4
testq %r15, %r15
je 0x279c
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x1070
addq %rbx, %r14
decq %r13
jne 0x278a
incq %rbp
addq 0x28(%rsp), %r12
cmpq 0x8(%rsp), %rbp
jne 0x277a
movq 0x20(%rsp), %rcx
incq %rcx
movq 0x10(%rsp), %rax
addq %rax, (%rsp)
cmpq 0x18(%rsp), %rcx
jne 0x2767
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/xtanitfy[P]Murphy/src/functions.c
// Function: functionLoss1
double functionLoss1(BLOB_s *pError)
{
	CHECK_EXPR_RET(pError == NULL,-1);

	double loss = 0.0;
	for (int i = 0;i < pError->count;i++) {
		loss += 0.5 * pError->data[i] * pError->data[i];
	}
	loss /= pError->numSize;

	return loss;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x281c
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x2847
movq 0x8(%rdi), %rcx
xorpd %xmm0, %xmm0
xorl %edx, %edx
movsd 0x4b2b(%rip), %xmm1     # 0x7328
movsd (%rcx,%rdx,8), %xmm2
movapd %xmm2, %xmm3
mulsd %xmm1, %xmm3
mulsd %xmm2, %xmm3
addsd %xmm3, %xmm0
incq %rdx
cmpq %rdx, %rax
jne 0x27fd
jmp 0x284b
leaq 0x4822(%rip), %rdi      # 0x7045
leaq 0x4bde(%rip), %rsi      # 0x7408
leaq 0x4bee(%rip), %rdx      # 0x741f
movl $0x4f, %ecx
xorl %eax, %eax
callq 0x1030
movsd 0x4aeb(%rip), %xmm0     # 0x7330
jmp 0x286f
xorpd %xmm0, %xmm0
movsd 0x10(%rdi), %xmm1
unpcklps 0x4aa9(%rip), %xmm1     # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x4ab1(%rip), %xmm1     # 0x7310
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
popq %rax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/xtanitfy[P]Murphy/src/net.c
// Function: NET_addLayer
int NET_addLayer(NET_s *pNet,LAYER_PARA_s *pLayerPara)
{
	CHECK_EXPR_RET(pNet == NULL,-1);
	CHECK_EXPR_RET(pLayerPara == NULL,-1);

	LAYER_s *pLayer = (LAYER_s *)malloc(sizeof(LAYER_s));
	CHECK_EXPR_RET(pLayer == NULL,-1);
	memset(pLayer,'\0',sizeof(LAYER_s));

	char *typename = pLayerPara->typeName;
	BOOL isFind = FALSE;
	int i = 0;
	for (i = 0;i < DIM_OF(gLayerRegInfo);i++) {
		if (!strcmp(gLayerRegInfo[i].typename,typename)) {
			isFind = TRUE;
			break;
		}
	}
	CHECK_EXPR_RET(isFind == FALSE,-1);
	pLayer->init = gLayerRegInfo[i].funcInit;
	pLayer->forward = gLayerRegInfo[i].funcForward;
	pLayer->backward = gLayerRegInfo[i].funcBackward;
	LAYER_PARA_s *para = (LAYER_PARA_s *)malloc(sizeof(LAYER_PARA_s));
	CHECK_EXPR_RET(para == NULL,-1);
	memcpy(para,pLayerPara,sizeof(LAYER_PARA_s));	
	pLayer->para = para;
	
	int ret = NET_Register(pNet,pLayer);
	CHECK_EXPR_RET(ret != 0,-1);

	printf("Add %s layer ok!\n",pLayer->para->name);
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x28fe
movq %rsi, %r14
testq %rsi, %rsi
je 0x291d
movq %rdi, %rbx
movl $0x1, %edi
movl $0x128, %esi            # imm = 0x128
callq 0x1080
testq %rax, %rax
je 0x293c
movq %rax, %r15
leaq 0x4(%r14), %r12
xorl %r13d, %r13d
leaq 0x7854(%rip), %rbp      # 0xa110
movq %r13, %rdi
addq %rbp, %rdi
movq %r12, %rsi
callq 0x1100
testl %eax, %eax
je 0x2958
addq $0x58, %r13
cmpq $0x1b8, %r13            # imm = 0x1B8
jne 0x28bc
leaq 0x475f(%rip), %rdi      # 0x7045
leaq 0x4b40(%rip), %rsi      # 0x742d
leaq 0x4b3f(%rip), %rdx      # 0x7433
movl $0x19, %ecx
jmp 0x29d7
leaq 0x4740(%rip), %rdi      # 0x7045
leaq 0x4b21(%rip), %rsi      # 0x742d
leaq 0x4b20(%rip), %rdx      # 0x7433
movl $0x9, %ecx
jmp 0x29d7
leaq 0x4721(%rip), %rdi      # 0x7045
leaq 0x4b02(%rip), %rsi      # 0x742d
leaq 0x4b01(%rip), %rdx      # 0x7433
movl $0xa, %ecx
jmp 0x29d7
leaq 0x4702(%rip), %rdi      # 0x7045
leaq 0x4ae3(%rip), %rsi      # 0x742d
leaq 0x4ae2(%rip), %rdx      # 0x7433
movl $0xd, %ecx
jmp 0x29d7
movups 0x40(%rbp,%r13), %xmm0
movups %xmm0, 0x48(%r15)
movq 0x50(%rbp,%r13), %rax
movq %rax, 0x58(%r15)
movl $0x2b8, %edi            # imm = 0x2B8
callq 0x10e0
testq %rax, %rax
je 0x29bd
movq %rax, %r12
movl $0x2b8, %edx            # imm = 0x2B8
movq %rax, %rdi
movq %r14, %rsi
callq 0x10a0
movq %r12, 0x8(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2a0e
testl %eax, %eax
je 0x29f4
leaq 0x469d(%rip), %rdi      # 0x7045
leaq 0x4a7e(%rip), %rsi      # 0x742d
leaq 0x4a7d(%rip), %rdx      # 0x7433
movl $0x23, %ecx
jmp 0x29d7
leaq 0x4681(%rip), %rdi      # 0x7045
leaq 0x4a62(%rip), %rsi      # 0x742d
leaq 0x4a61(%rip), %rdx      # 0x7433
movl $0x1e, %ecx
xorl %eax, %eax
callq 0x1030
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r15), %rsi
addq $0x44, %rsi
leaq 0x4a3d(%rip), %rdi      # 0x7440
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1030
jmp 0x29e3
// File: /workspace/github_c_makefile_star2_O3/xtanitfy[P]Murphy/src/net.c
// Function: NET_create
NET_s *NET_create(NET_PARA_s *pNetPara)
{
	CHECK_EXPR_RET(pNetPara == NULL,NULL);
	
	NET_s *pNet = (NET_s *)malloc(sizeof(NET_s));
	CHECK_EXPR_RET(pNet == NULL,NULL);

	pNet->pMTree = MTREE_create(pNet);
	CHECK_EXPR_RET(pNet->pMTree == NULL,NULL);
	
	memcpy(&pNet->para, pNetPara, sizeof(pNet->para));

	for (int i = 0;i < LAYERS_MAX_N;i++) {
		pNet->layers[i] = NULL;
	} 
	pNet->layerId = 0;

	int ret = BLOB_create(&pNet->pTableY,pNetPara->batchsize,pNetPara->classifyNum,1,1,FALSE);
	CHECK_EXPR_RET(ret != 0,NULL);

	pNet->para.pTableY = pNet->pTableY;
	printf("NET_init!\n");
	
	return pNet;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x2e83
movq %rdi, %r14
movl $0x2248, %edi           # imm = 0x2248
callq 0x10e0
testq %rax, %rax
je 0x2ea1
movq %rax, %rbx
movq %rax, %rdi
callq 0x42d8
movq %rax, 0x230(%rbx)
testq %rax, %rax
je 0x2ebf
movl $0x230, %edx            # imm = 0x230
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10a0
leaq 0x240(%rbx), %rdi
movq %rbx, %r15
addq $0x238, %r15            # imm = 0x238
movl $0x2004, %edx           # imm = 0x2004
xorl %esi, %esi
callq 0x1070
movslq 0x210(%r14), %rsi
movslq 0x21c(%r14), %rdx
movl $0x1, %ecx
movl $0x1, %r8d
movq %r15, %rdi
xorl %r9d, %r9d
callq 0x1d64
testl %eax, %eax
je 0x2eeb
leaq 0x41d9(%rip), %rdi      # 0x7045
leaq 0x45ba(%rip), %rsi      # 0x742d
leaq 0x45d8(%rip), %rdx      # 0x7452
xorl %ebx, %ebx
movl $0x3c, %ecx
jmp 0x2edb
leaq 0x41bb(%rip), %rdi      # 0x7045
leaq 0x459c(%rip), %rsi      # 0x742d
leaq 0x45ba(%rip), %rdx      # 0x7452
xorl %ebx, %ebx
movl $0x2c, %ecx
jmp 0x2edb
leaq 0x419d(%rip), %rdi      # 0x7045
leaq 0x457e(%rip), %rsi      # 0x742d
leaq 0x459c(%rip), %rdx      # 0x7452
xorl %ebx, %ebx
movl $0x2f, %ecx
jmp 0x2edb
leaq 0x417f(%rip), %rdi      # 0x7045
leaq 0x4560(%rip), %rsi      # 0x742d
leaq 0x457e(%rip), %rdx      # 0x7452
xorl %ebx, %ebx
movl $0x32, %ecx
xorl %eax, %eax
callq 0x1030
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x238(%rbx), %rax
movq %rax, 0x228(%rbx)
leaq 0x466e(%rip), %rdi      # 0x756e
callq 0x1130
jmp 0x2ee2