#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  char First[20], Middle[20], Last[20];
  int Age, Days;
  float Age_Minutes, Year_Decimal;
  printf("This program will calculate your age and name. \n \n");
  printf("Enter your last name\n");
  scanf("%s", First);
  getchar();
  printf("Enter your first name\n");
  scanf("%s", Last);
  getchar();
  printf("Enter your middle initial\n");
  scanf("%s", Middle);
  getchar();
  printf("Enter your age in whole years\n");
  scanf("%i", &Age);
  getchar();
  printf("Enter the days elapsed since your last birthday.\n");
  scanf("%i", &Days);
  Year_Decimal = (Days / (365.242199)) + Age;
  Age_Minutes = Year_Decimal * 365.242199 * 24.0 * 60.0;
  printf("Mr./Mrs. %s %s. %s \n", First, Middle, Last);
  printf("You are %1.5f years old.\n", Year_Decimal);
  printf("You are %1.0f minutes old.\n", Age_Minutes);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xefb(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x60(%rbp),%rsi
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
lea    -0x64(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
lea    -0x68(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
cvtsi2sdl -0x68(%rbp),%xmm0
movsd  0xdfa(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x64(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x70(%rbp)
movss  -0x70(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdd3(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdbf(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdab(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x6c(%rbp)
lea    -0x20(%rbp),%rsi
lea    -0x40(%rbp),%rdx
lea    -0x60(%rbp),%rcx
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x70(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe73(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x6c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe76(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x78,%rsp
lea    0xf17(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3d(%rip),%rdi
call   1030 <puts@plt>
lea    0xeae(%rip),%rbx
lea    0x60(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
lea    0xf26(%rip),%rdi
call   1030 <puts@plt>
lea    0x20(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
lea    0xf17(%rip),%rdi
call   1030 <puts@plt>
lea    0x40(%rsp),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
lea    0xf0c(%rip),%rdi
call   1030 <puts@plt>
lea    0xe3b(%rip),%rbx
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
lea    0xf01(%rip),%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
cvtsi2sdl 0x10(%rsp),%xmm0
movsd  0xde1(%rip),%xmm1
cvtsi2sdl 0x14(%rsp),%xmm2
divsd  %xmm1,%xmm0
addsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
mulsd  %xmm0,%xmm1
mulsd  0xdbe(%rip),%xmm1
mulsd  0xdbe(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0xc(%rsp)
lea    0xdb8(%rip),%rdi
mov    %r14,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdb6(%rip),%rdi
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdb2(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [51 x i8] c"This program will calculate your age and name. \0A \0A\00"
@.str.1 = [22 x i8] c"Enter your last name\0A\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [23 x i8] c"Enter your first name\0A\00"
@.str.4 = [27 x i8] c"Enter your middle initial\0A\00"
@.str.5 = [31 x i8] c"Enter your age in whole years\0A\00"
@.str.6 = [3 x i8] c"%i\00"
@.str.7 = [50 x i8] c"Enter the days elapsed since your last birthday.\0A\00"
@.str.8 = [21 x i8] c"Mr./Mrs. %s %s. %s \0A\00"
@.str.9 = [26 x i8] c"You are %1.5f years old.\0A\00"
@.str.10 = [28 x i8] c"You are %1.0f minutes old.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = alloca [20 x i8]
%4 = alloca [20 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
%8 = alloca float
store i32 0, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %11)
%13 = call i32 (...) @getchar()
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%15 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %15)
%17 = call i32 (...) @getchar()
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%19 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %19)
%21 = call i32 (...) @getchar()
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %5)
%24 = call i32 (...) @getchar()
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.7, i64 0, i64 0))
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %6)
%27 = load i32, i32* %6
%28 = sitofp i32 %27 to double
%29 = fdiv double %28, 0x4076D3E00C0F01FC
%30 = load i32, i32* %5
%31 = sitofp i32 %30 to double
%32 = fadd double %29, %31
%33 = fptrunc double %32 to float
store float %33, float* %8
%34 = load float, float* %8
%35 = fpext float %34 to double
%36 = fmul double %35, 0x4076D3E00C0F01FC
%37 = fmul double %36, 2.400000e+01
%38 = fmul double %37, 6.000000e+01
%39 = fptrunc double %38 to float
store float %39, float* %7
%40 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%41 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%42 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), i8* %40, i8* %41, i8* %42)
%44 = load float, float* %8
%45 = fpext float %44 to double
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), double %45)
%47 = load float, float* %7
%48 = fpext float %47 to double
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), double %48)
%50 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [3 x i8] c"%s\00"
@.str.6 = [3 x i8] c"%i\00"
@.str.8 = [21 x i8] c"Mr./Mrs. %s %s. %s \0A\00"
@.str.9 = [26 x i8] c"You are %1.5f years old.\0A\00"
@.str.10 = [28 x i8] c"You are %1.0f minutes old.\0A\00"
@str = [50 x i8] c"This program will calculate your age and name. \0A \00"
@str.11 = [21 x i8] c"Enter your last name\00"
@str.12 = [22 x i8] c"Enter your first name\00"
@str.13 = [26 x i8] c"Enter your middle initial\00"
@str.14 = [30 x i8] c"Enter your age in whole years\00"
@str.15 = [49 x i8] c"Enter the days elapsed since your last birthday.\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = alloca [20 x i8]
%3 = alloca [20 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.11, i64 0, i64 0))
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%14 = call i32 (...) @getchar()
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.12, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%17 = call i32 (...) @getchar()
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.13, i64 0, i64 0))
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%20 = call i32 (...) @getchar()
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.14, i64 0, i64 0))
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %4)
%23 = call i32 (...) @getchar()
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.15, i64 0, i64 0))
%25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %5)
%26 = load i32, i32* %5
%27 = sitofp i32 %26 to double
%28 = fdiv double %27, 0x4076D3E00C0F01FC
%29 = load i32, i32* %4
%30 = sitofp i32 %29 to double
%31 = fadd double %28, %30
%32 = fptrunc double %31 to float
%33 = fpext float %32 to double
%34 = fmul double %33, 0x4076D3E00C0F01FC
%35 = fmul double %34, 2.400000e+01
%36 = fmul double %35, 6.000000e+01
%37 = fptrunc double %36 to float
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), i8* %6, i8* %7, i8* %8)
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), double %33)
%40 = fpext float %37 to double
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), double %40)
%42 = call i32 (...) @getchar()
ret i32 0
}