#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 *, float);
int main() {
  float a = -2.5;
  float c;
  int d;
  c = a;
  printf("c = %.2f \n", c);
  c += a;
  printf("c = %.2f \n", c);
  c -= a;
  printf("c = %.2f \n", c);
  c *= a;
  printf("c = %.2f \n", c);
  c /= a;
  printf("c = %2.1e \n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xe5e(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xe45(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef4(%rip),%rbx
movss  0xee0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xed4(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
movss  0xebd(%rip),%xmm0
call   1030 <printf@plt>
movss  0xeb8(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
movss  0xe99(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"c = %.2f \0A\00"
@.str.1 = [12 x i8] c"c = %2.1e \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca i32
store i32 0, i32* %1
store float -2.500000e+00, float* %2
%5 = load float, float* %2
store float %5, float* %3
%6 = load float, float* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %6)
%8 = load float, float* %2
%9 = load float, float* %3
%10 = fadd float %9, %8
store float %10, float* %3
%11 = load float, float* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %11)
%13 = load float, float* %2
%14 = load float, float* %3
%15 = fsub float %14, %13
store float %15, float* %3
%16 = load float, float* %3
%17 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %16)
%18 = load float, float* %2
%19 = load float, float* %3
%20 = fmul float %19, %18
store float %20, float* %3
%21 = load float, float* %3
%22 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %21)
%23 = load float, float* %2
%24 = load float, float* %3
%25 = fdiv float %24, %23
store float %25, float* %3
%26 = load float, float* %3
%27 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), float %26)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"c = %.2f \0A\00"
@.str.1 = [12 x i8] c"c = %2.1e \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float -2.500000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float -5.000000e+00)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float -2.500000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float 6.250000e+00)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), float -2.500000e+00)
ret i32 0
}