// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]tundra/unittest/googletest/googletest/src/gtest.cc
// Function: testing::internal::StreamingListener::SocketWriter::MakeConnection()
void StreamingListener::SocketWriter::MakeConnection() {
  GTEST_CHECK_(sockfd_ == -1)
      << "MakeConnection() can't be called when there is already a connection.";

  addrinfo hints;
  memset(&hints, 0, sizeof(hints));
  hints.ai_family = AF_UNSPEC;    // To allow both IPv4 and IPv6 addresses.
  hints.ai_socktype = SOCK_STREAM;
  addrinfo* servinfo = NULL;

  // Use the getaddrinfo() to get a linked list of IP addresses for
  // the given host name.
  const int error_num = getaddrinfo(
      host_name_.c_str(), port_num_.c_str(), &hints, &servinfo);
  if (error_num != 0) {
    GTEST_LOG_(WARNING) << "stream_result_to: getaddrinfo() failed: "
                        << gai_strerror(error_num);
  }

  // Loop through all the results and connect to the first we can.
  for (addrinfo* cur_addr = servinfo; sockfd_ == -1 && cur_addr != NULL;
       cur_addr = cur_addr->ai_next) {
    sockfd_ = socket(
        cur_addr->ai_family, cur_addr->ai_socktype, cur_addr->ai_protocol);
    if (sockfd_ != -1) {
      // Connect the client socket to the server socket.
      if (connect(sockfd_, cur_addr->ai_addr, cur_addr->ai_addrlen) == -1) {
        close(sockfd_);
        sockfd_ = -1;
      }
    }
  }

  freeaddrinfo(servinfo);  // all done with this structure

  if (sockfd_ == -1) {
    GTEST_LOG_(WARNING) << "stream_result_to: failed to connect to "
                        << host_name_ << ":" << port_num_;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
cmpl $-0x1, 0x8(%rax)
sete %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x13f80
testb $0x1, %al
jne 0x240bf
jmp 0x240c4
jmp 0x2414a
leaq 0x6643e(%rip), %rdx     # 0x8a509
leaq -0xc(%rbp), %rdi
movq %rdi, -0x88(%rbp)
movl $0x3, %esi
movl $0xed9, %ecx            # imm = 0xED9
callq 0x2dbe0
movq -0x88(%rbp), %rdi
callq 0x305f0
movq %rax, -0x80(%rbp)
jmp 0x240f7
movq -0x80(%rbp), %rdi
leaq 0x66f82(%rip), %rsi     # 0x8b084
callq 0xe750
movq %rax, -0x90(%rbp)
jmp 0x24110
movq -0x90(%rbp), %rdi
leaq 0x66f87(%rip), %rsi     # 0x8b0a5
callq 0xe750
jmp 0x24125
leaq -0xc(%rbp), %rdi
callq 0x2dd20
jmp 0x2414a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0xc(%rbp), %rdi
callq 0x2dd20
jmp 0x243d1
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0xe3c0
movq -0x78(%rbp), %rdi
movl $0x0, -0x4c(%rbp)
movl $0x1, -0x48(%rbp)
movq $0x0, -0x58(%rbp)
addq $0x10, %rdi
callq 0xe2b0
movq -0x78(%rbp), %rdi
movq %rax, -0x98(%rbp)
addq $0x30, %rdi
callq 0xe2b0
movq -0x98(%rbp), %rdi
movq %rax, %rsi
leaq -0x50(%rbp), %rdx
leaq -0x58(%rbp), %rcx
callq 0xea60
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x24245
leaq 0x6634d(%rip), %rdx     # 0x8a509
leaq -0x60(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
movl $0x1, %esi
movl $0xee7, %ecx            # imm = 0xEE7
callq 0x2dbe0
movq -0xa8(%rbp), %rdi
callq 0x305f0
movq %rax, -0xa0(%rbp)
jmp 0x241eb
movq -0xa0(%rbp), %rdi
leaq 0x66ef1(%rip), %rsi     # 0x8b0ea
callq 0xe750
movq %rax, -0xb0(%rbp)
jmp 0x24207
movl -0x5c(%rbp), %edi
callq 0xeb80
movq -0xb0(%rbp), %rdi
movq %rax, %rsi
callq 0xe750
jmp 0x24220
leaq -0x60(%rbp), %rdi
callq 0x2dd20
jmp 0x24245
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x2dd20
jmp 0x243d1
movq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x78(%rbp), %rcx
xorl %eax, %eax
cmpl $-0x1, 0x8(%rcx)
movb %al, -0xb1(%rbp)
jne 0x2426d
cmpq $0x0, -0x68(%rbp)
setne %al
movb %al, -0xb1(%rbp)
movb -0xb1(%rbp), %al
testb $0x1, %al
jne 0x24279
jmp 0x242ee
movq -0x68(%rbp), %rax
movl 0x4(%rax), %edi
movq -0x68(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x68(%rbp), %rax
movl 0xc(%rax), %edx
callq 0xe170
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl %ecx, 0x8(%rax)
cmpl $-0x1, 0x8(%rax)
je 0x242db
movq -0x78(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x68(%rbp), %rax
movl 0x10(%rax), %edx
callq 0xe5e0
cmpl $-0x1, %eax
jne 0x242d9
movq -0x78(%rbp), %rax
movl 0x8(%rax), %edi
callq 0xf020
movq -0x78(%rbp), %rax
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
jmp 0x242db
jmp 0x242dd
movq -0x68(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x2424d
movq -0x58(%rbp), %rdi
callq 0xeac0
movq -0x78(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
jne 0x243c8
leaq 0x661fd(%rip), %rdx     # 0x8a509
leaq -0x6c(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
movl $0x1, %esi
movl $0xefc, %ecx            # imm = 0xEFC
callq 0x2dbe0
movq -0xc8(%rbp), %rdi
callq 0x305f0
movq %rax, -0xc0(%rbp)
jmp 0x2433b
movq -0xc0(%rbp), %rdi
leaq 0x66dca(%rip), %rsi     # 0x8b113
callq 0xe750
movq %rax, -0xd0(%rbp)
jmp 0x24357
movq -0xd0(%rbp), %rdi
movq -0x78(%rbp), %rsi
addq $0x10, %rsi
callq 0xe660
movq %rax, -0xd8(%rbp)
jmp 0x24374
movq -0xd8(%rbp), %rdi
leaq 0x66de3(%rip), %rsi     # 0x8b165
callq 0xe750
movq %rax, -0xe0(%rbp)
jmp 0x24390
movq -0xe0(%rbp), %rdi
movq -0x78(%rbp), %rsi
addq $0x30, %rsi
callq 0xe660
jmp 0x243a6
leaq -0x6c(%rbp), %rdi
callq 0x2dd20
jmp 0x243c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x6c(%rbp), %rdi
callq 0x2dd20
jmp 0x243d1
addq $0xe0, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0xee80
nopw (%rax,%rax)