LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x121c7(%rip), %r12     # 0x1a0f0
leaq -0x2c(%rbp), %r13
leaq 0x80dc(%rip), %r15      # 0x10010
movl %r14d, %edi
movq %rbx, %rsi
leaq 0x9247(%rip), %rdx      # 0x11188
movq %r12, %rcx
movq %r13, %r8
callq 0x20a0
testl %eax, %eax
jne 0x8065
movl -0x2c(%rbp), %eax
cmpq $0x8, %rax
ja 0x7f34
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
cmpq $0x0, 0x122f2(%rip)     # 0x1a260
jne 0x80dc
movq 0x12055(%rip), %rax     # 0x19fd0
movq (%rax), %rax
movq %rax, 0x122db(%rip)     # 0x1a260
jmp 0x7f34
cmpq $0x0, 0x122f1(%rip)     # 0x1a280
jne 0x80cd
movq 0x12034(%rip), %rax     # 0x19fd0
movq (%rax), %rax
movq %rax, 0x122da(%rip)     # 0x1a280
jmp 0x7f34
cmpq $0x0, 0x122c0(%rip)     # 0x1a270
jne 0x80d2
movq 0x12013(%rip), %rax     # 0x19fd0
movq (%rax), %rax
movq %rax, 0x122a9(%rip)     # 0x1a270
jmp 0x7f34
cmpq $0x0, 0x122a4(%rip)     # 0x1a278
jne 0x80d7
movq 0x11fef(%rip), %rax     # 0x19fd0
movq (%rax), %rax
movq %rax, 0x1228d(%rip)     # 0x1a278
jmp 0x7f34
movl $0x1, 0x1229a(%rip)     # 0x1a294
jmp 0x7f34
cmpq $0x0, 0x12261(%rip)     # 0x1a268
jne 0x80e1
movq 0x11fbc(%rip), %rax     # 0x19fd0
movq (%rax), %rax
movq %rax, 0x1224a(%rip)     # 0x1a268
jmp 0x7f34
cmpq $0x0, 0x1225d(%rip)     # 0x1a288
jne 0x80e6
movq 0x11f98(%rip), %rax     # 0x19fd0
movq (%rax), %rax
movq %rax, 0x12246(%rip)     # 0x1a288
jmp 0x7f34
movl $0x1, 0x1223f(%rip)     # 0x1a290
jmp 0x7f34
movl $0x1, 0x12238(%rip)     # 0x1a298
jmp 0x7f34
cmpl $-0x1, %eax
jne 0x80c5
movl 0x12228(%rip), %eax     # 0x1a298
orl 0x1221e(%rip), %eax     # 0x1a294
jne 0x80b4
cmpq $0x0, 0x121e0(%rip)     # 0x1a260
je 0x80eb
cmpq $0x0, 0x121de(%rip)     # 0x1a268
je 0x80f0
cmpq $0x0, 0x121dc(%rip)     # 0x1a270
je 0x80f5
cmpq $0x0, 0x121da(%rip)     # 0x1a278
je 0x80fa
cmpq $0x0, 0x121d8(%rip)     # 0x1a280
je 0x80ff
cmpq $0x0, 0x121d6(%rip)     # 0x1a288
je 0x8104
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_O1/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 0x8137
movl %eax, %edi
movq %r14, %rsi
callq 0x20f0
cmpl $-0x1, %eax
jne 0x8116
callq 0x24c3
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xff8c(%rip), %rdi      # 0x1a2a0
movq 0xff1d(%rip), %rdx      # 0x1a238
leaq 0x9433(%rip), %rsi      # 0x13755
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa479
movq 0xff70(%rip), %rbx      # 0x1a2a8
testq %rbx, %rbx
je 0xa380
xorl %r14d, %r14d
cmpl $0x1, 0x8(%rbx)
jne 0xa375
movq 0x18(%rbx), %r15
testq %r15, %r15
je 0xa375
xorl %r12d, %r12d
cmpq $0x0, 0x38(%r15)
je 0xa36a
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x813c
incq %r12
movq (%r15), %r15
testq %r15, %r15
jne 0xa352
incq %r14
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xa340
movq 0xff19(%rip), %rdi      # 0x1a2a0
leaq 0x6ab6(%rip), %rsi      # 0x10e44
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa47e
movq 0xfefc(%rip), %rdi      # 0x1a2a0
leaq 0x83ee(%rip), %rsi      # 0x12799
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa483
movq 0xfee7(%rip), %r12      # 0x1a2a8
testq %r12, %r12
je 0xa429
leaq 0x6a83(%rip), %rbx      # 0x10e50
xorl %r14d, %r14d
cmpl $0x1, 0x8(%r12)
jne 0xa41d
movq 0x18(%r12), %r13
testq %r13, %r13
je 0xa41d
xorl %r15d, %r15d
cmpq $0x0, 0x38(%r13)
je 0xa411
movl $0x1, %edi
callq 0xa2c8
movq 0xfea3(%rip), %rdi      # 0x1a2a0
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa474
incq %r15
movq (%r13), %r13
testq %r13, %r13
jne 0xa3e5
incq %r14
movq (%r12), %r12
testq %r12, %r12
jne 0xa3d0
movl $0x1, %edi
callq 0xa2c8
movq 0xfe66(%rip), %rdi      # 0x1a2a0
leaq 0x6a28(%rip), %rsi      # 0x10e69
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa488
movq 0xfe4d(%rip), %rdi      # 0x1a2a0
leaq 0x69e7(%rip), %rsi      # 0x10e41
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xa48d
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_O1/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 0xab8e
movq %rdi, %rdx
leaq 0x55b2(%rip), %rcx      # 0x100bc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0xf7a6(%rip), %rdi      # 0x1a2c0
leaq 0x6c58(%rip), %rsi      # 0x11779
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
jns 0xab8e
callq 0x5beb
movq 0xf788(%rip), %rdi      # 0x1a2c0
movq 0x8(%rsi), %rcx
leaq 0x6aff(%rip), %rsi      # 0x11642
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
jns 0xab8e
callq 0x5b95
movq 0xf766(%rip), %rdi      # 0x1a2c0
leaq 0x6aea(%rip), %rsi      # 0x1164b
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
jns 0xab8e
callq 0x5b6a
movq 0xf748(%rip), %rdi      # 0x1a2c0
movq 0x8(%rsi), %rcx
leaq 0x6ab5(%rip), %rsi      # 0x11638
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xab90
popq %rbp
retq
callq 0x5bc0
// File: /workspace/github_c_makefile_star2_O1/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 0xf6c7(%rip), %rbx      # 0x1a2a8
testq %rbx, %rbx
je 0xac07
movq %rdi, %r14
cmpl $0x2, 0x8(%rbx)
jne 0xabff
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x20e0
testl %eax, %eax
je 0xac09
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xabe9
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xc609
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x57c9(%rip), %r15      # 0x11d80
leaq 0x56c5(%rip), %r12      # 0x11c83
leaq 0x57b2(%rip), %r13      # 0x11d77
cmpq $0x0, 0x8(%rbx)
movq 0xdccf(%rip), %rdi      # 0x1a2a0
movq (%rbx), %rcx
je 0xc5ec
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %r8
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
jns 0xc600
jmp 0xc618
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %r8
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0xc61d
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0xc5c5
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_O1/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 0xd45f(%rip), %rbx      # 0x1a2a8
testq %rbx, %rbx
je 0xce6f
movq %rdi, %r14
cmpl $0x0, 0x8(%rbx)
jne 0xce67
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x20e0
testl %eax, %eax
je 0xce71
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xce51
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xd421(%rip), %rbx      # 0x1a2a8
testq %rbx, %rbx
je 0xcead
movq %rdi, %r14
cmpl $0x1, 0x8(%rbx)
jne 0xcea5
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x20e0
testl %eax, %eax
je 0xceaf
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xce8f
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0xf79e
xorl %eax, %eax
movq %rsi, %rdx
leaq 0x1(%rdx), %rcx
movzbl 0x1(%rdx), %r8d
cmpl $0x5b, %r8d
jle 0xf77a
cmpl $0x5c, %r8d
jne 0xf78c
cmpb $0x5c, 0x2(%rdx)
jne 0xf79e
addq $0x2, %rdx
movq %rdx, %rcx
jmp 0xf78c
cmpl $0x22, %r8d
je 0xf7c4
cmpl $0x27, %r8d
je 0xf79e
cmpl $0x2c, %r8d
je 0xf79e
testq %rdi, %rdi
je 0xf796
movb (%rcx), %dl
movb %dl, (%rdi,%rax)
incq %rax
movq %rcx, %rdx
jmp 0xf756
testq %rdi, %rdi
je 0xf7bb
movq $-0x1, %rax
movb 0x1(%rsi,%rax), %cl
movb %cl, 0x1(%rdi,%rax)
incq %rax
testb %cl, %cl
jne 0xf7aa
popq %rbp
retq
movq %rsi, %rdi
popq %rbp
jmp 0x2090
testq %rdi, %rdi
je 0xf7b9
movb $0x0, (%rdi,%rax)
jmp 0xf7b9
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x0, 0x2def(%rip)      # 0x40a0
leaq 0x2e18(%rip), %rcx      # 0x40d0
callq 0x10d0
testl %eax, %eax
jne 0x1338
movq 0x2e08(%rip), %rax      # 0x40d0
movq %rax, 0x2e09(%rip)      # 0x40d8
testq %rax, %rax
je 0x131e
movl 0x4(%rax), %edi
movl 0x8(%rax), %esi
movl 0xc(%rax), %edx
callq 0x1100
movl %eax, 0x2df8(%rip)      # 0x40e0
cmpl $-0x1, %eax
je 0x1311
movq 0x2de4(%rip), %rcx      # 0x40d8
movq 0x18(%rcx), %rsi
movl 0x10(%rcx), %edx
movl %eax, %edi
callq 0x10b0
testl %eax, %eax
je 0x131e
movl 0x2dd4(%rip), %edi      # 0x40e0
callq 0x1070
movq 0x2dc0(%rip), %rax      # 0x40d8
movq 0x28(%rax), %rax
jmp 0x12c8
cmpq $0x0, 0x2db2(%rip)      # 0x40d8
je 0x1341
movq 0x2da1(%rip), %rdi      # 0x40d0
callq 0x10f0
xorl %eax, %eax
popq %rcx
retq
leaq 0xcc5(%rip), %rdi       # 0x2004
jmp 0x1348
leaq 0xcd4(%rip), %rdi       # 0x201c
callq 0x10a0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1336
// File: /workspace/github_c_makefile_star2_O1/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 0x2d75(%rip), %eax      # 0x40e0
movslq %edi, %rbx
movl %eax, %edi
movq %rbx, %rdx
callq 0x1050
xorl %ecx, %ecx
cmpl %ebx, %eax
jne 0x1382
movl %ecx, %eax
popq %rbx
retq
movl %eax, %edi
callq 0x1120
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jmp 0x137e
// File: /workspace/github_c_makefile_star2_O1/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 0x13c1
movq (%rsi), %rsi
leaq 0xca8(%rip), %rdi       # 0x2058
xorl %eax, %eax
callq 0x1060
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1479
movq 0x8(%rsi), %rdi
movq 0x10(%rsi), %rsi
callq 0x127c
cmpl $-0x1, %eax
je 0x148b
movq 0x2bfa(%rip), %r12      # 0x3fd8
movq %rsp, %rbx
movq 0x2be8(%rip), %r13      # 0x3fd0
leaq 0xcb5(%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 0x1460
shll $0x8, %ebp
movzbl %r15b, %eax
movzwl %bp, %ebp
orl %eax, %ebp
cmpl $0x3e9, %ebp            # imm = 0x3E9
jae 0x149c
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 0x1364
cmpl $-0x1, %eax
jne 0x13ef
callq 0x114a
jmp 0x146c
leaq 0xc7f(%rip), %rdi       # 0x20e6
callq 0x1030
movl 0x2c6e(%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 0xbdf(%rip), %rdi       # 0x2071
callq 0x10a0
jmp 0x13b7
callq 0x1166
jmp 0x146c
// File: /workspace/github_c_makefile_star2_O1/agraf[P]kvmbench/tsc.c
// Function: setup_tsc
void setup_tsc(void)
{
    uint64_t before, after;
    uint64_t before_tod, after_tod;

    before_tod = get_us_gettimeofday();
    before = rdtsc();

    usleep(10);

    after_tod = get_us_gettimeofday();
    after = rdtsc();

    tsc_per_sec = ((after - before) * 1000000ULL) / (after_tod - before_tod);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
callq 0x133f
movq %rax, %rbx
rdtsc
movl %edx, %r14d
movl %eax, %r15d
negl %r14d
shlq $0x20, %r14
movl $0xa, %edi
callq 0x1060
callq 0x133f
movq %rax, %rcx
rdtsc
movl %eax, %eax
shlq $0x20, %rdx
addq %rax, %rdx
subq %r15, %r14
addq %rdx, %r14
imulq $0xf4240, %r14, %rax    # imm = 0xF4240
subq %rbx, %rcx
xorl %edx, %edx
divq %rcx
movq %rax, 0x2d17(%rip)      # 0x4050
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xe11(%rip), %rdi       # 0x2004
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x1060
xorl %edi, %edi
callq 0x1090
movl %eax, %edi
callq 0x1080
movl %r14d, (%rsp,%r14,4)
incq %r14
cmpq $0x64, %r14
jne 0x120b
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 0x121b
leaq 0xdb3(%rip), %r14       # 0x200e
xorl %r15d, %r15d
movl (%rsp,%r15,4), %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x1298
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x1060
incq %r15
cmpq $0xa, %r15
jne 0x125e
movl $0xa, %edi
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O1/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
movq %rsi, %r14
movl %edi, %ebx
xorl %eax, %eax
testq %r14, %r14
je 0x12eb
movq (%r14), %rcx
testq %rcx, %rcx
je 0x12c8
cmpl %ebx, (%rcx)
jle 0x12bd
addq $0x8, %rcx
movq %rcx, %r14
jmp 0x12a3
jge 0x12e3
addq $0x10, %rcx
movq %rcx, %r14
jmp 0x12a3
movl $0x20, %edi
callq 0x10a0
testq %rax, %rax
je 0x12e0
movl %ebx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq %rax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xd21(%rip), %rdi       # 0x2013
leaq 0xd26(%rip), %rsi       # 0x201f
leaq 0xd25(%rip), %rcx       # 0x2025
movl $0x59, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O1/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 0x132e
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x130a
movq 0x10(%rbx), %rdi
callq 0x130a
movq %rbx, %rdi
popq %rbx
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1353
movq %rsi, %rbx
cmpl %edi, (%rsi)
jle 0x1357
movq 0x8(%rbx), %rsi
callq 0x1334
movq %rax, 0x8(%rbx)
jmp 0x13ae
xorl %ebx, %ebx
jmp 0x13ae
jge 0x135f
movq 0x10(%rbx), %rsi
jmp 0x1384
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x139f
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x138f
movq %rsi, %rcx
movq %rcx, %rax
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x1374
movl (%rax), %edi
movl %edi, (%rbx)
callq 0x1334
movq %rax, 0x10(%rbx)
jmp 0x13ae
testq %r14, %r14
je 0x139f
cmpq $0x0, 0x10(%rbx)
cmovneq %rbx, %r14
jmp 0x13a3
movq 0x10(%rbx), %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_O1/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 0x13cb
movq %rdi, %rax
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x13be
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x13fb
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x13ce
movl %eax, %ebp
movq 0x10(%rbx), %rdi
callq 0x13ce
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_O1/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:
movq %rsi, %rax
testq %rax, %rax
je 0x1442
cmpl %edi, (%rax)
je 0x1444
setle %cl
movzbl %cl, %ecx
movq 0x8(%rax,%rcx,8), %rax
jmp 0x142c
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movq %rsi, %rax
testq %rsi, %rsi
je 0x1461
cmpl %edi, (%rax)
je 0x1461
setle %cl
movzbl %cl, %ecx
movq 0x8(%rax,%rcx,8), %rax
testq %rax, %rax
jne 0x144d
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1491
cmpq $0x0, 0x10(%rdi)
je 0x1486
movq %rdi, %rax
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
jne 0x146f
jmp 0x148f
cmpq 0x10(%rax), %rdi
movq %rax, %rdi
jne 0x148f
movq 0x18(%rdi), %rax
testq %rax, %rax
jne 0x147d
popq %rcx
retq
leaq 0xba8(%rip), %rdi       # 0x2040
leaq 0xb80(%rip), %rsi       # 0x201f
leaq 0xba5(%rip), %rcx       # 0x204b
movl $0xb5, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xb3b(%rip), %r14       # 0x200e
testq %rbx, %rbx
je 0x14f3
movl (%rbx), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
movq 0x8(%rbx), %rdi
callq 0x14c5
movq 0x10(%rbx), %rbx
jmp 0x14d3
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xb05(%rip), %r14       # 0x200e
testq %rbx, %rbx
je 0x1529
movq 0x8(%rbx), %rdi
callq 0x14fb
movl (%rbx), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
movq 0x10(%rbx), %rbx
jmp 0x1509
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x155d
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x1531
movq 0x10(%rbx), %rdi
callq 0x1531
movl (%rbx), %esi
leaq 0xab9(%rip), %rdi       # 0x200e
xorl %eax, %eax
popq %rbx
jmp 0x1060
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1870
movq %rax, %rbx
leaq 0xa94(%rip), %r14       # 0x200e
testq %r15, %r15
je 0x159d
movl (%r15), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1948
addq $0x8, %r15
jmp 0x15c0
movq %rbx, %rdi
callq 0x1904
testl %eax, %eax
jne 0x15c5
movq %rbx, %rdi
callq 0x1994
movq %rax, %r15
movq %rbx, %rdi
callq 0x190f
addq $0x10, %r15
movq (%r15), %r15
jmp 0x157a
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x18a6
// File: /workspace/github_c_makefile_star2_O1/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 0x1870
movq %rax, %rbx
leaq 0x9a4(%rip), %r14       # 0x200e
xorl %r15d, %r15d
testq %r12, %r12
je 0x1689
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1948
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x1672
jmp 0x1695
movq %rbx, %rdi
callq 0x1904
testl %eax, %eax
jne 0x16d4
movq %rbx, %rdi
callq 0x1994
movq 0x10(%rax), %r12
testq %r12, %r12
je 0x16ab
cmpq %r15, %r12
jne 0x166d
testq %rax, %rax
je 0x16bc
movl (%rax), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1994
movq %rax, %r15
movq %rbx, %rdi
callq 0x190f
xorl %r12d, %r12d
jmp 0x166d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x18a6
// File: /workspace/github_c_makefile_star2_O1/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 0x177b
movq %rdi, %r14
movl $0x14, %edi
callq 0x1aa4
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1bec
movq %rbx, %rdi
callq 0x1a5a
testl %eax, %eax
jne 0x176e
leaq 0x8eb(%rip), %r14       # 0x200e
movq %rbx, %rdi
callq 0x1c53
movq %rax, %r15
testq %rax, %rax
je 0x1740
movl (%r15), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x1751
movq %rbx, %rsi
callq 0x1bec
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x1762
movq %rbx, %rsi
callq 0x1bec
movq %rbx, %rdi
callq 0x1a5a
testl %eax, %eax
je 0x1723
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1b10
leaq 0x892(%rip), %rdi       # 0x2014
leaq 0x896(%rip), %rsi       # 0x201f
leaq 0x8d8(%rip), %rcx       # 0x2068
movl $0x12f, %edx            # imm = 0x12F
callq 0x1070
// File: /workspace/github_c_makefile_star2_O1/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 0x283a(%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 0x8b3(%rip), %rdi       # 0x2085
xorl %eax, %eax
callq 0x1060
movq (%rbx), %rdi
callq 0x14c5
leaq 0x8ad(%rip), %rdi       # 0x2095
xorl %eax, %eax
callq 0x1060
movq (%rbx), %rdi
callq 0x155e
leaq 0x8a7(%rip), %rdi       # 0x20a5
xorl %eax, %eax
callq 0x1060
movq (%rbx), %rdi
callq 0x14fb
leaq 0x8a2(%rip), %rdi       # 0x20b6
xorl %eax, %eax
callq 0x1060
movq (%rbx), %rdi
callq 0x15d2
leaq 0x89c(%rip), %rdi       # 0x20c6
xorl %eax, %eax
callq 0x1060
movq (%rbx), %rdi
callq 0x1531
leaq 0x897(%rip), %rdi       # 0x20d7
xorl %eax, %eax
callq 0x1060
movq (%rbx), %rdi
callq 0x164b
leaq 0x891(%rip), %rdi       # 0x20e7
xorl %eax, %eax
callq 0x1060
movq (%rbx), %rdi
callq 0x16e7
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x188a
movq $0x0, 0x8(%rax)
popq %rcx
retq
leaq 0x902(%rip), %rdi       # 0x2193
leaq 0x85f(%rip), %rsi       # 0x20f7
xorl %eax, %eax
callq 0x1060
xorl %edi, %edi
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O1/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 0x1978
movq %r14, (%rax)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x814(%rip), %rdi       # 0x2193
leaq 0x7b0(%rip), %rsi       # 0x2136
xorl %eax, %eax
callq 0x1060
xorl %edi, %edi
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O1/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 0x1a29
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x1a16
leaq 0x7af(%rip), %rdi       # 0x2187
xorl %eax, %eax
callq 0x1060
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x1a05
leaq 0x7a0(%rip), %rbx       # 0x218f
movq (%r14), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1060
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x19ef
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1040
leaq 0x786(%rip), %rdi       # 0x21a3
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1050
leaq 0x6dc(%rip), %rdi       # 0x210c
leaq 0x6dd(%rip), %rsi       # 0x2114
leaq 0x731(%rip), %rcx       # 0x216f
movl $0x53, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O1/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 0x1a84
movl $0x0, 0xc(%rdi)
movq $0x1, 0x4(%rdi)
retq
pushq %rax
leaq 0x727(%rip), %rdi       # 0x21b3
leaq 0x728(%rip), %rsi       # 0x21bb
leaq 0x729(%rip), %rcx       # 0x21c3
movl $0x19, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O1/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 0x1aef
movq %rax, %rbx
movslq %ebp, %r14
leaq (,%r14,8), %rdi
callq 0x10a0
movq %rax, 0x10(%rbx)
movl %r14d, (%rbx)
testq %rax, %rax
je 0x1af8
movl $0x0, 0xc(%rbx)
movq $0x1, 0x4(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x6e5(%rip), %rdi       # 0x21db
jmp 0x1aff
leaq 0x6f1(%rip), %rdi       # 0x21f0
xorl %eax, %eax
callq 0x1060
movl $0x1, %edi
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O1/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 0x1bcd
movq %rdi, %rbx
cmpl $0x0, 0xc(%rdi)
je 0x1bb7
cmpl $0x0, 0xc(%rbx)
jle 0x1ba3
movslq 0x4(%rbx), %r15
xorl %ebp, %ebp
leaq 0x61d(%rip), %r14       # 0x218f
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 0x1b72
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1040
leaq 0x6e3(%rip), %rdi       # 0x22a1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1050
leaq 0x5df(%rip), %rdi       # 0x21b3
leaq 0x5e0(%rip), %rsi       # 0x21bb
leaq 0x642(%rip), %rcx       # 0x2224
movl $0x35, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O1/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 0x1c1c
movl (%rsi), %eax
movl 0xc(%rsi), %ecx
cmpl %eax, %ecx
je 0x1c3b
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 0x590(%rip), %rdi       # 0x21b3
leaq 0x591(%rip), %rsi       # 0x21bb
leaq 0x60b(%rip), %rcx       # 0x223c
movl $0x47, %edx
callq 0x1070
leaq 0x61c(%rip), %rdi       # 0x225e
xorl %eax, %eax
callq 0x1060
movl $0x1, %edi
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O1/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 0x1c7f
movl 0xc(%rdi), %eax
testl %eax, %eax
je 0x1c9e
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 0x52d(%rip), %rdi       # 0x21b3
leaq 0x52e(%rip), %rsi       # 0x21bb
leaq 0x5d9(%rip), %rcx       # 0x226d
movl $0x55, %edx
callq 0x1070
leaq 0x5fc(%rip), %rdi       # 0x22a1
xorl %eax, %eax
callq 0x1060
movl $0x1, %edi
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O1/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 0x4110
movl %eax, %ebx
movl %eax, %edx
orl $0x800, %edx            # imm = 0x800
xorl %edi, %edi
movl $0x4, %esi
xorl %eax, %eax
callq 0x4110
movl $0x0, (%r14)
callq 0x42a0
movl %eax, %r15d
cmpl $0x1b, %eax
jne 0x488a
callq 0x42a0
cmpl $0x5b, %eax
jne 0x4873
movl $0x1, (%r14)
callq 0x42a0
movl %eax, %r15d
jmp 0x488a
movq 0x29756(%rip), %rcx     # 0x2dfd0
movq (%rcx), %rsi
movl %eax, %edi
callq 0x4380
movl $0x1b, %r15d
xorl %edi, %edi
movl $0x4, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x4110
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5255
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x518e
cvttsd2si %xmm0, %r8d
leaq 0x1b6b0(%rip), %rdx     # 0x20079
leaq -0x410(%rbp), %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x4190
movq %rbx, %rdi
callq 0x4160
xorl %eax, %eax
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x518e
cvttsd2si %xmm0, %r14d
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x518e
cvttsd2si %xmm0, %ecx
leaq 0x1b654(%rip), %rdx     # 0x20088
leaq -0x410(%rbp), %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movl %r14d, %r8d
xorl %eax, %eax
callq 0x4190
movq %rbx, %rdi
callq 0x4160
xorl %eax, %eax
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4900
callq 0x143d2
movq %rax, %rbx
movq %rax, %rdi
callq 0x145d4
leaq -0x14b(%rip), %rsi      # 0x498e
movq %rbx, %rdi
xorl %edx, %edx
callq 0x559d
leaq 0x1b5ad(%rip), %rsi     # 0x20097
movq %rbx, %rdi
callq 0x59d3
leaq -0x101(%rip), %rsi      # 0x49f8
movq %rbx, %rdi
xorl %edx, %edx
callq 0x559d
leaq 0x1b597(%rip), %rsi     # 0x200a1
movq %rbx, %rdi
callq 0x59d3
leaq -0xb6(%rip), %rsi       # 0x4a63
movq %rbx, %rdi
xorl %edx, %edx
callq 0x559d
leaq 0x1b57f(%rip), %rsi     # 0x200a9
movq %rbx, %rdi
callq 0x59d3
leaq 0x1b57a(%rip), %rsi     # 0x200b3
movq %rbx, %rdi
xorl %edx, %edx
callq 0x13b45
testl %eax, %eax
jne 0x4b5e
movq %rbx, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5e96
leaq 0x1b55b(%rip), %r14     # 0x200c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x59d3
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4d5d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x566c
leaq 0x1b53c(%rip), %rdx     # 0x200c8
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5783
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x5e2e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x566c
leaq -0x2c(%rbp), %r14
leaq 0x1bf54(%rip), %r15     # 0x20b14
leaq -0x40(%rbp), %r12
movq %r14, %rdi
callq 0x4811
cmpl $0x1b, %eax
je 0x4c2d
movl %eax, %r13d
cmpl $0x71, %eax
je 0x4c2d
cmpl $0x51, %r13d
je 0x4c2d
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x5783
movl -0x2c(%rbp), %edx
movq %rbx, %rdi
movl %r13d, %esi
callq 0x4958
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x5e2e
movq $0x0, -0x40(%rbp)
movq $0xf42400, -0x38(%rbp)  # imm = 0xF42400
movq %r12, %rdi
xorl %esi, %esi
callq 0x41a0
jmp 0x4bc4
callq 0x4935
nop
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/apps/parasail_stats.c
// Function: main
int main(int argc, char **argv) {
    parasail_sequences_t *sequences = NULL;
    const char *progname = "parasail_stats";

    /* Check arguments. */
    if (argc > 2) {
        fprintf(stderr, "Too many arguments.\n");
        print_help(progname, EXIT_FAILURE);
    }
    else if (argc < 2) {
        fprintf(stderr, "Missing input file.\n");
        print_help(progname, EXIT_FAILURE);
    }

    /* open file */
    sequences = parasail_sequences_from_file(argv[1]);
    if (NULL == sequences) {
        fprintf(stderr, "parasail_sequences_from_file(%s) failed\n", argv[1]);
        print_help(progname, EXIT_FAILURE);
    }

    /* print the stats */
    fprintf(stdout,
            "%25s: %lu\n"
            "%25s: %lu\n"
            "%25s: %lu\n"
            "%25s: %lu\n"
            "%25s: %f\n"
            "%25s: %f\n",
            "sequence count", (long unsigned)sequences->l,
            "character count", (long unsigned)sequences->characters,
            "shortest sequence", (long unsigned)sequences->shortest,
            "longest sequence", (long unsigned)sequences->longest,
            "sequence length mean", sequences->mean,
            "sequence length stddev", sequences->stddev
            );

    parasail_sequences_free(sequences);

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x3, %edi
jge 0x14d1
cmpl $0x2, %edi
jne 0x14d6
movq %rsi, %r14
movq 0x8(%rsi), %rdi
callq 0x14e8
testq %rax, %rax
je 0x14db
movq %rax, %rbx
movq 0x3b6e(%rip), %rax      # 0x4fd0
movq (%rax), %rdi
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %r9
cvtss2sd 0x28(%rbx), %xmm0
cvtss2sd 0x2c(%rbx), %xmm1
leaq 0x1c7a(%rip), %r10      # 0x30f8
leaq 0x1c5e(%rip), %r11      # 0x30e3
leaq 0x1c46(%rip), %r14      # 0x30d2
leaq 0x1c2d(%rip), %r15      # 0x30c0
leaq 0x1bcc(%rip), %rsi      # 0x3066
leaq 0x1c00(%rip), %rdx      # 0x30a1
leaq 0x1c08(%rip), %r8       # 0x30b0
movb $0x2, %al
pushq %r10
pushq %r11
pushq 0x20(%rbx)
pushq %r14
pushq 0x18(%rbx)
pushq %r15
callq 0x10a0
addq $0x30, %rsp
movq %rbx, %rdi
callq 0x1e58
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
callq 0x11dc
callq 0x1160
addq $0x8, %r14
movq %r14, %rdi
callq 0x119d
nop