// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x50, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x68fa
movq %rax, %r14
movl (%rax), %eax
testl %eax, %eax
je 0x5115
movl (%rbx), %ecx
cvtsi2sd %rcx, %xmm1
movsd 0x40(%rbx), %xmm0
mulsd %xmm0, %xmm1
addsd 0x48(%rbx), %xmm1
movapd %xmm1, %xmm3
movapd %xmm1, 0x10(%rsp)
movl %eax, %eax
cvtsi2sd %rax, %xmm2
movl 0x4(%r14), %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
mulsd %xmm0, %xmm1
subsd %xmm1, %xmm2
movapd %xmm2, 0x30(%rsp)
movapd %xmm3, %xmm0
addsd %xmm2, %xmm0
movapd %xmm0, 0x20(%rsp)
movq %r12, %rdi
callq 0x770d
movapd %xmm0, %xmm2
movsd %xmm0, 0x8(%rsp)
movapd 0x10(%rsp), %xmm1
movapd %xmm1, %xmm0
movapd 0x20(%rsp), %xmm4
divsd %xmm4, %xmm0
movapd %xmm0, 0x40(%rsp)
cmpltsd %xmm2, %xmm0
movapd 0x30(%rsp), %xmm2
andpd %xmm0, %xmm2
andnpd %xmm1, %xmm0
orpd %xmm2, %xmm0
divsd %xmm4, %xmm0
callq 0x2150
movsd 0x8(%rsp), %xmm1
ucomisd 0x40(%rsp), %xmm1
addsd (%r15), %xmm0
movsd %xmm0, (%r15)
jbe 0x5115
movsd 0x40(%rbx), %xmm0
movq %r14, %rdi
movq %r12, %rsi
callq 0x74e4
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 (%r15), %xmm0
movsd %xmm0, (%r15)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x757e
xorl %eax, %eax
jmp 0x51b5
movq %rbx, %rdi
xorl %esi, %esi
callq 0x757e
leaq 0x8(%r14), %r15
movl $0x1, 0x4(%rsp)
cmpb $0x0, 0x81(%r14)
je 0x5144
movq (%r15), %rdi
leaq 0x4(%rsp), %rsi
callq 0x6fe2
jmp 0x519a
movzbl 0x80(%r14), %ecx
testq %rcx, %rcx
je 0x517c
movq %r14, %rax
addq $0xc, %rax
movq %rcx, %rdx
cmpl $0x1, -0x4(%rax)
je 0x519a
addq $0x8, %rax
decq %rdx
jne 0x515b
movq %rcx, %rax
cmpb $0xe, %cl
jbe 0x517e
movq %r15, %rdi
callq 0x6ef2
jmp 0x5135
xorl %eax, %eax
shll $0x3, %eax
incb %cl
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)
movl $0x1, %eax
incl 0x4(%rbx)
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop