// File: /workspace/github_c_makefile_star2_O1/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, %rbx
xorl %eax, %eax
callq 0x39f18
cltd
idivl 0x20(%rbx)
movl %edx, %ebp
leaq 0x7f651(%rip), %r13     # 0xd24c8
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rbx, %rdi
callq 0x26bfe
movsd %xmm0, 0x10(%rsp)
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x4d26a
movq 0x8(%rbx), %rax
movslq (%r15), %rcx
leaq (%rcx,%rcx,8), %rcx
movq 0x38(%rax,%rcx,8), %rdi
movl 0x28(%rax,%rcx,8), %esi
callq 0x3915f
movq 0x8(%rbx), %rax
movslq (%r14), %rcx
leaq (%rcx,%rcx,8), %rcx
movq 0x38(%rax,%rcx,8), %rdi
movl 0x28(%rax,%rcx,8), %esi
callq 0x3915f
movslq (%r15), %rax
leaq (%rax,%rax,8), %rdi
shlq $0x3, %rdi
addq 0x8(%rbx), %rdi
movl (%r12), %esi
callq 0x4d4b0
movslq (%r14), %rax
leaq (%rax,%rax,8), %rsi
shlq $0x3, %rsi
addq 0x8(%rbx), %rsi
movl (%r15), %edx
movq %rbx, %rdi
callq 0x4d508
movl (%r15), %esi
movq %rbx, %rdi
callq 0x4e149
movl (%r14), %esi
movq %rbx, %rdi
callq 0x4e149
movl (%r14), %esi
movl (%r15), %edx
movq %rbx, %rdi
callq 0x4d9a8
testl %eax, %eax
jne 0x52f5c
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rbx, %rdi
callq 0x26bfe
movl $0x1, %eax
ucomisd 0x10(%rsp), %xmm0
ja 0x52ffa
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x4d26a
movq 0x8(%rbx), %rax
movslq (%r15), %rcx
leaq (%rcx,%rcx,8), %rcx
movq 0x38(%rax,%rcx,8), %rdi
movl 0x28(%rax,%rcx,8), %esi
callq 0x3915f
movq 0x8(%rbx), %rax
movslq (%r14), %rcx
leaq (%rcx,%rcx,8), %rcx
movq 0x38(%rax,%rcx,8), %rdi
movl 0x28(%rax,%rcx,8), %esi
callq 0x3915f
movslq (%r15), %rax
leaq (%rax,%rax,8), %rdi
shlq $0x3, %rdi
addq 0x8(%rbx), %rdi
movl (%r12), %esi
callq 0x4d4b0
movslq (%r14), %rax
leaq (%rax,%rax,8), %rsi
shlq $0x3, %rsi
addq 0x8(%rbx), %rsi
movl (%r15), %edx
movq %rbx, %rdi
callq 0x4d508
movl (%r15), %esi
movq %rbx, %rdi
callq 0x4e149
movl (%r14), %esi
movq %rbx, %rdi
callq 0x4e149
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)