// File: /workspace/github_c_makefile_star2_O0/nimble-code[P]Uno/Src/uno_generic.c
// Function: sym_add
static void
sym_add(treenode *m, int allow, int forbid)
{	SymRef *s;
	SymList *r;
	treenode *n;

	n = (m && m->hdr.type == TN_IF) ? ((if_node *)m)->cond : m;
	if (!n || !n->hdr.defuse)
	{	if (debug) printf("	symadd - nothing to add\n");
		return;
	}

	for (r = n->hdr.defuse->other; r; r = r->nxt)
	{	if (debug) printf("\tsymadd sees %s mark %d, looking for %d & !%d\n",
			r->sm->nme->str, r->mark, allow, forbid);

		if ((r->mark & allow) && !(r->mark & forbid))
		{	for (s = gen_stack->symrefs; s; s = s->nxt)
				if (strcmp(s->sm->nme->str, r->sm->nme->str) == 0
				&&  (unsigned int) s->status == r->mark)
				{	if (debug) printf("\tsymadd %s - already there\n",
						s->sm->nme->str);
					break;
				}
			if (!s)
			{	s = uno_getref(r->sm);
				s->nxt = gen_stack->symrefs;
				s->status = r->mark;
				s->n = n;
				gen_stack->symrefs = s;
				if (debug) printf("\tadded %s (line %d)\n",
					s->sm->nme->str, s->n?s->n->hdr.line:-1);
		}	}
	}
	if (debug) printf("\tsymadd - done\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x307e1
movq -0x8(%rbp), %rax
cmpl $0x1b, 0x1c(%rax)
jne 0x307e1
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x307e9
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x30803
movq -0x28(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x3081f
cmpl $0x0, 0x663de(%rip)     # 0x96be8
je 0x3081a
leaq 0x1678e(%rip), %rdi     # 0x46fa1
movb $0x0, %al
callq 0x30f0
jmp 0x309f5
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x309de
cmpl $0x0, 0x663a7(%rip)     # 0x96be8
je 0x3086f
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movl 0x4(%rax), %edx
movl -0xc(%rbp), %ecx
movl -0x10(%rbp), %r8d
leaq 0x16753(%rip), %rdi     # 0x46fbb
movb $0x0, %al
callq 0x30f0
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
andl -0xc(%rbp), %eax
cmpl $0x0, %eax
je 0x309cb
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
andl -0x10(%rbp), %eax
cmpl $0x0, %eax
jne 0x309cb
movq 0x6633c(%rip), %rax     # 0x96bd8
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3091b
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x3160
cmpl $0x0, %eax
jne 0x3090b
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x3090b
cmpl $0x0, 0x662fe(%rip)     # 0x96be8
je 0x30909
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
leaq 0x166e8(%rip), %rdi     # 0x46fea
movb $0x0, %al
callq 0x30f0
jmp 0x3091b
jmp 0x3090d
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x308a3
cmpq $0x0, -0x18(%rbp)
jne 0x309c9
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x20420
movq %rax, -0x18(%rbp)
movq 0x6629a(%rip), %rax     # 0x96bd8
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq 0x6626a(%rip), %rax     # 0x96bd8
movq %rcx, (%rax)
cmpl $0x0, 0x66270(%rip)     # 0x96be8
je 0x309c7
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x309a8
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax), %eax
movl %eax, -0x3c(%rbp)
jmp 0x309b2
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x3c(%rbp)
jmp 0x309b2
movq -0x38(%rbp), %rsi
movl -0x3c(%rbp), %edx
leaq 0x16646(%rip), %rdi     # 0x47006
movb $0x0, %al
callq 0x30f0
jmp 0x309c9
jmp 0x309cb
jmp 0x309cd
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x3082f
cmpl $0x0, 0x66203(%rip)     # 0x96be8
je 0x309f5
leaq 0x1662d(%rip), %rdi     # 0x4701b
movb $0x0, %al
callq 0x30f0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)