#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);
int main() {
  int i = 0;
  while (i < 20) {
    i += 1;
    if (i % 2)
      continue;
    if (i == 16)
      break;
    printf("%d\n", i);
  }
  i = 0;
  while (i < 20) {
    i += 1;
    if (i % 2)
      continue;
    if (i == 16)
      break;
    printf("%d\n", i);
    int j = 20;
    while (j) {
      j -= 1;
      if (j % 2)
        continue;
      if (j == 4)
        break;
      printf("%d\n", j);
    }
  }
  for (int i = 0, j = 10;; i += 1) {
    if (i % 2)
      continue;
    printf("%d\n", i);
    if (i == j)
      break;
  }
  printf("%d\n", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    1175 <main+0x65>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1152 <main+0x42>
jmp    1126 <main+0x16>
cmpl   $0x10,-0x8(%rbp)
jne    1161 <main+0x51>
jmp    1175 <main+0x65>
mov    -0x8(%rbp),%esi
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
jmp    1126 <main+0x16>
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    1221 <main+0x111>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11a8 <main+0x98>
jmp    117c <main+0x6c>
cmpl   $0x10,-0x8(%rbp)
jne    11b7 <main+0xa7>
jmp    1221 <main+0x111>
mov    -0x8(%rbp),%esi
lea    0xe3f(%rip),%rdi
call   1030 <printf@plt>
movl   $0x14,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     121c <main+0x10c>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11f9 <main+0xe9>
jmp    11cd <main+0xbd>
cmpl   $0x4,-0xc(%rbp)
jne    1208 <main+0xf8>
jmp    121c <main+0x10c>
mov    -0xc(%rbp),%esi
lea    0xdee(%rip),%rdi
call   1030 <printf@plt>
jmp    11cd <main+0xbd>
jmp    117c <main+0x6c>
movl   $0x0,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1248 <main+0x138>
jmp    126d <main+0x15d>
mov    -0x10(%rbp),%esi
lea    0xdae(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    1268 <main+0x158>
jmp    127b <main+0x16b>
jmp    126d <main+0x15d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    122f <main+0x11f>
mov    -0x8(%rbp),%esi
lea    0xd7b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
jmp    1138 <main+0x28>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x15,%ebx
je     114e <main+0x3e>
test   $0x1,%bl
jne    1130 <main+0x20>
cmp    $0x10,%ebx
je     114e <main+0x3e>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1130 <main+0x20>
xor    %ebx,%ebx
lea    0xea9(%rip),%r14
jmp    1165 <main+0x55>
nopl   0x0(%rax)
cmp    $0x14,%ebx
je     11b0 <main+0xa0>
add    $0x1,%ebx
test   $0x1,%bl
jne    1160 <main+0x50>
cmp    $0x10,%ebx
je     11b8 <main+0xa8>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    $0x14,%eax
jmp    1196 <main+0x86>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebp,%eax
test   %ebp,%ebp
je     1160 <main+0x50>
lea    -0x1(%rax),%ebp
test   $0x1,%bpl
jne    1190 <main+0x80>
cmp    $0x5,%eax
je     1160 <main+0x50>
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
jmp    1190 <main+0x80>
mov    $0x14,%r14d
jmp    11be <main+0xae>
mov    $0x10,%r14d
xor    %ebp,%ebp
lea    0xe39(%rip),%rbx
jmp    11d3 <main+0xc3>
nopl   0x0(%rax)
add    $0x1,%ebp
test   $0x1,%bpl
jne    11d0 <main+0xc0>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
cmp    $0xa,%ebp
jne    11d0 <main+0xc0>
lea    0xe11(%rip),%rdi
mov    %r14d,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %6
6: ; preds = %20, %15, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 20
br i1 %8, label %9, label %23
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = srem i32 %12, 2
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %9
br label %6
16: ; preds = %9
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, 16
br i1 %18, label %19, label %20
19: ; preds = %16
br label %23
20: ; preds = %16
%21 = load i32, i32* %2
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %21)
br label %6
23: ; preds = %19, %6
store i32 0, i32* %2
br label %24
24: ; preds = %58, %33, %23
%25 = load i32, i32* %2
%26 = icmp slt i32 %25, 20
br i1 %26, label %27, label %59
27: ; preds = %24
%28 = load i32, i32* %2
%29 = add nsw i32 %28, 1
store i32 %29, i32* %2
%30 = load i32, i32* %2
%31 = srem i32 %30, 2
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %34
33: ; preds = %27
br label %24
34: ; preds = %27
%35 = load i32, i32* %2
%36 = icmp eq i32 %35, 16
br i1 %36, label %37, label %38
37: ; preds = %34
br label %59
38: ; preds = %34
%39 = load i32, i32* %2
%40 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %39)
store i32 20, i32* %3
br label %41
41: ; preds = %55, %50, %38
%42 = load i32, i32* %3
%43 = icmp ne i32 %42, 0
br i1 %43, label %44, label %58
44: ; preds = %41
%45 = load i32, i32* %3
%46 = sub nsw i32 %45, 1
store i32 %46, i32* %3
%47 = load i32, i32* %3
%48 = srem i32 %47, 2
%49 = icmp ne i32 %48, 0
br i1 %49, label %50, label %51
50: ; preds = %44
br label %41
51: ; preds = %44
%52 = load i32, i32* %3
%53 = icmp eq i32 %52, 4
br i1 %53, label %54, label %55
54: ; preds = %51
br label %58
55: ; preds = %51
%56 = load i32, i32* %3
%57 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %56)
br label %41
58: ; preds = %54, %41
br label %24
59: ; preds = %37, %24
store i32 0, i32* %4
store i32 10, i32* %5
br label %60
60: ; preds = %73, %59
%61 = load i32, i32* %4
%62 = srem i32 %61, 2
%63 = icmp ne i32 %62, 0
br i1 %63, label %64, label %65
64: ; preds = %60
br label %73
65: ; preds = %60
%66 = load i32, i32* %4
%67 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %66)
%68 = load i32, i32* %4
%69 = load i32, i32* %5
%70 = icmp eq i32 %68, %69
br i1 %70, label %71, label %72
71: ; preds = %65
br label %76
72: ; preds = %65
br label %73
73: ; preds = %72, %64
%74 = load i32, i32* %4
%75 = add nsw i32 %74, 1
store i32 %75, i32* %4
br label %60
76: ; preds = %71
%77 = load i32, i32* %2
%78 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %77)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %10
%2 = phi i32 [ 0, %0 ], [ %3, %10 ]
%3 = add nuw nsw i32 %2, 1
%4 = and i32 %3, 1
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = icmp eq i32 %3, 16
br i1 %7, label %12, label %8
8: ; preds = %6
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %10
10: ; preds = %8, %1
%11 = icmp eq i32 %3, 20
br i1 %11, label %12, label %1
12: ; preds = %6, %10
br label %13
13: ; preds = %12, %33
%14 = phi i32 [ %15, %33 ], [ 0, %12 ]
%15 = add nuw nsw i32 %14, 1
%16 = and i32 %15, 1
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %33
18: ; preds = %13
%19 = icmp eq i32 %15, 16
br i1 %19, label %35, label %20
20: ; preds = %18
%21 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %22
22: ; preds = %20, %31
%23 = phi i32 [ 20, %20 ], [ %24, %31 ]
%24 = add nsw i32 %23, -1
%25 = and i32 %24, 1
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %31
27: ; preds = %22
%28 = icmp eq i32 %24, 4
br i1 %28, label %33, label %29
29: ; preds = %27
%30 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %24)
br label %31
31: ; preds = %29, %22
%32 = icmp eq i32 %24, 0
br i1 %32, label %33, label %22
33: ; preds = %31, %27, %13
%34 = icmp eq i32 %15, 20
br i1 %34, label %35, label %13
35: ; preds = %18, %33
%36 = phi i32 [ 16, %18 ], [ 20, %33 ]
br label %37
37: ; preds = %46, %35
%38 = phi i32 [ 0, %35 ], [ %47, %46 ]
%39 = and i32 %38, 1
%40 = icmp eq i32 %39, 0
br i1 %40, label %41, label %46
41: ; preds = %37
%42 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %38)
%43 = icmp eq i32 %38, 10
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %36)
ret i32 0
46: ; preds = %41, %37
%47 = add nuw nsw i32 %38, 1
br label %37
}