#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 */
long double pow(int, long long);
int /*<<< orphan*/ printf(char *, long double);
int /*<<< orphan*/ scanf(char *, ...);
long double sqrt(int);
int main(void) {
  long long int i, k, s;
  long double ai, bi, a, b, ak, bk, a1, b1, c, d, q;
  scanf("%lld", &i);
  scanf("%lld", &k);
  scanf("%lld", &s);
  scanf("%Lf", &ai);
  scanf("%Lf", &bi);
  if (i % 2 == 0 && k % 2 == 0) {
    i = (i - 1) / 2;
    a1 = ai / (pow(16, i));
    b1 = bi / (pow(16, i));
    s = s - (k - 1) / 2 * 4;
    q = (a1 + b1) / (pow(2, s));
  } else if (i % 2 == 0 && k % 2 != 0) {
    a = sqrt(2) * (ai + bi) - sqrt(2) * sqrt(3) * (ai - bi);
    b = sqrt(2) * (ai - bi) + sqrt(2) * sqrt(3) * (ai + bi);
    a1 = a / (pow(16, i / 2));
    b1 = b / (pow(16, i / 2));
    s = s - ((k - 1) / 2) * 4;
    q = (a1 + b1) / (pow(2, s));
  } else if (i % 2 != 0 && k % 2 == 0) {
    a = sqrt(2) * (ai + bi) - sqrt(2) * sqrt(3) * (ai - bi);
    b = sqrt(2) * (ai - bi) + sqrt(2) * sqrt(3) * (ai + bi);
    i = i / 2;
    a1 = a / (pow(16, i));
    b1 = b / (pow(16, i));
    s = s - ((k - 1) / 2) * 4;
    q = (a1 + b1) / pow(2, s);
  } else if (i % 2 != 0 && k % 2 != 0) {
    i = i / 2;
    a1 = ai / (pow(16, i));
    b1 = bi / (pow(16, i));
    s = s - ((k - 1) / 2) * 4;
    q = (a1 + b1) / pow(2, s);
  }
  printf("%Lf", q);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea7(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe95(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe83(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe76(%rip),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe64(%rip),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    12a3 <main+0x163>
mov    -0x18(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    12a3 <main+0x163>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
shr    $0x3f,%rcx
lea    -0x1(%rax,%rcx,1),%rax
sar    %rax
mov    %rax,-0x10(%rbp)
fldt   -0x30(%rbp)
fstpt  -0xf4(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x10,%edi
mov    %edi,-0xf8(%rbp)
call   1050 <pow@plt>
mov    -0xf8(%rbp),%edi
fldt   -0xf4(%rbp)
fdivp  %st,%st(1)
fstpt  -0x90(%rbp)
fldt   -0x40(%rbp)
fstpt  -0xe8(%rbp)
mov    -0x10(%rbp),%rsi
call   1050 <pow@plt>
fldt   -0xe8(%rbp)
fdivp  %st,%st(1)
fstpt  -0xa0(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0xffffffffffffffff,%rdx
shr    $0x3f,%rdx
lea    -0x1(%rcx,%rdx,1),%rcx
add    %rcx,%rcx
and    $0xfffffffffffffffc,%rcx
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
fldt   -0x90(%rbp)
fldt   -0xa0(%rbp)
faddp  %st,%st(1)
fstpt  -0xdc(%rbp)
mov    -0x20(%rbp),%rsi
mov    $0x2,%edi
call   1050 <pow@plt>
fldt   -0xdc(%rbp)
fdivp  %st,%st(1)
fstpt  -0xd0(%rbp)
jmp    1723 <main+0x5e3>
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    1468 <main+0x328>
mov    -0x18(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
je     1468 <main+0x328>
mov    $0x2,%edi
mov    %edi,-0x114(%rbp)
call   1060 <sqrt@plt>
mov    -0x114(%rbp),%edi
fstpt  -0x158(%rbp)
fldt   -0x30(%rbp)
fldt   -0x40(%rbp)
faddp  %st,%st(1)
fstpt  -0x164(%rbp)
call   1060 <sqrt@plt>
fstpt  -0x170(%rbp)
mov    $0x3,%edi
mov    %edi,-0x14c(%rbp)
call   1060 <sqrt@plt>
fldt   -0x170(%rbp)
fldt   -0x164(%rbp)
mov    -0x114(%rbp),%edi
fldt   -0x158(%rbp)
fxch   %st(2)
fmulp  %st,%st(3)
fldt   -0x30(%rbp)
fldt   -0x40(%rbp)
fsubrp %st,%st(1)
fmulp  %st,%st(3)
fmulp  %st,%st(1)
fsubp  %st,%st(1)
fstpt  -0x50(%rbp)
call   1060 <sqrt@plt>
mov    -0x114(%rbp),%edi
fstpt  -0x130(%rbp)
fldt   -0x30(%rbp)
fldt   -0x40(%rbp)
fsubrp %st,%st(1)
fstpt  -0x13c(%rbp)
call   1060 <sqrt@plt>
mov    -0x14c(%rbp),%edi
fstpt  -0x148(%rbp)
call   1060 <sqrt@plt>
fldt   -0x148(%rbp)
fldt   -0x13c(%rbp)
fldt   -0x130(%rbp)
fxch   %st(2)
fmulp  %st,%st(3)
fldt   -0x30(%rbp)
fldt   -0x40(%rbp)
faddp  %st,%st(1)
fmulp  %st,%st(3)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fstpt  -0x60(%rbp)
fldt   -0x50(%rbp)
fstpt  -0x120(%rbp)
mov    -0x10(%rbp),%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
add    %rax,%rsi
sar    %rsi
mov    $0x10,%edi
mov    %edi,-0x124(%rbp)
call   1050 <pow@plt>
mov    -0x124(%rbp),%edi
fldt   -0x120(%rbp)
fdivp  %st,%st(1)
fstpt  -0x90(%rbp)
fldt   -0x60(%rbp)
fstpt  -0x110(%rbp)
mov    -0x10(%rbp),%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
add    %rax,%rsi
sar    %rsi
call   1050 <pow@plt>
mov    -0x114(%rbp),%edi
fldt   -0x110(%rbp)
fdivp  %st,%st(1)
fstpt  -0xa0(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0xffffffffffffffff,%rdx
shr    $0x3f,%rdx
lea    -0x1(%rcx,%rdx,1),%rcx
add    %rcx,%rcx
and    $0xfffffffffffffffc,%rcx
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
fldt   -0x90(%rbp)
fldt   -0xa0(%rbp)
faddp  %st,%st(1)
fstpt  -0x104(%rbp)
mov    -0x20(%rbp),%rsi
call   1050 <pow@plt>
fldt   -0x104(%rbp)
fdivp  %st,%st(1)
fstpt  -0xd0(%rbp)
jmp    171e <main+0x5de>
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
je     1628 <main+0x4e8>
mov    -0x18(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    1628 <main+0x4e8>
mov    $0x2,%edi
mov    %edi,-0x18c(%rbp)
call   1060 <sqrt@plt>
mov    -0x18c(%rbp),%edi
fstpt  -0x1d0(%rbp)
fldt   -0x30(%rbp)
fldt   -0x40(%rbp)
faddp  %st,%st(1)
fstpt  -0x1dc(%rbp)
call   1060 <sqrt@plt>
fstpt  -0x1e8(%rbp)
mov    $0x3,%edi
mov    %edi,-0x1c4(%rbp)
call   1060 <sqrt@plt>
fldt   -0x1e8(%rbp)
fldt   -0x1dc(%rbp)
mov    -0x18c(%rbp),%edi
fldt   -0x1d0(%rbp)
fxch   %st(2)
fmulp  %st,%st(3)
fldt   -0x30(%rbp)
fldt   -0x40(%rbp)
fsubrp %st,%st(1)
fmulp  %st,%st(3)
fmulp  %st,%st(1)
fsubp  %st,%st(1)
fstpt  -0x50(%rbp)
call   1060 <sqrt@plt>
mov    -0x18c(%rbp),%edi
fstpt  -0x1a8(%rbp)
fldt   -0x30(%rbp)
fldt   -0x40(%rbp)
fsubrp %st,%st(1)
fstpt  -0x1b4(%rbp)
call   1060 <sqrt@plt>
mov    -0x1c4(%rbp),%edi
fstpt  -0x1c0(%rbp)
call   1060 <sqrt@plt>
fldt   -0x1c0(%rbp)
fldt   -0x1b4(%rbp)
fldt   -0x1a8(%rbp)
fxch   %st(2)
fmulp  %st,%st(3)
fldt   -0x30(%rbp)
fldt   -0x40(%rbp)
faddp  %st,%st(1)
fmulp  %st,%st(3)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fstpt  -0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
add    %rcx,%rax
sar    %rax
mov    %rax,-0x10(%rbp)
fldt   -0x50(%rbp)
fstpt  -0x198(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x10,%edi
mov    %edi,-0x19c(%rbp)
call   1050 <pow@plt>
mov    -0x19c(%rbp),%edi
fldt   -0x198(%rbp)
fdivp  %st,%st(1)
fstpt  -0x90(%rbp)
fldt   -0x60(%rbp)
fstpt  -0x188(%rbp)
mov    -0x10(%rbp),%rsi
call   1050 <pow@plt>
mov    -0x18c(%rbp),%edi
fldt   -0x188(%rbp)
fdivp  %st,%st(1)
fstpt  -0xa0(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0xffffffffffffffff,%rdx
shr    $0x3f,%rdx
lea    -0x1(%rcx,%rdx,1),%rcx
add    %rcx,%rcx
and    $0xfffffffffffffffc,%rcx
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
fldt   -0x90(%rbp)
fldt   -0xa0(%rbp)
faddp  %st,%st(1)
fstpt  -0x17c(%rbp)
mov    -0x20(%rbp),%rsi
call   1050 <pow@plt>
fldt   -0x17c(%rbp)
fdivp  %st,%st(1)
fstpt  -0xd0(%rbp)
jmp    1719 <main+0x5d9>
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
je     1714 <main+0x5d4>
mov    -0x18(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
je     1714 <main+0x5d4>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
add    %rcx,%rax
sar    %rax
mov    %rax,-0x10(%rbp)
fldt   -0x30(%rbp)
fstpt  -0x20c(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x10,%edi
mov    %edi,-0x210(%rbp)
call   1050 <pow@plt>
mov    -0x210(%rbp),%edi
fldt   -0x20c(%rbp)
fdivp  %st,%st(1)
fstpt  -0x90(%rbp)
fldt   -0x40(%rbp)
fstpt  -0x200(%rbp)
mov    -0x10(%rbp),%rsi
call   1050 <pow@plt>
fldt   -0x200(%rbp)
fdivp  %st,%st(1)
fstpt  -0xa0(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0xffffffffffffffff,%rdx
shr    $0x3f,%rdx
lea    -0x1(%rcx,%rdx,1),%rcx
add    %rcx,%rcx
and    $0xfffffffffffffffc,%rcx
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
fldt   -0x90(%rbp)
fldt   -0xa0(%rbp)
faddp  %st,%st(1)
fstpt  -0x1f4(%rbp)
mov    -0x20(%rbp),%rsi
mov    $0x2,%edi
call   1050 <pow@plt>
fldt   -0x1f4(%rbp)
fdivp  %st,%st(1)
fstpt  -0xd0(%rbp)
jmp    1719 <main+0x5d9>
jmp    171e <main+0x5de>
jmp    1723 <main+0x5e3>
fldt   -0xd0(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0x8d0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
lea    0xeb1(%rip),%rbx
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0x48(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xe82(%rip),%rbx
lea    0x60(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0x50(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x28(%rsp),%rax
mov    0x48(%rsp),%rcx
test   $0x1,%al
jne    11cd <main+0x8d>
test   $0x1,%cl
jne    12b2 <main+0x172>
lea    -0x1(%rax),%rcx
shr    $0x3f,%rcx
lea    (%rax,%rcx,1),%rsi
add    $0xffffffffffffffff,%rsi
jmp    13a2 <main+0x262>
test   $0x1,%cl
jne    1398 <main+0x258>
mov    $0x2,%edi
call   1060 <sqrt@plt>
fstpt  0x10(%rsp)
fldt   0x60(%rsp)
fldt   0x50(%rsp)
faddp  %st,%st(1)
fstpt  0x1c(%rsp)
mov    $0x2,%edi
call   1060 <sqrt@plt>
fstpt  0x3c(%rsp)
mov    $0x3,%edi
call   1060 <sqrt@plt>
fldt   0x60(%rsp)
fldt   0x50(%rsp)
fsubrp %st,%st(1)
fldt   0x3c(%rsp)
fmulp  %st,%st(2)
fmulp  %st,%st(1)
fldt   0x10(%rsp)
fldt   0x1c(%rsp)
fmulp  %st,%st(1)
fsubp  %st,%st(1)
fstpt  0x10(%rsp)
mov    $0x2,%edi
call   1060 <sqrt@plt>
fstpt  0x1c(%rsp)
fldt   0x60(%rsp)
fldt   0x50(%rsp)
fsubrp %st,%st(1)
fstpt  0x3c(%rsp)
mov    $0x2,%edi
call   1060 <sqrt@plt>
fstpt  0x74(%rsp)
mov    $0x3,%edi
call   1060 <sqrt@plt>
fldt   0x74(%rsp)
fmulp  %st,%st(1)
fldt   0x60(%rsp)
fldt   0x50(%rsp)
faddp  %st,%st(1)
fmulp  %st,%st(1)
fldt   0x1c(%rsp)
fldt   0x3c(%rsp)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fstpt  0x1c(%rsp)
mov    0x28(%rsp),%rax
mov    %rax,%rsi
shr    $0x3f,%rsi
add    %rax,%rsi
sar    %rsi
mov    %rsi,0x28(%rsp)
mov    $0x10,%edi
call   1050 <pow@plt>
fldt   0x10(%rsp)
fdivp  %st,%st(1)
fstpt  0x10(%rsp)
jmp    13ce <main+0x28e>
mov    $0x2,%edi
call   1060 <sqrt@plt>
fstpt  0x10(%rsp)
fldt   0x60(%rsp)
fldt   0x50(%rsp)
faddp  %st,%st(1)
fstpt  0x1c(%rsp)
mov    $0x2,%edi
call   1060 <sqrt@plt>
fstpt  0x3c(%rsp)
mov    $0x3,%edi
call   1060 <sqrt@plt>
fldt   0x60(%rsp)
fldt   0x50(%rsp)
fsubrp %st,%st(1)
fldt   0x3c(%rsp)
fmulp  %st,%st(2)
fmulp  %st,%st(1)
fldt   0x10(%rsp)
fldt   0x1c(%rsp)
fmulp  %st,%st(1)
fsubp  %st,%st(1)
fstpt  0x10(%rsp)
mov    $0x2,%edi
call   1060 <sqrt@plt>
fstpt  0x1c(%rsp)
fldt   0x60(%rsp)
fldt   0x50(%rsp)
fsubrp %st,%st(1)
fstpt  0x3c(%rsp)
mov    $0x2,%edi
call   1060 <sqrt@plt>
fstpt  0x74(%rsp)
mov    $0x3,%edi
call   1060 <sqrt@plt>
fldt   0x74(%rsp)
fmulp  %st,%st(1)
fldt   0x60(%rsp)
fldt   0x50(%rsp)
faddp  %st,%st(1)
fmulp  %st,%st(1)
fldt   0x1c(%rsp)
fldt   0x3c(%rsp)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fstpt  0x1c(%rsp)
mov    0x28(%rsp),%rax
mov    %rax,%rsi
shr    $0x3f,%rsi
add    %rax,%rsi
sar    %rsi
mov    $0x10,%edi
call   1050 <pow@plt>
fldt   0x10(%rsp)
fdivp  %st,%st(1)
fstpt  0x10(%rsp)
mov    0x28(%rsp),%rax
mov    %rax,%rsi
shr    $0x3f,%rsi
add    %rax,%rsi
sar    %rsi
jmp    13d3 <main+0x293>
mov    %rax,%rsi
shr    $0x3f,%rsi
add    %rax,%rsi
sar    %rsi
mov    %rsi,0x28(%rsp)
fldt   0x60(%rsp)
fstpt  0x10(%rsp)
mov    $0x10,%edi
call   1050 <pow@plt>
fldt   0x10(%rsp)
fdivp  %st,%st(1)
fstpt  0x10(%rsp)
fldt   0x50(%rsp)
fstpt  0x1c(%rsp)
mov    0x28(%rsp),%rsi
mov    $0x10,%edi
call   1050 <pow@plt>
fldt   0x1c(%rsp)
fdivp  %st,%st(1)
fldt   0x10(%rsp)
faddp  %st,%st(1)
fstpt  0x10(%rsp)
mov    0x30(%rsp),%rsi
mov    0x48(%rsp),%rax
lea    -0x1(%rax),%rcx
shr    $0x3f,%rcx
add    %rcx,%rax
add    $0xffffffffffffffff,%rax
add    %rax,%rax
and    $0xfffffffffffffffc,%rax
sub    %rax,%rsi
mov    %rsi,0x30(%rsp)
mov    $0x2,%edi
call   1050 <pow@plt>
fldt   0x10(%rsp)
fdivp  %st,%st(1)
fstpt  (%rsp)
lea    0xbd6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [4 x i8] c"%Lf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca x86_fp80
%6 = alloca x86_fp80
%7 = alloca x86_fp80
%8 = alloca x86_fp80
%9 = alloca x86_fp80
%10 = alloca x86_fp80
%11 = alloca x86_fp80
%12 = alloca x86_fp80
%13 = alloca x86_fp80
%14 = alloca x86_fp80
%15 = alloca x86_fp80
store i32 0, i32* %1
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %3)
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %4)
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), x86_fp80* %5)
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), x86_fp80* %6)
%21 = load i64, i64* %2
%22 = srem i64 %21, 2
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %52
24: ; preds = %0
%25 = load i64, i64* %3
%26 = srem i64 %25, 2
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %52
28: ; preds = %24
%29 = load i64, i64* %2
%30 = sub nsw i64 %29, 1
%31 = sdiv i64 %30, 2
store i64 %31, i64* %2
%32 = load x86_fp80, x86_fp80* %5
%33 = load i64, i64* %2
%34 = call x86_fp80 @pow(i32 16, i64 %33)
%35 = fdiv x86_fp80 %32, %34
store x86_fp80 %35, x86_fp80* %11
%36 = load x86_fp80, x86_fp80* %6
%37 = load i64, i64* %2
%38 = call x86_fp80 @pow(i32 16, i64 %37)
%39 = fdiv x86_fp80 %36, %38
store x86_fp80 %39, x86_fp80* %12
%40 = load i64, i64* %4
%41 = load i64, i64* %3
%42 = sub nsw i64 %41, 1
%43 = sdiv i64 %42, 2
%44 = mul nsw i64 %43, 4
%45 = sub nsw i64 %40, %44
store i64 %45, i64* %4
%46 = load x86_fp80, x86_fp80* %11
%47 = load x86_fp80, x86_fp80* %12
%48 = fadd x86_fp80 %46, %47
%49 = load i64, i64* %4
%50 = call x86_fp80 @pow(i32 2, i64 %49)
%51 = fdiv x86_fp80 %48, %50
store x86_fp80 %51, x86_fp80* %15
br label %198
52: ; preds = %24, %0
%53 = load i64, i64* %2
%54 = srem i64 %53, 2
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %108
56: ; preds = %52
%57 = load i64, i64* %3
%58 = srem i64 %57, 2
%59 = icmp ne i64 %58, 0
br i1 %59, label %60, label %108
60: ; preds = %56
%61 = call x86_fp80 @sqrt(i32 2)
%62 = load x86_fp80, x86_fp80* %5
%63 = load x86_fp80, x86_fp80* %6
%64 = fadd x86_fp80 %62, %63
%65 = call x86_fp80 @sqrt(i32 2)
%66 = call x86_fp80 @sqrt(i32 3)
%67 = fmul x86_fp80 %65, %66
%68 = load x86_fp80, x86_fp80* %5
%69 = load x86_fp80, x86_fp80* %6
%70 = fsub x86_fp80 %68, %69
%71 = fmul x86_fp80 %67, %70
%72 = fneg x86_fp80 %71
%73 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %61, x86_fp80 %64, x86_fp80 %72)
store x86_fp80 %73, x86_fp80* %7
%74 = call x86_fp80 @sqrt(i32 2)
%75 = load x86_fp80, x86_fp80* %5
%76 = load x86_fp80, x86_fp80* %6
%77 = fsub x86_fp80 %75, %76
%78 = call x86_fp80 @sqrt(i32 2)
%79 = call x86_fp80 @sqrt(i32 3)
%80 = fmul x86_fp80 %78, %79
%81 = load x86_fp80, x86_fp80* %5
%82 = load x86_fp80, x86_fp80* %6
%83 = fadd x86_fp80 %81, %82
%84 = fmul x86_fp80 %80, %83
%85 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %74, x86_fp80 %77, x86_fp80 %84)
store x86_fp80 %85, x86_fp80* %8
%86 = load x86_fp80, x86_fp80* %7
%87 = load i64, i64* %2
%88 = sdiv i64 %87, 2
%89 = call x86_fp80 @pow(i32 16, i64 %88)
%90 = fdiv x86_fp80 %86, %89
store x86_fp80 %90, x86_fp80* %11
%91 = load x86_fp80, x86_fp80* %8
%92 = load i64, i64* %2
%93 = sdiv i64 %92, 2
%94 = call x86_fp80 @pow(i32 16, i64 %93)
%95 = fdiv x86_fp80 %91, %94
store x86_fp80 %95, x86_fp80* %12
%96 = load i64, i64* %4
%97 = load i64, i64* %3
%98 = sub nsw i64 %97, 1
%99 = sdiv i64 %98, 2
%100 = mul nsw i64 %99, 4
%101 = sub nsw i64 %96, %100
store i64 %101, i64* %4
%102 = load x86_fp80, x86_fp80* %11
%103 = load x86_fp80, x86_fp80* %12
%104 = fadd x86_fp80 %102, %103
%105 = load i64, i64* %4
%106 = call x86_fp80 @pow(i32 2, i64 %105)
%107 = fdiv x86_fp80 %104, %106
store x86_fp80 %107, x86_fp80* %15
br label %197
108: ; preds = %56, %52
%109 = load i64, i64* %2
%110 = srem i64 %109, 2
%111 = icmp ne i64 %110, 0
br i1 %111, label %112, label %164
112: ; preds = %108
%113 = load i64, i64* %3
%114 = srem i64 %113, 2
%115 = icmp eq i64 %114, 0
br i1 %115, label %116, label %164
116: ; preds = %112
%117 = call x86_fp80 @sqrt(i32 2)
%118 = load x86_fp80, x86_fp80* %5
%119 = load x86_fp80, x86_fp80* %6
%120 = fadd x86_fp80 %118, %119
%121 = call x86_fp80 @sqrt(i32 2)
%122 = call x86_fp80 @sqrt(i32 3)
%123 = fmul x86_fp80 %121, %122
%124 = load x86_fp80, x86_fp80* %5
%125 = load x86_fp80, x86_fp80* %6
%126 = fsub x86_fp80 %124, %125
%127 = fmul x86_fp80 %123, %126
%128 = fneg x86_fp80 %127
%129 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %117, x86_fp80 %120, x86_fp80 %128)
store x86_fp80 %129, x86_fp80* %7
%130 = call x86_fp80 @sqrt(i32 2)
%131 = load x86_fp80, x86_fp80* %5
%132 = load x86_fp80, x86_fp80* %6
%133 = fsub x86_fp80 %131, %132
%134 = call x86_fp80 @sqrt(i32 2)
%135 = call x86_fp80 @sqrt(i32 3)
%136 = fmul x86_fp80 %134, %135
%137 = load x86_fp80, x86_fp80* %5
%138 = load x86_fp80, x86_fp80* %6
%139 = fadd x86_fp80 %137, %138
%140 = fmul x86_fp80 %136, %139
%141 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %130, x86_fp80 %133, x86_fp80 %140)
store x86_fp80 %141, x86_fp80* %8
%142 = load i64, i64* %2
%143 = sdiv i64 %142, 2
store i64 %143, i64* %2
%144 = load x86_fp80, x86_fp80* %7
%145 = load i64, i64* %2
%146 = call x86_fp80 @pow(i32 16, i64 %145)
%147 = fdiv x86_fp80 %144, %146
store x86_fp80 %147, x86_fp80* %11
%148 = load x86_fp80, x86_fp80* %8
%149 = load i64, i64* %2
%150 = call x86_fp80 @pow(i32 16, i64 %149)
%151 = fdiv x86_fp80 %148, %150
store x86_fp80 %151, x86_fp80* %12
%152 = load i64, i64* %4
%153 = load i64, i64* %3
%154 = sub nsw i64 %153, 1
%155 = sdiv i64 %154, 2
%156 = mul nsw i64 %155, 4
%157 = sub nsw i64 %152, %156
store i64 %157, i64* %4
%158 = load x86_fp80, x86_fp80* %11
%159 = load x86_fp80, x86_fp80* %12
%160 = fadd x86_fp80 %158, %159
%161 = load i64, i64* %4
%162 = call x86_fp80 @pow(i32 2, i64 %161)
%163 = fdiv x86_fp80 %160, %162
store x86_fp80 %163, x86_fp80* %15
br label %196
164: ; preds = %112, %108
%165 = load i64, i64* %2
%166 = srem i64 %165, 2
%167 = icmp ne i64 %166, 0
br i1 %167, label %168, label %195
168: ; preds = %164
%169 = load i64, i64* %3
%170 = srem i64 %169, 2
%171 = icmp ne i64 %170, 0
br i1 %171, label %172, label %195
172: ; preds = %168
%173 = load i64, i64* %2
%174 = sdiv i64 %173, 2
store i64 %174, i64* %2
%175 = load x86_fp80, x86_fp80* %5
%176 = load i64, i64* %2
%177 = call x86_fp80 @pow(i32 16, i64 %176)
%178 = fdiv x86_fp80 %175, %177
store x86_fp80 %178, x86_fp80* %11
%179 = load x86_fp80, x86_fp80* %6
%180 = load i64, i64* %2
%181 = call x86_fp80 @pow(i32 16, i64 %180)
%182 = fdiv x86_fp80 %179, %181
store x86_fp80 %182, x86_fp80* %12
%183 = load i64, i64* %4
%184 = load i64, i64* %3
%185 = sub nsw i64 %184, 1
%186 = sdiv i64 %185, 2
%187 = mul nsw i64 %186, 4
%188 = sub nsw i64 %183, %187
store i64 %188, i64* %4
%189 = load x86_fp80, x86_fp80* %11
%190 = load x86_fp80, x86_fp80* %12
%191 = fadd x86_fp80 %189, %190
%192 = load i64, i64* %4
%193 = call x86_fp80 @pow(i32 2, i64 %192)
%194 = fdiv x86_fp80 %191, %193
store x86_fp80 %194, x86_fp80* %15
br label %195
195: ; preds = %172, %168, %164
br label %196
196: ; preds = %195, %116
br label %197
197: ; preds = %196, %60
br label %198
198: ; preds = %197, %28
%199 = load x86_fp80, x86_fp80* %15
%200 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %199)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [4 x i8] c"%Lf\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = alloca x86_fp80
%5 = alloca x86_fp80
%6 = bitcast i64* %1 to i8*
%7 = bitcast i64* %2 to i8*
%8 = bitcast i64* %3 to i8*
%9 = bitcast x86_fp80* %4 to i8*
%10 = bitcast x86_fp80* %5 to i8*
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %3)
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), x86_fp80* %4)
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), x86_fp80* %5)
%16 = load i64, i64* %1
%17 = and i64 %16, 1
%18 = icmp eq i64 %17, 0
%19 = load i64, i64* %2
%20 = and i64 %19, 1
%21 = icmp eq i64 %20, 0
br i1 %18, label %22, label %81
22: ; preds = %0
br i1 %21, label %23, label %40
23: ; preds = %22
%24 = add nsw i64 %16, -1
%25 = sdiv i64 %24, 2
store i64 %25, i64* %1
%26 = load x86_fp80, x86_fp80* %4
%27 = call x86_fp80 @pow(i32 16, i64 %25)
%28 = fdiv x86_fp80 %26, %27
%29 = load x86_fp80, x86_fp80* %5
%30 = load i64, i64* %1
%31 = call x86_fp80 @pow(i32 16, i64 %30)
%32 = fdiv x86_fp80 %29, %31
%33 = load i64, i64* %3
%34 = load i64, i64* %2
%35 = add nsw i64 %34, -1
%36 = sdiv i64 %35, -2
%37 = shl i64 %36, 2
%38 = add i64 %37, %33
store i64 %38, i64* %3
%39 = fadd x86_fp80 %28, %32
br label %139
40: ; preds = %22
%41 = call x86_fp80 @sqrt(i32 2)
%42 = load x86_fp80, x86_fp80* %4
%43 = load x86_fp80, x86_fp80* %5
%44 = fadd x86_fp80 %42, %43
%45 = call x86_fp80 @sqrt(i32 2)
%46 = call x86_fp80 @sqrt(i32 3)
%47 = load x86_fp80, x86_fp80* %4
%48 = load x86_fp80, x86_fp80* %5
%49 = fsub x86_fp80 %47, %48
%50 = fneg x86_fp80 %45
%51 = fmul x86_fp80 %46, %50
%52 = fmul x86_fp80 %51, %49
%53 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %41, x86_fp80 %44, x86_fp80 %52)
%54 = call x86_fp80 @sqrt(i32 2)
%55 = load x86_fp80, x86_fp80* %4
%56 = load x86_fp80, x86_fp80* %5
%57 = fsub x86_fp80 %55, %56
%58 = call x86_fp80 @sqrt(i32 2)
%59 = call x86_fp80 @sqrt(i32 3)
%60 = fmul x86_fp80 %58, %59
%61 = load x86_fp80, x86_fp80* %4
%62 = load x86_fp80, x86_fp80* %5
%63 = fadd x86_fp80 %61, %62
%64 = fmul x86_fp80 %60, %63
%65 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %54, x86_fp80 %57, x86_fp80 %64)
%66 = load i64, i64* %1
%67 = sdiv i64 %66, 2
%68 = call x86_fp80 @pow(i32 16, i64 %67)
%69 = fdiv x86_fp80 %53, %68
%70 = load i64, i64* %1
%71 = sdiv i64 %70, 2
%72 = call x86_fp80 @pow(i32 16, i64 %71)
%73 = fdiv x86_fp80 %65, %72
%74 = load i64, i64* %3
%75 = load i64, i64* %2
%76 = add nsw i64 %75, -1
%77 = sdiv i64 %76, -2
%78 = shl i64 %77, 2
%79 = add i64 %78, %74
store i64 %79, i64* %3
%80 = fadd x86_fp80 %69, %73
br label %139
81: ; preds = %0
br i1 %21, label %82, label %122
82: ; preds = %81
%83 = call x86_fp80 @sqrt(i32 2)
%84 = load x86_fp80, x86_fp80* %4
%85 = load x86_fp80, x86_fp80* %5
%86 = fadd x86_fp80 %84, %85
%87 = call x86_fp80 @sqrt(i32 2)
%88 = call x86_fp80 @sqrt(i32 3)
%89 = load x86_fp80, x86_fp80* %4
%90 = load x86_fp80, x86_fp80* %5
%91 = fsub x86_fp80 %89, %90
%92 = fneg x86_fp80 %87
%93 = fmul x86_fp80 %88, %92
%94 = fmul x86_fp80 %93, %91
%95 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %83, x86_fp80 %86, x86_fp80 %94)
%96 = call x86_fp80 @sqrt(i32 2)
%97 = load x86_fp80, x86_fp80* %4
%98 = load x86_fp80, x86_fp80* %5
%99 = fsub x86_fp80 %97, %98
%100 = call x86_fp80 @sqrt(i32 2)
%101 = call x86_fp80 @sqrt(i32 3)
%102 = fmul x86_fp80 %100, %101
%103 = load x86_fp80, x86_fp80* %4
%104 = load x86_fp80, x86_fp80* %5
%105 = fadd x86_fp80 %103, %104
%106 = fmul x86_fp80 %102, %105
%107 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %96, x86_fp80 %99, x86_fp80 %106)
%108 = load i64, i64* %1
%109 = sdiv i64 %108, 2
store i64 %109, i64* %1
%110 = call x86_fp80 @pow(i32 16, i64 %109)
%111 = fdiv x86_fp80 %95, %110
%112 = load i64, i64* %1
%113 = call x86_fp80 @pow(i32 16, i64 %112)
%114 = fdiv x86_fp80 %107, %113
%115 = load i64, i64* %3
%116 = load i64, i64* %2
%117 = add nsw i64 %116, -1
%118 = sdiv i64 %117, -2
%119 = shl i64 %118, 2
%120 = add i64 %119, %115
store i64 %120, i64* %3
%121 = fadd x86_fp80 %111, %114
br label %139
122: ; preds = %81
%123 = xor i1 %18, true
%124 = sdiv i64 %16, 2
store i64 %124, i64* %1
%125 = load x86_fp80, x86_fp80* %4
%126 = call x86_fp80 @pow(i32 16, i64 %124)
%127 = fdiv x86_fp80 %125, %126
%128 = load x86_fp80, x86_fp80* %5
%129 = load i64, i64* %1
%130 = call x86_fp80 @pow(i32 16, i64 %129)
%131 = fdiv x86_fp80 %128, %130
%132 = load i64, i64* %3
%133 = load i64, i64* %2
%134 = add nsw i64 %133, -1
%135 = sdiv i64 %134, -2
%136 = shl i64 %135, 2
%137 = add i64 %136, %132
store i64 %137, i64* %3
%138 = fadd x86_fp80 %127, %131
br label %139
139: ; preds = %40, %122, %82, %23
%140 = phi i64 [ %79, %40 ], [ %137, %122 ], [ %120, %82 ], [ %38, %23 ]
%141 = phi x86_fp80 [ %80, %40 ], [ %138, %122 ], [ %121, %82 ], [ %39, %23 ]
%142 = call x86_fp80 @pow(i32 2, i64 %140)
%143 = fdiv x86_fp80 %141, %142
%144 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %143)
ret i32 0
}