unsigned long GrMapISO8859_15_Unicode(const char *pcSrcChar,
                                      unsigned long ulCount,
                                      unsigned long *pulSkip) {
  assert(pulSkip);
  assert(pcSrcChar);
  *pulSkip = 1;
  switch ((unsigned char)*pcSrcChar) {
  case 0xA4: {
    return (0x20AC);
  }
  case 0xA6: {
    return (0x160);
  }
  case 0xA8: {
    return (0x161);
  }
  case 0xB4: {
    return (0x17D);
  }
  case 0xB8: {
    return (0x17E);
  }
  case 0xBC: {
    return (0x152);
  }
  case 0xBD: {
    return (0x153);
  }
  case 0xBE: {
    return (0x178);
  }
  default: {
    return ((unsigned long)(unsigned char)*pcSrcChar);
  }
  }
}


x86 assembly (clang, -O0):
<GrMapISO8859_15_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    $0xffffff5c,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x1a,%eax
ja     11e0 <GrMapISO8859_15_Unicode+0xd0>
mov    -0x28(%rbp),%rax
lea    0xe91(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movq   $0x20ac,-0x8(%rbp)
jmp    11eb <GrMapISO8859_15_Unicode+0xdb>
movq   $0x160,-0x8(%rbp)
jmp    11eb <GrMapISO8859_15_Unicode+0xdb>
movq   $0x161,-0x8(%rbp)
jmp    11eb <GrMapISO8859_15_Unicode+0xdb>
movq   $0x17d,-0x8(%rbp)
jmp    11eb <GrMapISO8859_15_Unicode+0xdb>
movq   $0x17e,-0x8(%rbp)
jmp    11eb <GrMapISO8859_15_Unicode+0xdb>
movq   $0x152,-0x8(%rbp)
jmp    11eb <GrMapISO8859_15_Unicode+0xdb>
movq   $0x153,-0x8(%rbp)
jmp    11eb <GrMapISO8859_15_Unicode+0xdb>
movq   $0x178,-0x8(%rbp)
jmp    11eb <GrMapISO8859_15_Unicode+0xdb>
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_15_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    0x5c(%rcx),%edx
cmp    $0x1a,%dl
ja     1160 <GrMapISO8859_15_Unicode+0x50>
mov    $0x20ac,%eax
movzbl %dl,%edx
lea    0xeb0(%rip),%rsi
movslq (%rsi,%rdx,4),%rdx
add    %rsi,%rdx
jmp    *%rdx
mov    $0x160,%eax
jmp    118d <GrMapISO8859_15_Unicode+0x7d>
mov    %rcx,%rax
jmp    118d <GrMapISO8859_15_Unicode+0x7d>
mov    $0x161,%eax
jmp    118d <GrMapISO8859_15_Unicode+0x7d>
mov    $0x17d,%eax
jmp    118d <GrMapISO8859_15_Unicode+0x7d>
mov    $0x17e,%eax
jmp    118d <GrMapISO8859_15_Unicode+0x7d>
mov    $0x152,%eax
jmp    118d <GrMapISO8859_15_Unicode+0x7d>
mov    $0x153,%eax
jmp    118d <GrMapISO8859_15_Unicode+0x7d>
mov    $0x178,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @GrMapISO8859_15_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 %24 [
i32 164, label %16
i32 166, label %17
i32 168, label %18
i32 180, label %19
i32 184, label %20
i32 188, label %21
i32 189, label %22
i32 190, label %23
]
16: ; preds = %3
store i64 8364, i64* %4
br label %28
17: ; preds = %3
store i64 352, i64* %4
br label %28
18: ; preds = %3
store i64 353, i64* %4
br label %28
19: ; preds = %3
store i64 381, i64* %4
br label %28
20: ; preds = %3
store i64 382, i64* %4
br label %28
21: ; preds = %3
store i64 338, i64* %4
br label %28
22: ; preds = %3
store i64 339, i64* %4
br label %28
23: ; preds = %3
store i64 376, i64* %4
br label %28
24: ; preds = %3
%25 = load i8*, i8** %5
%26 = load i8, i8* %25
%27 = zext i8 %26 to i64
store i64 %27, i64* %4
br label %28
28: ; preds = %24, %23, %22, %21, %20, %19, %18, %17, %16
%29 = load i64, i64* %4
ret i64 %29
}

LLVM IR (-O2):
define i64 @GrMapISO8859_15_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 %14 [
i8 -92, label %16
i8 -90, label %7
i8 -88, label %8
i8 -76, label %9
i8 -72, label %10
i8 -68, label %11
i8 -67, label %12
i8 -66, label %13
]
7: ; preds = %3
br label %16
8: ; preds = %3
br label %16
9: ; preds = %3
br label %16
10: ; preds = %3
br label %16
11: ; preds = %3
br label %16
12: ; preds = %3
br label %16
13: ; preds = %3
br label %16
14: ; preds = %3
%15 = zext i8 %6 to i64
br label %16
16: ; preds = %3, %14, %13, %12, %11, %10, %9, %8, %7
%17 = phi i64 [ %15, %14 ], [ 376, %13 ], [ 339, %12 ], [ 338, %11 ], [ 382, %10 ], [ 381, %9 ], [ 353, %8 ], [ 352, %7 ], [ 8364, %3 ]
ret i64 %17
}