#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 */
double calculate(float, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *, int *);
int main() {
  float R;
  int n, i;
  double a[6];
  for (i = 0; i < 6; i++) {
    scanf("%f %d", &R, &n);
    a[i] = calculate(R, n);
  }
  for (i = 0; i < 6; i++) {
    printf("%lf", a[i]);
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x6,-0x10(%rbp)
jge    1189 <main+0x59>
lea    0xea9(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
movss  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
call   1040 <calculate@plt>
movslq -0x10(%rbp),%rax
movsd  %xmm0,-0x40(%rbp,%rax,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1146 <main+0x16>
movl   $0x0,-0x10(%rbp)
cmpl   $0x6,-0x10(%rbp)
jge    11ce <main+0x9e>
movslq -0x10(%rbp),%rax
movsd  -0x40(%rbp,%rax,8),%xmm0
lea    0xe5b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1190 <main+0x60>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
lea    0xeb0(%rip),%rbx
lea    0xc(%rsp),%r14
lea    0x8(%rsp),%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1060 <scanf@plt>
movss  0xc(%rsp),%xmm0
mov    0x8(%rsp),%edi
call   1050 <calculate@plt>
movsd  %xmm0,0x38(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1060 <scanf@plt>
movss  0xc(%rsp),%xmm0
mov    0x8(%rsp),%edi
call   1050 <calculate@plt>
movsd  %xmm0,0x30(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1060 <scanf@plt>
movss  0xc(%rsp),%xmm0
mov    0x8(%rsp),%edi
call   1050 <calculate@plt>
movsd  %xmm0,0x28(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1060 <scanf@plt>
movss  0xc(%rsp),%xmm0
mov    0x8(%rsp),%edi
call   1050 <calculate@plt>
movsd  %xmm0,0x20(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1060 <scanf@plt>
movss  0xc(%rsp),%xmm0
mov    0x8(%rsp),%edi
call   1050 <calculate@plt>
movsd  %xmm0,0x18(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1060 <scanf@plt>
movss  0xc(%rsp),%xmm0
mov    0x8(%rsp),%edi
call   1050 <calculate@plt>
movsd  %xmm0,0x10(%rsp)
lea    0xdd3(%rip),%rbx
mov    %rbx,%rdi
movsd  0x38(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
movsd  0x30(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
movsd  0x28(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
movsd  0x20(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
movsd  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%f %d\00"
@.str.1 = [4 x i8] c"%lf\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 ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, i32* %2)
%6 = load float, float* %1
%7 = load i32, i32* %2
%8 = call double @calculate(float %6, i32 %7)
%9 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, i32* %2)
%10 = load float, float* %1
%11 = load i32, i32* %2
%12 = call double @calculate(float %10, i32 %11)
%13 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, i32* %2)
%14 = load float, float* %1
%15 = load i32, i32* %2
%16 = call double @calculate(float %14, i32 %15)
%17 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, i32* %2)
%18 = load float, float* %1
%19 = load i32, i32* %2
%20 = call double @calculate(float %18, i32 %19)
%21 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, i32* %2)
%22 = load float, float* %1
%23 = load i32, i32* %2
%24 = call double @calculate(float %22, i32 %23)
%25 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, i32* %2)
%26 = load float, float* %1
%27 = load i32, i32* %2
%28 = call double @calculate(float %26, i32 %27)
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %8)
%30 = call i32 @putchar(i32 10)
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %12)
%32 = call i32 @putchar(i32 10)
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %16)
%34 = call i32 @putchar(i32 10)
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %20)
%36 = call i32 @putchar(i32 10)
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %24)
%38 = call i32 @putchar(i32 10)
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %28)
%40 = call i32 @putchar(i32 10)
ret i32 0
}