#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_86(double (*pOut)[4]) {
  double a = 0, b = 0, v;
  int N = 0;
  v = 0.1154401154401154e-1;
  N += SphGenOh(&pOut[N][0], 0, a, b, v);
  v = 0.1194390908585628e-1;
  N += SphGenOh(&pOut[N][0], 2, a, b, v);
  a = 0.3696028464541502e+0;
  v = 0.1111055571060340e-1;
  N += SphGenOh(&pOut[N][0], 3, a, b, v);
  a = 0.6943540066026664e+0;
  v = 0.1187650129453714e-1;
  N += SphGenOh(&pOut[N][0], 3, a, b, v);
  a = 0.3742430390903412e+0;
  v = 0.1181230374690448e-1;
  N += SphGenOh(&pOut[N][0], 4, a, b, v);
  return N;
}


x86 assembly (clang, -O0):
<MakeAngularGrid_86>:
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  0xefd(%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  0xeb6(%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  0xe6c(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe57(%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)
movsd  0xe0d(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xdf8(%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)
movsd  0xdae(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xd99(%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    $0x4,%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_86>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r14
movsd  0xedd(%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  0xec3(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
mov    $0x2,%esi
call   1030 <SphGenOh@plt>
mov    %rax,%r12
add    %r15,%r12
movslq %r12d,%rdi
shl    $0x5,%rdi
add    %r14,%rdi
movsd  0xea3(%rip),%xmm0
movsd  0xea3(%rip),%xmm2
xorps  %xmm1,%xmm1
mov    $0x3,%esi
call   1030 <SphGenOh@plt>
mov    %rax,%rbx
add    %r12,%rbx
movslq %ebx,%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    %rbx,%rax
movslq %eax,%rbx
mov    %rbx,%rdi
shl    $0x5,%rdi
add    %r14,%rdi
movsd  0xe69(%rip),%xmm0
movsd  0xe69(%rip),%xmm2
xorps  %xmm1,%xmm1
mov    $0x4,%esi
call   1030 <SphGenOh@plt>
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @MakeAngularGrid_86([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 0x3F87A463005E918A, 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 0x3F88760C5747FCB6, 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 2, 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 0x3FD7A792B281DC86, double* %3
store double 0x3F86C1218B56E44E, 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 3, 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 0x3FE63825E4C68F87, double* %3
store double 0x3F8852B505351F57, 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
store double 0x3FD7F399136983BA, double* %3
store double 0x3F88310C92445911, double* %5
%59 = load [4 x double]*, [4 x double]** %2
%60 = load i32, i32* %6
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [4 x double], [4 x double]* %59, i64 %61
%63 = getelementptr inbounds [4 x double], [4 x double]* %62, i64 0, i64 0
%64 = load double, double* %3
%65 = load double, double* %4
%66 = load double, double* %5
%67 = call i64 @SphGenOh(double* %63, i32 4, double %64, double %65, double %66)
%68 = load i32, i32* %6
%69 = sext i32 %68 to i64
%70 = add nsw i64 %69, %67
%71 = trunc i64 %70 to i32
store i32 %71, i32* %6
%72 = load i32, i32* %6
ret i32 %72
}

LLVM IR (-O2):
define i32 @MakeAngularGrid_86([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 0x3F87A463005E918A)
%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 2, double 0.000000e+00, double 0.000000e+00, double 0x3F88760C5747FCB6)
%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 3, double 0x3FD7A792B281DC86, double 0.000000e+00, double 0x3F86C1218B56E44E)
%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 0x3FE63825E4C68F87, double 0.000000e+00, double 0x3F8852B505351F57)
%18 = add i64 %13, %17
%19 = shl i64 %18, 32
%20 = ashr exact i64 %19, 32
%21 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 %20, i64 0
%22 = tail call i64 @SphGenOh(double* %21, i32 4, double 0x3FD7F399136983BA, double 0.000000e+00, double 0x3F88310C92445911)
%23 = add i64 %18, %22
%24 = trunc i64 %23 to i32
ret i32 %24
}