#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 *, ...);
void display_acceleration_and_time(double acceleration_mi_hr,
                                   double acceleration_m_sec,
                                   double time_to_stop) {
  printf("\n****************************************\n");
  printf("Rate of acceleration (mi/hr^2): %0.2lf\n", acceleration_mi_hr);
  printf("Rate of acceleration (m/s^2):   %0.2lf\n", acceleration_m_sec);
  printf("Total time to stop (s):         %0.2lf\n", time_to_stop);
  printf("****************************************\n");
}


x86 assembly (clang, -O0):
<display_acceleration_and_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm0
lea    0xeea(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xeff(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xf14(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_acceleration_and_time>:
sub    $0x18,%rsp
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
lea    0xf3c(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xee1(%rip),%rdi
movsd  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xef6(%rip),%rdi
add    $0x18,%rsp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"\0A****************************************\0A\00"
@.str.1 = [40 x i8] c"Rate of acceleration (mi/hr^2): %0.2lf\0A\00"
@.str.2 = [40 x i8] c"Rate of acceleration (m/s^2): %0.2lf\0A\00"
@.str.3 = [40 x i8] c"Total time to stop (s): %0.2lf\0A\00"
@.str.4 = [42 x i8] c"****************************************\0A\00"
define void @display_acceleration_and_time(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%8 = load double, double* %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), double %8)
%10 = load double, double* %5
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), double %10)
%12 = load double, double* %6
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), double %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [40 x i8] c"Rate of acceleration (mi/hr^2): %0.2lf\0A\00"
@.str.2 = [40 x i8] c"Rate of acceleration (m/s^2): %0.2lf\0A\00"
@.str.3 = [40 x i8] c"Total time to stop (s): %0.2lf\0A\00"
@str = [42 x i8] c"\0A****************************************\00"
@str.5 = [41 x i8] c"****************************************\00"
define void @display_acceleration_and_time(double %0, double %1, double %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), double %0)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), double %1)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), double %2)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.5, i64 0, i64 0))
ret void
}