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


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     11a6 <main+0x86>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    117b <main+0x5b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11a1 <main+0x81>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <main+0x24>
cmpl   $0x1,-0xc(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <static_assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <unknown2@plt>
test   %rax,%rax
je     1171 <main+0x51>
mov    $0x1,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %ebp,%eax
shr    $0x1f,%eax
add    %ebp,%eax
and    $0xfffffffe,%eax
mov    %ebp,%ecx
sub    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
sete   %al
add    %ecx,%ebp
add    %eax,%ebx
xor    %eax,%eax
call   1030 <unknown2@plt>
test   %rax,%rax
jne    1140 <main+0x20>
xor    %edi,%edi
cmp    $0x2,%ebx
setb   %dil
jmp    1176 <main+0x56>
mov    $0x1,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
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 = %26, %0
%6 = call i64 (...) @unknown2()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %27
8: ; preds = %5
%9 = load i32, i32* %1
%10 = srem i32 %9, 2
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
%15 = load i32, i32* %1
%16 = add nsw i32 %15, 1
store i32 %16, i32* %1
br label %17
17: ; preds = %12, %8
%18 = load i32, i32* %2
%19 = srem i32 %18, 2
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %26
21: ; preds = %17
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
%24 = load i32, i32* %2
%25 = add nsw i32 %24, 1
store i32 %25, i32* %2
br label %26
26: ; preds = %21, %17
br label %5
27: ; preds = %5
%28 = load i32, i32* %3
%29 = icmp sle i32 %28, 1
%30 = zext i1 %29 to i32
%31 = call i32 @static_assert(i32 %30)
ret void
}

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