// File: /workspace/github_c_makefile_star2_O3/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 0x18275
testb $0x4, %cl
je 0x181bd
movq 0x8(%r14), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x7063
movl 0x4(%r14), %ecx
testl %eax, %eax
je 0x181bd
orl $0x2000, %ecx           # imm = 0x2000
movl %ecx, 0x4(%r14)
testl $0x85c, %ecx            # imm = 0x85C
je 0x181eb
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x18670
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl $0x4, %edx
callq 0x186f1
movl 0x4(%r14), %ecx
testb %cl, %cl
jns 0x18215
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl $0x20, %edx
callq 0x18670
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl $0x80, %edx
callq 0x186f1
movl 0x4(%r14), %ecx
testl $0x2001, %ecx           # imm = 0x2001
sete %al
andl $0x40, %ecx
shrl $0x6, %ecx
orb %al, %cl
jne 0x1824a
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl $0x8, %edx
callq 0x18670
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x186f1
movq 0x57c3f(%rip), %rax     # 0x6fe90
testq %rax, %rax
je 0x18428
movq 0x8(%r14), %r15
cmpq %r15, (%rax)
je 0x18319
movq 0x18(%rax), %rax
testq %rax, %rax
jne 0x1825e
jmp 0x18428
movq %rbx, %rdi
callq 0x77c3
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 0x182ce
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 0x18670
movl 0x4(%r14), %eax
btl $0x12, %eax
setae %cl
testb $-0x40, %bpl
setne %dl
orb %cl, %dl
jne 0x18428
movq 0x8(%r14), %r14
testb $0x1, %al
jne 0x18349
movq 0x57b8b(%rip), %rax     # 0x6fe90
testq %rax, %rax
je 0x18375
cmpq %r14, (%rax)
je 0x18428
movq 0x18(%rax), %rax
jmp 0x18305
testl $0xfffffffd, 0x10(%rax) # imm = 0xFFFFFFFD
jne 0x18428
movq 0x57c13(%rip), %rax     # 0x6ff40
testq %rax, %rax
je 0x18398
movq (%rax), %rax
testq %rax, %rax
je 0x18398
cmpq %r15, (%rax)
je 0x18428
movq 0x18(%rax), %rax
jmp 0x18335
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x188e0
leaq 0x17f35(%rip), %rdi     # 0x30295
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x18555
movq 0x57ae4(%rip), %rax     # 0x6fe60
testq %rax, %rax
je 0x183fe
movq 0x18(%rax), %rcx
movq %rcx, 0x57ad4(%rip)     # 0x6fe60
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
jmp 0x18408
movl 0x4(%r14), %eax
testl $0x2001, %eax           # imm = 0x2001
sete %cl
testb $0x48, %al
setne %dl
testb %al, %al
js 0x183b5
orb %dl, %cl
jne 0x18459
movq %r15, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x188e0
leaq 0x17ec9(%rip), %rdi     # 0x30295
movq %r15, %rsi
movq %rbx, %rdx
callq 0x18555
movq 0x8(%r14), %r15
movq 0x57a7e(%rip), %rax     # 0x6fe60
testq %rax, %rax
je 0x18433
movq 0x18(%rax), %rcx
movq %rcx, 0x57a6e(%rip)     # 0x6fe60
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
jmp 0x1843d
movl $0x20, %edi
callq 0x5fdd
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
movl $0x0, 0x10(%rax)
movq 0x57a73(%rip), %rcx     # 0x6fe90
movq %rcx, 0x18(%rax)
movq %rax, 0x57a68(%rip)     # 0x6fe90
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x5fdd
movq %r15, (%rax)
movq %rbx, 0x8(%rax)
movq 0x57af5(%rip), %rcx     # 0x6ff40
movq (%rcx), %rdx
movq %rdx, 0x18(%rax)
movq %rax, (%rcx)
movl 0x4(%r14), %eax
testb $0x4, %al
je 0x184c2
movq 0x8(%r14), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1885a
testl %eax, %eax
je 0x184c2
movq %r15, %rdi
movq %rbx, %rsi
movl $0x4, %edx
callq 0x188e0
movq 0x57a09(%rip), %rax     # 0x6fe90
testq %rax, %rax
je 0x184a0
cmpq %r15, (%rax)
je 0x18497
movq 0x18(%rax), %rax
jmp 0x18487
testl $0xfffffffd, 0x10(%rax) # imm = 0xFFFFFFFD
je 0x184c2
movq %r15, %rdi
movq %rbx, %rsi
movl $0x4, %edx
callq 0x18c33
leaq 0x17dd8(%rip), %rdi     # 0x3028f
movq %r15, %rsi
movq %rbx, %rdx
callq 0x18555
movl 0x4(%r14), %eax
movl %eax, %ecx
andl $0x8, %ecx
shrl $0x3, %ecx
cmpl $0x40, %eax
sete %dl
orb %cl, %dl
jne 0x184ea
testb $0x40, %al
sete %cl
testb $0x7, %al
sete %al
orb %cl, %al
jne 0x18428
movq 0x8(%r14), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1885a
testl %eax, %eax
je 0x18428
movq %r14, %rdi
movq %rbx, %rsi
movl $0x44, %edx
callq 0x188e0
movq 0x57978(%rip), %rax     # 0x6fe90
testq %rax, %rax
je 0x18428
cmpq %r14, (%rax)
je 0x1852c
movq 0x18(%rax), %rax
jmp 0x18518
testl $0xfffffffd, 0x10(%rax) # imm = 0xFFFFFFFD
jne 0x18428
movq %r14, %rdi
movq %rbx, %rsi
movl $0x44, %edx
callq 0x18c33
leaq 0x16541(%rip), %rdi     # 0x2ea91
jmp 0x18360