// File: /workspace/github_c_makefile_star2_O0/nimble-code[P]Uno/Src/uno_intervals.c
// Function: merge_bounds
int
merge_bounds(ArBound *a, ArBound *b)	/* rewrite a as (a/\b)  FIX! */
{	/* returns 1 if nothing   changed */
	/* returns 0 if something changed */

	if (debug>1)
	{	printf("merge_bounds\n");
		explain_bound("a:", a, ZT);
		explain_bound("b:", b, ZT);
	}
	uno_assert(!(a->bounds & UNK), "merging unknown a");
	uno_assert(!(b->bounds & UNK), "merging unknown b");
	uno_assert(!(b->bounds & DUP), "merging dup b");

	if (a->bounds & DUP)
	{	if (debug>1) printf("	a was dup, now unknown\n");
		a->bounds |= UNK;	/* fixable dups were resolved before we got here */
		return 0;
	}

	if (first_inside_second(a, b))
	{	if (debug>1) printf("	a inside b\n");
		return 1;
	}
	if (first_inside_second(b, a))
	{	if (debug>1) printf("	b inside a\n");
		copy_bound(a, b);
		return 0;
	}

	and_bounds(a, b);

	if (debug>1)
	{	printf("result of AND:\n");
		explain_bound("a:", a, ZT);
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpl $0x1, 0x67fe9(%rip)     # 0x96b80
jle 0x2ebcf
leaq 0x180f3(%rip), %rdi     # 0x46c93
movb $0x0, %al
callq 0x30f0
movq -0x10(%rbp), %rsi
leaq 0x180ef(%rip), %rdi     # 0x46ca1
xorl %eax, %eax
movl %eax, %edx
callq 0x2b960
movq -0x18(%rbp), %rsi
leaq 0x180de(%rip), %rdi     # 0x46ca4
xorl %eax, %eax
movl %eax, %edx
callq 0x2b960
movq -0x10(%rbp), %rax
movswl 0x18(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x180b9(%rip), %rsi     # 0x46ca7
callq 0x1fde0
movq -0x18(%rbp), %rax
movswl 0x18(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x180a7(%rip), %rsi     # 0x46cb9
callq 0x1fde0
movq -0x18(%rbp), %rax
movswl 0x18(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x18095(%rip), %rsi     # 0x46ccb
callq 0x1fde0
movq -0x10(%rbp), %rax
movswl 0x18(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x2ec7d
cmpl $0x1, 0x67f2e(%rip)     # 0x96b80
jle 0x2ec62
leaq 0x1807e(%rip), %rdi     # 0x46cd9
movb $0x0, %al
callq 0x30f0
movq -0x10(%rbp), %rax
movswl 0x18(%rax), %ecx
orl $0x4, %ecx
movw %cx, 0x18(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x2ed2d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2e4c0
cmpl $0x0, %eax
je 0x2ecaf
cmpl $0x1, 0x67eea(%rip)     # 0x96b80
jle 0x2eca6
leaq 0x18053(%rip), %rdi     # 0x46cf2
movb $0x0, %al
callq 0x30f0
movl $0x1, -0x4(%rbp)
jmp 0x2ed2d
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2e4c0
cmpl $0x0, %eax
je 0x2ecee
cmpl $0x1, 0x67eb8(%rip)     # 0x96b80
jle 0x2ecd8
leaq 0x1802e(%rip), %rdi     # 0x46cff
movb $0x0, %al
callq 0x30f0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2ed40
movl $0x0, -0x4(%rbp)
jmp 0x2ed2d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2edb0
cmpl $0x1, 0x67e7e(%rip)     # 0x96b80
jle 0x2ed26
leaq 0x18001(%rip), %rdi     # 0x46d0c
movb $0x0, %al
callq 0x30f0
movq -0x10(%rbp), %rsi
leaq 0x17f84(%rip), %rdi     # 0x46ca1
xorl %eax, %eax
movl %eax, %edx
callq 0x2b960
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)