// File: /workspace/github_c_makefile_star2_O0/nimble-code[P]Uno/Src/uno_generic.c
// Function: dosel
static int
dosel(treenode *m, char *nm, int allow, int forbid, int which)	/* 1:select, 2:unselect */
{	SymRef *s;
	SymList *r;
	treenode *n;
	int nonempty = 0;

	n = (m && m->hdr.type == TN_IF) ? ((if_node *)m)->cond : m;

	if (n && n->hdr.defuse)
	for (r = n->hdr.defuse->other; r; r = r->nxt)
		r->selected = 0;
	if (gen_stack)
	for (s = gen_stack->symrefs; s; s = s->nxt)
		s->status &= ~SELECTED;

	if (n && n->hdr.defuse)
	for (r = n->hdr.defuse->other; r; r = r->nxt)
	{	if (debug)
		printf(">> select saw: %s mark=%d\n",
			r->sm->nme->str, r->mark);

		if (strlen(nm) > 0
		&&  strcmp(nm, r->sm->nme->str) != 0)
			continue;

		switch (which) {
		case 1:	/* select */
			if ((r->mark & allow)
			&& !(r->mark & forbid))
			{	r->selected = 1;
				nonempty = 1;
			}
			break;

		case 2:	/* unselect */
			if (r->selected)
			{	if ((r->mark & allow)
				&& !(r->mark & forbid))
					r->selected = 0;
				else
					nonempty = 1;
			}
			break;
	}	}

	return nonempty;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl $0x0, -0x3c(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x31fe0
movq -0x8(%rbp), %rax
cmpl $0x1b, 0x1c(%rax)
jne 0x31fe0
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x31fe8
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x32033
movq -0x38(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x32033
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x32031
movq -0x30(%rbp), %rax
movl $0x0, (%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x32012
jmp 0x32033
cmpq $0x0, 0x64b9d(%rip)     # 0x96bd8
je 0x32072
movq 0x64b94(%rip), %rax     # 0x96bd8
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x32070
movq -0x28(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0xfeffffff, %ecx       # imm = 0xFEFFFFFF
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x3204b
jmp 0x32072
cmpq $0x0, -0x38(%rbp)
je 0x321a2
movq -0x38(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x321a2
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x321a0
cmpl $0x0, 0x64b3a(%rip)     # 0x96be8
je 0x320d5
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rax
movl 0x4(%rax), %edx
leaq 0x152fd(%rip), %rdi     # 0x473cb
movb $0x0, %al
callq 0x30f0
movq -0x10(%rbp), %rdi
callq 0x30c0
cmpq $0x0, %rax
jbe 0x32107
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x3160
cmpl $0x0, %eax
je 0x32107
jmp 0x3218f
movl -0x1c(%rbp), %eax
movl %eax, -0x4c(%rbp)
subl $0x1, %eax
je 0x3211e
jmp 0x32114
movl -0x4c(%rbp), %eax
subl $0x2, %eax
je 0x3214f
jmp 0x3218d
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
andl -0x14(%rbp), %eax
cmpl $0x0, %eax
je 0x3214d
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
andl -0x18(%rbp), %eax
cmpl $0x0, %eax
jne 0x3214d
movq -0x30(%rbp), %rax
movl $0x1, (%rax)
movl $0x1, -0x3c(%rbp)
jmp 0x3218d
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x3218b
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
andl -0x14(%rbp), %eax
cmpl $0x0, %eax
je 0x32182
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
andl -0x18(%rbp), %eax
cmpl $0x0, %eax
jne 0x32182
movq -0x30(%rbp), %rax
movl $0x0, (%rax)
jmp 0x32189
movl $0x1, -0x3c(%rbp)
jmp 0x3218b
jmp 0x3218d
jmp 0x3218f
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x3209c
jmp 0x321a2
movl -0x3c(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)