// File: /workspace/github_c_makefile_star2_O3/schroeder-lvb[P]sissm/src/piantirush.c
// Function: piantirushChatCB
int piantirushChatCB( char *strIn )
{
    char clientID[256], chatLine[256];
    int isQualified = 0, errCode;

    if ( piantirushConfig.autoKickEarlyDestruction ) {
        if ( NULL != strstr( rosterGetObjectiveType(), "WeaponCache" ))  {
            if ( 0 == (errCode = rosterParsePlayerChat( strIn, 256, clientID, chatLine ))) {
                if ( NULL != strstr( piantirushConfig.earlyDestroyPlayerRequest, chatLine )) {

                    // check if this player is qualified to call this command 
                    //
                    isQualified  = apiIsPlayerAliveByGUID( clientID );
                    isQualified |= apiAuthIsAttribute( clientID, "deadcmdr" );
                    isQualified |= apiIsHotRestart();
                    if ( 2 != (int) strlen( chatLine )) isQualified = 0;
                    if ( isQualified ) 
                        alarmReset( rPtr, 2 );        // give answer 2 seconds later for cosmetics 
                }
            }
        }
    }

    if ( piantirushConfig.autoKickEarlyBreach ) {
        if ( NULL != strstr( rosterGetObjectiveType(), "Captur" ))  {
            if ( 0 == (errCode = rosterParsePlayerChat( strIn, 256, clientID, chatLine ))) {
                if ( NULL != strstr( piantirushConfig.earlyBreachPlayerRequest, chatLine )) {
 
                    // check if this player is qualified to call this command 
                    //
                    isQualified  = apiIsPlayerAliveByGUID( clientID );
                    isQualified |= apiAuthIsAttribute( clientID, "deadcmdr" );
                    isQualified |= apiIsHotRestart();
                    if ( 2 != (int) strlen( chatLine )) isQualified = 0;

                    if ( isQualified )
                        alarmReset( bPtr, 2 );        // give answer 2 seconds later for cosmetics  
                }
            }
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
cmpl $0x0, 0x20399f(%rip)    # 0x21a4b8
je 0x16b50
callq 0x14563
leaq 0x8004(%rip), %rsi      # 0x1eb2b
movq %rax, %rdi
callq 0x83b0
testq %rax, %rax
je 0x16b50
leaq 0x100(%rsp), %rdx
movq %rsp, %rcx
movq %rbx, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x1554c
testl %eax, %eax
je 0x16ba2
cmpl $0x0, 0x204d71(%rip)    # 0x21b8c8
je 0x16b92
callq 0x14563
leaq 0x7fd2(%rip), %rsi      # 0x1eb37
movq %rax, %rdi
callq 0x83b0
testq %rax, %rax
je 0x16b92
leaq 0x100(%rsp), %rdx
movq %rsp, %rcx
movq %rbx, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x1554c
testl %eax, %eax
je 0x16c15
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x204917(%rip), %rdi    # 0x21b4c0
movq %rsp, %rsi
callq 0x83b0
testq %rax, %rax
je 0x16b50
leaq 0x100(%rsp), %r14
movq %r14, %rdi
callq 0x11f1f
movl %eax, %ebp
leaq 0x5c15(%rip), %rsi      # 0x1c7e4
movq %r14, %rdi
callq 0x13c3d
movl %eax, %r14d
callq 0x1436d
movl %eax, %r15d
movq %rsp, %rdi
callq 0x8120
cmpl $0x2, %eax
jne 0x16b50
orl %ebp, %r14d
orl %r15d, %r14d
je 0x16b50
movq 0x20926a(%rip), %rdi    # 0x21fe70
movl $0x2, %esi
callq 0xfc98
jmp 0x16b50
leaq 0x2054bc(%rip), %rdi    # 0x21c0d8
movq %rsp, %rsi
callq 0x83b0
testq %rax, %rax
je 0x16b92
leaq 0x100(%rsp), %r14
movq %r14, %rdi
callq 0x11f1f
movl %eax, %ebx
leaq 0x5b9e(%rip), %rsi      # 0x1c7e4
movq %r14, %rdi
callq 0x13c3d
movl %eax, %ebp
callq 0x1436d
movl %eax, %r14d
movq %rsp, %rdi
callq 0x8120
cmpl $0x2, %eax
jne 0x16b92
orl %ebx, %ebp
orl %r14d, %ebp
je 0x16b92
movq 0x2091fd(%rip), %rdi    # 0x21fe78
movl $0x2, %esi
callq 0xfc98
jmp 0x16b92