#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_8__ TYPE_4__;
typedef struct TYPE_7__ TYPE_3__;
typedef struct TYPE_6__ TYPE_2__;
typedef struct TYPE_5__ TYPE_1__;

/* Type definitions */
struct TYPE_6__ {
  int /*<<< orphan*/ s_addr;
};
struct sockaddr_in {
  TYPE_2__ sin_addr;
};
struct TYPE_8__ {
  int base_addr;
  int irq;
  int dma;
  int port;
  int /*<<< orphan*/ mem_end;
  int /*<<< orphan*/ mem_start;
};
struct TYPE_7__ {
  scalar_t__ sa_data;
};
struct TYPE_5__ {
  scalar_t__ ifcu_buf;
};
struct ifreq {
  int ifc_len;
  char *ifr_name;
  int ifr_mtu;
  int ifr_qlen;
  int ifr_metric;
  TYPE_4__ ifr_map;
  TYPE_3__ ifr_hwaddr;
  int /*<<< orphan*/ ifr_netmask;
  int /*<<< orphan*/ ifr_broadaddr;
  int /*<<< orphan*/ ifr_addr;
  int /*<<< orphan*/ ifr_flags;
  TYPE_1__ ifc_ifcu;
};
struct ifconf {
  int ifc_len;
  char *ifr_name;
  int ifr_mtu;
  int ifr_qlen;
  int ifr_metric;
  TYPE_4__ ifr_map;
  TYPE_3__ ifr_hwaddr;
  int /*<<< orphan*/ ifr_netmask;
  int /*<<< orphan*/ ifr_broadaddr;
  int /*<<< orphan*/ ifr_addr;
  int /*<<< orphan*/ ifr_flags;
  TYPE_1__ ifc_ifcu;
};
typedef int /*<<< orphan*/ ifr;
typedef scalar_t__ caddr_t;

/* Variables and functions */
int /*<<< orphan*/ PF_INET;
int /*<<< orphan*/ SIOCGIFADDR;
int /*<<< orphan*/ SIOCGIFBRDADDR;
int /*<<< orphan*/ SIOCGIFCONF;
int /*<<< orphan*/ SIOCGIFFLAGS;
int /*<<< orphan*/ SIOCGIFHWADDR;
int /*<<< orphan*/ SIOCGIFMAP;
int /*<<< orphan*/ SIOCGIFMETRIC;
int /*<<< orphan*/ SIOCGIFMTU;
int /*<<< orphan*/ SIOCGIFNETMASK;
int /*<<< orphan*/ SIOCGIFTXQLEN;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ adrs(int /*<<< orphan*/);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ flagsmodes(int /*<<< orphan*/);
int /*<<< orphan*/ hwaddress(unsigned char *);
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, struct ifreq *);
int /*<<< orphan*/ printf(char *, ...);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int show_ip() {
  struct ifmap;
  struct ifconf ifc;
  struct ifreq ifr[10];
  int sd, ifc_num, i;
  sd = socket(PF_INET, SOCK_DGRAM, 0);
  ifc.ifc_len = sizeof(ifr);
  ifc.ifc_ifcu.ifcu_buf = (caddr_t)ifr;
  ioctl(sd, SIOCGIFCONF, &ifc);
  ifc_num = ifc.ifc_len / sizeof(struct ifreq);
  for (i = 0; i < ifc_num; ++i) {
    printf("%s", ifr[i].ifr_name);
    ioctl(sd, SIOCGIFFLAGS, &ifr[i]);
    flagsmodes(ifr[i].ifr_flags);
    ioctl(sd, SIOCGIFADDR, &ifr[i]);
    printf("\taddr: \t");
    adrs(((struct sockaddr_in *)(&ifr[i].ifr_addr))->sin_addr.s_addr);
    ioctl(sd, SIOCGIFBRDADDR, &ifr[i]);
    printf("\n\tBcast: \t");
    adrs(((struct sockaddr_in *)(&ifr[i].ifr_broadaddr))->sin_addr.s_addr);
    ioctl(sd, SIOCGIFNETMASK, &ifr[i]);
    printf("\n\tnmask: \t");
    adrs(((struct sockaddr_in *)(&ifr[i].ifr_netmask))->sin_addr.s_addr);
    ioctl(sd, SIOCGIFHWADDR, &ifr[i]);
    printf("\n\tHWaddr: \t");
    hwaddress((unsigned char *)ifr[i].ifr_hwaddr.sa_data);
    ioctl(sd, SIOCGIFMTU, &ifr[i]);
    printf("\n\tMTU: %d", (ifr[i].ifr_mtu));
    ioctl(sd, SIOCGIFTXQLEN, &ifr[i]);
    printf("\n\ttxqueuelen: %d", (ifr[i].ifr_qlen));
    ioctl(sd, SIOCGIFMETRIC, &ifr[i]);
    if (ifr[i].ifr_metric == 0)
      printf("\n\tMetric: %d", 1);
    else
      printf("\n\tMetric: %d", ifr[i].ifr_metric);
    ioctl(sd, SIOCGIFMAP, &ifr[i]);
    printf("\n\tmem= 0x%lx-", ifr[i].ifr_map.mem_start);
    printf("0x%lx  ", ifr[i].ifr_map.mem_end);
    printf("io= 0x%x  ", ifr[i].ifr_map.base_addr);
    printf("irq= %i  ", ifr[i].ifr_map.irq);
    printf("dma= %i  ", ifr[i].ifr_map.dma);
    printf("port= %i\n", ifr[i].ifr_map.port);
    printf("\n");
    printf("\n");
  }
  close(sd);
  return ifc_num;
}


