// File: /workspace/github_c_makefile_star2_O0/schroeder-lvb[P]sissm/src/roster.c
// Function: rosterParsePlayerKill
int rosterParsePlayerKill(  char *strIn, int maxChars, char *killerName, char *killerID, char *killedName, char *killedID, char *weaponName )
{
    char tmpStr[ 1024 ], *v, *w;
    int errCode = 1;

    strclr( killerName ); strclr( killerID );
    strclr( killedName ); strclr( killedID );
    strclr( weaponName );

    strlcpy( tmpStr, strIn, 1024 );

    if ( NULL != ( w = strstr( tmpStr, ": Display: " ))) {

        // ----------------------
        // 1 of 3:  process killer name & ID
        //
        w += 11;  // points to start of player name
        if (*w != 0) {
            if ( NULL == ( v = strstr( w, ", team 0] killed " )))
                v = strstr( w, ", team 1] killed " );
            if ( v != NULL ) {
                *v = ']';
                *(v+1) = 0;
                errCode = _parseKillerKilled( w, maxChars, killerName, killerID );
            }
        }

        // ----------------------
        // 2 of 3:  process killed name & ID
        //
        if ( errCode == 0) {
            errCode = 1;
            strlcpy( tmpStr, strIn, 1024 );
            if ( NULL == ( w = strstr( tmpStr, ", team 0] killed " ))) {
                w = strstr( tmpStr, ", team 1] killed " );
            }

            if ( w != NULL ) {
                w += 17;  // points to start of player name
                if ( *w != 0 ) {
                    if ( NULL == ( v = strstr( w, ", team 0] with " )))
                        v = strstr( w, ", team 1] with " );
                    if ( v != NULL ) {
                        *v = ']';
                        *(v+1) = 0;
                        errCode = _parseKillerKilled( w, maxChars, killedName, killedID );
                    }
                }
            }
        }

        // ----------------------
        // 3 of 3:  process weaponName
        //
        if ( errCode == 0) {
            errCode = 1;
            if ( NULL == ( w = strstr( strIn, ", team 0] with " ))) {
                w = strstr( strIn, ", team 1] with " );
            }
            if ( w != NULL ) {
                w += 15;
                if ( *w != 0 ) {
                    strlcpy( weaponName, w, maxChars );
                    errCode = 0;
                }
            }
        }
    }
    return errCode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x1, -0x444(%rbp)
movq -0x18(%rbp), %rdi
callq 0x122b0
movq -0x20(%rbp), %rdi
callq 0x122b0
movq -0x28(%rbp), %rdi
callq 0x122b0
movq -0x30(%rbp), %rdi
callq 0x122b0
movq 0x10(%rbp), %rdi
callq 0x122b0
leaq -0x430(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x11bc0
leaq -0x430(%rbp), %rdi
leaq 0xb7a5(%rip), %rsi      # 0x26a05
callq 0x8390
movq %rax, %rcx
movq %rcx, -0x440(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
je 0x1b4ce
movq -0x440(%rbp), %rax
addq $0xb, %rax
movq %rax, -0x440(%rbp)
movq -0x440(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x1b317
movq -0x440(%rbp), %rdi
leaq 0xb768(%rip), %rsi      # 0x26a11
callq 0x8390
movq %rax, %rcx
movq %rcx, -0x438(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x1b2d9
movq -0x440(%rbp), %rdi
leaq 0xb756(%rip), %rsi      # 0x26a23
callq 0x8390
movq %rax, -0x438(%rbp)
cmpq $0x0, -0x438(%rbp)
je 0x1b315
movq -0x438(%rbp), %rax
movb $0x5d, (%rax)
movq -0x438(%rbp), %rax
movb $0x0, 0x1(%rax)
movq -0x440(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x1b4e0
movl %eax, -0x444(%rbp)
jmp 0x1b317
cmpl $0x0, -0x444(%rbp)
jne 0x1b430
movl $0x1, -0x444(%rbp)
leaq -0x430(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x11bc0
leaq -0x430(%rbp), %rdi
leaq 0xb6c0(%rip), %rsi      # 0x26a11
callq 0x8390
movq %rax, %rcx
movq %rcx, -0x440(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x1b381
leaq -0x430(%rbp), %rdi
leaq 0xb6ae(%rip), %rsi      # 0x26a23
callq 0x8390
movq %rax, -0x440(%rbp)
cmpq $0x0, -0x440(%rbp)
je 0x1b42e
movq -0x440(%rbp), %rax
addq $0x11, %rax
movq %rax, -0x440(%rbp)
movq -0x440(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x1b42c
movq -0x440(%rbp), %rdi
leaq 0xb677(%rip), %rsi      # 0x26a35
callq 0x8390
movq %rax, %rcx
movq %rcx, -0x438(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x1b3ee
movq -0x440(%rbp), %rdi
leaq 0xb663(%rip), %rsi      # 0x26a45
callq 0x8390
movq %rax, -0x438(%rbp)
cmpq $0x0, -0x438(%rbp)
je 0x1b42a
movq -0x438(%rbp), %rax
movb $0x5d, (%rax)
movq -0x438(%rbp), %rax
movb $0x0, 0x1(%rax)
movq -0x440(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x1b4e0
movl %eax, -0x444(%rbp)
jmp 0x1b42c
jmp 0x1b42e
jmp 0x1b430
cmpl $0x0, -0x444(%rbp)
jne 0x1b4cc
movl $0x1, -0x444(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xb5e3(%rip), %rsi      # 0x26a35
callq 0x8390
movq %rax, %rcx
movq %rcx, -0x440(%rbp)
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x1b47f
movq -0x8(%rbp), %rdi
leaq 0xb5d2(%rip), %rsi      # 0x26a45
callq 0x8390
movq %rax, -0x440(%rbp)
cmpq $0x0, -0x440(%rbp)
je 0x1b4ca
movq -0x440(%rbp), %rax
addq $0xf, %rax
movq %rax, -0x440(%rbp)
movq -0x440(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x1b4c8
movq 0x10(%rbp), %rdi
movq -0x440(%rbp), %rsi
movslq -0xc(%rbp), %rdx
callq 0x11bc0
movl $0x0, -0x444(%rbp)
jmp 0x1b4ca
jmp 0x1b4cc
jmp 0x1b4ce
movl -0x444(%rbp), %eax
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
nopl (%rax)