// File: /workspace/github_c_makefile_star2_O0/Genymobile[P]hiredis/test.c
// Function: test_blocking_connection
static void test_blocking_connection(struct config config) {
    redisContext *c;
    redisReply *reply;

    c = connect(config);

    test("Is able to deliver commands: ");
    reply = redisCommand(c,"PING");
    test_cond(reply->type == REDIS_REPLY_STATUS &&
        strcasecmp(reply->str,"pong") == 0)
    freeReplyObject(reply);

    test("Is a able to send commands verbatim: ");
    reply = redisCommand(c,"SET foo bar");
    test_cond (reply->type == REDIS_REPLY_STATUS &&
        strcasecmp(reply->str,"ok") == 0)
    freeReplyObject(reply);

    test("%%s String interpolation works: ");
    reply = redisCommand(c,"SET %s %s","foo","hello world");
    freeReplyObject(reply);
    reply = redisCommand(c,"GET foo");
    test_cond(reply->type == REDIS_REPLY_STRING &&
        strcmp(reply->str,"hello world") == 0);
    freeReplyObject(reply);

    test("%%b String interpolation works: ");
    reply = redisCommand(c,"SET %b %b","foo",(size_t)3,"hello\x00world",(size_t)11);
    freeReplyObject(reply);
    reply = redisCommand(c,"GET foo");
    test_cond(reply->type == REDIS_REPLY_STRING &&
        memcmp(reply->str,"hello\x00world",11) == 0)

    test("Binary reply length is correct: ");
    test_cond(reply->len == 11)
    freeReplyObject(reply);

    test("Can parse nil replies: ");
    reply = redisCommand(c,"GET nokey");
    test_cond(reply->type == REDIS_REPLY_NIL)
    freeReplyObject(reply);

    /* test 7 */
    test("Can parse integer replies: ");
    reply = redisCommand(c,"INCR mycounter");
    test_cond(reply->type == REDIS_REPLY_INTEGER && reply->integer == 1)
    freeReplyObject(reply);

    test("Can parse multi bulk replies: ");
    freeReplyObject(redisCommand(c,"LPUSH mylist foo"));
    freeReplyObject(redisCommand(c,"LPUSH mylist bar"));
    reply = redisCommand(c,"LRANGE mylist 0 -1");
    test_cond(reply->type == REDIS_REPLY_ARRAY &&
              reply->elements == 2 &&
              !memcmp(reply->element[0]->str,"bar",3) &&
              !memcmp(reply->element[1]->str,"foo",3))
    freeReplyObject(reply);

    /* m/e with multi bulk reply *before* other reply.
     * specifically test ordering of reply items to parse. */
    test("Can handle nested multi bulk replies: ");
    freeReplyObject(redisCommand(c,"MULTI"));
    freeReplyObject(redisCommand(c,"LRANGE mylist 0 -1"));
    freeReplyObject(redisCommand(c,"PING"));
    reply = (redisCommand(c,"EXEC"));
    test_cond(reply->type == REDIS_REPLY_ARRAY &&
              reply->elements == 2 &&
              reply->element[0]->type == REDIS_REPLY_ARRAY &&
              reply->element[0]->elements == 2 &&
              !memcmp(reply->element[0]->element[0]->str,"bar",3) &&
              !memcmp(reply->element[0]->element[1]->str,"foo",3) &&
              reply->element[1]->type == REDIS_REPLY_STATUS &&
              strcasecmp(reply->element[1]->str,"pong") == 0);
    freeReplyObject(reply);

    disconnect(c, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %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 0xe26c(%rip), %esi      # 0x121c0
addl $0x1, %esi
movl %esi, 0xe263(%rip)      # 0x121c0
leaq 0x91ca(%rip), %rdi      # 0xd12e
movb $0x0, %al
callq 0x20f0
leaq 0x9bc5(%rip), %rdi      # 0xdb37
movb $0x0, %al
callq 0x20f0
movq -0x8(%rbp), %rdi
leaq 0x9bd1(%rip), %rsi      # 0xdb55
movb $0x0, %al
callq 0x7b80
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x5, (%rax)
jne 0x3fc1
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0x9bb3(%rip), %rsi      # 0xdb5a
callq 0x2040
cmpl $0x0, %eax
jne 0x3fc1
leaq 0x91d0(%rip), %rdi      # 0xd188
movb $0x0, %al
callq 0x20f0
jmp 0x3fde
leaq 0x91d5(%rip), %rdi      # 0xd19d
movb $0x0, %al
callq 0x20f0
movl 0xe1e7(%rip), %eax      # 0x121bc
addl $0x1, %eax
movl %eax, 0xe1de(%rip)      # 0x121bc
movq -0x10(%rbp), %rdi
callq 0x5880
movl 0xe1d3(%rip), %esi      # 0x121c0
addl $0x1, %esi
movl %esi, 0xe1ca(%rip)      # 0x121c0
leaq 0x9131(%rip), %rdi      # 0xd12e
movb $0x0, %al
callq 0x20f0
leaq 0x9b54(%rip), %rdi      # 0xdb5f
movb $0x0, %al
callq 0x20f0
movq -0x8(%rbp), %rdi
leaq 0x913f(%rip), %rsi      # 0xd15c
movb $0x0, %al
callq 0x7b80
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x5, (%rax)
jne 0x405a
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0x9b45(%rip), %rsi      # 0xdb85
callq 0x2040
cmpl $0x0, %eax
jne 0x405a
leaq 0x9137(%rip), %rdi      # 0xd188
movb $0x0, %al
callq 0x20f0
jmp 0x4077
leaq 0x913c(%rip), %rdi      # 0xd19d
movb $0x0, %al
callq 0x20f0
movl 0xe14e(%rip), %eax      # 0x121bc
addl $0x1, %eax
movl %eax, 0xe145(%rip)      # 0x121bc
movq -0x10(%rbp), %rdi
callq 0x5880
movl 0xe13a(%rip), %esi      # 0x121c0
addl $0x1, %esi
movl %esi, 0xe131(%rip)      # 0x121c0
leaq 0x9098(%rip), %rdi      # 0xd12e
movb $0x0, %al
callq 0x20f0
leaq 0x9ae4(%rip), %rdi      # 0xdb88
movb $0x0, %al
callq 0x20f0
movq -0x8(%rbp), %rdi
leaq 0x912b(%rip), %rsi      # 0xd1e1
leaq 0x9afc(%rip), %rdx      # 0xdbb9
leaq 0x9ae5(%rip), %rcx      # 0xdba9
movb $0x0, %al
callq 0x7b80
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5880
movq -0x8(%rbp), %rdi
leaq 0x9ad2(%rip), %rsi      # 0xdbb5
movb $0x0, %al
callq 0x7b80
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x4120
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0x9aa3(%rip), %rsi      # 0xdba9
callq 0x21a0
cmpl $0x0, %eax
jne 0x4120
leaq 0x9071(%rip), %rdi      # 0xd188
movb $0x0, %al
callq 0x20f0
jmp 0x413d
leaq 0x9076(%rip), %rdi      # 0xd19d
movb $0x0, %al
callq 0x20f0
movl 0xe088(%rip), %eax      # 0x121bc
addl $0x1, %eax
movl %eax, 0xe07f(%rip)      # 0x121bc
movq -0x10(%rbp), %rdi
callq 0x5880
movl 0xe074(%rip), %esi      # 0x121c0
addl $0x1, %esi
movl %esi, 0xe06b(%rip)      # 0x121c0
leaq 0x8fd2(%rip), %rdi      # 0xd12e
movb $0x0, %al
callq 0x20f0
leaq 0x9a53(%rip), %rdi      # 0xdbbd
movb $0x0, %al
callq 0x20f0
movq -0x8(%rbp), %rdi
leaq 0x914d(%rip), %rsi      # 0xd2c9
leaq 0x9a36(%rip), %rdx      # 0xdbb9
movl $0x3, %ecx
leaq 0xa1ed(%rip), %r8       # 0xe37c
movl $0xb, %r9d
movb $0x0, %al
callq 0x7b80
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5880
movq -0x8(%rbp), %rdi
leaq 0x9a01(%rip), %rsi      # 0xdbb5
movb $0x0, %al
callq 0x7b80
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x41f6
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0xa1a5(%rip), %rsi      # 0xe37c
movl $0xb, %edx
callq 0x2170
cmpl $0x0, %eax
jne 0x41f6
leaq 0x8f9b(%rip), %rdi      # 0xd188
movb $0x0, %al
callq 0x20f0
jmp 0x4213
leaq 0x8fa0(%rip), %rdi      # 0xd19d
movb $0x0, %al
callq 0x20f0
movl 0xdfb2(%rip), %eax      # 0x121bc
addl $0x1, %eax
movl %eax, 0xdfa9(%rip)      # 0x121bc
movl 0xdfa7(%rip), %esi      # 0x121c0
addl $0x1, %esi
movl %esi, 0xdf9e(%rip)      # 0x121c0
leaq 0x8f05(%rip), %rdi      # 0xd12e
movb $0x0, %al
callq 0x20f0
leaq 0x99a7(%rip), %rdi      # 0xdbde
movb $0x0, %al
callq 0x20f0
movq -0x10(%rbp), %rax
cmpl $0xb, 0x10(%rax)
jne 0x4258
leaq 0x8f39(%rip), %rdi      # 0xd188
movb $0x0, %al
callq 0x20f0
jmp 0x4275
leaq 0x8f3e(%rip), %rdi      # 0xd19d
movb $0x0, %al
callq 0x20f0
movl 0xdf50(%rip), %eax      # 0x121bc
addl $0x1, %eax
movl %eax, 0xdf47(%rip)      # 0x121bc
movq -0x10(%rbp), %rdi
callq 0x5880
movl 0xdf3c(%rip), %esi      # 0x121c0
addl $0x1, %esi
movl %esi, 0xdf33(%rip)      # 0x121c0
leaq 0x8e9a(%rip), %rdi      # 0xd12e
movb $0x0, %al
callq 0x20f0
leaq 0x995d(%rip), %rdi      # 0xdbff
movb $0x0, %al
callq 0x20f0
movq -0x8(%rbp), %rdi
leaq 0x9963(%rip), %rsi      # 0xdc17
movb $0x0, %al
callq 0x7b80
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x4, (%rax)
jne 0x42d8
leaq 0x8eb9(%rip), %rdi      # 0xd188
movb $0x0, %al
callq 0x20f0
jmp 0x42f5
leaq 0x8ebe(%rip), %rdi      # 0xd19d
movb $0x0, %al
callq 0x20f0
movl 0xded0(%rip), %eax      # 0x121bc
addl $0x1, %eax
movl %eax, 0xdec7(%rip)      # 0x121bc
movq -0x10(%rbp), %rdi
callq 0x5880
movl 0xdebc(%rip), %esi      # 0x121c0
addl $0x1, %esi
movl %esi, 0xdeb3(%rip)      # 0x121c0
leaq 0x8e1a(%rip), %rdi      # 0xd12e
movb $0x0, %al
callq 0x20f0
leaq 0x98ff(%rip), %rdi      # 0xdc21
movb $0x0, %al
callq 0x20f0
movq -0x8(%rbp), %rdi
leaq 0x9909(%rip), %rsi      # 0xdc3d
movb $0x0, %al
callq 0x7b80
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x4363
movq -0x10(%rbp), %rax
cmpq $0x1, 0x8(%rax)
jne 0x4363
leaq 0x8e2e(%rip), %rdi      # 0xd188
movb $0x0, %al
callq 0x20f0
jmp 0x4380
leaq 0x8e33(%rip), %rdi      # 0xd19d
movb $0x0, %al
callq 0x20f0
movl 0xde45(%rip), %eax      # 0x121bc
addl $0x1, %eax
movl %eax, 0xde3c(%rip)      # 0x121bc
movq -0x10(%rbp), %rdi
callq 0x5880
movl 0xde31(%rip), %esi      # 0x121c0
addl $0x1, %esi
movl %esi, 0xde28(%rip)      # 0x121c0
leaq 0x8d8f(%rip), %rdi      # 0xd12e
movb $0x0, %al
callq 0x20f0
leaq 0x989f(%rip), %rdi      # 0xdc4c
movb $0x0, %al
callq 0x20f0
movq -0x8(%rbp), %rdi
leaq 0x98ac(%rip), %rsi      # 0xdc6b
movb $0x0, %al
callq 0x7b80
movq %rax, %rdi
callq 0x5880
movq -0x8(%rbp), %rdi
leaq 0x98a3(%rip), %rsi      # 0xdc7c
movb $0x0, %al
callq 0x7b80
movq %rax, %rdi
callq 0x5880
movq -0x8(%rbp), %rdi
leaq 0x989a(%rip), %rsi      # 0xdc8d
movb $0x0, %al
callq 0x7b80
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x446d
movq -0x10(%rbp), %rax
cmpq $0x2, 0x20(%rax)
jne 0x446d
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
leaq 0x8d3c(%rip), %rsi      # 0xd164
movl $0x3, %edx
callq 0x2170
cmpl $0x0, %eax
jne 0x446d
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
leaq 0x976b(%rip), %rsi      # 0xdbb9
movl $0x3, %edx
callq 0x2170
cmpl $0x0, %eax
jne 0x446d
leaq 0x8d24(%rip), %rdi      # 0xd188
movb $0x0, %al
callq 0x20f0
jmp 0x448a
leaq 0x8d29(%rip), %rdi      # 0xd19d
movb $0x0, %al
callq 0x20f0
movl 0xdd3b(%rip), %eax      # 0x121bc
addl $0x1, %eax
movl %eax, 0xdd32(%rip)      # 0x121bc
movq -0x10(%rbp), %rdi
callq 0x5880
movl 0xdd27(%rip), %esi      # 0x121c0
addl $0x1, %esi
movl %esi, 0xdd1e(%rip)      # 0x121c0
leaq 0x8c85(%rip), %rdi      # 0xd12e
movb $0x0, %al
callq 0x20f0
leaq 0x97e9(%rip), %rdi      # 0xdca0
movb $0x0, %al
callq 0x20f0
movq -0x8(%rbp), %rdi
leaq 0x97fe(%rip), %rsi      # 0xdcc7
movb $0x0, %al
callq 0x7b80
movq %rax, %rdi
callq 0x5880
movq -0x8(%rbp), %rdi
leaq 0x97aa(%rip), %rsi      # 0xdc8d
movb $0x0, %al
callq 0x7b80
movq %rax, %rdi
callq 0x5880
movq -0x8(%rbp), %rdi
leaq 0x9658(%rip), %rsi      # 0xdb55
movb $0x0, %al
callq 0x7b80
movq %rax, %rdi
callq 0x5880
movq -0x8(%rbp), %rdi
leaq 0x97b6(%rip), %rsi      # 0xdccd
movb $0x0, %al
callq 0x7b80
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x4603
movq -0x10(%rbp), %rax
cmpq $0x2, 0x20(%rax)
jne 0x4603
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
cmpl $0x2, (%rax)
jne 0x4603
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
cmpq $0x2, 0x20(%rax)
jne 0x4603
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
leaq 0x8bdf(%rip), %rsi      # 0xd164
movl $0x3, %edx
callq 0x2170
cmpl $0x0, %eax
jne 0x4603
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
leaq 0x9607(%rip), %rsi      # 0xdbb9
movl $0x3, %edx
callq 0x2170
cmpl $0x0, %eax
jne 0x4603
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
cmpl $0x5, (%rax)
jne 0x4603
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
leaq 0x9571(%rip), %rsi      # 0xdb5a
callq 0x2040
cmpl $0x0, %eax
jne 0x4603
leaq 0x8b8e(%rip), %rdi      # 0xd188
movb $0x0, %al
callq 0x20f0
jmp 0x4620
leaq 0x8b93(%rip), %rdi      # 0xd19d
movb $0x0, %al
callq 0x20f0
movl 0xdba5(%rip), %eax      # 0x121bc
addl $0x1, %eax
movl %eax, 0xdb9c(%rip)      # 0x121bc
movq -0x10(%rbp), %rdi
callq 0x5880
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x5660
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)