#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 */

/* Type definitions */
struct sockaddr_in {
  int /*<<< orphan*/ sin_addr;
};
struct ifreq {
  int /*<<< orphan*/ ifr_netmask;
  int /*<<< orphan*/ ifr_addr;
  int /*<<< orphan*/ ifr_name;
};

/* Variables and functions */
int /*<<< orphan*/ IFNAMSIZ;
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ PF_INET;
int /*<<< orphan*/ SIOCGIFADDR;
int /*<<< orphan*/ SIOCGIFNETMASK;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ errno;
int ioctl(int, int /*<<< orphan*/, struct ifreq *);
int /*<<< orphan*/ log_msg(int /*<<< orphan*/, char *, int /*<<< orphan*/);
scalar_t__ malloc(int);
int /*<<< orphan*/ snprintf(char *, int, char *, char, char, char, char, char,
                            char, char, char);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int /*<<< orphan*/ strncpy(int /*<<< orphan*/, char const *,
                           int /*<<< orphan*/);
char *get_network_address(const char *dev) {
  int r, sfd;
  struct ifreq ifaddr, ifnetmask;
  char *dest, *addr, *mask;
  sfd = socket(PF_INET, SOCK_DGRAM, 0);
  if (sfd == -1) {
    log_msg(LOG_ERR, "Error opening interface socket: %s\n", strerror(errno));
    return NULL;
  }
  strncpy(ifaddr.ifr_name, dev, IFNAMSIZ);
  r = ioctl(sfd, SIOCGIFADDR, &ifaddr);
  if (r == -1) {
    log_msg(LOG_ERR, "Error opening interface device: %s\n", strerror(errno));
    close(sfd);
    return NULL;
  }
  strncpy(ifnetmask.ifr_name, dev, IFNAMSIZ);
  r = ioctl(sfd, SIOCGIFNETMASK, &ifnetmask);
  if (r == -1) {
    log_msg(LOG_ERR, "Error opening netmask device: %s\n", strerror(errno));
    close(sfd);
    return NULL;
  }
  dest = (char *)malloc(33);
  addr = (char *)&(((struct sockaddr_in *)&ifaddr.ifr_addr)->sin_addr);
  mask = (char *)&(((struct sockaddr_in *)&ifnetmask.ifr_netmask)->sin_addr);
  snprintf(dest, 32, "%d.%d.%d.%d/%d.%d.%d.%d", addr[0] & mask[0] & 0xFF,
           addr[1] & mask[1] & 0xFF, addr[2] & mask[2] & 0xFF,
           addr[3] & mask[3] & 0xFF, mask[0] & 0xFF, mask[1] & 0xFF,
           mask[2] & 0xFF, mask[3] & 0xFF);
  close(sfd);
  return dest;
}


