// File: /workspace/github_c_makefile_star2_O3/schroeder-lvb[P]sissm/src/pigreetings.c
// Function: pigreetingsInstallPlugin
int pigreetingsInstallPlugin( void )
{
    // Read the plugin-specific variables from the .cfg file 
    // 
    pigreetingsInitConfig();

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

    // 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,           pigreetingsClientAddCB );
    eventsRegister( SISSM_EV_CLIENT_DEL,           pigreetingsClientDelCB );
    eventsRegister( SISSM_EV_INIT,                 pigreetingsInitCB );
    eventsRegister( SISSM_EV_RESTART,              pigreetingsRestartCB );
    eventsRegister( SISSM_EV_MAPCHANGE,            pigreetingsMapChangeCB );
    eventsRegister( SISSM_EV_GAME_START,           pigreetingsGameStartCB );
    eventsRegister( SISSM_EV_GAME_END,             pigreetingsGameEndCB );
    eventsRegister( SISSM_EV_ROUND_START,          pigreetingsRoundStartCB );
    eventsRegister( SISSM_EV_ROUND_END,            pigreetingsRoundEndCB );
    eventsRegister( SISSM_EV_OBJECTIVE_CAPTURED,   pigreetingsCapturedCB );
    eventsRegister( SISSM_EV_PERIODIC,             pigreetingsPeriodicCB );
    eventsRegister( SISSM_EV_WINLOSE,              pigreetingsWinLoseCB );

    // Synthetic Delete - this one is generated by RCON roster
    // poller, since player ident from logfile informatino is non-deterministic.
    //
    eventsRegister( SISSM_EV_CLIENT_DEL_SYNTH,     pigreetingsClientSynthDelCB );
    eventsRegister( SISSM_EV_CLIENT_ADD_SYNTH,     pigreetingsClientSynthAddCB );

    // Remember restart time
    //
    timeRestarted = apiTimeGet();   

    // Reserve alarm handler for periodic "ad" messaging
    //
    alarmAds = alarmCreate( pigreetingsAlarmCB );
  
    return 0;
}

// Assembly:
pushq %rax
callq 0x18ce4
cmpl $0x0, 0x21c423(%rip)    # 0x235c20
je 0x19910
leaq -0x4e2(%rip), %rsi      # 0x19328
movl $0x3, %edi
callq 0xd40c
leaq -0x492(%rip), %rsi      # 0x19389
movl $0x4, %edi
callq 0xd40c
leaq -0x280(%rip), %rsi      # 0x195ac
movl $0x1, %edi
callq 0xd40c
leaq -0x28e(%rip), %rsi      # 0x195af
movl $0x2, %edi
callq 0xd40c
leaq -0x29c(%rip), %rsi      # 0x195b2
movl $0x5, %edi
callq 0xd40c
leaq -0x2aa(%rip), %rsi      # 0x195b5
movl $0x6, %edi
callq 0xd40c
leaq -0x2b8(%rip), %rsi      # 0x195b8
movl $0x7, %edi
callq 0xd40c
leaq -0x2c6(%rip), %rsi      # 0x195bb
movl $0x8, %edi
callq 0xd40c
leaq -0x27e(%rip), %rsi      # 0x19614
movl $0x9, %edi
callq 0xd40c
leaq -0x258(%rip), %rsi      # 0x1964b
movl $0xa, %edi
callq 0xd40c
leaq -0x1c9(%rip), %rsi      # 0x196eb
movl $0xb, %edi
callq 0xd40c
leaq -0x1d7(%rip), %rsi      # 0x196ee
movl $0x10, %edi
callq 0xd40c
leaq -0x51f(%rip), %rsi      # 0x193b7
movl $0xd, %edi
callq 0xd40c
leaq -0x441(%rip), %rsi      # 0x194a6
movl $0xc, %edi
callq 0xd40c
callq 0x117c0
movq %rax, 0x224f43(%rip)    # 0x23e840
leaq -0x193(%rip), %rdi      # 0x19771
callq 0xfc23
movq %rax, 0x224f38(%rip)    # 0x23e848
xorl %eax, %eax
popq %rcx
retq