#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__ emalloc(int);
int *getRestrictedDnaDictionary(int *dic) {
  int i;
  if (dic == NULL)
    dic = (int *)emalloc((256 + 1) * sizeof(int));
  for (i = 0; i < 256; i++)
    dic[i] = 0;
  dic['a'] = 1;
  dic['c'] = 1;
  dic['g'] = 1;
  dic['t'] = 1;
  dic['A'] = 1;
  dic['C'] = 1;
  dic['G'] = 1;
  dic['T'] = 1;
  return dic;
}


x86 assembly (clang, -O0):
<getRestrictedDnaDictionary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1135 <getRestrictedDnaDictionary+0x25>
mov    $0x404,%edi
call   1030 <emalloc@plt>
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x100,-0xc(%rbp)
jge    1166 <getRestrictedDnaDictionary+0x56>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113c <getRestrictedDnaDictionary+0x2c>
mov    -0x8(%rbp),%rax
movl   $0x1,0x184(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0x18c(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0x19c(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0x1d0(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0x104(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0x10c(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0x11c(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0x150(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRestrictedDnaDictionary>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1136 <getRestrictedDnaDictionary+0x16>
mov    $0x404,%edi
call   1040 <emalloc@plt>
mov    %rax,%rbx
mov    $0x400,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
movl   $0x1,0x184(%rbx)
movl   $0x1,0x18c(%rbx)
movl   $0x1,0x19c(%rbx)
movl   $0x1,0x1d0(%rbx)
movl   $0x1,0x104(%rbx)
movl   $0x1,0x10c(%rbx)
movl   $0x1,0x11c(%rbx)
movl   $0x1,0x150(%rbx)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @getRestrictedDnaDictionary(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i64 @emalloc(i32 1028)
%8 = inttoptr i64 %7 to i32*
store i32* %8, i32** %2
br label %9
9: ; preds = %6, %1
store i32 0, i32* %3
br label %10
10: ; preds = %18, %9
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 256
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = load i32*, i32** %2
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
store i32 0, i32* %17
br label %18
18: ; preds = %13
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %10
21: ; preds = %10
%22 = load i32*, i32** %2
%23 = getelementptr inbounds i32, i32* %22, i64 97
store i32 1, i32* %23
%24 = load i32*, i32** %2
%25 = getelementptr inbounds i32, i32* %24, i64 99
store i32 1, i32* %25
%26 = load i32*, i32** %2
%27 = getelementptr inbounds i32, i32* %26, i64 103
store i32 1, i32* %27
%28 = load i32*, i32** %2
%29 = getelementptr inbounds i32, i32* %28, i64 116
store i32 1, i32* %29
%30 = load i32*, i32** %2
%31 = getelementptr inbounds i32, i32* %30, i64 65
store i32 1, i32* %31
%32 = load i32*, i32** %2
%33 = getelementptr inbounds i32, i32* %32, i64 67
store i32 1, i32* %33
%34 = load i32*, i32** %2
%35 = getelementptr inbounds i32, i32* %34, i64 71
store i32 1, i32* %35
%36 = load i32*, i32** %2
%37 = getelementptr inbounds i32, i32* %36, i64 84
store i32 1, i32* %37
%38 = load i32*, i32** %2
ret i32* %38
}

LLVM IR (-O2):
define i32* @getRestrictedDnaDictionary(i32* writeonly %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i64 @emalloc(i32 1028)
%5 = inttoptr i64 %4 to i32*
br label %6
6: ; preds = %3, %1
%7 = phi i32* [ %5, %3 ], [ %0, %1 ]
%8 = bitcast i32* %7 to i8*
%9 = getelementptr inbounds i32, i32* %7, i64 97
store i32 1, i32* %9
%10 = getelementptr inbounds i32, i32* %7, i64 99
store i32 1, i32* %10
%11 = getelementptr inbounds i32, i32* %7, i64 103
store i32 1, i32* %11
%12 = getelementptr inbounds i32, i32* %7, i64 116
store i32 1, i32* %12
%13 = getelementptr inbounds i32, i32* %7, i64 65
store i32 1, i32* %13
%14 = getelementptr inbounds i32, i32* %7, i64 67
store i32 1, i32* %14
%15 = getelementptr inbounds i32, i32* %7, i64 71
store i32 1, i32* %15
%16 = getelementptr inbounds i32, i32* %7, i64 84
store i32 1, i32* %16
ret i32* %7
}