#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 scalar_t__ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_table(char *name, uint64_t *tab, int java) {
  int i;
  printf("\n");
  if (java) {
    printf("\tstatic final long[] %s = {\n", name);
  } else {
    printf("static const sph_u64 %s[] = {\n", name);
  }
  if (java) {
    for (i = 0; i < 256; i++) {
      if (i == 0) {
        printf("\t\t");
      } else if (i % 2 == 0) {
        printf(",\n\t\t");
      } else {
        printf(", ");
      }
      printf("0x%016llxL", (unsigned long long)tab[i]);
    }
    printf("\n\t};\n");
  } else {
    for (i = 0; i < 256; i++) {
      if (i == 0) {
        printf("\t");
      } else if (i % 2 == 0) {
        printf(",\n\t");
      } else {
        printf(", ");
      }
      printf("C64e(0x%016llx)", (unsigned long long)tab[i]);
    }
    printf("\n};\n");
  }
}


x86 assembly (clang, -O0):
<print_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    0xf29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x14(%rbp)
je     1152 <print_table+0x42>
mov    -0x8(%rbp),%rsi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1164 <print_table+0x54>
mov    -0x8(%rbp),%rsi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x14(%rbp)
je     1214 <print_table+0x104>
movl   $0x0,-0x18(%rbp)
cmpl   $0x100,-0x18(%rbp)
jge    1201 <print_table+0xf1>
cmpl   $0x0,-0x18(%rbp)
jne    119f <print_table+0x8f>
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d9 <print_table+0xc9>
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11c6 <print_table+0xb6>
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d4 <print_table+0xc4>
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d9 <print_table+0xc9>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1175 <print_table+0x65>
lea    0xe47(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12b5 <print_table+0x1a5>
movl   $0x0,-0x18(%rbp)
cmpl   $0x100,-0x18(%rbp)
jge    12a7 <print_table+0x197>
cmpl   $0x0,-0x18(%rbp)
jne    1245 <print_table+0x135>
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    127f <print_table+0x16f>
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    126c <print_table+0x15c>
lea    0xdf5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    127a <print_table+0x16a>
lea    0xdce(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    127f <print_table+0x16f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xdc7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    121b <print_table+0x10b>
lea    0xdbb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_table>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%r14
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %ebp,%ebp
je     11cf <print_table+0x9f>
lea    0xea8(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xeca(%rip),%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%ebp
lea    0xeac(%rip),%r12
lea    0xeaa(%rip),%r13
lea    0xec9(%rip),%r14
xchg   %ax,%ax
test   $0x1,%bpl
mov    %r13,%rdi
cmove  %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx,%rbp,8),%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    $0x100,%rbp
jne    11a0 <print_table+0x70>
jmp    124d <print_table+0x11d>
lea    0xe47(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    (%rbx),%rsi
lea    0xe5f(%rip),%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%ebp
lea    0xe45(%rip),%r12
lea    0xe30(%rip),%r13
lea    0xe4b(%rip),%r14
nopl   0x0(%rax,%rax,1)
test   $0x1,%bpl
mov    %r13,%rdi
cmove  %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx,%rbp,8),%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    $0x100,%rbp
jne    1220 <print_table+0xf0>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [29 x i8] c"\09static final long[] %s = {\0A\00"
@.str.2 = [31 x i8] c"static const sph_u64 %s[] = {\0A\00"
@.str.3 = [3 x i8] c"\09\09\00"
@.str.4 = [5 x i8] c",\0A\09\09\00"
@.str.5 = [3 x i8] c", \00"
@.str.6 = [11 x i8] c"0x%016llxL\00"
@.str.7 = [6 x i8] c"\0A\09};\0A\00"
@.str.8 = [2 x i8] c"\09\00"
@.str.9 = [4 x i8] c",\0A\09\00"
@.str.10 = [16 x i8] c"C64e(0x%016llx)\00"
@.str.11 = [5 x i8] c"\0A};\0A\00"
define void @print_table(i8* %0, i64* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i64* %1, i64** %5
store i32 %2, i32* %6
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %6
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = load i8*, i8** %4
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %12)
br label %17
14: ; preds = %3
%15 = load i8*, i8** %4
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i8* %15)
br label %17
17: ; preds = %14, %11
%18 = load i32, i32* %6
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %50
20: ; preds = %17
store i32 0, i32* %7
br label %21
21: ; preds = %45, %20
%22 = load i32, i32* %7
%23 = icmp slt i32 %22, 256
br i1 %23, label %24, label %48
24: ; preds = %21
%25 = load i32, i32* %7
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %38
29: ; preds = %24
%30 = load i32, i32* %7
%31 = srem i32 %30, 2
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %29
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %37
35: ; preds = %29
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %37
37: ; preds = %35, %33
br label %38
38: ; preds = %37, %27
%39 = load i64*, i64** %5
%40 = load i32, i32* %7
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i64, i64* %39, i64 %41
%43 = load i64, i64* %42
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i64 %43)
br label %45
45: ; preds = %38
%46 = load i32, i32* %7
%47 = add nsw i32 %46, 1
store i32 %47, i32* %7
br label %21
48: ; preds = %21
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %80
50: ; preds = %17
store i32 0, i32* %7
br label %51
51: ; preds = %75, %50
%52 = load i32, i32* %7
%53 = icmp slt i32 %52, 256
br i1 %53, label %54, label %78
54: ; preds = %51
%55 = load i32, i32* %7
%56 = icmp eq i32 %55, 0
br i1 %56, label %57, label %59
57: ; preds = %54
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %68
59: ; preds = %54
%60 = load i32, i32* %7
%61 = srem i32 %60, 2
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %59
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
br label %67
65: ; preds = %59
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %67
67: ; preds = %65, %63
br label %68
68: ; preds = %67, %57
%69 = load i64*, i64** %5
%70 = load i32, i32* %7
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds i64, i64* %69, i64 %71
%73 = load i64, i64* %72
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i64 %73)
br label %75
75: ; preds = %68
%76 = load i32, i32* %7
%77 = add nsw i32 %76, 1
store i32 %77, i32* %7
br label %51
78: ; preds = %51
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0))
br label %80
80: ; preds = %78, %48
ret void
}

