#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*/ pe(char *, char *, char *, char *);
void compute(int flag, char seqA_buf[][128 * 256 / 2],
             char seqB_buf[][128 * 256 / 2],
             char alignedA_buf[][(128 + 128) * 256 / 2],
             char alignedB_buf[][(128 + 128) * 256 / 2], int num_jobs) {
#pragma HLS inline off
  if (flag) {
    for (unsigned j = 0; j < 2; j++) {
#pragma HLS unroll
      pe(seqA_buf[j], seqB_buf[j], alignedA_buf[j], alignedB_buf[j]);
    }
  }
}


x86 assembly (clang, -O0):
<compute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     119a <compute+0x8a>
movl   $0x0,-0x30(%rbp)
cmpl   $0x2,-0x30(%rbp)
jae    1195 <compute+0x85>
mov    -0x10(%rbp),%rdi
mov    -0x30(%rbp),%eax
shl    $0xe,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
mov    -0x30(%rbp),%eax
shl    $0xe,%rax
add    %rax,%rsi
mov    -0x20(%rbp),%rdx
mov    -0x30(%rbp),%eax
shl    $0xf,%rax
add    %rax,%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%eax
shl    $0xf,%rax
add    %rax,%rcx
call   1030 <pe@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1140 <compute+0x30>
jmp    119a <compute+0x8a>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute>:
test   %edi,%edi
je     1171 <compute+0x61>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %r8,%rcx
call   1030 <pe@plt>
add    $0x4000,%rbx
add    $0x4000,%r12
add    $0x8000,%r15
add    $0x8000,%r14
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <pe@plt>
ret

LLVM IR (-O0):
define void @compute(i32 %0, [16384 x i8]* %1, [16384 x i8]* %2, [32768 x i8]* %3, [32768 x i8]* %4, i32 %5) {
%7 = alloca i32
%8 = alloca [16384 x i8]*
%9 = alloca [16384 x i8]*
%10 = alloca [32768 x i8]*
%11 = alloca [32768 x i8]*
%12 = alloca i32
%13 = alloca i32
store i32 %0, i32* %7
store [16384 x i8]* %1, [16384 x i8]** %8
store [16384 x i8]* %2, [16384 x i8]** %9
store [32768 x i8]* %3, [32768 x i8]** %10
store [32768 x i8]* %4, [32768 x i8]** %11
store i32 %5, i32* %12
%14 = load i32, i32* %7
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %46
16: ; preds = %6
store i32 0, i32* %13
br label %17
17: ; preds = %42, %16
%18 = load i32, i32* %13
%19 = icmp ult i32 %18, 2
br i1 %19, label %20, label %45
20: ; preds = %17
%21 = load [16384 x i8]*, [16384 x i8]** %8
%22 = load i32, i32* %13
%23 = zext i32 %22 to i64
%24 = getelementptr inbounds [16384 x i8], [16384 x i8]* %21, i64 %23
%25 = getelementptr inbounds [16384 x i8], [16384 x i8]* %24, i64 0, i64 0
%26 = load [16384 x i8]*, [16384 x i8]** %9
%27 = load i32, i32* %13
%28 = zext i32 %27 to i64
%29 = getelementptr inbounds [16384 x i8], [16384 x i8]* %26, i64 %28
%30 = getelementptr inbounds [16384 x i8], [16384 x i8]* %29, i64 0, i64 0
%31 = load [32768 x i8]*, [32768 x i8]** %10
%32 = load i32, i32* %13
%33 = zext i32 %32 to i64
%34 = getelementptr inbounds [32768 x i8], [32768 x i8]* %31, i64 %33
%35 = getelementptr inbounds [32768 x i8], [32768 x i8]* %34, i64 0, i64 0
%36 = load [32768 x i8]*, [32768 x i8]** %11
%37 = load i32, i32* %13
%38 = zext i32 %37 to i64
%39 = getelementptr inbounds [32768 x i8], [32768 x i8]* %36, i64 %38
%40 = getelementptr inbounds [32768 x i8], [32768 x i8]* %39, i64 0, i64 0
%41 = call i32 @pe(i8* %25, i8* %30, i8* %35, i8* %40)
br label %42
42: ; preds = %20
%43 = load i32, i32* %13
%44 = add i32 %43, 1
store i32 %44, i32* %13
br label %17
45: ; preds = %17
br label %46
46: ; preds = %45, %6
ret void
}

LLVM IR (-O2):
define void @compute(i32 %0, [16384 x i8]* %1, [16384 x i8]* %2, [32768 x i8]* %3, [32768 x i8]* %4, i32 %5) {
%7 = icmp eq i32 %0, 0
br i1 %7, label %19, label %8
8: ; preds = %6
%9 = getelementptr inbounds [16384 x i8], [16384 x i8]* %1, i64 0, i64 0
%10 = getelementptr inbounds [16384 x i8], [16384 x i8]* %2, i64 0, i64 0
%11 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [32768 x i8], [32768 x i8]* %4, i64 0, i64 0
%13 = tail call i32 @pe(i8* %9, i8* %10, i8* %11, i8* %12)
%14 = getelementptr inbounds [16384 x i8], [16384 x i8]* %1, i64 1, i64 0
%15 = getelementptr inbounds [16384 x i8], [16384 x i8]* %2, i64 1, i64 0
%16 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 1, i64 0
%17 = getelementptr inbounds [32768 x i8], [32768 x i8]* %4, i64 1, i64 0
%18 = tail call i32 @pe(i8* %14, i8* %15, i8* %16, i8* %17)
br label %19
19: ; preds = %8, %6
ret void
}