// File: /workspace/github_c_makefile_star2_O1/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 0x2dfb5(%rip), %r12     # 0x3c3c0
testq %r12, %r12
je 0xe5b9
leaq 0x2b63d(%rip), %rbp     # 0x39a58
leaq 0x16d52(%rip), %r14     # 0x25174
movabsq $0x40100000200, %r13    # imm = 0x40100000200
movq 0x18(%r12), %rsi
testq %rsi, %rsi
jne 0xe43a
movq (%r12), %rsi
movq 0x10(%r12), %rdi
callq 0xe09e
testq %rax, %rax
je 0xe458
movq 0x38(%r12), %r12
testq %r12, %r12
jne 0xe42c
jmp 0xe5b9
cmpl $0x0, (%rbp)
jne 0xe466
cmpl $0x0, 0x28(%r12)
je 0xe449
movq (%r12), %rdi
movq 0x8(%r12), %rsi
movl $0x1, %edx
callq 0xe686
testl %eax, %eax
je 0xe449
cmpl $0x0, 0x20(%r12)
jne 0xe449
movl $0x1, 0x20(%r12)
movq 0x10(%r12), %rdi
movq %r14, %rsi
callq 0x42c0
testq %rax, %rax
jne 0xe449
movq 0x18(%r12), %rsi
callq 0xe2e9
movq %rax, %r15
movq 0x10(%r12), %rdi
callq 0xe3a0
leaq 0x2b58a(%rip), %rax     # 0x39a48
cmpl $0x0, (%rax)
je 0xe51b
movq 0x18(%r12), %r15
testq %r15, %r15
jne 0xe4d1
movq (%r12), %r15
movzbl (%r15), %eax
cmpq $0x2a, %rax
ja 0xe4e6
btq %rax, %r13
jae 0xe4e6
incq %r15
jmp 0xe4d1
movq %r15, %rdi
leaq 0x14c2f(%rip), %rsi     # 0x2311f
callq 0x42c0
testq %rax, %rax
je 0xe4fd
movb $0x0, (%rax)
movq 0x8(%r12), %rcx
movq %rbx, %rdi
leaq 0x16d7c(%rip), %rsi     # 0x25288
movq %r15, %rdx
xorl %eax, %eax
callq 0x41c0
jmp 0xe449
movq 0x18(%r12), %rcx
testq %rcx, %rcx
jne 0xe529
movq (%r12), %rcx
movq 0x10(%r12), %rdx
movq 0x8(%r12), %r8
movq %rbx, %rdi
leaq 0x16d66(%rip), %rsi     # 0x252a3
xorl %eax, %eax
callq 0x41c0
testq %r15, %r15
jne 0xe567
movl $0xd, %esi
movl $0x1, %edx
leaq 0x16db9(%rip), %rdi     # 0x25313
movq %rbx, %rcx
callq 0x42b0
jmp 0xe449
movq %rbx, %rdi
leaq 0x16d50(%rip), %rsi     # 0x252c1
movq %r15, %rdx
xorl %eax, %eax
callq 0x41c0
movq 0x18(%r12), %rdx
testq %rdx, %rdx
jne 0xe589
movq (%r12), %rdx
movq 0x28a68(%rip), %r15     # 0x36ff8
movq (%r15), %rdi
leaq 0x16d2d(%rip), %rsi     # 0x252c7
xorl %eax, %eax
callq 0x41c0
movq (%r15), %rdi
movq 0x8(%r12), %rdx
leaq 0x16d32(%rip), %rsi     # 0x252e2
xorl %eax, %eax
callq 0x41c0
jmp 0xe549
leaq 0x2bd90(%rip), %rax     # 0x3a350
cmpl $0x0, (%rax)
je 0xe5d8
movl 0x30005(%rip), %eax     # 0x3e5d0
leal 0x1(%rax), %ecx
movl %ecx, 0x2fffc(%rip)     # 0x3e5d0
testl %eax, %eax
je 0xe5e7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28bea(%rip), %rax     # 0x371d8
movl (%rax), %edx
leaq 0x16d2a(%rip), %rsi     # 0x25321
movq %rbx, %rdi
xorl %eax, %eax
callq 0x41c0
leaq 0x16d41(%rip), %rdi     # 0x25349
movl $0x25, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x16d4e(%rip), %rdi     # 0x2536f
movl $0xa, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x42b0
leaq 0x27e36(%rip), %r15     # 0x36470
leaq 0x16d39(%rip), %r14     # 0x2537a
xorl %r12d, %r12d
movq (%r12,%r15), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x41c0
addq $0x8, %r12
cmpq $0x70, %r12
jne 0xe644
leaq 0x181fa(%rip), %rdi     # 0x26860
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 0x42b0