#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*/ assertEq(int, int);
int /*<<< orphan*/ endTest();
int square(int);
int main() {
  int a, b, c, d, e, f;
  b = a = 100, 50;
  assertEq(a, 100);
  assertEq(b, 100);
  b += 100;
  a -= 50;
  a *= 2;
  b /= 2;
  assertEq(a, 100);
  assertEq(b, 100);
  c = (10 > 20) ? 50 : 100;
  d = (c == 100) ? d == 0 ? 100 : 50 : -50;
  assertEq(c, 100);
  assertEq(d, 100);
  e = square(10);
  assertEq(e, 100);
  f = (e *= 1, 200);
  f *= 2;
  f /= e / 100 + (100, 400) / square(20) + 2;
  assertEq(f, 100);
  endTest();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
movl   $0x64,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    -0xc(%rbp),%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    -0xc(%rbp),%eax
add    $0x64,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x32,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    -0xc(%rbp),%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
movl   $0x64,-0x10(%rbp)
cmpl   $0x64,-0x10(%rbp)
jne    11d6 <main+0xa6>
mov    -0x14(%rbp),%edx
mov    $0x32,%eax
mov    $0x64,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
mov    %eax,-0x20(%rbp)
jmp    11e3 <main+0xb3>
mov    $0xffffffce,%eax
mov    %eax,-0x20(%rbp)
jmp    11e3 <main+0xb3>
mov    -0x20(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    -0x14(%rbp),%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    $0xa,%edi
call   1030 <square@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    -0x18(%rbp),%eax
shl    $0x0,%eax
mov    %eax,-0x18(%rbp)
movl   $0xc8,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0x24(%rbp)
mov    $0x14,%edi
call   1030 <square@plt>
mov    -0x24(%rbp),%ecx
mov    %eax,%esi
mov    $0x190,%eax
cltd
idiv   %esi
add    %eax,%ecx
add    $0x2,%ecx
mov    -0x1c(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    $0x0,%al
call   1040 <endTest@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x64,%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    $0x64,%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    $0x64,%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    $0x64,%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    $0x64,%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    $0x32,%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
mov    $0xa,%edi
call   1030 <square@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
movslq %ebx,%rax
imul   $0x51eb851f,%rax,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
sar    $0x25,%rbx
add    %eax,%ebx
mov    $0x14,%edi
call   1030 <square@plt>
mov    %eax,%ecx
mov    $0x190,%eax
xor    %edx,%edx
idiv   %ecx
lea    (%rax,%rbx,1),%ecx
add    $0x2,%ecx
mov    $0x190,%eax
xor    %edx,%edx
idiv   %ecx
mov    %eax,%edi
mov    $0x64,%esi
call   1050 <assertEq@plt>
xor    %eax,%eax
call   1040 <endTest@plt>
xor    %eax,%eax
pop    %rbx
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 100, i32* %2
store i32 100, i32* %3
%8 = load i32, i32* %2
%9 = call i32 @assertEq(i32 %8, i32 100)
%10 = load i32, i32* %3
%11 = call i32 @assertEq(i32 %10, i32 100)
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 100
store i32 %13, i32* %3
%14 = load i32, i32* %2
%15 = sub nsw i32 %14, 50
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = mul nsw i32 %16, 2
store i32 %17, i32* %2
%18 = load i32, i32* %3
%19 = sdiv i32 %18, 2
store i32 %19, i32* %3
%20 = load i32, i32* %2
%21 = call i32 @assertEq(i32 %20, i32 100)
%22 = load i32, i32* %3
%23 = call i32 @assertEq(i32 %22, i32 100)
store i32 100, i32* %4
%24 = load i32, i32* %4
%25 = icmp eq i32 %24, 100
br i1 %25, label %26, label %31
26: ; preds = %0
%27 = load i32, i32* %5
%28 = icmp eq i32 %27, 0
%29 = zext i1 %28 to i64
%30 = select i1 %28, i32 100, i32 50
br label %32
31: ; preds = %0
br label %32
32: ; preds = %31, %26
%33 = phi i32 [ %30, %26 ], [ -50, %31 ]
store i32 %33, i32* %5
%34 = load i32, i32* %4
%35 = call i32 @assertEq(i32 %34, i32 100)
%36 = load i32, i32* %5
%37 = call i32 @assertEq(i32 %36, i32 100)
%38 = call i32 @square(i32 10)
store i32 %38, i32* %6
%39 = load i32, i32* %6
%40 = call i32 @assertEq(i32 %39, i32 100)
%41 = load i32, i32* %6
%42 = mul nsw i32 %41, 1
store i32 %42, i32* %6
store i32 200, i32* %7
%43 = load i32, i32* %7
%44 = mul nsw i32 %43, 2
store i32 %44, i32* %7
%45 = load i32, i32* %6
%46 = sdiv i32 %45, 100
%47 = call i32 @square(i32 20)
%48 = sdiv i32 400, %47
%49 = add nsw i32 %46, %48
%50 = add nsw i32 %49, 2
%51 = load i32, i32* %7
%52 = sdiv i32 %51, %50
store i32 %52, i32* %7
%53 = load i32, i32* %7
%54 = call i32 @assertEq(i32 %53, i32 100)
%55 = call i32 (...) @endTest()
%56 = load i32, i32* %1
ret i32 %56
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assertEq(i32 100, i32 100)
%2 = tail call i32 @assertEq(i32 100, i32 100)
%3 = tail call i32 @assertEq(i32 100, i32 100)
%4 = tail call i32 @assertEq(i32 100, i32 100)
%5 = tail call i32 @assertEq(i32 100, i32 100)
%6 = tail call i32 @assertEq(i32 50, i32 100)
%7 = tail call i32 @square(i32 10)
%8 = tail call i32 @assertEq(i32 %7, i32 100)
%9 = sdiv i32 %7, 100
%10 = tail call i32 @square(i32 20)
%11 = sdiv i32 400, %10
%12 = add nsw i32 %9, 2
%13 = add nsw i32 %12, %11
%14 = sdiv i32 400, %13
%15 = tail call i32 @assertEq(i32 %14, i32 100)
%16 = tail call i32 (...) @endTest()
ret i32 0
}