#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("hello world!\n");
  int intreg;
  intreg = 16;
  printf("intreg=%i \n", intreg);
  int intreg2 = 17;
  printf("%i %i \n", intreg, intreg2);
  char caractero = 'P';
  printf("%c %i %c %i\n", 'F', 24, caractero, 5);
  printf("%lf\n", 2.3);
  char *derp = "le string";
  printf("%s\n", derp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x10,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x11,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movb   $0x50,-0xd(%rbp)
movsbl -0xd(%rbp),%ecx
lea    0xebb(%rip),%rdi
mov    $0x46,%esi
mov    $0x18,%edx
mov    $0x5,%r8d
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeaa(%rip),%rdi
movsd  0xe6b(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe99(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf10(%rip),%rdi
call   1030 <puts@plt>
lea    0xed4(%rip),%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x10,%esi
mov    $0x11,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebd(%rip),%rdi
mov    $0x46,%esi
mov    $0x18,%edx
mov    $0x50,%ecx
mov    $0x5,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea7(%rip),%rdi
movsd  0xe76(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe96(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"hello world!\0A\00"
@.str.1 = [12 x i8] c"intreg=%i \0A\00"
@.str.2 = [8 x i8] c"%i %i \0A\00"
@.str.3 = [13 x i8] c"%c %i %c %i\0A\00"
@.str.4 = [5 x i8] c"%lf\0A\00"
@.str.5 = [10 x i8] c"le string\00"
@.str.6 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8*
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
store i32 16, i32* %2
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %7)
store i32 17, i32* %3
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %10)
store i8 80, i8* %4
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 70, i32 24, i32 %13, i32 5)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), double 2.300000e+00)
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8** %5
%16 = load i8*, i8** %5
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %16)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [12 x i8] c"intreg=%i \0A\00"
@.str.2 = [8 x i8] c"%i %i \0A\00"
@.str.3 = [13 x i8] c"%c %i %c %i\0A\00"
@.str.4 = [5 x i8] c"%lf\0A\00"
@.str.5 = [10 x i8] c"le string\00"
@str = [13 x i8] c"hello world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 16)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 16, i32 17)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 70, i32 24, i32 80, i32 5)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), double 2.300000e+00)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}