#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*/ compare_lists(int *, int *, int *, int *, int, int, float *);
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ make_alilist(char *, char *, int **, int *);
float ComparePairAlignments(char *known1, char *known2, char *calc1,
                            char *calc2) {
  int *klist1;
  int *klist2;
  int *tlist1;
  int *tlist2;
  int len1, len2;
  float score;
  if (!make_alilist(calc1, calc2, &tlist1, &len1))
    return -1.0;
  if (!make_alilist(calc2, calc1, &tlist2, &len2))
    return -1.0;
  if (!make_alilist(known1, known2, &klist1, &len1))
    return -1.0;
  if (!make_alilist(known2, known1, &klist2, &len2))
    return -1.0;
  if (!compare_lists(klist1, klist2, tlist1, tlist2, len1, len2, &score))
    return -1.0;
  free(klist1);
  free(klist2);
  free(tlist1);
  free(tlist2);
  return score;
}


x86 assembly (clang, -O0):
<ComparePairAlignments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
lea    -0x40(%rbp),%rdx
lea    -0x4c(%rbp),%rcx
call   1040 <make_alilist@plt>
cmp    $0x0,%eax
jne    1178 <ComparePairAlignments+0x48>
movss  0xe92(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1276 <ComparePairAlignments+0x146>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x48(%rbp),%rdx
lea    -0x50(%rbp),%rcx
call   1040 <make_alilist@plt>
cmp    $0x0,%eax
jne    11a8 <ComparePairAlignments+0x78>
movss  0xe62(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1276 <ComparePairAlignments+0x146>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    -0x4c(%rbp),%rcx
call   1040 <make_alilist@plt>
cmp    $0x0,%eax
jne    11d8 <ComparePairAlignments+0xa8>
movss  0xe32(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1276 <ComparePairAlignments+0x146>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x38(%rbp),%rdx
lea    -0x50(%rbp),%rcx
call   1040 <make_alilist@plt>
cmp    $0x0,%eax
jne    1208 <ComparePairAlignments+0xd8>
movss  0xe02(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1276 <ComparePairAlignments+0x146>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    -0x4c(%rbp),%r8d
mov    -0x50(%rbp),%r9d
lea    -0x54(%rbp),%rax
mov    %rax,(%rsp)
call   1050 <compare_lists@plt>
cmp    $0x0,%eax
jne    1248 <ComparePairAlignments+0x118>
movss  0xdc2(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1276 <ComparePairAlignments+0x146>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
movss  -0x54(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ComparePairAlignments>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rcx,%r12
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0x20(%rsp),%rdx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <make_alilist@plt>
movss  0xe9c(%rip),%xmm0
test   %eax,%eax
je     122f <ComparePairAlignments+0xff>
lea    0x18(%rsp),%rdx
lea    0xc(%rsp),%rcx
mov    %r12,%rdi
mov    %rbx,%rsi
call   1040 <make_alilist@plt>
test   %eax,%eax
je     1227 <ComparePairAlignments+0xf7>
lea    0x30(%rsp),%rdx
lea    0x10(%rsp),%rcx
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <make_alilist@plt>
test   %eax,%eax
je     1227 <ComparePairAlignments+0xf7>
lea    0x28(%rsp),%rdx
lea    0xc(%rsp),%rcx
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <make_alilist@plt>
test   %eax,%eax
je     1227 <ComparePairAlignments+0xf7>
mov    0x30(%rsp),%rdi
mov    0x28(%rsp),%rsi
mov    0x20(%rsp),%rdx
mov    0x18(%rsp),%rcx
mov    0x10(%rsp),%r8d
mov    0xc(%rsp),%r9d
lea    0x14(%rsp),%rax
mov    %rax,(%rsp)
call   1050 <compare_lists@plt>
test   %eax,%eax
movss  0xe0b(%rip),%xmm0
je     122f <ComparePairAlignments+0xff>
mov    0x30(%rsp),%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
movss  0x14(%rsp),%xmm0
jmp    122f <ComparePairAlignments+0xff>
movss  0xdd1(%rip),%xmm0
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define float @ComparePairAlignments(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca float
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i32
%16 = alloca float
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
%17 = load i8*, i8** %8
%18 = load i8*, i8** %9
%19 = call i32 @make_alilist(i8* %17, i8* %18, i32** %12, i32* %14)
%20 = icmp ne i32 %19, 0
br i1 %20, label %22, label %21
21: ; preds = %4
store float -1.000000e+00, float* %5
br label %60
22: ; preds = %4
%23 = load i8*, i8** %9
%24 = load i8*, i8** %8
%25 = call i32 @make_alilist(i8* %23, i8* %24, i32** %13, i32* %15)
%26 = icmp ne i32 %25, 0
br i1 %26, label %28, label %27
27: ; preds = %22
store float -1.000000e+00, float* %5
br label %60
28: ; preds = %22
%29 = load i8*, i8** %6
%30 = load i8*, i8** %7
%31 = call i32 @make_alilist(i8* %29, i8* %30, i32** %10, i32* %14)
%32 = icmp ne i32 %31, 0
br i1 %32, label %34, label %33
33: ; preds = %28
store float -1.000000e+00, float* %5
br label %60
34: ; preds = %28
%35 = load i8*, i8** %7
%36 = load i8*, i8** %6
%37 = call i32 @make_alilist(i8* %35, i8* %36, i32** %11, i32* %15)
%38 = icmp ne i32 %37, 0
br i1 %38, label %40, label %39
39: ; preds = %34
store float -1.000000e+00, float* %5
br label %60
40: ; preds = %34
%41 = load i32*, i32** %10
%42 = load i32*, i32** %11
%43 = load i32*, i32** %12
%44 = load i32*, i32** %13
%45 = load i32, i32* %14
%46 = load i32, i32* %15
%47 = call i32 @compare_lists(i32* %41, i32* %42, i32* %43, i32* %44, i32 %45, i32 %46, float* %16)
%48 = icmp ne i32 %47, 0
br i1 %48, label %50, label %49
49: ; preds = %40
store float -1.000000e+00, float* %5
br label %60
50: ; preds = %40
%51 = load i32*, i32** %10
%52 = call i32 @free(i32* %51)
%53 = load i32*, i32** %11
%54 = call i32 @free(i32* %53)
%55 = load i32*, i32** %12
%56 = call i32 @free(i32* %55)
%57 = load i32*, i32** %13
%58 = call i32 @free(i32* %57)
%59 = load float, float* %16
store float %59, float* %5
br label %60
60: ; preds = %50, %49, %39, %33, %27, %21
%61 = load float, float* %5
ret float %61
}

LLVM IR (-O2):
define float @ComparePairAlignments(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca float
%12 = bitcast i32** %5 to i8*
%13 = bitcast i32** %6 to i8*
%14 = bitcast i32** %7 to i8*
%15 = bitcast i32** %8 to i8*
%16 = bitcast i32* %9 to i8*
%17 = bitcast i32* %10 to i8*
%18 = bitcast float* %11 to i8*
%19 = call i32 @make_alilist(i8* %2, i8* %3, i32** %7, i32* %9)
%20 = icmp eq i32 %19, 0
br i1 %20, label %49, label %21
21: ; preds = %4
%22 = call i32 @make_alilist(i8* %3, i8* %2, i32** %8, i32* %10)
%23 = icmp eq i32 %22, 0
br i1 %23, label %49, label %24
24: ; preds = %21
%25 = call i32 @make_alilist(i8* %0, i8* %1, i32** %5, i32* %9)
%26 = icmp eq i32 %25, 0
br i1 %26, label %49, label %27
27: ; preds = %24
%28 = call i32 @make_alilist(i8* %1, i8* %0, i32** %6, i32* %10)
%29 = icmp eq i32 %28, 0
br i1 %29, label %49, label %30
30: ; preds = %27
%31 = load i32*, i32** %5
%32 = load i32*, i32** %6
%33 = load i32*, i32** %7
%34 = load i32*, i32** %8
%35 = load i32, i32* %9
%36 = load i32, i32* %10
%37 = call i32 @compare_lists(i32* %31, i32* %32, i32* %33, i32* %34, i32 %35, i32 %36, float* %11)
%38 = icmp eq i32 %37, 0
br i1 %38, label %49, label %39
39: ; preds = %30
%40 = load i32*, i32** %5
%41 = call i32 @free(i32* %40)
%42 = load i32*, i32** %6
%43 = call i32 @free(i32* %42)
%44 = load i32*, i32** %7
%45 = call i32 @free(i32* %44)
%46 = load i32*, i32** %8
%47 = call i32 @free(i32* %46)
%48 = load float, float* %11
br label %49
49: ; preds = %30, %27, %24, %21, %4, %39
%50 = phi float [ %48, %39 ], [ -1.000000e+00, %4 ], [ -1.000000e+00, %21 ], [ -1.000000e+00, %24 ], [ -1.000000e+00, %27 ], [ -1.000000e+00, %30 ]
ret float %50
}