void webgraphics(str) char *str;
{
  for (; *str != 0; str++) {
    switch (*str) {
    default:
      break;
    case '|':
      *str = (8 | 128);
      break;
    case '-':
      *str = (9 | 128);
      break;
    case '`':
      *str = (10 | 128);
      break;
    }
  }
}


x86 assembly (clang, -O0):
<webgraphics>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     118c <webgraphics+0x8c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
sub    $0x2d,%eax
je     1163 <webgraphics+0x63>
jmp    1130 <webgraphics+0x30>
mov    -0xc(%rbp),%eax
sub    $0x60,%eax
je     116f <webgraphics+0x6f>
jmp    1141 <webgraphics+0x41>
mov    -0xc(%rbp),%eax
sub    $0x7c,%eax
je     1157 <webgraphics+0x57>
jmp    1152 <webgraphics+0x52>
jmp    1176 <webgraphics+0x76>
mov    -0x8(%rbp),%rax
movb   $0x88,(%rax)
jmp    1176 <webgraphics+0x76>
mov    -0x8(%rbp),%rax
movb   $0x89,(%rax)
jmp    1176 <webgraphics+0x76>
mov    -0x8(%rbp),%rax
movb   $0x8a,(%rax)
jmp    117b <webgraphics+0x7b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <webgraphics+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<webgraphics>:
mov    (%rdi),%al
test   %al,%al
je     1144 <webgraphics+0x44>
add    $0x1,%rdi
jmp    1120 <webgraphics+0x20>
nopl   0x0(%rax)
mov    $0x8a,%al
mov    %al,-0x1(%rdi)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     1144 <webgraphics+0x44>
movsbl %al,%eax
cmp    $0x7c,%eax
je     1140 <webgraphics+0x40>
cmp    $0x60,%eax
je     1110 <webgraphics+0x10>
cmp    $0x2d,%eax
jne    1115 <webgraphics+0x15>
mov    $0x89,%al
jmp    1112 <webgraphics+0x12>
cs nopw 0x0(%rax,%rax,1)
mov    $0x88,%al
jmp    1112 <webgraphics+0x12>
ret

LLVM IR (-O0):
define void @webgraphics(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %20, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %23
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
switch i32 %11, label %12 [
i32 124, label %13
i32 45, label %15
i32 96, label %17
]
12: ; preds = %8
br label %19
13: ; preds = %8
%14 = load i8*, i8** %2
store i8 -120, i8* %14
br label %19
15: ; preds = %8
%16 = load i8*, i8** %2
store i8 -119, i8* %16
br label %19
17: ; preds = %8
%18 = load i8*, i8** %2
store i8 -118, i8* %18
br label %19
19: ; preds = %17, %15, %13, %12
br label %20
20: ; preds = %19
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %2
br label %3
23: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @webgraphics(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %12
%5 = phi i8 [ %14, %12 ], [ %2, %1 ]
%6 = phi i8* [ %13, %12 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
switch i32 %7, label %12 [
i32 124, label %10
i32 45, label %8
i32 96, label %9
]
8: ; preds = %4
br label %10
9: ; preds = %4
br label %10
10: ; preds = %4, %9, %8
%11 = phi i8 [ -119, %8 ], [ -118, %9 ], [ -120, %4 ]
store i8 %11, i8* %6
br label %12
12: ; preds = %10, %4
%13 = getelementptr inbounds i8, i8* %6, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %12, %1
ret void
}