// File: /workspace/github_c_makefile_star2_O0/andyfighting[P]hiredis_timer_cmpt/test.c
// Function: test_blocking_connection_errors
static void test_blocking_connection_errors(void) {
    redisContext *c;

    test("Returns error when host cannot be resolved: ");
    c = redisConnect((char*)"idontexist.test", 6379);
    test_cond(c->err == REDIS_ERR_OTHER &&
        (strcmp(c->errstr,"Name or service not known") == 0 ||
         strcmp(c->errstr,"Can't resolve: idontexist.test") == 0 ||
         strcmp(c->errstr,"nodename nor servname provided, or not known") == 0 ||
         strcmp(c->errstr,"No address associated with hostname") == 0 ||
         strcmp(c->errstr,"Temporary failure in name resolution") == 0 ||
         strcmp(c->errstr,"hostname nor servname provided, or not known") == 0 ||
         strcmp(c->errstr,"no address associated with name") == 0));
    redisFree(c);

    test("Returns error when the port is not open: ");
    c = redisConnect((char*)"localhost", 1);
    test_cond(c->err == REDIS_ERR_IO &&
        strcmp(c->errstr,"Connection refused") == 0);
    redisFree(c);

    test("Returns error when the unix socket path doesn't accept connections: ");
    c = redisConnectUnix((char*)"/tmp/idontexist.sock");
    test_cond(c->err == REDIS_ERR_IO); /* Don't care about the message... */
    redisFree(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl 0xe542(%rip), %esi      # 0x121d0
addl $0x1, %esi
movl %esi, 0xe539(%rip)      # 0x121d0
leaq 0x9490(%rip), %rdi      # 0xd12e
movb $0x0, %al
callq 0x2100
leaq 0x9caf(%rip), %rdi      # 0xd95b
movb $0x0, %al
callq 0x2100
leaq 0x9cf7(%rip), %rdi      # 0xd9b1
movl $0x18eb, %esi           # imm = 0x18EB
callq 0x6fb0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x3d98
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
leaq 0x9ca4(%rip), %rsi      # 0xd988
callq 0x21b0
cmpl $0x0, %eax
je 0x3d88
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
leaq 0x9ca1(%rip), %rsi      # 0xd9a2
callq 0x21b0
cmpl $0x0, %eax
je 0x3d88
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
leaq 0x9ca7(%rip), %rsi      # 0xd9c1
callq 0x21b0
cmpl $0x0, %eax
je 0x3d88
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
leaq 0x9cbb(%rip), %rsi      # 0xd9ee
callq 0x21b0
cmpl $0x0, %eax
je 0x3d88
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
leaq 0x9cc6(%rip), %rsi      # 0xda12
callq 0x21b0
cmpl $0x0, %eax
je 0x3d88
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
leaq 0x9cd2(%rip), %rsi      # 0xda37
callq 0x21b0
cmpl $0x0, %eax
je 0x3d88
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
leaq 0x9ce6(%rip), %rsi      # 0xda64
callq 0x21b0
cmpl $0x0, %eax
jne 0x3d98
leaq 0x93f9(%rip), %rdi      # 0xd188
movb $0x0, %al
callq 0x2100
jmp 0x3db5
leaq 0x93fe(%rip), %rdi      # 0xd19d
movb $0x0, %al
callq 0x2100
movl 0xe420(%rip), %eax      # 0x121cc
addl $0x1, %eax
movl %eax, 0xe417(%rip)      # 0x121cc
movq -0x8(%rbp), %rdi
callq 0x6d30
movl 0xe40c(%rip), %esi      # 0x121d0
addl $0x1, %esi
movl %esi, 0xe403(%rip)      # 0x121d0
leaq 0x935a(%rip), %rdi      # 0xd12e
movb $0x0, %al
callq 0x2100
leaq 0x9ca2(%rip), %rdi      # 0xda84
movb $0x0, %al
callq 0x2100
leaq 0x9cbe(%rip), %rdi      # 0xdaae
movl $0x1, %esi
callq 0x6fb0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x3e30
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
leaq 0x9ca2(%rip), %rsi      # 0xdab8
callq 0x21b0
cmpl $0x0, %eax
jne 0x3e30
leaq 0x9361(%rip), %rdi      # 0xd188
movb $0x0, %al
callq 0x2100
jmp 0x3e4d
leaq 0x9366(%rip), %rdi      # 0xd19d
movb $0x0, %al
callq 0x2100
movl 0xe388(%rip), %eax      # 0x121cc
addl $0x1, %eax
movl %eax, 0xe37f(%rip)      # 0x121cc
movq -0x8(%rbp), %rdi
callq 0x6d30
movl 0xe374(%rip), %esi      # 0x121d0
addl $0x1, %esi
movl %esi, 0xe36b(%rip)      # 0x121d0
leaq 0x92c2(%rip), %rdi      # 0xd12e
movb $0x0, %al
callq 0x2100
leaq 0x9c51(%rip), %rdi      # 0xdacb
movb $0x0, %al
callq 0x2100
leaq 0x9c88(%rip), %rdi      # 0xdb10
callq 0x72c0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x3eaa
leaq 0x92e7(%rip), %rdi      # 0xd188
movb $0x0, %al
callq 0x2100
jmp 0x3ec7
leaq 0x92ec(%rip), %rdi      # 0xd19d
movb $0x0, %al
callq 0x2100
movl 0xe30e(%rip), %eax      # 0x121cc
addl $0x1, %eax
movl %eax, 0xe305(%rip)      # 0x121cc
movq -0x8(%rbp), %rdi
callq 0x6d30
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)