#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*/ abort();
int /*<<< orphan*/ printf(char *);
int Lebedev_Laikov_npoint(int lvalue) {
  int fraction, tmp_lvalue;
  tmp_lvalue = lvalue;
  if (lvalue < 3) {
    return 6;
  } else if (lvalue <= 31) {
    tmp_lvalue -= 1;
    fraction = tmp_lvalue % 2;
    tmp_lvalue /= 2;
    if (fraction)
      tmp_lvalue++;
    switch (tmp_lvalue) {
    case 0:
      return 6;
    case 1:
      return 6;
    case 2:
      return 14;
    case 3:
      return 26;
    case 4:
      return 38;
    case 5:
      return 50;
    case 6:
      return 74;
    case 7:
      return 86;
    case 8:
      return 110;
    case 9:
      return 146;
    case 10:
      return 170;
    case 11:
      return 194;
    case 12:
      return 230;
    case 13:
      return 266;
    case 14:
      return 302;
    case 15:
      return 350;
    }
  } else if (lvalue <= 131) {
    tmp_lvalue -= 5;
    fraction = tmp_lvalue % 6;
    tmp_lvalue /= 6;
    if (fraction)
      tmp_lvalue++;
    switch (tmp_lvalue) {
    case 5:
      return 434;
    case 6:
      return 590;
    case 7:
      return 770;
    case 8:
      return 974;
    case 9:
      return 1202;
    case 10:
      return 1454;
    case 11:
      return 1730;
    case 12:
      return 2030;
    case 13:
      return 2354;
    case 14:
      return 2702;
    case 15:
      return 3074;
    case 16:
      return 3470;
    case 17:
      return 3890;
    case 18:
      return 4334;
    case 19:
      return 4802;
    case 20:
      return 5294;
    case 21:
      return 5810;
    }
  } else {
    printf(" Lebedev_Laikov_npoint: lvalue > 131.  No grids of this type "
           "available.\n");
    abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<Lebedev_Laikov_npoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1147 <Lebedev_Laikov_npoint+0x27>
movl   $0x6,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
cmpl   $0x1f,-0x8(%rbp)
jg     1273 <Lebedev_Laikov_npoint+0x153>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1189 <Lebedev_Laikov_npoint+0x69>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0xf,%rax
ja     126e <Lebedev_Laikov_npoint+0x14e>
mov    -0x18(%rbp),%rax
lea    0xe9f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x6,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x6,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0xe,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x1a,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x26,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x32,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x4a,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x56,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x6e,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x92,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0xaa,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0xc2,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0xe6,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x10a,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x12e,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x15e,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
jmp    13ca <Lebedev_Laikov_npoint+0x2aa>
cmpl   $0x83,-0x8(%rbp)
jg     13b2 <Lebedev_Laikov_npoint+0x292>
mov    -0x10(%rbp),%eax
sub    $0x5,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     12b8 <Lebedev_Laikov_npoint+0x198>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0xfffffffb,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x10,%eax
ja     13ad <Lebedev_Laikov_npoint+0x28d>
mov    -0x20(%rbp),%rax
lea    0xd28(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1b2,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x24e,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x302,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x3ce,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x4b2,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x5ae,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x6c2,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x7ee,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x932,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0xa8e,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0xc02,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0xd8e,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0xf32,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x10ee,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x12c2,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x14ae,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
movl   $0x16b2,-0x4(%rbp)
jmp    13d6 <Lebedev_Laikov_npoint+0x2b6>
jmp    13c5 <Lebedev_Laikov_npoint+0x2a5>
lea    0xccb(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    13ca <Lebedev_Laikov_npoint+0x2aa>
jmp    13cf <Lebedev_Laikov_npoint+0x2af>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lebedev_Laikov_npoint>:
push   %rax
mov    $0x6,%eax
cmp    $0x3,%edi
jl     1192 <Lebedev_Laikov_npoint+0x72>
cmp    $0x1f,%edi
ja     1155 <Lebedev_Laikov_npoint+0x35>
add    $0xffffffff,%edi
mov    %edi,%eax
shr    %eax
and    $0x1,%edi
add    %eax,%edi
add    $0xff,%dil
xor    %eax,%eax
cmp    $0xf,%dil
jae    1192 <Lebedev_Laikov_npoint+0x72>
movsbq %dil,%rax
lea    0xef5(%rip),%rcx
jmp    118c <Lebedev_Laikov_npoint+0x6c>
cmp    $0x83,%edi
ja     1194 <Lebedev_Laikov_npoint+0x74>
add    $0xfb,%dil
movzbl %dil,%eax
imul   $0xab,%eax,%ecx
imul   $0xffffffab,%eax,%eax
ror    %al
shr    $0xa,%ecx
cmp    $0x2b,%al
sbb    $0xffffffff,%ecx
add    $0xfffffffb,%ecx
xor    %eax,%eax
cmp    $0x11,%ecx
jae    1192 <Lebedev_Laikov_npoint+0x72>
movslq %ecx,%rax
lea    0xef8(%rip),%rcx
lea    (%rcx,%rax,4),%rax
mov    (%rax),%eax
pop    %rcx
ret
lea    0xe65(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [73 x i8] c" Lebedev_Laikov_npoint: lvalue > 131. No grids of this type available.\0A\00"
define i32 @Lebedev_Laikov_npoint(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
store i32 %6, i32* %5
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 3
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 6, i32* %2
br label %85
10: ; preds = %1
%11 = load i32, i32* %3
%12 = icmp sle i32 %11, 31
br i1 %12, label %13, label %44
13: ; preds = %10
%14 = load i32, i32* %5
%15 = sub nsw i32 %14, 1
store i32 %15, i32* %5
%16 = load i32, i32* %5
%17 = srem i32 %16, 2
store i32 %17, i32* %4
%18 = load i32, i32* %5
%19 = sdiv i32 %18, 2
store i32 %19, i32* %5
%20 = load i32, i32* %4
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %13
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
store i32 %24, i32* %5
br label %25
25: ; preds = %22, %13
%26 = load i32, i32* %5
switch i32 %26, label %43 [
i32 0, label %27
i32 1, label %28
i32 2, label %29
i32 3, label %30
i32 4, label %31
i32 5, label %32
i32 6, label %33
i32 7, label %34
i32 8, label %35
i32 9, label %36
i32 10, label %37
i32 11, label %38
i32 12, label %39
i32 13, label %40
i32 14, label %41
i32 15, label %42
]
27: ; preds = %25
store i32 6, i32* %2
br label %85
28: ; preds = %25
store i32 6, i32* %2
br label %85
29: ; preds = %25
store i32 14, i32* %2
br label %85
30: ; preds = %25
store i32 26, i32* %2
br label %85
31: ; preds = %25
store i32 38, i32* %2
br label %85
32: ; preds = %25
store i32 50, i32* %2
br label %85
33: ; preds = %25
store i32 74, i32* %2
br label %85
34: ; preds = %25
store i32 86, i32* %2
br label %85
35: ; preds = %25
store i32 110, i32* %2
br label %85
36: ; preds = %25
store i32 146, i32* %2
br label %85
37: ; preds = %25
store i32 170, i32* %2
br label %85
38: ; preds = %25
store i32 194, i32* %2
br label %85
39: ; preds = %25
store i32 230, i32* %2
br label %85
40: ; preds = %25
store i32 266, i32* %2
br label %85
41: ; preds = %25
store i32 302, i32* %2
br label %85
42: ; preds = %25
store i32 350, i32* %2
br label %85
43: ; preds = %25
br label %83
44: ; preds = %10
%45 = load i32, i32* %3
%46 = icmp sle i32 %45, 131
br i1 %46, label %47, label %79
47: ; preds = %44
%48 = load i32, i32* %5
%49 = sub nsw i32 %48, 5
store i32 %49, i32* %5
%50 = load i32, i32* %5
%51 = srem i32 %50, 6
store i32 %51, i32* %4
%52 = load i32, i32* %5
%53 = sdiv i32 %52, 6
store i32 %53, i32* %5
%54 = load i32, i32* %4
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %59
56: ; preds = %47
%57 = load i32, i32* %5
%58 = add nsw i32 %57, 1
store i32 %58, i32* %5
br label %59
59: ; preds = %56, %47
%60 = load i32, i32* %5
switch i32 %60, label %78 [
i32 5, label %61
i32 6, label %62
i32 7, label %63
i32 8, label %64
i32 9, label %65
i32 10, label %66
i32 11, label %67
i32 12, label %68
i32 13, label %69
i32 14, label %70
i32 15, label %71
i32 16, label %72
i32 17, label %73
i32 18, label %74
i32 19, label %75
i32 20, label %76
i32 21, label %77
]
61: ; preds = %59
store i32 434, i32* %2
br label %85
62: ; preds = %59
store i32 590, i32* %2
br label %85
63: ; preds = %59
store i32 770, i32* %2
br label %85
64: ; preds = %59
store i32 974, i32* %2
br label %85
65: ; preds = %59
store i32 1202, i32* %2
br label %85
66: ; preds = %59
store i32 1454, i32* %2
br label %85
67: ; preds = %59
store i32 1730, i32* %2
br label %85
68: ; preds = %59
store i32 2030, i32* %2
br label %85
69: ; preds = %59
store i32 2354, i32* %2
br label %85
70: ; preds = %59
store i32 2702, i32* %2
br label %85
71: ; preds = %59
store i32 3074, i32* %2
br label %85
72: ; preds = %59
store i32 3470, i32* %2
br label %85
73: ; preds = %59
store i32 3890, i32* %2
br label %85
74: ; preds = %59
store i32 4334, i32* %2
br label %85
75: ; preds = %59
store i32 4802, i32* %2
br label %85
76: ; preds = %59
store i32 5294, i32* %2
br label %85
77: ; preds = %59
store i32 5810, i32* %2
br label %85
78: ; preds = %59
br label %82
79: ; preds = %44
%80 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
%81 = call i32 (...) @abort()
unreachable
82: ; preds = %78
br label %83
83: ; preds = %82, %43
br label %84
84: ; preds = %83
store i32 0, i32* %2
br label %85
85: ; preds = %84, %77, %76, %75, %74, %73, %72, %71, %70, %69, %68, %67, %66, %65, %64, %63, %62, %61, %42, %41, %40, %39, %38, %37, %36, %35, %34, %33, %32, %31, %30, %29, %28, %27, %9
%86 = load i32, i32* %2
ret i32 %86
}

LLVM IR (-O2):
@str = [72 x i8] c" Lebedev_Laikov_npoint: lvalue > 131. No grids of this type available.\00"
@switch.table.Lebedev_Laikov_npoint = [15 x i32] [i32 6, i32 14, i32 26, i32 38, i32 50, i32 74, i32 86, i32 110, i32 146, i32 170, i32 194, i32 230, i32 266, i32 302, i32 350]
@switch.table.Lebedev_Laikov_npoint.1 = [17 x i32] [i32 434, i32 590, i32 770, i32 974, i32 1202, i32 1454, i32 1730, i32 2030, i32 2354, i32 2702, i32 3074, i32 3470, i32 3890, i32 4334, i32 4802, i32 5294, i32 5810]
define i32 @Lebedev_Laikov_npoint(i32 %0) {
%2 = icmp slt i32 %0, 3
br i1 %2, label %38, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 32
br i1 %4, label %5, label %13
5: ; preds = %3
%6 = add nsw i32 %0, -1
%7 = lshr i32 %6, 1
%8 = and i32 %6, 1
%9 = add nuw nsw i32 %7, %8
%10 = trunc i32 %9 to i8
%11 = add i8 %10, -1
%12 = icmp ult i8 %11, 15
br i1 %12, label %29, label %38
13: ; preds = %3
%14 = icmp ult i32 %0, 132
br i1 %14, label %15, label %26
15: ; preds = %13
%16 = trunc i32 %0 to i8
%17 = add i8 %16, -5
%18 = urem i8 %17, 6
%19 = udiv i8 %17, 6
%20 = zext i8 %19 to i32
%21 = icmp ne i8 %18, 0
%22 = zext i1 %21 to i32
%23 = add nuw nsw i32 %22, %20
%24 = add nsw i32 %23, -5
%25 = icmp ult i32 %24, 17
br i1 %25, label %32, label %38
26: ; preds = %13
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str, i64 0, i64 0))
%28 = tail call i32 (...) @abort()
unreachable
29: ; preds = %5
%30 = sext i8 %11 to i64
%31 = getelementptr inbounds [15 x i32], [15 x i32]* @switch.table.Lebedev_Laikov_npoint, i64 0, i64 %30
br label %35
32: ; preds = %15
%33 = sext i32 %24 to i64
%34 = getelementptr inbounds [17 x i32], [17 x i32]* @switch.table.Lebedev_Laikov_npoint.1, i64 0, i64 %33
br label %35
35: ; preds = %29, %32
%36 = phi i32* [ %34, %32 ], [ %31, %29 ]
%37 = load i32, i32* %36
br label %38
38: ; preds = %35, %5, %15, %1
%39 = phi i32 [ 6, %1 ], [ 0, %15 ], [ 0, %5 ], [ %37, %35 ]
ret i32 %39
}