#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 dato1, dato2, dato3, resultado;
  dato1 = 20;
  dato2 = 10;
  dato3 = 2;
  resultado = dato1 + dato2 + dato3;
  printf("%d + %d + %d = %d\n", dato1, dato2, dato3, resultado);
  resultado = dato1 - dato2 - dato3;
  printf("%d - %d - %d = %d\n", dato1, dato2, dato3, resultado);
  resultado = dato1 * dato2 * dato3;
  printf("%d * %d * %d = %d\n", dato1, dato2, dato3, resultado);
  resultado = dato1 / dato2 / dato3;
  printf("%d / %d / %d = %d\n", dato1, dato2, dato3, resultado);
  resultado = dato1 * dato2 + dato3;
  printf("resultado = %d\n", resultado);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x14,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x14,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
mov    $0x20,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x14,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
mov    $0x8,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
mov    $0x14,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
mov    $0x190,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
mov    $0x14,%esi
mov    $0xa,%edx
mov    $0x2,%ecx
mov    $0x1,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xea8(%rip),%rdi
mov    $0xca,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"%d + %d + %d = %d\0A\00"
@.str.1 = [19 x i8] c"%d - %d - %d = %d\0A\00"
@.str.2 = [19 x i8] c"%d * %d * %d = %d\0A\00"
@.str.3 = [19 x i8] c"%d / %d / %d = %d\0A\00"
@.str.4 = [16 x i8] c"resultado = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 20, i32* %1
store i32 10, i32* %2
store i32 2, i32* %3
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = add nsw i32 %5, %6
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
store i32 %9, i32* %4
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11, i32 %12, i32 %13)
%15 = load i32, i32* %1
%16 = load i32, i32* %2
%17 = sub nsw i32 %15, %16
%18 = load i32, i32* %3
%19 = sub nsw i32 %17, %18
store i32 %19, i32* %4
%20 = load i32, i32* %1
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %20, i32 %21, i32 %22, i32 %23)
%25 = load i32, i32* %1
%26 = load i32, i32* %2
%27 = mul nsw i32 %25, %26
%28 = load i32, i32* %3
%29 = mul nsw i32 %27, %28
store i32 %29, i32* %4
%30 = load i32, i32* %1
%31 = load i32, i32* %2
%32 = load i32, i32* %3
%33 = load i32, i32* %4
%34 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %30, i32 %31, i32 %32, i32 %33)
%35 = load i32, i32* %1
%36 = load i32, i32* %2
%37 = sdiv i32 %35, %36
%38 = load i32, i32* %3
%39 = sdiv i32 %37, %38
store i32 %39, i32* %4
%40 = load i32, i32* %1
%41 = load i32, i32* %2
%42 = load i32, i32* %3
%43 = load i32, i32* %4
%44 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %40, i32 %41, i32 %42, i32 %43)
%45 = load i32, i32* %1
%46 = load i32, i32* %2
%47 = mul nsw i32 %45, %46
%48 = load i32, i32* %3
%49 = add nsw i32 %47, %48
store i32 %49, i32* %4
%50 = load i32, i32* %4
%51 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %50)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"%d + %d + %d = %d\0A\00"
@.str.1 = [19 x i8] c"%d - %d - %d = %d\0A\00"
@.str.2 = [19 x i8] c"%d * %d * %d = %d\0A\00"
@.str.3 = [19 x i8] c"%d / %d / %d = %d\0A\00"
@.str.4 = [16 x i8] c"resultado = %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 20, i32 10, i32 2, i32 32)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 20, i32 10, i32 2, i32 8)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 20, i32 10, i32 2, i32 400)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 20, i32 10, i32 2, i32 1)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 202)
ret i32 0
}