// File: /workspace/github_c_makefile_star2_O3/schroeder-lvb[P]sissm/src/piantirush.c
// Function: piantirushObjTouchCB
int piantirushObjTouchCB( char *strIn )
{
    char *w, *n, m[64];
    char charID[64], tmpCharID[64], playerName[64]; 

    // First check if the time is within the territory  protection window zone (i.e., "too early")
    //
    if ( alarmStatus( tPtr ) > 5 ) {
        //  Get charcter ID
        //
        if ( NULL != (w = strstr( strIn, "BP_Character_Player" ))  ) {
            strlcpy( tmpCharID, w, 64 );
            if ( NULL != (n = getWord( tmpCharID, 0, ". " ) )) {
                strlcpy( charID, n, 64 );
                if ( NULL != strstr( strIn, rosterGetObjective() )) {
                    // Convert Character ID to player Name
                    //
                    strlcpy(m, apiCharacterToName( charID ), 64 );
                    if ( 0 != strlen( m )) {
                        strlcpy( playerName, m, 64 );

                        if ( (piantirushConfig.earlyBreachShow) && ( kickArmed2 && kickArmed )) {
                            _localSayThrottled( "'%s' %s", playerName, piantirushConfig.earlyBreachWarn );
                        }

                        // call the cap-rush algo submodule here
                        //
                        _capRusherEnterZone( charID, playerName );
                    }
                    else {
                        logPrintf(LOG_LEVEL_DEBUG, "piantirush", "**Internal error - unable to match char to name ::%s::", charID );
                    }
                }
            }
        } 
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %rbx
movq 0x2091ad(%rip), %rdi    # 0x21fe50
callq 0xfcc3
cmpq $0x6, %rax
jl 0x16e85
leaq 0x7311(%rip), %rsi      # 0x1dfca
movq %rbx, %rdi
callq 0x83b0
testq %rax, %rax
je 0x16e85
leaq 0xc0(%rsp), %r14
movl $0x40, %edx
movq %r14, %rdi
movq %rax, %rsi
callq 0xf384
leaq 0x7f7b(%rip), %rdx      # 0x1ec64
movq %r14, %rdi
xorl %esi, %esi
callq 0xf82d
testq %rax, %rax
je 0x16e85
movq %rsp, %rdi
movl $0x40, %edx
movq %rax, %rsi
callq 0xf384
callq 0x1455b
movq %rbx, %rdi
movq %rax, %rsi
callq 0x83b0
testq %rax, %rax
je 0x16e85
movq %rsp, %rdi
callq 0x11e94
leaq 0x80(%rsp), %rbx
movl $0x40, %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf384
cmpb $0x0, (%rbx)
je 0x16dfa
leaq 0x40(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movl $0x40, %edx
callq 0xf384
cmpl $0x0, 0x204b58(%rip)    # 0x21b8c4
je 0x16d93
cmpl $0x0, 0x1316b(%rip)     # 0x29ee0
je 0x16d93
testb $0x1, 0x2090c2(%rip)    # 0x21fe40
je 0x16d93
leaq 0x205f51(%rip), %rdx    # 0x21ccd8
leaq 0x40(%rsp), %rsi
xorl %eax, %eax
callq 0x16e97
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x2090f1(%rip), %rbx    # 0x21fe90
xorl %r15d, %r15d
movq %rsp, %r14
xorl %r12d, %r12d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8220
testl %eax, %eax
je 0x16e19
cmpl $-0x1, %ebp
jne 0x16dc9
cmpb (%rbx), %r15b
movl $0x0, %ebp
sbbl %ebp, %ebp
orl %r12d, %ebp
incq %r12
addq $0x8c, %rbx
cmpq $0x40, %r12
jne 0x16da8
cmpl $-0x1, %ebp
jne 0x16e1c
leaq 0x7ced(%rip), %rsi      # 0x1ead2
leaq 0x8a8d(%rip), %rdx      # 0x1f879
xorl %edi, %edi
xorl %eax, %eax
callq 0x1a3e3
jmp 0x16e85
leaq 0x7cd1(%rip), %rsi      # 0x1ead2
leaq 0x7e67(%rip), %rdx      # 0x1ec6f
movq %rsp, %rcx
movl $0x3, %edi
xorl %eax, %eax
callq 0x1a3e3
jmp 0x16e85
movl %r12d, %ebp
movslq %ebp, %rax
imulq $0x8c, %rax, %r14
leaq 0x209063(%rip), %r15    # 0x21fe90
leaq (%r15,%r14), %rdi
movq %rsp, %rbx
movl $0x40, %edx
movq %rbx, %rsi
callq 0xf384
addq %r15, %r14
addq $0x40, %r14
leaq 0x40(%rsp), %r15
movl $0x40, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0xf384
movl $0x1, 0x48(%r14)
leaq 0x7c66(%rip), %rsi      # 0x1ead2
leaq 0x89e5(%rip), %rdx      # 0x1f858
movl $0x3, %edi
movq %r15, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x1a3e3
xorl %eax, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq