// File: /workspace/github_c_makefile_star2_O0/icysunlight[P]miniftpd/ftpproto.c
// Function: do_stat
void do_stat(session_t *sess)
{
    ftp_lreply(sess,FTP_STATOK,"FTP server status:");
    char buf[1024] = {0};

    struct in_addr inaddr;
    inaddr.s_addr = (sess->ip);
    sprintf(buf," Connected to %s\r\n",inet_ntoa(inaddr));
    writen(sess->ctrlfd,buf,strlen(buf));

    memset(buf,0,sizeof(char) * 1024);
    sprintf(buf," Logged in as %s\r\n",username);
    writen(sess->ctrlfd,buf,strlen(buf));
    
    memset(buf,0,sizeof(char) * 1024);
    if ( sess->bASCII )
        sprintf(buf," TYPE: ASCII \r\n");
    else
        sprintf(buf," TYPE: BINARY \r\n");
    writen(sess->ctrlfd,buf,strlen(buf));

    memset(buf,0,sizeof(char) * 1024);
    if ( 0 == tunable_connect_timeout ) 
        sprintf(buf," No session timeout\r\n");
    else
        sprintf(buf," Session timeout in seconds is %u\r\n",tunable_connect_timeout);
    writen(sess->ctrlfd,buf,strlen(buf));

    ftp_reply(sess,FTP_STATOK,"End of status");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x460, %rsp            # imm = 0x460
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0xd3, %esi
leaq 0x2152(%rip), %rdx      # 0x9951
callq 0x56c0
leaq -0x410(%rbp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x3220
movq -0x8(%rbp), %rax
movl 0xc44(%rax), %eax
movl %eax, -0x414(%rbp)
leaq -0x410(%rbp), %rax
movq %rax, -0x440(%rbp)
movl -0x414(%rbp), %edi
callq 0x3110
movq -0x440(%rbp), %rdi
movq %rax, %rdx
leaq 0x2113(%rip), %rsi      # 0x9964
movb $0x0, %al
callq 0x34d0
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x434(%rbp)
leaq -0x410(%rbp), %rax
movq %rax, -0x430(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x3160
movl -0x434(%rbp), %edi
movq -0x430(%rbp), %rsi
movq %rax, %rdx
callq 0x46a0
leaq -0x410(%rbp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x3220
leaq -0x410(%rbp), %rdi
leaq 0x20c2(%rip), %rsi      # 0x9977
leaq 0x5df4(%rip), %rdx      # 0xd6b0
movb $0x0, %al
callq 0x34d0
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x424(%rbp)
leaq -0x410(%rbp), %rax
movq %rax, -0x420(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x3160
movl -0x424(%rbp), %edi
movq -0x420(%rbp), %rsi
movq %rax, %rdx
callq 0x46a0
leaq -0x410(%rbp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x3220
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x7933
leaq -0x410(%rbp), %rdi
leaq 0x2060(%rip), %rsi      # 0x998a
movb $0x0, %al
callq 0x34d0
jmp 0x7948
leaq -0x410(%rbp), %rdi
leaq 0x2059(%rip), %rsi      # 0x999a
movb $0x0, %al
callq 0x34d0
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x44c(%rbp)
leaq -0x410(%rbp), %rax
movq %rax, -0x448(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x3160
movl -0x44c(%rbp), %edi
movq -0x448(%rbp), %rsi
movq %rax, %rdx
callq 0x46a0
leaq -0x410(%rbp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x3220
xorl %eax, %eax
leaq 0x5cf0(%rip), %rcx      # 0xd690
cmpl (%rcx), %eax
jne 0x79bb
leaq -0x410(%rbp), %rdi
leaq 0x1ff9(%rip), %rsi      # 0x99ab
movb $0x0, %al
callq 0x34d0
jmp 0x79d9
leaq -0x410(%rbp), %rdi
leaq 0x5cc7(%rip), %rax      # 0xd690
movl (%rax), %edx
leaq 0x1fef(%rip), %rsi      # 0x99c1
movb $0x0, %al
callq 0x34d0
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x45c(%rbp)
leaq -0x410(%rbp), %rax
movq %rax, -0x458(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x3160
movl -0x45c(%rbp), %edi
movq -0x458(%rbp), %rsi
movq %rax, %rdx
callq 0x46a0
movq -0x8(%rbp), %rdi
movl $0xd3, %esi
leaq 0x1fc0(%rip), %rdx      # 0x99e5
callq 0x5600
addq $0x460, %rsp            # imm = 0x460
popq %rbp
retq
nopw %cs:(%rax,%rax)