// File: /workspace/github_c_makefile_star2_O0/nimble-code[P]Uno/Src/uno_lts.c
// Function: uno_local
static void
uno_local(void)
{	Graphs *g;
	char *z, *unof;

	if (uno_p == 4 && !localonly)
	{	z = strstr(cur_file, ".c");
		uno_assert((z != NULL), "bad filename");
		*z = '\0';

		if (working_dir != NULL)
		{	unof = emalloc(strlen(working_dir)+1+strlen(cur_file)+strlen(".uno")+1);
			sprintf(unof, "%s/%s.uno", working_dir, cur_file);
		} else
		{	unof = emalloc(strlen(cur_dir)+strlen(cur_file)+strlen(".uno")+2);
			sprintf(unof, "%s/%s.uno", cur_dir, cur_file);
		}
		*z = '.';	/* restore */
		fd_uno = fopen(unof, "w");
		uno_assert((fd_uno != NULL), "cannot create .uno file");
	}

	dfstack = (DfStack *) 0;
	curgraph = glob_decls;

	if (debug) printf("== GLOBALS\n");

	dfs_uno(glob_decls->cfg); /* collect global declarations - build lists */

	if (debug) printf("== done with GLOBALS\n");

	dfstack = (DfStack *) 0;
	dfs_reset();

	for (g = graph; g; g = g->nxt)
		if (strcmp(g->fctnm, property) == 0)
		{	uno_prop = g->cfg;
			break;
		}

	for (g = graph; g; g = g->nxt)
		if (g != glob_decls)
		{	if (debug) printf("== GEN_GRAPH %s\n", g->fctnm); fflush(stdout);
			gen_graph(g);	/* the local check */
		}

	if (uno_p == 4 && !localonly)	/* add info on globals to snapshot file */
	{	SymRef *r;
		char c;

		uno_report0(fd_uno, "G", DEF,     glob_decls->def_use);	/* global def */
		uno_report0(fd_uno, "G", DEF|USE, glob_decls->def_use);

		/* 1 - use, 2 - static, 4 - extern, 8 - def, 16 - ub4d, 32 - alias */
		/* 4: imported, !2: exported */

		for (r = globuse; r; r = r->nxt)
		{
			if (r->status & 64)
				continue;	/* fct param */

			if (r->status & 32)	/* address taken & at least once */
				c = 'a';
			else
			{	int stc = r->status&~128;

				if (r->status & 128)
					stc |= 8;

				switch(stc) {
				case 0:		/* normal -def -use */
				case 4:		/* extern -def -use */
					c = 'v';
					break;

				case 8:		/* normal +def -use */
				case 8|16:	/* normal +def -use +useb4def */
				case 4|8:	/* extern +def -use */
				case 4|8|16:	/* extern +def -use +useb4def */
					c = 's';
					break;

				case 1:		/* normal -def +use */
				case 1|4:	/* extern -def +use */
				case 1|16:	/* normal -def +use +useb4def */
				case 1|4|16:	/* extern -def +use +useb4def */
					c = 'u';
					break;

				case 1|8:	/* normal +def +use */
				case 1|8|16:	/* normal +def +use +useb4def */
				case 1|4|8:	/* extern +def +use */
				case 1|4|8|16:	/* extern +def +use +useb4def */
					c = 't';
					break;
#if 0
				case 4|16:	/* extern +ub4d */
				case 16:	/* normal +ub4def */
				case 2:		/* static -- no use or def */
				case 1|2:	/* static +use  -- no def */
				case 2|16:	/* static +ub4d -- no def */
				case 2|8:	/* static +def -- no use */
				case 1|2|16:	/* statis +use +ub4d -- no def */
				case 1|2|8:	/* static +use +def */
				case 2|8|16:	/* static +def +ub4d */
				case 1|2|8|16:	/* static +use +def + ub4d */
				case 2|4:	/* impossible: static + extern */
				case 1|2|4:
				case 2|4|8:
				case 2|4|16:
				case 2|4|8|16:
				case 1|2|4|16:
				case 1|2|4|8:
				case 1|2|4|8|16:
#endif
				default: /* not relevant for global analysis */
					continue;
			}	}

			fprintf(fd_uno, "%c\t%s\t%s\t%d\n",
					c, r->sm->nme->str,
					r->n->hdr.fnm,
					r->n->hdr.line);
		}
		struct_fields(fd_uno);
		/* codes "y" and "z" identify used and unused fields in structs in this file */
		uno_indirect_calls(fd_uno);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x2cbe1(%rip), %rax     # 0x4e140
cmpl $0x4, (%rax)
jne 0x216bf
leaq 0x2ce2d(%rip), %rax     # 0x4e39c
cmpl $0x0, (%rax)
jne 0x216bf
leaq 0x2cdc9(%rip), %rax     # 0x4e348
movq (%rax), %rdi
leaq 0x13734(%rip), %rsi     # 0x34cbd
callq 0x3240
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x23e89(%rip), %rsi     # 0x4542f
callq 0x1fde0
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
leaq 0x2cd6f(%rip), %rax     # 0x4e328
cmpq $0x0, (%rax)
je 0x21625
leaq 0x2cd62(%rip), %rax     # 0x4e328
movq (%rax), %rdi
callq 0x30c0
addq $0x1, %rax
movq %rax, -0x30(%rbp)
leaq 0x2cd6b(%rip), %rax     # 0x4e348
movq (%rax), %rdi
callq 0x30c0
movq -0x30(%rbp), %rdi
addq %rax, %rdi
addq $0x4, %rdi
addq $0x1, %rdi
callq 0x54c0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x2cd20(%rip), %rax     # 0x4e328
movq (%rax), %rdx
leaq 0x2cd36(%rip), %rax     # 0x4e348
movq (%rax), %rcx
leaq 0x23e20(%rip), %rsi     # 0x4543c
movb $0x0, %al
callq 0x3220
jmp 0x21685
leaq 0x2cb24(%rip), %rax     # 0x4e150
movq (%rax), %rdi
callq 0x30c0
movq %rax, -0x38(%rbp)
leaq 0x2cd09(%rip), %rax     # 0x4e348
movq (%rax), %rdi
callq 0x30c0
movq -0x38(%rbp), %rdi
addq %rax, %rdi
addq $0x4, %rdi
addq $0x2, %rdi
callq 0x54c0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x2cae6(%rip), %rax     # 0x4e150
movq (%rax), %rdx
leaq 0x2ccd4(%rip), %rax     # 0x4e348
movq (%rax), %rcx
leaq 0x23dbe(%rip), %rsi     # 0x4543c
movb $0x0, %al
callq 0x3220
movq -0x10(%rbp), %rax
movb $0x2e, (%rax)
movq -0x18(%rbp), %rdi
leaq 0x1356e(%rip), %rsi     # 0x34c05
callq 0x31f0
movq %rax, 0x6496d(%rip)     # 0x86010
cmpq $0x0, 0x64965(%rip)     # 0x86010
setne %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x23d8c(%rip), %rsi     # 0x45446
callq 0x1fde0
movq $0x0, 0x649c6(%rip) # 0x86090
movq 0x6490f(%rip), %rax     # 0x85fe0
movq %rax, 0x648d0(%rip)     # 0x85fa8
cmpl $0x0, 0x648f1(%rip)     # 0x85fd0
je 0x216ef
leaq 0x23d76(%rip), %rdi     # 0x4545e
movb $0x0, %al
callq 0x30f0
movq 0x648ea(%rip), %rax     # 0x85fe0
movq 0x8(%rax), %rdi
callq 0x24630
cmpl $0x0, 0x648ca(%rip)     # 0x85fd0
je 0x21716
leaq 0x23d5b(%rip), %rdi     # 0x4546a
movb $0x0, %al
callq 0x30f0
movq $0x0, 0x6496f(%rip) # 0x86090
callq 0x24b60
movq 0x6489b(%rip), %rax     # 0x85fc8
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x21774
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x2ca9a(%rip), %rax     # 0x4e1e0
movq (%rax), %rsi
callq 0x3160
cmpl $0x0, %eax
jne 0x21764
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x6489e(%rip)     # 0x86000
jmp 0x21774
jmp 0x21766
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x21731
movq 0x6484d(%rip), %rax     # 0x85fc8
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x217d9
movq -0x8(%rbp), %rax
cmpq 0x6484f(%rip), %rax     # 0x85fe0
je 0x217c9
cmpl $0x0, 0x64836(%rip)     # 0x85fd0
je 0x217b1
movq -0x8(%rbp), %rax
movq (%rax), %rsi
leaq 0x23cd6(%rip), %rdi     # 0x45480
movb $0x0, %al
callq 0x30f0
movq 0x2c818(%rip), %rax     # 0x4dfd0
movq (%rax), %rdi
callq 0x31b0
movq -0x8(%rbp), %rdi
callq 0x24b90
jmp 0x217cb
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x2177f
leaq 0x2c960(%rip), %rax     # 0x4e140
cmpl $0x4, (%rax)
jne 0x2194d
leaq 0x2cbac(%rip), %rax     # 0x4e39c
cmpl $0x0, (%rax)
jne 0x2194d
movq 0x64810(%rip), %rdi     # 0x86010
movq 0x647d9(%rip), %rax     # 0x85fe0
movq 0x18(%rax), %rcx
leaq 0x2235a(%rip), %rsi     # 0x43b6c
movl $0x1, %edx
callq 0x24cb0
movq 0x647ed(%rip), %rdi     # 0x86010
movq 0x647b6(%rip), %rax     # 0x85fe0
movq 0x18(%rax), %rcx
leaq 0x22337(%rip), %rsi     # 0x43b6c
movl $0x5, %edx
callq 0x24cb0
movq 0x647aa(%rip), %rax     # 0x85ff0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x21935
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x21869
jmp 0x21924
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x2187e
movb $0x61, -0x21(%rbp)
jmp 0x218e4
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x218a7
movl -0x28(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq %rax, -0x40(%rbp)
subq $0x1d, %rax
ja 0x218e0
movq -0x40(%rbp), %rax
leaq 0x234a1(%rip), %rcx     # 0x44d60
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x76, -0x21(%rbp)
jmp 0x218e2
movb $0x73, -0x21(%rbp)
jmp 0x218e2
movb $0x75, -0x21(%rbp)
jmp 0x218e2
movb $0x74, -0x21(%rbp)
jmp 0x218e2
jmp 0x21924
jmp 0x218e4
movq 0x64725(%rip), %rdi     # 0x86010
movsbl -0x21(%rbp), %edx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r8
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax), %r9d
leaq 0x23b74(%rip), %rsi     # 0x45491
movb $0x0, %al
callq 0x3170
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2184a
movq 0x646d4(%rip), %rdi     # 0x86010
callq 0x6640
movq 0x646c8(%rip), %rdi     # 0x86010
callq 0x24d40
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)