#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 */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ dump(int *, int);
int /*<<< orphan*/ fn_22b(int *, int);
int /*<<< orphan*/ inverse_22b(int *, int);
void do_tests(void) {
  uint8_t keymem[16] = {
      0x0, 0xd, 0x0, 0x0, 0xa, 0x5, 0x3, 0x6,
      0xc, 0x0, 0xf, 0x1, 0xd, 0x8, 0x5, 0x9,
  };
  dump(keymem, 16);
  fn_22b(keymem, 0);
  fn_22b(keymem, 0);
  fn_22b(keymem, 0);
  fn_22b(keymem, 0);
  dump(keymem, 16);
  inverse_22b(keymem, 0);
  inverse_22b(keymem, 0);
  inverse_22b(keymem, 0);
  inverse_22b(keymem, 0);
  dump(keymem, 16);
  uint8_t bootmem[16] = {
      0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
      0x0, 0x0, 0xb, 0x5, 0x3, 0xf, 0x3, 0xf,
  };
  fn_22b(bootmem, 0xa);
  fn_22b(bootmem, 0xa);
  dump(bootmem, 16);
  inverse_22b(bootmem, 0xa);
  inverse_22b(bootmem, 0xa);
  dump(bootmem, 16);
}


x86 assembly (clang, -O0):
<do_tests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    -0x40(%rbp),%rdi
lea    0xe9a(%rip),%rsi
mov    $0x40,%edx
call   1060 <memcpy@plt>
lea    -0x40(%rbp),%rdi
mov    $0x10,%esi
call   1050 <dump@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
call   1070 <fn_22b@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
call   1070 <fn_22b@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
call   1070 <fn_22b@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
call   1070 <fn_22b@plt>
lea    -0x40(%rbp),%rdi
mov    $0x10,%esi
call   1050 <dump@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
call   1030 <inverse_22b@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
call   1030 <inverse_22b@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
call   1030 <inverse_22b@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
call   1030 <inverse_22b@plt>
lea    -0x40(%rbp),%rdi
mov    $0x10,%esi
call   1050 <dump@plt>
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
movl   $0xb,-0x58(%rbp)
movl   $0x5,-0x54(%rbp)
movl   $0x3,-0x50(%rbp)
movl   $0xf,-0x4c(%rbp)
movl   $0x3,-0x48(%rbp)
movl   $0xf,-0x44(%rbp)
lea    -0x80(%rbp),%rdi
mov    $0xa,%esi
call   1070 <fn_22b@plt>
lea    -0x80(%rbp),%rdi
mov    $0xa,%esi
call   1070 <fn_22b@plt>
lea    -0x80(%rbp),%rdi
mov    $0x10,%esi
call   1050 <dump@plt>
lea    -0x80(%rbp),%rdi
mov    $0xa,%esi
call   1030 <inverse_22b@plt>
lea    -0x80(%rbp),%rdi
mov    $0xa,%esi
call   1030 <inverse_22b@plt>
lea    -0x80(%rbp),%rdi
mov    $0x10,%esi
call   1050 <dump@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_tests>:
push   %rbx
sub    $0x80,%rsp
movaps 0xf01(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xead(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
lea    0x40(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x10,%esi
call   1040 <dump@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <fn_22b@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <fn_22b@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <fn_22b@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <fn_22b@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
call   1040 <dump@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <inverse_22b@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <inverse_22b@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <inverse_22b@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <inverse_22b@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
call   1040 <dump@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movaps 0xe04(%rip),%xmm0
movups %xmm0,0x28(%rsp)
movabs $0xf00000003,%rax
mov    %rax,0x38(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1050 <fn_22b@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1050 <fn_22b@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
call   1040 <dump@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <inverse_22b@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <inverse_22b@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
call   1040 <dump@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.do_tests.keymem = [16 x i32] [i32 0, i32 13, i32 0, i32 0, i32 10, i32 5, i32 3, i32 6, i32 12, i32 0, i32 15, i32 1, i32 13, i32 8, i32 5, i32 9]
define void @do_tests() {
%1 = alloca [16 x i32]
%2 = alloca [16 x i32]
%3 = bitcast [16 x i32]* %1 to i8*
%4 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%5 = call i32 @dump(i32* %4, i32 16)
%6 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%7 = call i32 @fn_22b(i32* %6, i32 0)
%8 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%9 = call i32 @fn_22b(i32* %8, i32 0)
%10 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%11 = call i32 @fn_22b(i32* %10, i32 0)
%12 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%13 = call i32 @fn_22b(i32* %12, i32 0)
%14 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%15 = call i32 @dump(i32* %14, i32 16)
%16 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%17 = call i32 @inverse_22b(i32* %16, i32 0)
%18 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%19 = call i32 @inverse_22b(i32* %18, i32 0)
%20 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%21 = call i32 @inverse_22b(i32* %20, i32 0)
%22 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%23 = call i32 @inverse_22b(i32* %22, i32 0)
%24 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%25 = call i32 @dump(i32* %24, i32 16)
%26 = bitcast [16 x i32]* %2 to i8*
%27 = bitcast i8* %26 to [16 x i32]*
%28 = getelementptr inbounds [16 x i32], [16 x i32]* %27, i32 0, i32 10
store i32 11, i32* %28
%29 = getelementptr inbounds [16 x i32], [16 x i32]* %27, i32 0, i32 11
store i32 5, i32* %29
%30 = getelementptr inbounds [16 x i32], [16 x i32]* %27, i32 0, i32 12
store i32 3, i32* %30
%31 = getelementptr inbounds [16 x i32], [16 x i32]* %27, i32 0, i32 13
store i32 15, i32* %31
%32 = getelementptr inbounds [16 x i32], [16 x i32]* %27, i32 0, i32 14
store i32 3, i32* %32
%33 = getelementptr inbounds [16 x i32], [16 x i32]* %27, i32 0, i32 15
store i32 15, i32* %33
%34 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%35 = call i32 @fn_22b(i32* %34, i32 10)
%36 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%37 = call i32 @fn_22b(i32* %36, i32 10)
%38 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%39 = call i32 @dump(i32* %38, i32 16)
%40 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%41 = call i32 @inverse_22b(i32* %40, i32 10)
%42 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%43 = call i32 @inverse_22b(i32* %42, i32 10)
%44 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%45 = call i32 @dump(i32* %44, i32 16)
ret void
}

LLVM IR (-O2):
@__const.do_tests.keymem = [16 x i32] [i32 0, i32 13, i32 0, i32 0, i32 10, i32 5, i32 3, i32 6, i32 12, i32 0, i32 15, i32 1, i32 13, i32 8, i32 5, i32 9]
define void @do_tests() {
%1 = alloca [16 x i32]
%2 = alloca [16 x i32]
%3 = bitcast [16 x i32]* %1 to i8*
%4 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%5 = call i32 @dump(i32* %4, i32 16)
%6 = call i32 @fn_22b(i32* %4, i32 0)
%7 = call i32 @fn_22b(i32* %4, i32 0)
%8 = call i32 @fn_22b(i32* %4, i32 0)
%9 = call i32 @fn_22b(i32* %4, i32 0)
%10 = call i32 @dump(i32* %4, i32 16)
%11 = call i32 @inverse_22b(i32* %4, i32 0)
%12 = call i32 @inverse_22b(i32* %4, i32 0)
%13 = call i32 @inverse_22b(i32* %4, i32 0)
%14 = call i32 @inverse_22b(i32* %4, i32 0)
%15 = call i32 @dump(i32* %4, i32 16)
%16 = bitcast [16 x i32]* %2 to i8*
%17 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 10
%18 = bitcast i32* %17 to <4 x i32>*
store <4 x i32> <i32 11, i32 5, i32 3, i32 15>, <4 x i32>* %18
%19 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 14
store i32 3, i32* %19
%20 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 15
store i32 15, i32* %20
%21 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%22 = call i32 @fn_22b(i32* %21, i32 10)
%23 = call i32 @fn_22b(i32* %21, i32 10)
%24 = call i32 @dump(i32* %21, i32 16)
%25 = call i32 @inverse_22b(i32* %21, i32 10)
%26 = call i32 @inverse_22b(i32* %21, i32 10)
%27 = call i32 @dump(i32* %21, i32 16)
ret void
}