#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*/ __print_int(int);
int main() {
  int a;
  int b;
  a = 4;
  b = ++a;
  __print_int(a);
  __print_int(b);
  ++a;
  b = ++a;
  __print_int(a);
  __print_int(b);
  a = -2;
  b = --a;
  __print_int(a);
  __print_int(b);
  --a;
  b = --a;
  __print_int(a);
  __print_int(b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <__print_int@plt>
mov    -0xc(%rbp),%edi
call   1030 <__print_int@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <__print_int@plt>
mov    -0xc(%rbp),%edi
call   1030 <__print_int@plt>
movl   $0xfffffffe,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <__print_int@plt>
mov    -0xc(%rbp),%edi
call   1030 <__print_int@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <__print_int@plt>
mov    -0xc(%rbp),%edi
call   1030 <__print_int@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <__print_int@plt>
mov    $0x5,%edi
call   1030 <__print_int@plt>
mov    $0x7,%edi
call   1030 <__print_int@plt>
mov    $0x7,%edi
call   1030 <__print_int@plt>
mov    $0xfffffffd,%edi
call   1030 <__print_int@plt>
mov    $0xfffffffd,%edi
call   1030 <__print_int@plt>
mov    $0xfffffffb,%edi
call   1030 <__print_int@plt>
mov    $0xfffffffb,%edi
call   1030 <__print_int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 4, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
store i32 %5, i32* %2
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = call i32 @__print_int(i32 %6)
%8 = load i32, i32* %3
%9 = call i32 @__print_int(i32 %8)
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
store i32 %13, i32* %3
%14 = load i32, i32* %2
%15 = call i32 @__print_int(i32 %14)
%16 = load i32, i32* %3
%17 = call i32 @__print_int(i32 %16)
store i32 -2, i32* %2
%18 = load i32, i32* %2
%19 = add nsw i32 %18, -1
store i32 %19, i32* %2
store i32 %19, i32* %3
%20 = load i32, i32* %2
%21 = call i32 @__print_int(i32 %20)
%22 = load i32, i32* %3
%23 = call i32 @__print_int(i32 %22)
%24 = load i32, i32* %2
%25 = add nsw i32 %24, -1
store i32 %25, i32* %2
%26 = load i32, i32* %2
%27 = add nsw i32 %26, -1
store i32 %27, i32* %2
store i32 %27, i32* %3
%28 = load i32, i32* %2
%29 = call i32 @__print_int(i32 %28)
%30 = load i32, i32* %3
%31 = call i32 @__print_int(i32 %30)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__print_int(i32 5)
%2 = tail call i32 @__print_int(i32 5)
%3 = tail call i32 @__print_int(i32 7)
%4 = tail call i32 @__print_int(i32 7)
%5 = tail call i32 @__print_int(i32 -3)
%6 = tail call i32 @__print_int(i32 -3)
%7 = tail call i32 @__print_int(i32 -5)
%8 = tail call i32 @__print_int(i32 -5)
ret i32 0
}