#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 */
double calculate_feet_per_second(double);
double calculate_meters_per_second(double);
double convert_time_to_seconds(int, double);
int /*<<< orphan*/ display_initial_message();
int /*<<< orphan*/ display_speeds(double, double, int);
int /*<<< orphan*/ printf(char *);
int read_minutes(int);
double read_seconds(int);
int main(void) {
  int runner1_min = 0, runner2_min = 0, runner3_min = 0, runner4_min = 0;
  double runner1_sec = 0.0, runner2_sec = 0.0, runner3_sec = 0.0,
         runner4_sec = 0.0;
  double runner1_time_sec = 0.0, runner2_time_sec = 0.0, runner3_time_sec = 0.0,
         runner4_time_sec = 0.0;
  double runner1_fps = 0.0, runner2_fps = 0.0, runner3_fps = 0.0,
         runner4_fps = 0.0;
  double runner1_mps = 0.0, runner2_mps = 0.0, runner3_mps = 0.0,
         runner4_mps = 0.0;
  display_initial_message();
  runner1_min = read_minutes(1);
  runner2_min = read_minutes(2);
  runner3_min = read_minutes(3);
  runner4_min = read_minutes(4);
  printf("\n");
  runner1_sec = read_seconds(1);
  runner2_sec = read_seconds(2);
  runner3_sec = read_seconds(3);
  runner4_sec = read_seconds(4);
  runner1_time_sec = convert_time_to_seconds(runner1_min, runner1_sec);
  runner2_time_sec = convert_time_to_seconds(runner2_min, runner2_sec);
  runner3_time_sec = convert_time_to_seconds(runner3_min, runner3_sec);
  runner4_time_sec = convert_time_to_seconds(runner4_min, runner4_sec);
  runner1_fps = calculate_feet_per_second(runner1_time_sec);
  runner2_fps = calculate_feet_per_second(runner2_time_sec);
  runner3_fps = calculate_feet_per_second(runner3_time_sec);
  runner4_fps = calculate_feet_per_second(runner4_time_sec);
  runner1_mps = calculate_meters_per_second(runner1_time_sec);
  runner2_mps = calculate_meters_per_second(runner2_time_sec);
  runner3_mps = calculate_meters_per_second(runner3_time_sec);
  runner4_mps = calculate_meters_per_second(runner4_time_sec);
  printf("\n********************\n");
  printf("Runner\tFPS\tMPS\n");
  printf("********************\n");
  display_speeds(runner1_fps, runner1_mps, 1);
  display_speeds(runner2_fps, runner2_mps, 2);
  display_speeds(runner3_fps, runner3_mps, 3);
  display_speeds(runner4_fps, runner4_mps, 4);
  printf("********************\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    $0x0,%al
call   1080 <display_initial_message@plt>
mov    $0x1,%edi
call   1050 <read_minutes@plt>
mov    %eax,-0x8(%rbp)
mov    $0x2,%edi
call   1050 <read_minutes@plt>
mov    %eax,-0xc(%rbp)
mov    $0x3,%edi
call   1050 <read_minutes@plt>
mov    %eax,-0x10(%rbp)
mov    $0x4,%edi
call   1050 <read_minutes@plt>
mov    %eax,-0x14(%rbp)
lea    0xd9c(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1070 <read_seconds@plt>
movsd  %xmm0,-0x20(%rbp)
mov    $0x2,%edi
call   1070 <read_seconds@plt>
movsd  %xmm0,-0x28(%rbp)
mov    $0x3,%edi
call   1070 <read_seconds@plt>
movsd  %xmm0,-0x30(%rbp)
mov    $0x4,%edi
call   1070 <read_seconds@plt>
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%edi
movsd  -0x20(%rbp),%xmm0
call   1040 <convert_time_to_seconds@plt>
movsd  %xmm0,-0x40(%rbp)
mov    -0xc(%rbp),%edi
movsd  -0x28(%rbp),%xmm0
call   1040 <convert_time_to_seconds@plt>
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%edi
movsd  -0x30(%rbp),%xmm0
call   1040 <convert_time_to_seconds@plt>
movsd  %xmm0,-0x50(%rbp)
mov    -0x14(%rbp),%edi
movsd  -0x38(%rbp),%xmm0
call   1040 <convert_time_to_seconds@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1060 <calculate_feet_per_second@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1060 <calculate_feet_per_second@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1060 <calculate_feet_per_second@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1060 <calculate_feet_per_second@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1090 <calculate_meters_per_second@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1090 <calculate_meters_per_second@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
call   1090 <calculate_meters_per_second@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
call   1090 <calculate_meters_per_second@plt>
movsd  %xmm0,-0x98(%rbp)
ff
lea    0xc76(%rip),%rdi
call   1030 <printf@plt>
lea    0xc81(%rip),%rdi
call   1030 <printf@plt>
lea    0xc5f(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x60(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
mov    $0x1,%edi
call   10a0 <display_speeds@plt>
movsd  -0x68(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
mov    $0x2,%edi
call   10a0 <display_speeds@plt>
movsd  -0x70(%rbp),%xmm0
movsd  -0x90(%rbp),%xmm1
ff
mov    $0x3,%edi
call   10a0 <display_speeds@plt>
movsd  -0x78(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm1
ff
mov    $0x4,%edi
call   10a0 <display_speeds@plt>
lea    0xbfa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x58,%rsp
xor    %eax,%eax
call   1090 <display_initial_message@plt>
mov    $0x1,%edi
call   1060 <read_minutes@plt>
mov    %eax,%ebx
mov    $0x2,%edi
call   1060 <read_minutes@plt>
mov    %eax,%ebp
mov    $0x3,%edi
call   1060 <read_minutes@plt>
mov    %eax,%r14d
mov    $0x4,%edi
call   1060 <read_minutes@plt>
mov    %eax,%r15d
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%edi
call   1080 <read_seconds@plt>
movsd  %xmm0,0x10(%rsp)
mov    $0x2,%edi
call   1080 <read_seconds@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x3,%edi
call   1080 <read_seconds@plt>
movsd  %xmm0,0x20(%rsp)
mov    $0x4,%edi
call   1080 <read_seconds@plt>
movsd  %xmm0,0x18(%rsp)
mov    %ebx,%edi
movsd  0x10(%rsp),%xmm0
call   1050 <convert_time_to_seconds@plt>
movsd  %xmm0,0x10(%rsp)
mov    %ebp,%edi
movsd  0x8(%rsp),%xmm0
call   1050 <convert_time_to_seconds@plt>
movsd  %xmm0,0x8(%rsp)
mov    %r14d,%edi
movsd  0x20(%rsp),%xmm0
call   1050 <convert_time_to_seconds@plt>
movsd  %xmm0,0x20(%rsp)
mov    %r15d,%edi
movsd  0x18(%rsp),%xmm0
call   1050 <convert_time_to_seconds@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x10(%rsp),%xmm0
call   1070 <calculate_feet_per_second@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0x8(%rsp),%xmm0
call   1070 <calculate_feet_per_second@plt>
movsd  %xmm0,0x40(%rsp)
movsd  0x20(%rsp),%xmm0
call   1070 <calculate_feet_per_second@plt>
movsd  %xmm0,0x48(%rsp)
movsd  0x18(%rsp),%xmm0
call   1070 <calculate_feet_per_second@plt>
movsd  %xmm0,0x50(%rsp)
movsd  0x10(%rsp),%xmm0
call   10a0 <calculate_meters_per_second@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x8(%rsp),%xmm0
call   10a0 <calculate_meters_per_second@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x20(%rsp),%xmm0
call   10a0 <calculate_meters_per_second@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
call   10a0 <calculate_meters_per_second@plt>
movsd  %xmm0,0x10(%rsp)
lea    0xd06(%rip),%rdi
call   1040 <puts@plt>
lea    0xd10(%rip),%rdi
call   1040 <puts@plt>
lea    0xcef(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
movsd  0x38(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
mov    $0x1,%edi
call   10b0 <display_speeds@plt>
movsd  0x40(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
mov    $0x2,%edi
call   10b0 <display_speeds@plt>
movsd  0x48(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mov    $0x3,%edi
call   10b0 <display_speeds@plt>
movsd  0x50(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    $0x4,%edi
call   10b0 <display_speeds@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [23 x i8] c"\0A********************\0A\00"
@.str.2 = [16 x i8] c"Runner\09FPS\09MPS\0A\00"
@.str.3 = [22 x i8] c"********************\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %7
store double 0.000000e+00, double* %8
store double 0.000000e+00, double* %9
store double 0.000000e+00, double* %10
store double 0.000000e+00, double* %11
store double 0.000000e+00, double* %12
store double 0.000000e+00, double* %13
store double 0.000000e+00, double* %14
store double 0.000000e+00, double* %15
store double 0.000000e+00, double* %16
store double 0.000000e+00, double* %17
store double 0.000000e+00, double* %18
store double 0.000000e+00, double* %19
store double 0.000000e+00, double* %20
store double 0.000000e+00, double* %21
%22 = call i32 (...) @display_initial_message()
%23 = call i32 @read_minutes(i32 1)
store i32 %23, i32* %2
%24 = call i32 @read_minutes(i32 2)
store i32 %24, i32* %3
%25 = call i32 @read_minutes(i32 3)
store i32 %25, i32* %4
%26 = call i32 @read_minutes(i32 4)
store i32 %26, i32* %5
%27 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%28 = call double @read_seconds(i32 1)
store double %28, double* %6
%29 = call double @read_seconds(i32 2)
store double %29, double* %7
%30 = call double @read_seconds(i32 3)
store double %30, double* %8
%31 = call double @read_seconds(i32 4)
store double %31, double* %9
%32 = load i32, i32* %2
%33 = load double, double* %6
%34 = call double @convert_time_to_seconds(i32 %32, double %33)
store double %34, double* %10
%35 = load i32, i32* %3
%36 = load double, double* %7
%37 = call double @convert_time_to_seconds(i32 %35, double %36)
store double %37, double* %11
%38 = load i32, i32* %4
%39 = load double, double* %8
%40 = call double @convert_time_to_seconds(i32 %38, double %39)
store double %40, double* %12
%41 = load i32, i32* %5
%42 = load double, double* %9
%43 = call double @convert_time_to_seconds(i32 %41, double %42)
store double %43, double* %13
%44 = load double, double* %10
%45 = call double @calculate_feet_per_second(double %44)
store double %45, double* %14
%46 = load double, double* %11
%47 = call double @calculate_feet_per_second(double %46)
store double %47, double* %15
%48 = load double, double* %12
%49 = call double @calculate_feet_per_second(double %48)
store double %49, double* %16
%50 = load double, double* %13
%51 = call double @calculate_feet_per_second(double %50)
store double %51, double* %17
%52 = load double, double* %10
%53 = call double @calculate_meters_per_second(double %52)
store double %53, double* %18
%54 = load double, double* %11
%55 = call double @calculate_meters_per_second(double %54)
store double %55, double* %19
%56 = load double, double* %12
%57 = call double @calculate_meters_per_second(double %56)
store double %57, double* %20
%58 = load double, double* %13
%59 = call double @calculate_meters_per_second(double %58)
store double %59, double* %21
%60 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%61 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%62 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%63 = load double, double* %14
%64 = load double, double* %18
%65 = call i32 @display_speeds(double %63, double %64, i32 1)
%66 = load double, double* %15
%67 = load double, double* %19
%68 = call i32 @display_speeds(double %66, double %67, i32 2)
%69 = load double, double* %16
%70 = load double, double* %20
%71 = call i32 @display_speeds(double %69, double %70, i32 3)
%72 = load double, double* %17
%73 = load double, double* %21
%74 = call i32 @display_speeds(double %72, double %73, i32 4)
%75 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [22 x i8] c"\0A********************\00"
@str.4 = [15 x i8] c"Runner\09FPS\09MPS\00"
@str.6 = [21 x i8] c"********************\00"
define i32 @main() {
%1 = tail call i32 (...) @display_initial_message()
%2 = tail call i32 @read_minutes(i32 1)
%3 = tail call i32 @read_minutes(i32 2)
%4 = tail call i32 @read_minutes(i32 3)
%5 = tail call i32 @read_minutes(i32 4)
%6 = tail call i32 @putchar(i32 10)
%7 = tail call double @read_seconds(i32 1)
%8 = tail call double @read_seconds(i32 2)
%9 = tail call double @read_seconds(i32 3)
%10 = tail call double @read_seconds(i32 4)
%11 = tail call double @convert_time_to_seconds(i32 %2, double %7)
%12 = tail call double @convert_time_to_seconds(i32 %3, double %8)
%13 = tail call double @convert_time_to_seconds(i32 %4, double %9)
%14 = tail call double @convert_time_to_seconds(i32 %5, double %10)
%15 = tail call double @calculate_feet_per_second(double %11)
%16 = tail call double @calculate_feet_per_second(double %12)
%17 = tail call double @calculate_feet_per_second(double %13)
%18 = tail call double @calculate_feet_per_second(double %14)
%19 = tail call double @calculate_meters_per_second(double %11)
%20 = tail call double @calculate_meters_per_second(double %12)
%21 = tail call double @calculate_meters_per_second(double %13)
%22 = tail call double @calculate_meters_per_second(double %14)
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.4, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.6, i64 0, i64 0))
%26 = tail call i32 @display_speeds(double %15, double %19, i32 1)
%27 = tail call i32 @display_speeds(double %16, double %20, i32 2)
%28 = tail call i32 @display_speeds(double %17, double %21, i32 3)
%29 = tail call i32 @display_speeds(double %18, double %22, i32 4)
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.6, i64 0, i64 0))
ret i32 0
}