// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x266a3
movq -0x10(%rbp), %rdi
callq 0x7d60
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x265a1
movl -0x1c(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x265bd
movl -0x1c(%rbp), %eax
orl $0x80, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
je 0x265e6
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x265e6
movl -0x1c(%rbp), %eax
orl $0x40, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x26600
movl -0x1c(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x26635
movq -0x18(%rbp), %rax
cmpl $0x123, 0x18(%rax)      # imm = 0x123
jne 0x2661d
movl -0x1c(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x118, 0x18(%rax)      # imm = 0x118
jne 0x26633
movl -0x1c(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x1c(%rbp)
jmp 0x26635
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x270e0
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x40000, %eax          # imm = 0x40000
cmpl $0x0, %eax
je 0x2669e
movl -0x1c(%rbp), %eax
andl $0xc0, %eax
cmpl $0x0, %eax
jne 0x2669e
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x2668b
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x27190
jmp 0x2669c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x27250
jmp 0x2669e
jmp 0x268e9
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x266dc
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x6e00
cmpl $0x0, %eax
je 0x266dc
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x2000, %ecx           # imm = 0x2000
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x81c, %eax            # imm = 0x81C
cmpl $0x0, %eax
jne 0x266fc
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x26728
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x270e0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x4, %edx
callq 0x27290
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x26765
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x20, %edx
callq 0x270e0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x80, %edx
callq 0x27290
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x2001, %eax           # imm = 0x2001
cmpl $0x0, %eax
je 0x267b1
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x267b1
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x8, %edx
callq 0x270e0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x27290
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x26070
cmpl $0x0, %eax
je 0x268e7
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x274a0
cmpl $0x0, %eax
jne 0x268e7
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x2001, %eax           # imm = 0x2001
cmpl $0x0, %eax
je 0x2680c
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x2680c
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x2681d
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x2683f
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x27250
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x27500
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x2687c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x27550
cmpl $0x0, %eax
je 0x2687a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x277d0
jmp 0x2687c
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x268b3
movq -0x8(%rbp), %rax
cmpl $0x40, 0x4(%rax)
je 0x268b3
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x268e5
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x7, %eax
cmpl $0x0, %eax
je 0x268e5
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x2, %edx
callq 0x27550
cmpl $0x0, %eax
je 0x268e1
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x27830
jmp 0x268e3
jmp 0x268e3
jmp 0x268e5
jmp 0x268e7
jmp 0x268e9
addq $0x20, %rsp
popq %rbp
retq
nop