#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 = 10, b = 20, c;
  float x = 10.0, y = 20.0, z;
  c = a + b - a * b / a * -a;
  assertEq(c, 230);
  z = x + y - x * y / x * -x;
  assertEqf(z, 230.0);
  360;
  {
    int a = 12345;
    assertEq(a, 12345);
    assertEq(b, 20);
  }
  assertEq(a, 10);
  assertEq(b, 20);
  {
    float x = 5678.9;
    assertEqf(x, 5678.9);
    assertEqf(y, 20.0);
  }
  assertEqf(x, 10.0);
  assertEqf(y, 20.0);
  endTest();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0xa,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
movss  0xeda(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
xor    %edx,%edx
sub    -0x4(%rbp),%edx
imul   %edx,%ecx
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    $0xe6,%esi
call   1040 <assertEq@plt>
movss  -0x10(%rbp),%xmm1
addss  -0x14(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movsd  0xe33(%rip),%xmm1
call   1050 <assertEqf@plt>
movl   $0x3039,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    $0x3039,%esi
call   1040 <assertEq@plt>
mov    -0x8(%rbp),%edi
mov    $0x14,%esi
call   1040 <assertEq@plt>
mov    -0x4(%rbp),%edi
mov    $0xa,%esi
call   1040 <assertEq@plt>
mov    -0x8(%rbp),%edi
mov    $0x14,%esi
call   1040 <assertEq@plt>
movss  0xdf3(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
movsd  0xdd1(%rip),%xmm1
call   1050 <assertEqf@plt>
movss  -0x14(%rbp),%xmm0
movsd  0xdaf(%rip),%xmm1
call   1050 <assertEqf@plt>
movss  -0x10(%rbp),%xmm0
movsd  0xda5(%rip),%xmm1
call   1050 <assertEqf@plt>
movss  -0x14(%rbp),%xmm0
movsd  0xd8b(%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    $0xe6,%edi
mov    $0xe6,%esi
call   1040 <assertEq@plt>
movss  0xeb8(%rip),%xmm0
movsd  0xec0(%rip),%xmm1
call   1050 <assertEqf@plt>
mov    $0x3039,%edi
mov    $0x3039,%esi
call   1040 <assertEq@plt>
mov    $0x14,%edi
mov    $0x14,%esi
call   1040 <assertEq@plt>
mov    $0xa,%edi
mov    $0xa,%esi
call   1040 <assertEq@plt>
mov    $0x14,%edi
mov    $0x14,%esi
call   1040 <assertEq@plt>
movss  0xe6b(%rip),%xmm0
movsd  0xe77(%rip),%xmm1
call   1050 <assertEqf@plt>
movss  0xe5a(%rip),%xmm0
movsd  0xe6a(%rip),%xmm1
call   1050 <assertEqf@plt>
movss  0xe49(%rip),%xmm0
movsd  0xe5d(%rip),%xmm1
call   1050 <assertEqf@plt>
movss  0xe30(%rip),%xmm0
movsd  0xe40(%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 float
%5 = alloca float
%6 = alloca float
%7 = alloca i32
%8 = alloca float
store i32 10, i32* %1
store i32 20, i32* %2
store float 1.000000e+01, float* %4
store float 2.000000e+01, float* %5
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %1
%13 = load i32, i32* %2
%14 = mul nsw i32 %12, %13
%15 = load i32, i32* %1
%16 = sdiv i32 %14, %15
%17 = load i32, i32* %1
%18 = sub nsw i32 0, %17
%19 = mul nsw i32 %16, %18
%20 = sub nsw i32 %11, %19
store i32 %20, i32* %3
%21 = load i32, i32* %3
%22 = call i32 @assertEq(i32 %21, i32 230)
%23 = load float, float* %4
%24 = load float, float* %5
%25 = fadd float %23, %24
%26 = load float, float* %4
%27 = load float, float* %5
%28 = fmul float %26, %27
%29 = load float, float* %4
%30 = fdiv float %28, %29
%31 = load float, float* %4
%32 = fneg float %31
%33 = fneg float %30
%34 = call float @llvm.fmuladd.f32(float %33, float %32, float %25)
store float %34, float* %6
%35 = load float, float* %6
%36 = call i32 @assertEqf(float %35, double 2.300000e+02)
store i32 12345, i32* %7
%37 = load i32, i32* %7
%38 = call i32 @assertEq(i32 %37, i32 12345)
%39 = load i32, i32* %2
%40 = call i32 @assertEq(i32 %39, i32 20)
%41 = load i32, i32* %1
%42 = call i32 @assertEq(i32 %41, i32 10)
%43 = load i32, i32* %2
%44 = call i32 @assertEq(i32 %43, i32 20)
store float 0x40B62EE660000000, float* %8
%45 = load float, float* %8
%46 = call i32 @assertEqf(float %45, double 0x40B62EE666666666)
%47 = load float, float* %5
%48 = call i32 @assertEqf(float %47, double 2.000000e+01)
%49 = load float, float* %4
%50 = call i32 @assertEqf(float %49, double 1.000000e+01)
%51 = load float, float* %5
%52 = call i32 @assertEqf(float %51, double 2.000000e+01)
%53 = call i32 (...) @endTest()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assertEq(i32 230, i32 230)
%2 = tail call i32 @assertEqf(float 2.300000e+02, double 2.300000e+02)
%3 = tail call i32 @assertEq(i32 12345, i32 12345)
%4 = tail call i32 @assertEq(i32 20, i32 20)
%5 = tail call i32 @assertEq(i32 10, i32 10)
%6 = tail call i32 @assertEq(i32 20, i32 20)
%7 = tail call i32 @assertEqf(float 0x40B62EE660000000, double 0x40B62EE666666666)
%8 = tail call i32 @assertEqf(float 2.000000e+01, double 2.000000e+01)
%9 = tail call i32 @assertEqf(float 1.000000e+01, double 1.000000e+01)
%10 = tail call i32 @assertEqf(float 2.000000e+01, double 2.000000e+01)
%11 = tail call i32 (...) @endTest()
ret i32 0
}