#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*/ printf(char *, int, int, int);
int main(void) {
  int t = 3;
  int p = -5;
  int q = 1;
  int m = (q * p + (t * t) - (t + q)) - 2;
  int n = (q * p + (t * ++t) - (t + q)) - 2;
  t = 3;
  int o = (q * p + (t * t++) - (t + q)) - 2;
  printf("%d, %d, %d", m, n, o);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x3,-0x4(%rbp)
movl   $0xfffffffb,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    %ecx,%eax
mov    -0x4(%rbp),%ecx
add    -0xc(%rbp),%ecx
sub    %ecx,%eax
sub    $0x2,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%edx
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
imul   %edx,%ecx
add    %ecx,%eax
mov    -0x4(%rbp),%ecx
add    -0xc(%rbp),%ecx
sub    %ecx,%eax
sub    $0x2,%eax
mov    %eax,-0x14(%rbp)
movl   $0x3,-0x4(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%edx
mov    %edx,%esi
add    $0x1,%esi
mov    %esi,-0x4(%rbp)
imul   %edx,%ecx
add    %ecx,%eax
mov    -0x4(%rbp),%ecx
add    -0xc(%rbp),%ecx
sub    %ecx,%eax
sub    $0x2,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xe50(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xfffffffe,%esi
xor    %edx,%edx
mov    $0xfffffffd,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%d, %d, %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 3, i32* %1
store i32 -5, i32* %2
store i32 1, i32* %3
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %1
%11 = load i32, i32* %1
%12 = mul nsw i32 %10, %11
%13 = add nsw i32 %9, %12
%14 = load i32, i32* %1
%15 = load i32, i32* %3
%16 = add nsw i32 %14, %15
%17 = sub nsw i32 %13, %16
%18 = sub nsw i32 %17, 2
store i32 %18, i32* %4
%19 = load i32, i32* %3
%20 = load i32, i32* %2
%21 = mul nsw i32 %19, %20
%22 = load i32, i32* %1
%23 = load i32, i32* %1
%24 = add nsw i32 %23, 1
store i32 %24, i32* %1
%25 = mul nsw i32 %22, %24
%26 = add nsw i32 %21, %25
%27 = load i32, i32* %1
%28 = load i32, i32* %3
%29 = add nsw i32 %27, %28
%30 = sub nsw i32 %26, %29
%31 = sub nsw i32 %30, 2
store i32 %31, i32* %5
store i32 3, i32* %1
%32 = load i32, i32* %3
%33 = load i32, i32* %2
%34 = mul nsw i32 %32, %33
%35 = load i32, i32* %1
%36 = load i32, i32* %1
%37 = add nsw i32 %36, 1
store i32 %37, i32* %1
%38 = mul nsw i32 %35, %36
%39 = add nsw i32 %34, %38
%40 = load i32, i32* %1
%41 = load i32, i32* %3
%42 = add nsw i32 %40, %41
%43 = sub nsw i32 %39, %42
%44 = sub nsw i32 %43, 2
store i32 %44, i32* %6
%45 = load i32, i32* %4
%46 = load i32, i32* %5
%47 = load i32, i32* %6
%48 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %45, i32 %46, i32 %47)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%d, %d, %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 -2, i32 0, i32 -3)
ret i32 0
}