// File: /workspace/github_c_makefile_star2_O2/nimble-code[P]Uno/Src/uno_bounds.c
// Function: explain_bound
void
explain_bound(char *m, ArBound *b, treenode *n)
{
	if (!b) return;

	if (0)
	{	printf("{");
		if (b->bounds & UNK) printf("U");
		if (b->bounds & DUP) printf("(%s:%s)",
			b->s->nme->str,
			b->sameas->nme->str);
		if (b->bounds & NEG) printf("!");
		if ((b->bounds & LB)
		&&  (b->bounds & UB)
		&&  (b->lb == b->ub-1))
			printf("(%s==%d)", b->s->nme->str, b->lb);
		else
		{	if (b->bounds & LB)  printf("(%s>=%d)", b->s->nme->str, b->lb);
			if (b->bounds & UB)  printf("(%s<%d)",  b->s->nme->str, b->ub);
		}
		if (b->bounds & FROMASGN) printf("a");
		if (b->bounds & FROMEXPR) printf("e");
		printf("}");
		return;
	}

	printf("\tuno: %s:%d (%s) %s bound on %s:",
		n?n->hdr.fnm:"",
		n?n->hdr.line:0,
		m,
		n?x_stmnt(n):"",
		b->s->nme->str);

	if (b->bounds & UNK)
		printf(" <unknown>");
	if (b->bounds & NEG)
		printf("<negated>");
	if (b->bounds & DUP)
		printf(" <duplicate of %s>", b->sameas?b->sameas->nme->str:"?");
	else
	{	switch (b->bounds & (LB|UB)) {
		case UB:
			printf("UB < %d", b->ub);
			break;
		case LB:
			printf("LB >= %d", b->lb);
			break;
		case (LB|UB):
			printf(">= %d and < %d", b->lb, b->ub);
			break;
		}
	}
	if (b->bounds & FROMASGN)
		printf(" (from asgn)");
	if (b->bounds & FROMEXPR)
		printf(" (from expr)");

	printf(" set at level %d", b->level_set);
	printf("\n");
}

// Assembly:
testq %rsi, %rsi
je 0x187b3
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x187b4
movq 0x8(%rdx), %r15
movl 0x10(%rdx), %ebp
movq %rdx, %rdi
callq 0x4ac7
movq %rax, %r8
jmp 0x187c0
retq
leaq 0x55e0(%rip), %r15      # 0x1dd9b
xorl %ebp, %ebp
movq %r15, %r8
movq (%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r9
leaq 0x1625e(%rip), %rdi     # 0x2ea30
movq %r15, %rsi
movl %ebp, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x3100
movzwl 0x18(%rbx), %eax
testb $0x4, %al
je 0x187fb
leaq 0x16261(%rip), %rdi     # 0x2ea51
xorl %eax, %eax
callq 0x3100
movzwl 0x18(%rbx), %eax
testb $0x40, %al
je 0x18811
leaq 0x16256(%rip), %rdi     # 0x2ea5c
xorl %eax, %eax
callq 0x3100
movzwl 0x18(%rbx), %eax
movzwl %ax, %eax
testb $0x20, %al
jne 0x18837
andl $0x3, %eax
leaq 0x161b2(%rip), %rcx     # 0x2e9d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x1c(%rbx), %esi
leaq 0x16244(%rip), %rdi     # 0x2ea79
jmp 0x1886b
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x1884a
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
jmp 0x18851
leaq 0x55a1(%rip), %rsi      # 0x1ddf2
leaq 0x1620e(%rip), %rdi     # 0x2ea66
xorl %eax, %eax
callq 0x3100
jmp 0x18888
movl 0x20(%rbx), %esi
leaq 0x16216(%rip), %rdi     # 0x2ea81
xorl %eax, %eax
callq 0x3100
jmp 0x18888
movl 0x1c(%rbx), %edx
movl 0x20(%rbx), %esi
leaq 0x16209(%rip), %rdi     # 0x2ea8a
xorl %eax, %eax
callq 0x3100
movzwl 0x18(%rbx), %eax
testb $0x8, %al
je 0x188a2
leaq 0x16202(%rip), %rdi     # 0x2ea99
xorl %eax, %eax
callq 0x3100
movzwl 0x18(%rbx), %eax
testb $0x10, %al
je 0x188b4
leaq 0x161f9(%rip), %rdi     # 0x2eaa6
xorl %eax, %eax
callq 0x3100
movl 0x24(%rbx), %esi
leaq 0x161f5(%rip), %rdi     # 0x2eab3
xorl %eax, %eax
callq 0x3100
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3040