#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 *, double);
int /*<<< orphan*/ scanf(char *, double *, int *);
int main() {
  double a, total;
  int b, i;
  scanf("%lf %d", &a, &b);
  total = a;
  if (b == 0) {
    total = 1;
  } else {
    for (i = 0; i < b - 1; i++) {
      total = total * a;
    }
  }
  printf("%.4lf", total);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1169 <main+0x49>
movsd  0xea1(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    11a3 <main+0x83>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    119e <main+0x7e>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1170 <main+0x50>
jmp    11a3 <main+0x83>
movsd  -0x18(%rbp),%xmm0
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xedd(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1040 <scanf@plt>
mov    0xc(%rsp),%edx
test   %edx,%edx
je     11ab <main+0x8b>
movsd  0x10(%rsp),%xmm1
cmp    $0x2,%edx
jl     11b5 <main+0x95>
lea    -0x1(%rdx),%ecx
add    $0xfffffffe,%edx
mov    %ecx,%eax
and    $0x7,%eax
movapd %xmm1,%xmm0
cmp    $0x7,%edx
jb     1195 <main+0x75>
and    $0xfffffff8,%ecx
movapd %xmm1,%xmm0
nopl   0x0(%rax,%rax,1)
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    1170 <main+0x50>
test   %eax,%eax
je     11b9 <main+0x99>
nopl   0x0(%rax)
mulsd  %xmm1,%xmm0
add    $0xffffffff,%eax
jne    11a0 <main+0x80>
jmp    11b9 <main+0x99>
movsd  0xe4d(%rip),%xmm0
jmp    11b9 <main+0x99>
movapd %xmm1,%xmm0
lea    0xe4f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%lf %d\00"
@.str.1 = [6 x i8] c"%.4lf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %2, i32* %4)
%7 = load double, double* %2
store double %7, double* %3
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %0
store double 1.000000e+00, double* %3
br label %25
11: ; preds = %0
store i32 0, i32* %5
br label %12
12: ; preds = %21, %11
%13 = load i32, i32* %5
%14 = load i32, i32* %4
%15 = sub nsw i32 %14, 1
%16 = icmp slt i32 %13, %15
br i1 %16, label %17, label %24
17: ; preds = %12
%18 = load double, double* %3
%19 = load double, double* %2
%20 = fmul double %18, %19
store double %20, double* %3
br label %21
21: ; preds = %17
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %12
24: ; preds = %12
br label %25
25: ; preds = %24, %10
%26 = load double, double* %3
%27 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %26)
ret i32 0
}

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