// File: /workspace/github_c_makefile_star2_O3/nimble-code[P]Modex/Src/xtract.c
// Function: add_nomap_locals
void
add_nomap_locals(FILE *fd)
{	Fcts *g;
	char *t;

	for (g = modex_locals; g; g = g->nxt)
	{
		if (spintype(g->dt, g->full?g->full:g->nm))
			continue;

		if (!allprocs && !g->wanted)
			continue;

		if (!imported(g->nm, g->tg, 1))
			continue;

		if (g->purged)
		{	continue;
		}
		g->purged = 1;
		if (!strstr(g->dt, "typedef")
#if 0
		&&  !strstr(g->dt, "struct")
#endif
		)
		{	t = checkfull(g->dt, g->full, g->lno);
			cleanse(g->dt);

if (0)		fprintf(stderr, "%3d: (%d) add_nomap_locals fct %s: dt %s nm %s tg %s full %s fc (%d,%p) want %s [%d]\n",
			g->lno, du_mode, fct_name, g->dt, g->nm, g->tg,
			g->full, g->fc,
			spintype(g->dt, g->full?g->full:g->nm), want, allprocs);

			if (du_mode)
			{	char *yy, *y = g->full?g->full:g->nm;
				while (*y == '*' || *y == ' ' || *y == '\t')
					y++;
				if ((yy = strstr(y, "[]")) != NULL)
				{	*yy = '\0';
				}
				fprintf(fd, "int %s;	/* local to %s */\n",
					y, g->tg);
			} else
			{	fprintf(fd, " c_state \"%s %s\" \"Local p_%s\"",
					g->dt, g->full?g->full:g->nm, g->tg);
				if (t)
				{	fprintf(fd, " \"%s\"", t);
					fprintf(stderr, "modex: error: local %s is ", g->full?g->full:g->nm);
					fprintf(stderr, "initialized in declaration in instrumented %s()\n", g->tg);
				}
				fprintf(fd, " /* nomap */\n");
	}	}	}

	if (used_spin_malloc)
	{	static int not_twice = 0;
		if (not_twice++ == 0)
		{	int i;
			fprintf(fd, " c_state \"char spin_heap[%d]\" \"Global\"\n",
				spin_heap_size);
			fprintf(fd, " c_state \"int  spin_heap_n\" \"Global\"\n");
			fprintf(fd, " c_code {\n");
			for (i = 0; SomeCode[i]; i++)
			{	fprintf(fd, "\t\t%s\n", SomeCode[i]);
			}
			fprintf(fd, " }\n");
	}	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2d10a(%rip), %r12     # 0x3b3d0
testq %r12, %r12
je 0xe474
leaq 0x2a792(%rip), %rbp     # 0x38a68
leaq 0x15e97(%rip), %r14     # 0x24174
movabsq $0x40100000200, %r13    # imm = 0x40100000200
movq 0x18(%r12), %rsi
testq %rsi, %rsi
jne 0xe2f5
movq (%r12), %rsi
movq 0x10(%r12), %rdi
callq 0xdf6b
testq %rax, %rax
je 0xe313
movq 0x38(%r12), %r12
testq %r12, %r12
jne 0xe2e7
jmp 0xe474
cmpl $0x0, (%rbp)
jne 0xe321
cmpl $0x0, 0x28(%r12)
je 0xe304
movq (%r12), %rdi
movq 0x8(%r12), %rsi
movl $0x1, %edx
callq 0xe541
testl %eax, %eax
je 0xe304
cmpl $0x0, 0x20(%r12)
jne 0xe304
movl $0x1, 0x20(%r12)
movq 0x10(%r12), %rdi
movq %r14, %rsi
callq 0x42d0
testq %rax, %rax
jne 0xe304
movq 0x18(%r12), %rsi
callq 0xe1ae
movq %rax, %r15
movq 0x10(%r12), %rdi
callq 0xe25b
leaq 0x2a6df(%rip), %rax     # 0x38a58
cmpl $0x0, (%rax)
je 0xe3d6
movq 0x18(%r12), %r15
testq %r15, %r15
jne 0xe38c
movq (%r12), %r15
movzbl (%r15), %eax
cmpq $0x2a, %rax
ja 0xe3a1
btq %rax, %r13
jae 0xe3a1
incq %r15
jmp 0xe38c
movq %r15, %rdi
leaq 0x13d74(%rip), %rsi     # 0x2211f
callq 0x42d0
testq %rax, %rax
je 0xe3b8
movb $0x0, (%rax)
movq 0x8(%r12), %rcx
movq %rbx, %rdi
leaq 0x15ec1(%rip), %rsi     # 0x24288
movq %r15, %rdx
xorl %eax, %eax
callq 0x41d0
jmp 0xe304
movq 0x18(%r12), %rcx
testq %rcx, %rcx
jne 0xe3e4
movq (%r12), %rcx
movq 0x10(%r12), %rdx
movq 0x8(%r12), %r8
movq %rbx, %rdi
leaq 0x15eab(%rip), %rsi     # 0x242a3
xorl %eax, %eax
callq 0x41d0
testq %r15, %r15
jne 0xe422
movl $0xd, %esi
movl $0x1, %edx
leaq 0x15efe(%rip), %rdi     # 0x24313
movq %rbx, %rcx
callq 0x42c0
jmp 0xe304
movq %rbx, %rdi
leaq 0x15e95(%rip), %rsi     # 0x242c1
movq %r15, %rdx
xorl %eax, %eax
callq 0x41d0
movq 0x18(%r12), %rdx
testq %rdx, %rdx
jne 0xe444
movq (%r12), %rdx
movq 0x27bad(%rip), %r15     # 0x35ff8
movq (%r15), %rdi
leaq 0x15e72(%rip), %rsi     # 0x242c7
xorl %eax, %eax
callq 0x41d0
movq (%r15), %rdi
movq 0x8(%r12), %rdx
leaq 0x15e77(%rip), %rsi     # 0x242e2
xorl %eax, %eax
callq 0x41d0
jmp 0xe404
leaq 0x2aee5(%rip), %rax     # 0x39360
cmpl $0x0, (%rax)
je 0xe493
movl 0x2f15a(%rip), %eax     # 0x3d5e0
leal 0x1(%rax), %ecx
movl %ecx, 0x2f151(%rip)     # 0x3d5e0
testl %eax, %eax
je 0xe4a2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x27d3f(%rip), %rax     # 0x361e8
movl (%rax), %edx
leaq 0x15e6f(%rip), %rsi     # 0x24321
movq %rbx, %rdi
xorl %eax, %eax
callq 0x41d0
leaq 0x15e86(%rip), %rdi     # 0x24349
movl $0x25, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
leaq 0x15e93(%rip), %rdi     # 0x2436f
movl $0xa, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42c0
leaq 0x26f7b(%rip), %r15     # 0x35470
leaq 0x15e7e(%rip), %r14     # 0x2437a
xorl %r12d, %r12d
movq (%r12,%r15), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x41d0
addq $0x8, %r12
cmpq $0x70, %r12
jne 0xe4ff
leaq 0x1733f(%rip), %rdi     # 0x25860
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x42c0