// File: /workspace/github_c_makefile_star2_O0/schroeder-lvb[P]sissm/src/piantirush.c
// Function: localSayThrottled
static int _localSayThrottled( const char * format, ... )
{
    static char buffer[API_T_BUFSIZE];
    int errCode = 0, i, suppressPrint;
    unsigned long checksum, timeNow;
    char *v;

    // a wedge code to disable this plugin if non-Checkpoint mode is running 
    //
    v = apiGetServerMode();
    if (! ((0==strcmp( v, "checkpoint" )) || (0==strcmp( v, "hardcore"))) )  return 0;

    if ( throttleIndex == -1 )  {
         memset( &throttle[0][0], 0, sizeof(long)*THROTTLE_HISTO*2 );
         throttleIndex = 0;
    }

    if ( 0 == _localMute ) {
        va_list args;
        va_start( args, format );
        vsnprintf( buffer, (API_T_BUFSIZE >= API_MAXSAY) ? API_MAXSAY : API_T_BUFSIZE, format, args );

        checksum = _fastChecksum( buffer );
        timeNow  = (unsigned long ) time(NULL);

        suppressPrint = 0;
        for ( i = 0; i<THROTTLE_HISTO; i++ ) {
            if ( (timeNow ) == throttle[i][0] ) {
                if ( checksum == throttle[i][1] ) {
                    suppressPrint = 1;
                    break;
                }
            }
        }

        if ( 0 == suppressPrint ) errCode = apiSay( buffer );

        throttle[ throttleIndex ][0] = timeNow;
        throttle[ throttleIndex ][1] = checksum;
        if ( (++throttleIndex) >= THROTTLE_HISTO ) throttleIndex = 0;

        va_end (args);
    }
    return errCode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
testb %al, %al
je 0x1d33e
movaps %xmm0, -0xd0(%rbp)
movaps %xmm1, -0xc0(%rbp)
movaps %xmm2, -0xb0(%rbp)
movaps %xmm3, -0xa0(%rbp)
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x80(%rbp)
movaps %xmm6, -0x70(%rbp)
movaps %xmm7, -0x60(%rbp)
movq %r9, -0xd8(%rbp)
movq %r8, -0xe0(%rbp)
movq %rcx, -0xe8(%rbp)
movq %rdx, -0xf0(%rbp)
movq %rsi, -0xf8(%rbp)
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
callq 0x187d0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
leaq 0x7c5b(%rip), %rsi      # 0x24fdb
callq 0x8200
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x1d3b1
movq -0x38(%rbp), %rdi
leaq 0x6c67(%rip), %rsi      # 0x23fff
callq 0x8200
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x1d3b1
movl $0x0, -0x4(%rbp)
jmp 0x1d520
cmpl $-0x1, 0x14b34(%rip)    # 0x31eec
jne 0x1d3d7
leaq 0x20edcf(%rip), %rdi    # 0x22c190
xorl %esi, %esi
movl $0x800, %edx            # imm = 0x800
callq 0x81a0
movl $0x0, 0x14b15(%rip)     # 0x31eec
xorl %eax, %eax
cmpl 0x20aa89(%rip), %eax    # 0x227e68
jne 0x1d51a
leaq -0x50(%rbp), %rax
leaq -0x100(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq -0x10(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq 0x20dd78(%rip), %rdi    # 0x22b190
movl $0x50, %esi
callq 0x80b0
leaq 0x20dd67(%rip), %rdi    # 0x22b190
callq 0x1e960
movq %rax, -0x28(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x8280
movq %rax, -0x30(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x80, -0x18(%rbp)
jge 0x1d4a5
movq -0x30(%rbp), %rax
movslq -0x18(%rbp), %rdx
leaq 0x20ed2b(%rip), %rcx    # 0x22c190
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jne 0x1d498
movq -0x28(%rbp), %rax
movslq -0x18(%rbp), %rdx
leaq 0x20ed10(%rip), %rcx    # 0x22c190
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0x1d496
movl $0x1, -0x1c(%rbp)
jmp 0x1d4a5
jmp 0x1d498
jmp 0x1d49a
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x1d44d
xorl %eax, %eax
cmpl -0x1c(%rbp), %eax
jne 0x1d4bd
leaq 0x20dcdd(%rip), %rdi    # 0x22b190
movb $0x0, %al
callq 0x178d0
movl %eax, -0x14(%rbp)
movq -0x30(%rbp), %rcx
movslq 0x14a24(%rip), %rdx     # 0x31eec
leaq 0x20ecc1(%rip), %rax    # 0x22c190
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movslq 0x14a08(%rip), %rdx     # 0x31eec
leaq 0x20eca5(%rip), %rax    # 0x22c190
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl 0x149f0(%rip), %eax     # 0x31eec
addl $0x1, %eax
movl %eax, 0x149e7(%rip)     # 0x31eec
cmpl $0x80, %eax
jl 0x1d516
movl $0x0, 0x149d6(%rip)     # 0x31eec
leaq -0x50(%rbp), %rax
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopl (%rax)