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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
void main() {
  int i, j, k;
  int count;
  count = 1;
  for (i = 192; i <= 255; i++) {
    for (j = 168; j <= 255; j++) {
      for (k = 0; k <= 255; k++) {
        printf("int vlan %d\r\n", count);
        printf("ip address %d.%d.%d.1/24\r\n", i, j, k);
        count++;
        if (count > 512)
          break;
      }
      if (count > 512)
        break;
    }
    if (count > 512)
      break;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x10(%rbp)
movl   $0xc0,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jg     11fb <main+0xeb>
movl   $0xa8,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     11d6 <main+0xc6>
movl   $0x0,-0xc(%rbp)
cmpl   $0xff,-0xc(%rbp)
jg     11b1 <main+0xa1>
mov    -0x10(%rbp),%esi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x200,-0x10(%rbp)
jle    119e <main+0x8e>
jmp    11b1 <main+0xa1>
jmp    11a3 <main+0x93>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114e <main+0x3e>
cmpl   $0x200,-0x10(%rbp)
jle    11c3 <main+0xb3>
jmp    11d6 <main+0xc6>
jmp    11c8 <main+0xb8>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <main+0x2a>
cmpl   $0x200,-0x10(%rbp)
jle    11e8 <main+0xd8>
jmp    11fb <main+0xeb>
jmp    11ed <main+0xdd>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1126 <main+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0xc0,%r12d
mov    $0x1,%eax
lea    0xee1(%rip),%r15
mov    $0xa8,%r13d
mov    %eax,%ebp
cmp    $0x201,%eax
mov    $0x200,%eax
cmovge %ebp,%eax
mov    %ebp,%r14d
sub    %eax,%r14d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
lea    (%rbx,%rbp,1),%esi
lea    0xea6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %r13d,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14d,%eax
add    %ebx,%eax
je     11a6 <main+0x96>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1150 <main+0x40>
add    $0x1,%r13d
lea    (%rbx,%rbp,1),%eax
cmp    $0x100,%r13d
jne    1133 <main+0x23>
add    $0x1,%r12d
add    %ebx,%ebp
mov    %ebp,%eax
cmp    $0x100,%r12d
jne    112d <main+0x1d>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"int vlan %d\0D\0A\00"
@.str.1 = [27 x i8] c"ip address %d.%d.%d.1/24\0D\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 1, i32* %4
store i32 192, i32* %1
br label %5
5: ; preds = %45, %0
%6 = load i32, i32* %1
%7 = icmp sle i32 %6, 255
br i1 %7, label %8, label %48
8: ; preds = %5
store i32 168, i32* %2
br label %9
9: ; preds = %37, %8
%10 = load i32, i32* %2
%11 = icmp sle i32 %10, 255
br i1 %11, label %12, label %40
12: ; preds = %9
store i32 0, i32* %3
br label %13
13: ; preds = %29, %12
%14 = load i32, i32* %3
%15 = icmp sle i32 %14, 255
br i1 %15, label %16, label %32
16: ; preds = %13
%17 = load i32, i32* %4
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %1
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %19, i32 %20, i32 %21)
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
store i32 %24, i32* %4
%25 = load i32, i32* %4
%26 = icmp sgt i32 %25, 512
br i1 %26, label %27, label %28
27: ; preds = %16
br label %32
28: ; preds = %16
br label %29
29: ; preds = %28
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
br label %13
32: ; preds = %27, %13
%33 = load i32, i32* %4
%34 = icmp sgt i32 %33, 512
br i1 %34, label %35, label %36
35: ; preds = %32
br label %40
36: ; preds = %32
br label %37
37: ; preds = %36
%38 = load i32, i32* %2
%39 = add nsw i32 %38, 1
store i32 %39, i32* %2
br label %9
40: ; preds = %35, %9
%41 = load i32, i32* %4
%42 = icmp sgt i32 %41, 512
br i1 %42, label %43, label %44
43: ; preds = %40
br label %48
44: ; preds = %40
br label %45
45: ; preds = %44
%46 = load i32, i32* %1
%47 = add nsw i32 %46, 1
store i32 %47, i32* %1
br label %5
48: ; preds = %43, %5
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"int vlan %d\0D\0A\00"
@.str.1 = [27 x i8] c"ip address %d.%d.%d.1/24\0D\0A\00"
define void @main() {
br label %1
1: ; preds = %0, %22
%2 = phi i32 [ 1, %0 ], [ %16, %22 ]
%3 = phi i32 [ 192, %0 ], [ %23, %22 ]
br label %4
4: ; preds = %1, %19
%5 = phi i32 [ %2, %1 ], [ %16, %19 ]
%6 = phi i32 [ 168, %1 ], [ %20, %19 ]
%7 = call i32 @llvm.smax.i32(i32 %5, i32 512)
%8 = sub i32 %7, %5
br label %9
9: ; preds = %4, %15
%10 = phi i32 [ %5, %4 ], [ %16, %15 ]
%11 = phi i32 [ 0, %4 ], [ %17, %15 ]
%12 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %10)
%13 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 %6, i32 %11)
%14 = icmp eq i32 %11, %8
br i1 %14, label %25, label %15
15: ; preds = %9
%16 = add nsw i32 %10, 1
%17 = add nuw nsw i32 %11, 1
%18 = icmp eq i32 %17, 256
br i1 %18, label %19, label %9
19: ; preds = %15
%20 = add nuw nsw i32 %6, 1
%21 = icmp eq i32 %20, 256
br i1 %21, label %22, label %4
22: ; preds = %19
%23 = add nuw nsw i32 %3, 1
%24 = icmp eq i32 %23, 256
br i1 %24, label %25, label %1
25: ; preds = %22, %9
ret void
}