#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*/ vcons(long, double);
scalar_t__ vnorm(int /*<<< orphan*/);
scalar_t__ vsume(int /*<<< orphan*/);
double case10() {
  double acc = 0.0;
  acc += vnorm(vcons((long)vsume(vcons(0, 1.0)), 2.0));
  acc += vnorm(vcons((long)vsume(vcons(1, 1.0)), 2.0));
  acc += vnorm(vcons((long)vsume(vcons(2, 1.0)), 2.0));
  acc += vnorm(vcons((long)vsume(vcons(3, 1.0)), 2.0));
  acc += vnorm(vcons((long)vsume(vcons(4, 1.0)), 2.0));
  acc += vnorm(vcons((long)vsume(vcons(5, 1.0)), 2.0));
  acc += vnorm(vcons((long)vsume(vcons(6, 1.0)), 2.0));
  acc += vnorm(vcons((long)vsume(vcons(7, 1.0)), 2.0));
  acc += vnorm(vcons((long)vsume(vcons(8, 1.0)), 2.0));
  acc += vnorm(vcons((long)vsume(vcons(9, 1.0)), 2.0));
  return (acc);
}


x86 assembly (clang, -O0):
<case10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
movsd  0xebc(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xe9d(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x1,%edi
movsd  0xe7d(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xe5e(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x2,%edi
movsd  0xe3e(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xe1f(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x3,%edi
movsd  0xdff(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xde0(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x4,%edi
movsd  0xdc0(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xda1(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x5,%edi
movsd  0xd81(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xd62(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x6,%edi
movsd  0xd42(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xd23(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x7,%edi
movsd  0xd03(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xce4(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x8,%edi
movsd  0xcc4(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xca5(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x9,%edi
movsd  0xc85(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xc66(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<case10>:
push   %rax
movsd  0xec7(%rip),%xmm0
xor    %edi,%edi
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
movsd  0xeb9(%rip),%xmm0
mov    %rax,%rdi
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%rsp)
mov    $0x1,%edi
movsd  0xe88(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xe79(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    $0x2,%edi
movsd  0xe46(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xe37(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    $0x3,%edi
movsd  0xe04(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xdf5(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    $0x4,%edi
movsd  0xdc2(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xdb3(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    $0x5,%edi
movsd  0xd80(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xd71(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    $0x6,%edi
movsd  0xd3e(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xd2f(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    $0x7,%edi
movsd  0xcfc(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xced(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    $0x8,%edi
movsd  0xcba(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xcab(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    $0x9,%edi
movsd  0xc78(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1040 <vsume@plt>
mov    %rax,%rdi
movsd  0xc69(%rip),%xmm0
call   1030 <vcons@plt>
mov    %eax,%edi
call   1050 <vnorm@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @case10() {
%1 = alloca double
store double 0.000000e+00, double* %1
%2 = call i32 @vcons(i64 0, double 1.000000e+00)
%3 = call i64 @vsume(i32 %2)
%4 = call i32 @vcons(i64 %3, double 2.000000e+00)
%5 = call i64 @vnorm(i32 %4)
%6 = sitofp i64 %5 to double
%7 = load double, double* %1
%8 = fadd double %7, %6
store double %8, double* %1
%9 = call i32 @vcons(i64 1, double 1.000000e+00)
%10 = call i64 @vsume(i32 %9)
%11 = call i32 @vcons(i64 %10, double 2.000000e+00)
%12 = call i64 @vnorm(i32 %11)
%13 = sitofp i64 %12 to double
%14 = load double, double* %1
%15 = fadd double %14, %13
store double %15, double* %1
%16 = call i32 @vcons(i64 2, double 1.000000e+00)
%17 = call i64 @vsume(i32 %16)
%18 = call i32 @vcons(i64 %17, double 2.000000e+00)
%19 = call i64 @vnorm(i32 %18)
%20 = sitofp i64 %19 to double
%21 = load double, double* %1
%22 = fadd double %21, %20
store double %22, double* %1
%23 = call i32 @vcons(i64 3, double 1.000000e+00)
%24 = call i64 @vsume(i32 %23)
%25 = call i32 @vcons(i64 %24, double 2.000000e+00)
%26 = call i64 @vnorm(i32 %25)
%27 = sitofp i64 %26 to double
%28 = load double, double* %1
%29 = fadd double %28, %27
store double %29, double* %1
%30 = call i32 @vcons(i64 4, double 1.000000e+00)
%31 = call i64 @vsume(i32 %30)
%32 = call i32 @vcons(i64 %31, double 2.000000e+00)
%33 = call i64 @vnorm(i32 %32)
%34 = sitofp i64 %33 to double
%35 = load double, double* %1
%36 = fadd double %35, %34
store double %36, double* %1
%37 = call i32 @vcons(i64 5, double 1.000000e+00)
%38 = call i64 @vsume(i32 %37)
%39 = call i32 @vcons(i64 %38, double 2.000000e+00)
%40 = call i64 @vnorm(i32 %39)
%41 = sitofp i64 %40 to double
%42 = load double, double* %1
%43 = fadd double %42, %41
store double %43, double* %1
%44 = call i32 @vcons(i64 6, double 1.000000e+00)
%45 = call i64 @vsume(i32 %44)
%46 = call i32 @vcons(i64 %45, double 2.000000e+00)
%47 = call i64 @vnorm(i32 %46)
%48 = sitofp i64 %47 to double
%49 = load double, double* %1
%50 = fadd double %49, %48
store double %50, double* %1
%51 = call i32 @vcons(i64 7, double 1.000000e+00)
%52 = call i64 @vsume(i32 %51)
%53 = call i32 @vcons(i64 %52, double 2.000000e+00)
%54 = call i64 @vnorm(i32 %53)
%55 = sitofp i64 %54 to double
%56 = load double, double* %1
%57 = fadd double %56, %55
store double %57, double* %1
%58 = call i32 @vcons(i64 8, double 1.000000e+00)
%59 = call i64 @vsume(i32 %58)
%60 = call i32 @vcons(i64 %59, double 2.000000e+00)
%61 = call i64 @vnorm(i32 %60)
%62 = sitofp i64 %61 to double
%63 = load double, double* %1
%64 = fadd double %63, %62
store double %64, double* %1
%65 = call i32 @vcons(i64 9, double 1.000000e+00)
%66 = call i64 @vsume(i32 %65)
%67 = call i32 @vcons(i64 %66, double 2.000000e+00)
%68 = call i64 @vnorm(i32 %67)
%69 = sitofp i64 %68 to double
%70 = load double, double* %1
%71 = fadd double %70, %69
store double %71, double* %1
%72 = load double, double* %1
ret double %72
}

LLVM IR (-O2):
define double @case10() {
%1 = tail call i32 @vcons(i64 0, double 1.000000e+00)
%2 = tail call i64 @vsume(i32 %1)
%3 = tail call i32 @vcons(i64 %2, double 2.000000e+00)
%4 = tail call i64 @vnorm(i32 %3)
%5 = sitofp i64 %4 to double
%6 = tail call i32 @vcons(i64 1, double 1.000000e+00)
%7 = tail call i64 @vsume(i32 %6)
%8 = tail call i32 @vcons(i64 %7, double 2.000000e+00)
%9 = tail call i64 @vnorm(i32 %8)
%10 = sitofp i64 %9 to double
%11 = fadd double %5, %10
%12 = tail call i32 @vcons(i64 2, double 1.000000e+00)
%13 = tail call i64 @vsume(i32 %12)
%14 = tail call i32 @vcons(i64 %13, double 2.000000e+00)
%15 = tail call i64 @vnorm(i32 %14)
%16 = sitofp i64 %15 to double
%17 = fadd double %11, %16
%18 = tail call i32 @vcons(i64 3, double 1.000000e+00)
%19 = tail call i64 @vsume(i32 %18)
%20 = tail call i32 @vcons(i64 %19, double 2.000000e+00)
%21 = tail call i64 @vnorm(i32 %20)
%22 = sitofp i64 %21 to double
%23 = fadd double %17, %22
%24 = tail call i32 @vcons(i64 4, double 1.000000e+00)
%25 = tail call i64 @vsume(i32 %24)
%26 = tail call i32 @vcons(i64 %25, double 2.000000e+00)
%27 = tail call i64 @vnorm(i32 %26)
%28 = sitofp i64 %27 to double
%29 = fadd double %23, %28
%30 = tail call i32 @vcons(i64 5, double 1.000000e+00)
%31 = tail call i64 @vsume(i32 %30)
%32 = tail call i32 @vcons(i64 %31, double 2.000000e+00)
%33 = tail call i64 @vnorm(i32 %32)
%34 = sitofp i64 %33 to double
%35 = fadd double %29, %34
%36 = tail call i32 @vcons(i64 6, double 1.000000e+00)
%37 = tail call i64 @vsume(i32 %36)
%38 = tail call i32 @vcons(i64 %37, double 2.000000e+00)
%39 = tail call i64 @vnorm(i32 %38)
%40 = sitofp i64 %39 to double
%41 = fadd double %35, %40
%42 = tail call i32 @vcons(i64 7, double 1.000000e+00)
%43 = tail call i64 @vsume(i32 %42)
%44 = tail call i32 @vcons(i64 %43, double 2.000000e+00)
%45 = tail call i64 @vnorm(i32 %44)
%46 = sitofp i64 %45 to double
%47 = fadd double %41, %46
%48 = tail call i32 @vcons(i64 8, double 1.000000e+00)
%49 = tail call i64 @vsume(i32 %48)
%50 = tail call i32 @vcons(i64 %49, double 2.000000e+00)
%51 = tail call i64 @vnorm(i32 %50)
%52 = sitofp i64 %51 to double
%53 = fadd double %47, %52
%54 = tail call i32 @vcons(i64 9, double 1.000000e+00)
%55 = tail call i64 @vsume(i32 %54)
%56 = tail call i32 @vcons(i64 %55, double 2.000000e+00)
%57 = tail call i64 @vnorm(i32 %56)
%58 = sitofp i64 %57 to double
%59 = fadd double %53, %58
ret double %59
}