unsigned long GrMapISO8859_9_Unicode(const char *pcSrcChar,
                                     unsigned long ulCount,
                                     unsigned long *pulSkip) {
  assert(pulSkip);
  assert(pcSrcChar);
  *pulSkip = 1;
  switch ((unsigned char)*pcSrcChar) {
  case 0xD0: {
    return (0x11E);
  }
  case 0xDD: {
    return (0x130);
  }
  case 0xDE: {
    return (0x15E);
  }
  case 0xF0: {
    return (0x11F);
  }
  case 0xFD: {
    return (0x131);
  }
  case 0xFE: {
    return (0x15F);
  }
  default: {
    return ((unsigned long)(unsigned char)*pcSrcChar);
  }
  }
}


x86 assembly (clang, -O0):
<GrMapISO8859_9_Unicode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
xor    %eax,%eax
mov    %al,-0x29(%rbp)
call   1030 <assert@plt>
mov    -0x29(%rbp),%al
mov    -0x10(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x20(%rbp),%rax
movq   $0x1,(%rax)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
add    $0xffffff30,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x2e,%eax
ja     11c6 <GrMapISO8859_9_Unicode+0xb6>
mov    -0x28(%rbp),%rax
lea    0xe91(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movq   $0x11e,-0x8(%rbp)
jmp    11d1 <GrMapISO8859_9_Unicode+0xc1>
movq   $0x130,-0x8(%rbp)
jmp    11d1 <GrMapISO8859_9_Unicode+0xc1>
movq   $0x15e,-0x8(%rbp)
jmp    11d1 <GrMapISO8859_9_Unicode+0xc1>
movq   $0x11f,-0x8(%rbp)
jmp    11d1 <GrMapISO8859_9_Unicode+0xc1>
movq   $0x131,-0x8(%rbp)
jmp    11d1 <GrMapISO8859_9_Unicode+0xc1>
movq   $0x15f,-0x8(%rbp)
jmp    11d1 <GrMapISO8859_9_Unicode+0xc1>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GrMapISO8859_9_Unicode>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rdi,%r14
mov    %rdx,%rdi
xor    %eax,%eax
call   1030 <assert@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <assert@plt>
movq   $0x1,(%rbx)
movzbl (%r14),%ecx
lea    0x30(%rcx),%edx
cmp    $0x2e,%dl
ja     1160 <GrMapISO8859_9_Unicode+0x50>
mov    $0x11e,%eax
movzbl %dl,%edx
lea    0xeb0(%rip),%rsi
movslq (%rsi,%rdx,4),%rdx
add    %rsi,%rdx
jmp    *%rdx
mov    $0x130,%eax
jmp    117f <GrMapISO8859_9_Unicode+0x6f>
mov    %rcx,%rax
jmp    117f <GrMapISO8859_9_Unicode+0x6f>
mov    $0x15e,%eax
jmp    117f <GrMapISO8859_9_Unicode+0x6f>
mov    $0x11f,%eax
jmp    117f <GrMapISO8859_9_Unicode+0x6f>
mov    $0x131,%eax
jmp    117f <GrMapISO8859_9_Unicode+0x6f>
mov    $0x15f,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @GrMapISO8859_9_Unicode(i8* %0, i64 %1, i64* %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64* %2, i64** %7
%8 = load i64*, i64** %7
%9 = call i32 (i64*, ...) bitcast (i32 (...)* @assert to i32 (i64*, ...)*)(i64* %8)
%10 = load i8*, i8** %5
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %10)
%12 = load i64*, i64** %7
store i64 1, i64* %12
%13 = load i8*, i8** %5
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
switch i32 %15, label %22 [
i32 208, label %16
i32 221, label %17
i32 222, label %18
i32 240, label %19
i32 253, label %20
i32 254, label %21
]
16: ; preds = %3
store i64 286, i64* %4
br label %26
17: ; preds = %3
store i64 304, i64* %4
br label %26
18: ; preds = %3
store i64 350, i64* %4
br label %26
19: ; preds = %3
store i64 287, i64* %4
br label %26
20: ; preds = %3
store i64 305, i64* %4
br label %26
21: ; preds = %3
store i64 351, i64* %4
br label %26
22: ; preds = %3
%23 = load i8*, i8** %5
%24 = load i8, i8* %23
%25 = zext i8 %24 to i64
store i64 %25, i64* %4
br label %26
26: ; preds = %22, %21, %20, %19, %18, %17, %16
%27 = load i64, i64* %4
ret i64 %27
}

LLVM IR (-O2):
define i64 @GrMapISO8859_9_Unicode(i8* %0, i64 %1, i64* %2) {
%4 = tail call i32 (i64*, ...) bitcast (i32 (...)* @assert to i32 (i64*, ...)*)(i64* %2)
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %0)
store i64 1, i64* %2
%6 = load i8, i8* %0
switch i8 %6, label %12 [
i8 -48, label %14
i8 -35, label %7
i8 -34, label %8
i8 -16, label %9
i8 -3, label %10
i8 -2, label %11
]
7: ; preds = %3
br label %14
8: ; preds = %3
br label %14
9: ; preds = %3
br label %14
10: ; preds = %3
br label %14
11: ; preds = %3
br label %14
12: ; preds = %3
%13 = zext i8 %6 to i64
br label %14
14: ; preds = %3, %12, %11, %10, %9, %8, %7
%15 = phi i64 [ %13, %12 ], [ 351, %11 ], [ 305, %10 ], [ 287, %9 ], [ 350, %8 ], [ 304, %7 ], [ 286, %3 ]
ret i64 %15
}