LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: set_create_id
void
set_create_id(void)	// from the 1st '&(' to the 1st '),' in OutBuf
{	char *s, *e;

	join_id = 0;
	s = strchr(OutBuf, '&');
	if (!s) { return; }
	e = strchr(s+1, ')');
	if (!e || e-s <= 1) { return; }

	join_id = (char *) e_malloc((e-s) * sizeof(char));
	strncpy(join_id, s+2, (e-s)-1-1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq $0x0, 0x328b6(%rip) # 0x46170
leaq 0x26aaf(%rip), %rdi     # 0x3a370
movl $0x26, %esi
callq 0x4130
testq %rax, %rax
je 0x138f2
movq %rax, %rbx
leaq 0x1(%rax), %rdi
movl $0x29, %esi
callq 0x4130
testq %rax, %rax
je 0x138f2
movq %rax, %r14
subq %rbx, %r14
cmpq $0x2, %r14
jge 0x138fa
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl %r14d, %edi
callq 0x6469
movq %rax, 0x32867(%rip)     # 0x46170
addq $0x2, %rbx
addq $-0x2, %r14
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4090
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: set_thread_id
void
set_thread_id(void)	// from the 2nd ',' to the third ',' in OutBuf
{	char *s, *e;

	thread_id = 0;
	s = strchr(OutBuf, ',');	// 1st
	if (!s) { return; }
	s = strchr(s+1, ',');		// 2nd
	if (!s) { return; }
	e = strchr(s+1, '>');		// Pmain->threadname
	if (!e)
	{	s = strchr(s+1, '.');	// now.threadname
		if (!s) { return; }
	} else
	{	s = e;
	}
	e = strchr(s+1, ',');		// 3rd
	if (!e || e-s <= 1) { return; }

	if (*(e-1) == ')') e--;		// &(Pmain->funcA),

	thread_id = (char *) e_malloc((e-s) * sizeof(char));
	strncpy(thread_id, s+1, (e-s)-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq $0x0, 0x32842(%rip) # 0x46178
leaq 0x26a33(%rip), %rdi     # 0x3a370
movl $0x2c, %esi
callq 0x4130
testq %rax, %rax
je 0x139b0
incq %rax
movq %rax, %rdi
movl $0x2c, %esi
callq 0x4130
testq %rax, %rax
je 0x139b0
movq %rax, %r14
incq %r14
movq %r14, %rdi
movl $0x3e, %esi
callq 0x4130
testq %rax, %rax
jne 0x1398b
movq %r14, %rdi
movl $0x2e, %esi
callq 0x4130
testq %rax, %rax
je 0x139b0
movq %rax, %rbx
leaq 0x1(%rax), %r14
movq %r14, %rdi
movl $0x2c, %esi
callq 0x4130
testq %rax, %rax
je 0x139b0
movq %rax, %rcx
subq %rbx, %rcx
cmpq $0x2, %rcx
jge 0x139b6
popq %rbx
popq %r14
popq %r15
retq
cmpb $0x29, -0x1(%rax)
leaq -0x1(%rax), %r15
cmovneq %rax, %r15
subq %rbx, %r15
movl %r15d, %edi
callq 0x6469
movq %rax, 0x327a4(%rip)     # 0x46178
decq %r15
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x4090
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: set_thread_arg
void
set_thread_arg(void)	// from the 3rd ',' to the closing ')' in OutBuf
{	char *s, *e;

	thread_arg = 0;
	s = strchr(OutBuf, ',');	// 1st
	if (!s) { return; }
	s = strchr(s+1, ',');		// 2nd
	if (!s) { return; }
	s = strchr(s+1, ',');		// 3rd
	if (!s) { return; }
	e = strrchr(s+1, ')');
	if (!e) { return; }

	thread_arg = (char *) e_malloc(((e-s)+1) * sizeof(char));
	strncpy(thread_arg, s+1, (e-s)-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq $0x0, 0x32786(%rip) # 0x46180
leaq 0x2696f(%rip), %rdi     # 0x3a370
movl $0x2c, %esi
callq 0x4130
testq %rax, %rax
je 0x13a7f
incq %rax
movq %rax, %rdi
movl $0x2c, %esi
callq 0x4130
testq %rax, %rax
je 0x13a7f
incq %rax
movq %rax, %rdi
movl $0x2c, %esi
callq 0x4130
testq %rax, %rax
je 0x13a7f
movq %rax, %r15
leaq 0x1(%rax), %rbx
movq %rbx, %rdi
movl $0x29, %esi
callq 0x4150
testq %rax, %rax
je 0x13a7f
movq %rax, %r14
subq %r15, %r14
leal 0x1(%r14), %edi
callq 0x6469
movq %rax, 0x32717(%rip)     # 0x46180
decq %r14
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x4090
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: remember
void
remember(char *s, char *t)
{	Map *m;

	m = (Map *) e_malloc(sizeof(Map));
	m->from = s;
	m->to = t;
	m->nxt = mapped;
	mapped = m;
if (0)	fprintf(stderr, "remember: '%s' / '%s'\n", s, t);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x18, %edi
callq 0x6469
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
movq 0x326e1(%rip), %rcx     # 0x46188
movq %rcx, 0x10(%rax)
movq %rax, 0x326d6(%rip)     # 0x46188
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: look_map
char *
look_map(char *s)
{	Map *m;

	for (m = mapped; m; m = m->nxt)
	{	if (strcmp(m->from, s) == 0)
		{	return m->to;
	}	}
	fprintf(stderr, "modex: error: failed to recognize pthread_create call: '%s'\n", s);
	return "_unknown_";
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x326c0(%rip), %r14     # 0x46188
testq %r14, %r14
je 0x13aee
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x41b0
testl %eax, %eax
je 0x13ae2
movq 0x10(%r14), %r14
jmp 0x13ac8
movq 0x8(%r14), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x23503(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
leaq 0x1248e(%rip), %rsi     # 0x25f8d
movq %rbx, %rdx
xorl %eax, %eax
callq 0x41c0
leaq 0x124ba(%rip), %rax     # 0x25fca
jmp 0x13ae6
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: x_frag
void
x_frag(treenode *root, FILE *fd)
{	FILE *ofp = fp;

	if (!root
	||  root->hdr.type == TN_FUNC_DEF
	||  root->hdr.type == TN_FOR)	/* was FOR_T */
		return;

	fp = fd;
	ByPass = 1;	/* bypass the lookup table */
	decl_cnt = 1;

	vis_start();
	modex_recur(root);

	if (root->hdr.line >= 0
	&&  strlen(OutBuf) > 0
	&&  (strstr(OutBuf, "enum ") || strstr(OutBuf, "struct ")))	/* reason? */
	{	cleanse(OutBuf);
		/* fprintf(stderr, "x_frag OutBuf=<%s> want=<%s>\n", OutBuf, want); */
		if (imported(OutBuf, want, 1))
		{	if (du_mode)	/* -defuse */
			{	char *yy, *y = OutBuf;
				while (*y == '*' || *y == ' ' || *y == '\t')
				{	y++;
				}
				if ((yy = strstr(y, "[]")) != NULL)
				{	*yy = '\0';
				}
				fprintf(fp, "int %s; /* Local to %s from symtab */\n",
					y, want);
			} else
			{	if (!strchr(OutBuf, '='))	// should prevent this
				fprintf(fp, "c_state \"%s\" \"Local %s\"\t/* from symtab */\n",
					OutBuf, want);
	}	}	}

	root->hdr.line = -root->hdr.line - 1;	/* mark visited */
	decl_cnt = 0;
	ByPass = 0;
	fp = ofp;
}

// Assembly:
testq %rdi, %rdi
je 0x13c7b
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x1c(%rdi), %eax
cmpl $0x1, %eax
je 0x13c70
cmpl $0x1e, %eax
je 0x13c70
movq 0x2681e(%rip), %r15     # 0x3a360
movq %rsi, 0x26817(%rip)     # 0x3a360
movb $0x1, 0x301b0(%rip)     # 0x43d00
movl $0x1, 0x30df6(%rip)     # 0x44950
movb $0x0, 0x2680f(%rip)     # 0x3a370
movq %rbx, %rdi
callq 0xadf7
cmpl $0x0, 0x10(%rbx)
js 0x13c55
cmpb $0x0, 0x267f6(%rip)     # 0x3a370
je 0x13c55
leaq 0x267e9(%rip), %rdi     # 0x3a370
leaq 0x12283(%rip), %rsi     # 0x25e11
callq 0x42c0
testq %rax, %rax
jne 0x13bb4
leaq 0x267d1(%rip), %rdi     # 0x3a370
leaq 0x12271(%rip), %rsi     # 0x25e17
callq 0x42c0
testq %rax, %rax
je 0x13c55
leaq 0x267b5(%rip), %r14     # 0x3a370
movq %r14, %rdi
callq 0xe3a0
leaq 0x235ce(%rip), %r12     # 0x37198
movq (%r12), %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0xe686
testl %eax, %eax
je 0x13c55
leaq 0x25e62(%rip), %rax     # 0x39a48
cmpl $0x0, (%rax)
je 0x13c3f
movabsq $0x40100000200, %rax    # imm = 0x40100000200
movzbl (%r14), %ecx
cmpq $0x2a, %rcx
ja 0x13c0a
btq %rcx, %rax
jae 0x13c0a
incq %r14
jmp 0x13bf5
leaq 0xf50e(%rip), %rsi      # 0x2311f
movq %r14, %rdi
callq 0x42c0
testq %rax, %rax
je 0x13c21
movb $0x0, (%rax)
movq 0x26738(%rip), %rdi     # 0x3a360
movq (%r12), %rcx
leaq 0x123a1(%rip), %rsi     # 0x25fd4
movq %r14, %rdx
xorl %eax, %eax
callq 0x41c0
jmp 0x13c55
leaq 0x2672a(%rip), %rdi     # 0x3a370
movl $0x3d, %esi
callq 0x4130
testq %rax, %rax
je 0x13c7c
notl 0x10(%rbx)
movl $0x0, 0x30cee(%rip)     # 0x44950
movb $0x0, 0x30097(%rip)     # 0x43d00
movq %r15, 0x266f0(%rip)     # 0x3a360
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x266dd(%rip), %rdi     # 0x3a360
movq (%r12), %rcx
leaq 0x1236d(%rip), %rsi     # 0x25ffb
leaq 0x266db(%rip), %rdx     # 0x3a370
jmp 0x13c36
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: modex_leaf
void
modex_leaf(leafnode *leaf, int tabs)
{
	if (leaf == NULL || !visu) return;

	/* normally not called */
	linenr = leaf->hdr.line;
	vis_indent(tabs, "");

	switch(leaf->hdr.type){
	case TN_IDENT:	/* modex_leaf */
		vis_print(nmestr(leaf->data.sval));
		break;
	case TN_TYPE:
		if (Verbose&2)
		{	vis_print("Type ");
			vis_print(toksym(leaf->hdr.tok,0));
			if (leaf->hdr.tok == TYPEDEF_NAME)
			{	vis_print(" ");
				vis_print(nmestr(leaf->data.sval));
		}	}
		break;
	case TN_INT:
		vis_print("Int ");
		vis_print_d(leaf->data.ival);
		vis_print("\n");
		break;
	case TN_REAL:
		vis_print("Real ");
		vis_print_g(leaf->data.dval);
		vis_print("\n");
		break;
	case TN_STRING:
		if (0)
		fprintf(stderr, "STRING (%s) at line %3d\n",
			leaf->data.str, leaf->hdr.line);
		vis_print("\"");
		fputs_metastr(leaf->data.str);
		vis_print("\"");
		break;
	case TN_ELLIPSIS:
		vis_print("Ellipsis\n");
		break;
	case TN_LABEL:
		vis_print("Label\n");
		break;
	default:
		fprintf(stderr, "%s: error: unknown leaf type %d\n", progname, leaf->hdr.type);
		break;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x13dba
leaq 0x25d1d(%rip), %rax     # 0x399c8
cmpl $0x0, (%rax)
je 0x13dba
movq %rdi, %rbx
movl 0x10(%rdi), %eax
movl %eax, 0x30044(%rip)     # 0x43d04
leaq 0x133cd(%rip), %rax     # 0x27094
movl %esi, %edi
movq %rax, %rsi
callq 0x124f5
movl 0x1c(%rbx), %edi
leal -0x22(%rdi), %eax
cmpl $0xf, %eax
ja 0x13db5
leaq 0x11299(%rip), %rcx     # 0x24f80
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1234a(%rip), %rdi     # 0x26041
jmp 0x13da9
leaq 0x1afd6(%rip), %r14     # 0x2ecd9
movq %r14, %rdi
callq 0x12436
movq 0x30(%rbx), %rdi
callq 0x13221
movq %r14, %rdi
jmp 0x13da9
leaq 0x25d49(%rip), %rax     # 0x39a6c
testb $0x2, (%rax)
je 0x13dba
leaq 0x122f3(%rip), %rdi     # 0x26026
callq 0x12436
movl 0x18(%rbx), %edi
xorl %esi, %esi
callq 0x15ca4
movq %rax, %rdi
callq 0x12436
cmpl $0x105, 0x18(%rbx)      # imm = 0x105
jne 0x13dba
leaq 0x11ffe(%rip), %rdi     # 0x25d58
callq 0x12436
movq 0x30(%rbx), %rdi
callq 0x630c
movq %rax, %rdi
jmp 0x13da9
leaq 0x122bd(%rip), %rdi     # 0x26031
callq 0x12436
movsd 0x30(%rbx), %xmm0
callq 0x123fc
jmp 0x13da2
leaq 0x122ab(%rip), %rdi     # 0x26037
jmp 0x13da9
leaq 0x12297(%rip), %rdi     # 0x2602c
callq 0x12436
movl 0x30(%rbx), %edi
callq 0x123c0
leaq 0x119c1(%rip), %rdi     # 0x2576a
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x12436
callq 0x4ef0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: modex_reset
void
modex_reset(void)
{
	if (Verbose_cmds)
	{	printf(" -- Modex Reset\n");
	}

	decl_cnt = in_call = in_args = is_label = 0;
	just_left_blk = enum_list_cnt = taboffset = 0;
	sawdefault = Down = 0;
	FreshLut = needreturn = sawreturn = 0;
	ByPass = PosElse = 0;
	extra_comment = owf = owt = owh = 0;
	debug = lastln = lastpb = pending = 0;
	ishidden = wasfalse = wastrue = waselse = nreturns = 0;
	linenr = do_level = sw_level = sw_first = 0;
	do_uniq = o_cnt = visu = 0;
	nblanks = with_decorations = 0;
	cache = comms = commstail = (Cache *) 0;
	fcts = maps = incls = (Fcts *) 0;
	prec = (PreC *) 0;
	decors = fdecors = (Decor *) 0;

	strcpy(fct_name, ":global:");
	strcpy(derscope, "");
	strcpy(dertype,  "");
	strcpy(dername,  "");
	strcpy(derproc,  "");
}

// Assembly:
pushq %rax
leaq 0x259ff(%rip), %rax     # 0x39a0c
cmpl $0x0, (%rax)
je 0x1401e
leaq 0x132f1(%rip), %rdi     # 0x2730a
callq 0x40d0
xorl %eax, %eax
movl %eax, 0x2838a(%rip)     # 0x3c3b0
movl %eax, 0x28380(%rip)     # 0x3c3ac
movl %eax, 0x28376(%rip)     # 0x3c3a8
movl %eax, 0x30918(%rip)     # 0x44950
movl %eax, 0x2fcce(%rip)     # 0x43d0c
movl %eax, 0x32158(%rip)     # 0x4619c
movl %eax, 0x28336(%rip)     # 0x3c380
movb %al, 0x2fcb8(%rip)      # 0x43d08
movl %eax, 0x3213e(%rip)     # 0x46194
movl %eax, 0x3213c(%rip)     # 0x46198
movb %al, 0x2ba42(%rip)      # 0x3faa4
movb %al, 0x2ca68(%rip)      # 0x40ad0
movb %al, 0x2fc92(%rip)      # 0x43d00
movl %eax, 0x3212c(%rip)     # 0x461a0
movl %eax, 0x3212a(%rip)     # 0x461a4
movb %al, 0x2ba40(%rip)      # 0x3fac0
movl %eax, 0x32122(%rip)     # 0x461a8
movl %eax, 0x318d8(%rip)     # 0x45964
movl %eax, 0x318ce(%rip)     # 0x45960
movl %eax, 0x320f8(%rip)     # 0x46190
movl %eax, 0x2ea4a(%rip)     # 0x42ae8
movl %eax, 0x2ea40(%rip)     # 0x42ae4
movl %eax, 0x2ea36(%rip)     # 0x42ae0
movl %eax, 0x30070(%rip)     # 0x44120
movl %eax, 0x2ec3a(%rip)     # 0x42cf0
movl %eax, 0x262ac(%rip)     # 0x3a368
movl %eax, 0x2fc42(%rip)     # 0x43d04
leaq 0x258ff(%rip), %rcx     # 0x399c8
movl %eax, (%rcx)
movl %eax, 0x2b9b7(%rip)     # 0x3fa88
movl %eax, 0x2fc39(%rip)     # 0x43d10
movb %al, 0x282eb(%rip)      # 0x3c3c8
movl %eax, 0x2b9d5(%rip)     # 0x3fab8
movq %rax, 0x320c6(%rip)     # 0x461b0
movq %rax, 0x2b9bf(%rip)     # 0x3fab0
movq %rax, 0x2b9b0(%rip)     # 0x3faa8
movq %rax, 0x28291(%rip)     # 0x3c390
movq %rax, 0x28292(%rip)     # 0x3c398
movq %rax, 0x2827b(%rip)     # 0x3c388
movq %rax, 0x2ebe4(%rip)     # 0x42cf8
movq %rax, 0x2825d(%rip)     # 0x3c378
movq %rax, 0x2824e(%rip)     # 0x3c370
movb %al, 0x23260(%rip)      # 0x37388
movabsq $0x3a6c61626f6c673a, %rcx # imm = 0x3A6C61626F6C673A
movq %rcx, 0x23247(%rip)     # 0x37380
movb %al, 0x305f1(%rip)      # 0x44730
movb %al, 0x301eb(%rip)      # 0x44330
movb %al, 0x28285(%rip)      # 0x3c3d0
movb %al, 0x305ff(%rip)      # 0x44750
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: alldone
void
alldone(void)
{
	if (fp)
	{
if (debug_io) fprintf(stderr, "close .. %p\n", fp);
		Fclose(fp);
fp = 0;
	}
}

// Assembly:
movq 0x26206(%rip), %rdx     # 0x3a360
testq %rdx, %rdx
je 0x14187
pushq %rax
leaq 0x258a1(%rip), %rax     # 0x39a08
cmpl $0x0, (%rax)
jne 0x14188
movq 0x261ed(%rip), %rdi     # 0x3a360
callq 0x793c
movq $0x0, 0x261dd(%rip) # 0x3a360
addq $0x8, %rsp
retq
movq 0x22e69(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
leaq 0x11f2a(%rip), %rsi     # 0x260c3
xorl %eax, %eax
callq 0x41c0
jmp 0x1416c
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: prop_debug
void
prop_debug(treenode *n, int level, char letter)
{	int i;

	if (!n) return;

	printf("%c: ", letter);

	for (i = 0; i < level; i++)
		printf("  ");

	printf("(%s) %s, %s",
		toksym(n->hdr.tok, 0),
		name_of_nodetype(n->hdr.which),
		name_of_node(n->hdr.type));

	if (n->hdr.type == TN_IDENT)
	{	printf("\t(%s)\n", ((leafnode *)n)->data.sval->str);
		return;
	}
	printf("\n");
	prop_debug(n->lnode, level+1, 'L');
	prop_debug(n->rnode, level+1, 'R');
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x11911(%rip), %r15     # 0x25d57
leaq 0x11cf1(%rip), %r12     # 0x2613e
testq %rbx, %rbx
je 0x144dc
movsbl %dl, %esi
leaq 0x11cd9(%rip), %rdi     # 0x26139
xorl %eax, %eax
callq 0x4140
testl %ebp, %ebp
jle 0x1447d
movl %ebp, %r14d
movq %r15, %rdi
xorl %eax, %eax
callq 0x4140
decl %r14d
jne 0x1446e
movl 0x18(%rbx), %edi
xorl %esi, %esi
callq 0x15ca4
movq %rax, %r13
movl (%rbx), %edi
callq 0x16340
movq %rax, %r14
movl 0x1c(%rbx), %edi
callq 0x163fa
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4140
cmpl $0x2d, 0x1c(%rbx)
je 0x144eb
movl $0xa, %edi
callq 0x4050
movq 0x30(%rbx), %rdi
incl %ebp
movl %ebp, %esi
movl $0x4c, %edx
callq 0x1442f
movq 0x38(%rbx), %rbx
movb $0x52, %dl
jmp 0x1444d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0x11c50(%rip), %rdi     # 0x2614a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4140
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: cnt_commas
int
cnt_commas(treenode *n)
{
	if (!n) return 0;

	if (n->hdr.type == TN_IDENT)
		return 0;

	return cnt_commas(n->lnode)
	     + cnt_commas(n->rnode)
	     + (n->hdr.tok == COMMA);
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x1454e
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x2d, 0x1c(%rdi)
je 0x14548
movq 0x30(%rbx), %rdi
callq 0x1450f
movl %eax, %ebp
movq 0x38(%rbx), %rdi
callq 0x1450f
movl %eax, %ecx
addl %ebp, %ecx
xorl %eax, %eax
cmpl $0x14c, 0x18(%rbx)      # imm = 0x14C
sete %al
addl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: ax_terms
void
ax_terms(Ax_Props *np, treenode *n)
{
	if (!n) return;

	if (n->hdr.tok == COMMA)
	{	ax_terms(np, n->lnode);
		ax_terms(np, n->rnode);
	} else
	{	int i;
		for (i = 0; i < 2; i++)
			if (!np->terms[i])
			{	strcpy(Rem3, OutBuf);
				strcpy(OutBuf, "");
				modex_recur(n);
				np->terms[i] = (char *) e_malloc(strlen(OutBuf)+1);
				strcpy(np->terms[i], OutBuf);
				strcpy(OutBuf, Rem3);
				return;
			}
		fprintf(stderr, "%s: Error, too many npterms\n", progname);
		exit(1);	/* cannot happen */
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %r14, %r14
je 0x1457f
cmpl $0x14c, 0x18(%r14)      # imm = 0x14C
jne 0x14589
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0x1454f
movq 0x38(%r14), %r14
jmp 0x1455e
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
xorl %r13d, %r13d
cmpq $0x0, 0x10(%rbx,%r13,8)
je 0x145a2
incq %r13
cmpq $0x1, %r13
je 0x1458c
callq 0x4f42
leaq 0x31e17(%rip), %r15     # 0x463c0
leaq 0x25dc0(%rip), %r12     # 0x3a370
movq %r15, %rdi
movq %r12, %rsi
callq 0x40b0
movb $0x0, 0x25dae(%rip)     # 0x3a370
movq %r14, %rdi
callq 0xadf7
movq %r12, %rdi
callq 0x4110
leal 0x1(%rax), %edi
callq 0x6469
movq %rax, 0x10(%rbx,%r13,8)
movq %rax, %rdi
movq %r12, %rsi
callq 0x40b0
movq %r12, %rdi
movq %r15, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x40b0
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: ax_new_assert
void
ax_new_assert(const int t, treenode *n)
{	Ax_Props *np;

	if (Verbose&2) prop_debug(n, 0, 'T');

	if (t > 1 || t < 0 || !n || cnt_commas(n) != t)
	{	if (n) fprintf(stderr, "%s: error, %s:%d, assert_%s, ",
			progname, n->hdr.fnm, n->hdr.line, t?"r":"p");
		fprintf(stderr, " (saw %d commas)\n", cnt_commas(n));
		return;
	}

	np = (Ax_Props *) e_malloc(sizeof(Ax_Props));
	np->t = t;
	np->n = n;
	np->nr = ax_prop_nr;
	np->terms[0] = (char *) 0;
	np->terms[1] = (char *) 0;
	ax_terms(np, n);

	np->nxt = all_props;
	all_props = np;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x2545e(%rip), %rax     # 0x39a6c
testb $0x2, (%rax)
je 0x14622
movq %rbx, %rdi
xorl %esi, %esi
movl $0x54, %edx
callq 0x1442f
cmpl $0x1, %ebp
ja 0x1467f
testq %rbx, %rbx
je 0x1467f
movq %rbx, %rdi
callq 0x1450f
cmpl %ebp, %eax
jne 0x1467f
movl $0x28, %edi
callq 0x6469
movq %rax, %r14
movl %ebp, (%rax)
movq %rbx, 0x8(%rax)
movl 0x32d6f(%rip), %eax     # 0x473c0
movl %eax, 0x4(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1454f
movq 0x32d59(%rip), %rax     # 0x473c8
movq %rax, 0x20(%r14)
movq %r14, 0x32d4e(%rip)     # 0x473c8
popq %rbx
popq %r14
popq %rbp
retq
testq %rbx, %rbx
je 0x1468e
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4f6d
movq 0x22963(%rip), %rax     # 0x36ff8
movq (%rax), %r14
movq %rbx, %rdi
callq 0x1450f
leaq 0x11ae5(%rip), %rsi     # 0x2618c
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x41c0
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: ax_proposition
void
ax_proposition(FILE *fd, Ax_Props *p)
{
	if (p->t == 0)
	{	fprintf(fd, "c_code {	/* assert_r */\n");
		fprintf(fd, "	int _nq%d_(void) { return !(%s); }\n",
			p->nr, p->terms[0]);
		fprintf(fd, "	int _q%d_(void) { return (%s); }\n}\n",
			p->nr, p->terms[0]);
	} else
	{	fprintf(fd, "c_code {	/* assert_p */\n");
		fprintf(fd, "	int _q%d_(void) { return (%s); }\n",
			p->nr, p->terms[0]);
		fprintf(fd, "	int _r%d_(void) { return (%s); }\n}\n",
			p->nr, p->terms[1]);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, (%rsi)
je 0x14709
leaq 0x11b34(%rip), %rdi     # 0x26201
movl $0x18, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
movl 0x4(%r14), %edx
movq 0x10(%r14), %rcx
leaq 0x11b2c(%rip), %rsi     # 0x2621a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x41c0
movl 0x4(%r14), %edx
movq 0x18(%r14), %rcx
leaq 0x11b36(%rip), %rsi     # 0x2623d
jmp 0x1474a
leaq 0x11a8e(%rip), %rdi     # 0x2619e
movl $0x18, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
movl 0x4(%r14), %edx
movq 0x10(%r14), %rcx
leaq 0x11a86(%rip), %rsi     # 0x261b7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x41c0
movl 0x4(%r14), %edx
movq 0x10(%r14), %rcx
leaq 0x11a92(%rip), %rsi     # 0x261dc
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x41c0
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: ax_fixed
void
ax_fixed(FILE *fd)
{
	fprintf(fd, "bool _ax_runs;\n");
	fprintf(fd, "c_code {\n");
	fprintf(fd, "	int (*_ax_q)(void), (*_ax_r)(void);\n\n");
	fprintf(fd, "	void _ax_start(int (*q)(void), int (*r)(void))\n");
	fprintf(fd, "	{	_ax_q = q;\n");
	fprintf(fd, "		_ax_r = r;\n");
	fprintf(fd, "		now._ax_runs = 1;\n");
	fprintf(fd, "}	}\n\n");
	fprintf(fd, "never {\n");
	fprintf(fd, "start:	/* assert_p(q,r) or ![](p -> (q U r)) */\n");
	fprintf(fd, "	do\n");
	fprintf(fd, "	:: c_expr { now._ax_runs && !_ax_r() } -> break\n");
	fprintf(fd, "	:: else\n");
	fprintf(fd, "	od;\n");
	fprintf(fd, "accept:\n");
	fprintf(fd, "	do\n");
	fprintf(fd, "	:: c_expr {  _ax_r() } -> _ax_runs = 0; goto start\n");
	fprintf(fd, "	:: c_expr { !_ax_r() && !_ax_q() } -> break	/* safety */\n");
	fprintf(fd, "	:: else						/* liveness */\n");
	fprintf(fd, "	od\n");
	fprintf(fd, "}\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x11af9(%rip), %rdi     # 0x26262
movl $0xf, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x10bee(%rip), %rdi     # 0x25370
movl $0x9, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x11ad7(%rip), %rdi     # 0x26272
movl $0x26, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x11ae5(%rip), %rdi     # 0x26299
movl $0x30, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x11afd(%rip), %rdi     # 0x262ca
movl $0xe, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x11af3(%rip), %rdi     # 0x262d9
movl $0xd, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x11ae8(%rip), %rdi     # 0x262e7
movl $0x14, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x11ae4(%rip), %rdi     # 0x262fc
movl $0x5, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x11ad1(%rip), %rdi     # 0x26302
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x11ac1(%rip), %rdi     # 0x2630b
movl $0x30, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x11ad9(%rip), %r14     # 0x2633c
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x42b0
leaq 0x11ac2(%rip), %rdi     # 0x26341
movl $0x31, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x11adb(%rip), %rdi     # 0x26373
movl $0x9, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x11acc(%rip), %rdi     # 0x2637d
movl $0x5, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x11ab9(%rip), %rdi     # 0x26383
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x42b0
leaq 0x11a94(%rip), %rdi     # 0x2638c
movl $0x34, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x11ab0(%rip), %rdi     # 0x263c1
movl $0x3a, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x11ad2(%rip), %rdi     # 0x263fc
movl $0x1d, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x11ad7(%rip), %rdi     # 0x2641a
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x12343(%rip), %rdi     # 0x26c9f
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x42b0
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: ax_decorate
static void
ax_decorate(scopetab_t *that, treenode *n)	/* set n->syment on all TN_IDENT leafs */
{	leafnode *m;

	if (!n) return;

	if (n->hdr.type != TN_IDENT)
	{	ax_decorate(that, n->lnode);
		ax_decorate(that, n->rnode);
	}
	m = (leafnode *) n;

	if (m->hdr.which == LEAF_T
	&&  m->hdr.type  == TN_IDENT)
	{	symentry_t *old = m->syment;

		m->syment = find_glob_symentry(that, m->data.sval->str);

		if (!old)
		{	printf("old symentry not set\n");
same:			printf("new:\t%s symtable entry for glob::%s\n",
				m->syment?"found":"missing",
				m->data.sval->str);
		} else if (m->syment != old)
		{	printf("new symentry differs from old:\n");
			printf("old:\t%s symtable entry for glob::%s\n",
				m->syment?"found":"missing",
				m->data.sval->str);
			goto same;
		} else
		{	printf("old and new both set and equal\n");
			goto same;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x14a0f
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x2d, 0x1c(%rsi)
je 0x149a7
movq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0x14975
movq 0x38(%rbx), %rsi
movq %r14, %rdi
callq 0x14975
cmpl $0x1, (%rbx)
jne 0x14a0f
cmpl $0x2d, 0x1c(%rbx)
jne 0x14a0f
movq 0x28(%rbx), %r15
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rsi
movq %r14, %rdi
callq 0x6aa2
movq %rax, 0x28(%rbx)
testq %r15, %r15
je 0x14a15
cmpq %r15, %rax
je 0x14a1e
leaq 0x12973(%rip), %rdi     # 0x2734e
callq 0x40d0
cmpq $0x0, 0x28(%rbx)
leaq 0x128f1(%rip), %rax     # 0x272dd
leaq 0x15d39(%rip), %rsi     # 0x2a72c
cmoveq %rax, %rsi
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rdx
leaq 0x128df(%rip), %rdi     # 0x272e5
xorl %eax, %eax
callq 0x4140
jmp 0x14a2a
popq %rbx
popq %r14
popq %r15
retq
leaq 0x128fe(%rip), %rdi     # 0x2731a
jmp 0x14a25
leaq 0x1290a(%rip), %rdi     # 0x2732f
callq 0x40d0
cmpq $0x0, 0x28(%rbx)
leaq 0x128a7(%rip), %rax     # 0x272dd
leaq 0x15cef(%rip), %rsi     # 0x2a72c
cmoveq %rax, %rsi
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rdx
leaq 0x12868(%rip), %rdi     # 0x272b8
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x4140
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: x_hashtab
void
x_hashtab(hashtab_t *that, FILE *fpp)
{	symentry_t *list;
	int j;

	for (j = 0; j < that->tsize; j++)
	for (list = that->tab[j]; list; list = list->next)
		x_frag(list->node, fpp);
}

// Assembly:
cmpl $0x0, (%rdi)
jle 0x14aa9
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x8(%r14), %rax
movq (%rax,%r15,8), %r12
testq %r12, %r12
je 0x14a93
movq 0x10(%r12), %rdi
movq %rbx, %rsi
callq 0x13b12
movq 0x38(%r12), %r12
jmp 0x14a7a
incq %r15
movslq (%r14), %rax
cmpq %rax, %r15
jl 0x14a72
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: strip_pthread_fct
static void
strip_pthread_fct(char *what)
{	char *q, *r, *s, *t;

	q = t = strstr(OutBuf, what);
	if (!q) return;

	q += strlen(what);
	r = strrchr(q, ')');
	if (!r) return;

	for (s = t; s <= r; s++)
	{	*s = ' ';	// erase the fct call
	}
	*t = '0';
	// in the model no error is returned from pthread_create or pthread_join

	// sample result in OutBuf at this point: "C: (0!=(Pmain->err=0"
	// the original condition had a call to 'what()' inside this condition
	// the 'what()' call was moved outside the condition
	//
	// we replace the removed function call with 0, meaning non-failure
	// if the original condition had an embedded assignment of the result
	// we need to remove that side-effect as well (hoping that the variable
	// assigned zero does not get reused somewhere later -- this is a hack

	// look if there was an assignment operator directly before 'what()'
	fix_side_effect(t);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r15
leaq 0x2567a(%rip), %r14     # 0x3a370
movq %r14, %rdi
movq %r15, %rsi
callq 0x42c0
testq %rax, %rax
je 0x14df4
movq %rax, %rbx
movq %r15, %rdi
callq 0x4110
leaq (%rax,%rbx), %rdi
movl $0x29, %esi
callq 0x4150
testq %rax, %rax
je 0x14df4
cmpq %rax, %rbx
ja 0x14d52
leaq 0x1(%rbx), %rcx
incq %rax
cmpq %rax, %rcx
cmovaq %rcx, %rax
subq %rbx, %rax
movq %rbx, %rdi
movl $0x20, %esi
movq %rax, %rdx
callq 0x4180
movb $0x30, (%rbx)
decq %rbx
movb (%rbx), %al
cmpb $0x20, %al
je 0x14d62
cmpb $0x9, %al
jne 0x14d67
cmpq %r14, %rbx
ja 0x14d55
cmpb $0x3d, %al
setne %al
cmpq %r14, %rbx
setbe %cl
orb %al, %cl
jne 0x14df4
callq 0x42d0
movq (%rax), %rax
movsbq -0x1(%rbx), %rcx
testb $0x8, (%rax,%rcx,2)
je 0x14df4
leaq 0x255e0(%rip), %rbx     # 0x3a370
movq %rbx, %rdi
callq 0x4110
testq %rax, %rax
je 0x14dbf
xorl %ecx, %ecx
xorl %ebp, %ebp
movzbl (%rcx,%rbx), %edx
cmpl $0x29, %edx
je 0x14db3
cmpl $0x28, %edx
jne 0x14db5
incl %ebp
jmp 0x14db5
decl %ebp
incq %rcx
cmpq %rcx, %rax
jne 0x14da1
jmp 0x14dc1
xorl %ebp, %ebp
movl $0x203a43, 0x255a5(%rip) # imm = 0x203A43
testl %ebp, %ebp
jle 0x14de6
incl %ebp
movq %rbx, %rdi
callq 0x4110
movw $0x28, (%rax,%rbx)
decl %ebp
cmpl $0x1, %ebp
jg 0x14dd1
movq %rbx, %rdi
callq 0x4110
movw $0x30, (%rax,%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: replace_pthread_join
static void
replace_pthread_join(void)
{	char *q, *r;

	q = strstr(OutBuf, "pthread_join(");
	if (!q) return;

	r = q + strlen("pthread_join(");
	// keep the arguments
	// and make this a blocking statement
	fprintf(fp, "	c_expr { spin_join(%s }\n", r);

	strip_pthread_fct("pthread_join(");
}

// Assembly:
pushq %rax
leaq 0x25569(%rip), %rdi     # 0x3a370
leaq 0x118f4(%rip), %rsi     # 0x26702
callq 0x42c0
testq %rax, %rax
je 0x14e41
addq $0xd, %rax
movq 0x2553d(%rip), %rdi     # 0x3a360
leaq 0x11ef6(%rip), %rsi     # 0x26d20
movq %rax, %rdx
xorl %eax, %eax
callq 0x41c0
leaq 0x118c7(%rip), %rdi     # 0x26702
popq %rax
jmp 0x14ce5
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: fct_params
static void
fct_params(treenode *fct, treenode *pars)
{
	if (!fct || !pars || !visu) return;

	switch (pars->hdr.which) {
	case NODE_T:
		switch (pars->hdr.type) {
		case TN_PARAM_LIST:
		case TN_EXPR_LIST:
			fct_params(fct, pars->lnode);
			if (pars->rnode)
			{	fct_params(fct, pars->rnode);
			}
			break;
		default:
			goto A;
		}
		break;
	default:
A:		fprintf(fp, "\t\tc_code { now.par%d_", par_cnt++);
		print_tree(fct, fp);
		fprintf(fp, " = ");
#if 1
		strcpy(AltBuf, OutBuf);
		strcpy(OutBuf, "");
		modex_recur(pars);
		fprintf(fp, "%s", OutBuf);	// fct_params()
		strcpy(OutBuf, AltBuf);
		strcpy(AltBuf, "-x-x-");
#else
		if (((leafnode *) pars)->hdr.type == TN_IDENT)
		{	strcpy(AltBuf, OutBuf);
			strcpy(OutBuf, "");
			do_prefix((leafnode *)pars);
			fprintf(fp, OutBuf);	// fct_params()
			strcpy(OutBuf, AltBuf);
			strcpy(AltBuf, "-x-x-");
		}
		print_recur(pars, fp);
#endif
		fprintf(fp, "; };\n");
		break;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x245ec(%rip), %r15     # 0x399c8
testq %r14, %r14
je 0x15411
testq %rbx, %rbx
je 0x15411
cmpl $0x0, (%r15)
je 0x15411
cmpl $0x4, (%rbx)
jne 0x15417
movl 0x1c(%rbx), %eax
orl $0x4, %eax
cmpl $0xe, %eax
jne 0x15417
movq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0x153ca
movq 0x38(%rbx), %rbx
testq %rbx, %rbx
jne 0x153dc
popq %rbx
popq %r14
popq %r15
retq
movq 0x24f42(%rip), %rdi     # 0x3a360
movl 0x339c4(%rip), %edx     # 0x48de8
leal 0x1(%rdx), %eax
movl %eax, 0x339bb(%rip)     # 0x48de8
leaq 0x11b48(%rip), %rsi     # 0x26f7c
xorl %eax, %eax
callq 0x41c0
movq 0x24f1e(%rip), %rsi     # 0x3a360
movq %r14, %rdi
callq 0x213a8
movq 0x24f0f(%rip), %rcx     # 0x3a360
leaq 0x18f24(%rip), %rdi     # 0x2e37c
movl $0x3, %esi
movl $0x1, %edx
callq 0x42b0
leaq 0x2b672(%rip), %r14     # 0x40ae0
leaq 0x24efb(%rip), %r15     # 0x3a370
movq %r14, %rdi
movq %r15, %rsi
callq 0x40b0
movb $0x0, 0x24ee9(%rip)     # 0x3a370
movq %rbx, %rdi
callq 0xadf7
movq 0x24eca(%rip), %rsi     # 0x3a360
movq %r15, %rdi
callq 0x4170
movq %r15, %rdi
movq %r14, %rsi
callq 0x40b0
movl $0x782d782d, 0x2b62d(%rip) # imm = 0x782D782D
movw $0x2d, 0x2b628(%rip)    # 0x40ae4
movq 0x24e9d(%rip), %rcx     # 0x3a360
leaq 0x11811(%rip), %rdi     # 0x26cdb
movl $0x5, %esi
movl $0x1, %edx
popq %rbx
popq %r14
popq %r15
jmp 0x42b0
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/xtract.c
// Function: map_neg
static char *
map_neg(treenode *n, char *oO)
{	char *p;

	vis_start();
	vis_print("C: !");
	vis_print(oO);

	owf = wasfalse;
	owt = wastrue;
	owe = waselse;
	owh = ishidden;
	if (!strstr(oO, ND_CHOICE))
		PosElse = 1;
	p = vis_lookup(n);		/* map */
	PosElse = 0;
	return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movb $0x0, 0x24a7a(%rip)     # 0x3a370
leaq 0x10399(%rip), %rdi     # 0x25c96
callq 0x12436
movq %r14, %rdi
callq 0x12436
movl 0x2d1d4(%rip), %eax     # 0x42ae4
movl %eax, 0x3088e(%rip)     # 0x461a4
movl 0x2d1cc(%rip), %eax     # 0x42ae8
movl %eax, 0x334de(%rip)     # 0x48e00
movl 0x2d1b8(%rip), %eax     # 0x42ae0
movl %eax, 0x30872(%rip)     # 0x461a0
leaq 0x11105(%rip), %rsi     # 0x26a3a
movq %r14, %rdi
callq 0x42c0
testq %rax, %rax
jne 0x15949
movb $0x1, 0x2b187(%rip)     # 0x40ad0
movq %rbx, %rdi
callq 0x11926
movb $0x0, 0x2b178(%rip)     # 0x40ad0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/tree.c
// Function: find_components
void
find_components(treenode *decl, treenode *def,
                      treenode *container, FindFunction find)
{
    if (!decl)
        return;

    switch(decl->hdr.which)
    {
        case NODE_T:
        {
            switch(decl->hdr.type)
            {
            case TN_COMP_DECL:
            case TN_DECL:
                find_ident_name(decl,decl,container,find);
                break;

            case TN_DECL_LIST:
            case TN_DECLS:
                find_components(decl->lnode,def,container,find);
                find_components(decl->rnode,def,container,find);
                break;

            case TN_FIELD_LIST:
                find_components(decl->lnode,def,container,find);
                find_components(decl->rnode,def,container,find);
                break;

            case TN_FUNC_DECL:
                find_components(decl->rnode,def,container,find);
                break;

            default:
                fprintf(stderr,
                    "%s: parse error: "
                    "unknown node type (%s) in find_components\n",
                    progname, name_of_node(decl->hdr.type));
                break;
            }
        }
    break;

    case LEAF_T:
    case IF_T:
    case FOR_T:
    case NONE_T:
    default:
        fprintf(stderr,
         "%s: parse error: unknown node %s in find_components;\n"
         "  type is: %s\n", progname, print_ptr(decl), name_of_nodetype(decl->hdr.which));
        break;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
leaq 0x1123e(%rip), %r13     # 0x2780c
testq %r15, %r15
je 0x1663c
cmpl $0x4, (%r15)
jne 0x1662d
movl 0x1c(%r15), %edi
leal -0x8(%rdi), %eax
cmpl $0x9, %eax
ja 0x16603
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movq 0x30(%r15), %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x165b2
jmp 0x16608
cmpl $0x2, %edi
jne 0x1660e
movq 0x38(%r15), %r15
jmp 0x165ce
cmpl $0x5, %edi
jne 0x16637
movq %r15, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x16418
movq %r15, %rdi
callq 0x55a1
jmp 0x1663c
callq 0x5612
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/treestk.c
// Function: new_stk_item
Stk_Item  *
new_stk_item( FILE *fp, char *fname )
{
    Stk_Item *stk_item;

	if (freestk)
	{	stk_item = freestk;
		freestk = freestk->next;
		memset(stk_item, 0, STK_ITEM_SZE);
	} else
		stk_item = e_malloc(STK_ITEM_SZE);

    stk_item->filename = e_malloc(strlen(fname)+1);
    strcpy(stk_item->filename, fname);

    if ((stk_item->yybuff = yy_create_buffer(fp, YYBUFF_SIZE )) == NULL){
        e_free(stk_item->filename);
        e_free(stk_item);
        return((Stk_Item *) NULL);
    }

    if ((stk_item->node_heap  = CreateHeap(MX_NODE_SZE, 0)) == NULL){
        e_free(stk_item->filename);
        yy_delete_buffer( stk_item->yybuff );
        e_free(stk_item);
        return((Stk_Item *) NULL);
    }

    stk_item->yyin     = fp;

    stk_item->yylineno = 1;
    stk_item->yycolno  = 0;
    stk_item->yynxtcol = 0;

    stk_item->parse_tree = (treenode *) NULL;

    stk_item->next = (Stk_Item *) NULL;

    return(stk_item);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x327d6(%rip), %rbx     # 0x48e30
testq %rbx, %rbx
je 0x1667e
movq 0x38(%rbx), %rax
movq %rax, 0x327c6(%rip)     # 0x48e30
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
jmp 0x1668b
movl $0x40, %edi
callq 0x6469
movq %rax, %rbx
movq %r15, %rdi
callq 0x4110
leal 0x1(%rax), %edi
callq 0x6469
movq %rax, 0x10(%rbx)
movq %rax, %rdi
movq %r15, %rsi
callq 0x40b0
movq %r14, %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x1c6d4
movq %rax, 0x30(%rbx)
testq %rax, %rax
je 0x166f3
movl $0x50, %edi
xorl %esi, %esi
callq 0x609c
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x166fe
movq %r14, 0x18(%rbx)
movq $0x1, 0x20(%rbx)
movl $0x0, 0x28(%rbx)
xorl %eax, %eax
movq %rax, (%rbx)
movq %rax, 0x38(%rbx)
jmp 0x1671a
movq 0x10(%rbx), %rdi
callq 0x6468
jmp 0x16710
movq 0x10(%rbx), %rdi
callq 0x6468
movq 0x30(%rbx), %rdi
callq 0x1cb19
movq %rbx, %rdi
callq 0x6468
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/treestk.c
// Function: push
void
push(TreeStack *treestk, Stk_Item *stk_item )
{
    if (! treestk || ! stk_item)
        return;

    stk_item->next = treestk->top;

    if (! treestk->top)
        treestk->bottom = stk_item;

    treestk->top = stk_item;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x1679e
movq (%rdi), %rax
movq %rax, 0x38(%rsi)
testq %rax, %rax
jne 0x1679b
movq %rsi, 0x8(%rdi)
movq %rsi, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/treestk.c
// Function: reset_position
void
reset_position(TreeStack *treestk)
{
    if ( !(Parse_TOS = top_of_stack(treestk)))
        return;

    yy_switch_to_buffer(Parse_TOS->yybuff);
    yyin = top_file(treestk);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x16810
movq (%rbx), %rax
jmp 0x16812
xorl %eax, %eax
leaq 0x231df(%rip), %rcx     # 0x399f8
movq %rax, (%rcx)
testq %rax, %rax
je 0x16849
movq 0x30(%rax), %rdi
callq 0x1ca76
testq %rbx, %rbx
je 0x1683d
movq (%rbx), %rax
testq %rax, %rax
je 0x1683d
movq 0x18(%rax), %rax
jmp 0x1683f
xorl %eax, %eax
leaq 0x325fa(%rip), %rcx     # 0x48e40
movq %rax, (%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/treestk.c
// Function: tree_parse
int
tree_parse(TreeStack *treestk, int parse_all)
{
    int cnt = 0;

    if (is_empty(treestk))
        return(0);

    do {
#if 0
        while(yyparse())
            ;
#else
	yyparse();	/* returns 1 on error 0 on accept */
#endif
        cnt++;
        get_next_file(treestk);

        if (is_empty(treestk))
            break;

    } while (parse_all);

    return(cnt);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x1688a
movq %rdi, %r14
cmpq $0x0, (%rdi)
je 0x1688a
movl %esi, %ebp
xorl %ebx, %ebx
callq 0x1cf24
movq %r14, %rdi
callq 0x16891
testq %r14, %r14
je 0x1687e
cmpq $0x0, (%r14)
setne %al
jmp 0x16880
xorl %eax, %eax
incl %ebx
testl %ebp, %ebp
je 0x1688a
testb %al, %al
jne 0x16863
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/treestk.c
// Function: handle_new_file
void
handle_new_file(TreeStack *treestk, FILE *fp, char *fname)
{
    Stk_Item *stk_item;

    if ((stk_item = new_stk_item(fp, fname)) == NULL)
        return;

    push(treestk, stk_item);
    reset_position(treestk);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x16648
testq %rax, %rax
je 0x169d8
testq %rbx, %rbx
je 0x169cf
movq (%rbx), %rcx
movq %rcx, 0x38(%rax)
testq %rcx, %rcx
jne 0x169cc
movq %rax, 0x8(%rbx)
movq %rax, (%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x16802
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/dflow.c
// Function: doit
char *
doit(leafnode *leaf, int how)
{	scopetab_t *z;
	static char bstr[1024];
	static char lstr[1024];

	if (!leaf) return (char *) 0;

	if (leaf->syment && leaf->syment->nes)
		z = leaf->syment->nes;
	else
		z = (scopetab_t *) 0;

	strcpy(lstr, "");
	switch (how) {
	case 2:	sprintf(bstr, "%d:", leaf->hdr.line);
		strcat(lstr, bstr);	/* fall thru */
	case 0:	sprintf(bstr, "%s::", z?z->owner:"-");
		strcat(lstr, bstr);	/* fall thru */
	case 1:	sprintf(bstr, "%s%s", nmestr(leaf->data.sval), (!how)?" ":"");
		strcat(lstr, bstr);
	}
	return &lstr[0];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1e8cf
movl %esi, %ebx
movq %rdi, %r14
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x1e87c
movq 0x18(%rax), %r12
testq %r12, %r12
jne 0x1e87f
xorl %r12d, %r12d
movb $0x0, 0x2ea5a(%rip)     # 0x4d2e0
testl %ebx, %ebx
je 0x1e8c3
cmpl $0x1, %ebx
je 0x1e914
cmpl $0x2, %ebx
jne 0x1e8d3
movl 0x10(%r14), %edx
leaq 0x2e63d(%rip), %r15     # 0x4cee0
leaq 0x88e6(%rip), %rsi      # 0x27190
movq %r15, %rdi
xorl %eax, %eax
callq 0x4290
leaq 0x2ea25(%rip), %rdi     # 0x4d2e0
movq %r15, %rsi
callq 0x4280
testq %r12, %r12
je 0x1e8e6
movq 0x18(%r12), %rdx
jmp 0x1e8ed
xorl %eax, %eax
jmp 0x1e8da
leaq 0x2ea06(%rip), %rax     # 0x4d2e0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x61ae(%rip), %rdx      # 0x24a9b
leaq 0x2e5ec(%rip), %r15     # 0x4cee0
leaq 0xfbc9(%rip), %rsi      # 0x2e4c4
movq %r15, %rdi
xorl %eax, %eax
callq 0x4290
leaq 0x2e9d4(%rip), %rdi     # 0x4d2e0
movq %r15, %rsi
callq 0x4280
movq 0x30(%r14), %rdi
callq 0x630c
testl %ebx, %ebx
leaq 0x7432(%rip), %rdx      # 0x25d58
leaq 0x8767(%rip), %rcx      # 0x27094
cmoveq %rdx, %rcx
leaq 0x2e5a8(%rip), %rbx     # 0x4cee0
leaq 0xfb8a(%rip), %rsi      # 0x2e4c9
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x4290
leaq 0x2e98d(%rip), %rdi     # 0x4d2e0
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4280
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/dflow.c
// Function: dep_node
DuG *
dep_node(SymList *a, int imark)
{	DuG *g;

	for (g = du_g; g; g = g->nxt)
		if (g->sm == a->sm)
		{	g->marks |= imark;
			goto done;
		}

	g = (DuG *) e_malloc(sizeof(DuG));

	if (!a->sm) printf("%s: dep_node without symbol\n", progname);

	g->sm = a->sm;
	g->marks = imark;
	g->rdcls |= RealDecls;
	g->d_e = (DuGP *) 0;
	g->nxt = du_g;
	du_g = g;
done:
	return g;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movq 0x2ed6a(%rip), %rbx     # 0x4d6e0
testq %rbx, %rbx
je 0x1e98d
movq 0x8(%r14), %rax
cmpq %rax, (%rbx)
je 0x1e9e8
movq 0x18(%rbx), %rbx
testq %rbx, %rbx
jne 0x1e97f
movl $0x20, %edi
callq 0x6469
movq %rax, %rbx
cmpq $0x0, 0x8(%r14)
jne 0x1e9b9
leaq 0x187e8(%rip), %rax     # 0x37190
movq (%rax), %rsi
leaq 0xfb1c(%rip), %rdi      # 0x2e4ce
xorl %eax, %eax
callq 0x4140
movq 0x8(%r14), %rax
movq %rax, (%rbx)
movl %ebp, 0x8(%rbx)
movl 0x2ed1f(%rip), %eax     # 0x4d6e8
orl %eax, 0xc(%rbx)
movq $0x0, 0x10(%rbx)
movq 0x2ed05(%rip), %rax     # 0x4d6e0
movq %rax, 0x18(%rbx)
movq %rbx, 0x2ecfa(%rip)     # 0x4d6e0
jmp 0x1e9eb
orl %ebp, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/dflow.c
// Function: dep_edge
int
dep_edge(DuG *a, DuG *b, int dist)
{	DuGP *e;

	if (a->sm == b->sm)
		return 0;		/* self-loop */

	for (e = a->d_e; e; e = e->nxt)
	{	if (e->ptr == b)
			return 0;	/* already there */
	}

	e = (DuGP *) e_malloc(sizeof(DuGP));
	e->ptr = b;
	e->dist = dist;
	e->nxt = a->d_e;
	a->d_e = e;

	return 1;
}

// Assembly:
movq (%rdi), %rcx
xorl %eax, %eax
cmpq (%rsi), %rcx
je 0x1ea42
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x1ea1d
cmpq %r14, (%rcx)
je 0x1ea3e
movq 0x10(%rcx), %rcx
jmp 0x1ea0d
movl $0x18, %edi
callq 0x6469
movq %r14, (%rax)
movl %ebp, 0x8(%rax)
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
movq %rax, 0x10(%rbx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/dflow.c
// Function: dep_trans
void
dep_trans(void)	/* transitive closure */
{	DuG *g, *t;
	DuGP *s, *u;
	int dist, cnt;

	do {	cnt = 0;
		for (g = du_g; g; g = g->nxt)
		for (s = g->d_e; s; s = s->nxt)			/* successors */
		{	t = s->ptr;				/* one successor in DuG */
			for (u = t->d_e; u; u = u->nxt)		/* the successors of this */
			{	dist = s->dist + u->dist;
				if (dep_edge(g, u->ptr, dist))
					cnt++;
			}
		}
	} while (cnt > 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x2ec8f(%rip), %rbx     # 0x4d6e0
testq %rbx, %rbx
je 0x1eaac
xorl %ebp, %ebp
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x1ea8e
movq (%r14), %rax
movq 0x10(%rax), %r15
testq %r15, %r15
je 0x1ea88
movl 0x8(%r15), %edx
addl 0x8(%r14), %edx
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x1e9f3
addl %eax, %ebp
movq 0x10(%r15), %r15
jmp 0x1ea68
movq 0x10(%r14), %r14
jmp 0x1ea5c
movq 0x18(%rbx), %rbx
testq %rbx, %rbx
jne 0x1ea58
testl %ebp, %ebp
jle 0x1eaac
movq 0x2ec3e(%rip), %rbx     # 0x4d6e0
movl $0x0, %ebp
testq %rbx, %rbx
jne 0x1ea58
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Modex/Src/dflow.c
// Function: dep_warn
void
dep_warn(int m)
{
	if (!(m&DEF) || !(m&USE))
	{
		if (!(m&DEF))
			fprintf(stdout, "\t%snever defined",
				(m&USE)?"used but ":"never used and ");
		else if (!(m&USE))
			fprintf(stdout, "\tdefined but never used");
	}
	fprintf(stdout, "%s\n", (m&HIDE)?" hidden":"");
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movl %edi, %eax
notl %eax
testb $0x5, %al
je 0x1eb1b
testb $0x1, %bl
jne 0x1eaf6
testb $0x4, %bl
movq 0x184ff(%rip), %rax     # 0x36fd0
movq (%rax), %rdi
leaq 0xfa2b(%rip), %rax      # 0x2e506
leaq 0xfa1a(%rip), %rdx      # 0x2e4fc
cmoveq %rax, %rdx
leaq 0xf9fe(%rip), %rsi      # 0x2e4eb
xorl %eax, %eax
callq 0x41c0
jmp 0x1eb1b
testb $0x4, %bl
jne 0x1eb1b
movq 0x184ce(%rip), %rax     # 0x36fd0
movq (%rax), %rcx
leaq 0xfa0a(%rip), %rdi      # 0x2e516
movl $0x17, %esi
movl $0x1, %edx
callq 0x42b0
movq 0x184ae(%rip), %rax     # 0x36fd0
movq (%rax), %rdi
btl $0x9, %ebx
leaq 0x8564(%rip), %rax      # 0x27094
leaq 0xf9f7(%rip), %rdx      # 0x2e52e
cmovaeq %rax, %rdx
leaq 0x683a(%rip), %rsi      # 0x2537c
xorl %eax, %eax
popq %rbx
jmp 0x41c0