x86 assembly (clang, -O0):
<get_network_address>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x90,%rsp
mov    %rdi,-0x20(%rbp)
mov    0x2e1f(%rip),%rax
mov    (%rax),%edi
mov    0x2e36(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10a0 <socket@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0xffffffff,-0x28(%rbp)
jne    11f0 <get_network_address+0x70>
mov    0x2de9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x64(%rbp)
mov    0x2df5(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
mov    -0x64(%rbp),%edi
mov    %eax,%edx
lea    0xe22(%rip),%rsi
call   1080 <log_msg@plt>
movq   $0x0,-0x18(%rbp)
jmp    13f8 <get_network_address+0x278>
mov    -0x30(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    0x2dca(%rip),%rax
mov    (%rax),%edx
call   1030 <strncpy@plt>
mov    -0x28(%rbp),%edi
mov    0x2dd9(%rip),%rax
mov    (%rax),%esi
lea    -0x38(%rbp),%rdx
call   1050 <ioctl@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0xffffffff,-0x24(%rbp)
jne    1267 <get_network_address+0xe7>
mov    0x2d7a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x68(%rbp)
mov    0x2d86(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
mov    -0x68(%rbp),%edi
mov    %eax,%edx
lea    0xdd7(%rip),%rsi
call   1080 <log_msg@plt>
mov    -0x28(%rbp),%edi
call   1060 <close@plt>
movq   $0x0,-0x18(%rbp)
jmp    13f8 <get_network_address+0x278>
mov    -0x40(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    0x2d53(%rip),%rax
mov    (%rax),%edx
call   1030 <strncpy@plt>
mov    -0x28(%rbp),%edi
mov    0x2d5a(%rip),%rax
mov    (%rax),%esi
lea    -0x48(%rbp),%rdx
call   1050 <ioctl@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0xffffffff,-0x24(%rbp)
jne    12de <get_network_address+0x15e>
mov    0x2d03(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x6c(%rbp)
mov    0x2d0f(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
mov    -0x6c(%rbp),%edi
mov    %eax,%edx
lea    0xd84(%rip),%rsi
call   1080 <log_msg@plt>
mov    -0x28(%rbp),%edi
call   1060 <close@plt>
movq   $0x0,-0x18(%rbp)
jmp    13f8 <get_network_address+0x278>
mov    $0x21,%edi
call   1070 <malloc@plt>
mov    %rax,-0x50(%rbp)
lea    -0x38(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x58(%rbp)
lea    -0x48(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x58(%rbp),%rax
movsbl (%rax),%eax
mov    -0x60(%rbp),%rcx
movsbl (%rcx),%ecx
and    %ecx,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x58(%rbp),%rax
movsbl 0x1(%rax),%eax
mov    -0x60(%rbp),%rdx
movsbl 0x1(%rdx),%edx
and    %edx,%eax
and    $0xff,%eax
mov    %al,%r8b
mov    -0x58(%rbp),%rax
movsbl 0x2(%rax),%eax
mov    -0x60(%rbp),%rdx
movsbl 0x2(%rdx),%edx
and    %edx,%eax
and    $0xff,%eax
mov    %al,%r9b
mov    -0x58(%rbp),%rax
movsbl 0x3(%rax),%eax
mov    -0x60(%rbp),%rdx
movsbl 0x3(%rdx),%edx
and    %edx,%eax
and    $0xff,%eax
mov    %al,%r14b
mov    -0x60(%rbp),%rax
movsbl (%rax),%eax
and    $0xff,%eax
mov    %al,%bl
mov    -0x60(%rbp),%rax
movsbl 0x1(%rax),%eax
and    $0xff,%eax
mov    %al,%r11b
mov    -0x60(%rbp),%rax
movsbl 0x2(%rax),%eax
and    $0xff,%eax
mov    %al,%r10b
mov    -0x60(%rbp),%rax
movsbl 0x3(%rax),%eax
and    $0xff,%eax
mov    $0x20,%esi
lea    0xcba(%rip),%rdx
movsbl %cl,%ecx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %r14b,%r14d
mov    %r14d,(%rsp)
movsbl %bl,%ebx
mov    %ebx,0x8(%rsp)
movsbl %r11b,%r11d
mov    %r11d,0x10(%rsp)
movsbl %r10b,%r10d
mov    %r10d,0x18(%rsp)
movsbl %al,%eax
mov    %eax,0x20(%rsp)
call   1040 <snprintf@plt>
mov    -0x28(%rbp),%edi
call   1060 <close@plt>
mov    -0x50(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x90,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_network_address>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
mov    0x2e22(%rip),%rax
mov    (%rax),%edi
mov    0x2e39(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10a0 <socket@plt>
cmp    $0xffffffff,%eax
je     128a <get_network_address+0x10a>
mov    %eax,%ebp
mov    0x2e0e(%rip),%r14
mov    (%r14),%edx
mov    %rbx,%rsi
call   1030 <strncpy@plt>
mov    0x2e1c(%rip),%rax
mov    (%rax),%esi
lea    0x10(%rsp),%rdx
mov    %ebp,%edi
call   1050 <ioctl@plt>
cmp    $0xffffffff,%eax
je     12b3 <get_network_address+0x133>
mov    (%r14),%edx
mov    %rbx,%rsi
call   1030 <strncpy@plt>
mov    0x2deb(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
mov    %ebp,%edi
call   1050 <ioctl@plt>
cmp    $0xffffffff,%eax
je     12d3 <get_network_address+0x153>
mov    $0x21,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
movsbl (%rsp),%r10d
mov    0x14(%rsp),%sil
and    %r10b,%sil
movsbl 0x1(%rsp),%r11d
mov    0x15(%rsp),%dl
and    %r11b,%dl
movsbl 0x2(%rsp),%r14d
mov    0x16(%rsp),%al
and    %r14b,%al
movsbl 0x3(%rsp),%r15d
mov    0x17(%rsp),%cl
and    %r15b,%cl
sub    $0x8,%rsp
movsbl %cl,%r12d
movsbl %sil,%ecx
movsbl %dl,%r8d
movsbl %al,%r9d
lea    0xe04(%rip),%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
push   %r15
push   %r14
push   %r11
push   %r10
push   %r12
call   1040 <snprintf@plt>
add    $0x30,%rsp
mov    %ebp,%edi
call   1060 <close@plt>
jmp    1303 <get_network_address+0x183>
mov    0x2d17(%rip),%rax
mov    (%rax),%ebx
mov    0x2d26(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
lea    0xd58(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
call   1080 <log_msg@plt>
jmp    1301 <get_network_address+0x181>
mov    0x2cee(%rip),%rax
mov    (%rax),%ebx
mov    0x2cfd(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
lea    0xd53(%rip),%rsi
jmp    12f1 <get_network_address+0x171>
mov    0x2cce(%rip),%rax
mov    (%rax),%ebx
mov    0x2cdd(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
lea    0xd57(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
call   1080 <log_msg@plt>
mov    %ebp,%edi
call   1060 <close@plt>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.ifreq = type { i32, i32, i32 }
%struct.sockaddr_in = type { i32 }
@PF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@LOG_ERR = global i32 0
@.str = [36 x i8] c"Error opening interface socket: %s\0A\00"
@errno = global i32 0
@IFNAMSIZ = global i32 0
@SIOCGIFADDR = global i32 0
@.str.1 = [36 x i8] c"Error opening interface device: %s\0A\00"
@SIOCGIFNETMASK = global i32 0
@.str.2 = [34 x i8] c"Error opening netmask device: %s\0A\00"
@.str.3 = [24 x i8] c"%d.%d.%d.%d/%d.%d.%d.%d\00"
define i8* @get_network_address(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.ifreq
%7 = alloca %struct.ifreq
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %3
%11 = load i32, i32* @PF_INET
%12 = load i32, i32* @SOCK_DGRAM
%13 = call i32 @socket(i32 %11, i32 %12, i32 0)
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %21
16: ; preds = %1
%17 = load i32, i32* @LOG_ERR
%18 = load i32, i32* @errno
%19 = call i32 @strerror(i32 %18)
%20 = call i32 @log_msg(i32 %17, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %19)
store i8* null, i8** %2
br label %141
21: ; preds = %1
%22 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %6, i32 0, i32 2
%23 = load i32, i32* %22
%24 = load i8*, i8** %3
%25 = load i32, i32* @IFNAMSIZ
%26 = call i32 @strncpy(i32 %23, i8* %24, i32 %25)
%27 = load i32, i32* %5
%28 = load i32, i32* @SIOCGIFADDR
%29 = call i32 @ioctl(i32 %27, i32 %28, %struct.ifreq* %6)
store i32 %29, i32* %4
%30 = load i32, i32* %4
%31 = icmp eq i32 %30, -1
br i1 %31, label %32, label %39
32: ; preds = %21
%33 = load i32, i32* @LOG_ERR
%34 = load i32, i32* @errno
%35 = call i32 @strerror(i32 %34)
%36 = call i32 @log_msg(i32 %33, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %35)
%37 = load i32, i32* %5
%38 = call i32 @close(i32 %37)
store i8* null, i8** %2
br label %141
39: ; preds = %21
%40 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %7, i32 0, i32 2
%41 = load i32, i32* %40
%42 = load i8*, i8** %3
%43 = load i32, i32* @IFNAMSIZ
%44 = call i32 @strncpy(i32 %41, i8* %42, i32 %43)
%45 = load i32, i32* %5
%46 = load i32, i32* @SIOCGIFNETMASK
%47 = call i32 @ioctl(i32 %45, i32 %46, %struct.ifreq* %7)
store i32 %47, i32* %4
%48 = load i32, i32* %4
%49 = icmp eq i32 %48, -1
br i1 %49, label %50, label %57
50: ; preds = %39
%51 = load i32, i32* @LOG_ERR
%52 = load i32, i32* @errno
%53 = call i32 @strerror(i32 %52)
%54 = call i32 @log_msg(i32 %51, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %53)
%55 = load i32, i32* %5
%56 = call i32 @close(i32 %55)
store i8* null, i8** %2
br label %141
57: ; preds = %39
%58 = call i64 @malloc(i32 33)
%59 = inttoptr i64 %58 to i8*
store i8* %59, i8** %8
%60 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %6, i32 0, i32 1
%61 = bitcast i32* %60 to %struct.sockaddr_in*
%62 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %61, i32 0, i32 0
%63 = bitcast i32* %62 to i8*
store i8* %63, i8** %9
%64 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %7, i32 0, i32 0
%65 = bitcast i32* %64 to %struct.sockaddr_in*
%66 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %65, i32 0, i32 0
%67 = bitcast i32* %66 to i8*
store i8* %67, i8** %10
%68 = load i8*, i8** %8
%69 = load i8*, i8** %9
%70 = getelementptr inbounds i8, i8* %69, i64 0
%71 = load i8, i8* %70
%72 = sext i8 %71 to i32
%73 = load i8*, i8** %10
%74 = getelementptr inbounds i8, i8* %73, i64 0
%75 = load i8, i8* %74
%76 = sext i8 %75 to i32
%77 = and i32 %72, %76
%78 = and i32 %77, 255
%79 = trunc i32 %78 to i8
%80 = load i8*, i8** %9
%81 = getelementptr inbounds i8, i8* %80, i64 1
%82 = load i8, i8* %81
%83 = sext i8 %82 to i32
%84 = load i8*, i8** %10
%85 = getelementptr inbounds i8, i8* %84, i64 1
%86 = load i8, i8* %85
%87 = sext i8 %86 to i32
%88 = and i32 %83, %87
%89 = and i32 %88, 255
%90 = trunc i32 %89 to i8
%91 = load i8*, i8** %9
%92 = getelementptr inbounds i8, i8* %91, i64 2
%93 = load i8, i8* %92
%94 = sext i8 %93 to i32
%95 = load i8*, i8** %10
%96 = getelementptr inbounds i8, i8* %95, i64 2
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = and i32 %94, %98
%100 = and i32 %99, 255
%101 = trunc i32 %100 to i8
%102 = load i8*, i8** %9
%103 = getelementptr inbounds i8, i8* %102, i64 3
%104 = load i8, i8* %103
%105 = sext i8 %104 to i32
%106 = load i8*, i8** %10
%107 = getelementptr inbounds i8, i8* %106, i64 3
%108 = load i8, i8* %107
%109 = sext i8 %108 to i32
%110 = and i32 %105, %109
%111 = and i32 %110, 255
%112 = trunc i32 %111 to i8
%113 = load i8*, i8** %10
%114 = getelementptr inbounds i8, i8* %113, i64 0
%115 = load i8, i8* %114
%116 = sext i8 %115 to i32
%117 = and i32 %116, 255
%118 = trunc i32 %117 to i8
%119 = load i8*, i8** %10
%120 = getelementptr inbounds i8, i8* %119, i64 1
%121 = load i8, i8* %120
%122 = sext i8 %121 to i32
%123 = and i32 %122, 255
%124 = trunc i32 %123 to i8
%125 = load i8*, i8** %10
%126 = getelementptr inbounds i8, i8* %125, i64 2
%127 = load i8, i8* %126
%128 = sext i8 %127 to i32
%129 = and i32 %128, 255
%130 = trunc i32 %129 to i8
%131 = load i8*, i8** %10
%132 = getelementptr inbounds i8, i8* %131, i64 3
%133 = load i8, i8* %132
%134 = sext i8 %133 to i32
%135 = and i32 %134, 255
%136 = trunc i32 %135 to i8
%137 = call i32 @snprintf(i8* %68, i32 32, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8 signext %79, i8 signext %90, i8 signext %101, i8 signext %112, i8 signext %118, i8 signext %124, i8 signext %130, i8 signext %136)
%138 = load i32, i32* %5
%139 = call i32 @close(i32 %138)
%140 = load i8*, i8** %8
store i8* %140, i8** %2
br label %141
141: ; preds = %57, %50, %32, %16
%142 = load i8*, i8** %2
ret i8* %142
}

LLVM IR (-O2):
%struct.ifreq = type { i32, i32, i32 }
@PF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@LOG_ERR = global i32 0
@.str = [36 x i8] c"Error opening interface socket: %s\0A\00"
@errno = global i32 0
@IFNAMSIZ = global i32 0
@SIOCGIFADDR = global i32 0
@.str.1 = [36 x i8] c"Error opening interface device: %s\0A\00"
@SIOCGIFNETMASK = global i32 0
@.str.2 = [34 x i8] c"Error opening netmask device: %s\0A\00"
@.str.3 = [24 x i8] c"%d.%d.%d.%d/%d.%d.%d.%d\00"
define i8* @get_network_address(i8* %0) {
%2 = alloca %struct.ifreq
%3 = alloca %struct.ifreq
%4 = bitcast %struct.ifreq* %2 to i8*
%5 = bitcast %struct.ifreq* %3 to i8*
%6 = load i32, i32* @PF_INET
%7 = load i32, i32* @SOCK_DGRAM
%8 = tail call i32 @socket(i32 %6, i32 %7, i32 0)
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = load i32, i32* @LOG_ERR
%12 = load i32, i32* @errno
%13 = tail call i32 @strerror(i32 %12)
%14 = tail call i32 @log_msg(i32 %11, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %13)
br label %64
15: ; preds = %1
%16 = load i32, i32* @IFNAMSIZ
%17 = tail call i32 @strncpy(i32 undef, i8* %0, i32 %16)
%18 = load i32, i32* @SIOCGIFADDR
%19 = call i32 @ioctl(i32 %8, i32 %18, %struct.ifreq* %2)
%20 = icmp eq i32 %19, -1
br i1 %20, label %21, label %27
21: ; preds = %15
%22 = load i32, i32* @LOG_ERR
%23 = load i32, i32* @errno
%24 = call i32 @strerror(i32 %23)
%25 = call i32 @log_msg(i32 %22, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %24)
%26 = call i32 @close(i32 %8)
br label %64
27: ; preds = %15
%28 = load i32, i32* @IFNAMSIZ
%29 = call i32 @strncpy(i32 undef, i8* %0, i32 %28)
%30 = load i32, i32* @SIOCGIFNETMASK
%31 = call i32 @ioctl(i32 %8, i32 %30, %struct.ifreq* %3)
%32 = icmp eq i32 %31, -1
br i1 %32, label %33, label %39
33: ; preds = %27
%34 = load i32, i32* @LOG_ERR
%35 = load i32, i32* @errno
%36 = call i32 @strerror(i32 %35)
%37 = call i32 @log_msg(i32 %34, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %36)
%38 = call i32 @close(i32 %8)
br label %64
39: ; preds = %27
%40 = call i64 @malloc(i32 33)
%41 = inttoptr i64 %40 to i8*
%42 = getelementptr inbounds %struct.ifreq, %struct.ifreq* %2, i64 0, i32 1
%43 = bitcast i32* %42 to i8*
%44 = load i8, i8* %43
%45 = load i8, i8* %5
%46 = and i8 %45, %44
%47 = getelementptr inbounds i8, i8* %43, i64 1
%48 = load i8, i8* %47
%49 = getelementptr inbounds i8, i8* %5, i64 1
%50 = load i8, i8* %49
%51 = and i8 %50, %48
%52 = getelementptr inbounds i8, i8* %43, i64 2
%53 = load i8, i8* %52
%54 = getelementptr inbounds i8, i8* %5, i64 2
%55 = load i8, i8* %54
%56 = and i8 %55, %53
%57 = getelementptr inbounds i8, i8* %43, i64 3
%58 = load i8, i8* %57
%59 = getelementptr inbounds i8, i8* %5, i64 3
%60 = load i8, i8* %59
%61 = and i8 %60, %58
%62 = call i32 @snprintf(i8* %41, i32 32, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8 signext %46, i8 signext %51, i8 signext %56, i8 signext %61, i8 signext %45, i8 signext %50, i8 signext %55, i8 signext %60)
%63 = call i32 @close(i32 %8)
br label %64
64: ; preds = %39, %33, %21, %10
%65 = phi i8* [ null, %10 ], [ null, %21 ], [ null, %33 ], [ %41, %39 ]
ret i8* %65
}