#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 */
typedef int /*<<< orphan*/ v6str;
struct in_addr {
  int /*<<< orphan*/ s6_addr;
  int /*<<< orphan*/ s_addr;
};
struct in6_addr {
  int /*<<< orphan*/ s6_addr;
  int /*<<< orphan*/ s_addr;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ AF_INET6;
int INET6_ADDRSTRLEN;
int INET_ADDRSTRLEN;
int /*<<< orphan*/ *inet_ntop(int /*<<< orphan*/, struct in_addr *, char *,
                              int);
int /*<<< orphan*/ parse_str(int /*<<< orphan*/, char *, struct in_addr *,
                             unsigned long *);
int /*<<< orphan*/ print_error();
int /*<<< orphan*/ print_usage();
int /*<<< orphan*/ printf(char *, char *, unsigned long);
int /*<<< orphan*/ strncpy(char *, char const *, int);
int main(int argc, const char **argv) {
  char v6str[(INET6_ADDRSTRLEN + 4)], v4str[(INET_ADDRSTRLEN + 3)];
  struct in6_addr v6;
  struct in_addr v4;
  unsigned long v6it, v4it, mask;
  unsigned char *byte4, *byte6;
  unsigned char bit4, bit6;
  if (argc != 3)
    print_usage();
  strncpy(v6str, argv[1], (INET6_ADDRSTRLEN + 4));
  v6str[(INET6_ADDRSTRLEN + 4) - 1] = '\0';
  parse_str(AF_INET6, v6str, &v6, &v6it);
  strncpy(v4str, argv[2], (INET_ADDRSTRLEN + 3));
  v6str[(INET_ADDRSTRLEN + 3) - 1] = '\0';
  parse_str(AF_INET, v4str, &v4, &v4it);
  mask = (32 - v4it) + v6it;
  if (mask > 128)
    print_usage();
  while (v4it < 32) {
    byte6 = (unsigned char *)(&v6.s6_addr) + (v6it >> 3);
    byte4 = (unsigned char *)(&v4.s_addr) + (v4it >> 3);
    bit6 = 128 >> (v6it & 0x07);
    bit4 = 128 >> (v4it & 0x07);
    if (*byte4 & bit4)
      *byte6 |= bit6;
    else
      *byte6 &= ~bit6;
    v4it++;
    v6it++;
  }
  while (v6it < 128) {
    byte6 = (unsigned char *)(&v6.s6_addr) + (v6it >> 2);
    bit6 = 128 >> (v6it & 0x07);
    *byte6 &= ~bit6;
    v6it++;
  }
  if (inet_ntop(AF_INET6, &v6, v6str, sizeof(v6str)) == NULL)
    print_error();
  printf("%s/%lu\n", v6str, mask);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e68(%rip),%rax
mov    (%rax),%eax
add    $0x4,%eax
mov    %rax,-0x80(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x78(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
mov    0x2e15(%rip),%rax
mov    (%rax),%eax
add    $0x3,%eax
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x70(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     11e5 <main+0x85>
mov    $0x0,%al
call   1080 <print_usage@plt>
mov    -0x78(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    0x2df0(%rip),%rax
mov    (%rax),%edx
add    $0x4,%edx
call   1040 <strncpy@plt>
mov    -0x78(%rbp),%rsi
mov    0x2ddb(%rip),%rax
mov    (%rax),%eax
add    $0x4,%eax
sub    $0x1,%eax
cltq
movb   $0x0,(%rsi,%rax,1)
mov    0x2db6(%rip),%rax
mov    (%rax),%edi
lea    -0x30(%rbp),%rdx
lea    -0x40(%rbp),%rcx
call   1070 <parse_str@plt>
mov    -0x70(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
mov    0x2d84(%rip),%rax
mov    (%rax),%edx
add    $0x3,%edx
call   1040 <strncpy@plt>
mov    -0x70(%rbp),%rsi
mov    -0x78(%rbp),%rax
mov    0x2d6b(%rip),%rcx
mov    (%rcx),%ecx
add    $0x3,%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    0x2d6d(%rip),%rax
mov    (%rax),%edi
lea    -0x38(%rbp),%rdx
lea    -0x48(%rbp),%rcx
call   1070 <parse_str@plt>
mov    $0x20,%eax
sub    -0x48(%rbp),%rax
add    -0x40(%rbp),%rax
mov    %rax,-0x50(%rbp)
cmpq   $0x80,-0x50(%rbp)
jbe    12a8 <main+0x148>
mov    $0x0,%al
call   1080 <print_usage@plt>
jmp    12ad <main+0x14d>
cmpq   $0x20,-0x48(%rbp)
jae    1363 <main+0x203>
lea    -0x30(%rbp),%rax
mov    -0x40(%rbp),%rcx
shr    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
lea    -0x38(%rbp),%rax
add    $0x4,%rax
mov    -0x48(%rbp),%rcx
shr    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x40(%rbp),%rax
and    $0x7,%rax
mov    %eax,%ecx
mov    $0x80,%eax
sar    %cl,%eax
mov    %al,-0x62(%rbp)
mov    -0x48(%rbp),%rax
and    $0x7,%rax
mov    %eax,%ecx
mov    $0x80,%eax
sar    %cl,%eax
mov    %al,-0x61(%rbp)
mov    -0x58(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x61(%rbp),%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1334 <main+0x1d4>
movzbl -0x62(%rbp),%edx
mov    -0x60(%rbp),%rax
movzbl (%rax),%ecx
or     %edx,%ecx
mov    %cl,(%rax)
jmp    1346 <main+0x1e6>
movzbl -0x62(%rbp),%edx
xor    $0xffffffff,%edx
mov    -0x60(%rbp),%rax
movzbl (%rax),%ecx
and    %edx,%ecx
mov    %cl,(%rax)
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    12ad <main+0x14d>
jmp    1368 <main+0x208>
cmpq   $0x80,-0x40(%rbp)
jae    13c0 <main+0x260>
lea    -0x30(%rbp),%rax
mov    -0x40(%rbp),%rcx
shr    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x40(%rbp),%rax
and    $0x7,%rax
mov    %eax,%ecx
mov    $0x80,%eax
sar    %cl,%eax
mov    %al,-0x62(%rbp)
movzbl -0x62(%rbp),%edx
xor    $0xffffffff,%edx
mov    -0x60(%rbp),%rax
movzbl (%rax),%ecx
and    %edx,%ecx
mov    %cl,(%rax)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    1368 <main+0x208>
mov    -0x78(%rbp),%rdx
mov    -0x80(%rbp),%rax
mov    0x2c09(%rip),%rcx
mov    (%rcx),%edi
lea    -0x30(%rbp),%rsi
mov    %eax,%ecx
call   1030 <inet_ntop@plt>
cmp    $0x0,%rax
jne    13ed <main+0x28d>
mov    $0x0,%al
call   1050 <print_error@plt>
mov    -0x78(%rbp),%rsi
mov    -0x50(%rbp),%rdx
lea    0xc04(%rip),%rdi
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r15
mov    0x2e6d(%rip),%rax
mov    (%rax),%r14d
add    $0x4,%r14d
mov    %rsp,%r12
lea    0xf(%r14),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
mov    0x2e2e(%rip),%r13
mov    0x0(%r13),%eax
add    $0x3,%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %r14d,%edx
cmp    $0x3,%edi
je     11cd <main+0x6d>
xor    %eax,%eax
call   1080 <print_usage@plt>
mov    0x2e20(%rip),%rax
mov    (%rax),%edx
add    $0x4,%edx
mov    0x8(%r15),%rsi
mov    %r12,%rdi
call   1040 <strncpy@plt>
mov    0x2e08(%rip),%rax
movslq (%rax),%rax
movb   $0x0,0x3(%rax,%r12,1)
mov    0x2de8(%rip),%rax
mov    (%rax),%edi
lea    -0x30(%rbp),%rdx
lea    -0x38(%rbp),%rcx
mov    %r12,%rsi
call   1070 <parse_str@plt>
mov    0x10(%r15),%rsi
mov    0x0(%r13),%edx
add    $0x3,%edx
mov    %rbx,%rdi
call   1040 <strncpy@plt>
movslq 0x0(%r13),%rax
movb   $0x0,0x2(%rax,%r12,1)
mov    0x2dba(%rip),%rax
mov    (%rax),%edi
lea    -0x48(%rbp),%rdx
lea    -0x40(%rbp),%rcx
mov    %rbx,%rsi
call   1070 <parse_str@plt>
mov    -0x40(%rbp),%rdx
mov    -0x38(%rbp),%r15
sub    %rdx,%r15
add    $0x20,%r15
cmp    $0x81,%r15
jb     125b <main+0xfb>
xor    %eax,%eax
call   1080 <print_usage@plt>
mov    -0x40(%rbp),%rdx
mov    -0x38(%rbp),%r8
cmp    $0x1f,%rdx
jbe    1288 <main+0x128>
cmp    $0x7f,%r8
jbe    12c8 <main+0x168>
jmp    1343 <main+0x1e3>
not    %bl
and    -0x30(%rbp,%rsi,1),%bl
mov    %bl,-0x30(%rbp,%rsi,1)
add    $0x1,%rdx
add    $0x1,%r8
cmp    $0x20,%rdx
je     12b6 <main+0x156>
mov    %r8,%rsi
mov    %r8d,%ecx
and    $0x7,%cl
mov    $0x80,%bl
shr    %cl,%bl
shr    $0x3,%rsi
mov    %rdx,%rdi
shr    $0x3,%rdi
mov    %edx,%ecx
and    $0x7,%cl
movzbl -0x44(%rbp,%rdi,1),%eax
shl    %cl,%al
test   $0x80,%al
je     1270 <main+0x110>
or     -0x30(%rbp,%rsi,1),%bl
jmp    1276 <main+0x116>
movq   $0x20,-0x40(%rbp)
mov    %r8,-0x38(%rbp)
cmp    $0x7f,%r8
ja     1343 <main+0x1e3>
mov    %r8,%rdx
test   $0x1,%r8b
je     12ec <main+0x18c>
mov    %r8,%rax
shr    $0x2,%rax
mov    %r8d,%ecx
and    $0x7,%cl
mov    $0x80,%dl
shr    %cl,%dl
not    %dl
and    %dl,-0x30(%rbp,%rax,1)
lea    0x1(%r8),%rdx
cmp    $0x7f,%r8
je     133b <main+0x1db>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rdx,%rax
shr    $0x2,%rax
mov    %edx,%ecx
and    $0x7,%cl
mov    $0x80,%bl
shr    %cl,%bl
not    %bl
and    %bl,-0x30(%rbp,%rax,1)
lea    0x1(%rdx),%rcx
mov    %rcx,%rax
shr    $0x2,%rax
and    $0x7,%cl
mov    $0x80,%bl
shr    %cl,%bl
not    %bl
and    %bl,-0x30(%rbp,%rax,1)
add    $0x2,%rdx
cmp    $0x80,%rdx
jne    1300 <main+0x1a0>
movq   $0x80,-0x38(%rbp)
mov    0x2c8e(%rip),%rax
mov    (%rax),%edi
lea    -0x30(%rbp),%rsi
mov    %r12,%rdx
mov    %r14d,%ecx
call   1030 <inet_ntop@plt>
test   %rax,%rax
jne    1367 <main+0x207>
xor    %eax,%eax
call   1050 <print_error@plt>
lea    0xc92(%rip),%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1060 <printf@plt>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.in6_addr = type { i32, i32 }
%struct.in_addr = type { i32, i32 }
@INET6_ADDRSTRLEN = global i32 0
@INET_ADDRSTRLEN = global i32 0
@AF_INET6 = global i32 0
@AF_INET = global i32 0
@.str = [8 x i8] c"%s/%lu\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca %struct.in6_addr
%10 = alloca %struct.in_addr
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8
%17 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%18 = load i32, i32* @INET6_ADDRSTRLEN
%19 = add nsw i32 %18, 4
%20 = zext i32 %19 to i64
%21 = call i8* @llvm.stacksave()
store i8* %21, i8** %6
%22 = alloca i8, i64 %20
store i64 %20, i64* %7
%23 = load i32, i32* @INET_ADDRSTRLEN
%24 = add nsw i32 %23, 3
%25 = zext i32 %24 to i64
%26 = alloca i8, i64 %25
store i64 %25, i64* %8
%27 = load i32, i32* %4
%28 = icmp ne i32 %27, 3
br i1 %28, label %29, label %31
29: ; preds = %2
%30 = call i32 (...) @print_usage()
br label %31
31: ; preds = %29, %2
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 1
%34 = load i8*, i8** %33
%35 = load i32, i32* @INET6_ADDRSTRLEN
%36 = add nsw i32 %35, 4
%37 = call i32 @strncpy(i8* %22, i8* %34, i32 %36)
%38 = load i32, i32* @INET6_ADDRSTRLEN
%39 = add nsw i32 %38, 4
%40 = sub nsw i32 %39, 1
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i8, i8* %22, i64 %41
store i8 0, i8* %42
%43 = load i32, i32* @AF_INET6
%44 = bitcast %struct.in6_addr* %9 to %struct.in_addr*
%45 = call i32 @parse_str(i32 %43, i8* %22, %struct.in_addr* %44, i64* %11)
%46 = load i8**, i8*** %5
%47 = getelementptr inbounds i8*, i8** %46, i64 2
%48 = load i8*, i8** %47
%49 = load i32, i32* @INET_ADDRSTRLEN
%50 = add nsw i32 %49, 3
%51 = call i32 @strncpy(i8* %26, i8* %48, i32 %50)
%52 = load i32, i32* @INET_ADDRSTRLEN
%53 = add nsw i32 %52, 3
%54 = sub nsw i32 %53, 1
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8, i8* %22, i64 %55
store i8 0, i8* %56
%57 = load i32, i32* @AF_INET
%58 = call i32 @parse_str(i32 %57, i8* %26, %struct.in_addr* %10, i64* %12)
%59 = load i64, i64* %12
%60 = sub i64 32, %59
%61 = load i64, i64* %11
%62 = add i64 %60, %61
store i64 %62, i64* %13
%63 = load i64, i64* %13
%64 = icmp ugt i64 %63, 128
br i1 %64, label %65, label %67
65: ; preds = %31
%66 = call i32 (...) @print_usage()
br label %67
67: ; preds = %65, %31
br label %68
68: ; preds = %116, %67
%69 = load i64, i64* %12
%70 = icmp ult i64 %69, 32
br i1 %70, label %71, label %121
71: ; preds = %68
%72 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %9, i32 0, i32 0
%73 = bitcast i32* %72 to i8*
%74 = load i64, i64* %11
%75 = lshr i64 %74, 3
%76 = getelementptr inbounds i8, i8* %73, i64 %75
store i8* %76, i8** %15
%77 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %10, i32 0, i32 1
%78 = bitcast i32* %77 to i8*
%79 = load i64, i64* %12
%80 = lshr i64 %79, 3
%81 = getelementptr inbounds i8, i8* %78, i64 %80
store i8* %81, i8** %14
%82 = load i64, i64* %11
%83 = and i64 %82, 7
%84 = trunc i64 %83 to i32
%85 = ashr i32 128, %84
%86 = trunc i32 %85 to i8
store i8 %86, i8* %17
%87 = load i64, i64* %12
%88 = and i64 %87, 7
%89 = trunc i64 %88 to i32
%90 = ashr i32 128, %89
%91 = trunc i32 %90 to i8
store i8 %91, i8* %16
%92 = load i8*, i8** %14
%93 = load i8, i8* %92
%94 = zext i8 %93 to i32
%95 = load i8, i8* %16
%96 = zext i8 %95 to i32
%97 = and i32 %94, %96
%98 = icmp ne i32 %97, 0
br i1 %98, label %99, label %107
99: ; preds = %71
%100 = load i8, i8* %17
%101 = zext i8 %100 to i32
%102 = load i8*, i8** %15
%103 = load i8, i8* %102
%104 = zext i8 %103 to i32
%105 = or i32 %104, %101
%106 = trunc i32 %105 to i8
store i8 %106, i8* %102
br label %116
107: ; preds = %71
%108 = load i8, i8* %17
%109 = zext i8 %108 to i32
%110 = xor i32 %109, -1
%111 = load i8*, i8** %15
%112 = load i8, i8* %111
%113 = zext i8 %112 to i32
%114 = and i32 %113, %110
%115 = trunc i32 %114 to i8
store i8 %115, i8* %111
br label %116
116: ; preds = %107, %99
%117 = load i64, i64* %12
%118 = add i64 %117, 1
store i64 %118, i64* %12
%119 = load i64, i64* %11
%120 = add i64 %119, 1
store i64 %120, i64* %11
br label %68
121: ; preds = %68
br label %122
122: ; preds = %125, %121
%123 = load i64, i64* %11
%124 = icmp ult i64 %123, 128
br i1 %124, label %125, label %146
125: ; preds = %122
%126 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %9, i32 0, i32 0
%127 = bitcast i32* %126 to i8*
%128 = load i64, i64* %11
%129 = lshr i64 %128, 2
%130 = getelementptr inbounds i8, i8* %127, i64 %129
store i8* %130, i8** %15
%131 = load i64, i64* %11
%132 = and i64 %131, 7
%133 = trunc i64 %132 to i32
%134 = ashr i32 128, %133
%135 = trunc i32 %134 to i8
store i8 %135, i8* %17
%136 = load i8, i8* %17
%137 = zext i8 %136 to i32
%138 = xor i32 %137, -1
%139 = load i8*, i8** %15
%140 = load i8, i8* %139
%141 = zext i8 %140 to i32
%142 = and i32 %141, %138
%143 = trunc i32 %142 to i8
store i8 %143, i8* %139
%144 = load i64, i64* %11
%145 = add i64 %144, 1
store i64 %145, i64* %11
br label %122
146: ; preds = %122
%147 = load i32, i32* @AF_INET6
%148 = bitcast %struct.in6_addr* %9 to %struct.in_addr*
%149 = trunc i64 %20 to i32
%150 = call i32* @inet_ntop(i32 %147, %struct.in_addr* %148, i8* %22, i32 %149)
%151 = icmp eq i32* %150, null
br i1 %151, label %152, label %154
152: ; preds = %146
%153 = call i32 (...) @print_error()
br label %154
154: ; preds = %152, %146
%155 = load i64, i64* %13
%156 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %22, i64 %155)
store i32 0, i32* %3
%157 = load i8*, i8** %6
%158 = load i32, i32* %3
ret i32 %158
}

LLVM IR (-O2):
%struct.in6_addr = type { i32, i32 }
%struct.in_addr = type { i32, i32 }
@INET6_ADDRSTRLEN = global i32 0
@INET_ADDRSTRLEN = global i32 0
@AF_INET6 = global i32 0
@AF_INET = global i32 0
@.str = [8 x i8] c"%s/%lu\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.in6_addr
%4 = alloca %struct.in_addr
%5 = alloca i64
%6 = alloca i64
%7 = load i32, i32* @INET6_ADDRSTRLEN
%8 = add nsw i32 %7, 4
%9 = zext i32 %8 to i64
%10 = alloca i8, i64 %9
%11 = load i32, i32* @INET_ADDRSTRLEN
%12 = add nsw i32 %11, 3
%13 = zext i32 %12 to i64
%14 = alloca i8, i64 %13
%15 = bitcast %struct.in6_addr* %3 to i8*
%16 = bitcast %struct.in_addr* %4 to i8*
%17 = bitcast i64* %5 to i8*
%18 = bitcast i64* %6 to i8*
%19 = icmp eq i32 %0, 3
br i1 %19, label %24, label %20
20: ; preds = %2
%21 = tail call i32 (...) @print_usage()
%22 = load i32, i32* @INET6_ADDRSTRLEN
%23 = add nsw i32 %22, 4
br label %24
24: ; preds = %20, %2
%25 = phi i32 [ %23, %20 ], [ %8, %2 ]
%26 = getelementptr inbounds i8*, i8** %1, i64 1
%27 = load i8*, i8** %26
%28 = call i32 @strncpy(i8* %10, i8* %27, i32 %25)
%29 = load i32, i32* @INET6_ADDRSTRLEN
%30 = add nsw i32 %29, 3
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %10, i64 %31
store i8 0, i8* %32
%33 = load i32, i32* @AF_INET6
%34 = bitcast %struct.in6_addr* %3 to %struct.in_addr*
%35 = call i32 @parse_str(i32 %33, i8* %10, %struct.in_addr* %34, i64* %5)
%36 = getelementptr inbounds i8*, i8** %1, i64 2
%37 = load i8*, i8** %36
%38 = load i32, i32* @INET_ADDRSTRLEN
%39 = add nsw i32 %38, 3
%40 = call i32 @strncpy(i8* %14, i8* %37, i32 %39)
%41 = load i32, i32* @INET_ADDRSTRLEN
%42 = add nsw i32 %41, 2
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8, i8* %10, i64 %43
store i8 0, i8* %44
%45 = load i32, i32* @AF_INET
%46 = call i32 @parse_str(i32 %45, i8* %14, %struct.in_addr* %4, i64* %6)
%47 = load i64, i64* %6
%48 = sub i64 32, %47
%49 = load i64, i64* %5
%50 = add i64 %48, %49
%51 = icmp ugt i64 %50, 128
br i1 %51, label %52, label %55
52: ; preds = %24
%53 = call i32 (...) @print_usage()
%54 = load i64, i64* %6
br label %55
55: ; preds = %52, %24
%56 = phi i64 [ %54, %52 ], [ %47, %24 ]
%57 = icmp ult i64 %56, 32
%58 = load i64, i64* %5
br i1 %57, label %59, label %91
59: ; preds = %55
%60 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %4, i64 0, i32 1
%61 = bitcast i32* %60 to i8*
br label %62
62: ; preds = %59, %85
%63 = phi i64 [ %56, %59 ], [ %87, %85 ]
%64 = phi i64 [ %58, %59 ], [ %88, %85 ]
%65 = lshr i64 %64, 3
%66 = getelementptr inbounds i8, i8* %15, i64 %65
%67 = lshr i64 %63, 3
%68 = getelementptr inbounds i8, i8* %61, i64 %67
%69 = trunc i64 %64 to i8
%70 = and i8 %69, 7
%71 = lshr i8 -128, %70
%72 = trunc i64 %63 to i8
%73 = and i8 %72, 7
%74 = lshr i8 -128, %73
%75 = load i8, i8* %68
%76 = and i8 %75, %74
%77 = icmp eq i8 %76, 0
br i1 %77, label %81, label %78
78: ; preds = %62
%79 = load i8, i8* %66
%80 = or i8 %79, %71
br label %85
81: ; preds = %62
%82 = xor i8 %71, -1
%83 = load i8, i8* %66
%84 = and i8 %83, %82
br label %85
85: ; preds = %81, %78
%86 = phi i8 [ %84, %81 ], [ %80, %78 ]
store i8 %86, i8* %66
%87 = add i64 %63, 1
%88 = add i64 %64, 1
%89 = icmp eq i64 %87, 32
br i1 %89, label %90, label %62
90: ; preds = %85
store i64 32, i64* %6
store i64 %88, i64* %5
br label %91
91: ; preds = %55, %90
%92 = phi i64 [ %88, %90 ], [ %58, %55 ]
%93 = icmp ult i64 %92, 128
br i1 %93, label %94, label %132
94: ; preds = %91
%95 = and i64 %92, 1
%96 = icmp eq i64 %95, 0
br i1 %96, label %107, label %97
97: ; preds = %94
%98 = lshr i64 %92, 2
%99 = getelementptr inbounds i8, i8* %15, i64 %98
%100 = trunc i64 %92 to i8
%101 = and i8 %100, 7
%102 = lshr i8 -128, %101
%103 = xor i8 %102, -1
%104 = load i8, i8* %99
%105 = and i8 %104, %103
store i8 %105, i8* %99
%106 = add i64 %92, 1
br label %107
107: ; preds = %97, %94
%108 = phi i64 [ %92, %94 ], [ %106, %97 ]
%109 = icmp eq i64 %92, 127
br i1 %109, label %131, label %110
110: ; preds = %107, %110
%111 = phi i64 [ %129, %110 ], [ %108, %107 ]
%112 = lshr i64 %111, 2
%113 = getelementptr inbounds i8, i8* %15, i64 %112
%114 = trunc i64 %111 to i8
%115 = and i8 %114, 7
%116 = lshr i8 -128, %115
%117 = xor i8 %116, -1
%118 = load i8, i8* %113
%119 = and i8 %118, %117
store i8 %119, i8* %113
%120 = add i64 %111, 1
%121 = lshr i64 %120, 2
%122 = getelementptr inbounds i8, i8* %15, i64 %121
%123 = trunc i64 %120 to i8
%124 = and i8 %123, 7
%125 = lshr i8 -128, %124
%126 = xor i8 %125, -1
%127 = load i8, i8* %122
%128 = and i8 %127, %126
store i8 %128, i8* %122
%129 = add i64 %111, 2
%130 = icmp eq i64 %129, 128
br i1 %130, label %131, label %110
131: ; preds = %110, %107
store i64 128, i64* %5
br label %132
132: ; preds = %131, %91
%133 = load i32, i32* @AF_INET6
%134 = call i32* @inet_ntop(i32 %133, %struct.in_addr* %34, i8* %10, i32 %8)
%135 = icmp eq i32* %134, null
br i1 %135, label %136, label %138
136: ; preds = %132
%137 = call i32 (...) @print_error()
br label %138
138: ; preds = %136, %132
%139 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %10, i64 %50)
ret i32 0
}