#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*/ static_assert(int);
scalar_t__ unknown2();
void main() {
  int w = 1;
  int z = 0;
  int x = 0;
  int y = 0;
  while (unknown2()) {
    if (w) {
      x++;
      w = !w;
    };
    if (!z) {
      y++;
      z = !z;
    };
  }
  static_assert(x == y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <unknown2@plt>
cmp    $0x0,%rax
je     11a2 <main+0x82>
cmpl   $0x0,-0x4(%rbp)
je     1179 <main+0x59>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    119d <main+0x7d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <main+0x24>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <static_assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <unknown2@plt>
test   %rax,%rax
jne    1130 <main+0x10>
mov    $0x1,%edi
pop    %rax
jmp    1040 <static_assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 1, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %28, %0
%6 = call i64 (...) @unknown2()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %29
8: ; preds = %5
%9 = load i32, i32* %1
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
%14 = load i32, i32* %1
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
store i32 %17, i32* %1
br label %18
18: ; preds = %11, %8
%19 = load i32, i32* %2
%20 = icmp ne i32 %19, 0
br i1 %20, label %28, label %21
21: ; preds = %18
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
%24 = load i32, i32* %2
%25 = icmp ne i32 %24, 0
%26 = xor i1 %25, true
%27 = zext i1 %26 to i32
store i32 %27, i32* %2
br label %28
28: ; preds = %21, %18
br label %5
29: ; preds = %5
%30 = load i32, i32* %3
%31 = load i32, i32* %4
%32 = icmp eq i32 %30, %31
%33 = zext i1 %32 to i32
%34 = call i32 @static_assert(i32 %33)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i64 (...) @unknown2()
%2 = icmp eq i64 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = tail call i64 (...) @unknown2()
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3, %6
%7 = tail call i64 (...) @unknown2()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %6
9: ; preds = %6, %3, %0
%10 = tail call i32 @static_assert(i32 1)
ret void
}