#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 */
char *strchr(char *, char);
void changebarnet(char *nt) {
  do
    if ((nt = strchr(nt, '\\')))
      switch (*++nt) {
      case 'n':
        *nt = '\n';
        goto space;
      case 't':
        *nt = '\t';
        goto space;
      case ':':
        *nt = 254;
      space:
      case '\\':
        *(nt - 1) = ' ';
        nt++;
      }
  while (nt != NULL);
}


x86 assembly (clang, -O0):
<changebarnet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x5c,%esi
call   1030 <strchr@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
je     11cc <changebarnet+0xbc>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl 0x1(%rax),%eax
mov    %eax,-0xc(%rbp)
sub    $0x3a,%eax
je     11a7 <changebarnet+0x97>
jmp    115c <changebarnet+0x4c>
mov    -0xc(%rbp),%eax
sub    $0x5c,%eax
je     11b3 <changebarnet+0xa3>
jmp    116d <changebarnet+0x5d>
mov    -0xc(%rbp),%eax
sub    $0x6e,%eax
je     118f <changebarnet+0x7f>
jmp    117e <changebarnet+0x6e>
mov    -0xc(%rbp),%eax
sub    $0x74,%eax
je     119b <changebarnet+0x8b>
jmp    11c7 <changebarnet+0xb7>
mov    -0x8(%rbp),%rax
movb   $0xa,(%rax)
jmp    11ae <changebarnet+0x9e>
mov    -0x8(%rbp),%rax
movb   $0x9,(%rax)
jmp    11ae <changebarnet+0x9e>
mov    -0x8(%rbp),%rax
movb   $0xfe,(%rax)
jmp    11b3 <changebarnet+0xa3>
mov    -0x8(%rbp),%rax
movb   $0x20,-0x1(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    11cc <changebarnet+0xbc>
jmp    11d1 <changebarnet+0xc1>
cmpq   $0x0,-0x8(%rbp)
jne    111c <changebarnet+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<changebarnet>:
push   %rax
jmp    1121 <changebarnet+0x11>
mov    $0xfe,%cl
mov    %cl,(%rdi)
movb   $0x20,(%rax)
add    $0x2,%rax
mov    %rax,%rdi
mov    $0x5c,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1162 <changebarnet+0x52>
lea    0x1(%rax),%rdi
movsbl 0x1(%rax),%ecx
cmp    $0x6d,%ecx
jg     1150 <changebarnet+0x40>
cmp    $0x3a,%ecx
je     1113 <changebarnet+0x3>
cmp    $0x5c,%ecx
je     1117 <changebarnet+0x7>
jmp    1121 <changebarnet+0x11>
nopl   0x0(%rax)
cmp    $0x6e,%ecx
je     115e <changebarnet+0x4e>
cmp    $0x74,%ecx
jne    1121 <changebarnet+0x11>
mov    $0x9,%cl
jmp    1115 <changebarnet+0x5>
mov    $0xa,%cl
jmp    1115 <changebarnet+0x5>
pop    %rax
ret

LLVM IR (-O0):
define void @changebarnet(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %26, %1
%4 = load i8*, i8** %2
%5 = call i8* @strchr(i8* %4, i8 signext 92)
store i8* %5, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %25
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
switch i32 %11, label %24 [
i32 110, label %12
i32 116, label %14
i32 58, label %16
i32 92, label %19
]
12: ; preds = %7
%13 = load i8*, i8** %2
store i8 10, i8* %13
br label %18
14: ; preds = %7
%15 = load i8*, i8** %2
store i8 9, i8* %15
br label %18
16: ; preds = %7
%17 = load i8*, i8** %2
store i8 -2, i8* %17
br label %18
18: ; preds = %16, %14, %12
br label %19
19: ; preds = %7, %18
%20 = load i8*, i8** %2
%21 = getelementptr inbounds i8, i8* %20, i64 -1
store i8 32, i8* %21
%22 = load i8*, i8** %2
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %2
br label %24
24: ; preds = %19, %7
br label %25
25: ; preds = %24, %3
br label %26
26: ; preds = %25
%27 = load i8*, i8** %2
%28 = icmp ne i8* %27, null
br i1 %28, label %3, label %29
29: ; preds = %26
ret void
}

LLVM IR (-O2):
define void @changebarnet(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 92)
%3 = icmp eq i8* %2, null
br i1 %3, label %19, label %4
4: ; preds = %1, %15
%5 = phi i8* [ %17, %15 ], [ %2, %1 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
switch i32 %8, label %15 [
i32 110, label %11
i32 116, label %9
i32 58, label %10
i32 92, label %13
]
9: ; preds = %4
br label %11
10: ; preds = %4
br label %11
11: ; preds = %4, %10, %9
%12 = phi i8 [ 9, %9 ], [ -2, %10 ], [ 10, %4 ]
store i8 %12, i8* %6
br label %13
13: ; preds = %11, %4
store i8 32, i8* %5
%14 = getelementptr inbounds i8, i8* %5, i64 2
br label %15
15: ; preds = %13, %4
%16 = phi i8* [ %6, %4 ], [ %14, %13 ]
%17 = tail call i8* @strchr(i8* dereferenceable(1) %16, i8 signext 92)
%18 = icmp eq i8* %17, null
br i1 %18, label %19, label %4
19: ; preds = %15, %1
ret void
}