// File: /workspace/github_c_makefile_star2_O0/nimble-code[P]Uno/Src/uno_bounds.c
// Function: gather_bounds
static void
gather_bounds(State *z)
{	ArBound *a, *b;
	SymList *s;
	treenode *e;
	int hit;

	if (!z) return;

	if (debug>1)
	{	if (z->n && z->n->hdr.defuse)
		{	printf("	defuse on last step: ");
			dump_defuse(z->n->hdr.defuse, stdout);
			printf("\n");
		}
		for (b = bounded; b; b = b->nxt)
			explain_bound("gather", b, z->n);
	}

	if (z->n && z->n->hdr.type == TN_IF)
		e = ((if_node *)z->n)->cond;
	else
		e = z->n;

	if (e && e->hdr.defuse)
	for (s = e->hdr.defuse->other; s; s = s->nxt)
	{	if (!(s->mark & DEF))	/* set, so must have added bound FROMASGN or INCR... */
			continue;
if (debug)
printf("UU: saw def on %s\n", s->sm->nme->str);

		for (b = bounded; b; b = b->nxt)
		{
if (debug)
printf("UU:	check with bound on %s %d,%d [%d] (set at level %d)\n",
	b->s->nme->str,
	b->lb, b->ub, b->bounds,
	b->level_set);
			if (strcmp(b->s->nme->str, s->sm->nme->str) == 0
#if 1
			&&  b->level_set < depth
#else
			&& (b->bounds & FROMEXPR)
#endif
			)
				b->bounds |= UNK;	/* no longer valid */
		}
		for (b = boundstack->curbounds; b; b = b->nxt)
		{
if (debug)
printf("UU:	previous bound on %s %d,%d [%d] (set at level %d)\n",
	b->s->nme->str,
	b->lb, b->ub, b->bounds,
	b->level_set);
			if (strcmp(b->s->nme->str, s->sm->nme->str) == 0)
			{
if (debug)
printf("UU:	now expired\n");
				b->bounds |= UNK;	/* all previous bounds expire */
			}
		}
	}

	for (b = bounded; b; b = b->nxt)	/* save bounds on stack */
	{	hit = 0;
		if ((b->bounds & FROMASGN)
		||  (b->bounds & UNK))
		{	for (a = boundstack->curbounds; a; a = a->nxt)
				if (a->s == b->s)
					a->bounds |= UNK;	/* remove */
		} else	/* FROMEXPR */
		{	for (a = boundstack->curbounds; a; a = a->nxt)
				if (a->s == b->s)
				{	merge_bounds(a, b);	/* rewrites a as (a/\b) */
					hit = 1;
		}		}

		if (!hit)
		{	a = loose_bound(b->s, b->lb, b->ub, b->bounds);	/* add new bound */
			a->sameas = b->sameas;				/* even if UNK */
			a->dup = b->dup;
			a->nxt = boundstack->curbounds;
			a->level_set = b->level_set;
			boundstack->curbounds = a;

			if (debug>1)
			explain_bound("attach", b, e);
		}
	}

	uno_dumpbounds(bounded);	/* forget all bounds for next step */
	bounded = (ArBound *) 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x2d6b8
jmp 0x2db11
cmpl $0x1, 0x69499(%rip)     # 0x96b58
jle 0x2d74c
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2d713
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x2d713
leaq 0x19317(%rip), %rdi     # 0x469fb
movb $0x0, %al
callq 0x30f0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rdi
movq 0x208d3(%rip), %rax     # 0x4dfd0
movq (%rax), %rsi
callq 0x1a7b0
leaq 0x17033(%rip), %rdi     # 0x4473f
movb $0x0, %al
callq 0x30f0
movq 0x69426(%rip), %rax     # 0x96b40
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2d74a
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rax
movq (%rax), %rdx
leaq 0x192db(%rip), %rdi     # 0x46a12
callq 0x2b960
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2d71e
jmp 0x2d74c
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2d774
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpl $0x1b, 0x1c(%rax)
jne 0x2d774
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x40(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x2d77f
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2d97c
movq -0x28(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x2d97c
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2d97a
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x2d7c8
jmp 0x2d969
cmpl $0x0, 0x69389(%rip)     # 0x96b58
je 0x2d7ef
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
leaq 0x19231(%rip), %rdi     # 0x46a19
movb $0x0, %al
callq 0x30f0
movq 0x6934a(%rip), %rax     # 0x96b40
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2d8a7
cmpl $0x0, 0x6934c(%rip)     # 0x96b58
je 0x2d84a
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x20(%rax), %edx
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x18(%rbp), %rax
movswl 0x18(%rax), %r8d
movq -0x18(%rbp), %rax
movl 0x24(%rax), %r9d
leaq 0x191e9(%rip), %rdi     # 0x46a2c
movb $0x0, %al
callq 0x30f0
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 0x2d894
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
leaq 0x58717(%rip), %rcx     # 0x85f98
cmpl (%rcx), %eax
jge 0x2d894
movq -0x18(%rbp), %rax
movswl 0x18(%rax), %ecx
orl $0x4, %ecx
movw %cx, 0x18(%rax)
jmp 0x2d896
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2d7fa
movq 0x692ba(%rip), %rax     # 0x96b68
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2d967
cmpl $0x0, 0x69291(%rip)     # 0x96b58
je 0x2d905
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x20(%rax), %edx
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x18(%rbp), %rax
movswl 0x18(%rax), %r8d
movq -0x18(%rbp), %rax
movl 0x24(%rax), %r9d
leaq 0x19167(%rip), %rdi     # 0x46a65
movb $0x0, %al
callq 0x30f0
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 0x2d954
cmpl $0x0, 0x69223(%rip)     # 0x96b58
je 0x2d945
leaq 0x1915e(%rip), %rdi     # 0x46a9c
movb $0x0, %al
callq 0x30f0
movq -0x18(%rbp), %rax
movswl 0x18(%rax), %ecx
orl $0x4, %ecx
movw %cx, 0x18(%rax)
jmp 0x2d956
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2d8b5
jmp 0x2d969
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2d7a9
jmp 0x2d97c
movq 0x691bd(%rip), %rax     # 0x96b40
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2dafa
movl $0x0, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movswl 0x18(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x2d9b9
movq -0x18(%rbp), %rax
movswl 0x18(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x2d9ff
movq 0x691a8(%rip), %rax     # 0x96b68
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2d9fd
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x2d9ed
movq -0x10(%rbp), %rax
movswl 0x18(%rax), %ecx
orl $0x4, %ecx
movw %cx, 0x18(%rax)
jmp 0x2d9ef
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x2d9c7
jmp 0x2da4a
movq 0x69162(%rip), %rax     # 0x96b68
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2da48
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x2da38
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2eb80
movl $0x1, -0x2c(%rbp)
jmp 0x2da3a
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x2da0d
jmp 0x2da4a
cmpl $0x0, -0x2c(%rbp)
jne 0x2dae7
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movl 0x20(%rax), %esi
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %edx
movq -0x18(%rbp), %rax
movswl 0x18(%rax), %ecx
callq 0x2d310
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x690c7(%rip), %rax     # 0x96b68
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x10(%rbp), %rcx
movq 0x690a3(%rip), %rax     # 0x96b68
movq %rcx, (%rax)
cmpl $0x1, 0x69089(%rip)     # 0x96b58
jle 0x2dae5
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq 0x18fcd(%rip), %rdi     # 0x46aad
callq 0x2b960
jmp 0x2dae7
jmp 0x2dae9
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2d987
movq 0x6903f(%rip), %rdi     # 0x96b40
callq 0x2c5f0
movq $0x0, 0x6902f(%rip) # 0x96b40
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)