#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 /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ make_table(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ print_table(char *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ sprintf(char *, char *, int);
void make_tables(int java) {
  int i;
  for (i = 0; i < 8; i++) {
    uint64_t tab[256];
    char name[20];
    make_table(tab, i);
    sprintf(name, "T%d", i);
    print_table(name, tab, java);
  }
}


x86 assembly (clang, -O0):
<make_tables>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1198 <make_tables+0x68>
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <make_table@plt>
lea    -0x430(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xe91(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x430(%rbp),%rdi
lea    -0x410(%rbp),%rsi
mov    -0x4(%rbp),%edx
call   1030 <print_table@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1145 <make_tables+0x15>
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_tables>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x428,%rsp
mov    %edi,%ebp
lea    0x20(%rsp),%r14
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <make_table@plt>
lea    0xeab(%rip),%r15
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %edx,%edx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <print_table@plt>
mov    %r14,%rdi
mov    $0x1,%esi
call   1040 <make_table@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x1,%edx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <print_table@plt>
mov    %r14,%rdi
mov    $0x2,%esi
call   1040 <make_table@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x2,%edx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <print_table@plt>
mov    %r14,%rdi
mov    $0x3,%esi
call   1040 <make_table@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x3,%edx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <print_table@plt>
mov    %r14,%rdi
mov    $0x4,%esi
call   1040 <make_table@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x4,%edx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <print_table@plt>
mov    %r14,%rdi
mov    $0x5,%esi
call   1040 <make_table@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x5,%edx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <print_table@plt>
mov    %r14,%rdi
mov    $0x6,%esi
call   1040 <make_table@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x6,%edx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <print_table@plt>
mov    %r14,%rdi
mov    $0x7,%esi
call   1040 <make_table@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x7,%edx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <print_table@plt>
add    $0x428,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"T%d\00"
define void @make_tables(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [256 x i32]
%5 = alloca [20 x i8]
store i32 %0, i32* %2
store i32 0, i32* %3
br label %6
6: ; preds = %20, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 8
br i1 %8, label %9, label %23
9: ; preds = %6
%10 = getelementptr inbounds [256 x i32], [256 x i32]* %4, i64 0, i64 0
%11 = load i32, i32* %3
%12 = call i32 @make_table(i32* %10, i32 %11)
%13 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%14 = load i32, i32* %3
%15 = call i32 @sprintf(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%17 = getelementptr inbounds [256 x i32], [256 x i32]* %4, i64 0, i64 0
%18 = load i32, i32* %2
%19 = call i32 @print_table(i8* %16, i32* %17, i32 %18)
br label %20
20: ; preds = %9
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %6
23: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"T%d\00"
define void @make_tables(i32 %0) {
%2 = alloca [256 x i32]
%3 = alloca [20 x i8]
%4 = bitcast [256 x i32]* %2 to i8*
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [256 x i32], [256 x i32]* %2, i64 0, i64 0
%7 = call i32 @make_table(i32* %6, i32 0)
%8 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%9 = call i32 @print_table(i8* %5, i32* %6, i32 %0)
%10 = call i32 @make_table(i32* %6, i32 1)
%11 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%12 = call i32 @print_table(i8* %5, i32* %6, i32 %0)
%13 = call i32 @make_table(i32* %6, i32 2)
%14 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%15 = call i32 @print_table(i8* %5, i32* %6, i32 %0)
%16 = call i32 @make_table(i32* %6, i32 3)
%17 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%18 = call i32 @print_table(i8* %5, i32* %6, i32 %0)
%19 = call i32 @make_table(i32* %6, i32 4)
%20 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%21 = call i32 @print_table(i8* %5, i32* %6, i32 %0)
%22 = call i32 @make_table(i32* %6, i32 5)
%23 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
%24 = call i32 @print_table(i8* %5, i32* %6, i32 %0)
%25 = call i32 @make_table(i32* %6, i32 6)
%26 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 6)
%27 = call i32 @print_table(i8* %5, i32* %6, i32 %0)
%28 = call i32 @make_table(i32* %6, i32 7)
%29 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 7)
%30 = call i32 @print_table(i8* %5, i32* %6, i32 %0)
ret void
}