// File: /workspace/github_c_makefile_star2_O0/zuocheng-liu[P]ae-memcached/src/memcached.c
// Function: stats_malloc_handler
int32_t stats_malloc_handler(char *command, int argc, char ** argv) {
    AE_NOTUSED(command); 
    AE_NOTUSED(argc); 
    conn *c = (conn*)argv;
    char temp[512];
    struct mallinfo info;
    char *pos = temp;
    info = mallinfo();
    pos += sprintf(pos, "STAT arena_size %d\r\n", info.arena);
    pos += sprintf(pos, "STAT free_chunks %d\r\n", info.ordblks);
    pos += sprintf(pos, "STAT fastbin_blocks %d\r\n", info.smblks);
    pos += sprintf(pos, "STAT mmapped_regions %d\r\n", info.hblks);
    pos += sprintf(pos, "STAT mmapped_space %d\r\n", info.hblkhd);
    pos += sprintf(pos, "STAT max_total_alloc %d\r\n", info.usmblks);
    pos += sprintf(pos, "STAT fastbin_space %d\r\n", info.fsmblks);
    pos += sprintf(pos, "STAT total_alloc %d\r\n", info.uordblks);
    pos += sprintf(pos, "STAT total_free %d\r\n", info.fordblks);
    pos += sprintf(pos, "STAT releasable_space %d\r\nEND", info.keepcost);
    out_string(c, temp);
    return COMMAND_OK;
}

// Assembly:
subq $0x288, %rsp            # imm = 0x288
movq %rdi, 0x280(%rsp)
movl %esi, 0x27c(%rsp)
movq %rdx, 0x270(%rsp)
movq 0x270(%rsp), %rax
movq %rax, 0x268(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x2180
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x28, %edx
callq 0x22a0
movq 0x30(%rsp), %rdi
movl 0x38(%rsp), %edx
leaq 0x42f6(%rip), %rsi      # 0xc6ac
movb $0x0, %al
callq 0x2420
movl %eax, %ecx
movq 0x30(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movl 0x3c(%rsp), %edx
leaq 0x42e2(%rip), %rsi      # 0xc6c1
movb $0x0, %al
callq 0x2420
movl %eax, %ecx
movq 0x30(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movl 0x40(%rsp), %edx
leaq 0x42cf(%rip), %rsi      # 0xc6d7
movb $0x0, %al
callq 0x2420
movl %eax, %ecx
movq 0x30(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movl 0x44(%rsp), %edx
leaq 0x42bf(%rip), %rsi      # 0xc6f0
movb $0x0, %al
callq 0x2420
movl %eax, %ecx
movq 0x30(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movl 0x48(%rsp), %edx
leaq 0x42b0(%rip), %rsi      # 0xc70a
movb $0x0, %al
callq 0x2420
movl %eax, %ecx
movq 0x30(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movl 0x4c(%rsp), %edx
leaq 0x429f(%rip), %rsi      # 0xc722
movb $0x0, %al
callq 0x2420
movl %eax, %ecx
movq 0x30(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movl 0x50(%rsp), %edx
leaq 0x4290(%rip), %rsi      # 0xc73c
movb $0x0, %al
callq 0x2420
movl %eax, %ecx
movq 0x30(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movl 0x54(%rsp), %edx
leaq 0x427f(%rip), %rsi      # 0xc754
movb $0x0, %al
callq 0x2420
movl %eax, %ecx
movq 0x30(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movl 0x58(%rsp), %edx
leaq 0x426c(%rip), %rsi      # 0xc76a
movb $0x0, %al
callq 0x2420
movl %eax, %ecx
movq 0x30(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movl 0x5c(%rsp), %edx
leaq 0x4258(%rip), %rsi      # 0xc77f
movb $0x0, %al
callq 0x2420
movl %eax, %ecx
movq 0x30(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x268(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x4fc0
xorl %eax, %eax
addq $0x288, %rsp            # imm = 0x288
retq
nopl (%rax)