#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 main(void) {
  int age = 25;
  double average = 246.7531986;
  printf("Marc Woodyard. Lab 3.\n\n");
  printf("Hello World!\n\n");
  printf("Joe is %d years old.\n\n", age);
  printf(
      "\"If you're going through hell, keep going.\"\n-Winston Churchill\n\n");
  printf("The average = %0.1f\n\n", average);
  printf("The average = %0.2e\n\n", average);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x19,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xf14(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xf17(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf23(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2e(%rip),%rdi
call   1030 <puts@plt>
lea    0xec8(%rip),%rdi
mov    $0x19,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf1d(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
movsd  0xe99(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
movsd  0xe83(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Marc Woodyard. Lab 3.\0A\0A\00"
@.str.1 = [15 x i8] c"Hello World!\0A\0A\00"
@.str.2 = [23 x i8] c"Joe is %d years old.\0A\0A\00"
@.str.3 = [65 x i8] c"\22If you're going through hell, keep going.\22\0A-Winston Churchill\0A\0A\00"
@.str.4 = [22 x i8] c"The average = %0.1f\0A\0A\00"
@.str.5 = [22 x i8] c"The average = %0.2e\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 25, i32* %1
store double 0x406ED81A33F34C93, double* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.3, i64 0, i64 0))
%8 = load double, double* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), double %8)
%10 = load double, double* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [23 x i8] c"Joe is %d years old.\0A\0A\00"
@.str.4 = [22 x i8] c"The average = %0.1f\0A\0A\00"
@.str.5 = [22 x i8] c"The average = %0.2e\0A\0A\00"
@str = [23 x i8] c"Marc Woodyard. Lab 3.\0A\00"
@str.6 = [14 x i8] c"Hello World!\0A\00"
@str.7 = [64 x i8] c"\22If you're going through hell, keep going.\22\0A-Winston Churchill\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.6, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 25)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), double 0x406ED81A33F34C93)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), double 0x406ED81A33F34C93)
ret i32 0
}