// File: afinit[P]afin/revcomp.cpp
// Function: revcomp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string revcomp( string str ){
  string rc(str);
  int len = str.length();
  int i;

  for( i=0; i<len; i++ ){
    switch( str[i] ){
      case 'A':
        rc[ len - i - 1 ] = 'T';
        break;
      case 'T':
        rc[ len - i - 1 ] = 'A';
        break;
      case 'G':
        rc[ len - i - 1 ] = 'C';
        break;
      case 'C':
        rc[ len - i - 1 ] = 'G';
        break;
      case 'N':
        rc[ len - i - 1 ] = 'N';
        break;
      case 't':
        rc[ len - i - 1 ] = 'A';
        break;
      case 'a':
        rc[ len - i - 1 ] = 'T';
        break;
      case 'c':
        rc[ len - i - 1 ] = 'G';
        break;
      case 'g':
        rc[ len - i - 1 ] = 'C';
        break;
      default:
        printf( "Incorrect character present in string.\n" );
    }
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rsi, -0x38(%rbp)
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x41b0
movq -0x38(%rbp), %rdi
callq 0x45e0
movl %eax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0xfe4d
movq -0x38(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x4770
movq %rax, -0x50(%rbp)
jmp 0xfc6d
movq -0x50(%rbp), %rax
movsbl (%rax), %eax
addl $-0x41, %eax
movl %eax, %ecx
movq %rcx, -0x58(%rbp)
subl $0x33, %eax
ja 0xfe2b
movq -0x58(%rbp), %rax
leaq 0x1c3c7(%rip), %rcx     # 0x2c058
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x4270
jmp 0xfe6d
movq -0x48(%rbp), %rdi
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %eax
notl %eax
addl %ecx, %eax
movslq %eax, %rsi
callq 0x4770
movq %rax, -0x60(%rbp)
jmp 0xfcd0
movq -0x60(%rbp), %rax
movb $0x54, (%rax)
jmp 0xfe3d
movq -0x48(%rbp), %rdi
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %eax
notl %eax
addl %ecx, %eax
movslq %eax, %rsi
callq 0x4770
movq %rax, -0x68(%rbp)
jmp 0xfcf8
movq -0x68(%rbp), %rax
movb $0x41, (%rax)
jmp 0xfe3d
movq -0x48(%rbp), %rdi
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %eax
notl %eax
addl %ecx, %eax
movslq %eax, %rsi
callq 0x4770
movq %rax, -0x70(%rbp)
jmp 0xfd20
movq -0x70(%rbp), %rax
movb $0x43, (%rax)
jmp 0xfe3d
movq -0x48(%rbp), %rdi
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %eax
notl %eax
addl %ecx, %eax
movslq %eax, %rsi
callq 0x4770
movq %rax, -0x78(%rbp)
jmp 0xfd48
movq -0x78(%rbp), %rax
movb $0x47, (%rax)
jmp 0xfe3d
movq -0x48(%rbp), %rdi
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %eax
notl %eax
addl %ecx, %eax
movslq %eax, %rsi
callq 0x4770
movq %rax, -0x80(%rbp)
jmp 0xfd70
movq -0x80(%rbp), %rax
movb $0x4e, (%rax)
jmp 0xfe3d
movq -0x48(%rbp), %rdi
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %eax
notl %eax
addl %ecx, %eax
movslq %eax, %rsi
callq 0x4770
movq %rax, -0x88(%rbp)
jmp 0xfd9b
movq -0x88(%rbp), %rax
movb $0x41, (%rax)
jmp 0xfe3d
movq -0x48(%rbp), %rdi
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %eax
notl %eax
addl %ecx, %eax
movslq %eax, %rsi
callq 0x4770
movq %rax, -0x90(%rbp)
jmp 0xfdc9
movq -0x90(%rbp), %rax
movb $0x54, (%rax)
jmp 0xfe3d
movq -0x48(%rbp), %rdi
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %eax
notl %eax
addl %ecx, %eax
movslq %eax, %rsi
callq 0x4770
movq %rax, -0x98(%rbp)
jmp 0xfdf4
movq -0x98(%rbp), %rax
movb $0x47, (%rax)
jmp 0xfe3d
movq -0x48(%rbp), %rdi
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %eax
notl %eax
addl %ecx, %eax
movslq %eax, %rsi
callq 0x4770
movq %rax, -0xa0(%rbp)
jmp 0xfe1f
movq -0xa0(%rbp), %rax
movb $0x43, (%rax)
jmp 0xfe3d
leaq 0x1c2f6(%rip), %rdi     # 0x2c128
xorl %eax, %eax
callq 0x4070
jmp 0xfe3b
jmp 0xfe3d
jmp 0xfe3f
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xfc4e
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0xfe60
movq -0x48(%rbp), %rdi
callq 0x4270
movq -0x40(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x46c0
nopw %cs:(%rax,%rax)