#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 TYPE_2__ {
  scalar_t__ sa_data;
};
struct ifreq {
  int ifc_len;
  char *ifc_buf;
  int ifr_flags;
  TYPE_1__ ifr_hwaddr;
  int /*<<< orphan*/ ifr_name;
  struct ifreq *ifc_req;
};
struct ifconf {
  int ifc_len;
  char *ifc_buf;
  int ifr_flags;
  TYPE_1__ ifr_hwaddr;
  int /*<<< orphan*/ ifr_name;
  struct ifconf *ifc_req;
};
typedef int /*<<< orphan*/ ifc;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int IFF_LOOPBACK;
int /*<<< orphan*/ SIOCGIFCONF;
int /*<<< orphan*/ SIOCGIFFLAGS;
int /*<<< orphan*/ SIOCGIFHWADDR;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ close(int);
scalar_t__ ioctl(int, int /*<<< orphan*/, struct ifreq *);
scalar_t__ pig_newseg(int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, unsigned char, unsigned char,
                           unsigned char, unsigned char, unsigned char,
                           unsigned char);
scalar_t__ strcmp(int /*<<< orphan*/, char const *);
int /*<<< orphan*/ strncpy(int /*<<< orphan*/, int /*<<< orphan*/, int);
char *get_iface_mac(const char *iface) {
  char *retval = NULL;
  unsigned char *mac = NULL;
  int sockfd;
  struct ifconf ifc;
  struct ifreq ifr, *ifr_i = NULL, *ifr_e = NULL;
  char buf[4096];
  ifc.ifc_len = sizeof(buf);
  ifc.ifc_buf = buf;
  sockfd = socket(AF_INET, SOCK_DGRAM, 0);
  if (sockfd != -1) {
    if (ioctl(sockfd, SIOCGIFCONF, &ifc) == 0) {
      ifr_i = ifc.ifc_req;
      ifr_e = ifr_i + (ifc.ifc_len / sizeof(ifc));
      for (; ifr_i != ifr_e && retval == NULL; ifr_i++) {
        if (strcmp(ifr_i->ifr_name, iface) != 0) {
          continue;
        }
        strncpy(ifr.ifr_name, ifr_i->ifr_name, sizeof(ifr.ifr_name) - 1);
        if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) == 0) {
          if (!(ifr.ifr_flags & IFF_LOOPBACK)) {
            if (ioctl(sockfd, SIOCGIFHWADDR, &ifr) == 0) {
              retval = (char *)pig_newseg(20);
              mac = (unsigned char *)ifr.ifr_hwaddr.sa_data;
              sprintf(retval, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x", *mac, *(mac + 1),
                      *(mac + 2), *(mac + 3), *(mac + 4), *(mac + 5));
            }
          }
        }
      }
    }
    close(sockfd);
  }
  return retval;
}


