// File: /workspace/github_c_makefile_star2_O1/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 0x18b28
cmpl $0x0, 0x21c5d9(%rip)    # 0x235c20
je 0x1975a
leaq -0x4e8(%rip), %rsi      # 0x1916c
movl $0x3, %edi
callq 0xd08c
leaq -0x498(%rip), %rsi      # 0x191cd
movl $0x4, %edi
callq 0xd08c
leaq -0x286(%rip), %rsi      # 0x193f0
movl $0x1, %edi
callq 0xd08c
leaq -0x294(%rip), %rsi      # 0x193f3
movl $0x2, %edi
callq 0xd08c
leaq -0x2a2(%rip), %rsi      # 0x193f6
movl $0x5, %edi
callq 0xd08c
leaq -0x2b0(%rip), %rsi      # 0x193f9
movl $0x6, %edi
callq 0xd08c
leaq -0x2be(%rip), %rsi      # 0x193fc
movl $0x7, %edi
callq 0xd08c
leaq -0x2cc(%rip), %rsi      # 0x193ff
movl $0x8, %edi
callq 0xd08c
leaq -0x284(%rip), %rsi      # 0x19458
movl $0x9, %edi
callq 0xd08c
leaq -0x25e(%rip), %rsi      # 0x1948f
movl $0xa, %edi
callq 0xd08c
leaq -0x1cc(%rip), %rsi      # 0x19532
movl $0xb, %edi
callq 0xd08c
leaq -0x1da(%rip), %rsi      # 0x19535
movl $0x10, %edi
callq 0xd08c
leaq -0x525(%rip), %rsi      # 0x191fb
movl $0xd, %edi
callq 0xd08c
leaq -0x447(%rip), %rsi      # 0x192ea
movl $0xc, %edi
callq 0xd08c
callq 0x114b2
movq %rax, 0x2250f9(%rip)    # 0x23e840
leaq -0x196(%rip), %rdi      # 0x195b8
callq 0xf8d7
movq %rax, 0x2250ee(%rip)    # 0x23e848
xorl %eax, %eax
popq %rcx
retq
nop