#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int, int);
int main() {
  int i, a, b, c, d, e, f, g;
  a = b = c = d = e = f = g = 0;
  for (i = 0; i < 200; i++) {
    int x = i % 2;
    int y = i % 4;
    a++;
    if (x == 0) {
      b++;
      if (y == 0) {
        c++;
      } else {
        d++;
      }
    } else {
      e++;
    }
    if (x == 0) {
      f++;
    } else {
      g++;
    }
  }
  printf("a:%d b:%d c:%d d:%d e:%d f:%d g:%d\n", a, b, c, d, e, f, g);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xc8,-0x8(%rbp)
jge    120f <main+0xef>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x28(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %edx,-0x2c(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x28(%rbp)
jne    11d2 <main+0xb2>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jne    11c4 <main+0xa4>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11cd <main+0xad>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11db <main+0xbb>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x28(%rbp)
jne    11f3 <main+0xd3>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11fc <main+0xdc>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1201 <main+0xe1>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1167 <main+0x47>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
mov    -0x20(%rbp),%r10d
mov    -0x24(%rbp),%eax
lea    0xdd2(%rip),%rdi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
pxor   %xmm10,%xmm10
movdqa 0xecf(%rip),%xmm2
mov    $0xc8,%eax
movdqa 0xed1(%rip),%xmm11
movdqa 0xed8(%rip),%xmm8
movdqa 0xedf(%rip),%xmm9
pxor   %xmm12,%xmm12
pxor   %xmm13,%xmm13
pxor   %xmm14,%xmm14
pxor   %xmm3,%xmm3
pxor   %xmm6,%xmm6
pxor   %xmm4,%xmm4
nopl   0x0(%rax)
movdqa %xmm2,%xmm5
pand   %xmm11,%xmm5
movdqa %xmm5,%xmm0
paddd  %xmm5,%xmm14
paddd  %xmm5,%xmm12
pcmpeqd %xmm10,%xmm5
movdqa %xmm2,%xmm1
pand   %xmm8,%xmm1
pcmpgtd %xmm10,%xmm1
pand   %xmm5,%xmm1
pxor   %xmm11,%xmm0
paddd  %xmm0,%xmm4
movdqa %xmm1,%xmm7
pandn  %xmm5,%xmm7
psubd  %xmm7,%xmm6
pand   %xmm5,%xmm1
psubd  %xmm1,%xmm3
paddd  %xmm0,%xmm13
paddd  %xmm9,%xmm2
add    $0xfffffffc,%eax
jne    1170 <main+0x50>
pshufd $0xee,%xmm4,%xmm0
paddd  %xmm4,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%edx
pshufd $0xee,%xmm6,%xmm0
paddd  %xmm6,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%ecx
pshufd $0xee,%xmm3,%xmm0
paddd  %xmm3,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%r8d
pshufd $0xee,%xmm14,%xmm0
paddd  %xmm14,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%r9d
pshufd $0xee,%xmm13,%xmm0
paddd  %xmm13,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0xee,%xmm12,%xmm0
paddd  %xmm12,%xmm0
pshufd $0x55,%xmm0,%xmm2
paddd  %xmm0,%xmm2
movd   %xmm2,0x8(%rsp)
movd   %xmm1,(%rsp)
lea    0xde0(%rip),%rdi
mov    $0xc8,%esi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"a:%d b:%d c:%d d:%d e:%d f:%d g:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %9
store i32 0, i32* %8
store i32 0, i32* %7
store i32 0, i32* %6
store i32 0, i32* %5
store i32 0, i32* %4
store i32 0, i32* %3
store i32 0, i32* %2
br label %12
12: ; preds = %49, %0
%13 = load i32, i32* %2
%14 = icmp slt i32 %13, 200
br i1 %14, label %15, label %52
15: ; preds = %12
%16 = load i32, i32* %2
%17 = srem i32 %16, 2
store i32 %17, i32* %10
%18 = load i32, i32* %2
%19 = srem i32 %18, 4
store i32 %19, i32* %11
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
%22 = load i32, i32* %10
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %36
24: ; preds = %15
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
%27 = load i32, i32* %11
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %24
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
br label %35
32: ; preds = %24
%33 = load i32, i32* %6
%34 = add nsw i32 %33, 1
store i32 %34, i32* %6
br label %35
35: ; preds = %32, %29
br label %39
36: ; preds = %15
%37 = load i32, i32* %7
%38 = add nsw i32 %37, 1
store i32 %38, i32* %7
br label %39
39: ; preds = %36, %35
%40 = load i32, i32* %10
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %45
42: ; preds = %39
%43 = load i32, i32* %8
%44 = add nsw i32 %43, 1
store i32 %44, i32* %8
br label %48
45: ; preds = %39
%46 = load i32, i32* %9
%47 = add nsw i32 %46, 1
store i32 %47, i32* %9
br label %48
48: ; preds = %45, %42
br label %49
49: ; preds = %48
%50 = load i32, i32* %2
%51 = add nsw i32 %50, 1
store i32 %51, i32* %2
br label %12
52: ; preds = %12
%53 = load i32, i32* %3
%54 = load i32, i32* %4
%55 = load i32, i32* %5
%56 = load i32, i32* %6
%57 = load i32, i32* %7
%58 = load i32, i32* %8
%59 = load i32, i32* %9
%60 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %53, i32 %54, i32 %55, i32 %56, i32 %57, i32 %58, i32 %59)
%61 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [36 x i8] c"a:%d b:%d c:%d d:%d e:%d f:%d g:%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %32, %1 ]
%3 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %0 ], [ %33, %1 ]
%4 = phi <4 x i32> [ zeroinitializer, %0 ], [ %31, %1 ]
%5 = phi <4 x i32> [ zeroinitializer, %0 ], [ %28, %1 ]
%6 = phi <4 x i32> [ zeroinitializer, %0 ], [ %26, %1 ]
%7 = phi <4 x i32> [ zeroinitializer, %0 ], [ %24, %1 ]
%8 = phi <4 x i32> [ zeroinitializer, %0 ], [ %21, %1 ]
%9 = phi <4 x i32> [ zeroinitializer, %0 ], [ %17, %1 ]
%10 = and <4 x i32> %3, <i32 1, i32 1, i32 1, i32 1>
%11 = icmp eq <4 x i32> %10, zeroinitializer
%12 = and <4 x i32> %3, <i32 3, i32 3, i32 3, i32 3>
%13 = icmp ne <4 x i32> %12, zeroinitializer
%14 = and <4 x i1> %11, %13
%15 = xor <4 x i1> %11, <i1 true, i1 true, i1 true, i1 true>
%16 = xor <4 x i32> %10, <i32 1, i32 1, i32 1, i32 1>
%17 = add <4 x i32> %9, %16
%18 = xor <4 x i1> %14, <i1 true, i1 true, i1 true, i1 true>
%19 = select <4 x i1> %11, <4 x i1> %18, <4 x i1> zeroinitializer
%20 = zext <4 x i1> %19 to <4 x i32>
%21 = add <4 x i32> %8, %20
%22 = select <4 x i1> %11, <4 x i1> %14, <4 x i1> zeroinitializer
%23 = zext <4 x i1> %22 to <4 x i32>
%24 = add <4 x i32> %7, %23
%25 = zext <4 x i1> %15 to <4 x i32>
%26 = add <4 x i32> %6, %25
%27 = xor <4 x i32> %10, <i32 1, i32 1, i32 1, i32 1>
%28 = add <4 x i32> %27, %5
%29 = xor <4 x i1> %11, <i1 true, i1 true, i1 true, i1 true>
%30 = zext <4 x i1> %29 to <4 x i32>
%31 = add <4 x i32> %4, %30
%32 = add nuw i32 %2, 4
%33 = add <4 x i32> %3, <i32 4, i32 4, i32 4, i32 4>
%34 = icmp eq i32 %32, 200
br i1 %34, label %35, label %1
35: ; preds = %1
%36 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %17)
%37 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %21)
%38 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %24)
%39 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %26)
%40 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %28)
%41 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %31)
%42 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 200, i32 %36, i32 %37, i32 %38, i32 %39, i32 %40, i32 %41)
%43 = tail call i32 @exit(i32 0)
unreachable
}