LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/OstCollector[P]config2c/config2c.c
// Function: make_message
const char *make_message(const char *fmt, ...)
{
	int size = 0;
	char *p = NULL;
	va_list ap;

	/* Determine required size */

	va_start(ap, fmt);
	size = vsnprintf(p, size, fmt, ap);
	va_end(ap);

	if (size < 0)
		return NULL;

	size++;		    /* For '\0' */
	p = malloc(size);
	if (p == NULL)
		return NULL;

	va_start(ap, fmt);
	size = vsnprintf(p, size, fmt, ap);
	if (size < 0) {
		free(p);
		return NULL;
	}
	va_end(ap);

	return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq -0xf0(%rbp), %r12
movq %rsi, 0x8(%r12)
movq %rdx, 0x10(%r12)
movq %rcx, 0x18(%r12)
movq %r8, 0x20(%r12)
movq %r9, 0x28(%r12)
testb %al, %al
je 0x7f63
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
leaq -0x40(%rbp), %rcx
movq %r12, 0x10(%rcx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %r13     # imm = 0x3000000008
movq %r13, (%rcx)
xorl %r14d, %r14d
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x2080
testl %eax, %eax
js 0x7fd9
movl %eax, %r15d
incl %r15d
movq %r15, %rdi
callq 0x2150
testq %rax, %rax
je 0x7fd6
movq %rax, %r14
leaq -0x40(%rbp), %rcx
movq %r12, 0x10(%rcx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rcx)
movq %r13, (%rcx)
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2080
testl %eax, %eax
jns 0x7fd9
movq %r14, %rdi
callq 0x2030
xorl %r14d, %r14d
movq %r14, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OstCollector[P]config2c/config2c.c
// Function: parse_opts
int parse_opts(int argc, char **argv)
{
	int c, opt_index;
	while (1) {
		c = getopt_long(argc, argv, "", opts, &opt_index);
		if (c == -1) { /* no more args */
			break;
		} else if (c == 0) {
			switch (opt_index) {
				ARGCASE(0, spec_path);
				ARGCASE(1, prim_path);
				ARGCASE(2, prelude_path);
				ARGCASE(3, hdr_path);
				ARGCASE(4, src_path);
				ARGCASE(5, include_guard);
			case 6:
				test_default = 1;
				break;
			case 7:
				do_help = 1;
				break;
			case 8:
				do_version = 1;
				break;
			}
		} else {
			ERR("unknown argument: %s\n", argv[optind - 1]);
		}
	}
	if (do_help || do_version) {
		return 0;
	}
	ARGDEFINED(spec_path);
	ARGDEFINED(prim_path);
	ARGDEFINED(prelude_path);
	ARGDEFINED(hdr_path);
	ARGDEFINED(src_path);
	ARGDEFINED(include_guard);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
leaq 0x120e7(%rip), %r12     # 0x1a0f0
leaq -0x2c(%rbp), %r13
leaq 0x7ffc(%rip), %r15      # 0x10010
movl %r14d, %edi
movq %rbx, %rsi
leaq 0x9167(%rip), %rdx      # 0x11188
movq %r12, %rcx
movq %r13, %r8
callq 0x20a0
testl %eax, %eax
jne 0x8145
movl -0x2c(%rbp), %eax
cmpq $0x8, %rax
ja 0x8014
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
cmpq $0x0, 0x12212(%rip)     # 0x1a260
jne 0x81bc
movq 0x11f75(%rip), %rax     # 0x19fd0
movq (%rax), %rax
movq %rax, 0x121fb(%rip)     # 0x1a260
jmp 0x8014
cmpq $0x0, 0x12211(%rip)     # 0x1a280
jne 0x81ad
movq 0x11f54(%rip), %rax     # 0x19fd0
movq (%rax), %rax
movq %rax, 0x121fa(%rip)     # 0x1a280
jmp 0x8014
cmpq $0x0, 0x121e0(%rip)     # 0x1a270
jne 0x81b2
movq 0x11f33(%rip), %rax     # 0x19fd0
movq (%rax), %rax
movq %rax, 0x121c9(%rip)     # 0x1a270
jmp 0x8014
cmpq $0x0, 0x121c4(%rip)     # 0x1a278
jne 0x81b7
movq 0x11f0f(%rip), %rax     # 0x19fd0
movq (%rax), %rax
movq %rax, 0x121ad(%rip)     # 0x1a278
jmp 0x8014
movl $0x1, 0x121ba(%rip)     # 0x1a294
jmp 0x8014
cmpq $0x0, 0x12181(%rip)     # 0x1a268
jne 0x81c1
movq 0x11edc(%rip), %rax     # 0x19fd0
movq (%rax), %rax
movq %rax, 0x1216a(%rip)     # 0x1a268
jmp 0x8014
cmpq $0x0, 0x1217d(%rip)     # 0x1a288
jne 0x81c6
movq 0x11eb8(%rip), %rax     # 0x19fd0
movq (%rax), %rax
movq %rax, 0x12166(%rip)     # 0x1a288
jmp 0x8014
movl $0x1, 0x1215f(%rip)     # 0x1a290
jmp 0x8014
movl $0x1, 0x12158(%rip)     # 0x1a298
jmp 0x8014
cmpl $-0x1, %eax
jne 0x81a5
movl 0x12148(%rip), %eax     # 0x1a298
orl 0x1213e(%rip), %eax     # 0x1a294
jne 0x8194
cmpq $0x0, 0x12100(%rip)     # 0x1a260
je 0x81cb
cmpq $0x0, 0x120fe(%rip)     # 0x1a268
je 0x81d0
cmpq $0x0, 0x120fc(%rip)     # 0x1a270
je 0x81d5
cmpq $0x0, 0x120fa(%rip)     # 0x1a278
je 0x81da
cmpq $0x0, 0x120f8(%rip)     # 0x1a280
je 0x81df
cmpq $0x0, 0x120f6(%rip)     # 0x1a288
je 0x81e4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x247c
callq 0x2209
callq 0x227b
callq 0x2242
callq 0x22ed
callq 0x22b4
callq 0x21d0
callq 0x2443
callq 0x240a
callq 0x23d1
callq 0x2398
callq 0x235f
callq 0x2326
// File: /workspace/github_c_makefile_star2_O3/OstCollector[P]config2c/config2c.c
// Function: copy_file
void copy_file(FILE *dst, FILE *src)
{
	int c;
	while (1) {
		c = fgetc(src);
		if (c == EOF) {
			break;
		}
		if (putc(c, dst) == EOF) {
			ERR("failed to write to file.\n");
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rbx, %rdi
callq 0x20d0
cmpl $-0x1, %eax
je 0x8217
movl %eax, %edi
movq %r14, %rsi
callq 0x20f0
cmpl $-0x1, %eax
jne 0x81f6
callq 0x24c3
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OstCollector[P]config2c/config2c.c
// Function: make_test_default
void make_test_default()
{
	const struct node_type_def_list *list;
	const struct node_member_list *memb;
	long id, im;

	out_src("%s", test_main_prelude);

	for (list = ast, id = 0; list; list = list->next, ++id) {
		if (list->type != NODE_TYPE_DEF_STRUCT) {
			continue;
		}
		for (memb = list->struct_def.members, im = 0; memb; 
				memb = memb->next, ++im) {
			if (!memb->default_val) {
				continue;
			}
			make_test_default_memb(list, id, memb, im);
		}
	}

	osi(0, "int main()\n");
	osi(0, "{\n");
	for (list = ast, id = 0; list; list = list->next, ++id) {
		if (list->type != NODE_TYPE_DEF_STRUCT) {
			continue;
		}
		for (memb = list->struct_def.members, im = 0; memb; 
				memb = memb->next, ++im) {
			if (!memb->default_val) {
				continue;
			}
			osi(1, "test_default_%ld_%ld();\n", id, im);
		}
	}
	osi(1, "return 0;\n");
	osi(0, "}\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0xfea8(%rip), %rdi      # 0x1a2a0
movq 0xfe39(%rip), %rdx      # 0x1a238
leaq 0x934f(%rip), %rsi      # 0x13755
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa55d
movq 0xfe8c(%rip), %rbx      # 0x1a2a8
testq %rbx, %rbx
je 0xa464
xorl %r14d, %r14d
cmpl $0x1, 0x8(%rbx)
jne 0xa459
movq 0x18(%rbx), %r15
testq %r15, %r15
je 0xa459
xorl %r12d, %r12d
cmpq $0x0, 0x38(%r15)
je 0xa44e
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x821c
incq %r12
movq (%r15), %r15
testq %r15, %r15
jne 0xa436
incq %r14
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xa424
movq 0xfe35(%rip), %rdi      # 0x1a2a0
leaq 0x69d2(%rip), %rsi      # 0x10e44
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa562
movq 0xfe18(%rip), %rdi      # 0x1a2a0
leaq 0x830a(%rip), %rsi      # 0x12799
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa567
movq 0xfe03(%rip), %r12      # 0x1a2a8
testq %r12, %r12
je 0xa50d
leaq 0x699f(%rip), %rbx      # 0x10e50
xorl %r14d, %r14d
cmpl $0x1, 0x8(%r12)
jne 0xa501
movq 0x18(%r12), %r13
testq %r13, %r13
je 0xa501
xorl %r15d, %r15d
cmpq $0x0, 0x38(%r13)
je 0xa4f5
movl $0x1, %edi
callq 0xa3ac
movq 0xfdbf(%rip), %rdi      # 0x1a2a0
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa558
incq %r15
movq (%r13), %r13
testq %r13, %r13
jne 0xa4c9
incq %r14
movq (%r12), %r12
testq %r12, %r12
jne 0xa4b4
movl $0x1, %edi
callq 0xa3ac
movq 0xfd82(%rip), %rdi      # 0x1a2a0
leaq 0x6944(%rip), %rsi      # 0x10e69
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa56c
movq 0xfd69(%rip), %rdi      # 0x1a2a0
leaq 0x6903(%rip), %rsi      # 0x10e41
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa571
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4036
callq 0x410d
callq 0x40e2
callq 0x40b7
callq 0x408c
callq 0x4061
// File: /workspace/github_c_makefile_star2_O3/OstCollector[P]config2c/config2c.c
// Function: decl_elem
static void decl_elem(const char *name, const struct node_vec_def *vec)
{
	switch (vec->type) {
	case NODE_TYPE_SCALE:
		out_hdr("%s;\n", name);
		break;
	case NODE_TYPE_FIX_INT:
		out_hdr("%s[%ld];\n", name, vec->len_int);
		break;
	case NODE_TYPE_FIX_STR:
		out_hdr("%s[%s];\n", name, vec->len_str);
		break;
	case NODE_TYPE_VAR_ARR:
		out_hdr("*%s;\n", name);
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rsi), %eax
cmpq $0x3, %rax
ja 0xac76
movq %rdi, %rdx
leaq 0x54ca(%rip), %rcx      # 0x100bc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0xf6be(%rip), %rdi      # 0x1a2c0
leaq 0x6b70(%rip), %rsi      # 0x11779
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
jns 0xac76
callq 0x5beb
movq 0xf6a0(%rip), %rdi      # 0x1a2c0
movq 0x8(%rsi), %rcx
leaq 0x6a17(%rip), %rsi      # 0x11642
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
jns 0xac76
callq 0x5b95
movq 0xf67e(%rip), %rdi      # 0x1a2c0
leaq 0x6a02(%rip), %rsi      # 0x1164b
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
jns 0xac76
callq 0x5b6a
movq 0xf660(%rip), %rdi      # 0x1a2c0
movq 0x8(%rsi), %rcx
leaq 0x69cd(%rip), %rsi      # 0x11638
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xac78
popq %rbp
retq
callq 0x5bc0
// File: /workspace/github_c_makefile_star2_O3/OstCollector[P]config2c/config2c.c
// Function: lookup_union
static const struct node_type_def_list *lookup_union(const char *name)
{
	const struct node_type_def_list *l;
	for (l = ast; l; l = l->next) {
		if (l->type == NODE_TYPE_DEF_UNION &&
				!strcmp(name, l->union_def.name)) {
			return l;
		}
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0xf5df(%rip), %rbx      # 0x1a2a8
testq %rbx, %rbx
je 0xacef
movq %rdi, %r14
cmpl $0x2, 0x8(%rbx)
jne 0xace7
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x20e0
testl %eax, %eax
je 0xacf1
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xacd1
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OstCollector[P]config2c/config2c.c
// Function: out_str_list
static void out_str_list(int is_hdr, string prefix, string postfix,
		const struct string_list *list)
{
	for (; list; list = list->next) {
		if (list->next) {
			if (is_hdr) {
				out_hdr("%s%s%s, ", prefix, list->str, postfix);
			} else {
				out_src("%s%s%s, ", prefix, list->str, postfix);
			}
		} else {
			if (is_hdr) {
				out_hdr("%s%s%s", prefix, list->str, postfix);
			} else {
				out_src("%s%s%s", prefix, list->str, postfix);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0xc6e6
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x56ec(%rip), %r15      # 0x11d80
leaq 0x55e8(%rip), %r12      # 0x11c83
leaq 0x56d5(%rip), %r13      # 0x11d77
cmpq $0x0, 0x8(%rbx)
movq 0xdbf2(%rip), %rdi      # 0x1a2a0
movq (%rbx), %rcx
je 0xc6c9
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %r8
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
jns 0xc6dd
jmp 0xc6f5
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %r8
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xc6fa
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0xc6a2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x72c3
callq 0x72ee
// File: /workspace/github_c_makefile_star2_O3/OstCollector[P]config2c/config2c.c
// Function: lookup_enum
static const struct node_type_def_list *lookup_enum(const char *name)
{
	const struct node_type_def_list *l;
	for (l = ast; l; l = l->next) {
		if (l->type == NODE_TYPE_DEF_ENUM && 
				!strcmp(name, l->enum_def.name)) {
			return l;
		}
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0xd36a(%rip), %rbx      # 0x1a2a8
testq %rbx, %rbx
je 0xcf64
movq %rdi, %r14
cmpl $0x0, 0x8(%rbx)
jne 0xcf5c
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x20e0
testl %eax, %eax
je 0xcf66
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xcf46
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OstCollector[P]config2c/config2c.c
// Function: lookup_struct
static const struct node_type_def_list *lookup_struct(const char *name)
{
	const struct node_type_def_list *l;
	for (l = ast; l; l = l->next) {
		if (l->type == NODE_TYPE_DEF_STRUCT && 
				!strcmp(name, l->struct_def.name)) {
			return l;
		}
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0xd32c(%rip), %rbx      # 0x1a2a8
testq %rbx, %rbx
je 0xcfa2
movq %rdi, %r14
cmpl $0x1, 0x8(%rbx)
jne 0xcf9a
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x20e0
testl %eax, %eax
je 0xcfa4
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xcf84
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OstCollector[P]config2c/config2cy.tab.c
// Function: yytnamerr
static YYPTRDIFF_T
yytnamerr (char *yyres, const char *yystr)
{
  if (*yystr == '"')
    {
      YYPTRDIFF_T yyn = 0;
      char const *yyp = yystr;
      for (;;)
        switch (*++yyp)
          {
          case '\'':
          case ',':
            goto do_not_strip_quotes;

          case '\\':
            if (*++yyp != '\\')
              goto do_not_strip_quotes;
            else
              goto append;

          append:
          default:
            if (yyres)
              yyres[yyn] = *yyp;
            yyn++;
            break;

          case '"':
            if (yyres)
              yyres[yyn] = '\0';
            return yyn;
          }
    do_not_strip_quotes: ;
    }

  if (yyres)
    return yystpcpy (yyres, yystr) - yyres;
  else
    return yystrlen (yystr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpb $0x22, (%rsi)
jne 0xf691
xorl %eax, %eax
movq %rsi, %r8
leaq 0x1(%r8), %rdx
movb 0x1(%r8), %cl
movzbl %cl, %r9d
cmpl $0x5b, %r9d
jle 0xf66f
cmpl $0x5c, %r9d
jne 0xf681
cmpb $0x5c, 0x2(%r8)
jne 0xf691
addq $0x2, %r8
movq %r8, %rdx
jmp 0xf681
cmpl $0x22, %r9d
je 0xf6b7
cmpl $0x27, %r9d
je 0xf691
cmpl $0x2c, %r9d
je 0xf691
testq %rdi, %rdi
je 0xf689
movb %cl, (%rdi,%rax)
incq %rax
movq %rdx, %r8
jmp 0xf647
testq %rdi, %rdi
je 0xf6ae
movq $-0x1, %rax
movb 0x1(%rsi,%rax), %cl
movb %cl, 0x1(%rdi,%rax)
incq %rax
testb %cl, %cl
jne 0xf69d
popq %rbp
retq
movq %rsi, %rdi
popq %rbp
jmp 0x2090
testq %rdi, %rdi
je 0xf6ac
movb $0x0, (%rdi,%rax)
jmp 0xf6ac
// File: /workspace/github_c_makefile_star2_O3/DrYerzinia[P]C_DigiMode/src/net/forward.c
// Function: open_udp_socket
int open_udp_socket(char *hostname, char *port){

	memset(&hints, 0, sizeof(struct addrinfo));
	hints.ai_family = AF_UNSPEC;    /* Allow IPv4 or IPv6 */
	hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
	hints.ai_flags = 0;
	hints.ai_protocol = 0;


	//Create the socket
	int error = getaddrinfo(hostname, port, &hints, &result);
	if(error != 0){
		perror("Failed to create socket");
		return -1;
	}

	for(rp = result; rp != NULL; rp = rp->ai_next){
		sock = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);
		if(sock == -1)
			continue;

		if(connect(sock, rp->ai_addr, rp->ai_addrlen) == 0)
			break;                  /* Success */

		close(sock);

	}

	if(rp == NULL){
		perror("Bind failed");
		return -1;
	}

	freeaddrinfo(result);

	return 0;

}

// Assembly:
pushq %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x2e19(%rip)     # 0x40a0
movups %xmm0, 0x2e32(%rip)     # 0x40c0
movups %xmm0, 0x2e1b(%rip)     # 0x40b0
leaq 0x2e04(%rip), %rdx      # 0x40a0
movq $0x2, 0x2e01(%rip) # 0x40a8
leaq 0x2e22(%rip), %rcx      # 0x40d0
callq 0x10d0
testl %eax, %eax
jne 0x133b
movq 0x2e0e(%rip), %rax      # 0x40d0
movq %rax, 0x2e0f(%rip)      # 0x40d8
testq %rax, %rax
je 0x1332
movl 0x4(%rax), %edi
movl 0x8(%rax), %esi
movl 0xc(%rax), %edx
callq 0x1100
movl %eax, 0x2dfe(%rip)      # 0x40e0
cmpl $-0x1, %eax
je 0x130b
movq 0x2dea(%rip), %rcx      # 0x40d8
movq 0x18(%rcx), %rsi
movl 0x10(%rcx), %edx
movl %eax, %edi
callq 0x10b0
testl %eax, %eax
je 0x1318
movl 0x2dda(%rip), %edi      # 0x40e0
callq 0x1070
movq 0x2dc6(%rip), %rax      # 0x40d8
movq 0x28(%rax), %rax
jmp 0x12c2
cmpq $0x0, 0x2db8(%rip)      # 0x40d8
je 0x1332
movq 0x2da7(%rip), %rdi      # 0x40d0
callq 0x10f0
xorl %eax, %eax
jmp 0x134c
leaq 0xce3(%rip), %rdi       # 0x201c
jmp 0x1342
leaq 0xcc2(%rip), %rdi       # 0x2004
callq 0x10a0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/DrYerzinia[P]C_DigiMode/src/net/forward.c
// Function: send_data
int send_data(int len, char* data){

	//send the message to server
	int bytesSent = write(sock, data, len);
	if(bytesSent != len){
		perror("Mismatch in number of bytes sent");
		fprintf(stderr, "Send %d bytes\n", bytesSent);
		return -1;
	}

	return 0;

}

// Assembly:
pushq %rbx
movl 0x2d7b(%rip), %eax      # 0x40e0
movslq %edi, %rbx
movl %eax, %edi
movq %rbx, %rdx
callq 0x1050
xorl %ecx, %ecx
cmpl %ebx, %eax
jne 0x137c
movl %ecx, %eax
popq %rbx
retq
movl %eax, %edi
callq 0x1120
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jmp 0x1378
// File: /workspace/github_c_makefile_star2_O3/DrYerzinia[P]C_DigiMode/src/net/forward.c
// Function: main
int main(int argc, char **argv){

	if(argc < 3){
		printf("Usage: %s hostname port\n", argv[0]);
		return -1;
	}

	char buffer[1000];

	bool running = true;

	// Hostname, Port
	if(open_udp_socket(argv[1], argv[2]) == -1){
		perror("Error creating socket");
		return -1;
	}

	while(running){

		char len1, len2;
		len1 = getc(stdin);
		len2 = getc(stdin);

		if(feof(stdin)){
			printf("stdin closed\n");
			break;
		}

		unsigned short len;

		int count;

		len = (((unsigned char)len1)<<8) + ((unsigned char)len2);

		if(len > 1000){
			fprintf(stderr, "Buffer to small for packet!\n");
			break;
		}

		fread(buffer, sizeof(char), len, stdin);
		/*
		int i;
		for(i = 0; i < len; i++){
			int byte = getc(stdin);
			buffer[i] = (unsigned char)byte;
		}*/

		// Standard log
		fprintf(stdout, "Sending Packet Length: %d\n", ((int)len));

		if(send_data(len, buffer) == -1){
			fprintf(stderr, "Failed to send data to client via udp\n");
			break;
		}

	}

	close_udp_socket();

	return 0;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3e8, %rsp            # imm = 0x3E8
cmpl $0x2, %edi
jg 0x13bb
movq (%rsi), %rsi
leaq 0xcae(%rip), %rdi       # 0x2058
xorl %eax, %eax
callq 0x1060
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1473
movq 0x8(%rsi), %rdi
movq 0x10(%rsi), %rsi
callq 0x127c
cmpl $-0x1, %eax
je 0x1485
movq 0x2c00(%rip), %r12      # 0x3fd8
movq %rsp, %rbx
movq 0x2bee(%rip), %r13      # 0x3fd0
leaq 0xcbb(%rip), %r14       # 0x20a4
movq (%r12), %rdi
callq 0x10e0
movl %eax, %ebp
movq (%r12), %rdi
callq 0x10e0
movl %eax, %r15d
movq (%r12), %rdi
callq 0x1090
testl %eax, %eax
jne 0x145a
shll $0x8, %ebp
movzbl %r15b, %eax
movzwl %bp, %ebp
orl %eax, %ebp
cmpl $0x3e9, %ebp            # imm = 0x3E9
jae 0x1496
movl %ebp, %edx
movq (%r12), %rcx
movl $0x1, %esi
movq %rbx, %rdi
callq 0x1040
movq (%r13), %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1080
movl %ebp, %edi
movq %rbx, %rsi
callq 0x135e
cmpl $-0x1, %eax
jne 0x13e9
callq 0x114a
jmp 0x1466
leaq 0xc85(%rip), %rdi       # 0x20e6
callq 0x1030
movl 0x2c74(%rip), %edi      # 0x40e0
callq 0x1070
xorl %eax, %eax
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbe5(%rip), %rdi       # 0x2071
callq 0x10a0
jmp 0x13b1
callq 0x1166
jmp 0x1466
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/bst.c
// Function: bst_create
void bst_create(BST *ptree) {
	printf("Data: \t  ");
	srand((unsigned) time(NULL ));
//	srand(100);
	int data[100];
	for (int i = 0; i < 100; i++) {
		data[i] = i;
	}
	for (int i = 0; i < 100; i++) {
		int j = rand() % 100;
		int tmp = data[i];
		data[i] = data[j];
		data[j] = tmp;
	}
	for (int i = 0; i < BST_MAX; ++i) {
		int x = data[i];
		bst_insert(x, ptree);
		printf("%3d ", x);
	}
	printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rdi, %rbx
leaq 0xe3d(%rip), %rdi       # 0x2030
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x1060
xorl %edi, %edi
callq 0x1090
movl %eax, %edi
callq 0x1080
movdqa 0xdfd(%rip), %xmm0      # 0x2010
movdqa 0xe05(%rip), %xmm1      # 0x2020
movdqa %xmm0, (%rsp,%r14,4)
addq $0x4, %r14
paddd %xmm1, %xmm0
cmpq $0x64, %r14
jne 0x121b
xorl %r14d, %r14d
callq 0x10d0
cltq
imulq $0x51eb851f, %rax, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
imull $0x64, %ecx, %ecx
subl %ecx, %eax
movl (%rsp,%r14,4), %ecx
cltq
movl (%rsp,%rax,4), %edx
movl %edx, (%rsp,%r14,4)
movl %ecx, (%rsp,%rax,4)
incq %r14
cmpq $0x64, %r14
jne 0x1232
leaq 0xdc8(%rip), %r14       # 0x203a
xorl %r15d, %r15d
movl (%rsp,%r15,4), %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x12af
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x1060
incq %r15
cmpq $0xa, %r15
jne 0x1275
movl $0xa, %edi
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/bst.c
// Function: bst_insert
BST bst_insert(int value, BST *ptree) {
	assert(ptree!=NULL);

	if (*ptree == NULL ) {
		*ptree = makeNode(value);
//		printf("Insert \t%4d\n", (*ptree)->value, *ptree);
		return *ptree;
	}

	BST tree = *ptree;
	if (value < tree->value) {
		return bst_insert(value, &(tree->left));
	} else if (value > tree->value) {
		return bst_insert(value, &(tree->right));
	} else {
		return NULL ;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x1309
movq %rsi, %r14
movl %edi, %ebx
movq (%rsi), %rdx
testq %rdx, %rdx
je 0x12e6
xorl %eax, %eax
movq %rdx, %r14
movl $0x8, %ecx
cmpl %ebx, (%rdx)
jg 0x12da
movl $0x10, %ecx
jge 0x1301
movq (%r14,%rcx), %rdx
testq %rdx, %rdx
jne 0x12c7
addq %rcx, %r14
movl $0x20, %edi
callq 0x10a0
testq %rax, %rax
je 0x12fe
movl %ebx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq %rax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xd2f(%rip), %rdi       # 0x203f
leaq 0xd34(%rip), %rsi       # 0x204b
leaq 0xd33(%rip), %rcx       # 0x2051
movl $0x59, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/bst.c
// Function: bst_clear
void bst_clear(BST tree) {
	if (tree != NULL ) {
		bst_clear(tree->left);
		bst_clear(tree->right);
		free(tree);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x134c
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x1328
movq 0x10(%rbx), %rdi
callq 0x1328
movq %rbx, %rdi
popq %rbx
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/bst.c
// Function: bst_delete
TreeNode* bst_delete(int value, BST tree) {
	TreeNode *tmpNode;
	if (tree == NULL ) {
		return NULL;
	}
	if (value < tree->value) {
		tree->left = bst_delete(value, tree->left);
	} else if (value > tree->value) {
		tree->right = bst_delete(value, tree->right);
	} else if (tree->left && tree->right) {
		tmpNode = bst_findMin(tree->right);
		tree->value = tmpNode->value;
		tree->right = bst_delete(tree->value, tree->right);
	} else {
		tmpNode = tree;
		if (tree->left == NULL ) {
			tree = tree->right;
		} else if (tree->right == NULL ) {
			tree = tree->left;
		}
		free(tmpNode);
	}
	return tree;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x1371
movq %rsi, %rbx
cmpl %edi, (%rsi)
jle 0x1375
movq 0x8(%rbx), %rsi
callq 0x1352
movq %rax, 0x8(%rbx)
jmp 0x13bb
xorl %ebx, %ebx
jmp 0x13bb
jge 0x137d
movq 0x10(%rbx), %rsi
jmp 0x13a2
movq 0x8(%rbx), %r14
movq 0x10(%rbx), %rsi
testq %r14, %r14
je 0x13ad
testq %rsi, %rsi
je 0x13b0
movq %rsi, %rcx
movq %rcx, %rax
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x1392
movl (%rax), %edi
movl %edi, (%rbx)
callq 0x1352
movq %rax, 0x10(%rbx)
jmp 0x13bb
movq %rsi, %r14
movq %rbx, %rdi
callq 0x1030
movq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/bst.c
// Function: bst_findMin
TreeNode* bst_findMin(BST tree) {
	if (tree != NULL ) {
		while (tree->left != NULL ) {
			tree = tree->left;
		}
	}
	return tree;
}

// Assembly:
testq %rdi, %rdi
je 0x13d8
movq %rdi, %rax
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x13cb
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/bst.c
// Function: bst_depth
int bst_depth(BST tree) {
	if (tree == NULL ) {
		return 0;
	}
	int lh, rh;
	lh = bst_depth(tree->left);
	rh = bst_depth(tree->right);
	return (lh > rh ? lh : rh) + 1;
}

// Assembly:
testq %rdi, %rdi
je 0x1408
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x13db
movl %eax, %ebp
movq 0x10(%rbx), %rdi
callq 0x13db
cmpl %eax, %ebp
cmovgl %ebp, %eax
incl %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/bst.c
// Function: bst_search
TreeNode* bst_search(int value, BST tree) {
	if (tree == NULL ) {
		return NULL ;
	} else if (value == tree->value) {
		return tree;
	} else if (value < tree->value) {
		return bst_search(value, tree->left);
	} else {
		return bst_search(value, tree->right);
	}
}

// Assembly:
testq %rsi, %rsi
je 0x1459
movq %rsi, %rax
cmpl %edi, (%rax)
je 0x145b
setle %cl
movzbl %cl, %ecx
movq 0x8(%rax,%rcx,8), %rax
testq %rax, %rax
jne 0x1445
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/bst.c
// Function: bst_find
TreeNode* bst_find(int value, BST tree) {
//	return bst_search(value, tree);
	while (tree != NULL && value != tree->value) {
		if (value < tree->value) {
			tree = tree->left;
		} else {
			tree = tree->right;
		}
	}
	return tree;
}

// Assembly:
testq %rsi, %rsi
je 0x1478
movq %rsi, %rax
cmpl %edi, (%rax)
je 0x147a
setle %cl
movzbl %cl, %ecx
movq 0x8(%rax,%rcx,8), %rax
testq %rax, %rax
jne 0x1464
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/bst.c
// Function: bst_successor
TreeNode* bst_successor(BST node) {
	assert(node!=NULL);
	if (node->right != NULL ) {
		return bst_findMin(node);
	}
	// 后继必须存在parent指针才能查找
	TreeNode* t = node->parent;
	while (t != NULL && node == t->right) {
		node = t;
		t = t->parent;
	}
	return t ;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x14ac
cmpq $0x0, 0x10(%rdi)
je 0x149f
movq %rdi, %rax
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x1488
jmp 0x14aa
cmpq 0x10(%rax), %rdi
movq %rax, %rdi
jne 0x14aa
movq 0x18(%rdi), %rax
testq %rax, %rax
jne 0x1496
xorl %eax, %eax
popq %rcx
retq
leaq 0xbb9(%rip), %rdi       # 0x206c
leaq 0xb91(%rip), %rsi       # 0x204b
leaq 0xbb6(%rip), %rcx       # 0x2077
movl $0xb5, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/bst.c
// Function: bst_preOrder
void bst_preOrder(BST tree) {
	if (tree != NULL ) {
		show(tree);
		bst_preOrder(tree->left);
		bst_preOrder(tree->right);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x1515
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xb4a(%rip), %r14       # 0x203a
movl (%rbx), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
movq 0x8(%rbx), %rdi
callq 0x14dd
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0x14f0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/bst.c
// Function: bst_inOrder
void bst_inOrder(BST tree) {
	if (tree != NULL ) {
		bst_inOrder(tree->left);
		show(tree);
		bst_inOrder(tree->right);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x154e
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xb11(%rip), %r14       # 0x203a
movq 0x8(%rbx), %rdi
callq 0x1516
movl (%rbx), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0x1529
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/bst.c
// Function: bst_postOrder
void bst_postOrder(BST tree) {
	if (tree != NULL ) {
		bst_postOrder(tree->left);
		bst_postOrder(tree->right);
		show(tree);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x157b
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x154f
movq 0x10(%rbx), %rdi
callq 0x154f
movl (%rbx), %esi
leaq 0xac7(%rip), %rdi       # 0x203a
xorl %eax, %eax
popq %rbx
jmp 0x1060
retq
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/bst.c
// Function: bst_preOrderIter
void bst_preOrderIter(BST tree) {
	Stack s = stack_create(STATCK_MAX);
	while (tree != NULL || !stack_isEmpty(s)) {
		if (tree != NULL ) {
			show(tree);
			stack_push(tree, s);
			tree = tree->left;
		} else {
			tree = (BST) stack_top(s);
			stack_pop(s);
			tree = tree->right;
		}
	}
	stack_destroy(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movl $0x14, %edi
callq 0x1888
movq %rax, %rbx
leaq 0xaa2(%rip), %r14       # 0x203a
testq %r15, %r15
je 0x15bb
movl (%r15), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1967
addq $0x8, %r15
jmp 0x15de
movq %rbx, %rdi
callq 0x1923
testl %eax, %eax
jne 0x15e3
movq %rbx, %rdi
callq 0x19b3
movq %rax, %r15
movq %rbx, %rdi
callq 0x192e
addq $0x10, %r15
movq (%r15), %r15
jmp 0x1598
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x18be
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/bst.c
// Function: bst_postOrderIter
void bst_postOrderIter(BST tree) {
	Stack s = stack_create(STATCK_MAX);
	BST p = tree;
	BST q = NULL;
	while (p != NULL || !stack_isEmpty(s))  //栈空时结束
	{
		while (p != NULL ) {
			stack_push(p, s);
			p = p->left;
		}
		p = stack_top(s);
		if (p->right == NULL || p->right == q) {
			show(p);
			q = stack_top(s);
			stack_pop(s);
			p = NULL;
		} else {
			p = p->right;
		}
	}
	stack_destroy(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
movl $0x14, %edi
callq 0x1888
movq %rax, %rbx
leaq 0x9b2(%rip), %r14       # 0x203a
xorl %r15d, %r15d
testq %r12, %r12
je 0x16a7
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1967
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x1690
jmp 0x16b3
movq %rbx, %rdi
callq 0x1923
testl %eax, %eax
jne 0x16ed
movq %rbx, %rdi
callq 0x19b3
movq 0x10(%rax), %r12
testq %r12, %r12
je 0x16c9
cmpq %r15, %r12
jne 0x168b
movl (%rax), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x19b3
movq %rax, %r15
movq %rbx, %rdi
callq 0x192e
xorl %r12d, %r12d
jmp 0x168b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x18be
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/bst.c
// Function: bst_levelOrderIter
void bst_levelOrderIter(BST tree) {
	assert(tree!=NULL);
	Queue queue = queue_create(STATCK_MAX);
	queue_enqueue(tree, queue);
	while (!queue_isEmpty(queue)) {
		BST p = queue_dequeue(queue);
		show(p);
		if (p->left != NULL ) {
			queue_enqueue(p->left, queue);
		}
		if (p->right != NULL ) {
			queue_enqueue(p->right, queue);
		}
	}
	queue_destroy(queue);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1794
movq %rdi, %r14
movl $0x14, %edi
callq 0x1ac4
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1c08
movq %rbx, %rdi
callq 0x1a7a
testl %eax, %eax
jne 0x1787
leaq 0x8fe(%rip), %r14       # 0x203a
movq %rbx, %rdi
callq 0x1c6f
movq %rax, %r15
testq %rax, %rax
je 0x1759
movl (%r15), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x176a
movq %rbx, %rsi
callq 0x1c08
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x177b
movq %rbx, %rsi
callq 0x1c08
movq %rbx, %rdi
callq 0x1a7a
testl %eax, %eax
je 0x173c
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1b30
leaq 0x8a5(%rip), %rdi       # 0x2040
leaq 0x8a9(%rip), %rsi       # 0x204b
leaq 0x8eb(%rip), %rcx       # 0x2094
movl $0x12f, %edx            # imm = 0x12F
callq 0x1070
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/bst.c
// Function: main
int main(int argc, char **argv) {
	// 强制刷新缓冲区
	setvbuf(stdout, 0, _IONBF, 0);
	BST tree=NULL;
	bst_create(&tree);
	printf("\nPreOrder Rec: ");
	bst_preOrder(tree);
	printf("\nPreOrder Cir: ");
	bst_preOrderIter(tree);
	printf("\n\nInOrder Rec:  ");
	bst_inOrder(tree);
	printf("\nInOrder Cir:  ");
	bst_inOrderIter(tree);
	printf("\n\nPostOrder Rec:");
	bst_postOrder(tree);
	printf("\nPostOrder Cir:");
	bst_postOrderIter(tree);
	printf("\nLevelOrder:   ");
	bst_levelOrderIter(tree);
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq 0x2821(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x10b0
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movq %rbx, %rdi
callq 0x11dc
leaq 0x8c6(%rip), %rdi       # 0x20b1
xorl %eax, %eax
callq 0x1060
movq (%rbx), %rdi
callq 0x14dd
leaq 0x8c0(%rip), %rdi       # 0x20c1
xorl %eax, %eax
callq 0x1060
movq (%rbx), %rdi
callq 0x157c
leaq 0x8ba(%rip), %rdi       # 0x20d1
xorl %eax, %eax
callq 0x1060
movq (%rbx), %rdi
callq 0x1516
leaq 0x8b5(%rip), %rdi       # 0x20e2
xorl %eax, %eax
callq 0x1060
movq (%rbx), %rdi
callq 0x15f0
leaq 0x8af(%rip), %rdi       # 0x20f2
xorl %eax, %eax
callq 0x1060
movq (%rbx), %rdi
callq 0x154f
leaq 0x8aa(%rip), %rdi       # 0x2103
xorl %eax, %eax
callq 0x1060
movq (%rbx), %rdi
callq 0x1669
leaq 0x8a4(%rip), %rdi       # 0x2113
xorl %eax, %eax
callq 0x1060
movq (%rbx), %rdi
callq 0x1700
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/stack.c
// Function: stack_create
Stack stack_create(int size)
{
    Stack s;
    s=(Stack)malloc(sizeof(StackNode));
    if(s==NULL)
    {
        fatal("stack malloc failed.");
    }
    s->next=NULL;
    return s;

}

// Assembly:
pushq %rax
movl $0x10, %edi
callq 0x10a0
testq %rax, %rax
je 0x18a2
movq $0x0, 0x8(%rax)
popq %rcx
retq
leaq 0x916(%rip), %rdi       # 0x21bf
leaq 0x873(%rip), %rsi       # 0x2123
xorl %eax, %eax
callq 0x1060
xorl %edi, %edi
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/stack.c
// Function: stack_push
void stack_push(void *data, Stack s)
{
	PStackNode newNode;
    newNode=(PStackNode)malloc(sizeof(StackNode));
    if(newNode==NULL)
    {
        fatal("new node malloc failed");
    }
    newNode->data=data;
    newNode->next=s->next;
    s->next=newNode;

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x10, %edi
callq 0x10a0
testq %rax, %rax
je 0x1997
movq %r14, (%rax)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x821(%rip), %rdi       # 0x21bf
leaq 0x7bd(%rip), %rsi       # 0x2162
xorl %eax, %eax
callq 0x1060
xorl %edi, %edi
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/stack.c
// Function: stack_print
void stack_print(Stack s){
    assert(s!=NULL);
    if(stack_isEmpty(s)){
        printf("stack is empty.\n");
        return;
    }
    
    printf("stack: ");
    PStackNode node=s->next;
    while(node!=NULL){
        printf("%d ", node->data);
        node=node->next;
    }
    printf("\n");
    
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1a48
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x1a35
leaq 0x7bc(%rip), %rdi       # 0x21b3
xorl %eax, %eax
callq 0x1060
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x1a24
leaq 0x7ad(%rip), %rbx       # 0x21bb
movq (%r14), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1060
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x1a0e
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1040
leaq 0x793(%rip), %rdi       # 0x21cf
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1050
leaq 0x6e9(%rip), %rdi       # 0x2138
leaq 0x6ea(%rip), %rsi       # 0x2140
leaq 0x73e(%rip), %rcx       # 0x219b
movl $0x53, %edx
callq 0x1070
nop
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/queue.c
// Function: queue_clear
void queue_clear(Queue q) {
	assert(q!=NULL);
	q->size = 0;
	q->front = 1;
	q->end = 0;
}

// Assembly:
testq %rdi, %rdi
je 0x1aa4
movl $0x0, 0xc(%rdi)
movq $0x1, 0x4(%rdi)
retq
pushq %rax
leaq 0x733(%rip), %rdi       # 0x21df
leaq 0x734(%rip), %rsi       # 0x21e7
leaq 0x735(%rip), %rcx       # 0x21ef
movl $0x19, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/queue.c
// Function: queue_create
Queue queue_create(int maxSize) {
	Queue q;
	q = (Queue) malloc(sizeof(struct QueueRecord));
	if (q == NULL ) {
		queue_fatal("queue malloc failed.");
	}
	q->data = malloc(sizeof(void*) * maxSize);
	q->capacity = maxSize;
	if (q->data == NULL ) {
		queue_fatal("data array malloc failed.");
	}
	queue_clear(q);
	return q;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebp
movl $0x18, %edi
callq 0x10a0
testq %rax, %rax
je 0x1b0f
movq %rax, %rbx
movslq %ebp, %r14
leaq (,%r14,8), %rdi
callq 0x10a0
movq %rax, 0x10(%rbx)
movl %r14d, (%rbx)
testq %rax, %rax
je 0x1b18
movl $0x0, 0xc(%rbx)
movq $0x1, 0x4(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x6f1(%rip), %rdi       # 0x2207
jmp 0x1b1f
leaq 0x6fd(%rip), %rdi       # 0x221c
xorl %eax, %eax
callq 0x1060
movl $0x1, %edi
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/queue.c
// Function: queue_print
void queue_print(Queue q) {
	assert(q!=NULL);
	if (queue_isEmpty(q)) {
		printf("queue is empty.\n");
		return;
	}
	for (int i = q->front; i < (q->front + q->size); i++) {

		int cursor = i;
		if (cursor >= q->capacity) {
			cursor = i - q->capacity;
		}
		printf("%d ", q->data[cursor]);
	}

	printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1be9
movq %rdi, %rbx
cmpl $0x0, 0xc(%rdi)
je 0x1bd3
jle 0x1bbf
movslq 0x4(%rbx), %r15
xorl %ebp, %ebp
leaq 0x62d(%rip), %r14       # 0x21bb
movl (%rbx), %eax
cmpl %eax, %r15d
cmovll %ebp, %eax
movq 0x10(%rbx), %rcx
cltq
shlq $0x3, %rax
subq %rax, %rcx
movq (%rcx,%r15,8), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
incq %r15
movl 0xc(%rbx), %eax
addl 0x4(%rbx), %eax
cmpl %eax, %r15d
jl 0x1b8e
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1040
leaq 0x6f3(%rip), %rdi       # 0x22cd
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1050
leaq 0x5ef(%rip), %rdi       # 0x21df
leaq 0x5f0(%rip), %rsi       # 0x21e7
leaq 0x652(%rip), %rcx       # 0x2250
movl $0x35, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/queue.c
// Function: queue_enqueue
void queue_enqueue(void* value, Queue q) {
	assert(q!=NULL);
	if (queue_isFull(q)) {
		queue_fatal("queue is full.");
	}
	q->size++;
	if (++q->end == q->capacity) {
		q->end = 0;
	}
	q->data[q->end] = value;
//	BST t= (BST)q->data[q->end];
//	printf("[queue_enqueue %d]\n", t->value);
}

// Assembly:
pushq %rax
testq %rsi, %rsi
je 0x1c38
movl (%rsi), %eax
movl 0xc(%rsi), %ecx
cmpl %eax, %ecx
je 0x1c57
incl %ecx
movl %ecx, 0xc(%rsi)
movl 0x8(%rsi), %ecx
incl %ecx
xorl %edx, %edx
cmpl %eax, %ecx
cmovnel %ecx, %edx
movl %edx, 0x8(%rsi)
movq 0x10(%rsi), %rax
movslq %edx, %rcx
movq %rdi, (%rax,%rcx,8)
popq %rax
retq
leaq 0x5a0(%rip), %rdi       # 0x21df
leaq 0x5a1(%rip), %rsi       # 0x21e7
leaq 0x61b(%rip), %rcx       # 0x2268
movl $0x47, %edx
callq 0x1070
leaq 0x62c(%rip), %rdi       # 0x228a
xorl %eax, %eax
callq 0x1060
movl $0x1, %edi
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch4/bst/queue.c
// Function: queue_dequeue
void* queue_dequeue(Queue q) {
	assert(q!=NULL);
	if (queue_isEmpty(q)) {
		queue_fatal("queue is empty.");
	}
	q->size--;
	void* tmp = q->data[q->front];
	if (++q->front == q->capacity) {
		q->front = 0;
	}
	return tmp;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x1c9b
movl 0xc(%rdi), %eax
testl %eax, %eax
je 0x1cba
decl %eax
movl %eax, 0xc(%rdi)
movq 0x10(%rdi), %rax
movslq 0x4(%rdi), %rcx
movq (%rax,%rcx,8), %rax
incl %ecx
xorl %edx, %edx
cmpl (%rdi), %ecx
cmovnel %ecx, %edx
movl %edx, 0x4(%rdi)
popq %rcx
retq
leaq 0x53d(%rip), %rdi       # 0x21df
leaq 0x53e(%rip), %rsi       # 0x21e7
leaq 0x5e9(%rip), %rcx       # 0x2299
movl $0x55, %edx
callq 0x1070
leaq 0x60c(%rip), %rdi       # 0x22cd
xorl %eax, %eax
callq 0x1060
movl $0x1, %edi
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/ch3/eatyguy3.c
// Function: getkey
int getkey(int *is_end_of_seq) {

  // Make reading from stdin non-blocking.
  int flags = fcntl(STDIN_FILENO, F_GETFL);
  fcntl(STDIN_FILENO, F_SETFL, flags | O_NONBLOCK);

  // We care about two cases:
  // Case 1: A sequence of the form 27, 91, X; return X.
  // Case 2: For any other sequence, return each int separately.

  *is_end_of_seq = 0;
  int ch = getchar();
  if (ch == 27) {
    int next = getchar();
    if (next == 91) {
      *is_end_of_seq = 1;
      ch = getchar();
      goto end;
    }
    // If we get here, then we're not in a 27, 91, X sequence.
    ungetc(next, stdin);
  }

end:

  // Turn off non-blocking I/O. On some systems, leaving stdin
  // non-blocking will also leave stdout non-blocking, which
  // can cause printing errors.
  fcntl(STDIN_FILENO, F_SETFL, flags);
  return ch;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %edi, %edi
movl $0x3, %esi
xorl %eax, %eax
callq 0x4100
movl %eax, %ebx
movl %eax, %edx
orl $0x800, %edx            # imm = 0x800
xorl %edi, %edi
movl $0x4, %esi
xorl %eax, %eax
callq 0x4100
movl $0x0, (%r14)
callq 0x4290
movl %eax, %r15d
cmpl $0x1b, %eax
jne 0x487a
callq 0x4290
cmpl $0x5b, %eax
jne 0x4863
movl $0x1, (%r14)
callq 0x4290
movl %eax, %r15d
jmp 0x487a
movq 0x2a766(%rip), %rcx     # 0x2efd0
movq (%rcx), %rsi
movl %eax, %edi
callq 0x4370
movl $0x1b, %r15d
xorl %edi, %edi
movl $0x4, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x4100
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/ch3/eatyguy3.c
// Function: set_color
int set_color(lua_State *L) {
  const char *b_or_f = lua_tostring(L, 1);
  int color = lua_tonumber(L, 2);
  char cmd[1024];
  snprintf(cmd, 1024, "tput seta%s %d", b_or_f, color);
  system(cmd);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x5365
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x529a
cvttsd2si %xmm0, %r8d
leaq 0x1c6c0(%rip), %rdx     # 0x21079
leaq -0x410(%rbp), %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x4180
movq %rbx, %rdi
callq 0x4150
xorl %eax, %eax
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/ch3/eatyguy3.c
// Function: set_pos
int set_pos(lua_State *L) {
  int x = lua_tonumber(L, 1);
  int y = lua_tonumber(L, 2);
  char cmd[1024];
  // The 'tput cup' command accepts y before x; not a typo.
  snprintf(cmd, 1024, "tput cup %d %d", y, x);
  system(cmd);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x529a
cvttsd2si %xmm0, %r14d
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x529a
cvttsd2si %xmm0, %ecx
leaq 0x1c664(%rip), %rdx     # 0x21088
leaq -0x410(%rbp), %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x4180
movq %rbx, %rdi
callq 0x4150
xorl %eax, %eax
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/ch3/eatyguy3.c
// Function: main
int main() {

  start();

  // Create a Lua state and load the module.
  lua_State *L = luaL_newstate();
  luaL_openlibs(L);

  // Make our Lua-callable functions visible to Lua.
  lua_register(L, "set_color", set_color);
  lua_register(L, "set_pos",   set_pos);
  lua_register(L, "timestamp", timestamp);

  // Load eatyguy3 and run the init() function.
  luaL_dofile(L, "eatyguy3.lua");
  lua_setglobal(L, "eatyguy");
  lua_settop(L, 0);

  lua_getglobal(L, "eatyguy");
  lua_getfield(L, -1, "init");  // -1 means stack top.
  lua_call(L, 0, 0);            // 0, 0 = #args, #retvals

  lua_getglobal(L, "eatyguy");
  while (1) {
    int is_end_of_seq;
    int key = getkey(&is_end_of_seq);
    if (key == ESC_KEY || key == 'q' || key == 'Q') done();

    // Call eatyguy.loop(<key>).
    lua_getfield(L, -1, "loop");
    push_keypress(L, key, is_end_of_seq);
    lua_call(L, 1, 0);

    sleephires(0.016);  // Sleep for 16ms.
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
callq 0x48f0
callq 0x14ebd
movq %rax, %rbx
movq %rax, %rdi
callq 0x150c0
leaq -0x14b(%rip), %rsi      # 0x497e
movq %rbx, %rdi
xorl %edx, %edx
callq 0x56b4
leaq 0x1c5bd(%rip), %rsi     # 0x21097
movq %rbx, %rdi
callq 0x5af8
leaq -0x101(%rip), %rsi      # 0x49e8
movq %rbx, %rdi
xorl %edx, %edx
callq 0x56b4
leaq 0x1c5a7(%rip), %rsi     # 0x210a1
movq %rbx, %rdi
callq 0x5af8
leaq -0xb6(%rip), %rsi       # 0x4a53
movq %rbx, %rdi
xorl %edx, %edx
callq 0x56b4
leaq 0x1c58f(%rip), %rsi     # 0x210a9
movq %rbx, %rdi
callq 0x5af8
leaq 0x1c58a(%rip), %rsi     # 0x210b3
movq %rbx, %rdi
xorl %edx, %edx
callq 0x14616
testl %eax, %eax
jne 0x4b4e
movq %rbx, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5fdb
leaq 0x1c56b(%rip), %r14     # 0x210c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5af8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4d59
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5783
leaq 0x1c54c(%rip), %rdx     # 0x210c8
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x58a1
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x5f73
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5783
leaq -0x2c(%rbp), %r14
leaq 0x1cfd4(%rip), %r15     # 0x21b84
leaq -0x40(%rbp), %r12
movq %r14, %rdi
callq 0x4801
cmpl $0x1b, %eax
je 0x4c1d
movl %eax, %r13d
cmpl $0x71, %eax
je 0x4c1d
cmpl $0x51, %r13d
je 0x4c1d
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x58a1
movl -0x2c(%rbp), %edx
movq %rbx, %rdi
movl %r13d, %esi
callq 0x4948
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x5f73
movq $0x0, -0x40(%rbp)
movq $0xf42400, -0x38(%rbp)  # imm = 0xF42400
movq %r12, %rdi
xorl %esi, %esi
callq 0x4190
jmp 0x4bb4
callq 0x4925
nop
// File: /workspace/github_c_makefile_star2_O3/millimat[P]Soft-Heap/epsilon-timing.c
// Function: main
int main(int argc, char *argv[]) {
  int n = 10000;
  int tries = 10;

  srand(time(NULL));

  time_insert_extract(tries, n);
  time_meld(tries, n);

  return 0;
}

// Assembly:
pushq %rax
xorl %edi, %edi
callq 0x10a0
movl %eax, %edi
callq 0x1090
movl $0xa, %edi
movl $0x2710, %esi           # imm = 0x2710
callq 0x11ec
movl $0xa, %edi
movl $0x2710, %esi           # imm = 0x2710
callq 0x1465
xorl %eax, %eax
popq %rcx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/koendv[P]stm32duino-raspberrypi/Arduino_Tools/src/stm32flash/main.c
// Function: err_multi_action
static void err_multi_action(enum actions new)
{
	fprintf(stderr,
		"ERROR: Invalid options !\n"
		"\tCan't execute \"%s\" and \"%s\" at the same time.\n",
		action2str(action), action2str(new));
}

// Assembly:
movq 0xbbc4(%rip), %rax      # 0xdff8
movl 0xbf95(%rip), %r8d      # 0xe3d0
decl %r8d
leaq 0x6347(%rip), %rcx      # 0x878c
leaq 0xb954(%rip), %rsi      # 0xdda0
movq %rcx, %rdx
cmpl $0x6, %r8d
ja 0x245c
movl %r8d, %edx
movq (%rsi,%rdx,8), %rdx
movq (%rax), %rax
decl %edi
cmpl $0x6, %edi
ja 0x246c
movl %edi, %ecx
movq (%rsi,%rcx,8), %rcx
leaq 0x7428(%rip), %rsi      # 0x989b
movq %rax, %rdi
xorl %eax, %eax
jmp 0x2170