#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 uint8_t;
typedef int uint32_t;

/* Variables and functions */
scalar_t__ atoi(char *);
int /*<<< orphan*/ printf(char *, ...);
char *strtok(char *, char *);
int main(int argc, char *argv[]) {
  if (argc != 2) {
    printf("eg. 0.0.0.0-0.255.255.255\n");
    return -1;
  }
  printf("\n");
  printf("// %s\n", argv[1]);
  char *pstart = strtok(argv[1], "-");
  char *pend = strtok(NULL, "-");
  uint8_t b0 = (uint8_t)atoi(strtok(pstart, "."));
  uint8_t b1 = (uint8_t)atoi(strtok(NULL, "."));
  uint8_t b2 = (uint8_t)atoi(strtok(NULL, "."));
  uint8_t b3 = (uint8_t)atoi(strtok(NULL, "."));
  uint32_t start = b0 << 24 | b1 << 16 | b2 << 8 | b3;
  b0 = (uint8_t)atoi(strtok(pend, "."));
  b1 = (uint8_t)atoi(strtok(NULL, "."));
  b2 = (uint8_t)atoi(strtok(NULL, "."));
  b3 = (uint8_t)atoi(strtok(NULL, "."));
  uint32_t end = b0 << 24 | b1 << 16 | b2 << 8 | b3;
  if (start == 0xffffffff) {
    printf("{{%u, %u, %u, %u}, %s},"
           "\n",
           (uint8_t)(start >> 24), (uint8_t)(start >> 16),
           (uint8_t)(start >> 8), (uint8_t)(start), "false");
    return 0;
  }
  if (start && start - 1 && start - 2) {
    printf("{{%u, %u, %u, %u}, %s},"
           " // start-2\n",
           (uint8_t)(start - 2 >> 24), (uint8_t)(start - 2 >> 16),
           (uint8_t)(start - 2 >> 8), (uint8_t)(start - 2), "true");
    printf("{{%u, %u, %u, %u}, %s},"
           " // start-1\n",
           (uint8_t)(start - 1 >> 24), (uint8_t)(start - 1 >> 16),
           (uint8_t)(start - 1 >> 8), (uint8_t)(start - 1), "true");
  }
  printf("{{%u, %u, %u, %u}, %s},"
         " // start\n",
         (uint8_t)(start >> 24), (uint8_t)(start >> 16), (uint8_t)(start >> 8),
         (uint8_t)(start), "false");
  printf("{{%u, %u, %u, %u}, %s},"
         " // start+1\n",
         (uint8_t)(start + 1 >> 24), (uint8_t)(start + 1 >> 16),
         (uint8_t)(start + 1 >> 8), (uint8_t)(start + 1), "false");
  printf("{{%u, %u, %u, %u}, %s},"
         " // end-1\n",
         (uint8_t)(end - 1 >> 24), (uint8_t)(end - 1 >> 16),
         (uint8_t)(end - 1 >> 8), (uint8_t)(end - 1), "false");
  printf("{{%u, %u, %u, %u}, %s},"
         " // end\n",
         (uint8_t)(end >> 24), (uint8_t)(end >> 16), (uint8_t)(end >> 8),
         (uint8_t)(end), "false");
  if (end != 0xffffffff && end + 1 != 0xffffffff && end + 2 != 0xffffffff) {
    printf("{{%u, %u, %u, %u}, %s},"
           " // end+1\n",
           (uint8_t)(end + 1 >> 24), (uint8_t)(end + 1 >> 16),
           (uint8_t)(end + 1 >> 8), (uint8_t)(end + 1), "true");
    printf("{{%u, %u, %u, %u}, %s},"
           " // end+2\n",
           (uint8_t)(end + 2 >> 24), (uint8_t)(end + 2 >> 16),
           (uint8_t)(end + 2 >> 8), (uint8_t)(end + 2), "true");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     116a <main+0x3a>
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1508 <main+0x3d8>
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe85(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe71(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe5f(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %eax,-0x24(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe44(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %eax,-0x28(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe29(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %eax,-0x2c(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe0e(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %eax,-0x30(%rbp)
mov    -0x24(%rbp),%eax
shl    $0x18,%eax
mov    -0x28(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x2c(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
or     -0x30(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xdd7(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %eax,-0x24(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xdbc(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %eax,-0x28(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xda1(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %eax,-0x2c(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xd86(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %eax,-0x30(%rbp)
mov    -0x24(%rbp),%eax
shl    $0x18,%eax
mov    -0x28(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x2c(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
or     -0x30(%rbp),%eax
mov    %eax,-0x38(%rbp)
cmpl   $0xffffffff,-0x34(%rbp)
jne    130b <main+0x1db>
mov    -0x34(%rbp),%esi
sar    $0x18,%esi
mov    -0x34(%rbp),%edx
sar    $0x10,%edx
mov    -0x34(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x34(%rbp),%r8d
lea    0xd35(%rip),%rdi
lea    0xd47(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1508 <main+0x3d8>
cmpl   $0x0,-0x34(%rbp)
je     13a3 <main+0x273>
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
cmp    $0x0,%eax
je     13a3 <main+0x273>
mov    -0x34(%rbp),%eax
sub    $0x2,%eax
cmp    $0x0,%eax
je     13a3 <main+0x273>
mov    -0x34(%rbp),%esi
sub    $0x2,%esi
sar    $0x18,%esi
mov    -0x34(%rbp),%edx
sub    $0x2,%edx
sar    $0x10,%edx
mov    -0x34(%rbp),%ecx
sub    $0x2,%ecx
sar    $0x8,%ecx
mov    -0x34(%rbp),%r8d
sub    $0x2,%r8d
lea    0xce8(%rip),%rdi
lea    0xd05(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%esi
sub    $0x1,%esi
sar    $0x18,%esi
mov    -0x34(%rbp),%edx
sub    $0x1,%edx
sar    $0x10,%edx
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
sar    $0x8,%ecx
mov    -0x34(%rbp),%r8d
sub    $0x1,%r8d
lea    0xcd9(%rip),%rdi
lea    0xccd(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%esi
sar    $0x18,%esi
mov    -0x34(%rbp),%edx
sar    $0x10,%edx
mov    -0x34(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x34(%rbp),%r8d
lea    0xcd2(%rip),%rdi
lea    0xc78(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%esi
add    $0x1,%esi
sar    $0x18,%esi
mov    -0x34(%rbp),%edx
add    $0x1,%edx
sar    $0x10,%edx
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
sar    $0x8,%ecx
mov    -0x34(%rbp),%r8d
add    $0x1,%r8d
lea    0xcbc(%rip),%rdi
lea    0xc40(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%esi
sub    $0x1,%esi
sar    $0x18,%esi
mov    -0x38(%rbp),%edx
sub    $0x1,%edx
sar    $0x10,%edx
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
sar    $0x8,%ecx
mov    -0x38(%rbp),%r8d
sub    $0x1,%r8d
lea    0xca8(%rip),%rdi
lea    0xc08(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%esi
sar    $0x18,%esi
mov    -0x38(%rbp),%edx
sar    $0x10,%edx
mov    -0x38(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x38(%rbp),%r8d
lea    0xc9f(%rip),%rdi
lea    0xbdd(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0xffffffff,-0x38(%rbp)
je     1501 <main+0x3d1>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
cmp    $0xffffffff,%eax
je     1501 <main+0x3d1>
mov    -0x38(%rbp),%eax
add    $0x2,%eax
cmp    $0xffffffff,%eax
je     1501 <main+0x3d1>
mov    -0x38(%rbp),%esi
add    $0x1,%esi
sar    $0x18,%esi
mov    -0x38(%rbp),%edx
add    $0x1,%edx
sar    $0x10,%edx
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
sar    $0x8,%ecx
mov    -0x38(%rbp),%r8d
add    $0x1,%r8d
lea    0xc5f(%rip),%rdi
lea    0xba7(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%esi
add    $0x2,%esi
sar    $0x18,%esi
mov    -0x38(%rbp),%edx
add    $0x2,%edx
sar    $0x10,%edx
mov    -0x38(%rbp),%ecx
add    $0x2,%ecx
sar    $0x8,%ecx
mov    -0x38(%rbp),%r8d
add    $0x2,%r8d
lea    0xc49(%rip),%rdi
lea    0xb6f(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jne    129e <main+0x14e>
mov    %rsi,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rbx),%rsi
lea    0xe84(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%rbx),%rdi
lea    0xe79(%rip),%rbx
mov    %rbx,%rsi
call   1060 <strtok@plt>
mov    %rax,%rbp
xor    %edi,%edi
mov    %rbx,%rsi
call   1060 <strtok@plt>
mov    %rax,%r15
lea    0xe5c(%rip),%r13
mov    %rbp,%rdi
mov    %r13,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
call   1070 <atoi@plt>
mov    %rax,%r12
xor    %edi,%edi
mov    %r13,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
call   1070 <atoi@plt>
mov    %rax,%rbp
xor    %edi,%edi
mov    %r13,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
call   1070 <atoi@plt>
mov    %rax,%rbx
xor    %edi,%edi
mov    %r13,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
call   1070 <atoi@plt>
mov    %rax,%r14
shl    $0x18,%r12d
shl    $0x10,%ebp
shl    $0x8,%ebx
or     %ebp,%ebx
or     %r12d,%ebx
mov    %r15,%rdi
mov    %r13,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
call   1070 <atoi@plt>
mov    %rax,%r12
xor    %edi,%edi
mov    %r13,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
call   1070 <atoi@plt>
mov    %rax,%rbp
xor    %edi,%edi
mov    %r13,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
call   1070 <atoi@plt>
mov    %rax,%r15
xor    %edi,%edi
mov    %r13,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
call   1070 <atoi@plt>
mov    %rax,%r13
or     %r14d,%ebx
je     1317 <main+0x1c7>
cmp    $0xffffffff,%ebx
jne    12b4 <main+0x164>
lea    0xd90(%rip),%rdi
lea    0xda2(%rip),%r9
xor    %ebp,%ebp
mov    $0xffffffff,%esi
mov    $0xffffffff,%edx
mov    $0xffffffff,%ecx
mov    $0xffffffff,%r8d
jmp    1432 <main+0x2e2>
lea    0xe9e(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%ebp
jmp    143d <main+0x2ed>
mov    %ebx,%r14d
add    $0xffffffff,%r14d
je     1317 <main+0x1c7>
mov    %ebx,%r8d
add    $0xfffffffe,%r8d
je     1317 <main+0x1c7>
mov    %r8d,%esi
sar    $0x18,%esi
mov    %r8d,%edx
sar    $0x10,%edx
mov    %r8d,%ecx
sar    $0x8,%ecx
lea    0xd4b(%rip),%rdi
lea    0xd68(%rip),%r9
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14d,%esi
sar    $0x18,%esi
mov    %r14d,%edx
sar    $0x10,%edx
mov    %r14d,%ecx
sar    $0x8,%ecx
lea    0xd4d(%rip),%rdi
mov    %r14d,%r8d
lea    0xd3e(%rip),%r9
xor    %eax,%eax
call   1050 <printf@plt>
shl    $0x18,%r12d
shl    $0x10,%ebp
shl    $0x8,%r15d
or     %ebp,%r15d
or     %r12d,%r15d
or     %r13d,%r15d
mov    %ebx,%esi
sar    $0x18,%esi
mov    %ebx,%edx
sar    $0x10,%edx
mov    %ebx,%ecx
sar    $0x8,%ecx
lea    0xd36(%rip),%rdi
lea    0xcdc(%rip),%rbp
mov    %ebx,%r8d
mov    %rbp,%r9
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebx
mov    %ebx,%esi
sar    $0x18,%esi
mov    %ebx,%edx
sar    $0x10,%edx
mov    %ebx,%ecx
sar    $0x8,%ecx
lea    0xd2b(%rip),%rdi
mov    %ebx,%r8d
mov    %rbp,%r9
xor    %eax,%eax
call   1050 <printf@plt>
lea    -0x1(%r15),%r8d
mov    %r8d,%esi
sar    $0x18,%esi
mov    %r8d,%edx
sar    $0x10,%edx
mov    %r8d,%ecx
sar    $0x8,%ecx
lea    0xd25(%rip),%rdi
mov    %rbp,%r9
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15d,%esi
sar    $0x18,%esi
mov    %r15d,%edx
sar    $0x10,%edx
mov    %r15d,%ecx
sar    $0x8,%ecx
lea    0xd24(%rip),%rdi
mov    %r15d,%r8d
mov    %rbp,%r9
xor    %eax,%eax
call   1050 <printf@plt>
cmp    $0xffffffff,%r15d
je     143b <main+0x2eb>
lea    0x1(%r15),%r8d
cmp    $0xffffffff,%r8d
mov    $0x0,%ebp
je     143d <main+0x2ed>
add    $0x2,%r15d
cmp    $0xffffffff,%r15d
je     143d <main+0x2ed>
mov    %r8d,%esi
sar    $0x18,%esi
mov    %r8d,%edx
sar    $0x10,%edx
mov    %r8d,%ecx
sar    $0x8,%ecx
lea    0xcff(%rip),%rdi
lea    0xc47(%rip),%rbx
xor    %ebp,%ebp
mov    %rbx,%r9
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15d,%esi
sar    $0x18,%esi
mov    %r15d,%edx
sar    $0x10,%edx
mov    %r15d,%ecx
sar    $0x8,%ecx
lea    0xcf5(%rip),%rdi
mov    %r15d,%r8d
mov    %rbx,%r9
xor    %eax,%eax
call   1050 <printf@plt>
jmp    143d <main+0x2ed>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"eg. 0.0.0.0-0.255.255.255\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [7 x i8] c"// %s\0A\00"
@.str.3 = [2 x i8] c"-\00"
@.str.4 = [2 x i8] c".\00"
@.str.5 = [25 x i8] c"{{%u, %u, %u, %u}, %s},\0A\00"
@.str.6 = [6 x i8] c"false\00"
@.str.7 = [36 x i8] c"{{%u, %u, %u, %u}, %s}, // start-2\0A\00"
@.str.8 = [5 x i8] c"true\00"
@.str.9 = [36 x i8] c"{{%u, %u, %u, %u}, %s}, // start-1\0A\00"
@.str.10 = [34 x i8] c"{{%u, %u, %u, %u}, %s}, // start\0A\00"
@.str.11 = [36 x i8] c"{{%u, %u, %u, %u}, %s}, // start+1\0A\00"
@.str.12 = [34 x i8] c"{{%u, %u, %u, %u}, %s}, // end-1\0A\00"
@.str.13 = [32 x i8] c"{{%u, %u, %u, %u}, %s}, // end\0A\00"
@.str.14 = [34 x i8] c"{{%u, %u, %u, %u}, %s}, // end+1\0A\00"
@.str.15 = [34 x i8] c"{{%u, %u, %u, %u}, %s}, // end+2\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = icmp ne i32 %14, 2
br i1 %15, label %16, label %18
16: ; preds = %2
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %199
18: ; preds = %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %22)
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i8* @strtok(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i8* %27, i8** %6
%28 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i8* %28, i8** %7
%29 = load i8*, i8** %6
%30 = call i8* @strtok(i8* %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%31 = call i64 @atoi(i8* %30)
%32 = trunc i64 %31 to i32
store i32 %32, i32* %8
%33 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%34 = call i64 @atoi(i8* %33)
%35 = trunc i64 %34 to i32
store i32 %35, i32* %9
%36 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%37 = call i64 @atoi(i8* %36)
%38 = trunc i64 %37 to i32
store i32 %38, i32* %10
%39 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%40 = call i64 @atoi(i8* %39)
%41 = trunc i64 %40 to i32
store i32 %41, i32* %11
%42 = load i32, i32* %8
%43 = shl i32 %42, 24
%44 = load i32, i32* %9
%45 = shl i32 %44, 16
%46 = or i32 %43, %45
%47 = load i32, i32* %10
%48 = shl i32 %47, 8
%49 = or i32 %46, %48
%50 = load i32, i32* %11
%51 = or i32 %49, %50
store i32 %51, i32* %12
%52 = load i8*, i8** %7
%53 = call i8* @strtok(i8* %52, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%54 = call i64 @atoi(i8* %53)
%55 = trunc i64 %54 to i32
store i32 %55, i32* %8
%56 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%57 = call i64 @atoi(i8* %56)
%58 = trunc i64 %57 to i32
store i32 %58, i32* %9
%59 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%60 = call i64 @atoi(i8* %59)
%61 = trunc i64 %60 to i32
store i32 %61, i32* %10
%62 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%63 = call i64 @atoi(i8* %62)
%64 = trunc i64 %63 to i32
store i32 %64, i32* %11
%65 = load i32, i32* %8
%66 = shl i32 %65, 24
%67 = load i32, i32* %9
%68 = shl i32 %67, 16
%69 = or i32 %66, %68
%70 = load i32, i32* %10
%71 = shl i32 %70, 8
%72 = or i32 %69, %71
%73 = load i32, i32* %11
%74 = or i32 %72, %73
store i32 %74, i32* %13
%75 = load i32, i32* %12
%76 = icmp eq i32 %75, -1
br i1 %76, label %77, label %86
77: ; preds = %18
%78 = load i32, i32* %12
%79 = ashr i32 %78, 24
%80 = load i32, i32* %12
%81 = ashr i32 %80, 16
%82 = load i32, i32* %12
%83 = ashr i32 %82, 8
%84 = load i32, i32* %12
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %79, i32 %81, i32 %83, i32 %84, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %3
br label %199
86: ; preds = %18
%87 = load i32, i32* %12
%88 = icmp ne i32 %87, 0
br i1 %88, label %89, label %122
89: ; preds = %86
%90 = load i32, i32* %12
%91 = sub nsw i32 %90, 1
%92 = icmp ne i32 %91, 0
br i1 %92, label %93, label %122
93: ; preds = %89
%94 = load i32, i32* %12
%95 = sub nsw i32 %94, 2
%96 = icmp ne i32 %95, 0
br i1 %96, label %97, label %122
97: ; preds = %93
%98 = load i32, i32* %12
%99 = sub nsw i32 %98, 2
%100 = ashr i32 %99, 24
%101 = load i32, i32* %12
%102 = sub nsw i32 %101, 2
%103 = ashr i32 %102, 16
%104 = load i32, i32* %12
%105 = sub nsw i32 %104, 2
%106 = ashr i32 %105, 8
%107 = load i32, i32* %12
%108 = sub nsw i32 %107, 2
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i32 %100, i32 %103, i32 %106, i32 %108, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%110 = load i32, i32* %12
%111 = sub nsw i32 %110, 1
%112 = ashr i32 %111, 24
%113 = load i32, i32* %12
%114 = sub nsw i32 %113, 1
%115 = ashr i32 %114, 16
%116 = load i32, i32* %12
%117 = sub nsw i32 %116, 1
%118 = ashr i32 %117, 8
%119 = load i32, i32* %12
%120 = sub nsw i32 %119, 1
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), i32 %112, i32 %115, i32 %118, i32 %120, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
br label %122
122: ; preds = %97, %93, %89, %86
%123 = load i32, i32* %12
%124 = ashr i32 %123, 24
%125 = load i32, i32* %12
%126 = ashr i32 %125, 16
%127 = load i32, i32* %12
%128 = ashr i32 %127, 8
%129 = load i32, i32* %12
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.10, i64 0, i64 0), i32 %124, i32 %126, i32 %128, i32 %129, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%131 = load i32, i32* %12
%132 = add nsw i32 %131, 1
%133 = ashr i32 %132, 24
%134 = load i32, i32* %12
%135 = add nsw i32 %134, 1
%136 = ashr i32 %135, 16
%137 = load i32, i32* %12
%138 = add nsw i32 %137, 1
%139 = ashr i32 %138, 8
%140 = load i32, i32* %12
%141 = add nsw i32 %140, 1
%142 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i32 %133, i32 %136, i32 %139, i32 %141, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%143 = load i32, i32* %13
%144 = sub nsw i32 %143, 1
%145 = ashr i32 %144, 24
%146 = load i32, i32* %13
%147 = sub nsw i32 %146, 1
%148 = ashr i32 %147, 16
%149 = load i32, i32* %13
%150 = sub nsw i32 %149, 1
%151 = ashr i32 %150, 8
%152 = load i32, i32* %13
%153 = sub nsw i32 %152, 1
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.12, i64 0, i64 0), i32 %145, i32 %148, i32 %151, i32 %153, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%155 = load i32, i32* %13
%156 = ashr i32 %155, 24
%157 = load i32, i32* %13
%158 = ashr i32 %157, 16
%159 = load i32, i32* %13
%160 = ashr i32 %159, 8
%161 = load i32, i32* %13
%162 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.13, i64 0, i64 0), i32 %156, i32 %158, i32 %160, i32 %161, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%163 = load i32, i32* %13
%164 = icmp ne i32 %163, -1
br i1 %164, label %165, label %198
165: ; preds = %122
%166 = load i32, i32* %13
%167 = add nsw i32 %166, 1
%168 = icmp ne i32 %167, -1
br i1 %168, label %169, label %198
169: ; preds = %165
%170 = load i32, i32* %13
%171 = add nsw i32 %170, 2
%172 = icmp ne i32 %171, -1
br i1 %172, label %173, label %198
173: ; preds = %169
%174 = load i32, i32* %13
%175 = add nsw i32 %174, 1
%176 = ashr i32 %175, 24
%177 = load i32, i32* %13
%178 = add nsw i32 %177, 1
%179 = ashr i32 %178, 16
%180 = load i32, i32* %13
%181 = add nsw i32 %180, 1
%182 = ashr i32 %181, 8
%183 = load i32, i32* %13
%184 = add nsw i32 %183, 1
%185 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i64 0, i64 0), i32 %176, i32 %179, i32 %182, i32 %184, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%186 = load i32, i32* %13
%187 = add nsw i32 %186, 2
%188 = ashr i32 %187, 24
%189 = load i32, i32* %13
%190 = add nsw i32 %189, 2
%191 = ashr i32 %190, 16
%192 = load i32, i32* %13
%193 = add nsw i32 %192, 2
%194 = ashr i32 %193, 8
%195 = load i32, i32* %13
%196 = add nsw i32 %195, 2
%197 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.15, i64 0, i64 0), i32 %188, i32 %191, i32 %194, i32 %196, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
br label %198
198: ; preds = %173, %169, %165, %122
store i32 0, i32* %3
br label %199
199: ; preds = %198, %77, %16
%200 = load i32, i32* %3
ret i32 %200
}

LLVM IR (-O2):
@.str.2 = [7 x i8] c"// %s\0A\00"
@.str.3 = [2 x i8] c"-\00"
@.str.4 = [2 x i8] c".\00"
@.str.5 = [25 x i8] c"{{%u, %u, %u, %u}, %s},\0A\00"
@.str.6 = [6 x i8] c"false\00"
@.str.7 = [36 x i8] c"{{%u, %u, %u, %u}, %s}, // start-2\0A\00"
@.str.8 = [5 x i8] c"true\00"
@.str.9 = [36 x i8] c"{{%u, %u, %u, %u}, %s}, // start-1\0A\00"
@.str.10 = [34 x i8] c"{{%u, %u, %u, %u}, %s}, // start\0A\00"
@.str.11 = [36 x i8] c"{{%u, %u, %u, %u}, %s}, // start+1\0A\00"
@.str.12 = [34 x i8] c"{{%u, %u, %u, %u}, %s}, // end-1\0A\00"
@.str.13 = [32 x i8] c"{{%u, %u, %u, %u}, %s}, // end\0A\00"
@.str.14 = [34 x i8] c"{{%u, %u, %u, %u}, %s}, // end+1\0A\00"
@.str.15 = [34 x i8] c"{{%u, %u, %u, %u}, %s}, // end+2\0A\00"
@str = [26 x i8] c"eg. 0.0.0.0-0.255.255.255\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
br label %102
6: ; preds = %2
%7 = tail call i32 @putchar(i32 10)
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %8
%12 = tail call i8* @strtok(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%13 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%14 = tail call i8* @strtok(i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%15 = tail call i64 @atoi(i8* %14)
%16 = trunc i64 %15 to i32
%17 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%18 = tail call i64 @atoi(i8* %17)
%19 = trunc i64 %18 to i32
%20 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%21 = tail call i64 @atoi(i8* %20)
%22 = trunc i64 %21 to i32
%23 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%24 = tail call i64 @atoi(i8* %23)
%25 = trunc i64 %24 to i32
%26 = shl i32 %16, 24
%27 = shl i32 %19, 16
%28 = or i32 %27, %26
%29 = shl i32 %22, 8
%30 = or i32 %28, %29
%31 = or i32 %30, %25
%32 = tail call i8* @strtok(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%33 = tail call i64 @atoi(i8* %32)
%34 = trunc i64 %33 to i32
%35 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%36 = tail call i64 @atoi(i8* %35)
%37 = trunc i64 %36 to i32
%38 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%39 = tail call i64 @atoi(i8* %38)
%40 = trunc i64 %39 to i32
%41 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%42 = tail call i64 @atoi(i8* %41)
%43 = trunc i64 %42 to i32
%44 = shl i32 %34, 24
%45 = shl i32 %37, 16
%46 = or i32 %45, %44
%47 = shl i32 %40, 8
%48 = or i32 %46, %47
%49 = or i32 %48, %43
switch i32 %31, label %52 [
i32 -1, label %50
i32 0, label %67
]
50: ; preds = %6
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 -1, i32 -1, i32 -1, i32 -1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %102
52: ; preds = %6
%53 = add nsw i32 %31, -1
%54 = icmp eq i32 %53, 0
br i1 %54, label %67, label %55
55: ; preds = %52
%56 = add nsw i32 %31, -2
%57 = icmp eq i32 %56, 0
br i1 %57, label %67, label %58
58: ; preds = %55
%59 = ashr i32 %56, 24
%60 = ashr i32 %56, 16
%61 = ashr i32 %56, 8
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i32 %59, i32 %60, i32 %61, i32 %56, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%63 = ashr i32 %53, 24
%64 = ashr i32 %53, 16
%65 = ashr i32 %53, 8
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), i32 %63, i32 %64, i32 %65, i32 %53, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
br label %67
67: ; preds = %6, %58, %55, %52
%68 = ashr i32 %31, 24
%69 = ashr i32 %31, 16
%70 = ashr i32 %31, 8
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.10, i64 0, i64 0), i32 %68, i32 %69, i32 %70, i32 %31, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%72 = add nsw i32 %31, 1
%73 = ashr i32 %72, 24
%74 = ashr i32 %72, 16
%75 = ashr i32 %72, 8
%76 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i32 %73, i32 %74, i32 %75, i32 %72, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%77 = add nsw i32 %49, -1
%78 = ashr i32 %77, 24
%79 = ashr i32 %77, 16
%80 = ashr i32 %77, 8
%81 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.12, i64 0, i64 0), i32 %78, i32 %79, i32 %80, i32 %77, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%82 = ashr i32 %49, 24
%83 = ashr i32 %49, 16
%84 = ashr i32 %49, 8
%85 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.13, i64 0, i64 0), i32 %82, i32 %83, i32 %84, i32 %49, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%86 = icmp eq i32 %49, -1
br i1 %86, label %102, label %87
87: ; preds = %67
%88 = add nuw nsw i32 %49, 1
%89 = icmp eq i32 %88, -1
br i1 %89, label %102, label %90
90: ; preds = %87
%91 = add nuw nsw i32 %49, 2
%92 = icmp eq i32 %91, -1
br i1 %92, label %102, label %93
93: ; preds = %90
%94 = ashr i32 %88, 24
%95 = ashr i32 %88, 16
%96 = ashr i32 %88, 8
%97 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i64 0, i64 0), i32 %94, i32 %95, i32 %96, i32 %88, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%98 = ashr i32 %91, 24
%99 = ashr i32 %91, 16
%100 = ashr i32 %91, 8
%101 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.15, i64 0, i64 0), i32 %98, i32 %99, i32 %100, i32 %91, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
br label %102
102: ; preds = %50, %93, %90, %87, %67, %4
%103 = phi i32 [ -1, %4 ], [ 0, %67 ], [ 0, %87 ], [ 0, %90 ], [ 0, %93 ], [ 0, %50 ]
ret i32 %103
}