// File: /workspace/github_c_makefile_star2_O3/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 0x1a9e4
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x1a9e5
movq 0x8(%rdx), %r15
movl 0x10(%rdx), %ebp
movq %rdx, %rdi
callq 0x5cbe
movq %rax, %r8
jmp 0x1a9f1
retq
leaq 0x53af(%rip), %r15      # 0x1fd9b
xorl %ebp, %ebp
movq %r15, %r8
movq (%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r9
leaq 0x15ff9(%rip), %rdi     # 0x309fc
movq %r15, %rsi
movl %ebp, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x3100
movzwl 0x18(%rbx), %eax
testb $0x4, %al
je 0x1aa2c
leaq 0x15ffc(%rip), %rdi     # 0x30a1d
xorl %eax, %eax
callq 0x3100
movzwl 0x18(%rbx), %eax
testb $0x40, %al
je 0x1aa42
leaq 0x15ff1(%rip), %rdi     # 0x30a28
xorl %eax, %eax
callq 0x3100
movzwl 0x18(%rbx), %eax
movzwl %ax, %eax
testb $0x20, %al
jne 0x1aa68
andl $0x3, %eax
leaq 0x15f4d(%rip), %rcx     # 0x309a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x1c(%rbx), %esi
leaq 0x15fdf(%rip), %rdi     # 0x30a45
jmp 0x1aa9c
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x1aa7b
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
jmp 0x1aa82
leaq 0x5370(%rip), %rsi      # 0x1fdf2
leaq 0x15fa9(%rip), %rdi     # 0x30a32
xorl %eax, %eax
callq 0x3100
jmp 0x1aab9
movl 0x20(%rbx), %esi
leaq 0x15fb1(%rip), %rdi     # 0x30a4d
xorl %eax, %eax
callq 0x3100
jmp 0x1aab9
movl 0x1c(%rbx), %edx
movl 0x20(%rbx), %esi
leaq 0x15fa4(%rip), %rdi     # 0x30a56
xorl %eax, %eax
callq 0x3100
movzwl 0x18(%rbx), %eax
testb $0x8, %al
je 0x1aad3
leaq 0x15f9d(%rip), %rdi     # 0x30a65
xorl %eax, %eax
callq 0x3100
movzwl 0x18(%rbx), %eax
testb $0x10, %al
je 0x1aae5
leaq 0x15f94(%rip), %rdi     # 0x30a72
xorl %eax, %eax
callq 0x3100
movl 0x24(%rbx), %esi
leaq 0x15f90(%rip), %rdi     # 0x30a7f
xorl %eax, %eax
callq 0x3100
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3040