#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 tolower(char);
void ConvIcsSpecialToComp(char *move) {
  move[0] = move[2];
  move[1] = move[3];
  move[2] = move[5];
  move[3] = move[6];
  if (move[7] == '=') {
    move[4] = move[7];
    move[5] = tolower(move[8]);
    move[6] = '\0';
  } else {
    move[4] = '\0';
  }
}


x86 assembly (clang, -O0):
<ConvIcsSpecialToComp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%rax
mov    0x5(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rax
mov    0x6(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x8(%rbp),%rax
movsbl 0x7(%rax),%eax
cmp    $0x3d,%eax
jne    1195 <ConvIcsSpecialToComp+0x85>
mov    -0x8(%rbp),%rax
mov    0x7(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x4(%rax)
mov    -0x8(%rbp),%rax
movsbl 0x8(%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x5(%rax)
mov    -0x8(%rbp),%rax
movb   $0x0,0x6(%rax)
jmp    119d <ConvIcsSpecialToComp+0x8d>
mov    -0x8(%rbp),%rax
movb   $0x0,0x4(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConvIcsSpecialToComp>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movzwl 0x2(%rdi),%eax
movzwl 0x5(%rdi),%ecx
mov    %ax,(%rdi)
mov    %cx,0x2(%rdi)
cmpb   $0x3d,0x7(%rdi)
jne    1145 <ConvIcsSpecialToComp+0x35>
lea    0x6(%rbx),%r14
movb   $0x3d,0x4(%rbx)
movsbl 0x8(%rbx),%edi
call   1030 <tolower@plt>
mov    %al,0x5(%rbx)
mov    %r14,%rbx
jmp    1149 <ConvIcsSpecialToComp+0x39>
add    $0x4,%rbx
movb   $0x0,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ConvIcsSpecialToComp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 2
%5 = load i8, i8* %4
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
store i8 %5, i8* %7
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 3
%10 = load i8, i8* %9
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i64 1
store i8 %10, i8* %12
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 5
%15 = load i8, i8* %14
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i64 2
store i8 %15, i8* %17
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i64 6
%20 = load i8, i8* %19
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i64 3
store i8 %20, i8* %22
%23 = load i8*, i8** %2
%24 = getelementptr inbounds i8, i8* %23, i64 7
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 61
br i1 %27, label %28, label %42
28: ; preds = %1
%29 = load i8*, i8** %2
%30 = getelementptr inbounds i8, i8* %29, i64 7
%31 = load i8, i8* %30
%32 = load i8*, i8** %2
%33 = getelementptr inbounds i8, i8* %32, i64 4
store i8 %31, i8* %33
%34 = load i8*, i8** %2
%35 = getelementptr inbounds i8, i8* %34, i64 8
%36 = load i8, i8* %35
%37 = call signext i8 @tolower(i8 signext %36)
%38 = load i8*, i8** %2
%39 = getelementptr inbounds i8, i8* %38, i64 5
store i8 %37, i8* %39
%40 = load i8*, i8** %2
%41 = getelementptr inbounds i8, i8* %40, i64 6
store i8 0, i8* %41
br label %45
42: ; preds = %1
%43 = load i8*, i8** %2
%44 = getelementptr inbounds i8, i8* %43, i64 4
store i8 0, i8* %44
br label %45
45: ; preds = %42, %28
ret void
}

LLVM IR (-O2):
define void @ConvIcsSpecialToComp(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 2
%3 = load i8, i8* %2
store i8 %3, i8* %0
%4 = getelementptr inbounds i8, i8* %0, i64 3
%5 = load i8, i8* %4
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = getelementptr inbounds i8, i8* %0, i64 5
%8 = load i8, i8* %7
store i8 %8, i8* %2
%9 = getelementptr inbounds i8, i8* %0, i64 6
%10 = load i8, i8* %9
store i8 %10, i8* %4
%11 = getelementptr inbounds i8, i8* %0, i64 7
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 61
%14 = getelementptr inbounds i8, i8* %0, i64 4
br i1 %13, label %15, label %19
15: ; preds = %1
store i8 61, i8* %14
%16 = getelementptr inbounds i8, i8* %0, i64 8
%17 = load i8, i8* %16
%18 = tail call signext i8 @tolower(i8 signext %17)
store i8 %18, i8* %7
br label %19
19: ; preds = %1, %15
%20 = phi i8* [ %9, %15 ], [ %14, %1 ]
store i8 0, i8* %20
ret void
}