// File: /workspace/github_c_makefile_star2_O1/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), %eax
btl $0xa, %eax
jb 0x18bee
testb $0x4, %al
je 0x18b34
movq 0x8(%r14), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x7254
testl %eax, %eax
je 0x18b34
orb $0x20, 0x5(%r14)
movzwl 0x4(%r14), %eax
testl $0x85c, %eax            # imm = 0x85C
je 0x18b62
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x18ff7
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl $0x4, %edx
callq 0x19078
testb $-0x80, 0x4(%r14)
je 0x18b8b
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl $0x20, %edx
callq 0x18ff7
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl $0x80, %edx
callq 0x19078
movl 0x4(%r14), %eax
testl $0x2001, %eax           # imm = 0x2001
sete %cl
andl $0x40, %eax
shrl $0x6, %eax
orb %cl, %al
jne 0x18bc3
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl $0x8, %edx
callq 0x18ff7
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x19078
movq 0x572b6(%rip), %rax     # 0x6fe80
testq %rax, %rax
je 0x18da3
movq 0x8(%r14), %r15
cmpq %r15, (%rax)
je 0x18c92
movq 0x18(%rax), %rax
testq %rax, %rax
jne 0x18bd7
jmp 0x18da3
movq %rbx, %rdi
callq 0x79af
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
testl $0x4004, %edi           # imm = 0x4004
leal 0x40(%rdx,%rcx,8), %ecx
cmovnel %esi, %ecx
shrl $0xa, %ebp
andl $0x8, %ebp
orl %ecx, %ebp
testq %rax, %rax
je 0x18c47
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 0x18ff7
movl 0x4(%r14), %eax
btl $0x12, %eax
setae %cl
testb $-0x40, %bpl
setne %dl
orb %cl, %dl
jne 0x18da3
movq 0x8(%r14), %r14
testb $0x1, %al
jne 0x18cc2
movq 0x57202(%rip), %rax     # 0x6fe80
testq %rax, %rax
je 0x18cee
cmpq %r14, (%rax)
je 0x18da3
movq 0x18(%rax), %rax
jmp 0x18c7e
testl $0xfffffffd, 0x10(%rax) # imm = 0xFFFFFFFD
jne 0x18da3
movq 0x5728a(%rip), %rax     # 0x6ff30
testq %rax, %rax
je 0x18d11
movq (%rax), %rax
testq %rax, %rax
je 0x18d11
cmpq %r15, (%rax)
je 0x18da3
movq 0x18(%rax), %rax
jmp 0x18cae
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x1924d
leaq 0x175e2(%rip), %rdi     # 0x302bb
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x18ecf
movq 0x5715b(%rip), %rax     # 0x6fe50
testq %rax, %rax
je 0x18d79
movq 0x18(%rax), %rcx
movq %rcx, 0x5714b(%rip)     # 0x6fe50
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
jmp 0x18d83
movl 0x4(%r14), %edx
testl $0x2001, %edx           # imm = 0x2001
sete %al
testb $0x48, %dl
setne %cl
testb %dl, %dl
js 0x18d30
orb %cl, %al
jne 0x18dd0
movq %r15, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x1924d
leaq 0x17574(%rip), %rdi     # 0x302bb
movq %r15, %rsi
movq %rbx, %rdx
callq 0x18ecf
movq 0x8(%r14), %r15
movq 0x570f3(%rip), %rax     # 0x6fe50
testq %rax, %rax
je 0x18dae
movq 0x18(%rax), %rcx
movq %rcx, 0x570e3(%rip)     # 0x6fe50
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
jmp 0x18db8
movl $0x20, %edi
callq 0x61a1
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
movl $0x0, 0x10(%rax)
movq 0x570e8(%rip), %rcx     # 0x6fe80
movq %rcx, 0x18(%rax)
movq %rax, 0x570dd(%rip)     # 0x6fe80
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x61a1
movq %r15, (%rax)
movq %rbx, 0x8(%rax)
movq 0x5716a(%rip), %rcx     # 0x6ff30
movq (%rcx), %rdx
movq %rdx, 0x18(%rax)
movq %rax, (%rcx)
testb $0x4, 0x4(%r14)
je 0x18e3c
movq 0x8(%r14), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x191d7
testl %eax, %eax
je 0x18e3c
movq %r15, %rdi
movq %rbx, %rsi
movl $0x4, %edx
callq 0x1924d
movq 0x5707f(%rip), %rax     # 0x6fe80
testq %rax, %rax
je 0x18e1a
cmpq %r15, (%rax)
je 0x18e11
movq 0x18(%rax), %rax
jmp 0x18e01
testl $0xfffffffd, 0x10(%rax) # imm = 0xFFFFFFFD
je 0x18e3c
movq %r15, %rdi
movq %rbx, %rsi
movl $0x4, %edx
callq 0x195b8
leaq 0x17484(%rip), %rdi     # 0x302b5
movq %r15, %rsi
movq %rbx, %rdx
callq 0x18ecf
movl 0x4(%r14), %eax
movl %eax, %ecx
andl $0x8, %ecx
shrl $0x3, %ecx
cmpl $0x40, %eax
sete %dl
orb %cl, %dl
jne 0x18e64
testb $0x40, %al
sete %cl
testb $0x7, %al
sete %al
orb %cl, %al
jne 0x18da3
movq 0x8(%r14), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x191d7
testl %eax, %eax
je 0x18da3
movq %r14, %rdi
movq %rbx, %rsi
movl $0x44, %edx
callq 0x1924d
movq 0x56fee(%rip), %rax     # 0x6fe80
testq %rax, %rax
je 0x18da3
cmpq %r14, (%rax)
je 0x18ea6
movq 0x18(%rax), %rax
jmp 0x18e92
testl $0xfffffffd, 0x10(%rax) # imm = 0xFFFFFFFD
jne 0x18da3
movq %r14, %rdi
movq %rbx, %rsi
movl $0x44, %edx
callq 0x195b8
leaq 0x15bfa(%rip), %rdi     # 0x2eac4
jmp 0x18cd9