#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();
int main() {
  int i = 1;
  int j = 0;
  int z = i - j;
  int x = 0;
  int y = 0;
  int w = 0;
  while (unknown2()) {
    z += x + y + w;
    y++;
    if (z % 2 == 1)
      x++;
    w += 2;
  }
  static_assert(x == y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <unknown2@plt>
cmp    $0x0,%rax
je     11af <main+0x8f>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    11a1 <main+0x81>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
jmp    115b <main+0x3b>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <static_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %r15d,%r15d
xor    %eax,%eax
call   1030 <unknown2@plt>
mov    $0x0,%r14d
test   %rax,%rax
je     1170 <main+0x50>
mov    $0x1,%ebp
xor    %ebx,%ebx
xor    %r14d,%r14d
xor    %r15d,%r15d
nopl   0x0(%rax)
add    %r15d,%ebp
add    %ebx,%ebp
add    $0x1,%r14d
mov    %ebp,%eax
and    $0x1,%eax
add    %eax,%r15d
xor    %eax,%eax
call   1030 <unknown2@plt>
add    $0x3,%ebx
test   %rax,%rax
jne    1150 <main+0x30>
xor    %edi,%edi
cmp    %r14d,%r15d
sete   %dil
call   1040 <static_assert@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @unknown2()
%2 = icmp eq i64 %1, 0
br i1 %2, label %17, label %3
3: ; preds = %0, %3
%4 = phi i32 [ %14, %3 ], [ 0, %0 ]
%5 = phi i32 [ %11, %3 ], [ 0, %0 ]
%6 = phi i32 [ %13, %3 ], [ 0, %0 ]
%7 = phi i32 [ %10, %3 ], [ 1, %0 ]
%8 = add i32 %6, %7
%9 = add i32 %8, %5
%10 = add i32 %9, %4
%11 = add nuw nsw i32 %5, 1
%12 = and i32 %10, 1
%13 = add nuw nsw i32 %12, %6
%14 = add nuw nsw i32 %4, 2
%15 = tail call i64 (...) @unknown2()
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %3
17: ; preds = %3, %0
%18 = phi i32 [ 0, %0 ], [ %13, %3 ]
%19 = phi i32 [ 0, %0 ], [ %11, %3 ]
%20 = icmp eq i32 %18, %19
%21 = zext i1 %20 to i32
%22 = tail call i32 @static_assert(i32 %21)
ret i32 0
}