#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*/ init_matrix(int, int, int **);
int /*<<< orphan*/ init_standard_needleman_wunsch(int, int, int **);
int /*<<< orphan*/ process_needleman_wunsch(int, int, int **, char *, char *);
scalar_t__ strlen(char *);
int *needleman_wunsch(int values[255][255], char *secuence1, char *secuence2) {
  int c_size, r_size;
  c_size = (int)strlen(secuence1) + 1;
  r_size = ((int)strlen(secuence2)) + 1;
  init_matrix(c_size, r_size, values);
  init_standard_needleman_wunsch(c_size, r_size, values);
  process_needleman_wunsch(c_size, r_size, values, secuence1, secuence2);
}


x86 assembly (clang, -O0):
<needleman_wunsch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x28(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1050 <init_matrix@plt>
mov    -0x24(%rbp),%edi
mov    -0x28(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1060 <init_standard_needleman_wunsch@plt>
mov    -0x24(%rbp),%edi
mov    -0x28(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
call   1040 <process_needleman_wunsch@plt>
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<needleman_wunsch>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%ebp
mov    %r14,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%ebx
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r12,%rdx
call   1050 <init_matrix@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r12,%rdx
call   1060 <init_standard_needleman_wunsch@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <process_needleman_wunsch@plt>

LLVM IR (-O0):
define i32* @needleman_wunsch([255 x i32]* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca [255 x i32]*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store [255 x i32]* %0, [255 x i32]** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%10 = load i8*, i8** %6
%11 = call i64 @strlen(i8* %10)
%12 = trunc i64 %11 to i32
%13 = add nsw i32 %12, 1
store i32 %13, i32* %8
%14 = load i8*, i8** %7
%15 = call i64 @strlen(i8* %14)
%16 = trunc i64 %15 to i32
%17 = add nsw i32 %16, 1
store i32 %17, i32* %9
%18 = load i32, i32* %8
%19 = load i32, i32* %9
%20 = load [255 x i32]*, [255 x i32]** %5
%21 = bitcast [255 x i32]* %20 to i32**
%22 = call i32 @init_matrix(i32 %18, i32 %19, i32** %21)
%23 = load i32, i32* %8
%24 = load i32, i32* %9
%25 = load [255 x i32]*, [255 x i32]** %5
%26 = bitcast [255 x i32]* %25 to i32**
%27 = call i32 @init_standard_needleman_wunsch(i32 %23, i32 %24, i32** %26)
%28 = load i32, i32* %8
%29 = load i32, i32* %9
%30 = load [255 x i32]*, [255 x i32]** %5
%31 = bitcast [255 x i32]* %30 to i32**
%32 = load i8*, i8** %6
%33 = load i8*, i8** %7
%34 = call i32 @process_needleman_wunsch(i32 %28, i32 %29, i32** %31, i8* %32, i8* %33)
%35 = load i32*, i32** %4
ret i32* %35
}

LLVM IR (-O2):
define noalias i32* @needleman_wunsch([255 x i32]* %0, i8* %1, i8* %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = trunc i64 %4 to i32
%6 = add nsw i32 %5, 1
%7 = tail call i64 @strlen(i8* dereferenceable(1) %2)
%8 = trunc i64 %7 to i32
%9 = add nsw i32 %8, 1
%10 = bitcast [255 x i32]* %0 to i32**
%11 = tail call i32 @init_matrix(i32 %6, i32 %9, i32** %10)
%12 = tail call i32 @init_standard_needleman_wunsch(i32 %6, i32 %9, i32** %10)
%13 = tail call i32 @process_needleman_wunsch(i32 %6, i32 %9, i32** %10, i8* %1, i8* %2)
ret i32* undef
}