#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);
int sprintf(char *, char *, ...);
main(void) {
  char buffer[200], s[] = "ordenador", c = '/';
  int i = 40, j;
  float f = 1.414214F;
  j = sprintf(buffer, "\tCadena:    %s\n", s);
  j += sprintf(buffer + j, "\tCarácter:  %c\n", c);
  j += sprintf(buffer + j, "\tEntero:    %d\n", i);
  j += sprintf(buffer + j, "\tReal:      %f\n", f);
  printf("Salida:\n%s\nNúmero de caracteres = %d\n", buffer, j);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    0xed2(%rip),%rax
mov    %rax,-0xda(%rbp)
mov    0xecc(%rip),%ax
mov    %ax,-0xd2(%rbp)
movb   $0x2f,-0xdb(%rbp)
movl   $0x28,-0xe0(%rbp)
movss  0xea0(%rip),%xmm0
movss  %xmm0,-0xe8(%rbp)
ff
lea    -0xd0(%rbp),%rdi
lea    -0xda(%rbp),%rdx
lea    0xe91(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    %eax,-0xe4(%rbp)
lea    -0xd0(%rbp),%rdi
movslq -0xe4(%rbp),%rax
add    %rax,%rdi
movsbl -0xdb(%rbp),%edx
lea    0xe75(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
add    -0xe4(%rbp),%eax
mov    %eax,-0xe4(%rbp)
lea    -0xd0(%rbp),%rdi
movslq -0xe4(%rbp),%rax
add    %rax,%rdi
mov    -0xe0(%rbp),%edx
lea    0xe55(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
add    -0xe4(%rbp),%eax
mov    %eax,-0xe4(%rbp)
lea    -0xd0(%rbp),%rdi
movslq -0xe4(%rbp),%rax
add    %rax,%rdi
movss  -0xe8(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xe2e(%rip),%rsi
mov    $0x1,%al
call   1040 <sprintf@plt>
add    -0xe4(%rbp),%eax
mov    %eax,-0xe4(%rbp)
lea    -0xd0(%rbp),%rsi
mov    -0xe4(%rbp),%edx
lea    0xe17(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xd8,%rsp
movabs $0x6f64616e6564726f,%rax
61 64 6f
mov    %rax,(%rsp)
movw   $0x72,0x8(%rsp)
lea    0xecc(%rip),%rsi
lea    0x10(%rsp),%r14
mov    %rsp,%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <sprintf@plt>
movslq %eax,%rbx
lea    (%rsp,%rbx,1),%rdi
add    $0x10,%rdi
lea    0xeb8(%rip),%rsi
mov    $0x2f,%edx
xor    %eax,%eax
call   1040 <sprintf@plt>
add    %eax,%ebx
movslq %ebx,%rbx
lea    (%rsp,%rbx,1),%rdi
add    $0x10,%rdi
lea    0xea9(%rip),%rsi
mov    $0x28,%edx
xor    %eax,%eax
call   1040 <sprintf@plt>
add    %eax,%ebx
movslq %ebx,%rbx
lea    (%rsp,%rbx,1),%rdi
add    $0x10,%rdi
lea    0xe99(%rip),%rsi
movsd  0xe4e(%rip),%xmm0
mov    $0x1,%al
call   1040 <sprintf@plt>
add    %eax,%ebx
lea    0xe91(%rip),%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.s = [10 x i8] c"ordenador\00"
@.str = [16 x i8] c"\09Cadena: %s\0A\00"
@.str.1 = [17 x i8] c"\09Car\C3\A1cter: %c\0A\00"
@.str.2 = [16 x i8] c"\09Entero: %d\0A\00"
@.str.3 = [16 x i8] c"\09Real: %f\0A\00"
@.str.4 = [39 x i8] c"Salida:\0A%s\0AN\C3\BAmero de caracteres = %d\0A\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = alloca [10 x i8]
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
%7 = bitcast [10 x i8]* %2 to i8*
store i8 47, i8* %3
store i32 40, i32* %4
store float 0x3FF6A09EE0000000, float* %6
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%10 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %9)
store i32 %10, i32* %5
%11 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %3
%16 = sext i8 %15 to i32
%17 = call i32 (i8*, i8*, ...) @sprintf(i8* %14, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %16)
%18 = load i32, i32* %5
%19 = add nsw i32 %18, %17
store i32 %19, i32* %5
%20 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = load i32, i32* %4
%25 = call i32 (i8*, i8*, ...) @sprintf(i8* %23, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %24)
%26 = load i32, i32* %5
%27 = add nsw i32 %26, %25
store i32 %27, i32* %5
%28 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%29 = load i32, i32* %5
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8, i8* %28, i64 %30
%32 = load float, float* %6
%33 = fpext float %32 to double
%34 = call i32 (i8*, i8*, ...) @sprintf(i8* %31, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), double %33)
%35 = load i32, i32* %5
%36 = add nsw i32 %35, %34
store i32 %36, i32* %5
%37 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%38 = load i32, i32* %5
%39 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i8* %37, i32 %38)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [10 x i8] c"ordenador\00"
@.str = [16 x i8] c"\09Cadena: %s\0A\00"
@.str.1 = [17 x i8] c"\09Car\C3\A1cter: %c\0A\00"
@.str.2 = [16 x i8] c"\09Entero: %d\0A\00"
@.str.3 = [16 x i8] c"\09Real: %f\0A\00"
@.str.4 = [39 x i8] c"Salida:\0A%s\0AN\C3\BAmero de caracteres = %d\0A\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, i8*, ...) @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 %6
%8 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 47)
%9 = add nsw i32 %8, %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 %10
%12 = call i32 (i8*, i8*, ...) @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 40)
%13 = add nsw i32 %9, %12
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 %14
%16 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), double 0x3FF6A09EE0000000)
%17 = add nsw i32 %13, %16
%18 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i8* %3, i32 %17)
ret i32 0
}