#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*/ movecodes(int *, int *, int, char);
void moveinstructions(void) {
  int allowfrom[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0};
  int allowto[] = {1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0};
  movecodes(allowfrom, allowto, 0x1000, 'B');
  allowto[1] = 1;
  movecodes(allowfrom, allowto, 0x2000, 'L');
  movecodes(allowfrom, allowto, 0x3000, 'W');
}


x86 assembly (clang, -O0):
<moveinstructions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    -0x40(%rbp),%rdi
lea    0xeca(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
lea    -0x80(%rbp),%rdi
lea    0xef5(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
lea    -0x40(%rbp),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x1000,%edx
mov    $0x42,%ecx
call   1030 <movecodes@plt>
movl   $0x1,-0x7c(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x2000,%edx
mov    $0x4c,%ecx
call   1030 <movecodes@plt>
lea    -0x40(%rbp),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x3000,%edx
mov    $0x57,%ecx
call   1030 <movecodes@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<moveinstructions>:
push   %r14
push   %rbx
sub    $0x88,%rsp
movaps 0xf0f(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xef3(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xed7(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xebb(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xf1f(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xf03(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xee7(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x40(%rsp),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1000,%edx
mov    $0x42,%ecx
call   1030 <movecodes@plt>
movl   $0x1,0x4(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x2000,%edx
mov    $0x4c,%ecx
call   1030 <movecodes@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x3000,%edx
mov    $0x57,%ecx
call   1030 <movecodes@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.moveinstructions.allowfrom = [16 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 0, i32 0, i32 0, i32 0]
@__const.moveinstructions.allowto = [16 x i32] [i32 1, i32 0, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0]
define void @moveinstructions() {
%1 = alloca [16 x i32]
%2 = alloca [16 x i32]
%3 = bitcast [16 x i32]* %1 to i8*
%4 = bitcast [16 x i32]* %2 to i8*
%5 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%7 = call i32 @movecodes(i32* %5, i32* %6, i32 4096, i8 signext 66)
%8 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 1
store i32 1, i32* %8
%9 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%10 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%11 = call i32 @movecodes(i32* %9, i32* %10, i32 8192, i8 signext 76)
%12 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%13 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%14 = call i32 @movecodes(i32* %12, i32* %13, i32 12288, i8 signext 87)
ret void
}

LLVM IR (-O2):
@__const.moveinstructions.allowfrom = [16 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 0, i32 0, i32 0, i32 0]
@__const.moveinstructions.allowto = [16 x i32] [i32 1, i32 0, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0]
define void @moveinstructions() {
%1 = alloca [16 x i32]
%2 = alloca [16 x i32]
%3 = bitcast [16 x i32]* %1 to i8*
%4 = bitcast [16 x i32]* %2 to i8*
%5 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%7 = call i32 @movecodes(i32* %5, i32* %6, i32 4096, i8 signext 66)
%8 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 1
store i32 1, i32* %8
%9 = call i32 @movecodes(i32* %5, i32* %6, i32 8192, i8 signext 76)
%10 = call i32 @movecodes(i32* %5, i32* %6, i32 12288, i8 signext 87)
ret void
}