#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 */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, long, char);
int /*<<< orphan*/ stderr;
void Complement_In_Place(char *ori, long len) {
  long m;
  for (m = 0; m < len; m++) {
    switch (ori[m]) {
    case 'a':
      ori[m] = 't';
      break;
    case 'c':
      ori[m] = 'g';
      break;
    case 'g':
      ori[m] = 'c';
      break;
    case 't':
      ori[m] = 'a';
      break;
    case 'r':
      ori[m] = 'y';
      break;
    case 'y':
      ori[m] = 'r';
      break;
    case 'w':
      ori[m] = 'w';
      break;
    case 's':
      ori[m] = 's';
      break;
    case 'm':
      ori[m] = 'k';
      break;
    case 'k':
      ori[m] = 'm';
      break;
    case 'b':
      ori[m] = 'v';
      break;
    case 'd':
      ori[m] = 'h';
      break;
    case 'h':
      ori[m] = 'd';
      break;
    case 'v':
      ori[m] = 'b';
      break;
    case 'n':
      ori[m] = 'n';
      break;
    default:
      fprintf(stderr, "Acck! In Complement(), I don't like char# %ld= %c! \n",
              m, ori[m]);
      break;
    }
  }
  ori[len] = '\0';
}


x86 assembly (clang, -O0):
<Complement_In_Place>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    12a2 <Complement_In_Place+0x192>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x18,%eax
ja     1267 <Complement_In_Place+0x157>
mov    -0x20(%rbp),%rax
lea    0xea1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x74,(%rax,%rcx,1)
jmp    128c <Complement_In_Place+0x17c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x67,(%rax,%rcx,1)
jmp    128c <Complement_In_Place+0x17c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x63,(%rax,%rcx,1)
jmp    128c <Complement_In_Place+0x17c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x61,(%rax,%rcx,1)
jmp    128c <Complement_In_Place+0x17c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x79,(%rax,%rcx,1)
jmp    128c <Complement_In_Place+0x17c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x72,(%rax,%rcx,1)
jmp    128c <Complement_In_Place+0x17c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x77,(%rax,%rcx,1)
jmp    128c <Complement_In_Place+0x17c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x73,(%rax,%rcx,1)
jmp    128c <Complement_In_Place+0x17c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x6b,(%rax,%rcx,1)
jmp    128c <Complement_In_Place+0x17c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x6d,(%rax,%rcx,1)
jmp    128c <Complement_In_Place+0x17c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x76,(%rax,%rcx,1)
jmp    128c <Complement_In_Place+0x17c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x68,(%rax,%rcx,1)
jmp    128c <Complement_In_Place+0x17c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x64,(%rax,%rcx,1)
jmp    128c <Complement_In_Place+0x17c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x62,(%rax,%rcx,1)
jmp    128c <Complement_In_Place+0x17c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x6e,(%rax,%rcx,1)
jmp    128c <Complement_In_Place+0x17c>
mov    0x2d72(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
lea    0xde1(%rip),%rsi
movsbl (%rax,%rcx,1),%ecx
call   1030 <fprintf@plt>
jmp    1291 <Complement_In_Place+0x181>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <Complement_In_Place+0x18>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Complement_In_Place>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
test   %rsi,%rsi
jle    11f3 <Complement_In_Place+0xe3>
xor    %ebx,%ebx
mov    0x2ead(%rip),%r13
lea    0xf2a(%rip),%r12
lea    0xebf(%rip),%rbp
jmp    116d <Complement_In_Place+0x5d>
mov    0x0(%r13),%edi
movsbl %al,%ecx
mov    %r12,%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbx
cmp    %rbx,%r14
je     11f3 <Complement_In_Place+0xe3>
movsbl (%r15,%rbx,1),%eax
lea    -0x61(%rax),%ecx
cmp    $0x18,%ecx
ja     1143 <Complement_In_Place+0x33>
movslq 0x0(%rbp,%rcx,4),%rcx
add    %rbp,%rcx
jmp    *%rcx
movb   $0x74,(%r15,%rbx,1)
jmp    1160 <Complement_In_Place+0x50>
movb   $0x67,(%r15,%rbx,1)
jmp    1160 <Complement_In_Place+0x50>
movb   $0x64,(%r15,%rbx,1)
jmp    1160 <Complement_In_Place+0x50>
movb   $0x73,(%r15,%rbx,1)
jmp    1160 <Complement_In_Place+0x50>
movb   $0x61,(%r15,%rbx,1)
jmp    1160 <Complement_In_Place+0x50>
movb   $0x62,(%r15,%rbx,1)
jmp    1160 <Complement_In_Place+0x50>
movb   $0x77,(%r15,%rbx,1)
jmp    1160 <Complement_In_Place+0x50>
movb   $0x76,(%r15,%rbx,1)
jmp    1160 <Complement_In_Place+0x50>
movb   $0x68,(%r15,%rbx,1)
jmp    1160 <Complement_In_Place+0x50>
movb   $0x63,(%r15,%rbx,1)
jmp    1160 <Complement_In_Place+0x50>
movb   $0x6d,(%r15,%rbx,1)
jmp    1160 <Complement_In_Place+0x50>
movb   $0x6b,(%r15,%rbx,1)
jmp    1160 <Complement_In_Place+0x50>
movb   $0x6e,(%r15,%rbx,1)
jmp    1160 <Complement_In_Place+0x50>
movb   $0x79,(%r15,%rbx,1)
jmp    1160 <Complement_In_Place+0x50>
movb   $0x72,(%r15,%rbx,1)
jmp    1160 <Complement_In_Place+0x50>
movb   $0x0,(%r15,%r14,1)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [53 x i8] c"Acck! In Complement(), I don't like char# %ld= %c! \0A\00"
define void @Complement_In_Place(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
store i64 0, i64* %5
br label %6
6: ; preds = %85, %2
%7 = load i64, i64* %5
%8 = load i64, i64* %4
%9 = icmp slt i64 %7, %8
br i1 %9, label %10, label %88
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i64, i64* %5
%13 = getelementptr inbounds i8, i8* %11, i64 %12
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
switch i32 %15, label %76 [
i32 97, label %16
i32 99, label %20
i32 103, label %24
i32 116, label %28
i32 114, label %32
i32 121, label %36
i32 119, label %40
i32 115, label %44
i32 109, label %48
i32 107, label %52
i32 98, label %56
i32 100, label %60
i32 104, label %64
i32 118, label %68
i32 110, label %72
]
16: ; preds = %10
%17 = load i8*, i8** %3
%18 = load i64, i64* %5
%19 = getelementptr inbounds i8, i8* %17, i64 %18
store i8 116, i8* %19
br label %84
20: ; preds = %10
%21 = load i8*, i8** %3
%22 = load i64, i64* %5
%23 = getelementptr inbounds i8, i8* %21, i64 %22
store i8 103, i8* %23
br label %84
24: ; preds = %10
%25 = load i8*, i8** %3
%26 = load i64, i64* %5
%27 = getelementptr inbounds i8, i8* %25, i64 %26
store i8 99, i8* %27
br label %84
28: ; preds = %10
%29 = load i8*, i8** %3
%30 = load i64, i64* %5
%31 = getelementptr inbounds i8, i8* %29, i64 %30
store i8 97, i8* %31
br label %84
32: ; preds = %10
%33 = load i8*, i8** %3
%34 = load i64, i64* %5
%35 = getelementptr inbounds i8, i8* %33, i64 %34
store i8 121, i8* %35
br label %84
36: ; preds = %10
%37 = load i8*, i8** %3
%38 = load i64, i64* %5
%39 = getelementptr inbounds i8, i8* %37, i64 %38
store i8 114, i8* %39
br label %84
40: ; preds = %10
%41 = load i8*, i8** %3
%42 = load i64, i64* %5
%43 = getelementptr inbounds i8, i8* %41, i64 %42
store i8 119, i8* %43
br label %84
44: ; preds = %10
%45 = load i8*, i8** %3
%46 = load i64, i64* %5
%47 = getelementptr inbounds i8, i8* %45, i64 %46
store i8 115, i8* %47
br label %84
48: ; preds = %10
%49 = load i8*, i8** %3
%50 = load i64, i64* %5
%51 = getelementptr inbounds i8, i8* %49, i64 %50
store i8 107, i8* %51
br label %84
52: ; preds = %10
%53 = load i8*, i8** %3
%54 = load i64, i64* %5
%55 = getelementptr inbounds i8, i8* %53, i64 %54
store i8 109, i8* %55
br label %84
56: ; preds = %10
%57 = load i8*, i8** %3
%58 = load i64, i64* %5
%59 = getelementptr inbounds i8, i8* %57, i64 %58
store i8 118, i8* %59
br label %84
60: ; preds = %10
%61 = load i8*, i8** %3
%62 = load i64, i64* %5
%63 = getelementptr inbounds i8, i8* %61, i64 %62
store i8 104, i8* %63
br label %84
64: ; preds = %10
%65 = load i8*, i8** %3
%66 = load i64, i64* %5
%67 = getelementptr inbounds i8, i8* %65, i64 %66
store i8 100, i8* %67
br label %84
68: ; preds = %10
%69 = load i8*, i8** %3
%70 = load i64, i64* %5
%71 = getelementptr inbounds i8, i8* %69, i64 %70
store i8 98, i8* %71
br label %84
72: ; preds = %10
%73 = load i8*, i8** %3
%74 = load i64, i64* %5
%75 = getelementptr inbounds i8, i8* %73, i64 %74
store i8 110, i8* %75
br label %84
76: ; preds = %10
%77 = load i32, i32* @stderr
%78 = load i64, i64* %5
%79 = load i8*, i8** %3
%80 = load i64, i64* %5
%81 = getelementptr inbounds i8, i8* %79, i64 %80
%82 = load i8, i8* %81
%83 = call i32 @fprintf(i32 %77, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i64 %78, i8 signext %82)
br label %84
84: ; preds = %76, %72, %68, %64, %60, %56, %52, %48, %44, %40, %36, %32, %28, %24, %20, %16
br label %85
85: ; preds = %84
%86 = load i64, i64* %5
%87 = add nsw i64 %86, 1
store i64 %87, i64* %5
br label %6
88: ; preds = %6
%89 = load i8*, i8** %3
%90 = load i64, i64* %4
%91 = getelementptr inbounds i8, i8* %89, i64 %90
store i8 0, i8* %91
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [53 x i8] c"Acck! In Complement(), I don't like char# %ld= %c! \0A\00"
define void @Complement_In_Place(i8* nocapture %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %4, label %30
4: ; preds = %2, %27
%5 = phi i64 [ %28, %27 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
switch i32 %8, label %24 [
i32 97, label %9
i32 99, label %10
i32 103, label %11
i32 116, label %12
i32 114, label %13
i32 121, label %14
i32 119, label %15
i32 115, label %16
i32 109, label %17
i32 107, label %18
i32 98, label %19
i32 100, label %20
i32 104, label %21
i32 118, label %22
i32 110, label %23
]
9: ; preds = %4
store i8 116, i8* %6
br label %27
10: ; preds = %4
store i8 103, i8* %6
br label %27
11: ; preds = %4
store i8 99, i8* %6
br label %27
12: ; preds = %4
store i8 97, i8* %6
br label %27
13: ; preds = %4
store i8 121, i8* %6
br label %27
14: ; preds = %4
store i8 114, i8* %6
br label %27
15: ; preds = %4
store i8 119, i8* %6
br label %27
16: ; preds = %4
store i8 115, i8* %6
br label %27
17: ; preds = %4
store i8 107, i8* %6
br label %27
18: ; preds = %4
store i8 109, i8* %6
br label %27
19: ; preds = %4
store i8 118, i8* %6
br label %27
20: ; preds = %4
store i8 104, i8* %6
br label %27
21: ; preds = %4
store i8 100, i8* %6
br label %27
22: ; preds = %4
store i8 98, i8* %6
br label %27
23: ; preds = %4
store i8 110, i8* %6
br label %27
24: ; preds = %4
%25 = load i32, i32* @stderr
%26 = tail call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i64 %5, i8 signext %7)
br label %27
27: ; preds = %9, %10, %11, %12, %13, %14, %15, %16, %17, %18, %19, %20, %21, %22, %23, %24
%28 = add nuw nsw i64 %5, 1
%29 = icmp eq i64 %28, %1
br i1 %29, label %30, label %4
30: ; preds = %27, %2
%31 = getelementptr inbounds i8, i8* %0, i64 %1
store i8 0, i8* %31
ret void
}