#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 */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int scanf(char *, double *, double *);
int main() {
  double a[10], b[10], c, d;
  int i = 0;
  while (scanf("%lf %lf", &c, &d) == 2) {
    a[i] = c;
    b[i] = d;
    i++;
  }
  for (int j = 0; j < sizeof(a) / sizeof(a[0]); j++) {
    double t = 1;
    for (int k = 0; k < b[j]; k++) {
      t *= a[j];
    }
    printf("%lf\n", t);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc4(%rbp)
lea    0xec5(%rip),%rdi
lea    -0xb8(%rbp),%rsi
lea    -0xc0(%rbp),%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    11a0 <main+0x80>
movsd  -0xb8(%rbp),%xmm0
ff
movslq -0xc4(%rbp),%rax
movsd  %xmm0,-0x60(%rbp,%rax,8)
movsd  -0xc0(%rbp),%xmm0
ff
movslq -0xc4(%rbp),%rax
movsd  %xmm0,-0xb0(%rbp,%rax,8)
ff ff
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    113c <main+0x1c>
movl   $0x0,-0xc8(%rbp)
movslq -0xc8(%rbp),%rax
cmp    $0xa,%rax
jae    1250 <main+0x130>
movsd  0xe3d(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movl   $0x0,-0xd4(%rbp)
cvtsi2sdl -0xd4(%rbp),%xmm1
ff
movslq -0xc8(%rbp),%rax
movsd  -0xb0(%rbp,%rax,8),%xmm0
ff ff
ucomisd %xmm1,%xmm0
jbe    1228 <main+0x108>
movslq -0xc8(%rbp),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
mulsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    11d5 <main+0xb5>
movsd  -0xd0(%rbp),%xmm0
ff
lea    0xdd9(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc8(%rbp)
jmp    11aa <main+0x8a>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xb8,%rsp
lea    0xedb(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    118e <main+0x6e>
xor    %ebx,%ebx
lea    0xec0(%rip),%r14
lea    0x8(%rsp),%r15
mov    %rsp,%r12
nopl   0x0(%rax,%rax,1)
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x60(%rsp,%rbx,1)
movsd  (%rsp),%xmm0
movsd  %xmm0,0x10(%rsp,%rbx,1)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   1040 <scanf@plt>
add    $0x8,%rbx
cmp    $0x2,%eax
je     1160 <main+0x40>
xor    %ebx,%ebx
lea    0xe81(%rip),%r14
jmp    11b2 <main+0x92>
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0xa,%rbx
je     11f6 <main+0xd6>
movsd  0x10(%rsp,%rbx,8),%xmm1
ucomisd 0xe48(%rip),%xmm1
movsd  0xe38(%rip),%xmm0
jbe    11a0 <main+0x80>
movsd  0x60(%rsp,%rbx,8),%xmm2
mov    $0x1,%eax
movsd  0xe23(%rip),%xmm0
nopl   (%rax)
xorps  %xmm3,%xmm3
cvtsi2sd %eax,%xmm3
mulsd  %xmm2,%xmm0
add    $0x1,%eax
ucomisd %xmm3,%xmm1
ja     11e0 <main+0xc0>
jmp    11a0 <main+0x80>
xor    %eax,%eax
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [5 x i8] c"%lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x double]
%3 = alloca [10 x double]
%4 = alloca double
%5 = alloca double
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
%9 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %6
br label %10
10: ; preds = %13, %0
%11 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %4, double* %5)
%12 = icmp eq i32 %11, 2
br i1 %12, label %13, label %24
13: ; preds = %10
%14 = load double, double* %4
%15 = load i32, i32* %6
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %16
store double %14, double* %17
%18 = load double, double* %5
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [10 x double], [10 x double]* %3, i64 0, i64 %20
store double %18, double* %21
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 1
store i32 %23, i32* %6
br label %10
24: ; preds = %10
store i32 0, i32* %7
br label %25
25: ; preds = %51, %24
%26 = load i32, i32* %7
%27 = sext i32 %26 to i64
%28 = icmp ult i64 %27, 10
br i1 %28, label %29, label %54
29: ; preds = %25
store double 1.000000e+00, double* %8
store i32 0, i32* %9
br label %30
30: ; preds = %45, %29
%31 = load i32, i32* %9
%32 = sitofp i32 %31 to double
%33 = load i32, i32* %7
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [10 x double], [10 x double]* %3, i64 0, i64 %34
%36 = load double, double* %35
%37 = fcmp olt double %32, %36
br i1 %37, label %38, label %48
38: ; preds = %30
%39 = load i32, i32* %7
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [10 x double], [10 x double]* %2, i64 0, i64 %40
%42 = load double, double* %41
%43 = load double, double* %8
%44 = fmul double %43, %42
store double %44, double* %8
br label %45
45: ; preds = %38
%46 = load i32, i32* %9
%47 = add nsw i32 %46, 1
store i32 %47, i32* %9
br label %30
48: ; preds = %30
%49 = load double, double* %8
%50 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %49)
br label %51
51: ; preds = %48
%52 = load i32, i32* %7
%53 = add nsw i32 %52, 1
store i32 %53, i32* %7
br label %25
54: ; preds = %25
ret i32 0
}

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