#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 main() {
  int a = 1, b = 2, c, d, e, g;
  float f = 9.9999;
  c = ++a;
  printf("The value of c=%d and a=%d.\n", c, a);
  d = b++;
  printf("The value of d=%d and b=%d.\n", d, b);
  e = (int)f;
  printf("The value of f=%.2f and e=%d.\n", f, e);
  g = 'A';
  printf("The value of g=%d and g=%c.\n", g, g);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movss  0xecb(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
cvttss2si -0x20(%rbp),%eax
mov    %eax,-0x18(%rbp)
cvttss2si -0x20(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
movl   $0x41,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xeb5(%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    $0x2,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0x9,%esi
mov    $0x9,%edx
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
mov    $0x41,%esi
mov    $0x41,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"The value of c=%d and a=%d.\0A\00"
@.str.1 = [29 x i8] c"The value of d=%d and b=%d.\0A\00"
@.str.2 = [31 x i8] c"The value of f=%.2f and e=%d.\0A\00"
@.str.3 = [29 x i8] c"The value of g=%d and g=%c.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca float
store i32 0, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
store float 0x4023FFF2E0000000, float* %8
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = load i32, i32* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12)
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
store i32 %14, i32* %5
%16 = load i32, i32* %5
%17 = load i32, i32* %3
%18 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %16, i32 %17)
%19 = load float, float* %8
%20 = fptosi float %19 to i32
store i32 %20, i32* %6
%21 = load float, float* %8
%22 = fptosi float %21 to i32
%23 = load i32, i32* %6
%24 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %22, i32 %23)
store i32 65, i32* %7
%25 = load i32, i32* %7
%26 = load i32, i32* %7
%27 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 %25, i32 %26)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"The value of c=%d and a=%d.\0A\00"
@.str.1 = [29 x i8] c"The value of d=%d and b=%d.\0A\00"
@.str.2 = [31 x i8] c"The value of f=%.2f and e=%d.\0A\00"
@.str.3 = [29 x i8] c"The value of g=%d and g=%c.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 2, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 3)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 9, i32 9)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 65, i32 65)
ret i32 0
}