#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 */
typedef char *cp2;

/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, size_t);
scalar_t__ strcmp(char *, char *);
size_t strlen(char *);
scalar_t__ strncmp(char *, char *, int);
char *strstr(char *, char *);
void de_dotdot(char *path) {
  char *cp1 = NULL;
  char *cp2 = NULL;
  size_t l = 0;
  while ((cp1 = strstr(path, "//")) != NULL) {
    for (cp2 = cp1 + 2; *cp2 == '/'; cp2++) {
      continue;
    }
    memmove((cp1 + 1), (cp2), strlen((cp2)-1));
  }
  while (strncmp(path, "./", 2) == 0) {
    memmove((path), (path + 2), strlen((path + 2) - 1));
  }
  while ((cp1 = strstr(path, "/./")) != NULL) {
    memmove((cp1), (cp1 + 2), strlen((cp1 + 2) - 1));
  }
  for (;;) {
    while (strncmp(path, "../", 3) == 0) {
      memmove((path), (path + 3), strlen((path + 3) - 1));
    }
    cp1 = strstr(path, "/../");
    if (cp1 == NULL) {
      break;
    }
    for (cp2 = cp1 - 1; cp2 >= path && *cp2 != '/'; cp2--) {
      continue;
    }
    memmove((cp2 + 1), (cp1 + 4), strlen((cp1 + 4) - 1));
  }
  while ((l = strlen(path)) > 3 && strcmp((cp1 = path + l - 3), "/..") == 0) {
    for (cp2 = cp1 - 1; cp2 >= path && *cp2 != '/'; cp2--) {
      continue;
    }
    if (cp2 < path) {
      break;
    }
    *cp2 = '\0';
  }
}


