// File: /workspace/github_c_makefile_star2_O1/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 0x1b318
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x1b319
movq 0x8(%rdx), %r15
jmp 0x1b320
retq
leaq 0x4a9b(%rip), %r15      # 0x1fdbb
testq %rdx, %rdx
je 0x1b32a
movl 0x10(%rdx), %ebp
jmp 0x1b32c
xorl %ebp, %ebp
testq %rdx, %rdx
je 0x1b33e
movq %rdx, %rdi
callq 0x5e8a
movq %rax, %r8
jmp 0x1b345
leaq 0x4a76(%rip), %r8       # 0x1fdbb
movq (%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r9
leaq 0x156cd(%rip), %rdi     # 0x30a24
movq %r15, %rsi
movl %ebp, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x3100
testb $0x4, 0x18(%rbx)
je 0x1b37a
leaq 0x156d2(%rip), %rdi     # 0x30a45
xorl %eax, %eax
callq 0x3100
testb $0x40, 0x18(%rbx)
je 0x1b38e
leaq 0x156c9(%rip), %rdi     # 0x30a50
xorl %eax, %eax
callq 0x3100
movzwl 0x18(%rbx), %eax
testb $0x20, %al
jne 0x1b3b5
andl $0x3, %eax
leaq 0x15628(%rip), %rcx     # 0x309c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x1c(%rbx), %esi
leaq 0x156ba(%rip), %rdi     # 0x30a6d
jmp 0x1b3e9
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x1b3c8
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
jmp 0x1b3cf
leaq 0x4a43(%rip), %rsi      # 0x1fe12
leaq 0x15684(%rip), %rdi     # 0x30a5a
xorl %eax, %eax
callq 0x3100
jmp 0x1b406
movl 0x20(%rbx), %esi
leaq 0x1568c(%rip), %rdi     # 0x30a75
xorl %eax, %eax
callq 0x3100
jmp 0x1b406
movl 0x1c(%rbx), %edx
movl 0x20(%rbx), %esi
leaq 0x1567f(%rip), %rdi     # 0x30a7e
xorl %eax, %eax
callq 0x3100
testb $0x8, 0x18(%rbx)
je 0x1b41a
leaq 0x1567a(%rip), %rdi     # 0x30a8d
xorl %eax, %eax
callq 0x3100
testb $0x10, 0x18(%rbx)
je 0x1b42e
leaq 0x15673(%rip), %rdi     # 0x30a9a
xorl %eax, %eax
callq 0x3100
movl 0x24(%rbx), %esi
leaq 0x1566f(%rip), %rdi     # 0x30aa7
xorl %eax, %eax
callq 0x3100
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3040