#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 pow(int /*<<< orphan*/, int);
int /*<<< orphan*/ sqrt(double);
void Normalize_Central(int const nmb_mom, double c_mom[]) {
  int i;
  for (i = 2; i < nmb_mom; i++)
    c_mom[i] /= pow(sqrt(c_mom[1]), i + 1);
  c_mom[0] = 0;
  c_mom[1] = 1;
  return;
}


x86 assembly (clang, -O0):
<Normalize_Central>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1184 <Normalize_Central+0x64>
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
call   1040 <sqrt@plt>
mov    %eax,%edi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
call   1030 <pow@plt>
movaps %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1136 <Normalize_Central+0x16>
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xe65(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Normalize_Central>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rsi,%r14
cmp    $0x3,%edi
jl     11dd <Normalize_Central+0xbd>
mov    %edi,%r15d
mov    $0x2,%r13d
je     11b1 <Normalize_Central+0x91>
lea    -0x2(%r15),%r12
and    $0xfffffffffffffffe,%r12
neg    %r12
mov    $0x2,%ebx
movsd  0x8(%r14),%xmm0
call   1040 <sqrt@plt>
lea    0x1(%rbx),%esi
mov    %eax,%edi
call   1030 <pow@plt>
movsd  (%r14,%rbx,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%rbx,8)
movsd  0x8(%r14),%xmm0
call   1040 <sqrt@plt>
lea    0x2(%rbx),%r13
mov    %eax,%edi
mov    %r13d,%esi
call   1030 <pow@plt>
movsd  0x8(%r14,%rbx,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%r14,%rbx,8)
lea    (%r12,%rbx,1),%rax
add    $0x2,%rax
mov    %r13,%rbx
cmp    $0x2,%rax
jne    1150 <Normalize_Central+0x30>
test   $0x1,%r15b
je     11dd <Normalize_Central+0xbd>
movsd  0x8(%r14),%xmm0
call   1040 <sqrt@plt>
lea    0x1(%r13),%esi
mov    %eax,%edi
call   1030 <pow@plt>
movsd  (%r14,%r13,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%r13,8)
xorpd  %xmm0,%xmm0
movhpd 0xe17(%rip),%xmm0
movupd %xmm0,(%r14)
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @Normalize_Central(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i32
store i32 %0, i32* %3
store double* %1, double** %4
store i32 2, i32* %5
br label %6
6: ; preds = %24, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %27
10: ; preds = %6
%11 = load double*, double** %4
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = call i32 @sqrt(double %13)
%15 = load i32, i32* %5
%16 = add nsw i32 %15, 1
%17 = call double @pow(i32 %14, i32 %16)
%18 = load double*, double** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds double, double* %18, i64 %20
%22 = load double, double* %21
%23 = fdiv double %22, %17
store double %23, double* %21
br label %24
24: ; preds = %10
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
store i32 %26, i32* %5
br label %6
27: ; preds = %6
%28 = load double*, double** %4
%29 = getelementptr inbounds double, double* %28, i64 0
store double 0.000000e+00, double* %29
%30 = load double*, double** %4
%31 = getelementptr inbounds double, double* %30, i64 1
store double 1.000000e+00, double* %31
ret void
}

LLVM IR (-O2):
define void @Normalize_Central(i32 %0, double* nocapture %1) {
%3 = icmp sgt i32 %0, 2
br i1 %3, label %4, label %45
4: ; preds = %2
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = zext i32 %0 to i64
%7 = and i64 %6, 1
%8 = icmp eq i32 %0, 3
br i1 %8, label %33, label %9
9: ; preds = %4
%10 = add nsw i64 %6, -2
%11 = and i64 %10, -2
br label %12
12: ; preds = %12, %9
%13 = phi i64 [ 2, %9 ], [ %25, %12 ]
%14 = phi i64 [ 0, %9 ], [ %31, %12 ]
%15 = load double, double* %5
%16 = tail call i32 @sqrt(double %15)
%17 = or i64 %13, 1
%18 = trunc i64 %17 to i32
%19 = tail call double @pow(i32 %16, i32 %18)
%20 = getelementptr inbounds double, double* %1, i64 %13
%21 = load double, double* %20
%22 = fdiv double %21, %19
store double %22, double* %20
%23 = load double, double* %5
%24 = tail call i32 @sqrt(double %23)
%25 = add nuw nsw i64 %13, 2
%26 = trunc i64 %25 to i32
%27 = tail call double @pow(i32 %24, i32 %26)
%28 = getelementptr inbounds double, double* %1, i64 %17
%29 = load double, double* %28
%30 = fdiv double %29, %27
store double %30, double* %28
%31 = add i64 %14, 2
%32 = icmp eq i64 %31, %11
br i1 %32, label %33, label %12
33: ; preds = %12, %4
%34 = phi i64 [ 2, %4 ], [ %25, %12 ]
%35 = icmp eq i64 %7, 0
br i1 %35, label %45, label %36
36: ; preds = %33
%37 = load double, double* %5
%38 = tail call i32 @sqrt(double %37)
%39 = trunc i64 %34 to i32
%40 = add i32 %39, 1
%41 = tail call double @pow(i32 %38, i32 %40)
%42 = getelementptr inbounds double, double* %1, i64 %34
%43 = load double, double* %42
%44 = fdiv double %43, %41
store double %44, double* %42
br label %45
45: ; preds = %36, %33, %2
%46 = bitcast double* %1 to <2 x double>*
store <2 x double> <double 0.000000e+00, double 1.000000e+00>, <2 x double>* %46
ret void
}