// File: /workspace/github_c_makefile_star2_O3/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterPlayerList
char *rosterPlayerList( int infoDepth, char *delimiter )
{
    static char playerList[8192], single[256];    // EPIC - doubled to 8K
    int i;
    strclr( playerList );
    for (i=0; i<ROSTER_MAX; i++) {
        if ( strlen( masterRoster[i].netID ) ) {
            if ( ( rosterIsValidGUID( masterRoster[i].steamID )) && ( 0 != strlen( masterRoster[i].IPaddress )) )  {   
		switch ( infoDepth ) {
		case 1:   //  includes name + steamID for identifying names with alt-charsets, less privacy
                    snprintf( single, 256, "%s[%s]%s", masterRoster[i].playerName, masterRoster[i].steamID, delimiter );
		    break;
		case 2:   // security web display that includes name:SteamID::IP
                    snprintf( single, 256, "%s[%s:%s]%s", 
                        masterRoster[i].playerName, masterRoster[i].steamID, masterRoster[i].IPaddress, delimiter );
		    break;
		case 3:   // alternative web display that includes name:score
                    snprintf( single, 256, "%s[%s]%s", masterRoster[i].playerName, masterRoster[i].score, delimiter );
		    break;
		case 4:   // used for synthetic event handler, for reliable but less responsive player conect/disconnect
                    snprintf( single, 256, "%s %s %s%s", 
                        masterRoster[i].steamID, reformatIP( masterRoster[i].IPaddress ), masterRoster[i].playerName, delimiter );
		    break;
		case 5:   // SteamID list only
                    snprintf( single, 256, "%s%s", masterRoster[i].steamID, delimiter );
		    break;
	        default:  // (case 0) default miniamlist public dispaly, player name only
                    snprintf( single, 256, "%s%s", masterRoster[i].playerName, delimiter );
		}
                strlcat( playerList, single, 8191 );   // EPIC
            }
        }
    }
    return( playerList );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
leaq 0x2004f6(%rip), %rdi    # 0x2154a0
callq 0xf829
leaq 0x1f378a(%rip), %r12    # 0x208740
movl $0x80, %ebp
decl %r14d
leaq 0x2024db(%rip), %r13    # 0x2174a0
leaq 0x971c(%rip), %r15      # 0x1e6e8
cmpb $0x0, -0xa0(%r12)
je 0x150de
movq %r12, %rdi
callq 0x14378
testl %eax, %eax
je 0x150de
cmpb $0x0, 0x50(%r12)
je 0x150de
cmpl $0x4, %r14d
ja 0x150ac
leaq 0x50(%r12), %r9
movslq (%r15,%r14,4), %rax
addq %r15, %rax
jmpq *%rax
leaq -0x50(%r12), %rcx
movl $0x100, %esi            # imm = 0x100
movq %r13, %rdi
leaq 0x989b(%rip), %rdx      # 0x1e8be
movq %r12, %r8
jmp 0x1505b
movl $0x100, %esi            # imm = 0x100
movq %r13, %rdi
leaq 0x98a2(%rip), %rdx      # 0x1e8d9
movq %r12, %rcx
jmp 0x150c0
leaq -0x50(%r12), %rcx
leaq 0xa0(%r12), %r8
movl $0x100, %esi            # imm = 0x100
movq %r13, %rdi
leaq 0x9863(%rip), %rdx      # 0x1e8be
movq %rbx, %r9
jmp 0x150a3
movq %r9, %rdi
callq 0xfa5d
leaq -0x50(%r12), %r9
movq %rbx, (%rsp)
movl $0x100, %esi            # imm = 0x100
movq %r13, %rdi
leaq 0x9853(%rip), %rdx      # 0x1e8d3
movq %r12, %rcx
movq %rax, %r8
jmp 0x150a3
leaq -0x50(%r12), %rcx
movq %rbx, (%rsp)
movl $0x100, %esi            # imm = 0x100
movq %r13, %rdi
leaq 0x9827(%rip), %rdx      # 0x1e8c7
movq %r12, %r8
xorl %eax, %eax
callq 0x8190
jmp 0x150ca
leaq -0x50(%r12), %rcx
movl $0x100, %esi            # imm = 0x100
movq %r13, %rdi
leaq 0x9819(%rip), %rdx      # 0x1e8d9
movq %rbx, %r8
xorl %eax, %eax
callq 0x8190
movl $0x1fff, %edx           # imm = 0x1FFF
leaq 0x2003ca(%rip), %rdi    # 0x2154a0
movq %r13, %rsi
callq 0xf310
addq $0x190, %r12            # imm = 0x190
decq %rbp
jne 0x14fcc
leaq 0x2003ab(%rip), %rax    # 0x2154a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq