// File: /workspace/github_c_makefile_star2_O0/nimble-code[P]Uno/Src/uno_lts.c
// Function: local_var
static void
local_var(SymList *s, treenode *n)	/* track local, uninitialized non-array objects */
{	leafnode *l;

	if (debug)
		printf("mark %s, %d\n", s->sm->nme->str, s->mark);

	if (s->mark & DECL)			/* declaration */
	{	l = leftmost(n);
		if (l && l->hdr.tok == EXTRN)	/* extern declared locally */
		{	s->sm->decl_level = FILE_SCOPE;	/* fix */
			global_var(s, n);	/* global in disguise */
			return;
		}
		if (!(s->mark & (USE | USEafterdef)))
		{	add_locs(s->sm, n);	/* check if this local can remain un-used */
			if (s->mark & PARAM)
				mark_locs(s->sm, n, PARAM|(s->mark&FCALL));
			if (s->mark & IS_PTR)			/* a local pointer variable */
				mark_locs(s->sm, n, IS_PTR);	/* remember that */
			if (l && l->hdr.tok == STATIC)
				mark_locs(s->sm, n, ISTATIC);
		}

		if ((!l || l->hdr.tok != STATIC || (s->mark & IS_PTR))	/* not static, unless ptr */
		&&  !(s->mark & DEF)		/* not initialized in decl */
		&&  !(s->mark & ARRAY_DECL)	/* arraynames are initialized ptrs */
		&&  !(s->mark & USEafterdef))	/* a USEafterdef implies a DEF */
			add_stack(s->sm, n);	/* track this local */
	} else
	{
		if (s->mark & IN_SIZEOF)
			mark_locs(s->sm, n, IN_SIZEOF);	/* means: used in sizeof operation */

		if (s->mark & ALIAS)	/* address taken - def could happen via ptr */
		{	mark_locs(s->sm, n, ALIAS|(s->mark&FCALL));
			del_stack(s->sm, 0);	/* no point in keeping track */
		}

		if (s->mark & REF1)	/* x.y means x has a use and a def -- 5/2004 */
		{	/* printf("REF1 mark %s: %d\n", s->sm->nme->str, s->mark);	*/
			mark_locs(s->sm, n, USE|DEF);
			del_stack(s->sm, 1);
		}
#if 1
		/* added 12/2004 */
		if (s->mark & REF0)			/* x->y */
			mark_locs(s->sm, n, REF0);
		if (s->mark & DEREF)			/* *x */
			mark_locs(s->sm, n, DEREF);
#endif
		if ((s->mark & (USE|USEafterdef|REF0))	/* REF1 x.y is not a deref of x */
		||  (s->mark & DEREF))			/* deref counts as use */
			mark_locs(s->sm, n, USE|(s->mark&FCALL));	/* no longer un-used */

		if (n && n->hdr.tok == RETURN)
		{	extern int err_path;
			int x = is_local(s->sm);

			x = (x & ~DEREF);
			if (x != 0
			&& !(x& (PARAM | IN_SIZEOF | ISTATIC))
			&& !(s->mark & (DEREF|REF0))
			&&  (s->mark & ALIAS)		/* taking address */
			&& !has_fctcalls(n->hdr.defuse)
			&& !suppress(n->hdr.fnm, n->hdr.line))
			{	err_path++;	/* print fct args as well */
				fprintf(stdout, "uno: %s:%d: fct %s, returning address of local '%s' in <%s>\n",
					n->hdr.fnm, n->hdr.line,
					curgraph?curgraph->fctnm:"-",
					s->sm->nme->str, x_stmnt(n));
				err_path--;
				if (debug || Verbose) {
				fprintf(stdout, "s\t"); dflow_mark(stdout, s->mark); fprintf(stdout, "\n");
				fprintf(stdout, "x\t"); dflow_mark(stdout, x); fprintf(stdout, "\n");
				fprintf(stdout, "d\t"); dump_defuse(n->hdr.defuse, stdout); fprintf(stdout, "\n");
				}
			}	/* should also complain about basenames of arrays */
		}
	}

	if (on_stack(s->sm))				/* seen local decl */
	{	if (!(s->mark & USEafterdef)
		&&  (s->mark & (USE | REF0 | DEREF)))
		{	mark_locs(s->sm, n, USEbeforedef|(s->mark&FCALL));
			if (!(s->mark & INCOND))	/* could be benign nil-test */
				del_stack(s->sm, 2);	/* else we're done with it  */
		} else if (s->mark & (DEF | UNO_CONST))
		{	mark_locs(s->sm, n, DEF|(s->mark&FCALL));	/* def before use */
			del_stack(s->sm, 3);
	}	}
	else if (debug)
		printf("variable is not on stack\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x0, 0x5f6c9(%rip)     # 0x85fd0
je 0x2692e
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edx
leaq 0x1ef76(%rip), %rdi     # 0x4589d
movb $0x0, %al
callq 0x30f0
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x26a9b
movq -0x10(%rbp), %rdi
callq 0x7d60
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x26984
movq -0x18(%rbp), %rax
cmpl $0x118, 0x18(%rax)      # imm = 0x118
jne 0x26984
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movw $0x2, 0x20(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x26550
jmp 0x26ef4
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x804, %eax            # imm = 0x804
cmpl $0x0, %eax
jne 0x26a2f
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x280e0
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
je 0x269dc
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edx
andl $0x2, %edx
orl $0x4000, %edx           # imm = 0x4000
callq 0x28170
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x40000, %eax          # imm = 0x40000
cmpl $0x0, %eax
je 0x26a03
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x40000, %edx          # imm = 0x40000
callq 0x28170
cmpq $0x0, -0x18(%rbp)
je 0x26a2d
movq -0x18(%rbp), %rax
cmpl $0x123, 0x18(%rax)      # imm = 0x123
jne 0x26a2d
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x10000, %edx          # imm = 0x10000
callq 0x28170
jmp 0x26a2f
cmpq $0x0, -0x18(%rbp)
je 0x26a54
movq -0x18(%rbp), %rax
cmpl $0x123, 0x18(%rax)      # imm = 0x123
jne 0x26a54
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x40000, %eax          # imm = 0x40000
cmpl $0x0, %eax
je 0x26a96
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x26a96
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0x26a96
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x26a96
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x28380
jmp 0x26e1a
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x20000, %eax          # imm = 0x20000
cmpl $0x0, %eax
je 0x26ac2
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x20000, %edx          # imm = 0x20000
callq 0x28170
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x26b03
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edx
andl $0x2, %edx
orl $0x80, %edx
callq 0x28170
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0x28410
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x26b3a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x5, %edx
callq 0x28170
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1, %esi
callq 0x28410
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x26b5f
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x8, %edx
callq 0x28170
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x26b84
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x40, %edx
callq 0x28170
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x80c, %eax            # imm = 0x80C
cmpl $0x0, %eax
jne 0x26ba4
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x26bc2
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edx
andl $0x2, %edx
orl $0x4, %edx
callq 0x28170
cmpq $0x0, -0x10(%rbp)
je 0x26e18
movq -0x10(%rbp), %rax
cmpl $0x120, 0x18(%rax)      # imm = 0x120
jne 0x26e18
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x284f0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
andl $-0x41, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x26e16
movl -0x1c(%rbp), %eax
andl $0x34000, %eax          # imm = 0x34000
cmpl $0x0, %eax
jne 0x26e16
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x48, %eax
cmpl $0x0, %eax
jne 0x26e16
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x26e16
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x28550
cmpl $0x0, %eax
jne 0x26e16
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x1fd20
cmpl $0x0, %eax
jne 0x26e16
leaq 0x6ff6c(%rip), %rax     # 0x96be0
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x6ff60(%rip), %rax     # 0x96be0
movl %ecx, (%rax)
movq 0x27347(%rip), %rax     # 0x4dfd0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x20(%rbp)
cmpq $0x0, 0x5f2fa(%rip)     # 0x85fa8
je 0x26cc0
movq 0x5f2f1(%rip), %rax     # 0x85fa8
movq (%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x26ccd
leaq 0xe545(%rip), %rax      # 0x3520c
movq %rax, -0x38(%rbp)
jmp 0x26ccd
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4ec0
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl -0x20(%rbp), %ecx
movq -0x48(%rbp), %r8
movq -0x40(%rbp), %r9
leaq 0x1eb9e(%rip), %rsi     # 0x458aa
movq %rax, (%rsp)
movb $0x0, %al
callq 0x3170
leaq 0x6fec2(%rip), %rax     # 0x96be0
movl (%rax), %ecx
addl $-0x1, %ecx
leaq 0x6feb6(%rip), %rax     # 0x96be0
movl %ecx, (%rax)
cmpl $0x0, 0x5f29d(%rip)     # 0x85fd0
jne 0x26d45
leaq 0x2763c(%rip), %rax     # 0x4e378
cmpl $0x0, (%rax)
je 0x26e14
movq 0x27284(%rip), %rax     # 0x4dfd0
movq (%rax), %rdi
leaq 0x20ba1(%rip), %rsi     # 0x478f7
movb $0x0, %al
callq 0x3170
movq 0x2726c(%rip), %rax     # 0x4dfd0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x1b330
movq 0x27256(%rip), %rax     # 0x4dfd0
movq (%rax), %rdi
leaq 0x1d9bb(%rip), %rsi     # 0x4473f
movb $0x0, %al
callq 0x3170
movq 0x2723e(%rip), %rax     # 0x4dfd0
movq (%rax), %rdi
leaq 0x1eb4b(%rip), %rsi     # 0x458e7
movb $0x0, %al
callq 0x3170
movq 0x27226(%rip), %rax     # 0x4dfd0
movq (%rax), %rdi
movl -0x1c(%rbp), %esi
callq 0x1b330
movq 0x27214(%rip), %rax     # 0x4dfd0
movq (%rax), %rdi
leaq 0x1d979(%rip), %rsi     # 0x4473f
movb $0x0, %al
callq 0x3170
movq 0x271fc(%rip), %rax     # 0x4dfd0
movq (%rax), %rdi
leaq 0x1eb0c(%rip), %rsi     # 0x458ea
movb $0x0, %al
callq 0x3170
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq 0x271dc(%rip), %rax     # 0x4dfd0
movq (%rax), %rsi
callq 0x1a7b0
movq 0x271cd(%rip), %rax     # 0x4dfd0
movq (%rax), %rdi
leaq 0x1d932(%rip), %rsi     # 0x4473f
movb $0x0, %al
callq 0x3170
jmp 0x26e16
jmp 0x26e18
jmp 0x26e1a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x260d0
cmpl $0x0, %eax
je 0x26edb
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x26e96
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x4c, %eax
cmpl $0x0, %eax
je 0x26e96
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edx
andl $0x2, %edx
orl $0x1000, %edx           # imm = 0x1000
callq 0x28170
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
jne 0x26e94
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x2, %esi
callq 0x28410
jmp 0x26ed9
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x2001, %eax           # imm = 0x2001
cmpl $0x0, %eax
je 0x26ed7
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edx
andl $0x2, %edx
orl $0x1, %edx
callq 0x28170
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x3, %esi
callq 0x28410
jmp 0x26ed9
jmp 0x26ef4
cmpl $0x0, 0x5f0ee(%rip)     # 0x85fd0
je 0x26ef2
leaq 0x1ea02(%rip), %rdi     # 0x458ed
movb $0x0, %al
callq 0x30f0
jmp 0x26ef4
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)