#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 *, char, char);
int main(void) {
  int x = 10, y, z;
  float m = 10.02, n, o;
  char ch = 'a', ch1, ch2;
  y = x++;
  z = ++x;
  n = m++;
  o = ++m;
  ch1 = ch++;
  ch2 = ++ch;
  printf("integer post increment: %d and pre increment: %d\n", y, z);
  printf("floating point post increment: %f and pre increment: %f\n", n, o);
  printf("character post increment: %c and pre increment: %c\n", ch1, ch2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x412051ec,-0x14(%rbp)
movb   $0x61,-0x1d(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0x10(%rbp)
movss  -0x14(%rbp),%xmm0
movss  0xea8(%rip),%xmm1
movaps %xmm0,%xmm2
addss  %xmm1,%xmm2
movss  %xmm2,-0x14(%rbp)
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  %xmm0,-0x1c(%rbp)
mov    -0x1d(%rbp),%al
mov    %al,%cl
add    $0x1,%cl
mov    %cl,-0x1d(%rbp)
mov    %al,-0x1e(%rbp)
mov    -0x1d(%rbp),%al
add    $0x1,%al
mov    %al,-0x1d(%rbp)
mov    %al,-0x1f(%rbp)
movsbl -0xc(%rbp),%esi
movsbl -0x10(%rbp),%edx
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
cvttss2si -0x18(%rbp),%eax
mov    %al,%cl
movss  -0x1c(%rbp),%xmm0
cvttss2si %xmm0,%eax
lea    0xe76(%rip),%rdi
movsbl %cl,%esi
movsbl %al,%edx
call   1030 <printf@plt>
mov    -0x1e(%rbp),%al
lea    0xe9a(%rip),%rdi
movsbl %al,%esi
movsbl -0x1f(%rbp),%edx
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    $0xa,%esi
mov    $0xc,%edx
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
mov    $0xa,%esi
mov    $0xc,%edx
call   1030 <printf@plt>
lea    0xf27(%rip),%rdi
mov    $0x61,%esi
mov    $0x63,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"integer post increment: %d and pre increment: %d\0A\00"
@.str.1 = [57 x i8] c"floating point post increment: %f and pre increment: %f\0A\00"
@.str.2 = [52 x i8] c"character post increment: %c and pre increment: %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i32 0, i32* %1
store i32 10, i32* %2
store float 0x40240A3D80000000, float* %5
store i8 97, i8* %8
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
store i32 %11, i32* %3
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
store i32 %14, i32* %4
%15 = load float, float* %5
%16 = fadd float %15, 1.000000e+00
store float %16, float* %5
store float %15, float* %6
%17 = load float, float* %5
%18 = fadd float %17, 1.000000e+00
store float %18, float* %5
store float %18, float* %7
%19 = load i8, i8* %8
%20 = add i8 %19, 1
store i8 %20, i8* %8
store i8 %19, i8* %9
%21 = load i8, i8* %8
%22 = add i8 %21, 1
store i8 %22, i8* %8
store i8 %22, i8* %10
%23 = load i32, i32* %3
%24 = trunc i32 %23 to i8
%25 = load i32, i32* %4
%26 = trunc i32 %25 to i8
%27 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8 signext %24, i8 signext %26)
%28 = load float, float* %6
%29 = fptosi float %28 to i8
%30 = load float, float* %7
%31 = fptosi float %30 to i8
%32 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0), i8 signext %29, i8 signext %31)
%33 = load i8, i8* %9
%34 = load i8, i8* %10
%35 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0), i8 signext %33, i8 signext %34)
ret i32 0
}

LLVM IR (-O2):
@.str = [50 x i8] c"integer post increment: %d and pre increment: %d\0A\00"
@.str.1 = [57 x i8] c"floating point post increment: %f and pre increment: %f\0A\00"
@.str.2 = [52 x i8] c"character post increment: %c and pre increment: %c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8 signext 10, i8 signext 12)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0), i8 signext 10, i8 signext 12)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0), i8 signext 97, i8 signext 99)
ret i32 0
}