#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 /*<<< orphan*/ scanf(char *, float *, int *);
void main() {
  float R;
  int i, n;
  double result = 1;
  printf("input R and n\n");
  scanf("%f%d", &R, &n);
  for (i = 0; i < n; i++) {
    result = result * R;
  }
  printf("%.60f", result);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xed0(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    118f <main+0x6f>
movsd  -0x18(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    115e <main+0x3e>
movsd  -0x18(%rbp),%xmm0
lea    0xe81(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
lea    0xec4(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    (%rsp),%ecx
test   %ecx,%ecx
jle    1179 <main+0x49>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm1
lea    -0x1(%rcx),%edx
mov    %ecx,%eax
and    $0x7,%eax
cmp    $0x7,%edx
jae    1183 <main+0x53>
movsd  0xe89(%rip),%xmm0
jmp    11b5 <main+0x85>
movsd  0xe7f(%rip),%xmm0
jmp    11c9 <main+0x99>
and    $0xfffffff8,%ecx
movsd  0xe72(%rip),%xmm0
xchg   %ax,%ax
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
add    $0xfffffff8,%ecx
jne    1190 <main+0x60>
test   %eax,%eax
je     11c9 <main+0x99>
nopl   0x0(%rax)
mulsd  %xmm1,%xmm0
add    $0xffffffff,%eax
jne    11c0 <main+0x90>
lea    0xe3d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [15 x i8] c"input R and n\0A\00"
@.str.1 = [5 x i8] c"%f%d\00"
@.str.2 = [6 x i8] c"%.60f\00"
define void @main() {
%1 = alloca float
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
store double 1.000000e+00, double* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float* %1, i32* %3)
store i32 0, i32* %2
br label %7
7: ; preds = %16, %0
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %19
11: ; preds = %7
%12 = load double, double* %4
%13 = load float, float* %1
%14 = fpext float %13 to double
%15 = fmul double %12, %14
store double %15, double* %4
br label %16
16: ; preds = %11
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 1
store i32 %18, i32* %2
br label %7
19: ; preds = %7
%20 = load double, double* %4
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %20)
ret void
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%f%d\00"
@.str.2 = [6 x i8] c"%.60f\00"
@str = [14 x i8] c"input R and n\00"
define void @main() {
%1 = alloca float
%2 = alloca i32
%3 = bitcast float* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float* %1, i32* %2)
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %40
9: ; preds = %0
%10 = load float, float* %1
%11 = fpext float %10 to double
%12 = add i32 %7, -1
%13 = and i32 %7, 7
%14 = icmp ult i32 %12, 7
br i1 %14, label %30, label %15
15: ; preds = %9
%16 = and i32 %7, -8
br label %17
17: ; preds = %17, %15
%18 = phi double [ 1.000000e+00, %15 ], [ %27, %17 ]
%19 = phi i32 [ 0, %15 ], [ %28, %17 ]
%20 = fmul double %18, %11
%21 = fmul double %20, %11
%22 = fmul double %21, %11
%23 = fmul double %22, %11
%24 = fmul double %23, %11
%25 = fmul double %24, %11
%26 = fmul double %25, %11
%27 = fmul double %26, %11
%28 = add i32 %19, 8
%29 = icmp eq i32 %28, %16
br i1 %29, label %30, label %17
30: ; preds = %17, %9
%31 = phi double [ undef, %9 ], [ %27, %17 ]
%32 = phi double [ 1.000000e+00, %9 ], [ %27, %17 ]
%33 = icmp eq i32 %13, 0
br i1 %33, label %40, label %34
34: ; preds = %30, %34
%35 = phi double [ %37, %34 ], [ %32, %30 ]
%36 = phi i32 [ %38, %34 ], [ 0, %30 ]
%37 = fmul double %35, %11
%38 = add i32 %36, 1
%39 = icmp eq i32 %38, %13
br i1 %39, label %40, label %34
40: ; preds = %30, %34, %0
%41 = phi double [ 1.000000e+00, %0 ], [ %31, %30 ], [ %37, %34 ]
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %41)
ret void
}