LLVM IR (-O2):
@.str.1 = [29 x i8] c"\09static final long[] %s = {\0A\00"
@.str.2 = [31 x i8] c"static const sph_u64 %s[] = {\0A\00"
@.str.3 = [3 x i8] c"\09\09\00"
@.str.4 = [5 x i8] c",\0A\09\09\00"
@.str.5 = [3 x i8] c", \00"
@.str.6 = [11 x i8] c"0x%016llxL\00"
@.str.9 = [4 x i8] c",\0A\09\00"
@.str.10 = [16 x i8] c"C64e(0x%016llx)\00"
@str = [4 x i8] c"\0A};\00"
@str.12 = [5 x i8] c"\0A\09};\00"
define void @print_table(i8* %0, i64* nocapture %1, i32 %2) {
%4 = tail call i32 @putchar(i32 10)
%5 = icmp eq i32 %2, 0
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%9 = load i64, i64* %1
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i64 %9)
br label %16
11: ; preds = %3
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%13 = tail call i32 @putchar(i32 9)
%14 = load i64, i64* %1
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i64 %14)
br label %27
16: ; preds = %16, %6
%17 = phi i64 [ 1, %6 ], [ %25, %16 ]
%18 = and i64 %17, 1
%19 = icmp eq i64 %18, 0
%20 = select i1 %19, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %20)
%22 = getelementptr inbounds i64, i64* %1, i64 %17
%23 = load i64, i64* %22
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i64 %23)
%25 = add nuw nsw i64 %17, 1
%26 = icmp eq i64 %25, 256
br i1 %26, label %38, label %16
27: ; preds = %27, %11
%28 = phi i64 [ 1, %11 ], [ %36, %27 ]
%29 = and i64 %28, 1
%30 = icmp eq i64 %29, 0
%31 = select i1 %30, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %31)
%33 = getelementptr inbounds i64, i64* %1, i64 %28
%34 = load i64, i64* %33
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i64 %34)
%36 = add nuw nsw i64 %28, 1
%37 = icmp eq i64 %36, 256
br i1 %37, label %38, label %27
38: ; preds = %16, %27
%39 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0), %27 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @str.12, i64 0, i64 0), %16 ]
%40 = tail call i32 @puts(i8* dereferenceable(1) %39)
ret void
}