x_square_stat(x, cor, c, b) int x, cor, c, b;
{
  static int x_square_table[3][3][3] = {
      100, 75,  75,  50,  50,   50, 75,   50, 0,    0,   0,   -25, 0,  0,
      -25, -25, -25, -50, -125, 0,  -100, 50, -100, -75, -75, -75, -50};
  if (x == 2)
    return (0);
  else if (x == 1)
    return (-x_square_table[x_conv(x, cor)][x_conv(x, c)][x_conv(x, b)]);
  else
    return (x_square_table[x_conv(x, cor)][x_conv(x, c)][x_conv(x, b)]);
}


x86 assembly (clang, -O0):
<x_square_stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    113a <x_square_stat+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    1207 <x_square_stat+0xf7>
cmpl   $0x1,-0x8(%rbp)
jne    11a8 <x_square_stat+0x98>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1030 <x_conv@plt>
movslq %eax,%rcx
lea    0x2ed5(%rip),%rax
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    $0x0,%al
call   1030 <x_conv@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    $0x0,%al
call   1030 <x_conv@plt>
mov    -0x20(%rbp),%rcx
movslq %eax,%rdx
xor    %eax,%eax
sub    (%rcx,%rdx,4),%eax
mov    %eax,-0x4(%rbp)
jmp    1207 <x_square_stat+0xf7>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1030 <x_conv@plt>
movslq %eax,%rcx
lea    0x2e71(%rip),%rax
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    $0x0,%al
call   1030 <x_conv@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    $0x0,%al
call   1030 <x_conv@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_square_stat>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    $0x2,%edi
je     1177 <x_square_stat+0x67>
mov    %ecx,%r14d
mov    %edx,%ebx
mov    %edi,%ebp
cmp    $0x1,%edi
jne    117b <x_square_stat+0x6b>
xor    %ebp,%ebp
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <x_conv@plt>
movslq %eax,%r15
mov    $0x1,%edi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <x_conv@plt>
movslq %eax,%rbx
mov    $0x1,%edi
mov    %r14d,%esi
xor    %eax,%eax
call   1030 <x_conv@plt>
cltq
lea    (%r15,%r15,8),%rcx
lea    0xe9a(%rip),%rdx
lea    (%rdx,%rcx,4),%rcx
lea    (%rbx,%rbx,2),%rdx
lea    (%rcx,%rdx,4),%rcx
sub    (%rcx,%rax,4),%ebp
jmp    11bd <x_square_stat+0xad>
xor    %ebp,%ebp
jmp    11bd <x_square_stat+0xad>
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <x_conv@plt>
movslq %eax,%r15
mov    %ebp,%edi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <x_conv@plt>
movslq %eax,%rbx
mov    %ebp,%edi
mov    %r14d,%esi
xor    %eax,%eax
call   1030 <x_conv@plt>
cltq
lea    (%r15,%r15,8),%rcx
lea    0xe52(%rip),%rdx
lea    (%rdx,%rcx,4),%rcx
lea    (%rbx,%rbx,2),%rdx
lea    (%rcx,%rdx,4),%rcx
mov    (%rcx,%rax,4),%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@x_square_stat.x_square_table = internal global [3 x [3 x [3 x i32]]] [[3 x [3 x i32]] [[3 x i32] [i32 100, i32 75, i32 75], [3 x i32] [i32 50, i32 50, i32 50], [3 x i32] [i32 75, i32 50, i32 0]], [3 x [3 x i32]] [[3 x i32] [i32 0, i32 0, i32 -25], [3 x i32] [i32 0, i32 0, i32 -25], [3 x i32] [i32 -25, i32 -25, i32 -50]], [3 x [3 x i32]] [[3 x i32] [i32 -125, i32 0, i32 -100], [3 x i32] [i32 50, i32 -100, i32 -75], [3 x i32] [i32 -75, i32 -75, i32 -50]]]
define i32 @x_square_stat(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %6
%11 = icmp eq i32 %10, 2
br i1 %11, label %12, label %13
12: ; preds = %4
store i32 0, i32* %5
br label %51
13: ; preds = %4
%14 = load i32, i32* %6
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %34
16: ; preds = %13
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = call i32 (i32, i32, ...) bitcast (i32 (...)* @x_conv to i32 (i32, i32, ...)*)(i32 %17, i32 %18)
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [3 x [3 x [3 x i32]]], [3 x [3 x [3 x i32]]]* @x_square_stat.x_square_table, i64 0, i64 %20
%22 = load i32, i32* %6
%23 = load i32, i32* %8
%24 = call i32 (i32, i32, ...) bitcast (i32 (...)* @x_conv to i32 (i32, i32, ...)*)(i32 %22, i32 %23)
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %21, i64 0, i64 %25
%27 = load i32, i32* %6
%28 = load i32, i32* %9
%29 = call i32 (i32, i32, ...) bitcast (i32 (...)* @x_conv to i32 (i32, i32, ...)*)(i32 %27, i32 %28)
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [3 x i32], [3 x i32]* %26, i64 0, i64 %30
%32 = load i32, i32* %31
%33 = sub nsw i32 0, %32
store i32 %33, i32* %5
br label %51
34: ; preds = %13
%35 = load i32, i32* %6
%36 = load i32, i32* %7
%37 = call i32 (i32, i32, ...) bitcast (i32 (...)* @x_conv to i32 (i32, i32, ...)*)(i32 %35, i32 %36)
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [3 x [3 x [3 x i32]]], [3 x [3 x [3 x i32]]]* @x_square_stat.x_square_table, i64 0, i64 %38
%40 = load i32, i32* %6
%41 = load i32, i32* %8
%42 = call i32 (i32, i32, ...) bitcast (i32 (...)* @x_conv to i32 (i32, i32, ...)*)(i32 %40, i32 %41)
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %39, i64 0, i64 %43
%45 = load i32, i32* %6
%46 = load i32, i32* %9
%47 = call i32 (i32, i32, ...) bitcast (i32 (...)* @x_conv to i32 (i32, i32, ...)*)(i32 %45, i32 %46)
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [3 x i32], [3 x i32]* %44, i64 0, i64 %48
%50 = load i32, i32* %49
store i32 %50, i32* %5
br label %51
51: ; preds = %34, %16, %12
%52 = load i32, i32* %5
ret i32 %52
}

