#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 */
scalar_t__ calloc(int, int);
size_t dirichlet_code(char);
int /*<<< orphan*/ memset(int *, int, int);
int /*<<< orphan*/ sprintf(char *, char *);
int *dirichlet_code2aa_lu() {
  int *dm;
  char aal[21];
  int a;
  sprintf(aal, "acdefghiklmnpqrstvwy");
  dm = (int *)calloc(265, sizeof(int));
  memset(dm, -1, 20 * sizeof(int));
  for (a = 0; a < 20; a++) {
    dm[dirichlet_code(aal[a])] = aal[a];
  }
  return dm;
}


x86 assembly (clang, -O0):
<dirichlet_code2aa_lu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x20(%rbp),%rdi
lea    0xead(%rip),%rsi
call   1050 <sprintf@plt>
mov    $0x109,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xffffffff,%esi
mov    $0x50,%edx
call   1030 <memset@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x14,-0x24(%rbp)
jge    11cc <dirichlet_code2aa_lu+0x8c>
movslq -0x24(%rbp),%rax
movsbl -0x20(%rbp,%rax,1),%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
movslq -0x24(%rbp),%rax
movsbl -0x20(%rbp,%rax,1),%edi
call   1060 <dirichlet_code@plt>
mov    -0x34(%rbp),%edx
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
mov    %edx,(%rax,%rcx,4)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1185 <dirichlet_code2aa_lu+0x45>
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dirichlet_code2aa_lu>:
push   %rbx
mov    $0x109,%edi
mov    $0x4,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0xffffffff,%esi
mov    $0x50,%edx
call   1030 <memset@plt>
mov    $0x61,%edi
call   1050 <dirichlet_code@plt>
movl   $0x61,(%rbx,%rax,4)
mov    $0x63,%edi
call   1050 <dirichlet_code@plt>
movl   $0x63,(%rbx,%rax,4)
mov    $0x64,%edi
call   1050 <dirichlet_code@plt>
movl   $0x64,(%rbx,%rax,4)
mov    $0x65,%edi
call   1050 <dirichlet_code@plt>
movl   $0x65,(%rbx,%rax,4)
mov    $0x66,%edi
call   1050 <dirichlet_code@plt>
movl   $0x66,(%rbx,%rax,4)
mov    $0x67,%edi
call   1050 <dirichlet_code@plt>
movl   $0x67,(%rbx,%rax,4)
mov    $0x68,%edi
call   1050 <dirichlet_code@plt>
movl   $0x68,(%rbx,%rax,4)
mov    $0x69,%edi
call   1050 <dirichlet_code@plt>
movl   $0x69,(%rbx,%rax,4)
mov    $0x6b,%edi
call   1050 <dirichlet_code@plt>
movl   $0x6b,(%rbx,%rax,4)
mov    $0x6c,%edi
call   1050 <dirichlet_code@plt>
movl   $0x6c,(%rbx,%rax,4)
mov    $0x6d,%edi
call   1050 <dirichlet_code@plt>
movl   $0x6d,(%rbx,%rax,4)
mov    $0x6e,%edi
call   1050 <dirichlet_code@plt>
movl   $0x6e,(%rbx,%rax,4)
mov    $0x70,%edi
call   1050 <dirichlet_code@plt>
movl   $0x70,(%rbx,%rax,4)
mov    $0x71,%edi
call   1050 <dirichlet_code@plt>
movl   $0x71,(%rbx,%rax,4)
mov    $0x72,%edi
call   1050 <dirichlet_code@plt>
movl   $0x72,(%rbx,%rax,4)
mov    $0x73,%edi
call   1050 <dirichlet_code@plt>
movl   $0x73,(%rbx,%rax,4)
mov    $0x74,%edi
call   1050 <dirichlet_code@plt>
movl   $0x74,(%rbx,%rax,4)
mov    $0x76,%edi
call   1050 <dirichlet_code@plt>
movl   $0x76,(%rbx,%rax,4)
mov    $0x77,%edi
call   1050 <dirichlet_code@plt>
movl   $0x77,(%rbx,%rax,4)
mov    $0x79,%edi
call   1050 <dirichlet_code@plt>
movl   $0x79,(%rbx,%rax,4)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"acdefghiklmnpqrstvwy\00"
define i32* @dirichlet_code2aa_lu() {
%1 = alloca i32*
%2 = alloca [21 x i8]
%3 = alloca i32
%4 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = call i64 @calloc(i32 265, i32 4)
%7 = inttoptr i64 %6 to i32*
store i32* %7, i32** %1
%8 = load i32*, i32** %1
%9 = call i32 @memset(i32* %8, i32 -1, i32 80)
store i32 0, i32* %3
br label %10
10: ; preds = %26, %0
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 20
br i1 %12, label %13, label %29
13: ; preds = %10
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = load i32*, i32** %1
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 %21
%23 = load i8, i8* %22
%24 = call i64 @dirichlet_code(i8 signext %23)
%25 = getelementptr inbounds i32, i32* %19, i64 %24
store i32 %18, i32* %25
br label %26
26: ; preds = %13
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
br label %10
29: ; preds = %10
%30 = load i32*, i32** %1
ret i32* %30
}

