#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 f(int, int);
int /*<<< orphan*/ printf(char *, int, ...);
int main() {
  int j = 0;
  int k = 0;
  printf("j++ gives: %d\n", j++);
  j = 0;
  j = j++;
  printf("value of j after j = j++ is: %d\n", j);
  j = 0;
  printf("++j gives: %d\n", ++j);
  j = 0;
  j = ++j;
  printf("value of j after j = ++j is: %d\n", j);
  j = 0;
  printf("j++ + j++ gives: %d\n", j++ + j++);
  j = 0;
  j = j++ + j++;
  printf("value of j after j = j++ + j++ is: %d\n", j);
  j = 0;
  printf("++j + ++j gives: %d\n", ++j + ++j);
  j = 0;
  j = ++j + ++j;
  printf("value of j after j = ++j + ++j is: %d\n", j);
  j = 0;
  printf("j++ + ++j gives: %d\n", j++ + ++j);
  j = 0;
  j = j++ + ++j;
  printf("value of j after j = j++ + ++j is: %d\n", j);
  j = 0;
  printf("++j + j++ gives: %d\n", ++j + j++);
  j = 0;
  j = ++j + j++;
  printf("value of j after j = ++j + j++ is: %d\n", j);
  k = 0;
  printf("value of f(++k, ++k) is: %d (k = %d)\n", f(++k, ++k), k);
  k = 0;
  k = f(++k, ++k);
  printf("value of k after k = f(++k, ++k) is: %d\n", k);
  k = 0;
  printf("value of f(k++, k++) is: %d (k = %d)\n", f(k++, k++), k);
  k = 0;
  k = f(k++, k++);
  printf("value of k after k = f(k++, k++) is: %d\n", k);
  k = 0;
  printf("value of f(k++, ++k) is: %d (k = %d)\n", f(k++, ++k), k);
  k = 0;
  k = f(k++, ++k);
  printf("value of k after k = f(k++, ++k) is: %d\n", k);
  k = 0;
  printf("value of f(++k, k++) is: %d (k = %d)\n", f(++k, k++), k);
  k = 0;
  k = f(++k, k++);
  printf("value of k after k = f(++k, k++) is: %d\n", k);
  k = 0;
  printf("For k = %d, value of f(++k, k++) is: %d \n", k, f(++k, k++));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xf00(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x4(%rbp)
lea    0xf34(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
add    %eax,%esi
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe47(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
add    %eax,%esi
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe2b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
add    %eax,%esi
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe0b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
add    %eax,%esi
lea    0xe07(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xdeb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x8(%rbp)
call   1030 <f@plt>
mov    %eax,%esi
mov    -0x8(%rbp),%edx
lea    0xde1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x8(%rbp)
call   1030 <f@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xdd5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <f@plt>
mov    %eax,%esi
mov    -0x8(%rbp),%edx
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <f@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xdb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x8(%rbp)
call   1030 <f@plt>
mov    %eax,%esi
mov    -0x8(%rbp),%edx
lea    0xdaf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x8(%rbp)
call   1030 <f@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xda1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <f@plt>
mov    %eax,%esi
mov    -0x8(%rbp),%edx
lea    0xd97(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <f@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xd89(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
call   1030 <f@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xd79(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf20(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec8(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf78(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed6(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeea(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeec(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf00(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf02(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf16(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf18(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <f@plt>
lea    0xf1d(%rip),%rdi
mov    %eax,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <f@plt>
lea    0xf1f(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <f@plt>
lea    0xf2c(%rip),%rdi
mov    %eax,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <f@plt>
lea    0xf31(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
mov    $0x2,%esi
call   1030 <f@plt>
lea    0xf3e(%rip),%rdi
mov    %eax,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
mov    $0x2,%esi
call   1030 <f@plt>
lea    0xf43(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <f@plt>
lea    0xf4d(%rip),%rdi
mov    %eax,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <f@plt>
lea    0xf4f(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <f@plt>
lea    0xf59(%rip),%rdi
xor    %esi,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"j++ gives: %d\0A\00"
@.str.1 = [33 x i8] c"value of j after j = j++ is: %d\0A\00"
@.str.2 = [15 x i8] c"++j gives: %d\0A\00"
@.str.3 = [33 x i8] c"value of j after j = ++j is: %d\0A\00"
@.str.4 = [21 x i8] c"j++ + j++ gives: %d\0A\00"
@.str.5 = [39 x i8] c"value of j after j = j++ + j++ is: %d\0A\00"
@.str.6 = [21 x i8] c"++j + ++j gives: %d\0A\00"
@.str.7 = [39 x i8] c"value of j after j = ++j + ++j is: %d\0A\00"
@.str.8 = [21 x i8] c"j++ + ++j gives: %d\0A\00"
@.str.9 = [39 x i8] c"value of j after j = j++ + ++j is: %d\0A\00"
@.str.10 = [21 x i8] c"++j + j++ gives: %d\0A\00"
@.str.11 = [39 x i8] c"value of j after j = ++j + j++ is: %d\0A\00"
@.str.12 = [38 x i8] c"value of f(++k, ++k) is: %d (k = %d)\0A\00"
@.str.13 = [41 x i8] c"value of k after k = f(++k, ++k) is: %d\0A\00"
@.str.14 = [38 x i8] c"value of f(k++, k++) is: %d (k = %d)\0A\00"
@.str.15 = [41 x i8] c"value of k after k = f(k++, k++) is: %d\0A\00"
@.str.16 = [38 x i8] c"value of f(k++, ++k) is: %d (k = %d)\0A\00"
@.str.17 = [41 x i8] c"value of k after k = f(k++, ++k) is: %d\0A\00"
@.str.18 = [38 x i8] c"value of f(++k, k++) is: %d (k = %d)\0A\00"
@.str.19 = [41 x i8] c"value of k after k = f(++k, k++) is: %d\0A\00"
@.str.20 = [42 x i8] c"For k = %d, value of f(++k, k++) is: %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %1
%4 = add nsw i32 %3, 1
store i32 %4, i32* %1
%5 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
store i32 0, i32* %1
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
store i32 %6, i32* %1
%8 = load i32, i32* %1
%9 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %8)
store i32 0, i32* %1
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
%12 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %11)
store i32 0, i32* %1
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
store i32 %14, i32* %1
%15 = load i32, i32* %1
%16 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 %15)
store i32 0, i32* %1
%17 = load i32, i32* %1
%18 = add nsw i32 %17, 1
store i32 %18, i32* %1
%19 = load i32, i32* %1
%20 = add nsw i32 %19, 1
store i32 %20, i32* %1
%21 = add nsw i32 %17, %19
%22 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %21)
store i32 0, i32* %1
%23 = load i32, i32* %1
%24 = add nsw i32 %23, 1
store i32 %24, i32* %1
%25 = load i32, i32* %1
%26 = add nsw i32 %25, 1
store i32 %26, i32* %1
%27 = add nsw i32 %23, %25
store i32 %27, i32* %1
%28 = load i32, i32* %1
%29 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i32 %28)
store i32 0, i32* %1
%30 = load i32, i32* %1
%31 = add nsw i32 %30, 1
store i32 %31, i32* %1
%32 = load i32, i32* %1
%33 = add nsw i32 %32, 1
store i32 %33, i32* %1
%34 = add nsw i32 %31, %33
%35 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i32 %34)
store i32 0, i32* %1
%36 = load i32, i32* %1
%37 = add nsw i32 %36, 1
store i32 %37, i32* %1
%38 = load i32, i32* %1
%39 = add nsw i32 %38, 1
store i32 %39, i32* %1
%40 = add nsw i32 %37, %39
store i32 %40, i32* %1
%41 = load i32, i32* %1
%42 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0), i32 %41)
store i32 0, i32* %1
%43 = load i32, i32* %1
%44 = add nsw i32 %43, 1
store i32 %44, i32* %1
%45 = load i32, i32* %1
%46 = add nsw i32 %45, 1
store i32 %46, i32* %1
%47 = add nsw i32 %43, %46
%48 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), i32 %47)
store i32 0, i32* %1
%49 = load i32, i32* %1
%50 = add nsw i32 %49, 1
store i32 %50, i32* %1
%51 = load i32, i32* %1
%52 = add nsw i32 %51, 1
store i32 %52, i32* %1
%53 = add nsw i32 %49, %52
store i32 %53, i32* %1
%54 = load i32, i32* %1
%55 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0), i32 %54)
store i32 0, i32* %1
%56 = load i32, i32* %1
%57 = add nsw i32 %56, 1
store i32 %57, i32* %1
%58 = load i32, i32* %1
%59 = add nsw i32 %58, 1
store i32 %59, i32* %1
%60 = add nsw i32 %57, %58
%61 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0), i32 %60)
store i32 0, i32* %1
%62 = load i32, i32* %1
%63 = add nsw i32 %62, 1
store i32 %63, i32* %1
%64 = load i32, i32* %1
%65 = add nsw i32 %64, 1
store i32 %65, i32* %1
%66 = add nsw i32 %63, %64
store i32 %66, i32* %1
%67 = load i32, i32* %1
%68 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.11, i64 0, i64 0), i32 %67)
store i32 0, i32* %2
%69 = load i32, i32* %2
%70 = add nsw i32 %69, 1
store i32 %70, i32* %2
%71 = load i32, i32* %2
%72 = add nsw i32 %71, 1
store i32 %72, i32* %2
%73 = call i32 @f(i32 %70, i32 %72)
%74 = load i32, i32* %2
%75 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.12, i64 0, i64 0), i32 %73, i32 %74)
store i32 0, i32* %2
%76 = load i32, i32* %2
%77 = add nsw i32 %76, 1
store i32 %77, i32* %2
%78 = load i32, i32* %2
%79 = add nsw i32 %78, 1
store i32 %79, i32* %2
%80 = call i32 @f(i32 %77, i32 %79)
store i32 %80, i32* %2
%81 = load i32, i32* %2
%82 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.13, i64 0, i64 0), i32 %81)
store i32 0, i32* %2
%83 = load i32, i32* %2
%84 = add nsw i32 %83, 1
store i32 %84, i32* %2
%85 = load i32, i32* %2
%86 = add nsw i32 %85, 1
store i32 %86, i32* %2
%87 = call i32 @f(i32 %83, i32 %85)
%88 = load i32, i32* %2
%89 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.14, i64 0, i64 0), i32 %87, i32 %88)
store i32 0, i32* %2
%90 = load i32, i32* %2
%91 = add nsw i32 %90, 1
store i32 %91, i32* %2
%92 = load i32, i32* %2
%93 = add nsw i32 %92, 1
store i32 %93, i32* %2
%94 = call i32 @f(i32 %90, i32 %92)
store i32 %94, i32* %2
%95 = load i32, i32* %2
%96 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.15, i64 0, i64 0), i32 %95)
store i32 0, i32* %2
%97 = load i32, i32* %2
%98 = add nsw i32 %97, 1
store i32 %98, i32* %2
%99 = load i32, i32* %2
%100 = add nsw i32 %99, 1
store i32 %100, i32* %2
%101 = call i32 @f(i32 %97, i32 %100)
%102 = load i32, i32* %2
%103 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.16, i64 0, i64 0), i32 %101, i32 %102)
store i32 0, i32* %2
%104 = load i32, i32* %2
%105 = add nsw i32 %104, 1
store i32 %105, i32* %2
%106 = load i32, i32* %2
%107 = add nsw i32 %106, 1
store i32 %107, i32* %2
%108 = call i32 @f(i32 %104, i32 %107)
store i32 %108, i32* %2
%109 = load i32, i32* %2
%110 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.17, i64 0, i64 0), i32 %109)
store i32 0, i32* %2
%111 = load i32, i32* %2
%112 = add nsw i32 %111, 1
store i32 %112, i32* %2
%113 = load i32, i32* %2
%114 = add nsw i32 %113, 1
store i32 %114, i32* %2
%115 = call i32 @f(i32 %112, i32 %113)
%116 = load i32, i32* %2
%117 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.18, i64 0, i64 0), i32 %115, i32 %116)
store i32 0, i32* %2
%118 = load i32, i32* %2
%119 = add nsw i32 %118, 1
store i32 %119, i32* %2
%120 = load i32, i32* %2
%121 = add nsw i32 %120, 1
store i32 %121, i32* %2
%122 = call i32 @f(i32 %119, i32 %120)
store i32 %122, i32* %2
%123 = load i32, i32* %2
%124 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.19, i64 0, i64 0), i32 %123)
store i32 0, i32* %2
%125 = load i32, i32* %2
%126 = load i32, i32* %2
%127 = add nsw i32 %126, 1
store i32 %127, i32* %2
%128 = load i32, i32* %2
%129 = add nsw i32 %128, 1
store i32 %129, i32* %2
%130 = call i32 @f(i32 %127, i32 %128)
%131 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.20, i64 0, i64 0), i32 %125, i32 %130)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"j++ gives: %d\0A\00"
@.str.1 = [33 x i8] c"value of j after j = j++ is: %d\0A\00"
@.str.2 = [15 x i8] c"++j gives: %d\0A\00"
@.str.3 = [33 x i8] c"value of j after j = ++j is: %d\0A\00"
@.str.4 = [21 x i8] c"j++ + j++ gives: %d\0A\00"
@.str.5 = [39 x i8] c"value of j after j = j++ + j++ is: %d\0A\00"
@.str.6 = [21 x i8] c"++j + ++j gives: %d\0A\00"
@.str.7 = [39 x i8] c"value of j after j = ++j + ++j is: %d\0A\00"
@.str.8 = [21 x i8] c"j++ + ++j gives: %d\0A\00"
@.str.9 = [39 x i8] c"value of j after j = j++ + ++j is: %d\0A\00"
@.str.10 = [21 x i8] c"++j + j++ gives: %d\0A\00"
@.str.11 = [39 x i8] c"value of j after j = ++j + j++ is: %d\0A\00"
@.str.12 = [38 x i8] c"value of f(++k, ++k) is: %d (k = %d)\0A\00"
@.str.13 = [41 x i8] c"value of k after k = f(++k, ++k) is: %d\0A\00"
@.str.14 = [38 x i8] c"value of f(k++, k++) is: %d (k = %d)\0A\00"
@.str.15 = [41 x i8] c"value of k after k = f(k++, k++) is: %d\0A\00"
@.str.16 = [38 x i8] c"value of f(k++, ++k) is: %d (k = %d)\0A\00"
@.str.17 = [41 x i8] c"value of k after k = f(k++, ++k) is: %d\0A\00"
@.str.18 = [38 x i8] c"value of f(++k, k++) is: %d (k = %d)\0A\00"
@.str.19 = [41 x i8] c"value of k after k = f(++k, k++) is: %d\0A\00"
@.str.20 = [42 x i8] c"For k = %d, value of f(++k, k++) is: %d \0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 0)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 1)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 1)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 1)
%6 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i32 1)
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i32 3)
%8 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0), i32 3)
%9 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), i32 2)
%10 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0), i32 2)
%11 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0), i32 2)
%12 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.11, i64 0, i64 0), i32 2)
%13 = tail call i32 @f(i32 1, i32 2)
%14 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.12, i64 0, i64 0), i32 %13, i32 2)
%15 = tail call i32 @f(i32 1, i32 2)
%16 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.13, i64 0, i64 0), i32 %15)
%17 = tail call i32 @f(i32 0, i32 1)
%18 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.14, i64 0, i64 0), i32 %17, i32 2)
%19 = tail call i32 @f(i32 0, i32 1)
%20 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.15, i64 0, i64 0), i32 %19)
%21 = tail call i32 @f(i32 0, i32 2)
%22 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.16, i64 0, i64 0), i32 %21, i32 2)
%23 = tail call i32 @f(i32 0, i32 2)
%24 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.17, i64 0, i64 0), i32 %23)
%25 = tail call i32 @f(i32 1, i32 1)
%26 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.18, i64 0, i64 0), i32 %25, i32 2)
%27 = tail call i32 @f(i32 1, i32 1)
%28 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.19, i64 0, i64 0), i32 %27)
%29 = tail call i32 @f(i32 1, i32 1)
%30 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.20, i64 0, i64 0), i32 0, i32 %29)
ret i32 0
}