#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 *, char, ...);
int main() {
  char myChar = 'D';
  int numInt = 10;
  float numFloat = 15.3;
  double numDouble = 1000;
  printf("Imprimindo um char: %c\n", myChar);
  printf("Imprimindo um int: %d\n", numInt);
  printf("Imprimindo um float: %f\n", numFloat);
  printf("Imprimindo um double: %lf\n", numDouble);
  printf("Imprimindo todos: %c - %d - %f - %lf\n", myChar, numInt, numFloat,
         numDouble);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x44,-0x5(%rbp)
movl   $0xa,-0xc(%rbp)
movl   $0x4174cccd,-0x10(%rbp)
movabs $0x408f400000000000,%rax
40 8f 40
mov    %rax,-0x18(%rbp)
movsbl -0x5(%rbp),%esi
lea    0xeb6(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x19(%rbp)
call   1030 <printf@plt>
mov    -0x19(%rbp),%al
movsbl -0xc(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x19(%rbp),%al
cvttss2si -0x10(%rbp),%ecx
movsbl %cl,%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%eax
lea    0xeba(%rip),%rdi
movsbl %al,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x5(%rbp),%al
mov    -0xc(%rbp),%edx
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xeb0(%rip),%rdi
movsbl %al,%esi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
mov    $0x44,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf07(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf12(%rip),%rdi
movsd  0xe97(%rip),%xmm0
movsd  0xe97(%rip),%xmm1
mov    $0x44,%esi
mov    $0xa,%edx
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Imprimindo um char: %c\0A\00"
@.str.1 = [23 x i8] c"Imprimindo um int: %d\0A\00"
@.str.2 = [25 x i8] c"Imprimindo um float: %f\0A\00"
@.str.3 = [27 x i8] c"Imprimindo um double: %lf\0A\00"
@.str.4 = [38 x i8] c"Imprimindo todos: %c - %d - %f - %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca float
%5 = alloca double
store i32 0, i32* %1
store i8 68, i8* %2
store i32 10, i32* %3
store float 0x402E9999A0000000, float* %4
store double 1.000000e+03, double* %5
%6 = load i8, i8* %2
%7 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 signext %6)
%8 = load i32, i32* %3
%9 = trunc i32 %8 to i8
%10 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8 signext %9)
%11 = load float, float* %4
%12 = fptosi float %11 to i8
%13 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8 signext %12)
%14 = load double, double* %5
%15 = fptosi double %14 to i8
%16 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8 signext %15)
%17 = load i8, i8* %2
%18 = load i32, i32* %3
%19 = load float, float* %4
%20 = fpext float %19 to double
%21 = load double, double* %5
%22 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i8 signext %17, i32 %18, double %20, double %21)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Imprimindo um char: %c\0A\00"
@.str.1 = [23 x i8] c"Imprimindo um int: %d\0A\00"
@.str.2 = [25 x i8] c"Imprimindo um float: %f\0A\00"
@.str.3 = [27 x i8] c"Imprimindo um double: %lf\0A\00"
@.str.4 = [38 x i8] c"Imprimindo todos: %c - %d - %f - %lf\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 signext 68)
%2 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8 signext 10)
%3 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8 signext 15)
%4 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8 signext poison)
%5 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i8 signext 68, i32 10, double 0x402E9999A0000000, double 1.000000e+03)
ret i32 0
}