LLVM IR (-O2):
define i32* @dirichlet_code2aa_lu() {
%1 = tail call i64 @calloc(i32 265, i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @memset(i32* %2, i32 -1, i32 80)
%4 = tail call i64 @dirichlet_code(i8 signext 97)
%5 = getelementptr inbounds i32, i32* %2, i64 %4
store i32 97, i32* %5
%6 = tail call i64 @dirichlet_code(i8 signext 99)
%7 = getelementptr inbounds i32, i32* %2, i64 %6
store i32 99, i32* %7
%8 = tail call i64 @dirichlet_code(i8 signext 100)
%9 = getelementptr inbounds i32, i32* %2, i64 %8
store i32 100, i32* %9
%10 = tail call i64 @dirichlet_code(i8 signext 101)
%11 = getelementptr inbounds i32, i32* %2, i64 %10
store i32 101, i32* %11
%12 = tail call i64 @dirichlet_code(i8 signext 102)
%13 = getelementptr inbounds i32, i32* %2, i64 %12
store i32 102, i32* %13
%14 = tail call i64 @dirichlet_code(i8 signext 103)
%15 = getelementptr inbounds i32, i32* %2, i64 %14
store i32 103, i32* %15
%16 = tail call i64 @dirichlet_code(i8 signext 104)
%17 = getelementptr inbounds i32, i32* %2, i64 %16
store i32 104, i32* %17
%18 = tail call i64 @dirichlet_code(i8 signext 105)
%19 = getelementptr inbounds i32, i32* %2, i64 %18
store i32 105, i32* %19
%20 = tail call i64 @dirichlet_code(i8 signext 107)
%21 = getelementptr inbounds i32, i32* %2, i64 %20
store i32 107, i32* %21
%22 = tail call i64 @dirichlet_code(i8 signext 108)
%23 = getelementptr inbounds i32, i32* %2, i64 %22
store i32 108, i32* %23
%24 = tail call i64 @dirichlet_code(i8 signext 109)
%25 = getelementptr inbounds i32, i32* %2, i64 %24
store i32 109, i32* %25
%26 = tail call i64 @dirichlet_code(i8 signext 110)
%27 = getelementptr inbounds i32, i32* %2, i64 %26
store i32 110, i32* %27
%28 = tail call i64 @dirichlet_code(i8 signext 112)
%29 = getelementptr inbounds i32, i32* %2, i64 %28
store i32 112, i32* %29
%30 = tail call i64 @dirichlet_code(i8 signext 113)
%31 = getelementptr inbounds i32, i32* %2, i64 %30
store i32 113, i32* %31
%32 = tail call i64 @dirichlet_code(i8 signext 114)
%33 = getelementptr inbounds i32, i32* %2, i64 %32
store i32 114, i32* %33
%34 = tail call i64 @dirichlet_code(i8 signext 115)
%35 = getelementptr inbounds i32, i32* %2, i64 %34
store i32 115, i32* %35
%36 = tail call i64 @dirichlet_code(i8 signext 116)
%37 = getelementptr inbounds i32, i32* %2, i64 %36
store i32 116, i32* %37
%38 = tail call i64 @dirichlet_code(i8 signext 118)
%39 = getelementptr inbounds i32, i32* %2, i64 %38
store i32 118, i32* %39
%40 = tail call i64 @dirichlet_code(i8 signext 119)
%41 = getelementptr inbounds i32, i32* %2, i64 %40
store i32 119, i32* %41
%42 = tail call i64 @dirichlet_code(i8 signext 121)
%43 = getelementptr inbounds i32, i32* %2, i64 %42
store i32 121, i32* %43
ret i32* %2
}