// File: /workspace/github_c_makefile_star2_O2/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 0x17bd4
cmpl $0x0, 0x21d543(%rip)    # 0x235c20
je 0x187d4
leaq -0x4d2(%rip), %rsi      # 0x18218
pushq $0x3
popq %rdi
callq 0xcba7
leaq -0x480(%rip), %rsi      # 0x18279
pushq $0x4
popq %rdi
callq 0xcba7
leaq -0x260(%rip), %rsi      # 0x184a8
pushq $0x1
popq %rdi
callq 0xcba7
leaq -0x26c(%rip), %rsi      # 0x184ab
pushq $0x2
popq %rdi
callq 0xcba7
leaq -0x278(%rip), %rsi      # 0x184ae
pushq $0x5
popq %rdi
callq 0xcba7
leaq -0x284(%rip), %rsi      # 0x184b1
pushq $0x6
popq %rdi
callq 0xcba7
leaq -0x290(%rip), %rsi      # 0x184b4
pushq $0x7
popq %rdi
callq 0xcba7
leaq -0x29c(%rip), %rsi      # 0x184b7
pushq $0x8
popq %rdi
callq 0xcba7
leaq -0x252(%rip), %rsi      # 0x18510
pushq $0x9
popq %rdi
callq 0xcba7
leaq -0x22c(%rip), %rsi      # 0x18545
pushq $0xa
popq %rdi
callq 0xcba7
leaq -0x1a8(%rip), %rsi      # 0x185d8
pushq $0xb
popq %rdi
callq 0xcba7
leaq -0x1b4(%rip), %rsi      # 0x185db
pushq $0x10
popq %rdi
callq 0xcba7
leaq -0x4f7(%rip), %rsi      # 0x182a7
pushq $0xd
popq %rdi
callq 0xcba7
leaq -0x403(%rip), %rsi      # 0x183aa
pushq $0xc
popq %rdi
callq 0xcba7
callq 0x10b6a
movq %rax, 0x22607f(%rip)    # 0x23e840
leaq -0x16a(%rip), %rdi      # 0x1865e
callq 0xf145
movq %rax, 0x226074(%rip)    # 0x23e848
xorl %eax, %eax
popq %rcx
retq