#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*/ expecti(int, int);
void test() {
  int i = 0;
  i += 5;
  expecti(i, 5);
  i -= 4;
  expecti(i, 1);
  i *= 100;
  expecti(i, 100);
  i /= 2;
  expecti(i, 50);
  i %= 6;
  expecti(i, 2);
  i &= 1;
  expecti(i, 0);
  i |= 8;
  expecti(i, 8);
  i ^= 2;
  expecti(i, 10);
  i <<= 2;
  expecti(i, 40);
  i >>= 2;
  expecti(i, 10);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x5,%esi
call   1030 <expecti@plt>
mov    -0x4(%rbp),%eax
sub    $0x4,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <expecti@plt>
imul   $0x64,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x64,%esi
call   1030 <expecti@plt>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x32,%esi
call   1030 <expecti@plt>
mov    -0x4(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1030 <expecti@plt>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <expecti@plt>
mov    -0x4(%rbp),%eax
or     $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1030 <expecti@plt>
mov    -0x4(%rbp),%eax
xor    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xa,%esi
call   1030 <expecti@plt>
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x28,%esi
call   1030 <expecti@plt>
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xa,%esi
call   1030 <expecti@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    $0x5,%edi
mov    $0x5,%esi
call   1030 <expecti@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <expecti@plt>
mov    $0x64,%edi
mov    $0x64,%esi
call   1030 <expecti@plt>
mov    $0x32,%edi
mov    $0x32,%esi
call   1030 <expecti@plt>
mov    $0x2,%edi
mov    $0x2,%esi
call   1030 <expecti@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1030 <expecti@plt>
mov    $0x8,%edi
mov    $0x8,%esi
call   1030 <expecti@plt>
mov    $0xa,%edi
mov    $0xa,%esi
call   1030 <expecti@plt>
mov    $0x28,%edi
mov    $0x28,%esi
call   1030 <expecti@plt>
mov    $0xa,%edi
mov    $0xa,%esi
pop    %rax
jmp    1030 <expecti@plt>

LLVM IR (-O0):
define void @test() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 5
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 @expecti(i32 %4, i32 5)
%6 = load i32, i32* %1
%7 = sub nsw i32 %6, 4
store i32 %7, i32* %1
%8 = load i32, i32* %1
%9 = call i32 @expecti(i32 %8, i32 1)
%10 = load i32, i32* %1
%11 = mul nsw i32 %10, 100
store i32 %11, i32* %1
%12 = load i32, i32* %1
%13 = call i32 @expecti(i32 %12, i32 100)
%14 = load i32, i32* %1
%15 = sdiv i32 %14, 2
store i32 %15, i32* %1
%16 = load i32, i32* %1
%17 = call i32 @expecti(i32 %16, i32 50)
%18 = load i32, i32* %1
%19 = srem i32 %18, 6
store i32 %19, i32* %1
%20 = load i32, i32* %1
%21 = call i32 @expecti(i32 %20, i32 2)
%22 = load i32, i32* %1
%23 = and i32 %22, 1
store i32 %23, i32* %1
%24 = load i32, i32* %1
%25 = call i32 @expecti(i32 %24, i32 0)
%26 = load i32, i32* %1
%27 = or i32 %26, 8
store i32 %27, i32* %1
%28 = load i32, i32* %1
%29 = call i32 @expecti(i32 %28, i32 8)
%30 = load i32, i32* %1
%31 = xor i32 %30, 2
store i32 %31, i32* %1
%32 = load i32, i32* %1
%33 = call i32 @expecti(i32 %32, i32 10)
%34 = load i32, i32* %1
%35 = shl i32 %34, 2
store i32 %35, i32* %1
%36 = load i32, i32* %1
%37 = call i32 @expecti(i32 %36, i32 40)
%38 = load i32, i32* %1
%39 = ashr i32 %38, 2
store i32 %39, i32* %1
%40 = load i32, i32* %1
%41 = call i32 @expecti(i32 %40, i32 10)
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 @expecti(i32 5, i32 5)
%2 = tail call i32 @expecti(i32 1, i32 1)
%3 = tail call i32 @expecti(i32 100, i32 100)
%4 = tail call i32 @expecti(i32 50, i32 50)
%5 = tail call i32 @expecti(i32 2, i32 2)
%6 = tail call i32 @expecti(i32 0, i32 0)
%7 = tail call i32 @expecti(i32 8, i32 8)
%8 = tail call i32 @expecti(i32 10, i32 10)
%9 = tail call i32 @expecti(i32 40, i32 40)
%10 = tail call i32 @expecti(i32 10, i32 10)
ret void
}