#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 argc, char *argv[]) {
  int distance = 2.3;
  float power = 2.3;
  double super_power = 56789.4532;
  char initial = 'W';
  char first_name[] = "Jason";
  char last_name[] = "Barnett";
  char *another = "Bob";
  printf("this is the first byte: %c\n", first_name[0]);
  printf("this is the string of another: %s\n", another);
  printf("sizeof ::  int: %lu, float: %lu, double: %lu, char: %lu\n",
         sizeof(int), sizeof(float), sizeof(double), sizeof(char));
  printf("int: %d, float: %0f\n", distance, power);
  printf("You are %d miles away.\n", distance);
  printf("You have %f levels of power.\n", power);
  printf("You have %f awesome super powers.\n", super_power);
  printf("I have an initial %c.\n", initial);
  printf("I have a first name %s.\n", first_name);
  printf("I have a last name %s.\n", last_name);
  printf("My whole name is %s %c. %s.\n", first_name, initial, last_name);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
movss  0xed3(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movsd  0xebe(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movb   $0x57,-0x21(%rbp)
mov    0xebb(%rip),%eax
mov    %eax,-0x27(%rbp)
mov    0xeb5(%rip),%ax
mov    %ax,-0x23(%rbp)
mov    0xeac(%rip),%rax
mov    %rax,-0x2f(%rbp)
lea    0xea9(%rip),%rax
mov    %rax,-0x38(%rbp)
movsbl -0x27(%rbp),%esi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rsi
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
mov    $0x4,%edx
mov    $0x8,%ecx
mov    $0x1,%r8d
mov    %rdx,%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xece(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xed9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsbl -0x21(%rbp),%esi
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x27(%rbp),%rsi
lea    0xeef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x2f(%rbp),%rsi
lea    0xef6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x27(%rbp),%rsi
movsbl -0x21(%rbp),%edx
lea    -0x2f(%rbp),%rcx
lea    0xef4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movw   $0x6e,0xc(%rsp)
movl   $0x6f73614a,0x8(%rsp)
6f
movabs $0x7474656e726142,%rax
mov    %rax,0x10(%rsp)
lea    0xede(%rip),%rdi
mov    $0x4a,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
lea    0xec0(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
mov    $0x4,%esi
mov    $0x4,%edx
mov    $0x8,%ecx
mov    $0x1,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf0b(%rip),%rdi
movsd  0xe71(%rip),%xmm0
mov    $0x2,%esi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf0a(%rip),%rdi
movsd  0xe43(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf12(%rip),%rdi
movsd  0xe35(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf1f(%rip),%rdi
mov    $0x57,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf23(%rip),%rdi
lea    0x8(%rsp),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf26(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf28(%rip),%rdi
mov    %r14,%rsi
mov    $0x57,%edx
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.first_name = [6 x i8] c"Jason\00"
@__const.main.last_name = [8 x i8] c"Barnett\00"
@.str = [4 x i8] c"Bob\00"
@.str.1 = [28 x i8] c"this is the first byte: %c\0A\00"
@.str.2 = [35 x i8] c"this is the string of another: %s\0A\00"
@.str.3 = [57 x i8] c"sizeof :: int: %lu, float: %lu, double: %lu, char: %lu\0A\00"
@.str.4 = [21 x i8] c"int: %d, float: %0f\0A\00"
@.str.5 = [24 x i8] c"You are %d miles away.\0A\00"
@.str.6 = [30 x i8] c"You have %f levels of power.\0A\00"
@.str.7 = [35 x i8] c"You have %f awesome super powers.\0A\00"
@.str.8 = [23 x i8] c"I have an initial %c.\0A\00"
@.str.9 = [25 x i8] c"I have a first name %s.\0A\00"
@.str.10 = [24 x i8] c"I have a last name %s.\0A\00"
@.str.11 = [29 x i8] c"My whole name is %s %c. %s.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca float
%8 = alloca double
%9 = alloca i8
%10 = alloca [6 x i8]
%11 = alloca [8 x i8]
%12 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 2, i32* %6
store float 0x4002666660000000, float* %7
store double 0x40EBBAAE809D4952, double* %8
store i8 87, i8* %9
%13 = bitcast [6 x i8]* %10 to i8*
%14 = bitcast [8 x i8]* %11 to i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %12
%15 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 0
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = load i8*, i8** %12
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* %19)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0), i64 4, i64 4, i64 8, i64 1)
%22 = load i32, i32* %6
%23 = load float, float* %7
%24 = fpext float %23 to double
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %22, double %24)
%26 = load i32, i32* %6
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %26)
%28 = load float, float* %7
%29 = fpext float %28 to double
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), double %29)
%31 = load double, double* %8
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), double %31)
%33 = load i8, i8* %9
%34 = sext i8 %33 to i32
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %34)
%36 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 0
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i8* %36)
%38 = getelementptr inbounds [8 x i8], [8 x i8]* %11, i64 0, i64 0
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), i8* %38)
%40 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 0
%41 = load i8, i8* %9
%42 = sext i8 %41 to i32
%43 = getelementptr inbounds [8 x i8], [8 x i8]* %11, i64 0, i64 0
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0), i8* %40, i32 %42, i8* %43)
ret i32 0
}

LLVM IR (-O2):
@__const.main.first_name = [6 x i8] c"Jason\00"
@.str = [4 x i8] c"Bob\00"
@.str.1 = [28 x i8] c"this is the first byte: %c\0A\00"
@.str.2 = [35 x i8] c"this is the string of another: %s\0A\00"
@.str.3 = [57 x i8] c"sizeof :: int: %lu, float: %lu, double: %lu, char: %lu\0A\00"
@.str.4 = [21 x i8] c"int: %d, float: %0f\0A\00"
@.str.5 = [24 x i8] c"You are %d miles away.\0A\00"
@.str.6 = [30 x i8] c"You have %f levels of power.\0A\00"
@.str.7 = [35 x i8] c"You have %f awesome super powers.\0A\00"
@.str.8 = [23 x i8] c"I have an initial %c.\0A\00"
@.str.9 = [25 x i8] c"I have a first name %s.\0A\00"
@.str.10 = [24 x i8] c"I have a last name %s.\0A\00"
@.str.11 = [29 x i8] c"My whole name is %s %c. %s.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [6 x i8]
%4 = alloca i64
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%6 = bitcast i64* %4 to i8*
store i64 32779076291944770, i64* %4
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 74)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0), i64 4, i64 4, i64 8, i64 1)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 2, double 0x4002666660000000)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 2)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), double 0x4002666660000000)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), double 0x40EBBAAE809D4952)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 87)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i8* %5)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), i64* %4)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0), i8* %5, i32 87, i64* %4)
ret i32 0
}