#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*/ needwun(char *, char *, char *, char *);
void needwun_tiling(char *SEQA, char *SEQB, char *alignedA, char *alignedB) {
  for (int i = 0; i < ((512) / (64)); i++) {
    needwun(SEQA + i * 128, SEQB + i * 128, alignedA + i * (128 + 128),
            alignedB + i * (128 + 128));
  }
  return;
}


x86 assembly (clang, -O0):
<needwun_tiling>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x8,-0x24(%rbp)
jge    1188 <needwun_tiling+0x78>
mov    -0x8(%rbp),%rdi
mov    -0x24(%rbp),%eax
shl    $0x7,%eax
cltq
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%eax
shl    $0x7,%eax
cltq
add    %rax,%rsi
mov    -0x18(%rbp),%rdx
mov    -0x24(%rbp),%eax
shl    $0x8,%eax
cltq
add    %rax,%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%eax
shl    $0x8,%eax
cltq
add    %rax,%rcx
call   1030 <needwun@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    112f <needwun_tiling+0x1f>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<needwun_tiling>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
call   1030 <needwun@plt>
lea    0x80(%rbx),%rdi
lea    0x80(%r12),%rsi
lea    0x100(%r15),%rdx
lea    0x100(%r14),%rcx
call   1030 <needwun@plt>
lea    0x100(%rbx),%rdi
lea    0x100(%r12),%rsi
lea    0x200(%r15),%rdx
lea    0x200(%r14),%rcx
call   1030 <needwun@plt>
lea    0x180(%rbx),%rdi
lea    0x180(%r12),%rsi
lea    0x300(%r15),%rdx
lea    0x300(%r14),%rcx
call   1030 <needwun@plt>
lea    0x200(%rbx),%rdi
lea    0x200(%r12),%rsi
lea    0x400(%r15),%rdx
lea    0x400(%r14),%rcx
call   1030 <needwun@plt>
lea    0x280(%rbx),%rdi
lea    0x280(%r12),%rsi
lea    0x500(%r15),%rdx
lea    0x500(%r14),%rcx
call   1030 <needwun@plt>
lea    0x300(%rbx),%rdi
lea    0x300(%r12),%rsi
lea    0x600(%r15),%rdx
lea    0x600(%r14),%rcx
call   1030 <needwun@plt>
add    $0x380,%rbx
add    $0x380,%r12
add    $0x700,%r15
add    $0x700,%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 <needwun@plt>

LLVM IR (-O0):
define void @needwun_tiling(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
store i32 0, i32* %9
br label %10
10: ; preds = %35, %4
%11 = load i32, i32* %9
%12 = icmp slt i32 %11, 8
br i1 %12, label %13, label %38
13: ; preds = %10
%14 = load i8*, i8** %5
%15 = load i32, i32* %9
%16 = mul nsw i32 %15, 128
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %14, i64 %17
%19 = load i8*, i8** %6
%20 = load i32, i32* %9
%21 = mul nsw i32 %20, 128
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %19, i64 %22
%24 = load i8*, i8** %7
%25 = load i32, i32* %9
%26 = mul nsw i32 %25, 256
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %24, i64 %27
%29 = load i8*, i8** %8
%30 = load i32, i32* %9
%31 = mul nsw i32 %30, 256
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i8, i8* %29, i64 %32
%34 = call i32 @needwun(i8* %18, i8* %23, i8* %28, i8* %33)
br label %35
35: ; preds = %13
%36 = load i32, i32* %9
%37 = add nsw i32 %36, 1
store i32 %37, i32* %9
br label %10
38: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @needwun_tiling(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @needwun(i8* %0, i8* %1, i8* %2, i8* %3)
%6 = getelementptr inbounds i8, i8* %0, i64 128
%7 = getelementptr inbounds i8, i8* %1, i64 128
%8 = getelementptr inbounds i8, i8* %2, i64 256
%9 = getelementptr inbounds i8, i8* %3, i64 256
%10 = tail call i32 @needwun(i8* %6, i8* %7, i8* %8, i8* %9)
%11 = getelementptr inbounds i8, i8* %0, i64 256
%12 = getelementptr inbounds i8, i8* %1, i64 256
%13 = getelementptr inbounds i8, i8* %2, i64 512
%14 = getelementptr inbounds i8, i8* %3, i64 512
%15 = tail call i32 @needwun(i8* %11, i8* %12, i8* %13, i8* %14)
%16 = getelementptr inbounds i8, i8* %0, i64 384
%17 = getelementptr inbounds i8, i8* %1, i64 384
%18 = getelementptr inbounds i8, i8* %2, i64 768
%19 = getelementptr inbounds i8, i8* %3, i64 768
%20 = tail call i32 @needwun(i8* %16, i8* %17, i8* %18, i8* %19)
%21 = getelementptr inbounds i8, i8* %0, i64 512
%22 = getelementptr inbounds i8, i8* %1, i64 512
%23 = getelementptr inbounds i8, i8* %2, i64 1024
%24 = getelementptr inbounds i8, i8* %3, i64 1024
%25 = tail call i32 @needwun(i8* %21, i8* %22, i8* %23, i8* %24)
%26 = getelementptr inbounds i8, i8* %0, i64 640
%27 = getelementptr inbounds i8, i8* %1, i64 640
%28 = getelementptr inbounds i8, i8* %2, i64 1280
%29 = getelementptr inbounds i8, i8* %3, i64 1280
%30 = tail call i32 @needwun(i8* %26, i8* %27, i8* %28, i8* %29)
%31 = getelementptr inbounds i8, i8* %0, i64 768
%32 = getelementptr inbounds i8, i8* %1, i64 768
%33 = getelementptr inbounds i8, i8* %2, i64 1536
%34 = getelementptr inbounds i8, i8* %3, i64 1536
%35 = tail call i32 @needwun(i8* %31, i8* %32, i8* %33, i8* %34)
%36 = getelementptr inbounds i8, i8* %0, i64 896
%37 = getelementptr inbounds i8, i8* %1, i64 896
%38 = getelementptr inbounds i8, i8* %2, i64 1792
%39 = getelementptr inbounds i8, i8* %3, i64 1792
%40 = tail call i32 @needwun(i8* %36, i8* %37, i8* %38, i8* %39)
ret void
}