x86 assembly (clang, -O0):
<get_iface_mac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10b0,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x88(%rbp)
movq   $0x0,-0x90(%rbp)
movl   $0x1000,-0x50(%rbp)
lea    -0x1090(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    0x2e22(%rip),%rax
mov    (%rax),%edi
mov    0x2e11(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1090 <socket@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
je     13a4 <get_iface_mac+0x234>
mov    -0x1c(%rbp),%edi
mov    0x2dd1(%rip),%rax
mov    (%rax),%esi
lea    -0x50(%rbp),%rdx
call   1040 <ioctl@plt>
cmp    $0x0,%rax
jne    139c <get_iface_mac+0x22c>
mov    -0x28(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
mov    %rax,-0x1098(%rbp)
movslq -0x50(%rbp),%rax
mov    $0x30,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,%rcx
mov    -0x1098(%rbp),%rax
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x90(%rbp)
mov    -0x88(%rbp),%rcx
xor    %eax,%eax
cmp    -0x90(%rbp),%rcx
mov    %al,-0x1099(%rbp)
je     1265 <get_iface_mac+0xf5>
cmpq   $0x0,-0x10(%rbp)
sete   %al
mov    %al,-0x1099(%rbp)
mov    -0x1099(%rbp),%al
test   $0x1,%al
jne    1278 <get_iface_mac+0x108>
jmp    1397 <get_iface_mac+0x227>
mov    -0x88(%rbp),%rax
mov    0x20(%rax),%edi
mov    -0x8(%rbp),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     129a <get_iface_mac+0x12a>
jmp    1380 <get_iface_mac+0x210>
mov    -0x60(%rbp),%edi
mov    -0x88(%rbp),%rax
mov    0x20(%rax),%esi
mov    $0x3,%edx
call   1030 <strncpy@plt>
mov    -0x1c(%rbp),%edi
mov    0x2d15(%rip),%rax
mov    (%rax),%esi
lea    -0x80(%rbp),%rdx
call   1040 <ioctl@plt>
cmp    $0x0,%rax
jne    137b <get_iface_mac+0x20b>
mov    -0x70(%rbp),%eax
mov    0x2d1e(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
jne    1376 <get_iface_mac+0x206>
mov    -0x1c(%rbp),%edi
mov    0x2cd1(%rip),%rax
mov    (%rax),%esi
lea    -0x80(%rbp),%rdx
call   1040 <ioctl@plt>
cmp    $0x0,%rax
jne    1371 <get_iface_mac+0x201>
mov    $0x14,%edi
call   1070 <pig_newseg@plt>
mov    %rax,-0x10(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%dl
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    0x2(%rax),%r8b
mov    -0x18(%rbp),%rax
mov    0x3(%rax),%r9b
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%r10b
mov    -0x18(%rbp),%rax
lea    0xcb2(%rip),%rsi
movzbl %dl,%edx
movzbl %cl,%ecx
movzbl %r8b,%r8d
movzbl %r9b,%r9d
movzbl %r10b,%r10d
mov    %r10d,(%rsp)
movzbl 0x5(%rax),%eax
mov    %eax,0x8(%rsp)
call   1080 <sprintf@plt>
jmp    1376 <get_iface_mac+0x206>
jmp    137b <get_iface_mac+0x20b>
jmp    1380 <get_iface_mac+0x210>
mov    -0x88(%rbp),%rax
add    $0x30,%rax
mov    %rax,-0x88(%rbp)
jmp    123b <get_iface_mac+0xcb>
jmp    139c <get_iface_mac+0x22c>
mov    -0x1c(%rbp),%edi
call   1050 <close@plt>
mov    -0x10(%rbp),%rax
add    $0x10b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_iface_mac>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1068,%rsp
mov    %rdi,%r14
movl   $0x1000,0x30(%rsp)
lea    0x60(%rsp),%rax
mov    %rax,0x38(%rsp)
mov    0x2e43(%rip),%rax
mov    (%rax),%edi
mov    0x2e32(%rip),%rax
mov    (%rax),%esi
xor    %ebx,%ebx
xor    %edx,%edx
call   1090 <socket@plt>
cmp    $0xffffffff,%eax
je     11f9 <get_iface_mac+0x89>
mov    %eax,%r13d
mov    0x2df8(%rip),%rax
mov    (%rax),%esi
lea    0x30(%rsp),%rdx
mov    %r13d,%edi
call   1040 <ioctl@plt>
test   %rax,%rax
jne    11ef <get_iface_mac+0x7f>
movslq 0x30(%rsp),%rcx
movabs $0xaaaaaaaaaaaaaaab,%rdx
aa aa aa
mov    %rcx,%rax
mul    %rdx
cmp    $0x30,%rcx
jae    120e <get_iface_mac+0x9e>
xor    %ebx,%ebx
mov    %r13d,%edi
call   1050 <close@plt>
mov    %rbx,%rax
add    $0x1068,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x58(%rsp),%rbp
shr    $0x5,%rdx
lea    (%rdx,%rdx,2),%r12
shl    $0x4,%r12
add    $0xffffffffffffffd0,%r12
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
mov    0x20(%rbp,%r15,1),%edi
mov    %r14,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    12a0 <get_iface_mac+0x130>
mov    0x20(%rsp),%edi
mov    0x20(%rbp,%r15,1),%esi
mov    $0x3,%edx
call   1030 <strncpy@plt>
mov    0x2d74(%rip),%rax
mov    (%rax),%esi
mov    %r13d,%edi
mov    %rsp,%rdx
call   1040 <ioctl@plt>
test   %rax,%rax
jne    12a0 <get_iface_mac+0x130>
mov    0x2d83(%rip),%rax
mov    (%rax),%eax
test   %eax,0x10(%rsp)
jne    12a0 <get_iface_mac+0x130>
mov    0x2d3c(%rip),%rax
mov    (%rax),%esi
mov    %r13d,%edi
mov    %rsp,%rdx
call   1040 <ioctl@plt>
test   %rax,%rax
je     12c0 <get_iface_mac+0x150>
cs nopw 0x0(%rax,%rax,1)
xor    %ebx,%ebx
test   %rbx,%rbx
jne    11f1 <get_iface_mac+0x81>
lea    0x30(%r15),%rax
cmp    %r15,%r12
mov    %rax,%r15
jne    1230 <get_iface_mac+0xc0>
jmp    11f1 <get_iface_mac+0x81>
mov    $0x14,%edi
call   1070 <pig_newseg@plt>
mov    %rax,%rbx
mov    0x18(%rsp),%rax
movzbl (%rax),%edx
movzbl 0x1(%rax),%ecx
movzbl 0x2(%rax),%r8d
movzbl 0x3(%rax),%r9d
movzbl 0x4(%rax),%r10d
movzbl 0x5(%rax),%eax
mov    %rbx,%rdi
lea    0xd0a(%rip),%rsi
push   %rax
push   %r10
call   1080 <sprintf@plt>
add    $0x10,%rsp
test   %rbx,%rbx
je     12ab <get_iface_mac+0x13b>
jmp    11f1 <get_iface_mac+0x81>

LLVM IR (-O0):
%struct.ifconf = type { i32, i8*, i32, %struct.TYPE_2__, i32, %struct.ifconf* }
%struct.TYPE_2__ = type { i64 }
%struct.ifreq = type { i32, i8*, i32, %struct.TYPE_2__, i32, %struct.ifreq* }
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@SIOCGIFCONF = global i32 0
@SIOCGIFFLAGS = global i32 0
@IFF_LOOPBACK = global i32 0
@SIOCGIFHWADDR = global i32 0
@.str = [30 x i8] c"%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\00"
define i8* @get_iface_mac(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca %struct.ifconf
%7 = alloca %struct.ifreq
%8 = alloca %struct.ifreq*
%9 = alloca %struct.ifreq*
%10 = alloca [4096 x i8]
store i8* %0, i8** %2
store i8* null, i8** %3
store i8* null, i8** %4
store %struct.ifreq* null, %struct.ifreq** %8
store %struct.ifreq* null, %struct.ifreq** %9
%11 = getelementptr inbounds %struct.ifconf, %struct.ifconf* %6, i32 0, i32 0
store i32 4096, i32* %11
%12 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
%13 = getelementptr inbounds %struct.ifconf, %struct.ifconf* %6, i32 0, i32 1
store i8* %12, i8** %13
%14 = load i32, i32* @AF_INET
%15 = load i32, i32* @SOCK_DGRAM
%16 = call i32 @socket(i32 %14, i32 %15, i32 0)
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = icmp ne i32 %17, -1
br i1 %18, label %19, label %110
19: ; preds = %1
%20 = load i32, i32* %5
%21 = load i32, i32* @SIOCGIFCONF
%22 = bitcast %struct.ifconf* %6 to %struct.ifreq*
%23 = call i64 @ioctl(i32 %20, i32 %21, %struct.ifreq* %22)
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %107
25: ; preds = %19
%26 = getelementptr inbounds %struct.ifconf, %struct.ifconf* %6, i32 0, i32 5
%27 = load %struct.ifconf*, %struct.ifconf** %26
%28 = bitcast %struct.ifconf* %27 to %struct.ifreq*
store %struct.ifreq* %28, %struct.ifreq** %8
%29 = load %struct.ifreq*, %struct.ifreq** %8
%30 = getelementptr inbounds %struct.ifconf, %struct.ifconf* %6, i32 0, i32 0
%31 = load i32, i32* %30
%32 = sext i32 %31 to i64
%33 = udiv i64 %32, 48
%34 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %29, i64 %33
store %struct.ifreq* %34, %struct.ifreq** %9
br label %35
35: ; preds = %103, %25
%36 = load %struct.ifreq*, %struct.ifreq** %8
%37 = load %struct.ifreq*, %struct.ifreq** %9
%38 = icmp ne %struct.ifreq* %36, %37
br i1 %38, label %39, label %42
39: ; preds = %35
%40 = load i8*, i8** %3
%41 = icmp eq i8* %40, null
br label %42
42: ; preds = %39, %35
%43 = phi i1 [ false, %35 ], [ %41, %39 ]
br i1 %43, label %44, label %106
44: ; preds = %42
%45 = load %struct.ifreq*, %struct.ifreq** %8
%46 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %45, i32 0, i32 4
%47 = load i32, i32* %46
%48 = load i8*, i8** %2
%49 = call i64 @strcmp(i32 %47, i8* %48)
%50 = icmp ne i64 %49, 0
br i1 %50, label %51, label %52
51: ; preds = %44
br label %103
52: ; preds = %44
%53 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %7, i32 0, i32 4
%54 = load i32, i32* %53
%55 = load %struct.ifreq*, %struct.ifreq** %8
%56 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %55, i32 0, i32 4
%57 = load i32, i32* %56
%58 = call i32 @strncpy(i32 %54, i32 %57, i32 3)
%59 = load i32, i32* %5
%60 = load i32, i32* @SIOCGIFFLAGS
%61 = call i64 @ioctl(i32 %59, i32 %60, %struct.ifreq* %7)
%62 = icmp eq i64 %61, 0
br i1 %62, label %63, label %102
63: ; preds = %52
%64 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %7, i32 0, i32 2
%65 = load i32, i32* %64
%66 = load i32, i32* @IFF_LOOPBACK
%67 = and i32 %65, %66
%68 = icmp ne i32 %67, 0
br i1 %68, label %101, label %69
69: ; preds = %63
%70 = load i32, i32* %5
%71 = load i32, i32* @SIOCGIFHWADDR
%72 = call i64 @ioctl(i32 %70, i32 %71, %struct.ifreq* %7)
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %100
74: ; preds = %69
%75 = call i64 @pig_newseg(i32 20)
%76 = inttoptr i64 %75 to i8*
store i8* %76, i8** %3
%77 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %7, i32 0, i32 3
%78 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %77, i32 0, i32 0
%79 = load i64, i64* %78
%80 = inttoptr i64 %79 to i8*
store i8* %80, i8** %4
%81 = load i8*, i8** %3
%82 = load i8*, i8** %4
%83 = load i8, i8* %82
%84 = load i8*, i8** %4
%85 = getelementptr inbounds i8, i8* %84, i64 1
%86 = load i8, i8* %85
%87 = load i8*, i8** %4
%88 = getelementptr inbounds i8, i8* %87, i64 2
%89 = load i8, i8* %88
%90 = load i8*, i8** %4
%91 = getelementptr inbounds i8, i8* %90, i64 3
%92 = load i8, i8* %91
%93 = load i8*, i8** %4
%94 = getelementptr inbounds i8, i8* %93, i64 4
%95 = load i8, i8* %94
%96 = load i8*, i8** %4
%97 = getelementptr inbounds i8, i8* %96, i64 5
%98 = load i8, i8* %97
%99 = call i32 @sprintf(i8* %81, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8 zeroext %83, i8 zeroext %86, i8 zeroext %89, i8 zeroext %92, i8 zeroext %95, i8 zeroext %98)
br label %100
100: ; preds = %74, %69
br label %101
101: ; preds = %100, %63
br label %102
102: ; preds = %101, %52
br label %103
103: ; preds = %102, %51
%104 = load %struct.ifreq*, %struct.ifreq** %8
%105 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %104, i32 1
store %struct.ifreq* %105, %struct.ifreq** %8
br label %35
106: ; preds = %42
br label %107
107: ; preds = %106, %19
%108 = load i32, i32* %5
%109 = call i32 @close(i32 %108)
br label %110
110: ; preds = %107, %1
%111 = load i8*, i8** %3
ret i8* %111
}

LLVM IR (-O2):
%struct.ifconf = type { i32, i8*, i32, %struct.TYPE_2__, i32, %struct.ifconf* }
%struct.TYPE_2__ = type { i64 }
%struct.ifreq = type { i32, i8*, i32, %struct.TYPE_2__, i32, %struct.ifreq* }
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@SIOCGIFCONF = global i32 0
@SIOCGIFFLAGS = global i32 0
@IFF_LOOPBACK = global i32 0
@SIOCGIFHWADDR = global i32 0
@.str = [30 x i8] c"%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\00"
define i8* @get_iface_mac(i8* %0) {
%2 = alloca %struct.ifconf
%3 = alloca %struct.ifreq
%4 = alloca [4096 x i8]
%5 = bitcast %struct.ifconf* %2 to i8*
%6 = bitcast %struct.ifreq* %3 to i8*
%7 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds %struct.ifconf, %struct.ifconf* %2, i64 0, i32 0
store i32 4096, i32* %8
%9 = getelementptr inbounds %struct.ifconf, %struct.ifconf* %2, i64 0, i32 1
store i8* %7, i8** %9
%10 = load i32, i32* @AF_INET
%11 = load i32, i32* @SOCK_DGRAM
%12 = call i32 @socket(i32 %10, i32 %11, i32 0)
%13 = icmp eq i32 %12, -1
br i1 %13, label %80, label %14
14: ; preds = %1
%15 = load i32, i32* @SIOCGIFCONF
%16 = bitcast %struct.ifconf* %2 to %struct.ifreq*
%17 = call i64 @ioctl(i32 %12, i32 %15, %struct.ifreq* %16)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %77
19: ; preds = %14
%20 = getelementptr inbounds %struct.ifconf, %struct.ifconf* %2, i64 0, i32 5
%21 = bitcast %struct.ifconf** %20 to %struct.ifreq**
%22 = load %struct.ifreq*, %struct.ifreq** %21
%23 = load i32, i32* %8
%24 = sext i32 %23 to i64
%25 = udiv i64 %24, 48
%26 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %22, i64 %25
%27 = icmp ult i32 %23, 48
br i1 %27, label %77, label %28
28: ; preds = %19
%29 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %3, i64 0, i32 4
%30 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %3, i64 0, i32 2
%31 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %3, i64 0, i32 3, i32 0
br label %32
32: ; preds = %28, %71
%33 = phi %struct.ifreq* [ %22, %28 ], [ %73, %71 ]
%34 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %33, i64 0, i32 4
%35 = load i32, i32* %34
%36 = call i64 @strcmp(i32 %35, i8* %0)
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %71
38: ; preds = %32
%39 = load i32, i32* %29
%40 = load i32, i32* %34
%41 = call i32 @strncpy(i32 %39, i32 %40, i32 3)
%42 = load i32, i32* @SIOCGIFFLAGS
%43 = call i64 @ioctl(i32 %12, i32 %42, %struct.ifreq* %3)
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %71
45: ; preds = %38
%46 = load i32, i32* %30
%47 = load i32, i32* @IFF_LOOPBACK
%48 = and i32 %47, %46
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %71
50: ; preds = %45
%51 = load i32, i32* @SIOCGIFHWADDR
%52 = call i64 @ioctl(i32 %12, i32 %51, %struct.ifreq* %3)
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %71
54: ; preds = %50
%55 = call i64 @pig_newseg(i32 20)
%56 = inttoptr i64 %55 to i8*
%57 = load i64, i64* %31
%58 = inttoptr i64 %57 to i8*
%59 = load i8, i8* %58
%60 = getelementptr inbounds i8, i8* %58, i64 1
%61 = load i8, i8* %60
%62 = getelementptr inbounds i8, i8* %58, i64 2
%63 = load i8, i8* %62
%64 = getelementptr inbounds i8, i8* %58, i64 3
%65 = load i8, i8* %64
%66 = getelementptr inbounds i8, i8* %58, i64 4
%67 = load i8, i8* %66
%68 = getelementptr inbounds i8, i8* %58, i64 5
%69 = load i8, i8* %68
%70 = call i32 @sprintf(i8* dereferenceable(1) %56, i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8 zeroext %59, i8 zeroext %61, i8 zeroext %63, i8 zeroext %65, i8 zeroext %67, i8 zeroext %69)
br label %71
71: ; preds = %38, %50, %54, %45, %32
%72 = phi i8* [ null, %32 ], [ null, %45 ], [ %56, %54 ], [ null, %50 ], [ null, %38 ]
%73 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %33, i64 1
%74 = icmp ne %struct.ifreq* %73, %26
%75 = icmp eq i8* %72, null
%76 = and i1 %75, %74
br i1 %76, label %32, label %77
77: ; preds = %71, %19, %14
%78 = phi i8* [ null, %14 ], [ null, %19 ], [ %72, %71 ]
%79 = call i32 @close(i32 %12)
br label %80
80: ; preds = %77, %1
%81 = phi i8* [ %78, %77 ], [ null, %1 ]
ret i8* %81
}