#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct sockaddr_in6 {
  int /*<<< orphan*/ sin6_addr;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_addr;
};
struct ifaddrs {
  int ifa_flags;
  TYPE_1__ *ifa_addr;
  int /*<<< orphan*/ ifa_name;
  struct ifaddrs *ifa_next;
};
typedef int /*<<< orphan*/ buf;
struct TYPE_2__ {
  int const sa_family;
};

/* Variables and functions */
#define AF_INET 129
#define AF_INET6 128
int IFF_UP;
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ freeifaddrs(struct ifaddrs *);
scalar_t__ getifaddrs(struct ifaddrs **);
int /*<<< orphan*/ *inet_ntop(int const, void *, char *, int);
scalar_t__ strcmp(char const *const, int /*<<< orphan*/);
char *strdup(char *);
char *get_ip_from_ifname(const int inet_family, const char *const ifname) {
  char *retv = NULL;
  struct ifaddrs *myaddrs;
  struct ifaddrs *ifa;
  struct sockaddr_in *s4;
  struct sockaddr_in6 *s6;
  char buf[64] = {'\0'};
  if (getifaddrs(&myaddrs))
    return NULL;
  switch (inet_family) {
  case AF_INET:
  case AF_INET6:
    break;
  default:
    return NULL;
  }
  for (ifa = myaddrs; ifa != NULL; ifa = ifa->ifa_next) {
    if (NULL == ifa->ifa_addr)
      continue;
    if (0 == (ifa->ifa_flags & IFF_UP))
      continue;
    if (strcmp(ifname, ifa->ifa_name))
      continue;
    if (AF_INET == inet_family) {
      if (ifa->ifa_addr->sa_family == AF_INET) {
        s4 = (struct sockaddr_in *)(ifa->ifa_addr);
        if (inet_ntop(ifa->ifa_addr->sa_family, (void *)&(s4->sin_addr), buf,
                      sizeof(buf)) == NULL) {
          break;
        } else {
          retv = strdup(buf);
          break;
        }
      }
    }
    if (AF_INET6 == inet_family) {
      if (ifa->ifa_addr->sa_family == AF_INET6) {
        s6 = (struct sockaddr_in6 *)(ifa->ifa_addr);
        if (inet_ntop(ifa->ifa_addr->sa_family, (void *)&(s6->sin6_addr), buf,
                      sizeof(buf)) == NULL) {
          break;
        } else {
          retv = strdup(buf);
          break;
        }
      }
    }
  }
  freeifaddrs(myaddrs);
  if (retv && ('\0' == retv[0])) {
    free(retv);
    retv = NULL;
  }
  return retv;
}


