// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x1fbc0
cmpl $0x0, 0x21cffc(%rip)    # 0x23dc20
jne 0x20c32
movl $0x0, -0x4(%rbp)
jmp 0x20d46
movl $0x3, %edi
leaq -0x81e(%rip), %rsi      # 0x20420
callq 0xee50
movl $0x4, %edi
leaq -0x7bf(%rip), %rsi      # 0x20490
callq 0xee50
movl $0x1, %edi
leaq -0x420(%rip), %rsi      # 0x20840
callq 0xee50
movl $0x2, %edi
leaq -0x421(%rip), %rsi      # 0x20850
callq 0xee50
movl $0x5, %edi
leaq -0x422(%rip), %rsi      # 0x20860
callq 0xee50
movl $0x6, %edi
leaq -0x423(%rip), %rsi      # 0x20870
callq 0xee50
movl $0x7, %edi
leaq -0x424(%rip), %rsi      # 0x20880
callq 0xee50
movl $0x8, %edi
leaq -0x425(%rip), %rsi      # 0x20890
callq 0xee50
movl $0x9, %edi
leaq -0x396(%rip), %rsi      # 0x20930
callq 0xee50
movl $0xa, %edi
leaq -0x357(%rip), %rsi      # 0x20980
callq 0xee50
movl $0xb, %edi
leaq -0x288(%rip), %rsi      # 0x20a60
callq 0xee50
movl $0x10, %edi
leaq -0x289(%rip), %rsi      # 0x20a70
callq 0xee50
movl $0xd, %edi
leaq -0x83a(%rip), %rsi      # 0x204d0
callq 0xee50
movl $0xc, %edi
leaq -0x67b(%rip), %rsi      # 0x206a0
callq 0xee50
callq 0x150c0
movq %rax, 0x225b14(%rip)    # 0x246840
leaq -0x1d3(%rip), %rdi      # 0x20b60
callq 0x12940
movq %rax, 0x225b09(%rip)    # 0x246848
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop