#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 main(void) {
  int a = 3;
  char b = '%';
  float c = 3.14f;
  double d = 0.11e-1;
  double e;
  printf("%d\n", a / 5);
  printf("%f\n", a / 5.0);
  printf("%f\n", 1. * a / 5);
  e = a / b;
  printf("%f\n", e);
  printf("%f\n", a / c);
  printf("%f\n", d + a / b);
  int t = 40;
  printf("%d\n", t);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movb   $0x25,-0x9(%rbp)
movss  0xee6(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movsd  0xed1(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xe96(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xe7d(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe69(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
movsbl -0x9(%rbp),%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
cvttsd2si -0x20(%rbp),%esi
lea    0xe56(%rip),%rdi
call   1030 <printf@plt>
cvtsi2ssl -0x8(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
cvttss2si %xmm0,%esi
lea    0xe3c(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%eax
movsbl -0x9(%rbp),%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xe15(%rip),%rdi
call   1030 <printf@plt>
movl   $0x28,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xdfb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x28,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca float
%5 = alloca double
%6 = alloca double
%7 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
store i8 37, i8* %3
store float 0x40091EB860000000, float* %4
store double 1.100000e-02, double* %5
%8 = load i32, i32* %2
%9 = sdiv i32 %8, 5
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %2
%12 = sitofp i32 %11 to double
%13 = fdiv double %12, 5.000000e+00
%14 = fptosi double %13 to i32
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %2
%17 = sitofp i32 %16 to double
%18 = fmul double 1.000000e+00, %17
%19 = fdiv double %18, 5.000000e+00
%20 = fptosi double %19 to i32
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %20)
%22 = load i32, i32* %2
%23 = load i8, i8* %3
%24 = sext i8 %23 to i32
%25 = sdiv i32 %22, %24
%26 = sitofp i32 %25 to double
store double %26, double* %6
%27 = load double, double* %6
%28 = fptosi double %27 to i32
%29 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %28)
%30 = load i32, i32* %2
%31 = sitofp i32 %30 to float
%32 = load float, float* %4
%33 = fdiv float %31, %32
%34 = fptosi float %33 to i32
%35 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %34)
%36 = load double, double* %5
%37 = load i32, i32* %2
%38 = load i8, i8* %3
%39 = sext i8 %38 to i32
%40 = sdiv i32 %37, %39
%41 = sitofp i32 %40 to double
%42 = fadd double %36, %41
%43 = fptosi double %42 to i32
%44 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %43)
store i32 40, i32* %7
%45 = load i32, i32* %7
%46 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %45)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 40)
ret i32 0
}