// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/operator.c
// Function: modify_operator
BOOLEAN modify_operator(bayesiangraphptr mygraph)
{
/*!Last Changed 02.03.2001*/
 int arc_no, from, to, from_order;
 double before, after;
 arc_no = myrand() % mygraph->arccount;
 before = likelihood_of_data(mygraph, cv);
 modify_one_arc(mygraph, arc_no, &from, &to, &from_order);
 free_2d((void **) mygraph->nodes[to].table, mygraph->nodes[to].table_count);
 free_2d((void **) mygraph->nodes[from].table, mygraph->nodes[from].table_count);
 delete_parent_counts(&mygraph->nodes[to], from_order);
 add_parent_counts(mygraph, &mygraph->nodes[from], to);
 make_one_conditional_table(mygraph, to);
 make_one_conditional_table(mygraph, from);
 if (!cycle_now(mygraph, from, to))
  {
   after = likelihood_of_data(mygraph, cv);
   if (after > before)
     return BOOLEAN_TRUE;
  }
 modify_one_arc(mygraph, arc_no, &from, &to, &from_order);
 free_2d((void **) mygraph->nodes[to].table, mygraph->nodes[to].table_count);
 free_2d((void **) mygraph->nodes[from].table, mygraph->nodes[from].table_count);
 delete_parent_counts(&mygraph->nodes[to], from_order);
 add_parent_counts(mygraph, &mygraph->nodes[from], to);
 make_one_conditional_table(mygraph, to);
 make_one_conditional_table(mygraph, from);
 return BOOLEAN_FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
xorl %eax, %eax
callq 0x35c7f
cltd
idivl 0x20(%r14)
movl %edx, %ebp
leaq 0x80cf0(%rip), %rbx     # 0xcd4c8
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x23f34
movsd %xmm0, 0x10(%rsp)
leaq 0xc(%rsp), %r15
leaq 0x8(%rsp), %r12
leaq 0x4(%rsp), %r13
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
callq 0x47480
movq 0x8(%r14), %rax
movslq (%r12), %rcx
imulq $0x48, %rcx, %rcx
movq 0x38(%rax,%rcx), %rdi
movl 0x28(%rax,%rcx), %esi
callq 0x34fc3
movq 0x8(%r14), %rax
movslq (%r15), %rcx
imulq $0x48, %rcx, %rcx
movq 0x38(%rax,%rcx), %rdi
movl 0x28(%rax,%rcx), %esi
callq 0x34fc3
movslq (%r12), %rax
imulq $0x48, %rax, %rdi
addq 0x8(%r14), %rdi
movl (%r13), %esi
callq 0x4768d
movslq (%r15), %rax
imulq $0x48, %rax, %rsi
addq 0x8(%r14), %rsi
movl (%r12), %edx
movq %r14, %rdi
callq 0x476d6
movl (%r12), %esi
movq %r14, %rdi
callq 0x48183
movl (%r15), %esi
movq %r14, %rdi
callq 0x48183
movl (%r15), %esi
movl (%r12), %edx
movq %r14, %rdi
callq 0x47ac0
testl %eax, %eax
jne 0x4c8b7
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x23f34
ucomisd 0x10(%rsp), %xmm0
jbe 0x4c8b7
pushq $0x1
popq %rax
jmp 0x4c951
leaq 0xc(%rsp), %r15
leaq 0x8(%rsp), %r12
leaq 0x4(%rsp), %r13
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
callq 0x47480
movq 0x8(%r14), %rax
movslq (%r12), %rcx
imulq $0x48, %rcx, %rcx
movq 0x38(%rax,%rcx), %rdi
movl 0x28(%rax,%rcx), %esi
callq 0x34fc3
movq 0x8(%r14), %rax
movslq (%r15), %rcx
imulq $0x48, %rcx, %rcx
movq 0x38(%rax,%rcx), %rdi
movl 0x28(%rax,%rcx), %esi
callq 0x34fc3
movslq (%r12), %rax
imulq $0x48, %rax, %rdi
addq 0x8(%r14), %rdi
movl (%r13), %esi
callq 0x4768d
movslq (%r15), %rax
imulq $0x48, %rax, %rsi
addq 0x8(%r14), %rsi
movl (%r12), %edx
movq %r14, %rdi
callq 0x476d6
movl (%r12), %esi
movq %r14, %rdi
callq 0x48183
movl (%r15), %esi
movq %r14, %rdi
callq 0x48183
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq