// File: Cell-veto[P]postlhc/jellium3.cpp
// Function: Jellium3::notify_error_bound(AbstractStorage const*, double)
void notify_error_bound (const AbstractStorage *stor,
        double err_bound)
    {
        const unsigned DIM = stor->dimension ();

        if (error_bound != err_bound || period != stor->periods ())
        {
            error_bound = err_bound;
            period = stor->periods ();

            if (DIM >= exponent + 3)
                std::cerr << "jellium3: exponent " << exponent
                    << " too small for dimension " << DIM << ABORT;

            switch (DIM)
            {
            case 2:
                for (unsigned n = 0; n != DIM; ++n)
                    calibrate <2> (n);
                return;
            case 3:
                for (unsigned n = 0; n != DIM; ++n)
                    calibrate <3> (n);
                return;
            default:
                std::cerr << "jellium3: DIM = " << DIM
                    << " not implemented" << ABORT;
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %ecx
movq -0x68(%rbp), %rax
movl %ecx, -0x1c(%rbp)
movsd 0x38(%rax), %xmm0
movb $0x1, %al
ucomisd -0x18(%rbp), %xmm0
movb %al, -0x59(%rbp)
jne 0x419150
jp 0x419150
movq -0x68(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rsi
movq (%rsi), %rax
leaq -0x38(%rbp), %rdi
callq *0x28(%rax)
movq -0x70(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x419e60
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x41915c
jmp 0x41929a
movq -0x68(%rbp), %rax
movsd -0x18(%rbp), %xmm0
movsd %xmm0, 0x38(%rax)
movq -0x10(%rbp), %rsi
movq (%rsi), %rax
movq 0x28(%rax), %rax
leaq -0x50(%rbp), %rdi
callq *%rax
movq -0x68(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, 0x30(%rax)
movups -0x50(%rbp), %xmm0
movups %xmm0, 0x20(%rax)
movl -0x1c(%rbp), %ecx
cvtsi2sd %rcx, %xmm0
movsd 0x1e3171(%rip), %xmm1   # 0x5fc310
addsd 0x10(%rax), %xmm1
ucomisd %xmm1, %xmm0
jb 0x4191f7
movq $0x698ac0, %rdi         # imm = 0x698AC0
leaq 0x1e3581(%rip), %rsi    # 0x5fc739
callq 0x4e1b60
movq %rax, %rdi
movq -0x68(%rbp), %rax
movsd 0x10(%rax), %xmm0
callq 0x4e2ad0
movq %rax, %rdi
leaq 0x1e3575(%rip), %rsi    # 0x5fc74d
callq 0x4e1b60
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0x4e2190
movq %rax, %rdi
leaq 0x27e42f(%rip), %rsi    # 0x697621
callq 0x46d700
movl -0x1c(%rbp), %eax
movl %eax, -0x74(%rbp)
subl $0x2, %eax
je 0x41920e
jmp 0x419204
movl -0x74(%rbp), %eax
subl $0x3, %eax
je 0x419236
jmp 0x41925e
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x1c(%rbp), %eax
je 0x419234
movq -0x68(%rbp), %rdi
movl -0x54(%rbp), %esi
callq 0x419e90
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x419215
jmp 0x41929a
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x1c(%rbp), %eax
je 0x41925c
movq -0x68(%rbp), %rdi
movl -0x58(%rbp), %esi
callq 0x41a120
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x41923d
jmp 0x41929a
movq $0x698ac0, %rdi         # imm = 0x698AC0
leaq 0x1e34fb(%rip), %rsi    # 0x5fc767
callq 0x4e1b60
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0x4e2190
movq %rax, %rdi
leaq 0x20d2e9(%rip), %rsi    # 0x62656f
callq 0x4e1b60
movq %rax, %rdi
leaq 0x27e38c(%rip), %rsi    # 0x697621
callq 0x46d700
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)