#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 */
scalar_t__ SphGenOh(double *, int, double, double, double);
int MakeAngularGrid_50(double (*pOut)[4]) {
  double a = 0, b = 0, v;
  int N = 0;
  v = 0.1269841269841270e-1;
  N += SphGenOh(&pOut[N][0], 0, a, b, v);
  v = 0.2257495590828924e-1;
  N += SphGenOh(&pOut[N][0], 1, a, b, v);
  v = 0.2109375000000000e-1;
  N += SphGenOh(&pOut[N][0], 2, a, b, v);
  a = 0.3015113445777636e+0;
  v = 0.2017333553791887e-1;
  N += SphGenOh(&pOut[N][0], 3, a, b, v);
  return N;
}


x86 assembly (clang, -O0):
<MakeAngularGrid_50>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
movsd  0xee5(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x24(%rbp),%rax
shl    $0x5,%rax
add    %rax,%rdi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
xor    %esi,%esi
call   1030 <SphGenOh@plt>
mov    %rax,%rcx
movslq -0x24(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x24(%rbp)
movsd  0xe9e(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x24(%rbp),%rax
shl    $0x5,%rax
add    %rax,%rdi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
mov    $0x1,%esi
call   1030 <SphGenOh@plt>
mov    %rax,%rcx
movslq -0x24(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x24(%rbp)
movsd  0xe54(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x24(%rbp),%rax
shl    $0x5,%rax
add    %rax,%rdi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
mov    $0x2,%esi
call   1030 <SphGenOh@plt>
mov    %rax,%rcx
movslq -0x24(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x24(%rbp)
movsd  0xe0a(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xdf5(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x24(%rbp),%rax
shl    $0x5,%rax
add    %rax,%rdi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
mov    $0x3,%esi
call   1030 <SphGenOh@plt>
mov    %rax,%rcx
movslq -0x24(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MakeAngularGrid_50>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
movsd  0xee0(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xor    %esi,%esi
call   1030 <SphGenOh@plt>
mov    %rax,%r15
movslq %r15d,%rdi
shl    $0x5,%rdi
add    %r14,%rdi
movsd  0xec6(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
mov    $0x1,%esi
call   1030 <SphGenOh@plt>
mov    %rax,%rbx
add    %r15,%rbx
movslq %ebx,%rdi
shl    $0x5,%rdi
add    %r14,%rdi
movsd  0xea6(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
mov    $0x2,%esi
call   1030 <SphGenOh@plt>
add    %rbx,%rax
movslq %eax,%rbx
mov    %rbx,%rdi
shl    $0x5,%rdi
add    %r14,%rdi
movsd  0xe86(%rip),%xmm0
movsd  0xe86(%rip),%xmm2
xorps  %xmm1,%xmm1
mov    $0x3,%esi
call   1030 <SphGenOh@plt>
add    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @MakeAngularGrid_50([4 x double]* %0) {
%2 = alloca [4 x double]*
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca i32
store [4 x double]* %0, [4 x double]** %2
store double 0.000000e+00, double* %3
store double 0.000000e+00, double* %4
store i32 0, i32* %6
store double 0x3F8A01A01A01A01B, double* %5
%7 = load [4 x double]*, [4 x double]** %2
%8 = load i32, i32* %6
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 %9
%11 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 0
%12 = load double, double* %3
%13 = load double, double* %4
%14 = load double, double* %5
%15 = call i64 @SphGenOh(double* %11, i32 0, double %12, double %13, double %14)
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = add nsw i64 %17, %15
%19 = trunc i64 %18 to i32
store i32 %19, i32* %6
store double 0x3F971DE3A556C733, double* %5
%20 = load [4 x double]*, [4 x double]** %2
%21 = load i32, i32* %6
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [4 x double], [4 x double]* %20, i64 %22
%24 = getelementptr inbounds [4 x double], [4 x double]* %23, i64 0, i64 0
%25 = load double, double* %3
%26 = load double, double* %4
%27 = load double, double* %5
%28 = call i64 @SphGenOh(double* %24, i32 1, double %25, double %26, double %27)
%29 = load i32, i32* %6
%30 = sext i32 %29 to i64
%31 = add nsw i64 %30, %28
%32 = trunc i64 %31 to i32
store i32 %32, i32* %6
store double 0x3F9599999999999A, double* %5
%33 = load [4 x double]*, [4 x double]** %2
%34 = load i32, i32* %6
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [4 x double], [4 x double]* %33, i64 %35
%37 = getelementptr inbounds [4 x double], [4 x double]* %36, i64 0, i64 0
%38 = load double, double* %3
%39 = load double, double* %4
%40 = load double, double* %5
%41 = call i64 @SphGenOh(double* %37, i32 2, double %38, double %39, double %40)
%42 = load i32, i32* %6
%43 = sext i32 %42 to i64
%44 = add nsw i64 %43, %41
%45 = trunc i64 %44 to i32
store i32 %45, i32* %6
store double 0x3FD34BF63D156825, double* %3
store double 0x3F94A851A18BDFDA, double* %5
%46 = load [4 x double]*, [4 x double]** %2
%47 = load i32, i32* %6
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [4 x double], [4 x double]* %46, i64 %48
%50 = getelementptr inbounds [4 x double], [4 x double]* %49, i64 0, i64 0
%51 = load double, double* %3
%52 = load double, double* %4
%53 = load double, double* %5
%54 = call i64 @SphGenOh(double* %50, i32 3, double %51, double %52, double %53)
%55 = load i32, i32* %6
%56 = sext i32 %55 to i64
%57 = add nsw i64 %56, %54
%58 = trunc i64 %57 to i32
store i32 %58, i32* %6
%59 = load i32, i32* %6
ret i32 %59
}

LLVM IR (-O2):
define i32 @MakeAngularGrid_50([4 x double]* %0) {
%2 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 0, i64 0
%3 = tail call i64 @SphGenOh(double* %2, i32 0, double 0.000000e+00, double 0.000000e+00, double 0x3F8A01A01A01A01B)
%4 = shl i64 %3, 32
%5 = ashr exact i64 %4, 32
%6 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 %5, i64 0
%7 = tail call i64 @SphGenOh(double* %6, i32 1, double 0.000000e+00, double 0.000000e+00, double 0x3F971DE3A556C733)
%8 = add i64 %7, %3
%9 = shl i64 %8, 32
%10 = ashr exact i64 %9, 32
%11 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 %10, i64 0
%12 = tail call i64 @SphGenOh(double* %11, i32 2, double 0.000000e+00, double 0.000000e+00, double 0x3F9599999999999A)
%13 = add i64 %8, %12
%14 = shl i64 %13, 32
%15 = ashr exact i64 %14, 32
%16 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 %15, i64 0
%17 = tail call i64 @SphGenOh(double* %16, i32 3, double 0x3FD34BF63D156825, double 0.000000e+00, double 0x3F94A851A18BDFDA)
%18 = add i64 %13, %17
%19 = trunc i64 %18 to i32
ret i32 %19
}