// File: /workspace/github_c_makefile_star2_O0/schroeder-lvb[P]sissm/src/piantirush.c
// Function: piantirushInstallPlugin
int piantirushInstallPlugin( void )
{
    // Read the plugin-specific variables from the .cfg file 
    // 
    piantirushInitConfig();

    // if plugin is disabled in the .cfg file then do not activate
    //
    if ( piantirushConfig.pluginState == 0 ) return 0;

    // Setup alarms
    //
    aPtr  = alarmCreate( _normalSpeedAlarmCB );
    dPtr  = alarmCreate( _rulesAlarmCB );
    wPtr  = alarmCreate( _notifyNoDestroyCB );

    rPtr  = alarmCreate( _earlyDestroyReqCB );
    tPtr  = alarmCreate( _earlyTerritorialCB );    // Territorial Rush trap [TRUSH]
    alarmReset( rPtr, 0L );
    alarmReset( tPtr, 0L );

    bPtr = alarmCreate( _earlyBreachReqCB );
    alarmReset( bPtr, 0L );

    xPtr = alarmCreate( _trainingModeReminderCB );
    alarmReset( xPtr, 0L );

    kickArmed = 0;

    sPtr = alarmCreate( _closeBotSpawnWindowCB );  // bot spawnkill window timer
    alarmReset( sPtr, 0L );


    // Install Event-driven CallBack hooks so the plugin gets
    // notified for various happenings.  A complete list is here,
    // but comment out what is not needed for your plug-in.
    // 
    eventsRegister( SISSM_EV_CLIENT_ADD,           piantirushClientAddCB );
    eventsRegister( SISSM_EV_CLIENT_DEL,           piantirushClientDelCB );
    eventsRegister( SISSM_EV_INIT,                 piantirushInitCB );
    eventsRegister( SISSM_EV_RESTART,              piantirushRestartCB );
    eventsRegister( SISSM_EV_MAPCHANGE,            piantirushMapChangeCB );
    eventsRegister( SISSM_EV_GAME_START,           piantirushGameStartCB );
    eventsRegister( SISSM_EV_GAME_END,             piantirushGameEndCB );
    eventsRegister( SISSM_EV_ROUND_START,          piantirushRoundStartCB );
    eventsRegister( SISSM_EV_ROUND_END,            piantirushRoundEndCB );
    eventsRegister( SISSM_EV_OBJECTIVE_CAPTURED,   piantirushCapturedCB );
    eventsRegister( SISSM_EV_PERIODIC,             piantirushPeriodicCB );
    eventsRegister( SISSM_EV_SIGTERM,              piantirushSigKillCB );
    eventsRegister( SISSM_EV_OBJECT_SYNTH,         piantirushObjectSynth );
    eventsRegister( SISSM_EV_CACHE_DESTROY,        piantirushCacheDestroyed );
    eventsRegister( SISSM_EV_CHAT,                 piantirushChatCB     );

    eventsRegister( SISSM_EV_BP_TOUCHED_OBJ,       piantirushObjTouchCB );
    eventsRegister( SISSM_EV_BP_UNTOUCHED_OBJ,     piantirushObjUntouchCB );

    eventsRegister( SISSM_EV_ACTIVITY,             piantirushActivityCB );

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x1d8d0
cmpl $0x0, 0x20159c(%rip)    # 0x21f8a0
jne 0x1e312
movl $0x0, -0x4(%rbp)
jmp 0x1e53a
leaq 0x237(%rip), %rdi       # 0x1e550
callq 0x12940
movq %rax, 0x2095fb(%rip)    # 0x227920
leaq 0x274(%rip), %rdi       # 0x1e5a0
callq 0x12940
movq %rax, 0x209b10(%rip)    # 0x227e48
leaq 0x351(%rip), %rdi       # 0x1e690
callq 0x12940
movq %rax, 0x209b35(%rip)    # 0x227e80
leaq 0x39e(%rip), %rdi       # 0x1e6f0
callq 0x12940
movq %rax, 0x209b12(%rip)    # 0x227e70
leaq 0x44b(%rip), %rdi       # 0x1e7b0
callq 0x12940
movq %rax, 0x209adf(%rip)    # 0x227e50
movq 0x209af8(%rip), %rdi    # 0x227e70
xorl %eax, %eax
movl %eax, %esi
callq 0x12a40
movq 0x209ac8(%rip), %rdi    # 0x227e50
xorl %eax, %eax
movl %eax, %esi
callq 0x12a40
leaq 0x428(%rip), %rdi       # 0x1e7c0
callq 0x12940
movq %rax, 0x209ad4(%rip)    # 0x227e78
movq 0x209acd(%rip), %rdi    # 0x227e78
xorl %eax, %eax
movl %eax, %esi
callq 0x12a40
leaq 0x4c5(%rip), %rdi       # 0x1e880
callq 0x12940
movq %rax, 0x209561(%rip)    # 0x227928
movq 0x20955a(%rip), %rdi    # 0x227928
xorl %eax, %eax
movl %eax, %esi
callq 0x12a40
movl $0x0, 0x209a5f(%rip)    # 0x227e40
leaq 0x538(%rip), %rdi       # 0x1e920
callq 0x12940
movq %rax, 0x209a44(%rip)    # 0x227e38
movq 0x209a3d(%rip), %rdi    # 0x227e38
xorl %eax, %eax
movl %eax, %esi
callq 0x12a40
movl $0x3, %edi
leaq -0x24e0(%rip), %rsi     # 0x1bf30
callq 0xee50
movl $0x4, %edi
leaq -0x24e1(%rip), %rsi     # 0x1bf40
callq 0xee50
movl $0x1, %edi
leaq -0x24e2(%rip), %rsi     # 0x1bf50
callq 0xee50
movl $0x2, %edi
leaq -0x23e3(%rip), %rsi     # 0x1c060
callq 0xee50
movl $0x5, %edi
leaq -0x23c4(%rip), %rsi     # 0x1c090
callq 0xee50
movl $0x6, %edi
leaq -0x23b5(%rip), %rsi     # 0x1c0b0
callq 0xee50
movl $0x7, %edi
leaq -0x2366(%rip), %rsi     # 0x1c110
callq 0xee50
movl $0x8, %edi
leaq -0x2327(%rip), %rsi     # 0x1c160
callq 0xee50
movl $0x9, %edi
leaq -0x2258(%rip), %rsi     # 0x1c240
callq 0xee50
movl $0xa, %edi
leaq -0x2239(%rip), %rsi     # 0x1c270
callq 0xee50
movl $0xb, %edi
leaq -0x215a(%rip), %rsi     # 0x1c360
callq 0xee50
movl $0xf, %edi
leaq -0x18eb(%rip), %rsi     # 0x1cbe0
callq 0xee50
movl $0x13, %edi
leaq -0x18bc(%rip), %rsi     # 0x1cc20
callq 0xee50
movl $0x14, %edi
leaq -0x183d(%rip), %rsi     # 0x1ccb0
callq 0xee50
xorl %edi, %edi
leaq -0x15cb(%rip), %rsi     # 0x1cf30
callq 0xee50
movl $0x18, %edi
leaq -0x13ac(%rip), %rsi     # 0x1d160
callq 0xee50
movl $0x19, %edi
leaq -0xe8d(%rip), %rsi      # 0x1d690
callq 0xee50
movl $0x1c, %edi
leaq -0x28ae(%rip), %rsi     # 0x1bc80
callq 0xee50
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)