// File: /workspace/github_c_makefile_star2_O0/Genymobile[P]hiredis/test.c
// Function: test_throughput
static void test_throughput(struct config config) {
    redisContext *c = connect(config);
    redisReply **replies;
    int i, num;
    long long t1, t2;

    test("Throughput:\n");
    for (i = 0; i < 500; i++)
        freeReplyObject(redisCommand(c,"LPUSH mylist foo"));

    num = 1000;
    replies = malloc(sizeof(redisReply*)*num);
    t1 = usec();
    for (i = 0; i < num; i++) {
        replies[i] = redisCommand(c,"PING");
        assert(replies[i] != NULL && replies[i]->type == REDIS_REPLY_STATUS);
    }
    t2 = usec();
    for (i = 0; i < num; i++) freeReplyObject(replies[i]);
    free(replies);
    printf("\t(%dx PING: %.3fs)\n", num, (t2-t1)/1000000.0);

    replies = malloc(sizeof(redisReply*)*num);
    t1 = usec();
    for (i = 0; i < num; i++) {
        replies[i] = redisCommand(c,"LRANGE mylist 0 499");
        assert(replies[i] != NULL && replies[i]->type == REDIS_REPLY_ARRAY);
        assert(replies[i] != NULL && replies[i]->elements == 500);
    }
    t2 = usec();
    for (i = 0; i < num; i++) freeReplyObject(replies[i]);
    free(replies);
    printf("\t(%dx LRANGE with 500 elements: %.3fs)\n", num, (t2-t1)/1000000.0);

    num = 10000;
    replies = malloc(sizeof(redisReply*)*num);
    for (i = 0; i < num; i++)
        redisAppendCommand(c,"PING");
    t1 = usec();
    for (i = 0; i < num; i++) {
        assert(redisGetReply(c, (void*)&replies[i]) == REDIS_OK);
        assert(replies[i] != NULL && replies[i]->type == REDIS_REPLY_STATUS);
    }
    t2 = usec();
    for (i = 0; i < num; i++) freeReplyObject(replies[i]);
    free(replies);
    printf("\t(%dx PING (pipelined): %.3fs)\n", num, (t2-t1)/1000000.0);

    replies = malloc(sizeof(redisReply*)*num);
    for (i = 0; i < num; i++)
        redisAppendCommand(c,"LRANGE mylist 0 499");
    t1 = usec();
    for (i = 0; i < num; i++) {
        assert(redisGetReply(c, (void*)&replies[i]) == REDIS_OK);
        assert(replies[i] != NULL && replies[i]->type == REDIS_REPLY_ARRAY);
        assert(replies[i] != NULL && replies[i]->elements == 500);
    }
    t2 = usec();
    for (i = 0; i < num; i++) freeReplyObject(replies[i]);
    free(replies);
    printf("\t(%dx LRANGE with 500 elements (pipelined): %.3fs)\n", num, (t2-t1)/1000000.0);

    disconnect(c, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0x10(%rbp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movq %rsp, %rax
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x5550
movq %rax, -0x8(%rbp)
movl 0xd21c(%rip), %esi      # 0x121c0
addl $0x1, %esi
movl %esi, 0xd213(%rip)      # 0x121c0
leaq 0x817a(%rip), %rdi      # 0xd12e
movb $0x0, %al
callq 0x20f0
leaq 0x91a1(%rip), %rdi      # 0xe163
movb $0x0, %al
callq 0x20f0
movl $0x0, -0x14(%rbp)
cmpl $0x1f4, -0x14(%rbp)     # imm = 0x1F4
jge 0x4ffe
movq -0x8(%rbp), %rdi
leaq 0x8c87(%rip), %rsi      # 0xdc6b
movb $0x0, %al
callq 0x7b80
movq %rax, %rdi
callq 0x5880
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4fd0
movl $0x3e8, -0x18(%rbp)     # imm = 0x3E8
movslq -0x18(%rbp), %rdi
shlq $0x3, %rdi
callq 0x21f0
movq %rax, -0x10(%rbp)
callq 0x5810
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x509d
movq -0x8(%rbp), %rdi
leaq 0x8b1c(%rip), %rsi      # 0xdb55
movb $0x0, %al
callq 0x7b80
movq %rax, %rdx
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x5071
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x5, (%rax)
jne 0x5071
jmp 0x5090
leaq 0x90f8(%rip), %rdi      # 0xe170
leaq 0x8848(%rip), %rsi      # 0xd8c7
movl $0x23f, %edx            # imm = 0x23F
leaq 0x9122(%rip), %rcx      # 0xe1ad
callq 0x2130
jmp 0x5092
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5026
callq 0x5810
movq %rax, -0x28(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x50d1
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x5880
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x50ad
movq -0x10(%rbp), %rdi
callq 0x2030
movl -0x18(%rbp), %esi
movq -0x28(%rbp), %rax
subq -0x20(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0x7f26(%rip), %xmm1     # 0xd018
divsd %xmm1, %xmm0
leaq 0x90d4(%rip), %rdi      # 0xe1d1
movb $0x1, %al
callq 0x20f0
movslq -0x18(%rbp), %rdi
shlq $0x3, %rdi
callq 0x21f0
movq %rax, -0x10(%rbp)
callq 0x5810
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x51e9
movq -0x8(%rbp), %rdi
leaq 0x90a9(%rip), %rsi      # 0xe1e5
movb $0x0, %al
callq 0x7b80
movq %rax, %rdx
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x5174
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x2, (%rax)
jne 0x5174
jmp 0x5193
leaq 0x907e(%rip), %rdi      # 0xe1f9
leaq 0x8745(%rip), %rsi      # 0xd8c7
movl $0x24a, %edx            # imm = 0x24A
leaq 0x901f(%rip), %rcx      # 0xe1ad
callq 0x2130
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x51ba
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x1f4, 0x20(%rax)      # imm = 0x1F4
jne 0x51ba
jmp 0x51d9
leaq 0x9074(%rip), %rdi      # 0xe235
leaq 0x86ff(%rip), %rsi      # 0xd8c7
movl $0x24b, %edx            # imm = 0x24B
leaq 0x8fd9(%rip), %rcx      # 0xe1ad
callq 0x2130
jmp 0x51db
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5125
callq 0x5810
movq %rax, -0x28(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x521d
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x5880
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x51f9
movq -0x10(%rbp), %rdi
callq 0x2030
movl -0x18(%rbp), %esi
movq -0x28(%rbp), %rax
subq -0x20(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0x7dda(%rip), %xmm1     # 0xd018
divsd %xmm1, %xmm0
leaq 0x901e(%rip), %rdi      # 0xe267
movb $0x1, %al
callq 0x20f0
movl $0x2710, -0x18(%rbp)    # imm = 0x2710
movslq -0x18(%rbp), %rdi
shlq $0x3, %rdi
callq 0x21f0
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x5294
movq -0x8(%rbp), %rdi
leaq 0x88d3(%rip), %rsi      # 0xdb55
movb $0x0, %al
callq 0x7990
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x526f
callq 0x5810
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x533f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x7710
cmpl $0x0, %eax
jne 0x52cf
jmp 0x52ee
leaq 0x8fb9(%rip), %rdi      # 0xe28f
leaq 0x85ea(%rip), %rsi      # 0xd8c7
movl $0x258, %edx            # imm = 0x258
leaq 0x8ec4(%rip), %rcx      # 0xe1ad
callq 0x2130
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x5310
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x5, (%rax)
jne 0x5310
jmp 0x532f
leaq 0x8e59(%rip), %rdi      # 0xe170
leaq 0x85a9(%rip), %rsi      # 0xd8c7
movl $0x259, %edx            # imm = 0x259
leaq 0x8e83(%rip), %rcx      # 0xe1ad
callq 0x2130
jmp 0x5331
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x52a4
callq 0x5810
movq %rax, -0x28(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x5373
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x5880
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x534f
movq -0x10(%rbp), %rdi
callq 0x2030
movl -0x18(%rbp), %esi
movq -0x28(%rbp), %rax
subq -0x20(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0x7c84(%rip), %xmm1     # 0xd018
divsd %xmm1, %xmm0
leaq 0x8f21(%rip), %rdi      # 0xe2c0
movb $0x1, %al
callq 0x20f0
movslq -0x18(%rbp), %rdi
shlq $0x3, %rdi
callq 0x21f0
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x53e3
movq -0x8(%rbp), %rdi
leaq 0x8e14(%rip), %rsi      # 0xe1e5
movb $0x0, %al
callq 0x7990
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x53be
callq 0x5810
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x54d4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x7710
cmpl $0x0, %eax
jne 0x541e
jmp 0x543d
leaq 0x8e6a(%rip), %rdi      # 0xe28f
leaq 0x849b(%rip), %rsi      # 0xd8c7
movl $0x265, %edx            # imm = 0x265
leaq 0x8d75(%rip), %rcx      # 0xe1ad
callq 0x2130
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x545f
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x2, (%rax)
jne 0x545f
jmp 0x547e
leaq 0x8d93(%rip), %rdi      # 0xe1f9
leaq 0x845a(%rip), %rsi      # 0xd8c7
movl $0x266, %edx            # imm = 0x266
leaq 0x8d34(%rip), %rcx      # 0xe1ad
callq 0x2130
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x54a5
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x1f4, 0x20(%rax)      # imm = 0x1F4
jne 0x54a5
jmp 0x54c4
leaq 0x8d89(%rip), %rdi      # 0xe235
leaq 0x8414(%rip), %rsi      # 0xd8c7
movl $0x267, %edx            # imm = 0x267
leaq 0x8cee(%rip), %rcx      # 0xe1ad
callq 0x2130
jmp 0x54c6
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x53f3
callq 0x5810
movq %rax, -0x28(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x5508
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x5880
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x54e4
movq -0x10(%rbp), %rdi
callq 0x2030
movl -0x18(%rbp), %esi
movq -0x28(%rbp), %rax
subq -0x20(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0x7aef(%rip), %xmm1     # 0xd018
divsd %xmm1, %xmm0
leaq 0x8dac(%rip), %rdi      # 0xe2e0
movb $0x1, %al
callq 0x20f0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x5660
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)