#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*/ printf(char *, char *);
int /*<<< orphan*/ revcomp_nuc(char *);
char *seq_guess_type(char *);
int main() {
  char seq[] = "ACGACATCGGACTGACactgactgacatgcactg";
  printf("seq type: %s\n", seq_guess_type(seq));
  printf("before revcomp: %s\n", seq);
  revcomp_nuc(seq);
  printf("after revcomp:  %s\n", seq);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xea6(%rip),%rsi
mov    $0x23,%edx
call   1050 <memcpy@plt>
lea    -0x30(%rbp),%rdi
call   1060 <seq_guess_type@plt>
mov    %rax,%rsi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1040 <revcomp_nuc@plt>
lea    -0x30(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb8(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x677463,0x1f(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <seq_guess_type@plt>
lea    0xebd(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <revcomp_nuc@plt>
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.seq = [35 x i8] c"ACGACATCGGACTGACactgactgacatgcactg\00"
@.str = [14 x i8] c"seq type: %s\0A\00"
@.str.1 = [20 x i8] c"before revcomp: %s\0A\00"
@.str.2 = [20 x i8] c"after revcomp: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [35 x i8]
store i32 0, i32* %1
%3 = bitcast [35 x i8]* %2 to i8*
%4 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 0
%5 = call i8* @seq_guess_type(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 0
%10 = call i32 @revcomp_nuc(i8* %9)
%11 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.seq = [35 x i8] c"ACGACATCGGACTGACactgactgacatgcactg\00"
@.str = [14 x i8] c"seq type: %s\0A\00"
@.str.1 = [20 x i8] c"before revcomp: %s\0A\00"
@.str.2 = [20 x i8] c"after revcomp: %s\0A\00"
define i32 @main() {
%1 = alloca [35 x i8]
%2 = getelementptr inbounds [35 x i8], [35 x i8]* %1, i64 0, i64 0
%3 = call i8* @seq_guess_type(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%6 = call i32 @revcomp_nuc(i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 0
}