// File: /workspace/github_c_makefile_star2_O0/Genymobile[P]hiredis/test.c
// Function: test_blocking_io_errors
static void test_blocking_io_errors(struct config config) {
    redisContext *c;
    redisReply *reply;
    void *_reply;
    int major, minor;

    /* Connect to target given by config. */
    c = connect(config);
    {
        /* Find out Redis version to determine the path for the next test */
        const char *field = "redis_version:";
        char *p, *eptr;

        reply = redisCommand(c,"INFO");
        p = strstr(reply->str,field);
        major = strtol(p+strlen(field),&eptr,10);
        p = eptr+1; /* char next to the first "." */
        minor = strtol(p,&eptr,10);
        freeReplyObject(reply);
    }

    test("Returns I/O error when the connection is lost: ");
    reply = redisCommand(c,"QUIT");
    if (major > 2 || (major == 2 && minor > 0)) {
        /* > 2.0 returns OK on QUIT and read() should be issued once more
         * to know the descriptor is at EOF. */
        test_cond(strcasecmp(reply->str,"OK") == 0 &&
            redisGetReply(c,&_reply) == REDIS_ERR);
        freeReplyObject(reply);
    } else {
        test_cond(reply == NULL);
    }

    /* On 2.0, QUIT will cause the connection to be closed immediately and
     * the read(2) for the reply on QUIT will set the error to EOF.
     * On >2.0, QUIT will return with OK and another read(2) needed to be
     * issued to find out the socket was closed by the server. In both
     * conditions, the error will be set to EOF. */
    assert(c->err == REDIS_ERR_EOF &&
        strcmp(c->errstr,"Server closed the connection") == 0);
    redisFree(c);

    c = connect(config);
    test("Returns I/O error on socket timeout: ");
    struct timeval tv = { 0, 1000 };
    assert(redisSetTimeout(c,tv) == REDIS_OK);
    test_cond(redisGetReply(c,&_reply) == REDIS_ERR &&
        c->err == REDIS_ERR_IO && errno == EAGAIN);
    redisFree(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
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)
leaq 0x94d0(%rip), %rax      # 0xdf1c
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x94d0(%rip), %rsi      # 0xdf2b
movb $0x0, %al
callq 0x7b80
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x22c0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rdi
callq 0x20d0
movq -0x50(%rbp), %rdi
addq %rax, %rdi
leaq -0x38(%rbp), %rsi
movl $0xa, %edx
callq 0x21c0
movl %eax, -0x1c(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
movl $0xa, %edx
callq 0x21c0
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5880
movl 0xd6ec(%rip), %esi      # 0x121c0
addl $0x1, %esi
movl %esi, 0xd6e3(%rip)      # 0x121c0
leaq 0x864a(%rip), %rdi      # 0xd12e
movb $0x0, %al
callq 0x20f0
leaq 0x943e(%rip), %rdi      # 0xdf30
movb $0x0, %al
callq 0x20f0
movq -0x8(%rbp), %rdi
leaq 0x945c(%rip), %rsi      # 0xdf60
movb $0x0, %al
callq 0x7b80
movq %rax, -0x10(%rbp)
cmpl $0x2, -0x1c(%rbp)
jg 0x4b21
cmpl $0x2, -0x1c(%rbp)
jne 0x4b84
cmpl $0x0, -0x20(%rbp)
jle 0x4b84
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0x978d(%rip), %rsi      # 0xe2bd
callq 0x2040
cmpl $0x0, %eax
jne 0x4b5c
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x7710
cmpl $-0x1, %eax
jne 0x4b5c
leaq 0x8635(%rip), %rdi      # 0xd188
movb $0x0, %al
callq 0x20f0
jmp 0x4b79
leaq 0x863a(%rip), %rdi      # 0xd19d
movb $0x0, %al
callq 0x20f0
movl 0xd64c(%rip), %eax      # 0x121bc
addl $0x1, %eax
movl %eax, 0xd643(%rip)      # 0x121bc
movq -0x10(%rbp), %rdi
callq 0x5880
jmp 0x4bba
cmpq $0x0, -0x10(%rbp)
jne 0x4b9b
leaq 0x85f6(%rip), %rdi      # 0xd188
movb $0x0, %al
callq 0x20f0
jmp 0x4bb8
leaq 0x85fb(%rip), %rdi      # 0xd19d
movb $0x0, %al
callq 0x20f0
movl 0xd60d(%rip), %eax      # 0x121bc
addl $0x1, %eax
movl %eax, 0xd604(%rip)      # 0x121bc
jmp 0x4bba
movq -0x8(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x4bde
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
leaq 0x9393(%rip), %rsi      # 0xdf65
callq 0x21a0
cmpl $0x0, %eax
jne 0x4bde
jmp 0x4bfd
leaq 0x939d(%rip), %rdi      # 0xdf82
leaq 0x8cdb(%rip), %rsi      # 0xd8c7
movl $0x20c, %edx            # imm = 0x20C
leaq 0x93db(%rip), %rcx      # 0xdfd3
callq 0x2130
movq -0x8(%rbp), %rdi
callq 0x6c60
movq -0x58(%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 0xd58e(%rip), %esi      # 0x121c0
addl $0x1, %esi
movl %esi, 0xd585(%rip)      # 0x121c0
leaq 0x84ec(%rip), %rdi      # 0xd12e
movb $0x0, %al
callq 0x20f0
leaq 0x93af(%rip), %rdi      # 0xdfff
movb $0x0, %al
callq 0x20f0
movq 0x972a(%rip), %rax      # 0xe388
movq %rax, -0x48(%rbp)
movq 0x9727(%rip), %rax      # 0xe390
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x7370
cmpl $0x0, %eax
jne 0x4c85
jmp 0x4ca4
leaq 0x9399(%rip), %rdi      # 0xe025
leaq 0x8c34(%rip), %rsi      # 0xd8c7
movl $0x212, %edx            # imm = 0x212
leaq 0x9334(%rip), %rcx      # 0xdfd3
callq 0x2130
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x7710
cmpl $-0x1, %eax
jne 0x4cd9
movq -0x8(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x4cd9
callq 0x2050
cmpl $0xb, (%rax)
jne 0x4cd9
leaq 0x84b8(%rip), %rdi      # 0xd188
movb $0x0, %al
callq 0x20f0
jmp 0x4cf6
leaq 0x84bd(%rip), %rdi      # 0xd19d
movb $0x0, %al
callq 0x20f0
movl 0xd4cf(%rip), %eax      # 0x121bc
addl $0x1, %eax
movl %eax, 0xd4c6(%rip)      # 0x121bc
movq -0x8(%rbp), %rdi
callq 0x6c60
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)