x86 assembly (clang, -O0):
<show_ip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3e0,%rsp
mov    0x2e1e(%rip),%rax
mov    (%rax),%edi
mov    0x2e3d(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1090 <socket@plt>
mov    %eax,-0x3d4(%rbp)
movl   $0x370,-0x58(%rbp)
lea    -0x3d0(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x3d4(%rbp),%edi
mov    0x2dd7(%rip),%rax
mov    (%rax),%esi
lea    -0x58(%rbp),%rdx
call   1050 <ioctl@plt>
movslq -0x58(%rbp),%rax
mov    $0x58,%ecx
xor    %edx,%edx
div    %rcx
mov    %eax,-0x3d8(%rbp)
movl   $0x0,-0x3dc(%rbp)
mov    -0x3dc(%rbp),%eax
cmp    -0x3d8(%rbp),%eax
jge    1613 <show_ip+0x4a3>
movslq -0x3dc(%rbp),%rcx
lea    -0x3d0(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rsi
lea    0xdec(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x3d4(%rbp),%edi
mov    0x2d98(%rip),%rax
mov    (%rax),%esi
movslq -0x3dc(%rbp),%rax
lea    -0x3d0(%rbp),%rdx
imul   $0x58,%rax,%rax
add    %rax,%rdx
call   1050 <ioctl@plt>
movslq -0x3dc(%rbp),%rcx
lea    -0x3d0(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
mov    0x4c(%rax),%edi
call   1070 <flagsmodes@plt>
mov    -0x3d4(%rbp),%edi
mov    0x2d7a(%rip),%rax
mov    (%rax),%esi
movslq -0x3dc(%rbp),%rax
lea    -0x3d0(%rbp),%rdx
imul   $0x58,%rax,%rax
add    %rax,%rdx
call   1050 <ioctl@plt>
lea    0xd72(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x3dc(%rbp),%rcx
lea    -0x3d0(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
mov    0x48(%rax),%edi
call   1030 <adrs@plt>
mov    -0x3d4(%rbp),%edi
mov    0x2ce6(%rip),%rax
mov    (%rax),%esi
movslq -0x3dc(%rbp),%rax
lea    -0x3d0(%rbp),%rdx
imul   $0x58,%rax,%rax
add    %rax,%rdx
call   1050 <ioctl@plt>
lea    0xd27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x3dc(%rbp),%rcx
lea    -0x3d0(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
mov    0x44(%rax),%edi
call   1030 <adrs@plt>
mov    -0x3d4(%rbp),%edi
mov    0x2cca(%rip),%rax
mov    (%rax),%esi
movslq -0x3dc(%rbp),%rax
lea    -0x3d0(%rbp),%rdx
imul   $0x58,%rax,%rax
add    %rax,%rdx
call   1050 <ioctl@plt>
lea    0xcde(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x3dc(%rbp),%rcx
lea    -0x3d0(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
mov    0x40(%rax),%edi
call   1030 <adrs@plt>
mov    -0x3d4(%rbp),%edi
mov    0x2c46(%rip),%rax
mov    (%rax),%esi
movslq -0x3dc(%rbp),%rax
lea    -0x3d0(%rbp),%rdx
imul   $0x58,%rax,%rax
add    %rax,%rdx
call   1050 <ioctl@plt>
lea    0xc95(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x3dc(%rbp),%rcx
lea    -0x3d0(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
mov    0x38(%rax),%rdi
call   1080 <hwaddress@plt>
mov    -0x3d4(%rbp),%edi
mov    0x2c11(%rip),%rax
mov    (%rax),%esi
movslq -0x3dc(%rbp),%rax
lea    -0x3d0(%rbp),%rdx
imul   $0x58,%rax,%rax
add    %rax,%rdx
call   1050 <ioctl@plt>
movslq -0x3dc(%rbp),%rcx
lea    -0x3d0(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
mov    0x10(%rax),%esi
lea    0xc34(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x3d4(%rbp),%edi
mov    0x2b7a(%rip),%rax
mov    (%rax),%esi
movslq -0x3dc(%rbp),%rax
lea    -0x3d0(%rbp),%rdx
imul   $0x58,%rax,%rax
add    %rax,%rdx
call   1050 <ioctl@plt>
movslq -0x3dc(%rbp),%rcx
lea    -0x3d0(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
mov    0x14(%rax),%esi
lea    0xbef(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x3d4(%rbp),%edi
mov    0x2b3b(%rip),%rax
mov    (%rax),%esi
movslq -0x3dc(%rbp),%rax
lea    -0x3d0(%rbp),%rdx
imul   $0x58,%rax,%rax
add    %rax,%rdx
call   1050 <ioctl@plt>
movslq -0x3dc(%rbp),%rcx
lea    -0x3d0(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
cmpl   $0x0,0x18(%rax)
jne    14b0 <show_ip+0x340>
lea    0xbaa(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14d6 <show_ip+0x366>
movslq -0x3dc(%rbp),%rcx
lea    -0x3d0(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
mov    0x18(%rax),%esi
lea    0xb7a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x3d4(%rbp),%edi
mov    0x2af5(%rip),%rax
mov    (%rax),%esi
movslq -0x3dc(%rbp),%rax
lea    -0x3d0(%rbp),%rdx
imul   $0x58,%rax,%rax
add    %rax,%rdx
call   1050 <ioctl@plt>
movslq -0x3dc(%rbp),%rcx
lea    -0x3d0(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
mov    0x30(%rax),%esi
lea    0xb38(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x3dc(%rbp),%rcx
lea    -0x3d0(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
mov    0x2c(%rax),%esi
lea    0xb20(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x3dc(%rbp),%rcx
lea    -0x3d0(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
mov    0x1c(%rax),%esi
lea    0xb02(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x3dc(%rbp),%rcx
lea    -0x3d0(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
mov    0x20(%rax),%esi
lea    0xae7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x3dc(%rbp),%rcx
lea    -0x3d0(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
mov    0x24(%rax),%esi
lea    0xacb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x3dc(%rbp),%rcx
lea    -0x3d0(%rbp),%rax
imul   $0x58,%rcx,%rcx
add    %rcx,%rax
mov    0x28(%rax),%esi
lea    0xaaf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xaa9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xa9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x3dc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3dc(%rbp)
jmp    11e2 <show_ip+0x72>
mov    -0x3d4(%rbp),%edi
call   1060 <close@plt>
mov    -0x3d8(%rbp),%eax
add    $0x3e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_ip>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3d8,%rsp
mov    0x2e08(%rip),%rax
mov    (%rax),%edi
mov    0x2e27(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10a0 <socket@plt>
mov    %eax,%ebp
movl   $0x370,0x8(%rsp)
lea    0x60(%rsp),%rbx
mov    %rbx,0x58(%rsp)
mov    0x2dcb(%rip),%rax
mov    (%rax),%esi
lea    0x8(%rsp),%rdx
mov    %ebp,%edi
call   1060 <ioctl@plt>
movslq 0x8(%rsp),%rax
movabs $0x2e8ba2e8ba2e8ba3,%rcx
a2 8b 2e
mul    %rcx
shr    $0x4,%rdx
mov    %rdx,(%rsp)
test   %edx,%edx
jle    13e7 <show_ip+0x267>
mov    (%rsp),%r13d
lea    0xe77(%rip),%r14
lea    0xe7a(%rip),%r15
lea    0xe7d(%rip),%r12
xchg   %ax,%ax
mov    0x8(%rbx),%rsi
lea    0xde5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d97(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
mov    %rbx,%rdx
call   1060 <ioctl@plt>
mov    0x4c(%rbx),%edi
call   1080 <flagsmodes@plt>
mov    0x2da4(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
mov    %rbx,%rdx
call   1060 <ioctl@plt>
lea    0xdac(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x48(%rbx),%edi
call   1040 <adrs@plt>
mov    0x2d3b(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
mov    %rbx,%rdx
call   1060 <ioctl@plt>
lea    0xd8c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x44(%rbx),%edi
call   1040 <adrs@plt>
mov    0x2d4a(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
mov    %rbx,%rdx
call   1060 <ioctl@plt>
lea    0xd6e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x40(%rbx),%edi
call   1040 <adrs@plt>
mov    0x2cf1(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
mov    %rbx,%rdx
call   1060 <ioctl@plt>
lea    0xd50(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x38(%rbx),%rdi
call   1090 <hwaddress@plt>
mov    0x2ce7(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
mov    %rbx,%rdx
call   1060 <ioctl@plt>
mov    0x10(%rbx),%esi
lea    0xd2f(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2c7b(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
mov    %rbx,%rdx
call   1060 <ioctl@plt>
mov    0x14(%rbx),%esi
lea    0xd15(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2c67(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
mov    %rbx,%rdx
call   1060 <ioctl@plt>
mov    0x18(%rbx),%esi
test   %esi,%esi
mov    $0x1,%eax
cmove  %eax,%esi
lea    0xcf8(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2c79(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
mov    %rbx,%rdx
call   1060 <ioctl@plt>
mov    0x30(%rbx),%esi
lea    0xce1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2c(%rbx),%esi
lea    0xcde(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x1c(%rbx),%esi
lea    0xcd5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x20(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x24(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x28(%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x58,%rbx
add    $0xffffffffffffffff,%r13
jne    1210 <show_ip+0x90>
mov    %ebp,%edi
call   1070 <close@plt>
mov    (%rsp),%rax
add    $0x3d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.ifconf = type { i32, i8*, i32, i32, i32, %struct.TYPE_8__, %struct.TYPE_7__, i32, i32, i32, i32, %struct.TYPE_5__ }
%struct.TYPE_8__ = type { i32, i32, i32, i32, i32, i32 }
%struct.TYPE_7__ = type { i64 }
%struct.TYPE_5__ = type { i64 }
%struct.ifreq = type { i32, i8*, i32, i32, i32, %struct.TYPE_8__, %struct.TYPE_7__, i32, i32, i32, i32, %struct.TYPE_5__ }
%struct.sockaddr_in = type { %struct.TYPE_6__ }
%struct.TYPE_6__ = type { i32 }
@PF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@SIOCGIFCONF = global i32 0
@.str = [3 x i8] c"%s\00"
@SIOCGIFFLAGS = global i32 0
@SIOCGIFADDR = global i32 0
@.str.1 = [9 x i8] c"\09addr: \09\00"
@SIOCGIFBRDADDR = global i32 0
@.str.2 = [11 x i8] c"\0A\09Bcast: \09\00"
@SIOCGIFNETMASK = global i32 0
@.str.3 = [11 x i8] c"\0A\09nmask: \09\00"
@SIOCGIFHWADDR = global i32 0
@.str.4 = [12 x i8] c"\0A\09HWaddr: \09\00"
@SIOCGIFMTU = global i32 0
@.str.5 = [10 x i8] c"\0A\09MTU: %d\00"
@SIOCGIFTXQLEN = global i32 0
@.str.6 = [17 x i8] c"\0A\09txqueuelen: %d\00"
@SIOCGIFMETRIC = global i32 0
@.str.7 = [13 x i8] c"\0A\09Metric: %d\00"
@SIOCGIFMAP = global i32 0
@.str.8 = [14 x i8] c"\0A\09mem= 0x%lx-\00"
@.str.9 = [8 x i8] c"0x%lx \00"
@.str.10 = [11 x i8] c"io= 0x%x \00"
@.str.11 = [10 x i8] c"irq= %i \00"
@.str.12 = [10 x i8] c"dma= %i \00"
@.str.13 = [10 x i8] c"port= %i\0A\00"
@.str.14 = [2 x i8] c"\0A\00"
define i32 @show_ip() {
%1 = alloca %struct.ifconf
%2 = alloca [10 x %struct.ifreq]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = load i32, i32* @PF_INET
%7 = load i32, i32* @SOCK_DGRAM
%8 = call i32 @socket(i32 %6, i32 %7, i32 0)
store i32 %8, i32* %3
%9 = getelementptr inbounds %struct.ifconf, %struct.ifconf* %1, i32 0, i32 0
store i32 880, i32* %9
%10 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 0
%11 = ptrtoint %struct.ifreq* %10 to i64
%12 = getelementptr inbounds %struct.ifconf, %struct.ifconf* %1, i32 0, i32 11
%13 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %12, i32 0, i32 0
store i64 %11, i64* %13
%14 = load i32, i32* %3
%15 = load i32, i32* @SIOCGIFCONF
%16 = bitcast %struct.ifconf* %1 to %struct.ifreq*
%17 = call i32 @ioctl(i32 %14, i32 %15, %struct.ifreq* %16)
%18 = getelementptr inbounds %struct.ifconf, %struct.ifconf* %1, i32 0, i32 0
%19 = load i32, i32* %18
%20 = sext i32 %19 to i64
%21 = udiv i64 %20, 88
%22 = trunc i64 %21 to i32
store i32 %22, i32* %4
store i32 0, i32* %5
br label %23
23: ; preds = %205, %0
%24 = load i32, i32* %5
%25 = load i32, i32* %4
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %208
27: ; preds = %23
%28 = load i32, i32* %5
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %29
%31 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %30, i32 0, i32 1
%32 = load i8*, i8** %31
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %32)
%34 = load i32, i32* %3
%35 = load i32, i32* @SIOCGIFFLAGS
%36 = load i32, i32* %5
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %37
%39 = call i32 @ioctl(i32 %34, i32 %35, %struct.ifreq* %38)
%40 = load i32, i32* %5
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %41
%43 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %42, i32 0, i32 10
%44 = load i32, i32* %43
%45 = call i32 @flagsmodes(i32 %44)
%46 = load i32, i32* %3
%47 = load i32, i32* @SIOCGIFADDR
%48 = load i32, i32* %5
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %49
%51 = call i32 @ioctl(i32 %46, i32 %47, %struct.ifreq* %50)
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%53 = load i32, i32* %5
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %54
%56 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %55, i32 0, i32 9
%57 = bitcast i32* %56 to %struct.sockaddr_in*
%58 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %57, i32 0, i32 0
%59 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %58, i32 0, i32 0
%60 = load i32, i32* %59
%61 = call i32 @adrs(i32 %60)
%62 = load i32, i32* %3
%63 = load i32, i32* @SIOCGIFBRDADDR
%64 = load i32, i32* %5
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %65
%67 = call i32 @ioctl(i32 %62, i32 %63, %struct.ifreq* %66)
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%69 = load i32, i32* %5
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %70
%72 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %71, i32 0, i32 8
%73 = bitcast i32* %72 to %struct.sockaddr_in*
%74 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %73, i32 0, i32 0
%75 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %74, i32 0, i32 0
%76 = load i32, i32* %75
%77 = call i32 @adrs(i32 %76)
%78 = load i32, i32* %3
%79 = load i32, i32* @SIOCGIFNETMASK
%80 = load i32, i32* %5
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %81
%83 = call i32 @ioctl(i32 %78, i32 %79, %struct.ifreq* %82)
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%85 = load i32, i32* %5
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %86
%88 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %87, i32 0, i32 7
%89 = bitcast i32* %88 to %struct.sockaddr_in*
%90 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %89, i32 0, i32 0
%91 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %90, i32 0, i32 0
%92 = load i32, i32* %91
%93 = call i32 @adrs(i32 %92)
%94 = load i32, i32* %3
%95 = load i32, i32* @SIOCGIFHWADDR
%96 = load i32, i32* %5
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %97
%99 = call i32 @ioctl(i32 %94, i32 %95, %struct.ifreq* %98)
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%101 = load i32, i32* %5
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %102
%104 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %103, i32 0, i32 6
%105 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %104, i32 0, i32 0
%106 = load i64, i64* %105
%107 = inttoptr i64 %106 to i8*
%108 = call i32 @hwaddress(i8* %107)
%109 = load i32, i32* %3
%110 = load i32, i32* @SIOCGIFMTU
%111 = load i32, i32* %5
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %112
%114 = call i32 @ioctl(i32 %109, i32 %110, %struct.ifreq* %113)
%115 = load i32, i32* %5
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %116
%118 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %117, i32 0, i32 2
%119 = load i32, i32* %118
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %119)
%121 = load i32, i32* %3
%122 = load i32, i32* @SIOCGIFTXQLEN
%123 = load i32, i32* %5
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %124
%126 = call i32 @ioctl(i32 %121, i32 %122, %struct.ifreq* %125)
%127 = load i32, i32* %5
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %128
%130 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %129, i32 0, i32 3
%131 = load i32, i32* %130
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %131)
%133 = load i32, i32* %3
%134 = load i32, i32* @SIOCGIFMETRIC
%135 = load i32, i32* %5
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %136
%138 = call i32 @ioctl(i32 %133, i32 %134, %struct.ifreq* %137)
%139 = load i32, i32* %5
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %140
%142 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %141, i32 0, i32 4
%143 = load i32, i32* %142
%144 = icmp eq i32 %143, 0
br i1 %144, label %145, label %147
145: ; preds = %27
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 1)
br label %154
147: ; preds = %27
%148 = load i32, i32* %5
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %149
%151 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %150, i32 0, i32 4
%152 = load i32, i32* %151
%153 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 %152)
br label %154
154: ; preds = %147, %145
%155 = load i32, i32* %3
%156 = load i32, i32* @SIOCGIFMAP
%157 = load i32, i32* %5
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %158
%160 = call i32 @ioctl(i32 %155, i32 %156, %struct.ifreq* %159)
%161 = load i32, i32* %5
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %162
%164 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %163, i32 0, i32 5
%165 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %164, i32 0, i32 5
%166 = load i32, i32* %165
%167 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %166)
%168 = load i32, i32* %5
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %169
%171 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %170, i32 0, i32 5
%172 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %171, i32 0, i32 4
%173 = load i32, i32* %172
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32 %173)
%175 = load i32, i32* %5
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %176
%178 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %177, i32 0, i32 5
%179 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %178, i32 0, i32 0
%180 = load i32, i32* %179
%181 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 %180)
%182 = load i32, i32* %5
%183 = sext i32 %182 to i64
%184 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %183
%185 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %184, i32 0, i32 5
%186 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %185, i32 0, i32 1
%187 = load i32, i32* %186
%188 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i32 %187)
%189 = load i32, i32* %5
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %190
%192 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %191, i32 0, i32 5
%193 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %192, i32 0, i32 2
%194 = load i32, i32* %193
%195 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %194)
%196 = load i32, i32* %5
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %197
%199 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %198, i32 0, i32 5
%200 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %199, i32 0, i32 3
%201 = load i32, i32* %200
%202 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), i32 %201)
%203 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%204 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
br label %205
205: ; preds = %154
%206 = load i32, i32* %5
%207 = add nsw i32 %206, 1
store i32 %207, i32* %5
br label %23
208: ; preds = %23
%209 = load i32, i32* %3
%210 = call i32 @close(i32 %209)
%211 = load i32, i32* %4
ret i32 %211
}

LLVM IR (-O2):
%struct.ifconf = type { i32, i8*, i32, i32, i32, %struct.TYPE_8__, %struct.TYPE_7__, i32, i32, i32, i32, %struct.TYPE_5__ }
%struct.TYPE_8__ = type { i32, i32, i32, i32, i32, i32 }
%struct.TYPE_7__ = type { i64 }
%struct.TYPE_5__ = type { i64 }
%struct.ifreq = type { i32, i8*, i32, i32, i32, %struct.TYPE_8__, %struct.TYPE_7__, i32, i32, i32, i32, %struct.TYPE_5__ }
@PF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@SIOCGIFCONF = global i32 0
@.str = [3 x i8] c"%s\00"
@SIOCGIFFLAGS = global i32 0
@SIOCGIFADDR = global i32 0
@.str.1 = [9 x i8] c"\09addr: \09\00"
@SIOCGIFBRDADDR = global i32 0
@.str.2 = [11 x i8] c"\0A\09Bcast: \09\00"
@SIOCGIFNETMASK = global i32 0
@.str.3 = [11 x i8] c"\0A\09nmask: \09\00"
@SIOCGIFHWADDR = global i32 0
@.str.4 = [12 x i8] c"\0A\09HWaddr: \09\00"
@SIOCGIFMTU = global i32 0
@.str.5 = [10 x i8] c"\0A\09MTU: %d\00"
@SIOCGIFTXQLEN = global i32 0
@.str.6 = [17 x i8] c"\0A\09txqueuelen: %d\00"
@SIOCGIFMETRIC = global i32 0
@.str.7 = [13 x i8] c"\0A\09Metric: %d\00"
@SIOCGIFMAP = global i32 0
@.str.8 = [14 x i8] c"\0A\09mem= 0x%lx-\00"
@.str.9 = [8 x i8] c"0x%lx \00"
@.str.10 = [11 x i8] c"io= 0x%x \00"
@.str.11 = [10 x i8] c"irq= %i \00"
@.str.12 = [10 x i8] c"dma= %i \00"
@.str.13 = [10 x i8] c"port= %i\0A\00"
define i32 @show_ip() {
%1 = alloca %struct.ifconf
%2 = alloca [10 x %struct.ifreq]
%3 = bitcast %struct.ifconf* %1 to i8*
%4 = bitcast [10 x %struct.ifreq]* %2 to i8*
%5 = load i32, i32* @PF_INET
%6 = load i32, i32* @SOCK_DGRAM
%7 = tail call i32 @socket(i32 %5, i32 %6, i32 0)
%8 = getelementptr inbounds %struct.ifconf, %struct.ifconf* %1, i64 0, i32 0
store i32 880, i32* %8
%9 = ptrtoint [10 x %struct.ifreq]* %2 to i64
%10 = getelementptr inbounds %struct.ifconf, %struct.ifconf* %1, i64 0, i32 11, i32 0
store i64 %9, i64* %10
%11 = load i32, i32* @SIOCGIFCONF
%12 = bitcast %struct.ifconf* %1 to %struct.ifreq*
%13 = call i32 @ioctl(i32 %7, i32 %11, %struct.ifreq* %12)
%14 = load i32, i32* %8
%15 = sext i32 %14 to i64
%16 = udiv i64 %15, 88
%17 = trunc i64 %16 to i32
%18 = icmp sgt i32 %17, 0
br i1 %18, label %19, label %98
19: ; preds = %0
%20 = and i64 %16, 4294967295
br label %21
21: ; preds = %19, %21
%22 = phi i64 [ 0, %19 ], [ %96, %21 ]
%23 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %22
%24 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %22, i32 1
%25 = load i8*, i8** %24
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %25)
%27 = load i32, i32* @SIOCGIFFLAGS
%28 = call i32 @ioctl(i32 %7, i32 %27, %struct.ifreq* %23)
%29 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %22, i32 10
%30 = load i32, i32* %29
%31 = call i32 @flagsmodes(i32 %30)
%32 = load i32, i32* @SIOCGIFADDR
%33 = call i32 @ioctl(i32 %7, i32 %32, %struct.ifreq* %23)
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%35 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %22, i32 9
%36 = load i32, i32* %35
%37 = call i32 @adrs(i32 %36)
%38 = load i32, i32* @SIOCGIFBRDADDR
%39 = call i32 @ioctl(i32 %7, i32 %38, %struct.ifreq* %23)
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%41 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %22, i32 8
%42 = load i32, i32* %41
%43 = call i32 @adrs(i32 %42)
%44 = load i32, i32* @SIOCGIFNETMASK
%45 = call i32 @ioctl(i32 %7, i32 %44, %struct.ifreq* %23)
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%47 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %22, i32 7
%48 = load i32, i32* %47
%49 = call i32 @adrs(i32 %48)
%50 = load i32, i32* @SIOCGIFHWADDR
%51 = call i32 @ioctl(i32 %7, i32 %50, %struct.ifreq* %23)
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%53 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %22, i32 6, i32 0
%54 = load i64, i64* %53
%55 = inttoptr i64 %54 to i8*
%56 = call i32 @hwaddress(i8* %55)
%57 = load i32, i32* @SIOCGIFMTU
%58 = call i32 @ioctl(i32 %7, i32 %57, %struct.ifreq* %23)
%59 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %22, i32 2
%60 = load i32, i32* %59
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %60)
%62 = load i32, i32* @SIOCGIFTXQLEN
%63 = call i32 @ioctl(i32 %7, i32 %62, %struct.ifreq* %23)
%64 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %22, i32 3
%65 = load i32, i32* %64
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 %65)
%67 = load i32, i32* @SIOCGIFMETRIC
%68 = call i32 @ioctl(i32 %7, i32 %67, %struct.ifreq* %23)
%69 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %22, i32 4
%70 = load i32, i32* %69
%71 = icmp eq i32 %70, 0
%72 = select i1 %71, i32 1, i32 %70
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 %72)
%74 = load i32, i32* @SIOCGIFMAP
%75 = call i32 @ioctl(i32 %7, i32 %74, %struct.ifreq* %23)
%76 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %22, i32 5, i32 5
%77 = load i32, i32* %76
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %77)
%79 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %22, i32 5, i32 4
%80 = load i32, i32* %79
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32 %80)
%82 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %22, i32 5, i32 0
%83 = load i32, i32* %82
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 %83)
%85 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %22, i32 5, i32 1
%86 = load i32, i32* %85
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i32 %86)
%88 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %22, i32 5, i32 2
%89 = load i32, i32* %88
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %89)
%91 = getelementptr inbounds [10 x %struct.ifreq], [10 x %struct.ifreq]* %2, i64 0, i64 %22, i32 5, i32 3
%92 = load i32, i32* %91
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), i32 %92)
%94 = call i32 @putchar(i32 10)
%95 = call i32 @putchar(i32 10)
%96 = add nuw nsw i64 %22, 1
%97 = icmp eq i64 %96, %20
br i1 %97, label %98, label %21
98: ; preds = %21, %0
%99 = call i32 @close(i32 %7)
ret i32 %17
}