#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 /*<<< orphan*/ char_array_to_c(char *, int, char *);
void jsencodemap() {
  int i;
  char jsEncodeMap[256];
  for (i = 0; i < 256; ++i) {
    jsEncodeMap[i] = 0;
  }
  for (i = 0; i < 32; ++i) {
    jsEncodeMap[i] = 'A';
  }
  for (i = 127; i < 256; ++i) {
    jsEncodeMap[i] = 'A';
  }
  jsEncodeMap[0x08] = 'b';
  jsEncodeMap[0x09] = 't';
  jsEncodeMap[0x0a] = 'n';
  jsEncodeMap[0x0b] = 'v';
  jsEncodeMap[0x0c] = 'f';
  jsEncodeMap[0x0d] = 'r';
  jsEncodeMap[0x5c] = '\\';
  jsEncodeMap[0x22] = '"';
  jsEncodeMap[0x27] = '\'';
  char_array_to_c(jsEncodeMap, 256, "gsJavascriptEncodeMap");
}


x86 assembly (clang, -O0):
<jsencodemap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1149 <jsencodemap+0x39>
movslq -0x4(%rbp),%rax
movb   $0x0,-0x110(%rbp,%rax,1)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1122 <jsencodemap+0x12>
movl   $0x0,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jge    1174 <jsencodemap+0x64>
movslq -0x4(%rbp),%rax
movb   $0x41,-0x110(%rbp,%rax,1)
41
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1150 <jsencodemap+0x40>
movl   $0x7f,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    11a2 <jsencodemap+0x92>
movslq -0x4(%rbp),%rax
movb   $0x41,-0x110(%rbp,%rax,1)
41
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    117b <jsencodemap+0x6b>
movb   $0x62,-0x108(%rbp)
movb   $0x74,-0x107(%rbp)
movb   $0x6e,-0x106(%rbp)
movb   $0x76,-0x105(%rbp)
movb   $0x66,-0x104(%rbp)
movb   $0x72,-0x103(%rbp)
movb   $0x5c,-0xb4(%rbp)
movb   $0x22,-0xee(%rbp)
movb   $0x27,-0xe9(%rbp)
lea    -0x110(%rbp),%rdi
mov    $0x100,%esi
lea    0xe0c(%rip),%rdx
call   1030 <char_array_to_c@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jsencodemap>:
sub    $0x108,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x10(%rsp)
movups %xmm0,0x8f(%rsp)
movups %xmm0,0x9f(%rsp)
movups %xmm0,0xaf(%rsp)
movups %xmm0,0xbf(%rsp)
movups %xmm0,0xcf(%rsp)
movups %xmm0,0xdf(%rsp)
movups %xmm0,0xef(%rsp)
movups %xmm0,0x7f(%rsp)
movb   $0x41,0xff(%rsp)
41
movl   $0x766e7462,0x8(%rsp)
76
movw   $0x7266,0xc(%rsp)
movb   $0x5c,0x5c(%rsp)
movb   $0x22,0x22(%rsp)
movb   $0x27,0x27(%rsp)
lea    0xe5e(%rip),%rdx
mov    %rsp,%rdi
mov    $0x100,%esi
call   1030 <char_array_to_c@plt>
add    $0x108,%rsp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"gsJavascriptEncodeMap\00"
define void @jsencodemap() {
%1 = alloca i32
%2 = alloca [256 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 256
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i32, i32* %1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 %8
store i8 0, i8* %9
br label %10
10: ; preds = %6
%11 = load i32, i32* %1
%12 = add nsw i32 %11, 1
store i32 %12, i32* %1
br label %3
13: ; preds = %3
store i32 0, i32* %1
br label %14
14: ; preds = %21, %13
%15 = load i32, i32* %1
%16 = icmp slt i32 %15, 32
br i1 %16, label %17, label %24
17: ; preds = %14
%18 = load i32, i32* %1
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 %19
store i8 65, i8* %20
br label %21
21: ; preds = %17
%22 = load i32, i32* %1
%23 = add nsw i32 %22, 1
store i32 %23, i32* %1
br label %14
24: ; preds = %14
store i32 127, i32* %1
br label %25
25: ; preds = %32, %24
%26 = load i32, i32* %1
%27 = icmp slt i32 %26, 256
br i1 %27, label %28, label %35
28: ; preds = %25
%29 = load i32, i32* %1
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 %30
store i8 65, i8* %31
br label %32
32: ; preds = %28
%33 = load i32, i32* %1
%34 = add nsw i32 %33, 1
store i32 %34, i32* %1
br label %25
35: ; preds = %25
%36 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 8
store i8 98, i8* %36
%37 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 9
store i8 116, i8* %37
%38 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 10
store i8 110, i8* %38
%39 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 11
store i8 118, i8* %39
%40 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 12
store i8 102, i8* %40
%41 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 13
store i8 114, i8* %41
%42 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 92
store i8 92, i8* %42
%43 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 34
store i8 34, i8* %43
%44 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 39
store i8 39, i8* %44
%45 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%46 = call i32 @char_array_to_c(i8* %45, i32 256, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"gsJavascriptEncodeMap\00"
define void @jsencodemap() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 32
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 127
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 8
store i8 98, i8* %6
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 9
store i8 116, i8* %7
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 10
store i8 110, i8* %8
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 11
store i8 118, i8* %9
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 12
store i8 102, i8* %10
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 13
store i8 114, i8* %11
%12 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 92
store i8 92, i8* %12
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 34
store i8 34, i8* %13
%14 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 39
store i8 39, i8* %14
%15 = call i32 @char_array_to_c(i8* %3, i32 256, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}