#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 EXIT_SUCCESS;
int /*<<< orphan*/ potencia(double, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *, int *);
int main(int argc, char **argv) {
  int n;
  double x;
  printf("\nIntroduzca la base y el exponente: \n");
  scanf("%lf %d", &x, &n);
  printf("\nResultado: %lf", potencia(x, n));
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <scanf@plt>
movsd  -0x20(%rbp),%xmm0
mov    -0x14(%rbp),%edi
call   1050 <potencia@plt>
mov    %eax,%esi
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e54(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
lea    0xea9(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1050 <scanf@plt>
movsd  0x10(%rsp),%xmm0
mov    0xc(%rsp),%edi
call   1060 <potencia@plt>
lea    0xe8b(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e54(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [38 x i8] c"\0AIntroduzca la base y el exponente: \0A\00"
@.str.1 = [7 x i8] c"%lf %d\00"
@.str.2 = [16 x i8] c"\0AResultado: %lf\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double* %7, i32* %6)
%10 = load double, double* %7
%11 = load i32, i32* %6
%12 = call i32 @potencia(double %10, i32 %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"%lf %d\00"
@.str.2 = [16 x i8] c"\0AResultado: %lf\00"
@EXIT_SUCCESS = global i32 0
@str = [37 x i8] c"\0AIntroduzca la base y el exponente: \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca double
%5 = bitcast i32* %3 to i8*
%6 = bitcast double* %4 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double* %4, i32* %3)
%9 = load double, double* %4
%10 = load i32, i32* %3
%11 = call i32 @potencia(double %9, i32 %10)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %11)
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}