// File: /workspace/github_c_makefile_star2_O0/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: process_try
void process_try(conn *c,char *command){
    unsigned long long n,m;
    int k;
    double tmp_e;
    
    char tmp[1024];
    char *pos = tmp;
    double e;
       if (2 != sscanf(command + 3,"%llu|%lf",&n,&e)) {
        out_string(c, "CLIENT_ERROR bad command line format,command like this 'try 100000|0.001'");    
        return;
    }
    size_t bytes = calculate(n,e,&m,&k,&tmp_e);
    if(bytes > 0 ){
        pos += sprintf(pos, "need_memory %lu(Bytes) ",(unsigned long)bytes);
        float bytes_m = (float)bytes/(1024*1024);
        if(bytes_m >= 1){
            pos += sprintf(pos, "%.3f(M) ",bytes_m);
        }
        float bytes_g = bytes_m/1024;
        
        if(bytes_g >= 1){
            pos += sprintf(pos, "%.3f(G) ",bytes_g);
        }
        pos += sprintf(pos, "\r\nuse_function_num %d \r\n",k);
        pos += sprintf(pos, "false_positive_rate  %lf\r\n",tmp_e);
        pos += sprintf(pos, "END");
        out_string(c,tmp);
    }else{
        out_string(c, "CALCULATE ERROR");
    }
    return;
    
}

// Assembly:
subq $0x468, %rsp            # imm = 0x468
movq %rdi, 0x460(%rsp)
movq %rsi, 0x458(%rsp)
leaq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x458(%rsp), %rdi
addq $0x3, %rdi
leaq 0x36a8(%rip), %rsi      # 0x73cc
leaq 0x450(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movb $0x0, %al
callq 0x22b0
movl %eax, %ecx
movl $0x2, %eax
cmpl %ecx, %eax
je 0x3d5c
movq 0x460(%rsp), %rdi
leaq 0x3683(%rip), %rsi      # 0x73d5
callq 0x3b60
jmp 0x3f5d
movq 0x450(%rsp), %rdi
movsd 0x20(%rsp), %xmm0
leaq 0x448(%rsp), %rsi
leaq 0x444(%rsp), %rdx
leaq 0x438(%rsp), %rcx
callq 0x25b0
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jbe 0x3f47
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x3676(%rip), %rsi      # 0x741f
xorl %eax, %eax
callq 0x23d0
movl %eax, %ecx
movq 0x28(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x18(%rsp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, 0x8(%rsp)
testq %rax, %rax
movss %xmm0, 0xc(%rsp)
js 0x3e00
movss 0x8(%rsp), %xmm0
movss %xmm0, 0xc(%rsp)
movss 0xc(%rsp), %xmm0
movss 0x3436(%rip), %xmm1     # 0x7244
divss %xmm1, %xmm0
movss %xmm0, 0x14(%rsp)
movss 0x14(%rsp), %xmm0
movss 0x341a(%rip), %xmm1     # 0x7240
ucomiss %xmm1, %xmm0
jb 0x3e5a
movq 0x28(%rsp), %rdi
movss 0x14(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x35f6(%rip), %rsi      # 0x7437
movb $0x1, %al
callq 0x23d0
movl %eax, %ecx
movq 0x28(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movss 0x14(%rsp), %xmm0
movss 0x33e0(%rip), %xmm1     # 0x7248
divss %xmm1, %xmm0
movss %xmm0, 0x10(%rsp)
movss 0x10(%rsp), %xmm0
movss 0x33c0(%rip), %xmm1     # 0x7240
ucomiss %xmm1, %xmm0
jb 0x3eb4
movq 0x28(%rsp), %rdi
movss 0x10(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x35a5(%rip), %rsi      # 0x7440
movb $0x1, %al
callq 0x23d0
movl %eax, %ecx
movq 0x28(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl 0x444(%rsp), %edx
leaq 0x3582(%rip), %rsi      # 0x7449
movb $0x0, %al
callq 0x23d0
movl %eax, %ecx
movq 0x28(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movsd 0x438(%rsp), %xmm0
leaq 0x356d(%rip), %rsi      # 0x7462
movb $0x1, %al
callq 0x23d0
movl %eax, %ecx
movq 0x28(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x3563(%rip), %rsi      # 0x747d
movb $0x0, %al
callq 0x23d0
movl %eax, %ecx
movq 0x28(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x460(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3b60
jmp 0x3f5b
movq 0x460(%rsp), %rdi
leaq 0x352b(%rip), %rsi      # 0x7481
callq 0x3b60
jmp 0x3f5d
addq $0x468, %rsp            # imm = 0x468
retq
nopw %cs:(%rax,%rax)