#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__ isalnum(int);
char *needLargeZeroedMem(int);
char *urlOkChars() {
  char *okChars;
  int c;
  (okChars = needLargeZeroedMem(sizeof(*okChars) * (256)));
  for (c = 0; c < 256; ++c)
    if (isalnum(c))
      okChars[c] = 1;
  okChars['='] = 1;
  okChars['-'] = 1;
  okChars['/'] = 1;
  okChars['%'] = 1;
  okChars['.'] = 1;
  okChars[';'] = 1;
  okChars[':'] = 1;
  okChars['_'] = 1;
  okChars['&'] = 1;
  okChars['+'] = 1;
  okChars['('] = 1;
  okChars[')'] = 1;
  okChars['$'] = 1;
  okChars['!'] = 1;
  okChars['*'] = 1;
  okChars['@'] = 1;
  okChars['\''] = 1;
  return okChars;
}


x86 assembly (clang, -O0):
<urlOkChars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x100,%edi
call   1040 <needLargeZeroedMem@plt>
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x100,-0xc(%rbp)
jge    117b <urlOkChars+0x5b>
mov    -0xc(%rbp),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
je     1168 <urlOkChars+0x48>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x1,(%rax,%rcx,1)
jmp    116d <urlOkChars+0x4d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <urlOkChars+0x1d>
mov    -0x8(%rbp),%rax
movb   $0x1,0x3d(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x2d(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x2f(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x25(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x2e(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x3b(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x3a(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x5f(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x26(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x2b(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x28(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x29(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x24(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x21(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x2a(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x40(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x27(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<urlOkChars>:
push   %r14
push   %rbx
push   %rax
mov    $0x100,%edi
call   1040 <needLargeZeroedMem@plt>
mov    %rax,%r14
xor    %ebx,%ebx
jmp    114d <urlOkChars+0x2d>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbx
cmp    $0x100,%rbx
je     1160 <urlOkChars+0x40>
mov    %ebx,%edi
call   1030 <isalnum@plt>
test   %rax,%rax
je     1140 <urlOkChars+0x20>
movb   $0x1,(%r14,%rbx,1)
jmp    1140 <urlOkChars+0x20>
movb   $0x1,0x3d(%r14)
movw   $0x101,0x2d(%r14)
movb   $0x1,0x2f(%r14)
movw   $0x101,0x3a(%r14)
movb   $0x1,0x5f(%r14)
movb   $0x1,0x21(%r14)
movb   $0x1,0x40(%r14)
movabs $0x101010101010101,%rax
01 01 01
mov    %rax,0x24(%r14)
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @urlOkChars() {
%1 = alloca i8*
%2 = alloca i32
%3 = call i8* @needLargeZeroedMem(i32 256)
store i8* %3, i8** %1
store i32 0, i32* %2
br label %4
4: ; preds = %17, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 256
br i1 %6, label %7, label %20
7: ; preds = %4
%8 = load i32, i32* %2
%9 = call i64 @isalnum(i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8*, i8** %1
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
store i8 1, i8* %15
br label %16
16: ; preds = %11, %7
br label %17
17: ; preds = %16
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %4
20: ; preds = %4
%21 = load i8*, i8** %1
%22 = getelementptr inbounds i8, i8* %21, i64 61
store i8 1, i8* %22
%23 = load i8*, i8** %1
%24 = getelementptr inbounds i8, i8* %23, i64 45
store i8 1, i8* %24
%25 = load i8*, i8** %1
%26 = getelementptr inbounds i8, i8* %25, i64 47
store i8 1, i8* %26
%27 = load i8*, i8** %1
%28 = getelementptr inbounds i8, i8* %27, i64 37
store i8 1, i8* %28
%29 = load i8*, i8** %1
%30 = getelementptr inbounds i8, i8* %29, i64 46
store i8 1, i8* %30
%31 = load i8*, i8** %1
%32 = getelementptr inbounds i8, i8* %31, i64 59
store i8 1, i8* %32
%33 = load i8*, i8** %1
%34 = getelementptr inbounds i8, i8* %33, i64 58
store i8 1, i8* %34
%35 = load i8*, i8** %1
%36 = getelementptr inbounds i8, i8* %35, i64 95
store i8 1, i8* %36
%37 = load i8*, i8** %1
%38 = getelementptr inbounds i8, i8* %37, i64 38
store i8 1, i8* %38
%39 = load i8*, i8** %1
%40 = getelementptr inbounds i8, i8* %39, i64 43
store i8 1, i8* %40
%41 = load i8*, i8** %1
%42 = getelementptr inbounds i8, i8* %41, i64 40
store i8 1, i8* %42
%43 = load i8*, i8** %1
%44 = getelementptr inbounds i8, i8* %43, i64 41
store i8 1, i8* %44
%45 = load i8*, i8** %1
%46 = getelementptr inbounds i8, i8* %45, i64 36
store i8 1, i8* %46
%47 = load i8*, i8** %1
%48 = getelementptr inbounds i8, i8* %47, i64 33
store i8 1, i8* %48
%49 = load i8*, i8** %1
%50 = getelementptr inbounds i8, i8* %49, i64 42
store i8 1, i8* %50
%51 = load i8*, i8** %1
%52 = getelementptr inbounds i8, i8* %51, i64 64
store i8 1, i8* %52
%53 = load i8*, i8** %1
%54 = getelementptr inbounds i8, i8* %53, i64 39
store i8 1, i8* %54
%55 = load i8*, i8** %1
ret i8* %55
}

LLVM IR (-O2):
define i8* @urlOkChars() {
%1 = tail call i8* @needLargeZeroedMem(i32 256)
br label %2
2: ; preds = %0, %9
%3 = phi i64 [ 0, %0 ], [ %10, %9 ]
%4 = trunc i64 %3 to i32
%5 = tail call i64 @isalnum(i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %1, i64 %3
store i8 1, i8* %8
br label %9
9: ; preds = %2, %7
%10 = add nuw nsw i64 %3, 1
%11 = icmp eq i64 %10, 256
br i1 %11, label %12, label %2
12: ; preds = %9
%13 = getelementptr inbounds i8, i8* %1, i64 61
store i8 1, i8* %13
%14 = getelementptr inbounds i8, i8* %1, i64 45
store i8 1, i8* %14
%15 = getelementptr inbounds i8, i8* %1, i64 47
store i8 1, i8* %15
%16 = getelementptr inbounds i8, i8* %1, i64 46
store i8 1, i8* %16
%17 = getelementptr inbounds i8, i8* %1, i64 59
store i8 1, i8* %17
%18 = getelementptr inbounds i8, i8* %1, i64 58
store i8 1, i8* %18
%19 = getelementptr inbounds i8, i8* %1, i64 95
store i8 1, i8* %19
%20 = getelementptr inbounds i8, i8* %1, i64 36
%21 = getelementptr inbounds i8, i8* %1, i64 33
store i8 1, i8* %21
%22 = getelementptr inbounds i8, i8* %1, i64 64
store i8 1, i8* %22
%23 = bitcast i8* %20 to i64*
store i64 72340172838076673, i64* %23
ret i8* %1
}