#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*/ assert(int);
int multiplica_numeros(int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
int resta_numeros(int, int);
int test3(void) {
  int n = 5;
  int m = 3;
  int tmp = resta_numeros(n, m);
  assert(n - m == tmp);
  printf("%d - %d es igual a: %d\n", n, m, tmp);
  tmp = multiplica_numeros(n, m);
  assert(n * m == tmp);
  printf("%d * %d es igual a %d\n", n, m, tmp);
  return 0;
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <resta_numeros@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1060 <multiplica_numeros@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe54(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
push   %rbx
mov    $0x5,%edi
mov    $0x3,%esi
call   1050 <resta_numeros@plt>
mov    %eax,%ebx
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xe99(%rip),%rdi
mov    $0x5,%esi
mov    $0x3,%edx
mov    %ebx,%ecx
call   1030 <printf@plt>
mov    $0x5,%edi
mov    $0x3,%esi
call   1060 <multiplica_numeros@plt>
mov    %eax,%ebx
xor    %edi,%edi
cmp    $0xf,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xe7a(%rip),%rdi
mov    $0x5,%esi
mov    $0x3,%edx
mov    %ebx,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"%d - %d es igual a: %d\0A\00"
@.str.1 = [23 x i8] c"%d * %d es igual a %d\0A\00"
define i32 @test3() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 5, i32* %1
store i32 3, i32* %2
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = call i32 @resta_numeros(i32 %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = sub nsw i32 %7, %8
%10 = load i32, i32* %3
%11 = icmp eq i32 %9, %10
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i32, i32* %1
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %15, i32 %16)
%18 = load i32, i32* %1
%19 = load i32, i32* %2
%20 = call i32 @multiplica_numeros(i32 %18, i32 %19)
store i32 %20, i32* %3
%21 = load i32, i32* %1
%22 = load i32, i32* %2
%23 = mul nsw i32 %21, %22
%24 = load i32, i32* %3
%25 = icmp eq i32 %23, %24
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
%28 = load i32, i32* %1
%29 = load i32, i32* %2
%30 = load i32, i32* %3
%31 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %28, i32 %29, i32 %30)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"%d - %d es igual a: %d\0A\00"
@.str.1 = [23 x i8] c"%d * %d es igual a %d\0A\00"
define i32 @test3() {
%1 = tail call i32 @resta_numeros(i32 5, i32 3)
%2 = icmp eq i32 %1, 2
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 5, i32 3, i32 %1)
%6 = tail call i32 @multiplica_numeros(i32 5, i32 3)
%7 = icmp eq i32 %6, 15
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 5, i32 3, i32 %6)
ret i32 0
}