#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 int /*<<< orphan*/ name;

/* Variables and functions */
int /*<<< orphan*/ ClientName(int, char *, int);
int /*<<< orphan*/ memmove(char *, char *, scalar_t__);
scalar_t__ strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *strstr(char *, char *);
char *EasyClientName(int client, char *buf, int size) {
  int i;
  char *str1, *str2, *ptr, c;
  char name[128];
  ClientName(client, name, sizeof(name));
  for (i = 0; name[i]; i++)
    name[i] &= 127;
  for (ptr = strstr(name, " "); ptr; ptr = strstr(name, " ")) {
    memmove(ptr, ptr + 1, strlen(ptr + 1) + 1);
  }
  str1 = strstr(name, "[");
  str2 = strstr(name, "]");
  if (str1 && str2) {
    if (str2 > str1)
      memmove(str1, str2 + 1, strlen(str2 + 1) + 1);
    else
      memmove(str2, str1 + 1, strlen(str1 + 1) + 1);
  }
  if ((name[0] == 'm' || name[0] == 'M') &&
      (name[1] == 'r' || name[1] == 'R')) {
    memmove(name, name + 2, strlen(name + 2) + 1);
  }
  ptr = name;
  while (*ptr) {
    c = *ptr;
    if ((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '_') {
      ptr++;
    } else if (c >= 'A' && c <= 'Z') {
      *ptr += 'a' - 'A';
      ptr++;
    } else {
      memmove(ptr, ptr + 1, strlen(ptr + 1) + 1);
    }
  }
  strncpy(buf, name, size - 1);
  buf[size - 1] = '\0';
  return buf;
}


x86 assembly (clang, -O0):
<EasyClientName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xc0(%rbp),%rsi
mov    $0x80,%edx
call   1060 <ClientName@plt>
movl   $0x0,-0x18(%rbp)
movslq -0x18(%rbp),%rax
cmpb   $0x0,-0xc0(%rbp,%rax,1)
je     11b6 <EasyClientName+0x66>
movslq -0x18(%rbp),%rax
movsbl -0xc0(%rbp,%rax,1),%ecx
ff
and    $0x7f,%ecx
mov    %cl,-0xc0(%rbp,%rax,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1180 <EasyClientName+0x30>
lea    -0xc0(%rbp),%rdi
lea    0xe3c(%rip),%rsi
call   1070 <strstr@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1235 <EasyClientName+0xe5>
mov    -0x30(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xc8(%rbp)
mov    -0x30(%rbp),%rdi
add    $0x1,%rdi
call   1040 <strlen@plt>
mov    -0xd0(%rbp),%rdi
mov    -0xc8(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1050 <memmove@plt>
lea    -0xc0(%rbp),%rdi
lea    0xdd9(%rip),%rsi
call   1070 <strstr@plt>
mov    %rax,-0x30(%rbp)
jmp    11cd <EasyClientName+0x7d>
lea    -0xc0(%rbp),%rdi
lea    0xdbf(%rip),%rsi
call   1070 <strstr@plt>
mov    %rax,-0x20(%rbp)
lea    -0xc0(%rbp),%rdi
lea    0xdaa(%rip),%rsi
call   1070 <strstr@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1313 <EasyClientName+0x1c3>
cmpq   $0x0,-0x28(%rbp)
je     1313 <EasyClientName+0x1c3>
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jbe    12cd <EasyClientName+0x17d>
mov    -0x20(%rbp),%rax
mov    %rax,-0xe0(%rbp)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xd8(%rbp)
mov    -0x28(%rbp),%rdi
add    $0x1,%rdi
call   1040 <strlen@plt>
mov    -0xe0(%rbp),%rdi
mov    -0xd8(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1050 <memmove@plt>
jmp    130e <EasyClientName+0x1be>
mov    -0x28(%rbp),%rax
mov    %rax,-0xf0(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xe8(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
call   1040 <strlen@plt>
mov    -0xf0(%rbp),%rdi
mov    -0xe8(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1050 <memmove@plt>
jmp    1313 <EasyClientName+0x1c3>
movsbl -0xc0(%rbp),%eax
cmp    $0x6d,%eax
je     1333 <EasyClientName+0x1e3>
movsbl -0xc0(%rbp),%eax
cmp    $0x4d,%eax
jne    139d <EasyClientName+0x24d>
movsbl -0xbf(%rbp),%eax
cmp    $0x72,%eax
je     1353 <EasyClientName+0x203>
movsbl -0xbf(%rbp),%eax
cmp    $0x52,%eax
jne    139d <EasyClientName+0x24d>
lea    -0xc0(%rbp),%rax
mov    %rax,-0x100(%rbp)
lea    -0xc0(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0xf8(%rbp)
lea    -0xc0(%rbp),%rdi
add    $0x2,%rdi
call   1040 <strlen@plt>
mov    -0x100(%rbp),%rdi
mov    -0xf8(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1050 <memmove@plt>
lea    -0xc0(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmpb   $0x0,(%rax)
je     1492 <EasyClientName+0x342>
mov    -0x30(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x31(%rbp)
movsbl -0x31(%rbp),%eax
cmp    $0x61,%eax
jl     13d8 <EasyClientName+0x288>
movsbl -0x31(%rbp),%eax
cmp    $0x7a,%eax
jle    13ff <EasyClientName+0x2af>
movsbl -0x31(%rbp),%eax
cmp    $0x30,%eax
jl     13f2 <EasyClientName+0x2a2>
movsbl -0x31(%rbp),%eax
cmp    $0x39,%eax
jle    13ff <EasyClientName+0x2af>
movsbl -0x31(%rbp),%eax
cmp    $0x5f,%eax
jne    1410 <EasyClientName+0x2c0>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    148d <EasyClientName+0x33d>
movsbl -0x31(%rbp),%eax
cmp    $0x41,%eax
jl     1447 <EasyClientName+0x2f7>
movsbl -0x31(%rbp),%eax
cmp    $0x5a,%eax
jg     1447 <EasyClientName+0x2f7>
mov    -0x30(%rbp),%rax
movsbl (%rax),%ecx
add    $0x20,%ecx
mov    %cl,(%rax)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1488 <EasyClientName+0x338>
mov    -0x30(%rbp),%rax
mov    %rax,-0x110(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x108(%rbp)
mov    -0x30(%rbp),%rdi
add    $0x1,%rdi
call   1040 <strlen@plt>
mov    -0x110(%rbp),%rdi
mov    -0x108(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1050 <memmove@plt>
jmp    148d <EasyClientName+0x33d>
jmp    13a8 <EasyClientName+0x258>
mov    -0x10(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EasyClientName>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x80,%rsp
mov    %edx,%r14d
mov    %rsi,%r15
mov    %rsp,%rsi
mov    $0x80,%edx
call   1070 <ClientName@plt>
mov    (%rsp),%al
test   %al,%al
je     1190 <EasyClientName+0x40>
lea    0x1(%rsp),%rcx
xchg   %ax,%ax
and    $0x7f,%al
mov    %al,-0x1(%rcx)
movzbl (%rcx),%eax
add    $0x1,%rcx
test   %al,%al
jne    1180 <EasyClientName+0x30>
mov    %rsp,%rdi
mov    $0x20,%esi
call   1050 <strchr@plt>
test   %rax,%rax
je     11e0 <EasyClientName+0x90>
mov    %rax,%rbp
mov    %rsp,%r12
nopl   0x0(%rax,%rax,1)
lea    0x1(%rbp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1060 <memmove@plt>
mov    %r12,%rdi
mov    $0x20,%esi
call   1050 <strchr@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    11b0 <EasyClientName+0x60>
mov    %rsp,%rbp
mov    %rbp,%rdi
mov    $0x5b,%esi
call   1050 <strchr@plt>
mov    %rax,%r12
mov    %rbp,%rdi
mov    $0x5d,%esi
call   1050 <strchr@plt>
test   %r12,%r12
je     1245 <EasyClientName+0xf5>
mov    %rax,%rbx
test   %rax,%rax
je     1245 <EasyClientName+0xf5>
cmp    %r12,%rbx
jbe    122a <EasyClientName+0xda>
add    $0x1,%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r12,%rdi
mov    %rbx,%rsi
jmp    1240 <EasyClientName+0xf0>
add    $0x1,%r12
mov    %r12,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %r12,%rsi
call   1060 <memmove@plt>
mov    (%rsp),%al
mov    %eax,%ecx
and    $0xdf,%cl
cmp    $0x4d,%cl
jne    127d <EasyClientName+0x12d>
mov    0x1(%rsp),%cl
and    $0xdf,%cl
cmp    $0x52,%cl
jne    1281 <EasyClientName+0x131>
lea    0x2(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1060 <memmove@plt>
mov    (%rsp),%al
test   %al,%al
je     12cb <EasyClientName+0x17b>
lea    -0x61(%rax),%ecx
cmp    $0x1a,%cl
jb     12a2 <EasyClientName+0x152>
cmp    $0x5f,%al
je     12a2 <EasyClientName+0x152>
lea    -0x30(%rax),%ecx
cmp    $0x9,%cl
jbe    12a2 <EasyClientName+0x152>
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     12ab <EasyClientName+0x15b>
add    $0x20,%al
mov    %al,0x0(%rbp)
add    $0x1,%rbp
mov    0x0(%rbp),%al
jmp    127d <EasyClientName+0x12d>
lea    0x1(%rbp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1060 <memmove@plt>
mov    0x0(%rbp),%al
jmp    127d <EasyClientName+0x12d>
movslq %r14d,%rbx
lea    -0x1(%rbx),%rdx
mov    %rsp,%rsi
mov    %r15,%rdi
call   1030 <strncpy@plt>
movb   $0x0,-0x1(%r15,%rbx,1)
mov    %r15,%rax
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [2 x i8] c"[\00"
@.str.2 = [2 x i8] c"]\00"
define i8* @EasyClientName(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8
%12 = alloca [128 x i8]
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%13 = load i32, i32* %4
%14 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 0
%15 = call i32 @ClientName(i32 %13, i8* %14, i32 128)
store i32 0, i32* %7
br label %16
16: ; preds = %30, %3
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 %18
%20 = load i8, i8* %19
%21 = icmp ne i8 %20, 0
br i1 %21, label %22, label %33
22: ; preds = %16
%23 = load i32, i32* %7
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = and i32 %27, 127
%29 = trunc i32 %28 to i8
store i8 %29, i8* %25
br label %30
30: ; preds = %22
%31 = load i32, i32* %7
%32 = add nsw i32 %31, 1
store i32 %32, i32* %7
br label %16
33: ; preds = %16
%34 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 0
%35 = call i8* @strstr(i8* %34, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %35, i8** %10
br label %36
36: ; preds = %48, %33
%37 = load i8*, i8** %10
%38 = icmp ne i8* %37, null
br i1 %38, label %39, label %51
39: ; preds = %36
%40 = load i8*, i8** %10
%41 = load i8*, i8** %10
%42 = getelementptr inbounds i8, i8* %41, i64 1
%43 = load i8*, i8** %10
%44 = getelementptr inbounds i8, i8* %43, i64 1
%45 = call i64 @strlen(i8* %44)
%46 = add nsw i64 %45, 1
%47 = call i32 @memmove(i8* %40, i8* %42, i64 %46)
br label %48
48: ; preds = %39
%49 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 0
%50 = call i8* @strstr(i8* %49, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %50, i8** %10
br label %36
51: ; preds = %36
%52 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 0
%53 = call i8* @strstr(i8* %52, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i8* %53, i8** %8
%54 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 0
%55 = call i8* @strstr(i8* %54, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i8* %55, i8** %9
%56 = load i8*, i8** %8
%57 = icmp ne i8* %56, null
br i1 %57, label %58, label %84
58: ; preds = %51
%59 = load i8*, i8** %9
%60 = icmp ne i8* %59, null
br i1 %60, label %61, label %84
61: ; preds = %58
%62 = load i8*, i8** %9
%63 = load i8*, i8** %8
%64 = icmp ugt i8* %62, %63
br i1 %64, label %65, label %74
65: ; preds = %61
%66 = load i8*, i8** %8
%67 = load i8*, i8** %9
%68 = getelementptr inbounds i8, i8* %67, i64 1
%69 = load i8*, i8** %9
%70 = getelementptr inbounds i8, i8* %69, i64 1
%71 = call i64 @strlen(i8* %70)
%72 = add nsw i64 %71, 1
%73 = call i32 @memmove(i8* %66, i8* %68, i64 %72)
br label %83
74: ; preds = %61
%75 = load i8*, i8** %9
%76 = load i8*, i8** %8
%77 = getelementptr inbounds i8, i8* %76, i64 1
%78 = load i8*, i8** %8
%79 = getelementptr inbounds i8, i8* %78, i64 1
%80 = call i64 @strlen(i8* %79)
%81 = add nsw i64 %80, 1
%82 = call i32 @memmove(i8* %75, i8* %77, i64 %81)
br label %83
83: ; preds = %74, %65
br label %84
84: ; preds = %83, %58, %51
%85 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 0
%86 = load i8, i8* %85
%87 = sext i8 %86 to i32
%88 = icmp eq i32 %87, 109
br i1 %88, label %94, label %89
89: ; preds = %84
%90 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 0
%91 = load i8, i8* %90
%92 = sext i8 %91 to i32
%93 = icmp eq i32 %92, 77
br i1 %93, label %94, label %113
94: ; preds = %89, %84
%95 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 1
%96 = load i8, i8* %95
%97 = sext i8 %96 to i32
%98 = icmp eq i32 %97, 114
br i1 %98, label %104, label %99
99: ; preds = %94
%100 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 1
%101 = load i8, i8* %100
%102 = sext i8 %101 to i32
%103 = icmp eq i32 %102, 82
br i1 %103, label %104, label %113
104: ; preds = %99, %94
%105 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 0
%106 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 0
%107 = getelementptr inbounds i8, i8* %106, i64 2
%108 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 0
%109 = getelementptr inbounds i8, i8* %108, i64 2
%110 = call i64 @strlen(i8* %109)
%111 = add nsw i64 %110, 1
%112 = call i32 @memmove(i8* %105, i8* %107, i64 %111)
br label %113
113: ; preds = %104, %99, %89
%114 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 0
store i8* %114, i8** %10
br label %115
115: ; preds = %170, %113
%116 = load i8*, i8** %10
%117 = load i8, i8* %116
%118 = icmp ne i8 %117, 0
br i1 %118, label %119, label %171
119: ; preds = %115
%120 = load i8*, i8** %10
%121 = load i8, i8* %120
store i8 %121, i8* %11
%122 = load i8, i8* %11
%123 = sext i8 %122 to i32
%124 = icmp sge i32 %123, 97
br i1 %124, label %125, label %129
125: ; preds = %119
%126 = load i8, i8* %11
%127 = sext i8 %126 to i32
%128 = icmp sle i32 %127, 122
br i1 %128, label %141, label %129
129: ; preds = %125, %119
%130 = load i8, i8* %11
%131 = sext i8 %130 to i32
%132 = icmp sge i32 %131, 48
br i1 %132, label %133, label %137
133: ; preds = %129
%134 = load i8, i8* %11
%135 = sext i8 %134 to i32
%136 = icmp sle i32 %135, 57
br i1 %136, label %141, label %137
137: ; preds = %133, %129
%138 = load i8, i8* %11
%139 = sext i8 %138 to i32
%140 = icmp eq i32 %139, 95
br i1 %140, label %141, label %144
141: ; preds = %137, %133, %125
%142 = load i8*, i8** %10
%143 = getelementptr inbounds i8, i8* %142, i32 1
store i8* %143, i8** %10
br label %170
144: ; preds = %137
%145 = load i8, i8* %11
%146 = sext i8 %145 to i32
%147 = icmp sge i32 %146, 65
br i1 %147, label %148, label %160
148: ; preds = %144
%149 = load i8, i8* %11
%150 = sext i8 %149 to i32
%151 = icmp sle i32 %150, 90
br i1 %151, label %152, label %160
152: ; preds = %148
%153 = load i8*, i8** %10
%154 = load i8, i8* %153
%155 = sext i8 %154 to i32
%156 = add nsw i32 %155, 32
%157 = trunc i32 %156 to i8
store i8 %157, i8* %153
%158 = load i8*, i8** %10
%159 = getelementptr inbounds i8, i8* %158, i32 1
store i8* %159, i8** %10
br label %169
160: ; preds = %148, %144
%161 = load i8*, i8** %10
%162 = load i8*, i8** %10
%163 = getelementptr inbounds i8, i8* %162, i64 1
%164 = load i8*, i8** %10
%165 = getelementptr inbounds i8, i8* %164, i64 1
%166 = call i64 @strlen(i8* %165)
%167 = add nsw i64 %166, 1
%168 = call i32 @memmove(i8* %161, i8* %163, i64 %167)
br label %169
169: ; preds = %160, %152
br label %170
170: ; preds = %169, %141
br label %115
171: ; preds = %115
%172 = load i8*, i8** %5
%173 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 0
%174 = load i32, i32* %6
%175 = sub nsw i32 %174, 1
%176 = call i32 @strncpy(i8* %172, i8* %173, i32 %175)
%177 = load i8*, i8** %5
%178 = load i32, i32* %6
%179 = sub nsw i32 %178, 1
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds i8, i8* %177, i64 %180
store i8 0, i8* %181
%182 = load i8*, i8** %5
ret i8* %182
}

LLVM IR (-O2):
define i8* @EasyClientName(i32 %0, i8* returned %1, i32 %2) {
%4 = alloca [128 x i8]
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%6 = call i32 @ClientName(i32 %0, i8* %5, i32 128)
%7 = load i8, i8* %5
%8 = icmp eq i8 %7, 0
br i1 %8, label %18, label %9
9: ; preds = %3, %9
%10 = phi i64 [ %14, %9 ], [ 0, %3 ]
%11 = phi i8 [ %16, %9 ], [ %7, %3 ]
%12 = phi i8* [ %15, %9 ], [ %5, %3 ]
%13 = and i8 %11, 127
store i8 %13, i8* %12
%14 = add nuw nsw i64 %10, 1
%15 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 %14
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %9
18: ; preds = %9, %3
%19 = call i8* @strchr(i8* %5, i32 32)
%20 = icmp eq i8* %19, null
br i1 %20, label %29, label %21
21: ; preds = %18, %21
%22 = phi i8* [ %27, %21 ], [ %19, %18 ]
%23 = getelementptr inbounds i8, i8* %22, i64 1
%24 = call i64 @strlen(i8* %23)
%25 = add nsw i64 %24, 1
%26 = call i32 @memmove(i8* %22, i8* %23, i64 %25)
%27 = call i8* @strchr(i8* %5, i32 32)
%28 = icmp eq i8* %27, null
br i1 %28, label %29, label %21
29: ; preds = %21, %18
%30 = call i8* @strchr(i8* %5, i32 91)
%31 = call i8* @strchr(i8* %5, i32 93)
%32 = icmp ne i8* %30, null
%33 = icmp ne i8* %31, null
%34 = select i1 %32, i1 %33, i1 false
br i1 %34, label %35, label %47
35: ; preds = %29
%36 = icmp ugt i8* %31, %30
br i1 %36, label %37, label %42
37: ; preds = %35
%38 = getelementptr inbounds i8, i8* %31, i64 1
%39 = call i64 @strlen(i8* %38)
%40 = add nsw i64 %39, 1
%41 = call i32 @memmove(i8* %30, i8* %38, i64 %40)
br label %47
42: ; preds = %35
%43 = getelementptr inbounds i8, i8* %30, i64 1
%44 = call i64 @strlen(i8* %43)
%45 = add nsw i64 %44, 1
%46 = call i32 @memmove(i8* %31, i8* %43, i64 %45)
br label %47
47: ; preds = %37, %42, %29
%48 = load i8, i8* %5
%49 = and i8 %48, -33
%50 = icmp eq i8 %49, 77
br i1 %50, label %51, label %62
51: ; preds = %47
%52 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 1
%53 = load i8, i8* %52
%54 = and i8 %53, -33
%55 = icmp eq i8 %54, 82
br i1 %55, label %56, label %65
56: ; preds = %51
%57 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 2
%58 = call i64 @strlen(i8* %57)
%59 = add nsw i64 %58, 1
%60 = call i32 @memmove(i8* %5, i8* %57, i64 %59)
%61 = load i8, i8* %5
br label %62
62: ; preds = %47, %56
%63 = phi i8 [ %48, %47 ], [ %61, %56 ]
%64 = icmp eq i8 %63, 0
br i1 %64, label %94, label %65
65: ; preds = %51, %62
%66 = phi i8 [ %48, %51 ], [ %63, %62 ]
br label %67
67: ; preds = %65, %90
%68 = phi i8 [ %92, %90 ], [ %66, %65 ]
%69 = phi i8* [ %91, %90 ], [ %5, %65 ]
%70 = add i8 %68, -97
%71 = icmp ult i8 %70, 26
br i1 %71, label %77, label %72
72: ; preds = %67
%73 = add i8 %68, -48
%74 = icmp ult i8 %73, 10
%75 = icmp eq i8 %68, 95
%76 = or i1 %75, %74
br i1 %76, label %77, label %79
77: ; preds = %72, %67
%78 = getelementptr inbounds i8, i8* %69, i64 1
br label %90
79: ; preds = %72
%80 = add i8 %68, -65
%81 = icmp ult i8 %80, 26
br i1 %81, label %82, label %85
82: ; preds = %79
%83 = add nuw nsw i8 %68, 32
store i8 %83, i8* %69
%84 = getelementptr inbounds i8, i8* %69, i64 1
br label %90
85: ; preds = %79
%86 = getelementptr inbounds i8, i8* %69, i64 1
%87 = call i64 @strlen(i8* %86)
%88 = add nsw i64 %87, 1
%89 = call i32 @memmove(i8* %69, i8* %86, i64 %88)
br label %90
90: ; preds = %82, %85, %77
%91 = phi i8* [ %78, %77 ], [ %84, %82 ], [ %69, %85 ]
%92 = load i8, i8* %91
%93 = icmp eq i8 %92, 0
br i1 %93, label %94, label %67
94: ; preds = %90, %62
%95 = add nsw i32 %2, -1
%96 = call i32 @strncpy(i8* %1, i8* %5, i32 %95)
%97 = sext i32 %95 to i64
%98 = getelementptr inbounds i8, i8* %1, i64 %97
store i8 0, i8* %98
ret i8* %1
}