#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() {
  printf("\n\n");
  int integer = 5;
  printf("An integer: %d\n\n", integer);
  float floating = 2.3456;
  printf("A floating point: %f\n\n", floating);
  double doubleprec = 2.345654321234;
  printf("A double precision number: %15.17lf\n\n", doubleprec);
  char character = 's';
  printf("A character: %c\n\n", character);
  char *string = "We are have a great bootcamp!\n";
  printf("A string: %s\n\n", string);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  0xebb(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xebb(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xe8f(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xeb2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movb   $0x73,-0x19(%rbp)
movsbl -0x19(%rbp),%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf46(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
movsd  0xeb1(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xedb(%rip),%rdi
movsd  0xea3(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x73,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf09(%rip),%rdi
lea    0xee3(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"\0A\0A\00"
@.str.1 = [17 x i8] c"An integer: %d\0A\0A\00"
@.str.2 = [23 x i8] c"A floating point: %f\0A\0A\00"
@.str.3 = [38 x i8] c"A double precision number: %15.17lf\0A\0A\00"
@.str.4 = [18 x i8] c"A character: %c\0A\0A\00"
@.str.5 = [31 x i8] c"We are have a great bootcamp!\0A\00"
@.str.6 = [15 x i8] c"A string: %s\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca double
%5 = alloca i8
%6 = alloca i8*
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32 5, i32* %2
%8 = load i32, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %8)
store float 0x4002C3C9E0000000, float* %3
%10 = load float, float* %3
%11 = fpext float %10 to double
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %11)
store double 0x4002C3E669AB5E6E, double* %4
%13 = load double, double* %4
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), double %13)
store i8 115, i8* %5
%15 = load i8, i8* %5
%16 = sext i8 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %16)
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), i8** %6
%18 = load i8*, i8** %6
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %18)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [17 x i8] c"An integer: %d\0A\0A\00"
@.str.2 = [23 x i8] c"A floating point: %f\0A\0A\00"
@.str.3 = [38 x i8] c"A double precision number: %15.17lf\0A\0A\00"
@.str.4 = [18 x i8] c"A character: %c\0A\0A\00"
@.str.5 = [31 x i8] c"We are have a great bootcamp!\0A\00"
@.str.6 = [15 x i8] c"A string: %s\0A\0A\00"
@str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 5)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double 0x4002C3C9E0000000)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), double 0x4002C3E669AB5E6E)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 115)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}