// File: /workspace/github_c_makefile_star2_O0/schroeder-lvb[P]sissm/src/api.c
// Function: apiPollAlarmCB
int _apiPollAlarmCB( char *strIn )
{
    char rconCmd[API_T_BUFSIZE], rconResp[API_R_BUFSIZE];
    int  bytesRead, errCode = 0;

    logPrintf( LOG_LEVEL_RAWDUMP, "api", "Roster update alarm callback ::%s::", strIn );

    // Fetch the roster
    //
    snprintf( rconCmd, API_T_BUFSIZE, "listplayers" );
    memset( rconResp, 0, API_R_BUFSIZE );
    errCode = rdrvCommand( _rPtr, 2, rconCmd, rconResp, &bytesRead );
    if ( !errCode ) {
        rosterParse( rconResp, bytesRead );
        // logPrintf( LOG_LEVEL_DEBUG, "api", "Listplayer success, player count is %d", rosterCount());
        lastRosterSuccessTime = apiTimeGet();             // record this to check for dead servers
	strlcpy( rosterCurrent, rosterPlayerList( 4, "\011" ), API_ROSTER_STRING_MAX );
	rosterSyntheticChangeEvent( rosterPrevious, rosterCurrent, _apiSyntheticDelDispatch ); 
	rosterSyntheticChangeEvent( rosterCurrent, rosterPrevious, _apiSyntheticAddDispatch ); 
	strlcpy( rosterPrevious, rosterCurrent, API_ROSTER_STRING_MAX );

    }
    else {
        logPrintf( LOG_LEVEL_INFO, "api", 
            "Listplayer retrieve failure on apiPollAlarmCB, playercount is %d", rosterCount() );
    }

    // Fetch the GameState using activeobjective gamemodeproperties  
    //   
    _apiFetchGameState();

    // do a cached-read of server name from RCON.  Once successful, it will read
    // from the cache (not RCON) thereafter
    //
    apiGetServerNameRCON( 0 );

    // reset the alarm for the next iteration
    //
    alarmReset( _apiPollAlarmPtr, API_LISTPLAYERS_PERIOD );

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2020, %rsp           # imm = 0x2020
movq %rdi, -0x8(%rbp)
movl $0x0, -0x2018(%rbp)
movq -0x8(%rbp), %rcx
movl $0x4, %edi
leaq 0x10f2e(%rip), %rsi     # 0x25e97
leaq 0x10f58(%rip), %rdx     # 0x25ec8
movb $0x0, %al
callq 0x21bf0
leaq -0x1010(%rbp), %rdi
movl $0x1000, %esi           # imm = 0x1000
leaq 0xede5(%rip), %rdx      # 0x23d6f
movb $0x0, %al
callq 0x8180
leaq -0x2010(%rbp), %rdi
xorl %esi, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x81a0
movq 0xcc4ed(%rip), %rdi     # 0xe1498
leaq -0x1010(%rbp), %rdx
leaq -0x2010(%rbp), %rcx
movl $0x2, %esi
leaq -0x2014(%rbp), %r8
callq 0x9f20
movl %eax, -0x2018(%rbp)
cmpl $0x0, -0x2018(%rbp)
jne 0x1506e
leaq -0x2010(%rbp), %rdi
movl -0x2014(%rbp), %esi
callq 0x198f0
callq 0x150c0
movq %rax, 0xcc495(%rip)     # 0xe1490
movl $0x4, %edi
leaq 0x11a4f(%rip), %rsi     # 0x26a56
callq 0x1a4b0
movq %rax, %rsi
leaq 0xcc48a(%rip), %rdi     # 0xe14a0
movl $0x4000, %edx           # imm = 0x4000
callq 0x11bc0
leaq 0xd0479(%rip), %rdi     # 0xe54a0
leaq 0xcc472(%rip), %rsi     # 0xe14a0
leaq -0x385(%rip), %rdx      # 0x14cb0
callq 0x1b630
leaq 0xcc45f(%rip), %rdi     # 0xe14a0
leaq 0xd0458(%rip), %rsi     # 0xe54a0
leaq -0x33f(%rip), %rdx      # 0x14d10
callq 0x1b630
leaq 0xd0445(%rip), %rdi     # 0xe54a0
leaq 0xcc43e(%rip), %rsi     # 0xe14a0
movl $0x4000, %edx           # imm = 0x4000
callq 0x11bc0
jmp 0x1508f
callq 0x19fc0
movl %eax, %ecx
movl $0x2, %edi
leaq 0x10e16(%rip), %rsi     # 0x25e97
leaq 0x10e64(%rip), %rdx     # 0x25eec
movb $0x0, %al
callq 0x21bf0
callq 0x150d0
xorl %edi, %edi
callq 0x151a0
movq 0xd43fe(%rip), %rdi     # 0xe94a0
movl $0xa, %esi
callq 0x12a40
xorl %eax, %eax
addq $0x2020, %rsp           # imm = 0x2020
popq %rbp
retq
nopw (%rax,%rax)