#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);
int main() {
  int myNum = 10;
  int num = 12;
  char letter;
  float fNum;
  letter = 'A';
  fNum = 12.34;
  printf("num is %d \n", num);
  printf("letter is %c \n", letter);
  printf("fNum is %f \n", fNum);
  printf("myNum is %d \n", myNum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0xc,-0xc(%rbp)
movb   $0x41,-0xd(%rbp)
movss  0xec7(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0xc(%rbp),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
movsbl -0xd(%rbp),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
cvttss2si -0x14(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xc,%esi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0xc,%esi
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"num is %d \0A\00"
@.str.1 = [15 x i8] c"letter is %c \0A\00"
@.str.2 = [13 x i8] c"fNum is %f \0A\00"
@.str.3 = [14 x i8] c"myNum is %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
%5 = alloca float
store i32 0, i32* %1
store i32 10, i32* %2
store i32 12, i32* %3
store i8 65, i8* %4
store float 0x4028AE1480000000, float* %5
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i8, i8* %4
%9 = sext i8 %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load float, float* %5
%12 = fptosi float %11 to i32
%13 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %2
%15 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"num is %d \0A\00"
@.str.1 = [15 x i8] c"letter is %c \0A\00"
@.str.2 = [13 x i8] c"fNum is %f \0A\00"
@.str.3 = [14 x i8] c"myNum is %d \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 12)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 65)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 12)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 10)
ret i32 0
}