// File: /workspace/github_c_makefile_star2_O0/nimble-code[P]Uno/Src/uno_lts.c
// Function: uno_guse
static void
uno_guse(void)
{	SymRef *r;
	Graphs *g;

	/* flags: 1 - used, 2 - static, 4 - extern, 8 - def-ed, 16 - useb4def, 32 - alias */
	/* 64 - fct param, 128 - array decl */

	/* local check of unused globals in this file */

	if (usecheck)
	for (r = globuse; r; r = r->nxt)
	{	int stc;

		if (0)	printf("%s - %d \t%s:%d: <-> %s\n",
			r->sm->nme->str,
			r->status,
			r->n->hdr.fnm,
			r->n->hdr.line,
			file_name);

		if (r->n
		&&  r->n->hdr.fnm
		&&  strcmp(r->n->hdr.fnm, file_name) != 0)
			continue;

		stc = r->status&~128;
		if (r->status & 128) stc |= 8; /* array decl */

		if (!(stc & 32)	/* no alias taken */
		&&  !(stc & 64))	/* no fct param */
		switch (stc) {
		case   0: /* normal -def -use */
			uno_complain(r, "", "not assigned to or used in this file");
			break;

		case     8: /* normal +def -use */
			if (picky || Verbose)
			uno_complain(r, "", "assigned to but not used in this file");
			break;

		case   2: /* static -def -use */
			uno_complain(r, "static ", "never assigned to or used");
			break;

		case 2|8: /* static +def -use */
			uno_complain(r, "static ", "assigned to but not used");
			break;

		case 1|2: /* static -def +use */
		case 1|2|16: /* static -def  +use +useb4def */
			if (on_glob(r->sm))
			uno_complain(r, "static ", "used but never assigned to");
			break;

		case 1|2|8|16: /* static +def  +use +useb4def */
			if (lintlike && on_glob(r->sm))	/* picky mode */
			uno_complain(r, "static ", "may be used before set");
			/*
			 * also picks up cases of globals assumed to be 0-init
			 * only dereference operations are trouble in this case
			 * - these are reported elsewhere
			 */
			break;

		case   4: /* extern -def -use */
			uno_complain(r, "extern ", "not assigned to or used in this file");
			break;

		case  1:	/* normal -def +use */
		case  1|4:	/* extern -def +use */
		case  1|8:	/* normal +def +use */
		case 1|2|8:	/* static +def +use */
		case 1|4|8:	/* extern +def +use */
		case 1|16:	/* normal -def  +use +useb4def */
		case 1|4|16:	/* extern -def  +use +useb4def */
		case 4|8:	/* extern +def -use */
			break;	/* ok */

		case 1|8|16:	/* normal +def  +use +useb4def */
		case 1|4|8|16:	/* extern +def  +use +useb4def */
			/* should be improved */
			if (!on_glob(r->sm)) continue;

			for (g = graph; g; g = g->nxt)
			{	if (g == glob_decls
				||  g->cfg == uno_prop
				||  strcmp(g->fctnm, "main") == 0)
					continue;
				break;
			}
			if (!g)	/* main is the only procedure */
			uno_complain(r, "", "may be used before set in main()");
			break;

		default: /* 4&2 or 4&2&1 -- var has both static and extern flags */
			fprintf(stderr, "uno: internal error, invalid status %d, uno_guse\n",
				r->status);
			break;
	}	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x2c899(%rip), %rax     # 0x4e3a8
cmpl $0x0, (%rax)
je 0x21dae
movq 0x644d1(%rip), %rax     # 0x85ff0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x21dac
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x21b6d
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0x21b6d
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x2c7ad(%rip), %rax     # 0x4e308
movq (%rax), %rsi
callq 0x3160
cmpl $0x0, %eax
je 0x21b6d
jmp 0x21d9b
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x21b96
movl -0x14(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x21d99
movl -0x14(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x21d99
movl -0x14(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x1d, %rax
ja 0x21d78
movq -0x20(%rbp), %rax
leaq 0x23208(%rip), %rcx     # 0x44dd8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
leaq 0x131d1(%rip), %rsi     # 0x34db5
leaq 0x23f61(%rip), %rdx     # 0x45b4c
callq 0x28c60
jmp 0x21d97
leaq 0x2c7a4(%rip), %rax     # 0x4e3a0
cmpl $0x0, (%rax)
jne 0x21c0d
leaq 0x2c770(%rip), %rax     # 0x4e378
cmpl $0x0, (%rax)
je 0x21c24
movq -0x8(%rbp), %rdi
leaq 0x1319d(%rip), %rsi     # 0x34db5
leaq 0x23f52(%rip), %rdx     # 0x45b71
callq 0x28c60
jmp 0x21d97
movq -0x8(%rbp), %rdi
leaq 0x2353e(%rip), %rsi     # 0x45172
leaq 0x23f5c(%rip), %rdx     # 0x45b97
callq 0x28c60
jmp 0x21d97
movq -0x8(%rbp), %rdi
leaq 0x23522(%rip), %rsi     # 0x45172
leaq 0x23f5a(%rip), %rdx     # 0x45bb1
callq 0x28c60
jmp 0x21d97
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x26070
cmpl $0x0, %eax
je 0x21c89
movq -0x8(%rbp), %rdi
leaq 0x234f5(%rip), %rsi     # 0x45172
leaq 0x23f46(%rip), %rdx     # 0x45bca
callq 0x28c60
jmp 0x21d97
leaq 0x2c70f(%rip), %rax     # 0x4e3a4
cmpl $0x0, (%rax)
je 0x21cc2
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x26070
cmpl $0x0, %eax
je 0x21cc2
movq -0x8(%rbp), %rdi
leaq 0x234bc(%rip), %rsi     # 0x45172
leaq 0x23f28(%rip), %rdx     # 0x45be5
callq 0x28c60
jmp 0x21d97
movq -0x8(%rbp), %rdi
leaq 0x13406(%rip), %rsi     # 0x350d8
leaq 0x23e73(%rip), %rdx     # 0x45b4c
callq 0x28c60
jmp 0x21d97
jmp 0x21d97
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x26070
cmpl $0x0, %eax
jne 0x21cfe
jmp 0x21d9b
movq 0x642c3(%rip), %rax     # 0x85fc8
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x21d58
movq -0x10(%rbp), %rax
cmpq 0x642c5(%rip), %rax     # 0x85fe0
je 0x21d46
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq 0x642d4(%rip), %rax     # 0x86000
je 0x21d46
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x122c8(%rip), %rsi     # 0x34004
callq 0x3160
cmpl $0x0, %eax
jne 0x21d48
jmp 0x21d4a
jmp 0x21d58
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x21d09
cmpq $0x0, -0x10(%rbp)
jne 0x21d76
movq -0x8(%rbp), %rdi
leaq 0x1304b(%rip), %rsi     # 0x34db5
leaq 0x23e8b(%rip), %rdx     # 0x45bfc
callq 0x28c60
jmp 0x21d97
movq 0x2c279(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x10(%rax), %edx
leaq 0x23e8d(%rip), %rsi     # 0x45c1d
movb $0x0, %al
callq 0x3170
jmp 0x21d99
jmp 0x21d9b
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x21b23
jmp 0x21dae
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)