// File: /workspace/github_c_makefile_star2_O0/schroeder-lvb[P]sissm/src/api.c
// Function: apiSay
int apiSay( const char * format, ... )
{
    static char buffer[API_T_BUFSIZE];
    char rconCmd[API_T_BUFSIZE], rconResp[API_R_BUFSIZE];
    int bytesRead, errCode;
    int triplePrint = 0;

    va_list args;
    va_start( args, format ); 
    vsnprintf( buffer, (API_T_BUFSIZE >= API_MAXSAY) ? API_MAXSAY : API_T_BUFSIZE, format, args );

    apiRemoveCodes( buffer );                         // remove color codes if mod is not installed

    if ( snprintf( rconCmd, API_T_BUFSIZE, "say %s%s%s", sayPrefix, buffer, sayPostfix ) < 0) 
        logPrintf( LOG_LEVEL_WARN, "api", "Overflow warning at apiSay" );
    if ( 0 != strlen( buffer ) )  {  // say only when something to be said
        if ( buffer[0] == '*' ) triplePrint = 1;
        if ( 0 == (int) p2pGetF("api.p2p.sayDisable", 0.0 ) ) {
            errCode = rdrvCommand( _rPtr, 2, rconCmd, rconResp, &bytesRead ); 
            if ( triplePrint ) errCode |= rdrvCommand( _rPtr, 2, rconCmd, rconResp, &bytesRead ); 
            if ( triplePrint ) errCode |= rdrvCommand( _rPtr, 2, rconCmd, rconResp, &bytesRead ); 
        }
    }
    va_end (args);
    return errCode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20f0, %rsp           # imm = 0x20F0
testb %al, %al
je 0x17917
movaps %xmm0, -0x20c0(%rbp)
movaps %xmm1, -0x20b0(%rbp)
movaps %xmm2, -0x20a0(%rbp)
movaps %xmm3, -0x2090(%rbp)
movaps %xmm4, -0x2080(%rbp)
movaps %xmm5, -0x2070(%rbp)
movaps %xmm6, -0x2060(%rbp)
movaps %xmm7, -0x2050(%rbp)
movq %r9, -0x20c8(%rbp)
movq %r8, -0x20d0(%rbp)
movq %rcx, -0x20d8(%rbp)
movq %rdx, -0x20e0(%rbp)
movq %rsi, -0x20e8(%rbp)
movq %rdi, -0x8(%rbp)
movl $0x0, -0x201c(%rbp)
leaq -0x2040(%rbp), %rax
leaq -0x20f0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq -0x8(%rbp), %rdx
leaq -0x2040(%rbp), %rcx
leaq 0x16425f(%rip), %rdi    # 0x17bbe0
movl $0x50, %esi
callq 0x80b0
leaq 0x16424e(%rip), %rdi    # 0x17bbe0
callq 0x14540
leaq -0x1010(%rbp), %rdi
movl $0x1000, %esi           # imm = 0x1000
leaq 0xea9c(%rip), %rdx      # 0x26446
leaq 0x147e1f(%rip), %rcx    # 0x15f7d0
leaq 0x164228(%rip), %r8     # 0x17bbe0
leaq 0x147f11(%rip), %r9     # 0x15f8d0
movb $0x0, %al
callq 0x8180
cmpl $0x0, %eax
jge 0x179e5
movl $0x1, %edi
leaq 0xe4c0(%rip), %rsi      # 0x25e97
leaq 0xea73(%rip), %rdx      # 0x26451
movb $0x0, %al
callq 0x21bf0
leaq 0x1641f4(%rip), %rdi    # 0x17bbe0
callq 0x8110
movq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, %rax
je 0x17ad8
movsbl 0x1641da(%rip), %eax    # 0x17bbe0
cmpl $0x2a, %eax
jne 0x17a15
movl $0x1, -0x201c(%rbp)
leaq 0xc4ab(%rip), %rdi      # 0x23ec7
xorps %xmm0, %xmm0
callq 0x1ecf0
cvttsd2si %xmm0, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x17ad6
movq 0xc9a5f(%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, -0x201c(%rbp)
je 0x17a99
movq 0xc9a2a(%rip), %rdi     # 0xe1498
leaq -0x1010(%rbp), %rdx
leaq -0x2010(%rbp), %rcx
movl $0x2, %esi
leaq -0x2014(%rbp), %r8
callq 0x9f20
orl -0x2018(%rbp), %eax
movl %eax, -0x2018(%rbp)
cmpl $0x0, -0x201c(%rbp)
je 0x17ad4
movq 0xc99ef(%rip), %rdi     # 0xe1498
leaq -0x1010(%rbp), %rdx
leaq -0x2010(%rbp), %rcx
movl $0x2, %esi
leaq -0x2014(%rbp), %r8
callq 0x9f20
orl -0x2018(%rbp), %eax
movl %eax, -0x2018(%rbp)
jmp 0x17ad6
jmp 0x17ad8
movl -0x2018(%rbp), %eax
addq $0x20f0, %rsp           # imm = 0x20F0
popq %rbp
retq
nopw (%rax,%rax)