LLVM IR (-O2):
@x_square_stat.x_square_table = internal unnamed_addr constant [3 x [3 x [3 x i32]]] [[3 x [3 x i32]] [[3 x i32] [i32 100, i32 75, i32 75], [3 x i32] [i32 50, i32 50, i32 50], [3 x i32] [i32 75, i32 50, i32 0]], [3 x [3 x i32]] [[3 x i32] [i32 0, i32 0, i32 -25], [3 x i32] [i32 0, i32 0, i32 -25], [3 x i32] [i32 -25, i32 -25, i32 -50]], [3 x [3 x i32]] [[3 x i32] [i32 -125, i32 0, i32 -100], [3 x i32] [i32 50, i32 -100, i32 -75], [3 x i32] [i32 -75, i32 -75, i32 -50]]]
define i32 @x_square_stat(i32 %0, i32 %1, i32 %2, i32 %3) {
switch i32 %0, label %15 [
i32 2, label %24
i32 1, label %5
]
5: ; preds = %4
%6 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @x_conv to i32 (i32, i32, ...)*)(i32 1, i32 %1)
%7 = sext i32 %6 to i64
%8 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @x_conv to i32 (i32, i32, ...)*)(i32 1, i32 %2)
%9 = sext i32 %8 to i64
%10 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @x_conv to i32 (i32, i32, ...)*)(i32 1, i32 %3)
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [3 x [3 x [3 x i32]]], [3 x [3 x [3 x i32]]]* @x_square_stat.x_square_table, i64 0, i64 %7, i64 %9, i64 %11
%13 = load i32, i32* %12
%14 = sub nsw i32 0, %13
br label %24
15: ; preds = %4
%16 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @x_conv to i32 (i32, i32, ...)*)(i32 %0, i32 %1)
%17 = sext i32 %16 to i64
%18 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @x_conv to i32 (i32, i32, ...)*)(i32 %0, i32 %2)
%19 = sext i32 %18 to i64
%20 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @x_conv to i32 (i32, i32, ...)*)(i32 %0, i32 %3)
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [3 x [3 x [3 x i32]]], [3 x [3 x [3 x i32]]]* @x_square_stat.x_square_table, i64 0, i64 %17, i64 %19, i64 %21
%23 = load i32, i32* %22
br label %24
24: ; preds = %4, %15, %5
%25 = phi i32 [ %14, %5 ], [ %23, %15 ], [ 0, %4 ]
ret i32 %25
}