x86 assembly (clang, -O0):
<de_dotdot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe7e(%rip),%rsi
call   1070 <strstr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     11fd <de_dotdot+0xad>
mov    -0x10(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    11c7 <de_dotdot+0x77>
jmp    11b6 <de_dotdot+0x66>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    11a1 <de_dotdot+0x51>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
add    $0xffffffffffffffff,%rdi
call   1040 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    %rax,%rdx
call   1060 <memmove@plt>
jmp    1177 <de_dotdot+0x27>
jmp    1202 <de_dotdot+0xb2>
mov    -0x8(%rbp),%rdi
lea    0xdfc(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    125b <de_dotdot+0x10b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x2,%rdi
add    $0xffffffffffffffff,%rdi
call   1040 <strlen@plt>
mov    -0x40(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    %rax,%rdx
call   1060 <memmove@plt>
jmp    1202 <de_dotdot+0xb2>
jmp    1260 <de_dotdot+0x110>
mov    -0x8(%rbp),%rdi
lea    0xd98(%rip),%rsi
call   1070 <strstr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     12b8 <de_dotdot+0x168>
mov    -0x10(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x2,%rdi
add    $0xffffffffffffffff,%rdi
call   1040 <strlen@plt>
mov    -0x50(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    %rax,%rdx
call   1060 <memmove@plt>
jmp    1260 <de_dotdot+0x110>
jmp    12bd <de_dotdot+0x16d>
jmp    12c2 <de_dotdot+0x172>
mov    -0x8(%rbp),%rdi
lea    0xd3b(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    131b <de_dotdot+0x1cb>
mov    -0x8(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x8(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x58(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x3,%rdi
add    $0xffffffffffffffff,%rdi
call   1040 <strlen@plt>
mov    -0x60(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    %rax,%rdx
call   1060 <memmove@plt>
jmp    12c2 <de_dotdot+0x172>
mov    -0x8(%rbp),%rdi
lea    0xce1(%rip),%rsi
call   1070 <strstr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    133f <de_dotdot+0x1ef>
jmp    13d2 <de_dotdot+0x282>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
cmp    -0x8(%rbp),%rcx
mov    %al,-0x61(%rbp)
jb     136e <de_dotdot+0x21e>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
setne  %al
mov    %al,-0x61(%rbp)
mov    -0x61(%rbp),%al
test   $0x1,%al
jne    137e <de_dotdot+0x22e>
jmp    1394 <de_dotdot+0x244>
jmp    1383 <de_dotdot+0x233>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    134b <de_dotdot+0x1fb>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x78(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x70(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x4,%rdi
add    $0xffffffffffffffff,%rdi
call   1040 <strlen@plt>
mov    -0x78(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    %rax,%rdx
call   1060 <memmove@plt>
jmp    12bd <de_dotdot+0x16d>
jmp    13d7 <de_dotdot+0x287>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
cmp    $0x3,%rcx
mov    %al,-0x79(%rbp)
jbe    141c <de_dotdot+0x2cc>
mov    -0x8(%rbp),%rdi
add    -0x20(%rbp),%rdi
add    $0xfffffffffffffffd,%rdi
mov    %rdi,-0x10(%rbp)
lea    0xbff(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x79(%rbp)
mov    -0x79(%rbp),%al
test   $0x1,%al
jne    142c <de_dotdot+0x2dc>
jmp    14a0 <de_dotdot+0x350>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
cmp    -0x8(%rbp),%rcx
mov    %al,-0x7a(%rbp)
jb     145b <de_dotdot+0x30b>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
setne  %al
mov    %al,-0x7a(%rbp)
mov    -0x7a(%rbp),%al
test   $0x1,%al
jne    146b <de_dotdot+0x31b>
jmp    1481 <de_dotdot+0x331>
jmp    1470 <de_dotdot+0x320>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    1438 <de_dotdot+0x2e8>
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1494 <de_dotdot+0x344>
jmp    14a0 <de_dotdot+0x350>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
jmp    13d7 <de_dotdot+0x287>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<de_dotdot>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xe9b(%rip),%rsi
call   1070 <strstr@plt>
test   %rax,%rax
je     11c8 <de_dotdot+0x78>
mov    %rax,%r15
lea    0xe87(%rip),%r14
nopl   0x0(%rax)
lea    0x1(%r15),%rbp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpb   $0x2f,0x1(%rbp)
lea    0x1(%rbp),%rbp
je     1190 <de_dotdot+0x40>
add    $0x1,%r15
lea    -0x1(%rbp),%rdi
call   1040 <strlen@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rax,%rdx
call   1060 <memmove@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <strstr@plt>
mov    %rax,%r15
test   %rax,%rax
jne    1180 <de_dotdot+0x30>
lea    0xe3a(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    121b <de_dotdot+0xcb>
lea    0x2(%rbx),%r14
lea    0x1(%rbx),%r15
lea    0xe19(%rip),%r12
mov    %r15,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1060 <memmove@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11f0 <de_dotdot+0xa0>
lea    0xde1(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strstr@plt>
test   %rax,%rax
je     126e <de_dotdot+0x11e>
mov    %rax,%r15
lea    0xdca(%rip),%r14
nopl   0x0(%rax)
lea    0x2(%r15),%rbp
lea    0x1(%r15),%rdi
call   1040 <strlen@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rax,%rdx
call   1060 <memmove@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <strstr@plt>
mov    %rax,%r15
test   %rax,%rax
jne    1240 <de_dotdot+0xf0>
lea    0x3(%rbx),%r14
lea    0x2(%rbx),%r15
lea    0xd8b(%rip),%r12
jmp    1296 <de_dotdot+0x146>
nop
mov    %r15,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1060 <memmove@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1280 <de_dotdot+0x130>
mov    %rbx,%rdi
lea    0xd52(%rip),%rsi
call   1070 <strstr@plt>
test   %rax,%rax
je     12fe <de_dotdot+0x1ae>
lea    -0x1(%rax),%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rcx,%rbp
cmp    %rbx,%rcx
jb     12e2 <de_dotdot+0x192>
lea    -0x1(%rbp),%rcx
cmpb   $0x2f,0x0(%rbp)
jne    12d0 <de_dotdot+0x180>
lea    0x4(%rax),%r13
add    $0x3,%rax
mov    %rax,%rdi
call   1040 <strlen@plt>
add    $0x1,%rbp
mov    %rbp,%rdi
mov    %r13,%rsi
jmp    128e <de_dotdot+0x13e>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0x4,%rax
jb     1367 <de_dotdot+0x217>
mov    %rax,%r14
lea    -0x3(%rbx),%r12
lea    -0x4(%rbx),%rbp
lea    0xcee(%rip),%r15
lea    (%r12,%r14,1),%rdi
mov    %r15,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    1367 <de_dotdot+0x217>
add    %rbp,%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    %rbx,%r14
jb     1367 <de_dotdot+0x217>
lea    -0x1(%r14),%rax
cmpb   $0x2f,(%r14)
mov    %rax,%r14
jne    1340 <de_dotdot+0x1f0>
movb   $0x0,0x1(%rax)
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rax,%r14
cmp    $0x3,%rax
ja     131e <de_dotdot+0x1ce>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"//\00"
@.str.1 = [3 x i8] c"./\00"
@.str.2 = [4 x i8] c"/./\00"
@.str.3 = [4 x i8] c"../\00"
@.str.4 = [5 x i8] c"/../\00"
@.str.5 = [4 x i8] c"/..\00"
define void @de_dotdot(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %2
store i8* null, i8** %3
store i8* null, i8** %4
store i64 0, i64* %5
br label %6
6: ; preds = %22, %1
%7 = load i8*, i8** %2
%8 = call i8* @strstr(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %8, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %30
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 2
store i8* %12, i8** %4
br label %13
13: ; preds = %19, %10
%14 = load i8*, i8** %4
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 47
br i1 %17, label %18, label %22
18: ; preds = %13
br label %19
19: ; preds = %18
%20 = load i8*, i8** %4
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %4
br label %13
22: ; preds = %13
%23 = load i8*, i8** %3
%24 = getelementptr inbounds i8, i8* %23, i64 1
%25 = load i8*, i8** %4
%26 = load i8*, i8** %4
%27 = getelementptr inbounds i8, i8* %26, i64 -1
%28 = call i64 @strlen(i8* %27)
%29 = call i32 @memmove(i8* %24, i8* %25, i64 %28)
br label %6
30: ; preds = %6
br label %31
31: ; preds = %35, %30
%32 = load i8*, i8** %2
%33 = call i64 @strncmp(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %44
35: ; preds = %31
%36 = load i8*, i8** %2
%37 = load i8*, i8** %2
%38 = getelementptr inbounds i8, i8* %37, i64 2
%39 = load i8*, i8** %2
%40 = getelementptr inbounds i8, i8* %39, i64 2
%41 = getelementptr inbounds i8, i8* %40, i64 -1
%42 = call i64 @strlen(i8* %41)
%43 = call i32 @memmove(i8* %36, i8* %38, i64 %42)
br label %31
44: ; preds = %31
br label %45
45: ; preds = %49, %44
%46 = load i8*, i8** %2
%47 = call i8* @strstr(i8* %46, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i8* %47, i8** %3
%48 = icmp ne i8* %47, null
br i1 %48, label %49, label %58
49: ; preds = %45
%50 = load i8*, i8** %3
%51 = load i8*, i8** %3
%52 = getelementptr inbounds i8, i8* %51, i64 2
%53 = load i8*, i8** %3
%54 = getelementptr inbounds i8, i8* %53, i64 2
%55 = getelementptr inbounds i8, i8* %54, i64 -1
%56 = call i64 @strlen(i8* %55)
%57 = call i32 @memmove(i8* %50, i8* %52, i64 %56)
br label %45
58: ; preds = %45
br label %59
59: ; preds = %97, %58
br label %60
60: ; preds = %64, %59
%61 = load i8*, i8** %2
%62 = call i64 @strncmp(i8* %61, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %73
64: ; preds = %60
%65 = load i8*, i8** %2
%66 = load i8*, i8** %2
%67 = getelementptr inbounds i8, i8* %66, i64 3
%68 = load i8*, i8** %2
%69 = getelementptr inbounds i8, i8* %68, i64 3
%70 = getelementptr inbounds i8, i8* %69, i64 -1
%71 = call i64 @strlen(i8* %70)
%72 = call i32 @memmove(i8* %65, i8* %67, i64 %71)
br label %60
73: ; preds = %60
%74 = load i8*, i8** %2
%75 = call i8* @strstr(i8* %74, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
store i8* %75, i8** %3
%76 = load i8*, i8** %3
%77 = icmp eq i8* %76, null
br i1 %77, label %78, label %79
78: ; preds = %73
br label %107
79: ; preds = %73
%80 = load i8*, i8** %3
%81 = getelementptr inbounds i8, i8* %80, i64 -1
store i8* %81, i8** %4
br label %82
82: ; preds = %94, %79
%83 = load i8*, i8** %4
%84 = load i8*, i8** %2
%85 = icmp uge i8* %83, %84
br i1 %85, label %86, label %91
86: ; preds = %82
%87 = load i8*, i8** %4
%88 = load i8, i8* %87
%89 = sext i8 %88 to i32
%90 = icmp ne i32 %89, 47
br label %91
91: ; preds = %86, %82
%92 = phi i1 [ false, %82 ], [ %90, %86 ]
br i1 %92, label %93, label %97
93: ; preds = %91
br label %94
94: ; preds = %93
%95 = load i8*, i8** %4
%96 = getelementptr inbounds i8, i8* %95, i32 -1
store i8* %96, i8** %4
br label %82
97: ; preds = %91
%98 = load i8*, i8** %4
%99 = getelementptr inbounds i8, i8* %98, i64 1
%100 = load i8*, i8** %3
%101 = getelementptr inbounds i8, i8* %100, i64 4
%102 = load i8*, i8** %3
%103 = getelementptr inbounds i8, i8* %102, i64 4
%104 = getelementptr inbounds i8, i8* %103, i64 -1
%105 = call i64 @strlen(i8* %104)
%106 = call i32 @memmove(i8* %99, i8* %101, i64 %105)
br label %59
107: ; preds = %78
br label %108
108: ; preds = %144, %107
%109 = load i8*, i8** %2
%110 = call i64 @strlen(i8* %109)
store i64 %110, i64* %5
%111 = icmp ugt i64 %110, 3
br i1 %111, label %112, label %119
112: ; preds = %108
%113 = load i8*, i8** %2
%114 = load i64, i64* %5
%115 = getelementptr inbounds i8, i8* %113, i64 %114
%116 = getelementptr inbounds i8, i8* %115, i64 -3
store i8* %116, i8** %3
%117 = call i64 @strcmp(i8* %116, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%118 = icmp eq i64 %117, 0
br label %119
119: ; preds = %112, %108
%120 = phi i1 [ false, %108 ], [ %118, %112 ]
br i1 %120, label %121, label %146
121: ; preds = %119
%122 = load i8*, i8** %3
%123 = getelementptr inbounds i8, i8* %122, i64 -1
store i8* %123, i8** %4
br label %124
124: ; preds = %136, %121
%125 = load i8*, i8** %4
%126 = load i8*, i8** %2
%127 = icmp uge i8* %125, %126
br i1 %127, label %128, label %133
128: ; preds = %124
%129 = load i8*, i8** %4
%130 = load i8, i8* %129
%131 = sext i8 %130 to i32
%132 = icmp ne i32 %131, 47
br label %133
133: ; preds = %128, %124
%134 = phi i1 [ false, %124 ], [ %132, %128 ]
br i1 %134, label %135, label %139
135: ; preds = %133
br label %136
136: ; preds = %135
%137 = load i8*, i8** %4
%138 = getelementptr inbounds i8, i8* %137, i32 -1
store i8* %138, i8** %4
br label %124
139: ; preds = %133
%140 = load i8*, i8** %4
%141 = load i8*, i8** %2
%142 = icmp ult i8* %140, %141
br i1 %142, label %143, label %144
143: ; preds = %139
br label %146
144: ; preds = %139
%145 = load i8*, i8** %4
store i8 0, i8* %145
br label %108
146: ; preds = %143, %119
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"//\00"
@.str.1 = [3 x i8] c"./\00"
@.str.2 = [4 x i8] c"/./\00"
@.str.3 = [4 x i8] c"../\00"
@.str.4 = [5 x i8] c"/../\00"
@.str.5 = [4 x i8] c"/..\00"
define void @de_dotdot(i8* %0) {
%2 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %10
4: ; preds = %18, %1
%5 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %25
7: ; preds = %4
%8 = getelementptr inbounds i8, i8* %0, i64 2
%9 = getelementptr inbounds i8, i8* %0, i64 1
br label %28
10: ; preds = %1, %18
%11 = phi i8* [ %23, %18 ], [ %2, %1 ]
%12 = getelementptr inbounds i8, i8* %11, i64 2
br label %13
13: ; preds = %13, %10
%14 = phi i8* [ %12, %10 ], [ %17, %13 ]
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 47
%17 = getelementptr inbounds i8, i8* %14, i64 1
br i1 %16, label %13, label %18
18: ; preds = %13
%19 = getelementptr inbounds i8, i8* %11, i64 1
%20 = getelementptr inbounds i8, i8* %14, i64 -1
%21 = tail call i64 @strlen(i8* %20)
%22 = tail call i32 @memmove(i8* %19, i8* %14, i64 %21)
%23 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%24 = icmp eq i8* %23, null
br i1 %24, label %4, label %10
25: ; preds = %28, %4
%26 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%27 = icmp eq i8* %26, null
br i1 %27, label %33, label %36
28: ; preds = %7, %28
%29 = tail call i64 @strlen(i8* %9)
%30 = tail call i32 @memmove(i8* %0, i8* %8, i64 %29)
%31 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%32 = icmp eq i64 %31, 0
br i1 %32, label %28, label %25
33: ; preds = %36, %25
%34 = getelementptr inbounds i8, i8* %0, i64 3
%35 = getelementptr inbounds i8, i8* %0, i64 2
br label %44
36: ; preds = %25, %36
%37 = phi i8* [ %42, %36 ], [ %26, %25 ]
%38 = getelementptr inbounds i8, i8* %37, i64 2
%39 = getelementptr inbounds i8, i8* %37, i64 1
%40 = tail call i64 @strlen(i8* %39)
%41 = tail call i32 @memmove(i8* %37, i8* %38, i64 %40)
%42 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%43 = icmp eq i8* %42, null
br i1 %43, label %33, label %36
44: ; preds = %33, %67
%45 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %52
47: ; preds = %44, %47
%48 = tail call i64 @strlen(i8* %35)
%49 = tail call i32 @memmove(i8* %0, i8* %34, i64 %48)
%50 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%51 = icmp eq i64 %50, 0
br i1 %51, label %47, label %52
52: ; preds = %47, %44
%53 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%54 = icmp eq i8* %53, null
br i1 %54, label %55, label %60
55: ; preds = %52
%56 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%57 = icmp ugt i64 %56, 3
br i1 %57, label %58, label %87
58: ; preds = %55
%59 = getelementptr inbounds i8, i8* %0, i64 -3
br label %72
60: ; preds = %52, %64
%61 = phi i8* [ %62, %64 ], [ %53, %52 ]
%62 = getelementptr inbounds i8, i8* %61, i64 -1
%63 = icmp ult i8* %62, %0
br i1 %63, label %67, label %64
64: ; preds = %60
%65 = load i8, i8* %62
%66 = icmp eq i8 %65, 47
br i1 %66, label %67, label %60
67: ; preds = %60, %64
%68 = getelementptr inbounds i8, i8* %53, i64 4
%69 = getelementptr inbounds i8, i8* %53, i64 3
%70 = tail call i64 @strlen(i8* %69)
%71 = tail call i32 @memmove(i8* %61, i8* %68, i64 %70)
br label %44
72: ; preds = %58, %84
%73 = phi i64 [ %85, %84 ], [ %56, %58 ]
%74 = getelementptr inbounds i8, i8* %59, i64 %73
%75 = tail call i64 @strcmp(i8* %74, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%76 = icmp eq i64 %75, 0
br i1 %76, label %77, label %87
77: ; preds = %72, %81
%78 = phi i8* [ %79, %81 ], [ %74, %72 ]
%79 = getelementptr inbounds i8, i8* %78, i64 -1
%80 = icmp ult i8* %79, %0
br i1 %80, label %87, label %81
81: ; preds = %77
%82 = load i8, i8* %79
%83 = icmp eq i8 %82, 47
br i1 %83, label %84, label %77
84: ; preds = %81
store i8 0, i8* %79
%85 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%86 = icmp ugt i64 %85, 3
br i1 %86, label %72, label %87
87: ; preds = %72, %84, %77, %55
ret void
}