#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 */
scalar_t__ es_capicua(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/, char *, int *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main() {
  int num;
  fprintf(stdout, "Dime un numero: ");
  fscanf(stdin, "%d", &num);
  if (es_capicua(num)) {
    fprintf(stdout, "El numero %d es capicua\n", num);
  } else {
    fprintf(stdout, "El numero %d NO es capicua\n", num);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xeb1(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
lea    -0x8(%rbp),%rdx
call   1030 <fscanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <es_capicua@plt>
cmp    $0x0,%rax
je     11a0 <main+0x70>
mov    0x2e50(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xe80(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    11ba <main+0x8a>
mov    0x2e31(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xe7a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0x2e9c(%rip),%rbx
mov    (%rbx),%edi
lea    0xebb(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
lea    0xc(%rsp),%rdx
call   1030 <fscanf@plt>
mov    0xc(%rsp),%edi
call   1040 <es_capicua@plt>
test   %rax,%rax
mov    (%rbx),%edi
mov    0xc(%rsp),%edx
lea    0xeae(%rip),%rax
lea    0xe8e(%rip),%rsi
cmove  %rax,%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [17 x i8] c"Dime un numero: \00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [25 x i8] c"El numero %d es capicua\0A\00"
@.str.3 = [28 x i8] c"El numero %d NO es capicua\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @stdout
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stdin
%6 = call i32 @fscanf(i32 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = call i64 @es_capicua(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %0
%11 = load i32, i32* @stdout
%12 = load i32, i32* %2
%13 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %12)
br label %18
14: ; preds = %0
%15 = load i32, i32* @stdout
%16 = load i32, i32* %2
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %14, %10
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [17 x i8] c"Dime un numero: \00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [25 x i8] c"El numero %d es capicua\0A\00"
@.str.3 = [28 x i8] c"El numero %d NO es capicua\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* @stdout
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stdin
%6 = call i32 @fscanf(i32 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = call i64 @es_capicua(i32 %7)
%9 = icmp eq i64 %8, 0
%10 = load i32, i32* @stdout
%11 = load i32, i32* %1
%12 = select i1 %9, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0)
%13 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* %12, i32 %11)
ret i32 0
}