#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 libGlobalAlign(unsigned char *, unsigned char *, unsigned char *);
int libLevenshteinDistFunc(unsigned char *, unsigned char *);
double libcgContentFunc(unsigned char *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  unsigned char *seq1, *seq2, *align;
  int int_result;
  double dbl_result;
  seq1 = "AAAAATCATGCATGCTA";
  seq2 = "CAAGCTAGGCATGATCC";
  printf("Sequence 1: %s\n", seq1);
  dbl_result = libcgContentFunc(seq1);
  printf("C+G Content : %f\n", dbl_result);
  printf("Sequence 2: %s\n", seq2);
  int_result = libLevenshteinDistFunc(seq1, seq2);
  printf("Levenshtein distance : %d\n", int_result);
  int_result = libGlobalAlign(seq1, seq2, align);
  printf("Global align score : %d\n", int_result);
  printf("Alignment %s\n", align);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xeb1(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1050 <libcgContentFunc@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
lea    0xea3(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <libLevenshteinDistFunc@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1060 <libGlobalAlign@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed9(%rip),%rdi
lea    0xeae(%rip),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
call   1050 <libcgContentFunc@plt>
lea    0xec9(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0xe92(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <libLevenshteinDistFunc@plt>
lea    0xeba(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <libGlobalAlign@plt>
lea    0xeba(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [18 x i8] c"AAAAATCATGCATGCTA\00"
@.str.1 = [18 x i8] c"CAAGCTAGGCATGATCC\00"
@.str.2 = [16 x i8] c"Sequence 1: %s\0A\00"
@.str.3 = [18 x i8] c"C+G Content : %f\0A\00"
@.str.4 = [16 x i8] c"Sequence 2: %s\0A\00"
@.str.5 = [27 x i8] c"Levenshtein distance : %d\0A\00"
@.str.6 = [25 x i8] c"Global align score : %d\0A\00"
@.str.7 = [14 x i8] c"Alignment %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca double
store i32 0, i32* %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8** %3
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %2
%10 = call double @libcgContentFunc(i8* %9)
store double %10, double* %6
%11 = load double, double* %6
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), double %11)
%13 = load i8*, i8** %3
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* %13)
%15 = load i8*, i8** %2
%16 = load i8*, i8** %3
%17 = call i32 @libLevenshteinDistFunc(i8* %15, i8* %16)
store i32 %17, i32* %5
%18 = load i32, i32* %5
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), i32 %18)
%20 = load i8*, i8** %2
%21 = load i8*, i8** %3
%22 = load i8*, i8** %4
%23 = call i32 @libGlobalAlign(i8* %20, i8* %21, i8* %22)
store i32 %23, i32* %5
%24 = load i32, i32* %5
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 %24)
%26 = load i8*, i8** %4
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* %26)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"AAAAATCATGCATGCTA\00"
@.str.1 = [18 x i8] c"CAAGCTAGGCATGATCC\00"
@.str.2 = [16 x i8] c"Sequence 1: %s\0A\00"
@.str.3 = [18 x i8] c"C+G Content : %f\0A\00"
@.str.4 = [16 x i8] c"Sequence 2: %s\0A\00"
@.str.5 = [27 x i8] c"Levenshtein distance : %d\0A\00"
@.str.6 = [25 x i8] c"Global align score : %d\0A\00"
@.str.7 = [14 x i8] c"Alignment %s\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = tail call double @libcgContentFunc(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), double %2)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @libLevenshteinDistFunc(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), i32 %5)
%7 = tail call i32 @libGlobalAlign(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* undef)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 %7)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* undef)
ret i32 0
}