x86 assembly (clang, -O0):
<get_ip_from_ifname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1050 <memset@plt>
lea    -0x28(%rbp),%rdi
call   1070 <getifaddrs@plt>
cmp    $0x0,%rax
je     11ba <get_ip_from_ifname+0x4a>
movq   $0x0,-0x8(%rbp)
jmp    1379 <get_ip_from_ifname+0x209>
mov    -0xc(%rbp),%eax
add    $0xffffff80,%eax
sub    $0x1,%eax
ja     11d3 <get_ip_from_ifname+0x63>
jmp    11ce <get_ip_from_ifname+0x5e>
jmp    11e0 <get_ip_from_ifname+0x70>
movq   $0x0,-0x8(%rbp)
jmp    1379 <get_ip_from_ifname+0x209>
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     133b <get_ip_from_ifname+0x1cb>
mov    -0x30(%rbp),%rcx
xor    %eax,%eax
cmp    0x8(%rcx),%rax
jne    1208 <get_ip_from_ifname+0x98>
jmp    132a <get_ip_from_ifname+0x1ba>
mov    -0x30(%rbp),%rax
mov    (%rax),%ecx
mov    0x2dd3(%rip),%rax
and    (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    1226 <get_ip_from_ifname+0xb6>
jmp    132a <get_ip_from_ifname+0x1ba>
mov    -0x18(%rbp),%rdi
mov    -0x30(%rbp),%rax
mov    0x10(%rax),%esi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1245 <get_ip_from_ifname+0xd5>
jmp    132a <get_ip_from_ifname+0x1ba>
mov    $0x81,%eax
cmp    -0xc(%rbp),%eax
jne    12b5 <get_ip_from_ifname+0x145>
mov    -0x30(%rbp),%rax
mov    0x8(%rax),%rax
cmpl   $0x81,(%rax)
jne    12b0 <get_ip_from_ifname+0x140>
mov    -0x30(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rsi
lea    -0x80(%rbp),%rdx
mov    $0x40,%ecx
call   1030 <inet_ntop@plt>
cmp    $0x0,%rax
jne    129e <get_ip_from_ifname+0x12e>
jmp    133b <get_ip_from_ifname+0x1cb>
lea    -0x80(%rbp),%rdi
call   1090 <strdup@plt>
mov    %rax,-0x20(%rbp)
jmp    133b <get_ip_from_ifname+0x1cb>
jmp    12b5 <get_ip_from_ifname+0x145>
mov    $0x80,%eax
cmp    -0xc(%rbp),%eax
jne    1325 <get_ip_from_ifname+0x1b5>
mov    -0x30(%rbp),%rax
mov    0x8(%rax),%rax
cmpl   $0x80,(%rax)
jne    1320 <get_ip_from_ifname+0x1b0>
mov    -0x30(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x40(%rbp)
mov    -0x30(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%edi
mov    -0x40(%rbp),%rsi
lea    -0x80(%rbp),%rdx
mov    $0x40,%ecx
call   1030 <inet_ntop@plt>
cmp    $0x0,%rax
jne    130e <get_ip_from_ifname+0x19e>
jmp    133b <get_ip_from_ifname+0x1cb>
lea    -0x80(%rbp),%rdi
call   1090 <strdup@plt>
mov    %rax,-0x20(%rbp)
jmp    133b <get_ip_from_ifname+0x1cb>
jmp    1325 <get_ip_from_ifname+0x1b5>
jmp    132a <get_ip_from_ifname+0x1ba>
mov    -0x30(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x30(%rbp)
jmp    11e8 <get_ip_from_ifname+0x78>
mov    -0x28(%rbp),%rdi
call   1080 <freeifaddrs@plt>
cmpq   $0x0,-0x20(%rbp)
je     1371 <get_ip_from_ifname+0x201>
mov    -0x20(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    1371 <get_ip_from_ifname+0x201>
mov    -0x20(%rbp),%rdi
call   1040 <free@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ip_from_ifname>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%rbx
mov    %edi,%r15d
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
lea    0x8(%rsp),%rdi
call   1060 <getifaddrs@plt>
mov    %r15d,%ecx
and    $0xfffffffe,%ecx
xor    %r14d,%r14d
cmp    $0x80,%ecx
jne    1288 <get_ip_from_ifname+0x128>
test   %rax,%rax
jne    1288 <get_ip_from_ifname+0x128>
mov    0x8(%rsp),%rbp
test   %rbp,%rbp
je     127b <get_ip_from_ifname+0x11b>
mov    0x2e24(%rip),%r14
jmp    11ed <get_ip_from_ifname+0x8d>
mov    0x8(%rbp),%rsi
cmpl   $0x80,(%rsi)
je     1236 <get_ip_from_ifname+0xd6>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x18(%rbp),%rbp
test   %rbp,%rbp
je     127b <get_ip_from_ifname+0x11b>
cmpq   $0x0,0x8(%rbp)
je     11e0 <get_ip_from_ifname+0x80>
mov    (%r14),%eax
test   %eax,0x0(%rbp)
je     11e0 <get_ip_from_ifname+0x80>
mov    0x10(%rbp),%esi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    11e0 <get_ip_from_ifname+0x80>
cmp    $0x80,%r15d
je     11c6 <get_ip_from_ifname+0x66>
cmp    $0x81,%r15d
jne    11e0 <get_ip_from_ifname+0x80>
mov    0x8(%rbp),%rsi
cmpl   $0x81,(%rsi)
jne    11e0 <get_ip_from_ifname+0x80>
lea    0x10(%rsp),%rdx
mov    $0x81,%edi
jmp    1240 <get_ip_from_ifname+0xe0>
lea    0x10(%rsp),%rdx
mov    $0x80,%edi
mov    $0x40,%ecx
call   1030 <inet_ntop@plt>
test   %rax,%rax
je     127b <get_ip_from_ifname+0x11b>
lea    0x10(%rsp),%rdi
call   1080 <strdup@plt>
mov    %rax,%r14
mov    0x8(%rsp),%rdi
call   1070 <freeifaddrs@plt>
test   %r14,%r14
je     1285 <get_ip_from_ifname+0x125>
cmpb   $0x0,(%r14)
jne    1288 <get_ip_from_ifname+0x128>
mov    %r14,%rdi
call   1040 <free@plt>
jmp    1285 <get_ip_from_ifname+0x125>
mov    0x8(%rsp),%rdi
call   1070 <freeifaddrs@plt>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x58,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.ifaddrs = type { i32, %struct.TYPE_2__*, i32, %struct.ifaddrs* }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr_in = type { i32 }
%struct.sockaddr_in6 = type { i32 }
@IFF_UP = global i32 0
define i8* @get_ip_from_ifname(i32 %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca %struct.ifaddrs*
%8 = alloca %struct.ifaddrs*
%9 = alloca %struct.sockaddr_in*
%10 = alloca %struct.sockaddr_in6*
%11 = alloca [64 x i8]
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* null, i8** %6
%12 = bitcast [64 x i8]* %11 to i8*
%13 = call i64 @getifaddrs(%struct.ifaddrs** %7)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %2
store i8* null, i8** %3
br label %130
16: ; preds = %2
%17 = load i32, i32* %4
switch i32 %17, label %19 [
i32 129, label %18
i32 128, label %18
]
18: ; preds = %16, %16
br label %20
19: ; preds = %16
store i8* null, i8** %3
br label %130
20: ; preds = %18
%21 = load %struct.ifaddrs*, %struct.ifaddrs** %7
store %struct.ifaddrs* %21, %struct.ifaddrs** %8
br label %22
22: ; preds = %110, %20
%23 = load %struct.ifaddrs*, %struct.ifaddrs** %8
%24 = icmp ne %struct.ifaddrs* %23, null
br i1 %24, label %25, label %114
25: ; preds = %22
%26 = load %struct.ifaddrs*, %struct.ifaddrs** %8
%27 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %26, i32 0, i32 1
%28 = load %struct.TYPE_2__*, %struct.TYPE_2__** %27
%29 = icmp eq %struct.TYPE_2__* null, %28
br i1 %29, label %30, label %31
30: ; preds = %25
br label %110
31: ; preds = %25
%32 = load %struct.ifaddrs*, %struct.ifaddrs** %8
%33 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %32, i32 0, i32 0
%34 = load i32, i32* %33
%35 = load i32, i32* @IFF_UP
%36 = and i32 %34, %35
%37 = icmp eq i32 0, %36
br i1 %37, label %38, label %39
38: ; preds = %31
br label %110
39: ; preds = %31
%40 = load i8*, i8** %5
%41 = load %struct.ifaddrs*, %struct.ifaddrs** %8
%42 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %41, i32 0, i32 2
%43 = load i32, i32* %42
%44 = call i64 @strcmp(i8* %40, i32 %43)
%45 = icmp ne i64 %44, 0
br i1 %45, label %46, label %47
46: ; preds = %39
br label %110
47: ; preds = %39
%48 = load i32, i32* %4
%49 = icmp eq i32 129, %48
br i1 %49, label %50, label %78
50: ; preds = %47
%51 = load %struct.ifaddrs*, %struct.ifaddrs** %8
%52 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %51, i32 0, i32 1
%53 = load %struct.TYPE_2__*, %struct.TYPE_2__** %52
%54 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %53, i32 0, i32 0
%55 = load i32, i32* %54
%56 = icmp eq i32 %55, 129
br i1 %56, label %57, label %77
57: ; preds = %50
%58 = load %struct.ifaddrs*, %struct.ifaddrs** %8
%59 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %58, i32 0, i32 1
%60 = load %struct.TYPE_2__*, %struct.TYPE_2__** %59
%61 = bitcast %struct.TYPE_2__* %60 to %struct.sockaddr_in*
store %struct.sockaddr_in* %61, %struct.sockaddr_in** %9
%62 = load %struct.ifaddrs*, %struct.ifaddrs** %8
%63 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %62, i32 0, i32 1
%64 = load %struct.TYPE_2__*, %struct.TYPE_2__** %63
%65 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %64, i32 0, i32 0
%66 = load i32, i32* %65
%67 = load %struct.sockaddr_in*, %struct.sockaddr_in** %9
%68 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %67, i32 0, i32 0
%69 = bitcast i32* %68 to i8*
%70 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%71 = call i32* @inet_ntop(i32 %66, i8* %69, i8* %70, i32 64)
%72 = icmp eq i32* %71, null
br i1 %72, label %73, label %74
73: ; preds = %57
br label %114
74: ; preds = %57
%75 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%76 = call i8* @strdup(i8* %75)
store i8* %76, i8** %6
br label %114
77: ; preds = %50
br label %78
78: ; preds = %77, %47
%79 = load i32, i32* %4
%80 = icmp eq i32 128, %79
br i1 %80, label %81, label %109
81: ; preds = %78
%82 = load %struct.ifaddrs*, %struct.ifaddrs** %8
%83 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %82, i32 0, i32 1
%84 = load %struct.TYPE_2__*, %struct.TYPE_2__** %83
%85 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %84, i32 0, i32 0
%86 = load i32, i32* %85
%87 = icmp eq i32 %86, 128
br i1 %87, label %88, label %108
88: ; preds = %81
%89 = load %struct.ifaddrs*, %struct.ifaddrs** %8
%90 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %89, i32 0, i32 1
%91 = load %struct.TYPE_2__*, %struct.TYPE_2__** %90
%92 = bitcast %struct.TYPE_2__* %91 to %struct.sockaddr_in6*
store %struct.sockaddr_in6* %92, %struct.sockaddr_in6** %10
%93 = load %struct.ifaddrs*, %struct.ifaddrs** %8
%94 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %93, i32 0, i32 1
%95 = load %struct.TYPE_2__*, %struct.TYPE_2__** %94
%96 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %95, i32 0, i32 0
%97 = load i32, i32* %96
%98 = load %struct.sockaddr_in6*, %struct.sockaddr_in6** %10
%99 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %98, i32 0, i32 0
%100 = bitcast i32* %99 to i8*
%101 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%102 = call i32* @inet_ntop(i32 %97, i8* %100, i8* %101, i32 64)
%103 = icmp eq i32* %102, null
br i1 %103, label %104, label %105
104: ; preds = %88
br label %114
105: ; preds = %88
%106 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%107 = call i8* @strdup(i8* %106)
store i8* %107, i8** %6
br label %114
108: ; preds = %81
br label %109
109: ; preds = %108, %78
br label %110
110: ; preds = %109, %46, %38, %30
%111 = load %struct.ifaddrs*, %struct.ifaddrs** %8
%112 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %111, i32 0, i32 3
%113 = load %struct.ifaddrs*, %struct.ifaddrs** %112
store %struct.ifaddrs* %113, %struct.ifaddrs** %8
br label %22
114: ; preds = %105, %104, %74, %73, %22
%115 = load %struct.ifaddrs*, %struct.ifaddrs** %7
%116 = call i32 @freeifaddrs(%struct.ifaddrs* %115)
%117 = load i8*, i8** %6
%118 = icmp ne i8* %117, null
br i1 %118, label %119, label %128
119: ; preds = %114
%120 = load i8*, i8** %6
%121 = getelementptr inbounds i8, i8* %120, i64 0
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
%124 = icmp eq i32 0, %123
br i1 %124, label %125, label %128
125: ; preds = %119
%126 = load i8*, i8** %6
%127 = call i32 @free(i8* %126)
store i8* null, i8** %6
br label %128
128: ; preds = %125, %119, %114
%129 = load i8*, i8** %6
store i8* %129, i8** %3
br label %130
130: ; preds = %128, %19, %15
%131 = load i8*, i8** %3
ret i8* %131
}

LLVM IR (-O2):
%struct.ifaddrs = type { i32, %struct.TYPE_2__*, i32, %struct.ifaddrs* }
%struct.TYPE_2__ = type { i32 }
@IFF_UP = global i32 0
define i8* @get_ip_from_ifname(i32 %0, i8* %1) {
%3 = alloca %struct.ifaddrs*
%4 = alloca [64 x i8]
%5 = bitcast %struct.ifaddrs** %3 to i8*
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%7 = call i64 @getifaddrs(%struct.ifaddrs** %3)
%8 = icmp eq i64 %7, 0
%9 = and i32 %0, -2
%10 = icmp eq i32 %9, 128
%11 = and i1 %10, %8
br i1 %11, label %12, label %67
12: ; preds = %2
%13 = load %struct.ifaddrs*, %struct.ifaddrs** %3
%14 = icmp eq %struct.ifaddrs* %13, null
br i1 %14, label %54, label %15
15: ; preds = %12, %50
%16 = phi %struct.ifaddrs* [ %52, %50 ], [ %13, %12 ]
%17 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %16, i64 0, i32 1
%18 = load %struct.TYPE_2__*, %struct.TYPE_2__** %17
%19 = icmp eq %struct.TYPE_2__* %18, null
br i1 %19, label %50, label %20
20: ; preds = %15
%21 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %16, i64 0, i32 0
%22 = load i32, i32* %21
%23 = load i32, i32* @IFF_UP
%24 = and i32 %23, %22
%25 = icmp eq i32 %24, 0
br i1 %25, label %50, label %26
26: ; preds = %20
%27 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %16, i64 0, i32 2
%28 = load i32, i32* %27
%29 = call i64 @strcmp(i8* %1, i32 %28)
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %50
31: ; preds = %26
switch i32 %0, label %50 [
i32 129, label %32
i32 128, label %41
]
32: ; preds = %31
%33 = load %struct.TYPE_2__*, %struct.TYPE_2__** %17
%34 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %33, i64 0, i32 0
%35 = load i32, i32* %34
%36 = icmp eq i32 %35, 129
br i1 %36, label %37, label %50
37: ; preds = %32
%38 = bitcast %struct.TYPE_2__* %33 to i8*
%39 = call i32* @inet_ntop(i32 129, i8* %38, i8* %6, i32 64)
%40 = icmp eq i32* %39, null
br i1 %40, label %54, label %57
41: ; preds = %31
%42 = load %struct.TYPE_2__*, %struct.TYPE_2__** %17
%43 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %42, i64 0, i32 0
%44 = load i32, i32* %43
%45 = icmp eq i32 %44, 128
br i1 %45, label %46, label %50
46: ; preds = %41
%47 = bitcast %struct.TYPE_2__* %42 to i8*
%48 = call i32* @inet_ntop(i32 128, i8* %47, i8* %6, i32 64)
%49 = icmp eq i32* %48, null
br i1 %49, label %54, label %57
50: ; preds = %32, %31, %41, %26, %20, %15
%51 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %16, i64 0, i32 3
%52 = load %struct.ifaddrs*, %struct.ifaddrs** %51
%53 = icmp eq %struct.ifaddrs* %52, null
br i1 %53, label %54, label %15
54: ; preds = %50, %12, %37, %46
%55 = load %struct.ifaddrs*, %struct.ifaddrs** %3
%56 = call i32 @freeifaddrs(%struct.ifaddrs* %55)
br label %67
57: ; preds = %46, %37
%58 = call i8* @strdup(i8* %6)
%59 = load %struct.ifaddrs*, %struct.ifaddrs** %3
%60 = call i32 @freeifaddrs(%struct.ifaddrs* %59)
%61 = icmp eq i8* %58, null
br i1 %61, label %67, label %62
62: ; preds = %57
%63 = load i8, i8* %58
%64 = icmp eq i8 %63, 0
br i1 %64, label %65, label %67
65: ; preds = %62
%66 = call i32 @free(i8* %58)
br label %67
67: ; preds = %54, %57, %62, %65, %2
%68 = phi i8* [ null, %2 ], [ null, %65 ], [ %58, %62 ], [ null, %57 ], [ null, %54 ]
ret i8* %68
}