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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     1169 <main+0x49>
movslq -0x8(%rbp),%rax
lea    -0x40(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeae(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
cvtsi2ssl -0x18(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
movl   $0xa,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     11b6 <main+0x96>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
cvtsi2ssl -0x40(%rbp,%rax,4),%xmm0
movss  0xe66(%rip),%xmm1
divss  -0x44(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    117a <main+0x5a>
movss  -0x44(%rbp),%xmm0
lea    0xe45(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xed8(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x24(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
cvtsi2ssl 0x28(%rsp),%xmm1
cvtsi2ssl 0x24(%rsp),%xmm2
movss  0xe33(%rip),%xmm0
movaps %xmm0,%xmm3
cvtsi2ssl 0x20(%rsp),%xmm4
divss  %xmm1,%xmm3
addss  %xmm2,%xmm3
movaps %xmm0,%xmm1
divss  %xmm3,%xmm1
addss  %xmm4,%xmm1
xorps  %xmm2,%xmm2
cvtsi2ssl 0x1c(%rsp),%xmm2
movaps %xmm0,%xmm3
divss  %xmm1,%xmm3
addss  %xmm2,%xmm3
xorps  %xmm1,%xmm1
cvtsi2ssl 0x18(%rsp),%xmm1
movaps %xmm0,%xmm2
divss  %xmm3,%xmm2
xorps  %xmm3,%xmm3
cvtsi2ssl 0x14(%rsp),%xmm3
addss  %xmm1,%xmm2
movaps %xmm0,%xmm1
xorps  %xmm4,%xmm4
cvtsi2ssl 0x10(%rsp),%xmm4
divss  %xmm2,%xmm1
addss  %xmm3,%xmm1
movaps %xmm0,%xmm2
divss  %xmm1,%xmm2
addss  %xmm4,%xmm2
xorps  %xmm1,%xmm1
cvtsi2ssl 0xc(%rsp),%xmm1
movaps %xmm0,%xmm3
divss  %xmm2,%xmm3
addss  %xmm1,%xmm3
xorps  %xmm1,%xmm1
cvtsi2ssl 0x8(%rsp),%xmm1
movaps %xmm0,%xmm2
divss  %xmm3,%xmm2
xorps  %xmm3,%xmm3
cvtsi2ssl 0x4(%rsp),%xmm3
addss  %xmm1,%xmm2
movaps %xmm0,%xmm1
xorps  %xmm4,%xmm4
cvtsi2ssl (%rsp),%xmm4
divss  %xmm2,%xmm1
addss  %xmm3,%xmm1
divss  %xmm1,%xmm0
addss  %xmm4,%xmm0
lea    0xd7b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca [11 x i32]
%2 = bitcast [11 x i32]* %1 to i8*
%3 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 1
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%7 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 2
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
%9 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 3
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %9)
%11 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 4
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %11)
%13 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 5
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %13)
%15 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 6
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %15)
%17 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 7
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %17)
%19 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 8
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %19)
%21 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 9
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %21)
%23 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 10
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %23)
%25 = load i32, i32* %23
%26 = sitofp i32 %25 to float
%27 = load i32, i32* %21
%28 = sitofp i32 %27 to float
%29 = fdiv float 1.000000e+00, %26
%30 = fadd float %29, %28
%31 = load i32, i32* %19
%32 = sitofp i32 %31 to float
%33 = fdiv float 1.000000e+00, %30
%34 = fadd float %33, %32
%35 = load i32, i32* %17
%36 = sitofp i32 %35 to float
%37 = fdiv float 1.000000e+00, %34
%38 = fadd float %37, %36
%39 = load i32, i32* %15
%40 = sitofp i32 %39 to float
%41 = fdiv float 1.000000e+00, %38
%42 = fadd float %41, %40
%43 = load i32, i32* %13
%44 = sitofp i32 %43 to float
%45 = fdiv float 1.000000e+00, %42
%46 = fadd float %45, %44
%47 = load i32, i32* %11
%48 = sitofp i32 %47 to float
%49 = fdiv float 1.000000e+00, %46
%50 = fadd float %49, %48
%51 = load i32, i32* %9
%52 = sitofp i32 %51 to float
%53 = fdiv float 1.000000e+00, %50
%54 = fadd float %53, %52
%55 = load i32, i32* %7
%56 = sitofp i32 %55 to float
%57 = fdiv float 1.000000e+00, %54
%58 = fadd float %57, %56
%59 = load i32, i32* %5
%60 = sitofp i32 %59 to float
%61 = fdiv float 1.000000e+00, %58
%62 = fadd float %61, %60
%63 = load i32, i32* %3
%64 = sitofp i32 %63 to float
%65 = fdiv float 1.000000e+00, %62
%66 = fadd float %65, %64
%67 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float %66)
ret i32 0
}