#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 */
unsigned long long const get_some_moves(unsigned long long const,
                                        unsigned long long const, int);
unsigned long long get_moves_6x6(const unsigned long long P,
                                 const unsigned long long O) {
  const unsigned long long E = (~(P | O) & 0x007E7E7E7E7E7E00ull);
  return ((get_some_moves(P, O & 0x003C3C3C3C3C3C00ull, 1) |
           get_some_moves(P, O & 0x00007E7E7E7E0000ull, 8) |
           get_some_moves(P, O & 0x00003C3C3C3C0000ull, 7) |
           get_some_moves(P, O & 0x00003C3C3C3C0000ull, 9)) &
          E);
}


x86 assembly (clang, -O0):
<get_moves_6x6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
or     -0x10(%rbp),%rax
xor    $0xffffffffffffffff,%rax
movabs $0x7e7e7e7e7e7e00,%rcx
and    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
movabs $0x3c3c3c3c3c3c00,%rsi
and    -0x10(%rbp),%rsi
mov    $0x1,%edx
call   1030 <get_some_moves@plt>
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
movabs $0x7e7e7e7e0000,%rsi
and    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1030 <get_some_moves@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
or     %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
movabs $0x3c3c3c3c0000,%rsi
and    -0x10(%rbp),%rsi
mov    $0x7,%edx
call   1030 <get_some_moves@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
or     %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
movabs $0x3c3c3c3c0000,%rsi
and    -0x10(%rbp),%rsi
mov    $0x9,%edx
call   1030 <get_some_moves@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
or     %rcx,%rax
and    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_moves_6x6>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r13
mov    %rsi,%rbp
or     %rdi,%rbp
not    %rbp
movabs $0x3c3c3c3c3c3c00,%rsi
and    %r14,%rsi
mov    $0x1,%edx
call   1030 <get_some_moves@plt>
mov    %rax,%r15
movabs $0x7e7e7e7e0000,%rsi
and    %r14,%rsi
mov    %r13,%rdi
mov    $0x8,%edx
call   1030 <get_some_moves@plt>
mov    %rax,%r12
or     %r15,%r12
movabs $0x3c3c3c3c0000,%rbx
and    %r14,%rbx
mov    %r13,%rdi
mov    %rbx,%rsi
mov    $0x7,%edx
call   1030 <get_some_moves@plt>
mov    %rax,%r14
mov    %r13,%rdi
mov    %rbx,%rsi
mov    $0x9,%edx
call   1030 <get_some_moves@plt>
or     %r14,%rax
or     %r12,%rax
movabs $0x7e7e7e7e7e7e00,%rcx
and    %rbp,%rcx
and    %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i64 @get_moves_6x6(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = or i64 %6, %7
%9 = xor i64 %8, -1
%10 = and i64 %9, 35604928818740736
store i64 %10, i64* %5
%11 = load i64, i64* %3
%12 = load i64, i64* %4
%13 = and i64 %12, 16954728008924160
%14 = call i64 @get_some_moves(i64 %11, i64 %13, i32 1)
%15 = load i64, i64* %3
%16 = load i64, i64* %4
%17 = and i64 %16, 139081753165824
%18 = call i64 @get_some_moves(i64 %15, i64 %17, i32 8)
%19 = or i64 %14, %18
%20 = load i64, i64* %3
%21 = load i64, i64* %4
%22 = and i64 %21, 66229406269440
%23 = call i64 @get_some_moves(i64 %20, i64 %22, i32 7)
%24 = or i64 %19, %23
%25 = load i64, i64* %3
%26 = load i64, i64* %4
%27 = and i64 %26, 66229406269440
%28 = call i64 @get_some_moves(i64 %25, i64 %27, i32 9)
%29 = or i64 %24, %28
%30 = load i64, i64* %5
%31 = and i64 %29, %30
ret i64 %31
}

LLVM IR (-O2):
define i64 @get_moves_6x6(i64 %0, i64 %1) {
%3 = or i64 %1, %0
%4 = and i64 %3, 35604928818740736
%5 = xor i64 %4, 35604928818740736
%6 = and i64 %1, 16954728008924160
%7 = tail call i64 @get_some_moves(i64 %0, i64 %6, i32 1)
%8 = and i64 %1, 139081753165824
%9 = tail call i64 @get_some_moves(i64 %0, i64 %8, i32 8)
%10 = or i64 %9, %7
%11 = and i64 %1, 66229406269440
%12 = tail call i64 @get_some_moves(i64 %0, i64 %11, i32 7)
%13 = or i64 %10, %12
%14 = tail call i64 @get_some_moves(i64 %0, i64 %11, i32 9)
%15 = or i64 %13, %14
%16 = and i64 %15, %5
ret i64 %16
}