// File: /workspace/github_cpp_makefile_star2_O1/redpony[P]cpyp/./cpyp/crp.h
// Function: int cpyp::crp<int, std::hash<int>>::increment_no_base<cpyp::MT19937>(int const&, cpyp::MT19937&, double*)
int increment_no_base(const Dish& dish, Engine& eng, double* logq) {
    crp_table_manager<1>& loc = dish_locs_[dish];
    bool share_table = false;
    if (loc.num_customers()) {
      const double p_empty = strength_ + num_tables_ * discount_;
      const double p_share = loc.num_customers() - loc.num_tables() * discount_;
      share_table = sample_bernoulli(p_empty, p_share, eng);

      // probability of sharing a table | dish
      *logq += log((share_table ? p_share : p_empty) / (p_empty + p_share));
    }

    if (share_table) {
      const unsigned selected_table_prevcount = loc.share_table(discount_, eng);
      // probability of picking this particlar table to share | dish
      *logq += log((selected_table_prevcount - discount_) /
                  (loc.num_customers() - 1 - loc.num_tables() * discount_));
      update_llh_add_customer_to_table_seating(selected_table_prevcount);
    } else {
      update_llh_add_customer_to_table_seating(0);
      loc.create_table();
      ++num_tables_;
    }
    ++num_customers_;
    return (share_table ? 0 : 1);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r12
movq %rdx, %rbp
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x69ca
movq %rax, %r15
movq %rax, %r14
movl (%rax), %eax
testl %eax, %eax
je 0x50f5
movl (%rbx), %ecx
cvtsi2sd %rcx, %xmm1
movsd 0x40(%rbx), %xmm0
mulsd %xmm0, %xmm1
addsd 0x48(%rbx), %xmm1
movapd %xmm1, %xmm3
movsd %xmm1, 0x18(%rsp)
movl %eax, %eax
cvtsi2sd %rax, %xmm2
movl 0x4(%r14), %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
mulsd %xmm0, %xmm1
subsd %xmm1, %xmm2
movsd %xmm2, 0x20(%rsp)
addsd %xmm2, %xmm3
movsd %xmm3, 0x10(%rsp)
movq %rbp, %rdi
callq 0x78bf
movsd 0x10(%rsp), %xmm3
movsd 0x18(%rsp), %xmm2
movapd %xmm2, %xmm1
divsd %xmm3, %xmm1
ucomisd %xmm1, %xmm0
movsd 0x20(%rsp), %xmm0
seta %r13b
ja 0x50de
movapd %xmm2, %xmm0
divsd %xmm3, %xmm0
callq 0x2150
addsd (%r12), %xmm0
movsd %xmm0, (%r12)
jmp 0x50f8
xorl %r13d, %r13d
testb %r13b, %r13b
je 0x5167
movsd 0x40(%rbx), %xmm0
movq %r14, %rdi
movq %rbp, %rsi
callq 0x7666
movl %eax, %ebp
movl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd 0x40(%rbx), %xmm1
movl (%r14), %eax
movl 0x4(%r14), %ecx
decl %eax
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %rcx, %xmm3
subsd %xmm1, %xmm0
mulsd %xmm1, %xmm3
subsd %xmm3, %xmm2
divsd %xmm2, %xmm0
callq 0x2150
addsd (%r12), %xmm0
movsd %xmm0, (%r12)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7700
jmp 0x521b
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7700
addq $0x8, %r15
movl $0x1, 0xc(%rsp)
cmpb $0x0, 0x81(%r14)
je 0x5196
movq (%r15), %rdi
leaq 0xc(%rsp), %rsi
callq 0x7126
jmp 0x5205
movzbl 0x80(%r14), %ecx
testq %rcx, %rcx
setne %dl
je 0x51de
cmpl $0x1, (%r15)
jne 0x51b2
movb $0x1, %dl
xorl %eax, %eax
jmp 0x51d2
leaq -0x1(%rcx), %rdx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x51dc
leaq 0x1(%rsi), %rax
cmpl $0x1, 0x10(%r14,%rsi,8)
movq %rax, %rsi
jne 0x51b8
cmpq %rcx, %rax
setb %dl
leaq (%r15,%rax,8), %rax
addq $0x4, %rax
jmp 0x51de
xorl %edx, %edx
testb %dl, %dl
jne 0x5205
cmpb $0xe, %cl
ja 0x5235
movl %ecx, %eax
shll $0x3, %eax
incl %ecx
movb %cl, 0x80(%r14)
movq $0x1, 0x8(%r14,%rax)
addq %r15, %rax
addq $0x4, %rax
incl (%rax)
movq (%r14), %xmm0
pcmpeqd %xmm1, %xmm1
psubd %xmm1, %xmm0
movq %xmm0, (%r14)
incl (%rbx)
incl 0x4(%rbx)
xorb $0x1, %r13b
movzbl %r13b, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x7036
jmp 0x5187