#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 log10(int);
int pow(int, int);
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *, int *);
main() {
  float x, P;
  int n, N, k;
  k = 1;
  n = 0;
  scanf("%f%d", &x, &N);
  P = (pow(x, k) * log10(k * x)) / (pow(k, 2) + k + 1);
  while (N > n) {
    P == P *P;
    N--;
  }
  printf("P=%f\n", P);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xe9c(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <scanf@plt>
cvttss2si -0x8(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1050 <pow@plt>
mov    %eax,-0x20(%rbp)
cvtsi2ssl -0x18(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
cvttss2si %xmm0,%edi
call   1060 <log10@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    -0x18(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11dd <main+0x9d>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    11c3 <main+0x83>
movss  -0xc(%rbp),%xmm0
lea    0xe1c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xeb6(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
cvttss2si 0x4(%rsp),%edi
mov    $0x1,%esi
call   1050 <pow@plt>
mov    %eax,%ebx
cvttss2si 0x4(%rsp),%edi
call   1060 <log10@plt>
mov    %eax,%ebp
mov    $0x1,%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    %eax,%ecx
cmpl   $0x0,(%rsp)
jle    1194 <main+0x54>
movl   $0x0,(%rsp)
imul   %ebx,%ebp
add    $0x2,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
lea    0xe5b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%f%d\00"
@.str.1 = [6 x i8] c"P=%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %6
store i32 0, i32* %4
%7 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %2, i32* %5)
%8 = load float, float* %2
%9 = fptosi float %8 to i32
%10 = load i32, i32* %6
%11 = call i32 @pow(i32 %9, i32 %10)
%12 = load i32, i32* %6
%13 = sitofp i32 %12 to float
%14 = load float, float* %2
%15 = fmul float %13, %14
%16 = fptosi float %15 to i32
%17 = call i32 @log10(i32 %16)
%18 = mul nsw i32 %11, %17
%19 = load i32, i32* %6
%20 = call i32 @pow(i32 %19, i32 2)
%21 = load i32, i32* %6
%22 = add nsw i32 %20, %21
%23 = add nsw i32 %22, 1
%24 = sdiv i32 %18, %23
%25 = sitofp i32 %24 to float
store float %25, float* %3
br label %26
26: ; preds = %30, %0
%27 = load i32, i32* %5
%28 = load i32, i32* %4
%29 = icmp sgt i32 %27, %28
br i1 %29, label %30, label %39
30: ; preds = %26
%31 = load float, float* %3
%32 = load float, float* %3
%33 = load float, float* %3
%34 = fmul float %32, %33
%35 = fcmp oeq float %31, %34
%36 = zext i1 %35 to i32
%37 = load i32, i32* %5
%38 = add nsw i32 %37, -1
store i32 %38, i32* %5
br label %26
39: ; preds = %26
%40 = load float, float* %3
%41 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %40)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%f%d\00"
@.str.1 = [6 x i8] c"P=%f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca i32
%3 = bitcast float* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float* %1, i32* %2)
%6 = load float, float* %1
%7 = fptosi float %6 to i32
%8 = call i32 @pow(i32 %7, i32 1)
%9 = load float, float* %1
%10 = fptosi float %9 to i32
%11 = call i32 @log10(i32 %10)
%12 = call i32 @pow(i32 1, i32 2)
%13 = load i32, i32* %2
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %0
store i32 0, i32* %2
br label %16
16: ; preds = %15, %0
%17 = mul nsw i32 %11, %8
%18 = add nsw i32 %12, 2
%19 = sdiv i32 %17, %18
%20 = sitofp i32 %19 to float
%21 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %20)
ret i32 0
}