// File: /workspace/github_c_makefile_star2_O2/nimble-code[P]Uno/Src/uno_lts.c
// Function: global_var
static void
global_var(SymList *s, treenode *n)	/* track global, default-initialized, pointers */
{	leafnode *l;
	int extra = 0;

	if (s->mark & DECL)
	{	l = leftmost(n);

		if (s->mark & DEF)
			extra |= 8;

		if (s->mark & ARRAY_DECL)
			extra |= 128;		/* was 8 */

		if ((s->mark & PARAM)
		&&  (s->mark & USE))		/* comes from prototype decl or enum */
			extra |= 64;		/* suppress complaints -- was 1 */

		if  (s->mark & UNO_CONST)	/* enum constant */
			extra |= 8;		/* suppress complaints about lack of def */

		if (l)
		{	if (l->hdr.tok == STATIC) extra |= 2;	/* static global */
			if (l->hdr.tok == EXTRN)  extra |= 4;	/* extern global */
		}

		mark_guse(s->sm, n, extra);	/* global declared - see if used */

		if ((s->mark & IS_PTR)			/* pointer */
		&& !(extra & (64|128)))			/* not a param or array */
		{	if (!(s->mark & DEF))		/* uninitialized */
				add_glob(s->sm, n, 0);	/* an interesting global */
			else
				add_defs(s->sm, n);	/* def_b4_use of global ptr */
		}
	} else	/* not a declaration */
	{
		if ((s->mark & USE) && is_constant(s->sm->nme->str))
			s->mark |= UNO_CONST;	/* was s->mark |= DEF; */

		if ((s->mark & (USE|USEafterdef|REF0|REF1))
		||  (s->mark & DEREF))
		{	mark_guse(s->sm, n, 1);		/* at least one USE */
			add_gstack(s->sm, n, USE);	/* global used in this procedure */
		}

		if (s->mark & ALIAS)	/* address taken - def could happen via ptr */
		{	mark_guse(s->sm, n, 32);	/* flag to void global checks on this var */
			add_gstack(s->sm, n, ALIAS);	/* mark it as aliased */
		}

		if ((s->mark & (DEF|UNO_CONST)) && !(s->mark & DEREF))
		{	mark_guse(s->sm, n, 8);		/* at least one DEF */
			add_gstack(s->sm, n, DEF);	/* global set in this procedure */
		}

		if (on_glob(s->sm)	/* of interest: an uninitialized global ptr */
		&& !on_safe(s->sm))	/* not already declared moot on this path */
		{	if (((s->mark & (DEF|UNO_CONST))	/* defined */
			&& !(s->mark & REF0)
			&& !(s->mark & DEREF))
			||   (s->mark & ALIAS))		/* or address taken */
			{	add_defs(s->sm, n);	/* record def of global ptr */
				add_safe(s->sm, n);	/* moot in remainder of path */
			}
			if (s->mark & USE)		/* direct use */
			{
				if (checkpathcond(s->sm, n, 1))	/* unless value known */
					add_uses(s->sm, n);	/* use_b4_def in fct */
			}
			if ((s->mark & REF0)		/* ref0->x */
			||  (s->mark == DEREF)		/* *ptr = x; */
			|| ((s->mark & DEREF) && (s->mark & (USE|DEF|FCALL))))	/* ptr deref */
			{
				if (checkpathcond(s->sm, n, 2))	/* unless known value */
					add_derefs(s->sm, n);	/* use_b4_def in fct */
				else if (0) printf("check %s - %d - <%s>\n",
					s->sm->nme->str,
					checkpathcond(s->sm, n, 3),
					x_stmnt(n));
	}	}	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %ecx
btl $0xa, %ecx
jb 0x162c4
testb $0x4, %cl
je 0x16205
movq 0x8(%r14), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x5c2a
movl 0x4(%r14), %ecx
testl %eax, %eax
je 0x16205
orl $0x2000, %ecx           # imm = 0x2000
movl %ecx, 0x4(%r14)
testw $0x85c, %cx             # imm = 0x85C
je 0x1622e
movq 0x8(%r14), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x165dc
movq 0x8(%r14), %rdi
pushq $0x4
popq %rdx
movq %rbx, %rsi
callq 0x16663
movl 0x4(%r14), %ecx
testb %cl, %cl
jns 0x16256
movq 0x8(%r14), %rdi
pushq $0x20
popq %rdx
movq %rbx, %rsi
callq 0x165dc
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl $0x80, %edx
callq 0x16663
movl 0x4(%r14), %ecx
testw $0x2001, %cx            # imm = 0x2001
sete %al
andl $0x40, %ecx
shrl $0x6, %ecx
orb %al, %cl
jne 0x16286
movq 0x8(%r14), %rdi
pushq $0x8
popq %rdx
movq %rbx, %rsi
callq 0x165dc
movq 0x8(%r14), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x16663
movq 0x8(%r14), %r15
movq %r15, %rdi
callq 0x15b48
testl %eax, %eax
je 0x164b4
movq 0x58c9f(%rip), %rax     # 0x6ef40
testq %rax, %rax
je 0x16371
movq (%rax), %rcx
testq %rcx, %rcx
je 0x16371
leaq 0x18(%rcx), %rax
cmpq %r15, (%rcx)
jne 0x162aa
jmp 0x164b4
movq %rbx, %rdi
callq 0x6418
movl 0x4(%r14), %ebp
movl %ebp, %ecx
andl $0x1, %ecx
movl %ebp, %edx
shrl %edx
andl $0x80, %edx
leal (%rdx,%rcx,8), %esi
movl %ebp, %edi
notl %edi
testw $0x4004, %di            # imm = 0x4004
leal 0x40(%rdx,%rcx,8), %ecx
cmovnel %esi, %ecx
shrl $0xa, %ebp
andl $0x8, %ebp
orl %ecx, %ebp
testq %rax, %rax
je 0x1631c
movl 0x18(%rax), %eax
movl %ebp, %ecx
orl $0x2, %ecx
cmpl $0x123, %eax            # imm = 0x123
cmovnel %ebp, %ecx
movl %ecx, %ebp
orl $0x4, %ebp
cmpl $0x118, %eax            # imm = 0x118
cmovnel %ecx, %ebp
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x165dc
movl 0x4(%r14), %eax
btl $0x12, %eax
setae %cl
testb $-0x40, %bpl
setne %dl
orb %cl, %dl
jne 0x164b4
movq 0x8(%r14), %rdi
testb $0x1, %al
jne 0x16483
leaq 0x58b39(%rip), %rax     # 0x6ee90
movq (%rax), %rcx
testq %rcx, %rcx
je 0x16495
leaq 0x18(%rcx), %rax
cmpq %rdi, (%rcx)
jne 0x16357
jmp 0x164b4
movl 0x4(%r14), %eax
testw $0x2001, %ax            # imm = 0x2001
sete %cl
testb $0x48, %al
setne %dl
testb %al, %al
js 0x16389
orb %dl, %cl
jne 0x163b6
movq %r15, %rdi
movq %rbx, %rsi
callq 0x16638
movq 0x8(%r14), %rdi
callq 0x12673
movq %rbx, 0x8(%rax)
movq 0x58b98(%rip), %rcx     # 0x6ef40
movq (%rcx), %rdx
movq %rdx, 0x18(%rax)
movq %rax, (%rcx)
movl 0x4(%r14), %eax
testb $0x4, %al
je 0x16407
movq 0x8(%r14), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x16732
testl %eax, %eax
je 0x16407
pushq $0x4
popq %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x167a9
movq %r15, %rdi
callq 0x15b48
testl %eax, %eax
jne 0x16407
pushq $0x4
popq %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x16a70
leaq 0x17ec7(%rip), %rdi     # 0x2e2c3
movq %r15, %rsi
movq %rbx, %rdx
callq 0x164bf
movl 0x4(%r14), %eax
movl %eax, %ecx
andl $0x8, %ecx
shrl $0x3, %ecx
cmpl $0x40, %eax
sete %dl
orb %cl, %dl
jne 0x1642f
testb $0x40, %al
sete %cl
testb $0x7, %al
sete %al
orb %cl, %al
jne 0x164b4
movq 0x8(%r14), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x16732
testl %eax, %eax
je 0x164b4
pushq $0x44
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x167a9
movq %r14, %rdi
callq 0x15b48
testl %eax, %eax
je 0x164b4
pushq $0x44
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x16a70
leaq 0x16630(%rip), %rdi     # 0x2caa1
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x164bf
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x16638
callq 0x12673
movq %rbx, 0x8(%rax)
andl $0x0, 0x10(%rax)
movq 0x589e7(%rip), %rcx     # 0x6ee90
movq %rcx, 0x18(%rax)
movq %rax, 0x589dc(%rip)     # 0x6ee90
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq