#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 OatHash(char *);
scalar_t__ isalnum(char);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
char *strncpy(char *, char *, int);
main() {
  char s[] = "xx";
  char c, c2;
  int hash, box, minblocks;
  int period = 12 * 24 - 1;
  char *boxes[12 * 24];
  for (box = 0; box < 12 * 24; box++) {
    boxes[box] = 0;
  }
  for (c = 'A'; c <= 'z'; c++) {
    for (c2 = 'A'; c2 <= 'z'; c2++) {
      if (!(isalnum(c) && isalnum(c2)))
        continue;
      s[0] = c;
      s[1] = c2;
      hash = OatHash(s);
      box = (int)(0.5 + period * hash / (double)8192);
      if (!boxes[box]) {
        boxes[box] = strncpy((char *)malloc(3), s, 3);
      }
    }
  }
  printf("    \"ok\" xor => {\n");
  for (box = 0; box < 12 * 24; box++) {
    printf("\tsplayclass(\"%s\",\"daily\"), # Box %d\n", boxes[box], box);
  }
  printf("\t};\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x920,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xea7(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xe9f(%rip),%al
mov    %al,-0x5(%rbp)
movl   $0x11f,-0x1c(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x120,-0x14(%rbp)
jge    11af <main+0x5f>
movslq -0x14(%rbp),%rax
movq   $0x0,-0x920(%rbp,%rax,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1184 <main+0x34>
movb   $0x41,-0x8(%rbp)
movsbl -0x8(%rbp),%eax
cmp    $0x7a,%eax
jg     129f <main+0x14f>
movb   $0x41,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x7a,%eax
jg     128d <main+0x13d>
movsbl -0x8(%rbp),%edi
call   1050 <isalnum@plt>
cmp    $0x0,%rax
je     11f7 <main+0xa7>
movsbl -0x9(%rbp),%edi
call   1050 <isalnum@plt>
cmp    $0x0,%rax
jne    11fc <main+0xac>
jmp    1280 <main+0x130>
mov    -0x8(%rbp),%al
mov    %al,-0x7(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x6(%rbp)
lea    -0x7(%rbp),%rdi
call   1060 <OatHash@plt>
mov    %eax,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  0xde1(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xdcd(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmpq   $0x0,-0x920(%rbp,%rax,8)
jne    127b <main+0x12b>
mov    $0x3,%edi
call   1070 <malloc@plt>
mov    %rax,%rdi
lea    -0x7(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
mov    %rcx,-0x920(%rbp,%rax,8)
ff
jmp    1280 <main+0x130>
mov    -0x9(%rbp),%al
add    $0x1,%al
mov    %al,-0x9(%rbp)
jmp    11c4 <main+0x74>
jmp    1292 <main+0x142>
mov    -0x8(%rbp),%al
add    $0x1,%al
mov    %al,-0x8(%rbp)
jmp    11b3 <main+0x63>
lea    0xd6d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x120,-0x14(%rbp)
jge    12ec <main+0x19c>
movslq -0x14(%rbp),%rax
mov    -0x920(%rbp,%rax,8),%rsi
ff
mov    -0x14(%rbp),%edx
lea    0xd4f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12b4 <main+0x164>
lea    0xd58(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x920,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x918,%rsp
movb   $0x0,0xe(%rsp)
movw   $0x7878,0xc(%rsp)
lea    0x10(%rsp),%rdi
mov    $0x900,%edx
xor    %esi,%esi
call   1070 <memset@plt>
mov    $0x41,%r15b
lea    0xc(%rsp),%r14
jmp    11be <main+0x4e>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r15b
cmp    $0x7b,%r15b
je     1254 <main+0xe4>
mov    $0x41,%bl
jmp    11d8 <main+0x68>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%bl
cmp    $0x7b,%bl
je     11b0 <main+0x40>
movsbl %r15b,%edi
call   1060 <isalnum@plt>
test   %rax,%rax
je     11d0 <main+0x60>
movsbl %bl,%edi
call   1060 <isalnum@plt>
test   %rax,%rax
je     11d0 <main+0x60>
mov    %r15b,0xc(%rsp)
mov    %bl,0xd(%rsp)
mov    %r14,%rdi
call   1080 <OatHash@plt>
imul   $0x11f,%eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xde7(%rip),%xmm0
addsd  0xde7(%rip),%xmm0
cvttsd2si %xmm0,%eax
movslq %eax,%rbp
cmpq   $0x0,0x10(%rsp,%rbp,8)
jne    11d0 <main+0x60>
mov    $0x3,%edi
call   1090 <malloc@plt>
mov    %rax,%rdi
mov    %r14,%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
mov    %rax,0x10(%rsp,%rbp,8)
jmp    11d0 <main+0x60>
lea    0xddd(%rip),%rdi
call   1040 <puts@plt>
lea    0xdac(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    0x10(%rsp,%rbx,8),%rsi
mov    %r14,%rdi
mov    %ebx,%edx
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    $0x120,%rbx
jne    1270 <main+0x100>
lea    0xdb5(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x918,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.s = [3 x i8] c"xx\00"
@.str = [19 x i8] c" \22ok\22 xor => {\0A\00"
@.str.1 = [37 x i8] c"\09splayclass(\22%s\22,\22daily\22), # Box %d\0A\00"
@.str.2 = [5 x i8] c"\09};\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i8]
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [288 x i8*]
store i32 0, i32* %1
%10 = bitcast [3 x i8]* %2 to i8*
store i32 287, i32* %8
store i32 0, i32* %6
br label %11
11: ; preds = %18, %0
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 288
br i1 %13, label %14, label %21
14: ; preds = %11
%15 = load i32, i32* %6
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [288 x i8*], [288 x i8*]* %9, i64 0, i64 %16
store i8* null, i8** %17
br label %18
18: ; preds = %14
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %11
21: ; preds = %11
store i8 65, i8* %3
br label %22
22: ; preds = %72, %21
%23 = load i8, i8* %3
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 122
br i1 %25, label %26, label %75
26: ; preds = %22
store i8 65, i8* %4
br label %27
27: ; preds = %68, %26
%28 = load i8, i8* %4
%29 = sext i8 %28 to i32
%30 = icmp sle i32 %29, 122
br i1 %30, label %31, label %71
31: ; preds = %27
%32 = load i8, i8* %3
%33 = call i64 @isalnum(i8 signext %32)
%34 = icmp ne i64 %33, 0
br i1 %34, label %35, label %39
35: ; preds = %31
%36 = load i8, i8* %4
%37 = call i64 @isalnum(i8 signext %36)
%38 = icmp ne i64 %37, 0
br i1 %38, label %40, label %39
39: ; preds = %35, %31
br label %68
40: ; preds = %35
%41 = load i8, i8* %3
%42 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
store i8 %41, i8* %42
%43 = load i8, i8* %4
%44 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 1
store i8 %43, i8* %44
%45 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%46 = call i32 @OatHash(i8* %45)
store i32 %46, i32* %5
%47 = load i32, i32* %8
%48 = load i32, i32* %5
%49 = mul nsw i32 %47, %48
%50 = sitofp i32 %49 to double
%51 = fdiv double %50, 8.192000e+03
%52 = fadd double 5.000000e-01, %51
%53 = fptosi double %52 to i32
store i32 %53, i32* %6
%54 = load i32, i32* %6
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [288 x i8*], [288 x i8*]* %9, i64 0, i64 %55
%57 = load i8*, i8** %56
%58 = icmp ne i8* %57, null
br i1 %58, label %67, label %59
59: ; preds = %40
%60 = call i64 @malloc(i32 3)
%61 = inttoptr i64 %60 to i8*
%62 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%63 = call i8* @strncpy(i8* %61, i8* %62, i32 3)
%64 = load i32, i32* %6
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [288 x i8*], [288 x i8*]* %9, i64 0, i64 %65
store i8* %63, i8** %66
br label %67
67: ; preds = %59, %40
br label %68
68: ; preds = %67, %39
%69 = load i8, i8* %4
%70 = add i8 %69, 1
store i8 %70, i8* %4
br label %27
71: ; preds = %27
br label %72
72: ; preds = %71
%73 = load i8, i8* %3
%74 = add i8 %73, 1
store i8 %74, i8* %3
br label %22
75: ; preds = %22
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
br label %77
77: ; preds = %87, %75
%78 = load i32, i32* %6
%79 = icmp slt i32 %78, 288
br i1 %79, label %80, label %90
80: ; preds = %77
%81 = load i32, i32* %6
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [288 x i8*], [288 x i8*]* %9, i64 0, i64 %82
%84 = load i8*, i8** %83
%85 = load i32, i32* %6
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* %84, i32 %85)
br label %87
87: ; preds = %80
%88 = load i32, i32* %6
%89 = add nsw i32 %88, 1
store i32 %89, i32* %6
br label %77
90: ; preds = %77
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%92 = load i32, i32* %1
ret i32 %92
}

LLVM IR (-O2):
@__const.main.s = [3 x i8] c"xx\00"
@.str.1 = [37 x i8] c"\09splayclass(\22%s\22,\22daily\22), # Box %d\0A\00"
@str = [18 x i8] c" \22ok\22 xor => {\00"
@str.3 = [4 x i8] c"\09};\00"
define i32 @main() {
%1 = alloca [3 x i8]
%2 = alloca [288 x i8*]
%3 = bitcast [288 x i8*]* %2 to i8*
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 1
br label %6
6: ; preds = %0, %33
%7 = phi i8 [ 65, %0 ], [ %34, %33 ]
br label %8
8: ; preds = %6, %30
%9 = phi i8 [ 65, %6 ], [ %31, %30 ]
%10 = call i64 @isalnum(i8 signext %7)
%11 = icmp eq i64 %10, 0
br i1 %11, label %30, label %12
12: ; preds = %8
%13 = call i64 @isalnum(i8 signext %9)
%14 = icmp eq i64 %13, 0
br i1 %14, label %30, label %15
15: ; preds = %12
store i8 %7, i8* %4
store i8 %9, i8* %5
%16 = call i32 @OatHash(i8* %4)
%17 = mul nsw i32 %16, 287
%18 = sitofp i32 %17 to double
%19 = fmul double %18, 0x3F20000000000000
%20 = fadd double %19, 5.000000e-01
%21 = fptosi double %20 to i32
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [288 x i8*], [288 x i8*]* %2, i64 0, i64 %22
%24 = load i8*, i8** %23
%25 = icmp eq i8* %24, null
br i1 %25, label %26, label %30
26: ; preds = %15
%27 = call i64 @malloc(i32 3)
%28 = inttoptr i64 %27 to i8*
%29 = call i8* @strncpy(i8* %28, i8* %4, i32 3)
store i8* %29, i8** %23
br label %30
30: ; preds = %15, %26, %8, %12
%31 = add nuw nsw i8 %9, 1
%32 = icmp eq i8 %31, 123
br i1 %32, label %33, label %8
33: ; preds = %30
%34 = add nuw nsw i8 %7, 1
%35 = icmp eq i8 %34, 123
br i1 %35, label %36, label %6
36: ; preds = %33
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %38
38: ; preds = %36, %38
%39 = phi i64 [ 0, %36 ], [ %44, %38 ]
%40 = getelementptr inbounds [288 x i8*], [288 x i8*]* %2, i64 0, i64 %39
%41 = load i8*, i8** %40
%42 = trunc i64 %39 to i32
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* %41, i32 %42)
%44 = add nuw nsw i64 %39, 1
%45 = icmp eq i64 %44, 288
br i1 %45, label %46, label %38
46: ; preds = %38
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0))
ret i32 0
}