#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() {
  int num1 = 2;
  char letter = 'A', degreeSymbol = 248;
  float tempOutside = 32.0;
  printf("Hello world! My name is Andy\n");
  printf("\nI learned that %d + %d = %d, in the whole universe!\n", num1, num1,
         num1 + num1);
  printf("\nThe grade I am working for is: %c\n", letter);
  printf("\nThe temperature outside is barely %.2f%c\n", tempOutside,
         degreeSymbol);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movb   $0x41,-0x9(%rbp)
movb   $0xf8,-0xa(%rbp)
movss  0xeca(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
add    -0x8(%rbp),%ecx
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x9(%rbp),%esi
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsbl -0xa(%rbp),%esi
lea    0xef3(%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    0xf65(%rip),%rdi
call   1030 <puts@plt>
lea    0xed4(%rip),%rdi
mov    $0x2,%esi
mov    $0x2,%edx
mov    $0x4,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeed(%rip),%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xefe(%rip),%rdi
movsd  0xe94(%rip),%xmm0
mov    $0xfffffff8,%esi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Hello world! My name is Andy\0A\00"
@.str.1 = [54 x i8] c"\0AI learned that %d + %d = %d, in the whole universe!\0A\00"
@.str.2 = [36 x i8] c"\0AThe grade I am working for is: %c\0A\00"
@.str.3 = [43 x i8] c"\0AThe temperature outside is barely %.2f%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
%5 = alloca float
store i32 0, i32* %1
store i32 2, i32* %2
store i8 65, i8* %3
store i8 -8, i8* %4
store float 3.200000e+01, float* %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = add nsw i32 %9, %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8, i32 %11)
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i32 %14)
%16 = load float, float* %5
%17 = fpext float %16 to double
%18 = load i8, i8* %4
%19 = sext i8 %18 to i32
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), double %17, i32 %19)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [54 x i8] c"\0AI learned that %d + %d = %d, in the whole universe!\0A\00"
@.str.2 = [36 x i8] c"\0AThe grade I am working for is: %c\0A\00"
@.str.3 = [43 x i8] c"\0AThe temperature outside is barely %.2f%c\0A\00"
@str = [29 x i8] c"Hello world! My name is Andy\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 2, i32 4)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i32 65)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), double 3.200000e+01, i32 -8)
ret i32 0
}