#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 *, double);
int main() {
  int a;
  int b;
  double c;
  a = 3;
  b = 6;
  c = 1.2;
  printf("a=%d\n", a);
  printf("b=%d\n", b);
  printf("a+b=%d\n", a + b);
  printf("a-b=%d\n", a - b);
  printf("a/b=%d\n", a / b);
  printf("a*b=%d\n", a * b);
  printf("c=%lf\n", c);
  printf("b=%d\n", b);
  printf("c+b=%lf\n", c + b);
  printf("c-b=%lf\n", c - b);
  printf("c/b=%lf\n", c / b);
  printf("c*b=%lf\n", c * b);
  return 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x6,-0xc(%rbp)
movsd  0xecb(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
cvtsi2sdl -0xc(%rbp),%xmm0
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cvtsi2sd %eax,%xmm0
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
lea    0xe75(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
cvtsi2sdl -0xc(%rbp),%xmm0
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
addsd  %xmm1,%xmm0
lea    0xe48(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
subsd  %xmm1,%xmm0
lea    0xe37(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
lea    0xe26(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
mulsd  %xmm1,%xmm0
lea    0xe15(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf38(%rip),%rdi
movsd  0xee0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf44(%rip),%rbx
movsd  0xed4(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf13(%rip),%rdi
movsd  0xec5(%rip),%xmm0
call   1030 <printf@plt>
lea    0xf07(%rip),%rdi
movsd  0xeb9(%rip),%xmm0
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
xorps  %xmm0,%xmm0
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
movsd  0xe9e(%rip),%xmm0
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
movsd  0xe92(%rip),%xmm0
call   1030 <printf@plt>
mov    %rbx,%rdi
movsd  0xe62(%rip),%xmm0
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
movsd  0xe76(%rip),%xmm0
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
movsd  0xe6a(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeb5(%rip),%rdi
movsd  0xe5e(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeaa(%rip),%rdi
movsd  0xe52(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"a=%d\0A\00"
@.str.1 = [6 x i8] c"b=%d\0A\00"
@.str.2 = [8 x i8] c"a+b=%d\0A\00"
@.str.3 = [8 x i8] c"a-b=%d\0A\00"
@.str.4 = [8 x i8] c"a/b=%d\0A\00"
@.str.5 = [8 x i8] c"a*b=%d\0A\00"
@.str.6 = [7 x i8] c"c=%lf\0A\00"
@.str.7 = [9 x i8] c"c+b=%lf\0A\00"
@.str.8 = [9 x i8] c"c-b=%lf\0A\00"
@.str.9 = [9 x i8] c"c/b=%lf\0A\00"
@.str.10 = [9 x i8] c"c*b=%lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
store i32 0, i32* %1
store i32 3, i32* %2
store i32 6, i32* %3
store double 1.200000e+00, double* %4
%5 = load i32, i32* %2
%6 = sitofp i32 %5 to double
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %6)
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to double
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %9)
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = add nsw i32 %11, %12
%14 = sitofp i32 %13 to double
%15 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double %14)
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = sub nsw i32 %16, %17
%19 = sitofp i32 %18 to double
%20 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double %19)
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = sdiv i32 %21, %22
%24 = sitofp i32 %23 to double
%25 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), double %24)
%26 = load i32, i32* %2
%27 = load i32, i32* %3
%28 = mul nsw i32 %26, %27
%29 = sitofp i32 %28 to double
%30 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), double %29)
%31 = load double, double* %4
%32 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %31)
%33 = load i32, i32* %3
%34 = sitofp i32 %33 to double
%35 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %34)
%36 = load double, double* %4
%37 = load i32, i32* %3
%38 = sitofp i32 %37 to double
%39 = fadd double %36, %38
%40 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), double %39)
%41 = load double, double* %4
%42 = load i32, i32* %3
%43 = sitofp i32 %42 to double
%44 = fsub double %41, %43
%45 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), double %44)
%46 = load double, double* %4
%47 = load i32, i32* %3
%48 = sitofp i32 %47 to double
%49 = fdiv double %46, %48
%50 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double %49)
%51 = load double, double* %4
%52 = load i32, i32* %3
%53 = sitofp i32 %52 to double
%54 = fmul double %51, %53
%55 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), double %54)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"a=%d\0A\00"
@.str.1 = [6 x i8] c"b=%d\0A\00"
@.str.2 = [8 x i8] c"a+b=%d\0A\00"
@.str.3 = [8 x i8] c"a-b=%d\0A\00"
@.str.4 = [8 x i8] c"a/b=%d\0A\00"
@.str.5 = [8 x i8] c"a*b=%d\0A\00"
@.str.6 = [7 x i8] c"c=%lf\0A\00"
@.str.7 = [9 x i8] c"c+b=%lf\0A\00"
@.str.8 = [9 x i8] c"c-b=%lf\0A\00"
@.str.9 = [9 x i8] c"c/b=%lf\0A\00"
@.str.10 = [9 x i8] c"c*b=%lf\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double 3.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 6.000000e+00)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double 9.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double -3.000000e+00)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), double 0.000000e+00)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), double 1.800000e+01)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double 1.200000e+00)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 6.000000e+00)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), double 7.200000e+00)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), double -4.800000e+00)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double 0x3FC9999999999999)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), double 0x401CCCCCCCCCCCCC)
ret i32 0
}