// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Uno/Src/uno_generic.c
// Function: dfs_generic
void
dfs_generic(State *s)
{	GenStack *g;
	Trans *t;
	SymRef *r;
	treenode *exp = ZT;
	int any_added = 0;

	if (!s || !s->n) return;

	depth++;

	if (debug)
	{	printf("%3d: dfs %s:%d: <%s>\t",
			depth,
			s->n->hdr.fnm,
			s->n->hdr.line,
			x_stmnt(s->n));
		if (s->n->hdr.type == TN_IF)
			dump_defuse(((if_node *)s->n)->cond->hdr.defuse, stdout);
		else
			dump_defuse(s->n->hdr.defuse, stdout);
		printf("\n");
		if (gen_stack)
		for (r = gen_stack->symrefs; r; r = r->nxt)
			printf("\tGenStack %s %d\n", r->sm->nme->str, r->status);

	}

	if (s->iscond && s->n)
	exp = (s->n->hdr.type == TN_IF) ? ((if_node *)s->n)->cond : s->n;

	any_added = gen_push(s);	/* checks symrefs to state snapshot -- updates snapshot*/
	g = gen_stack;
	g->e = exp?exp:s->n;

	path_ends = !(s->succ && s->succ->branch);

	user_val = 0;
	user_name = "";
	exec_prop(uno_prop, g->e);	/* can modify uno_state/symrefs */

	if (g->uno_state >= (int) sizeof(unsigned long)*8)
	{	fprintf(stderr, "uno: too many states in property (max %d)\n",
			(int) sizeof(unsigned long)*8 - 1);
		exit(1);
	}

	if (debug)
		printf("\t%s = %d (stack) %lu (state-bits)\n",
			statename,
			g->uno_state,
			s->uno_state);

	if (any_added == 0 && (s->uno_state & (1 << g->uno_state)))
	{	if (s->visited)
		{	if (debug) printf("\told\n");
			goto pop;
		} else
		{	if (debug) printf("\tnew\n");
		}
	} else
	{	if (debug)
			printf("\t%s\n", s->visited?"revisit":"new");
	}
	s->uno_state |= (1<<g->uno_state);	/* updates uno_state snapshot */
	s->visited = 1;

	for (t = s->succ; t && t->branch; t = t->nxt)
		if (!infeasible(exp, t->cond))	/* e.g. 0 == _true_ */
		{	g->c = t->cond;
			dfs_generic(t->branch);
		}

pop:	gen_pop(g);

	if (debug)
	{	printf("%3d: dfs up\n", depth);
		if (gen_stack)
		for (r = gen_stack->symrefs; r; r = r->nxt)
			printf("\tGenStack %s %d\n", r->sm->nme->str, r->status);
	}
	
	depth--;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1d5b5
movq %rdi, %r15
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x1d5b5
leaq 0x52a0b(%rip), %r13     # 0x6fe38
incl (%r13)
cmpw $0x0, 0x48(%r15)
je 0x1d445
cmpl $0x1b, 0x1c(%rbx)
jne 0x1d447
movq 0x40(%rbx), %rbx
jmp 0x1d447
xorl %ebx, %ebx
movq 0x6362a(%rip), %r14     # 0x80a78
testq %r14, %r14
je 0x1d460
movq 0x20(%r14), %rax
movq %rax, 0x6361a(%rip)     # 0x80a78
jmp 0x1d46d
movl $0x28, %edi
callq 0x61a1
movq %rax, %r14
movq 0x635e4(%rip), %rax     # 0x80a58
movb $0x1, %bpl
testq %rax, %rax
je 0x1d4e7
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%r14)
movq (%rax), %r12
testq %r12, %r12
je 0x1d4e7
xorl %ebp, %ebp
movl $0x1, %r13d
movq %r15, %rdi
movq %r12, %rsi
callq 0x14498
testl %eax, %eax
cmovnel %r13d, %ebp
movq (%r12), %rdi
callq 0x1439c
movl 0x10(%r12), %ecx
movl %ecx, 0x10(%rax)
movl 0x14(%r12), %ecx
movl %ecx, 0x14(%rax)
movq 0x8(%r12), %rcx
movq %rcx, 0x8(%rax)
movq (%r14), %rcx
movq %rcx, 0x18(%rax)
movq %rax, (%r14)
movq 0x18(%r12), %r12
testq %r12, %r12
jne 0x1d493
testl %ebp, %ebp
sete %bpl
leaq 0x52951(%rip), %r13     # 0x6fe38
movq 0x6356a(%rip), %rax     # 0x80a58
movq %rax, 0x20(%r14)
movq %r14, 0x6355f(%rip)     # 0x80a58
movq %rbx, %rsi
testq %rbx, %rbx
jne 0x1d504
movq (%r15), %rsi
movq %rsi, 0x10(%r14)
movq 0x50(%r15), %rcx
testq %rcx, %rcx
je 0x1d51d
xorl %eax, %eax
cmpq $0x0, 0x10(%rcx)
sete %al
jmp 0x1d522
movl $0x1, %eax
movl %eax, 0x6353c(%rip)     # 0x80a64
leaq 0x52969(%rip), %rax     # 0x6fe98
movq (%rax), %rdi
callq 0x1d61a
movl 0x8(%r14), %ecx
cmpl $0x40, %ecx
jge 0x1d615
testb %bpl, %bpl
je 0x1d5c4
movl $0x1, %eax
shll %cl, %eax
cltq
testq %rax, 0x40(%r15)
je 0x1d5c4
cmpw $0x0, 0x4a(%r15)
je 0x1d5c4
movq (%r14), %rdi
callq 0x142e9
movq %rax, (%r14)
movl $0x0, 0x8(%r14)
xorl %edi, %edi
cmpq $0x0, 0x634db(%rip)     # 0x80a58
setne %dil
leaq 0x13e96(%rip), %rsi     # 0x3141e
callq 0x13f8c
movq 0x634c4(%rip), %rax     # 0x80a58
movq 0x20(%rax), %rax
movq %rax, 0x634b9(%rip)     # 0x80a58
movq 0x634d2(%rip), %rax     # 0x80a78
movq %rax, 0x20(%r14)
movq %r14, 0x634c7(%rip)     # 0x80a78
decl (%r13)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
shll %cl, %eax
cltq
orq %rax, 0x40(%r15)
movw $0x1, 0x4a(%r15)
movq 0x50(%r15), %r15
testq %r15, %r15
je 0x1d560
cmpq $0x0, 0x10(%r15)
je 0x1d560
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x14523
testl %eax, %eax
jne 0x1d60f
movq (%r15), %rax
movq %rax, 0x18(%r14)
movq 0x10(%r15), %rdi
callq 0x1d403
movq 0x18(%r15), %r15
jmp 0x1d5dc
callq 0x44f4