#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*/ assertEqf(float, double);
int /*<<< orphan*/ endTest();
int main() {
  int a, b, c, d, e, f;
  float u, v, w, x, y, z;
  a = 100;
  b = c = d = e = f = 100;
  b += 100;
  c -= 50;
  d *= 2;
  e /= 2;
  f += c;
  f *= d;
  f /= 100;
  f -= 200;
  assertEq(a, 100);
  assertEq(b, 200);
  assertEq(c, 50);
  assertEq(d, 200);
  assertEq(e, 50);
  assertEq(f, 100);
  u = 0.5;
  v = w = x = y = z = 0.5;
  v += 0.5;
  w -= 0.25;
  x *= 0.5;
  y /= 0.5;
  z += v;
  z -= w + x;
  z *= ((v - x) / w);
  z /= y + x * 4.0 + v;
  assertEqf(u, 0.5);
  assertEqf(v, 1.0);
  assertEqf(w, 0.25);
  assertEqf(x, 0.25);
  assertEqf(y, 1.0);
  assertEqf(z, 1.0);
  endTest();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x64,-0x4(%rbp)
movl   $0x64,-0x18(%rbp)
movl   $0x64,-0x14(%rbp)
movl   $0x64,-0x10(%rbp)
movl   $0x64,-0xc(%rbp)
movl   $0x64,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x64,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x32,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
sub    $0xc8,%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x64,%esi
call   1040 <assertEq@plt>
mov    -0x8(%rbp),%edi
mov    $0xc8,%esi
call   1040 <assertEq@plt>
mov    -0xc(%rbp),%edi
mov    $0x32,%esi
call   1040 <assertEq@plt>
mov    -0x10(%rbp),%edi
mov    $0xc8,%esi
call   1040 <assertEq@plt>
mov    -0x14(%rbp),%edi
mov    $0x32,%esi
call   1040 <assertEq@plt>
mov    -0x18(%rbp),%edi
mov    $0x64,%esi
call   1040 <assertEq@plt>
movss  0xe13(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xe06(%rip),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  0xdf9(%rip),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  0xdec(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  0xddf(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  0xdd2(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdac(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd86(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd70(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd52(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x20(%rbp),%xmm0
addss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x24(%rbp),%xmm1
addss  -0x28(%rbp),%xmm1
movss  -0x30(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x20(%rbp),%xmm0
subss  -0x28(%rbp),%xmm0
divss  -0x24(%rbp),%xmm0
mulss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x28(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xcf3(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm0,%xmm1
movss  -0x30(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x1c(%rbp),%xmm0
movsd  0xcb3(%rip),%xmm1
call   1050 <assertEqf@plt>
movss  -0x20(%rbp),%xmm0
movsd  0xc91(%rip),%xmm1
call   1050 <assertEqf@plt>
movss  -0x24(%rbp),%xmm0
movsd  0xc87(%rip),%xmm1
call   1050 <assertEqf@plt>
movss  -0x28(%rbp),%xmm0
movsd  0xc75(%rip),%xmm1
call   1050 <assertEqf@plt>
movss  -0x2c(%rbp),%xmm0
movsd  0xc5b(%rip),%xmm1
call   1050 <assertEqf@plt>
movss  -0x30(%rbp),%xmm0
movsd  0xc49(%rip),%xmm1
call   1050 <assertEqf@plt>
mov    $0x0,%al
call   1030 <endTest@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x64,%edi
mov    $0x64,%esi
call   1040 <assertEq@plt>
mov    $0xc8,%edi
mov    $0xc8,%esi
call   1040 <assertEq@plt>
mov    $0x32,%edi
mov    $0x32,%esi
call   1040 <assertEq@plt>
mov    $0xc8,%edi
mov    $0xc8,%esi
call   1040 <assertEq@plt>
mov    $0x32,%edi
mov    $0x32,%esi
call   1040 <assertEq@plt>
mov    $0x64,%edi
mov    $0x64,%esi
call   1040 <assertEq@plt>
movss  0xe6d(%rip),%xmm0
movsd  0xe75(%rip),%xmm1
call   1050 <assertEqf@plt>
movss  0xe5c(%rip),%xmm0
movsd  0xe68(%rip),%xmm1
call   1050 <assertEqf@plt>
movss  0xe4b(%rip),%xmm0
movsd  0xe5b(%rip),%xmm1
call   1050 <assertEqf@plt>
movss  0xe36(%rip),%xmm0
movsd  0xe46(%rip),%xmm1
call   1050 <assertEqf@plt>
movss  0xe1d(%rip),%xmm0
movsd  0xe29(%rip),%xmm1
call   1050 <assertEqf@plt>
movss  0xe08(%rip),%xmm0
movsd  0xe14(%rip),%xmm1
call   1050 <assertEqf@plt>
xor    %eax,%eax
call   1030 <endTest@plt>
xor    %eax,%eax
pop    %rcx
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 float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store i32 100, i32* %1
store i32 100, i32* %6
store i32 100, i32* %5
store i32 100, i32* %4
store i32 100, i32* %3
store i32 100, i32* %2
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 100
store i32 %14, i32* %2
%15 = load i32, i32* %3
%16 = sub nsw i32 %15, 50
store i32 %16, i32* %3
%17 = load i32, i32* %4
%18 = mul nsw i32 %17, 2
store i32 %18, i32* %4
%19 = load i32, i32* %5
%20 = sdiv i32 %19, 2
store i32 %20, i32* %5
%21 = load i32, i32* %3
%22 = load i32, i32* %6
%23 = add nsw i32 %22, %21
store i32 %23, i32* %6
%24 = load i32, i32* %4
%25 = load i32, i32* %6
%26 = mul nsw i32 %25, %24
store i32 %26, i32* %6
%27 = load i32, i32* %6
%28 = sdiv i32 %27, 100
store i32 %28, i32* %6
%29 = load i32, i32* %6
%30 = sub nsw i32 %29, 200
store i32 %30, i32* %6
%31 = load i32, i32* %1
%32 = call i32 @assertEq(i32 %31, i32 100)
%33 = load i32, i32* %2
%34 = call i32 @assertEq(i32 %33, i32 200)
%35 = load i32, i32* %3
%36 = call i32 @assertEq(i32 %35, i32 50)
%37 = load i32, i32* %4
%38 = call i32 @assertEq(i32 %37, i32 200)
%39 = load i32, i32* %5
%40 = call i32 @assertEq(i32 %39, i32 50)
%41 = load i32, i32* %6
%42 = call i32 @assertEq(i32 %41, i32 100)
store float 5.000000e-01, float* %7
store float 5.000000e-01, float* %12
store float 5.000000e-01, float* %11
store float 5.000000e-01, float* %10
store float 5.000000e-01, float* %9
store float 5.000000e-01, float* %8
%43 = load float, float* %8
%44 = fpext float %43 to double
%45 = fadd double %44, 5.000000e-01
%46 = fptrunc double %45 to float
store float %46, float* %8
%47 = load float, float* %9
%48 = fpext float %47 to double
%49 = fsub double %48, 2.500000e-01
%50 = fptrunc double %49 to float
store float %50, float* %9
%51 = load float, float* %10
%52 = fpext float %51 to double
%53 = fmul double %52, 5.000000e-01
%54 = fptrunc double %53 to float
store float %54, float* %10
%55 = load float, float* %11
%56 = fpext float %55 to double
%57 = fdiv double %56, 5.000000e-01
%58 = fptrunc double %57 to float
store float %58, float* %11
%59 = load float, float* %8
%60 = load float, float* %12
%61 = fadd float %60, %59
store float %61, float* %12
%62 = load float, float* %9
%63 = load float, float* %10
%64 = fadd float %62, %63
%65 = load float, float* %12
%66 = fsub float %65, %64
store float %66, float* %12
%67 = load float, float* %8
%68 = load float, float* %10
%69 = fsub float %67, %68
%70 = load float, float* %9
%71 = fdiv float %69, %70
%72 = load float, float* %12
%73 = fmul float %72, %71
store float %73, float* %12
%74 = load float, float* %11
%75 = fpext float %74 to double
%76 = load float, float* %10
%77 = fpext float %76 to double
%78 = call double @llvm.fmuladd.f64(double %77, double 4.000000e+00, double %75)
%79 = load float, float* %8
%80 = fpext float %79 to double
%81 = fadd double %78, %80
%82 = load float, float* %12
%83 = fpext float %82 to double
%84 = fdiv double %83, %81
%85 = fptrunc double %84 to float
store float %85, float* %12
%86 = load float, float* %7
%87 = call i32 @assertEqf(float %86, double 5.000000e-01)
%88 = load float, float* %8
%89 = call i32 @assertEqf(float %88, double 1.000000e+00)
%90 = load float, float* %9
%91 = call i32 @assertEqf(float %90, double 2.500000e-01)
%92 = load float, float* %10
%93 = call i32 @assertEqf(float %92, double 2.500000e-01)
%94 = load float, float* %11
%95 = call i32 @assertEqf(float %94, double 1.000000e+00)
%96 = load float, float* %12
%97 = call i32 @assertEqf(float %96, double 1.000000e+00)
%98 = call i32 (...) @endTest()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assertEq(i32 100, i32 100)
%2 = tail call i32 @assertEq(i32 200, i32 200)
%3 = tail call i32 @assertEq(i32 50, i32 50)
%4 = tail call i32 @assertEq(i32 200, i32 200)
%5 = tail call i32 @assertEq(i32 50, i32 50)
%6 = tail call i32 @assertEq(i32 100, i32 100)
%7 = tail call i32 @assertEqf(float 5.000000e-01, double 5.000000e-01)
%8 = tail call i32 @assertEqf(float 1.000000e+00, double 1.000000e+00)
%9 = tail call i32 @assertEqf(float 2.500000e-01, double 2.500000e-01)
%10 = tail call i32 @assertEqf(float 2.500000e-01, double 2.500000e-01)
%11 = tail call i32 @assertEqf(float 1.000000e+00, double 1.000000e+00)
%12 = tail call i32 @assertEqf(float 1.000000e+00, double 1.000000e+00)
%13 = tail call i32 (...) @endTest()
ret i32 0
}