#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 in_addr {
  int s_addr;
  int *s6_addr16;
  int *s6_addr32;
  char s6_addr;
};
struct in6_addr {
  int s_addr;
  int *s6_addr16;
  int *s6_addr32;
  char s6_addr;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ AF_INET6;
scalar_t__ ENOSPC;
scalar_t__ errno;
char *inet_ntop(int /*<<< orphan*/, struct in_addr *, char *, int);
scalar_t__ memcmp(char *, char *, int);
int /*<<< orphan*/ memset(char *, int, int);
int /*<<< orphan*/ puts(char *);
int main(void) {
  struct in_addr addr4;
  struct in6_addr addr6;
  char buf[64];
  int result = 0;
  addr4.s_addr = 0xe0e0e0e0;
  addr6.s6_addr16[0] = 0;
  addr6.s6_addr16[1] = 0;
  addr6.s6_addr16[2] = 0;
  addr6.s6_addr16[3] = 0;
  addr6.s6_addr16[4] = 0;
  addr6.s6_addr16[5] = 0xffff;
  addr6.s6_addr32[3] = 0xe0e0e0e0;
  memset(buf, 'x', sizeof buf);
  if (inet_ntop(AF_INET, &addr4, buf, 15) != NULL) {
    puts("1st inet_ntop returned non-NULL");
    result++;
  } else if (errno != ENOSPC) {
    puts("1st inet_ntop didn't fail with ENOSPC");
    result++;
  }
  if (buf[15] != 'x') {
    puts("1st inet_ntop wrote past the end of buffer");
    result++;
  }
  if (inet_ntop(AF_INET, &addr4, buf, 16) != buf) {
    puts("2nd inet_ntop did not return buf");
    result++;
  }
  if (memcmp(buf,
             "224.224.224.224\0"
             "xxxxxxxx",
             24) != 0) {
    puts("2nd inet_ntop wrote past the end of buffer");
    result++;
  }
  if (inet_ntop(AF_INET6, &addr6, buf, 22) != NULL) {
    puts("3rd inet_ntop returned non-NULL");
    result++;
  } else if (errno != ENOSPC) {
    puts("3rd inet_ntop didn't fail with ENOSPC");
    result++;
  }
  if (buf[22] != 'x') {
    puts("3rd inet_ntop wrote past the end of buffer");
    result++;
  }
  if (inet_ntop(AF_INET6, &addr6, buf, 23) != buf) {
    puts("4th inet_ntop did not return buf");
    result++;
  }
  if (memcmp(buf,
             "::ffff:224.224.224.224\0"
             "xxxxxxxx",
             31) != 0) {
    puts("4th inet_ntop wrote past the end of buffer");
    result++;
  }
  memset(&addr6.s6_addr, 0xe0, sizeof(addr6.s6_addr));
  if (inet_ntop(AF_INET6, &addr6, buf, 39) != NULL) {
    puts("5th inet_ntop returned non-NULL");
    result++;
  } else if (errno != ENOSPC) {
    puts("5th inet_ntop didn't fail with ENOSPC");
    result++;
  }
  if (buf[39] != 'x') {
    puts("5th inet_ntop wrote past the end of buffer");
    result++;
  }
  if (inet_ntop(AF_INET6, &addr6, buf, 40) != buf) {
    puts("6th inet_ntop did not return buf");
    result++;
  }
  if (memcmp(buf,
             "e0e0:e0e0:e0e0:e0e0:e0e0:e0e0:e0e0:e0e0\0"
             "xxxxxxxx",
             48) != 0) {
    puts("6th inet_ntop wrote past the end of buffer");
    result++;
  }
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x94(%rbp)
movl   $0xe0e0e0e0,-0x28(%rbp)
mov    -0x40(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x40(%rbp),%rax
movl   $0x0,0x4(%rax)
mov    -0x40(%rbp),%rax
movl   $0x0,0x8(%rax)
mov    -0x40(%rbp),%rax
movl   $0x0,0xc(%rax)
mov    -0x40(%rbp),%rax
movl   $0x0,0x10(%rax)
mov    -0x40(%rbp),%rax
movl   $0xffff,0x14(%rax)
mov    -0x38(%rbp),%rax
movl   $0xe0e0e0e0,0xc(%rax)
lea    -0x90(%rbp),%rdi
mov    $0x78,%esi
mov    $0x40,%edx
call   1050 <memset@plt>
mov    0x2e1c(%rip),%rax
mov    (%rax),%edi
lea    -0x90(%rbp),%rdx
lea    -0x28(%rbp),%rsi
mov    $0xf,%ecx
call   1030 <inet_ntop@plt>
cmp    $0x0,%rax
je     120d <main+0xcd>
lea    0xe0c(%rip),%rdi
call   1040 <puts@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1247 <main+0x107>
mov    0x2dbc(%rip),%rax
mov    (%rax),%rax
mov    0x2daa(%rip),%rcx
cmp    (%rcx),%rax
je     1242 <main+0x102>
lea    0xdf2(%rip),%rdi
call   1040 <puts@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1247 <main+0x107>
movsbl -0x81(%rbp),%eax
cmp    $0x78,%eax
je     1272 <main+0x132>
lea    0xde8(%rip),%rdi
call   1040 <puts@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
mov    0x2d6f(%rip),%rax
mov    (%rax),%edi
lea    -0x90(%rbp),%rdx
lea    -0x28(%rbp),%rsi
mov    $0x10,%ecx
call   1030 <inet_ntop@plt>
lea    -0x90(%rbp),%rcx
cmp    %rcx,%rax
je     12bb <main+0x17b>
lea    0xdca(%rip),%rdi
call   1040 <puts@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
lea    -0x90(%rbp),%rdi
lea    0xf6e(%rip),%rsi
mov    $0x18,%edx
call   1060 <memcmp@plt>
cmp    $0x0,%rax
je     12f8 <main+0x1b8>
lea    0xdae(%rip),%rdi
call   1040 <puts@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
mov    0x2ce1(%rip),%rax
mov    (%rax),%edi
lea    -0x48(%rbp),%rsi
lea    -0x90(%rbp),%rdx
mov    $0x16,%ecx
call   1030 <inet_ntop@plt>
cmp    $0x0,%rax
je     1340 <main+0x200>
lea    0xd96(%rip),%rdi
call   1040 <puts@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    137a <main+0x23a>
mov    0x2c89(%rip),%rax
mov    (%rax),%rax
mov    0x2c77(%rip),%rcx
cmp    (%rcx),%rax
je     1375 <main+0x235>
lea    0xd7c(%rip),%rdi
call   1040 <puts@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    137a <main+0x23a>
movsbl -0x7a(%rbp),%eax
cmp    $0x78,%eax
je     13a2 <main+0x262>
lea    0xd75(%rip),%rdi
call   1040 <puts@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
mov    0x2c37(%rip),%rax
mov    (%rax),%edi
lea    -0x48(%rbp),%rsi
lea    -0x90(%rbp),%rdx
mov    $0x17,%ecx
call   1030 <inet_ntop@plt>
lea    -0x90(%rbp),%rcx
cmp    %rcx,%rax
je     13eb <main+0x2ab>
lea    0xd57(%rip),%rdi
call   1040 <puts@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
lea    -0x90(%rbp),%rdi
lea    0xe88(%rip),%rsi
mov    $0x1f,%edx
call   1060 <memcmp@plt>
cmp    $0x0,%rax
je     1428 <main+0x2e8>
lea    0xd3b(%rip),%rdi
call   1040 <puts@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
lea    -0x48(%rbp),%rdi
add    $0x18,%rdi
mov    $0xe0,%esi
mov    $0x1,%edx
call   1050 <memset@plt>
mov    0x2b9a(%rip),%rax
mov    (%rax),%edi
lea    -0x48(%rbp),%rsi
lea    -0x90(%rbp),%rdx
mov    $0x27,%ecx
call   1030 <inet_ntop@plt>
cmp    $0x0,%rax
je     1487 <main+0x347>
lea    0xd0c(%rip),%rdi
call   1040 <puts@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    14c1 <main+0x381>
mov    0x2b42(%rip),%rax
mov    (%rax),%rax
mov    0x2b30(%rip),%rcx
cmp    (%rcx),%rax
je     14bc <main+0x37c>
lea    0xcf2(%rip),%rdi
call   1040 <puts@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    14c1 <main+0x381>
movsbl -0x69(%rbp),%eax
cmp    $0x78,%eax
je     14e9 <main+0x3a9>
lea    0xceb(%rip),%rdi
call   1040 <puts@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
mov    0x2af0(%rip),%rax
mov    (%rax),%edi
lea    -0x48(%rbp),%rsi
lea    -0x90(%rbp),%rdx
mov    $0x28,%ecx
call   1030 <inet_ntop@plt>
lea    -0x90(%rbp),%rcx
cmp    %rcx,%rax
je     1532 <main+0x3f2>
lea    0xccd(%rip),%rdi
call   1040 <puts@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
lea    -0x90(%rbp),%rdi
lea    0xd10(%rip),%rsi
mov    $0x30,%edx
call   1060 <memcmp@plt>
cmp    $0x0,%rax
je     156f <main+0x42f>
lea    0xcb1(%rip),%rdi
call   1040 <puts@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
mov    -0x94(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
%struct.in_addr = type { i32, i32*, i32*, i8 }
%struct.in6_addr = type { i32, i32*, i32*, i8 }
@AF_INET = global i32 0
@.str = [32 x i8] c"1st inet_ntop returned non-NULL\00"
@errno = global i64 0
@ENOSPC = global i64 0
@.str.1 = [38 x i8] c"1st inet_ntop didn't fail with ENOSPC\00"
@.str.2 = [43 x i8] c"1st inet_ntop wrote past the end of buffer\00"
@.str.3 = [33 x i8] c"2nd inet_ntop did not return buf\00"
@.str.4 = [25 x i8] c"224.224.224.224\00xxxxxxxx\00"
@.str.5 = [43 x i8] c"2nd inet_ntop wrote past the end of buffer\00"
@AF_INET6 = global i32 0
@.str.6 = [32 x i8] c"3rd inet_ntop returned non-NULL\00"
@.str.7 = [38 x i8] c"3rd inet_ntop didn't fail with ENOSPC\00"
@.str.8 = [43 x i8] c"3rd inet_ntop wrote past the end of buffer\00"
@.str.9 = [33 x i8] c"4th inet_ntop did not return buf\00"
@.str.10 = [32 x i8] c"::ffff:224.224.224.224\00xxxxxxxx\00"
@.str.11 = [43 x i8] c"4th inet_ntop wrote past the end of buffer\00"
@.str.12 = [32 x i8] c"5th inet_ntop returned non-NULL\00"
@.str.13 = [38 x i8] c"5th inet_ntop didn't fail with ENOSPC\00"
@.str.14 = [43 x i8] c"5th inet_ntop wrote past the end of buffer\00"
@.str.15 = [33 x i8] c"6th inet_ntop did not return buf\00"
@.str.16 = [49 x i8] c"e0e0:e0e0:e0e0:e0e0:e0e0:e0e0:e0e0:e0e0\00xxxxxxxx\00"
@.str.17 = [43 x i8] c"6th inet_ntop wrote past the end of buffer\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.in_addr
%3 = alloca %struct.in6_addr
%4 = alloca [64 x i8]
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %5
%6 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %2, i32 0, i32 0
store i32 -522133280, i32* %6
%7 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %3, i32 0, i32 1
%8 = load i32*, i32** %7
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 0, i32* %9
%10 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %3, i32 0, i32 1
%11 = load i32*, i32** %10
%12 = getelementptr inbounds i32, i32* %11, i64 1
store i32 0, i32* %12
%13 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %3, i32 0, i32 1
%14 = load i32*, i32** %13
%15 = getelementptr inbounds i32, i32* %14, i64 2
store i32 0, i32* %15
%16 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %3, i32 0, i32 1
%17 = load i32*, i32** %16
%18 = getelementptr inbounds i32, i32* %17, i64 3
store i32 0, i32* %18
%19 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %3, i32 0, i32 1
%20 = load i32*, i32** %19
%21 = getelementptr inbounds i32, i32* %20, i64 4
store i32 0, i32* %21
%22 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %3, i32 0, i32 1
%23 = load i32*, i32** %22
%24 = getelementptr inbounds i32, i32* %23, i64 5
store i32 65535, i32* %24
%25 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %3, i32 0, i32 2
%26 = load i32*, i32** %25
%27 = getelementptr inbounds i32, i32* %26, i64 3
store i32 -522133280, i32* %27
%28 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%29 = call i32 @memset(i8* %28, i32 120, i32 64)
%30 = load i32, i32* @AF_INET
%31 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%32 = call i8* @inet_ntop(i32 %30, %struct.in_addr* %2, i8* %31, i32 15)
%33 = icmp ne i8* %32, null
br i1 %33, label %34, label %38
34: ; preds = %0
%35 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%36 = load i32, i32* %5
%37 = add nsw i32 %36, 1
store i32 %37, i32* %5
br label %47
38: ; preds = %0
%39 = load i64, i64* @errno
%40 = load i64, i64* @ENOSPC
%41 = icmp ne i64 %39, %40
br i1 %41, label %42, label %46
42: ; preds = %38
%43 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%44 = load i32, i32* %5
%45 = add nsw i32 %44, 1
store i32 %45, i32* %5
br label %46
46: ; preds = %42, %38
br label %47
47: ; preds = %46, %34
%48 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 15
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = icmp ne i32 %50, 120
br i1 %51, label %52, label %56
52: ; preds = %47
%53 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
%54 = load i32, i32* %5
%55 = add nsw i32 %54, 1
store i32 %55, i32* %5
br label %56
56: ; preds = %52, %47
%57 = load i32, i32* @AF_INET
%58 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%59 = call i8* @inet_ntop(i32 %57, %struct.in_addr* %2, i8* %58, i32 16)
%60 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%61 = icmp ne i8* %59, %60
br i1 %61, label %62, label %66
62: ; preds = %56
%63 = call i32 @puts(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%64 = load i32, i32* %5
%65 = add nsw i32 %64, 1
store i32 %65, i32* %5
br label %66
66: ; preds = %62, %56
%67 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%68 = call i64 @memcmp(i8* %67, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 24)
%69 = icmp ne i64 %68, 0
br i1 %69, label %70, label %74
70: ; preds = %66
%71 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%72 = load i32, i32* %5
%73 = add nsw i32 %72, 1
store i32 %73, i32* %5
br label %74
74: ; preds = %70, %66
%75 = load i32, i32* @AF_INET6
%76 = bitcast %struct.in6_addr* %3 to %struct.in_addr*
%77 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%78 = call i8* @inet_ntop(i32 %75, %struct.in_addr* %76, i8* %77, i32 22)
%79 = icmp ne i8* %78, null
br i1 %79, label %80, label %84
80: ; preds = %74
%81 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
%82 = load i32, i32* %5
%83 = add nsw i32 %82, 1
store i32 %83, i32* %5
br label %93
84: ; preds = %74
%85 = load i64, i64* @errno
%86 = load i64, i64* @ENOSPC
%87 = icmp ne i64 %85, %86
br i1 %87, label %88, label %92
88: ; preds = %84
%89 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0))
%90 = load i32, i32* %5
%91 = add nsw i32 %90, 1
store i32 %91, i32* %5
br label %92
92: ; preds = %88, %84
br label %93
93: ; preds = %92, %80
%94 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 22
%95 = load i8, i8* %94
%96 = sext i8 %95 to i32
%97 = icmp ne i32 %96, 120
br i1 %97, label %98, label %102
98: ; preds = %93
%99 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0))
%100 = load i32, i32* %5
%101 = add nsw i32 %100, 1
store i32 %101, i32* %5
br label %102
102: ; preds = %98, %93
%103 = load i32, i32* @AF_INET6
%104 = bitcast %struct.in6_addr* %3 to %struct.in_addr*
%105 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%106 = call i8* @inet_ntop(i32 %103, %struct.in_addr* %104, i8* %105, i32 23)
%107 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%108 = icmp ne i8* %106, %107
br i1 %108, label %109, label %113
109: ; preds = %102
%110 = call i32 @puts(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
%111 = load i32, i32* %5
%112 = add nsw i32 %111, 1
store i32 %112, i32* %5
br label %113
113: ; preds = %109, %102
%114 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%115 = call i64 @memcmp(i8* %114, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i32 31)
%116 = icmp ne i64 %115, 0
br i1 %116, label %117, label %121
117: ; preds = %113
%118 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.11, i64 0, i64 0))
%119 = load i32, i32* %5
%120 = add nsw i32 %119, 1
store i32 %120, i32* %5
br label %121
121: ; preds = %117, %113
%122 = getelementptr inbounds %struct.in6_addr, %struct.in6_addr* %3, i32 0, i32 3
%123 = call i32 @memset(i8* %122, i32 224, i32 1)
%124 = load i32, i32* @AF_INET6
%125 = bitcast %struct.in6_addr* %3 to %struct.in_addr*
%126 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%127 = call i8* @inet_ntop(i32 %124, %struct.in_addr* %125, i8* %126, i32 39)
%128 = icmp ne i8* %127, null
br i1 %128, label %129, label %133
129: ; preds = %121
%130 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0))
%131 = load i32, i32* %5
%132 = add nsw i32 %131, 1
store i32 %132, i32* %5
br label %142
133: ; preds = %121
%134 = load i64, i64* @errno
%135 = load i64, i64* @ENOSPC
%136 = icmp ne i64 %134, %135
br i1 %136, label %137, label %141
137: ; preds = %133
%138 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.13, i64 0, i64 0))
%139 = load i32, i32* %5
%140 = add nsw i32 %139, 1
store i32 %140, i32* %5
br label %141
141: ; preds = %137, %133
br label %142
142: ; preds = %141, %129
%143 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 39
%144 = load i8, i8* %143
%145 = sext i8 %144 to i32
%146 = icmp ne i32 %145, 120
br i1 %146, label %147, label %151
147: ; preds = %142
%148 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.14, i64 0, i64 0))
%149 = load i32, i32* %5
%150 = add nsw i32 %149, 1
store i32 %150, i32* %5
br label %151
151: ; preds = %147, %142
%152 = load i32, i32* @AF_INET6
%153 = bitcast %struct.in6_addr* %3 to %struct.in_addr*
%154 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%155 = call i8* @inet_ntop(i32 %152, %struct.in_addr* %153, i8* %154, i32 40)
%156 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%157 = icmp ne i8* %155, %156
br i1 %157, label %158, label %162
158: ; preds = %151
%159 = call i32 @puts(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.15, i64 0, i64 0))
%160 = load i32, i32* %5
%161 = add nsw i32 %160, 1
store i32 %161, i32* %5
br label %162
162: ; preds = %158, %151
%163 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%164 = call i64 @memcmp(i8* %163, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.16, i64 0, i64 0), i32 48)
%165 = icmp ne i64 %164, 0
br i1 %165, label %166, label %170
166: ; preds = %162
%167 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.17, i64 0, i64 0))
%168 = load i32, i32* %5
%169 = add nsw i32 %168, 1
store i32 %169, i32* %5
br label %170
170: ; preds = %166, %162
%171 = load i32, i32* %5
ret i32 %171
}

LLVM IR (-O2):