#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 */
typedef int /*<<< orphan*/ cl_platform_id;
typedef int /*<<< orphan*/ cl_device_id;

/* Variables and functions */
int /*<<< orphan*/ create_program(char *, char *);
char *extract_subsequence(int **, char *, scalar_t__, scalar_t__);
int /*<<< orphan*/ init_ocl(int /*<<< orphan*/);
int **make_lcs_table(char *, scalar_t__, char *, scalar_t__);
int *methode1(char *, char *, scalar_t__, scalar_t__);
int *methode2(char *, char *, scalar_t__, scalar_t__);
int *methode3(char *, char *, scalar_t__, scalar_t__);
int /*<<< orphan*/ ocl_select_device(int /*<<< orphan*/);
int /*<<< orphan*/ ocl_select_platform();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ read_input_strings(char *, char **, char **);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
scalar_t__ strlen(char *);
int table_2d_check_1d(int **, int *, scalar_t__, scalar_t__);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ time_measure_start(char *);
int /*<<< orphan*/ time_measure_stop_and_print(char *);
int /*<<< orphan*/ usage(char *);
int main(int argc, char *argv[]) {
  if (argc < 2) {
    usage(argv[0]);
    return 1;
  }
  char *s1;
  char *s2;
  read_input_strings(argv[1], &s1, &s2);
  printf("String 1: %s\n", s1);
  printf("String 2: %s\n", s2);
  srand(time(NULL));
  cl_platform_id platform = ocl_select_platform();
  cl_device_id device = ocl_select_device(platform);
  init_ocl(device);
  create_program("kernel.cl", "");
  int **table;
  char *subsequence;
  printf("Make table\n");
  printf("CPU: \n");
  time_measure_start("lcs_table_CPU");
  table = make_lcs_table(s1, strlen(s1), s2, strlen(s2));
  time_measure_stop_and_print("lcs_table_CPU");
  int *table_1D;
  int *table_1D_2;
  int *table_1D_3;
  printf("GPU methode 1: \n");
  time_measure_start("lcs_table_gpu");
  table_1D = methode1(s2, s1, strlen(s2), strlen(s1));
  time_measure_stop_and_print("lcs_table_gpu");
  printf("GPU methode 2: \n");
  time_measure_start("lcs_table_gpu_2");
  table_1D_2 = methode2(s2, s1, strlen(s2), strlen(s1));
  time_measure_stop_and_print("lcs_table_gpu_2");
  printf("GPU methode 3: \n");
  time_measure_start("lcs_table_gpu_7");
  table_1D_3 = methode3(s2, s1, strlen(s2), strlen(s1));
  time_measure_stop_and_print("lcs_table_gpu_7");
  time_measure_start("extract_subsequence");
  subsequence = extract_subsequence(table, s1, strlen(s1), strlen(s2));
  time_measure_stop_and_print("extract_subsequence");
  printf("LCS='%s'\n", subsequence);
  printf("%i\n",
         table_2d_check_1d(table, table_1D_2, strlen(s1) + 1, strlen(s2) + 1));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    125b <main+0x3b>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1110 <usage@plt>
movl   $0x1,-0x4(%rbp)
jmp    1574 <main+0x354>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1080 <read_input_strings@plt>
mov    -0x18(%rbp),%rsi
lea    0xd85(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xd81(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   10d0 <time@plt>
mov    %eax,%edi
call   10a0 <srand@plt>
mov    $0x0,%al
call   1120 <ocl_select_platform@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
call   1130 <ocl_select_device@plt>
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%edi
call   1070 <init_ocl@plt>
lea    0xd54(%rip),%rdi
lea    0xd88(%rip),%rsi
call   10e0 <create_program@plt>
lea    0xd4b(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
lea    0xd49(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
lea    0xd42(%rip),%rdi
call   10f0 <time_measure_start@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0xe0(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,-0xd8(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    -0x20(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0xe0(%rbp),%rdi
mov    -0xd8(%rbp),%rsi
mov    -0xd0(%rbp),%rdx
mov    %rax,%rcx
call   1140 <make_lcs_table@plt>
mov    %rax,-0x30(%rbp)
lea    0xce6(%rip),%rdi
call   1030 <time_measure_stop_and_print@plt>
lea    0xce8(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
lea    0xceb(%rip),%rdi
call   10f0 <time_measure_start@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0xc8(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x20(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,-0xb8(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0xc8(%rbp),%rdi
mov    -0xc0(%rbp),%rsi
mov    -0xb8(%rbp),%rdx
mov    %rax,%rcx
call   1040 <methode1@plt>
mov    %rax,-0x40(%rbp)
lea    0xc8f(%rip),%rdi
call   1030 <time_measure_stop_and_print@plt>
lea    0xc91(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
lea    0xc94(%rip),%rdi
call   10f0 <time_measure_start@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x20(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,-0xa0(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0xb0(%rbp),%rdi
mov    -0xa8(%rbp),%rsi
mov    -0xa0(%rbp),%rdx
mov    %rax,%rcx
call   1100 <methode2@plt>
mov    %rax,-0x48(%rbp)
lea    0xc38(%rip),%rdi
call   1030 <time_measure_stop_and_print@plt>
lea    0xc3c(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
lea    0xc3f(%rip),%rdi
call   10f0 <time_measure_start@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x20(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,-0x88(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x98(%rbp),%rdi
mov    -0x90(%rbp),%rsi
mov    -0x88(%rbp),%rdx
mov    %rax,%rcx
call   1050 <methode3@plt>
mov    %rax,-0x50(%rbp)
lea    0xbe3(%rip),%rdi
call   1030 <time_measure_stop_and_print@plt>
lea    0xbe7(%rip),%rdi
call   10f0 <time_measure_start@plt>
mov    -0x30(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,-0x70(%rbp)
mov    -0x20(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x80(%rbp),%rdi
mov    -0x78(%rbp),%rsi
mov    -0x70(%rbp),%rdx
mov    %rax,%rcx
call   10b0 <extract_subsequence@plt>
mov    %rax,-0x38(%rbp)
lea    0xb9d(%rip),%rdi
call   1030 <time_measure_stop_and_print@plt>
mov    -0x38(%rbp),%rsi
lea    0xba1(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    -0x30(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
mov    -0x20(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x68(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    %rax,%rcx
add    $0x1,%rcx
call   10c0 <table_2d_check_1d@plt>
mov    %eax,%esi
lea    0xb59(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
cmp    $0x1,%edi
jg     1255 <main+0x25>
mov    (%rsi),%rdi
call   1120 <usage@plt>
mov    $0x1,%eax
jmp    14ac <main+0x27c>
mov    0x8(%rsi),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1090 <read_input_strings@plt>
mov    0x10(%rsp),%rsi
lea    0xd8c(%rip),%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
mov    0x8(%rsp),%rsi
lea    0xd87(%rip),%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
xor    %edi,%edi
call   10e0 <time@plt>
mov    %eax,%edi
call   10b0 <srand@plt>
xor    %eax,%eax
call   1130 <ocl_select_platform@plt>
mov    %eax,%edi
call   1140 <ocl_select_device@plt>
mov    %eax,%edi
call   1080 <init_ocl@plt>
lea    0xd64(%rip),%rdi
lea    0xdc0(%rip),%rsi
call   10f0 <create_program@plt>
lea    0xdb9(%rip),%rdi
call   1030 <puts@plt>
lea    0xdb8(%rip),%rdi
call   1030 <puts@plt>
lea    0xd43(%rip),%r12
mov    %r12,%rdi
call   1100 <time_measure_start@plt>
mov    0x10(%rsp),%r13
mov    %r13,%rdi
call   1070 <strlen@plt>
mov    %rax,%r15
mov    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1070 <strlen@plt>
mov    %r13,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1150 <make_lcs_table@plt>
mov    %rax,%r15
mov    %r12,%rdi
call   1040 <time_measure_stop_and_print@plt>
lea    0xd6a(%rip),%rdi
call   1030 <puts@plt>
lea    0xcfd(%rip),%r12
mov    %r12,%rdi
call   1100 <time_measure_start@plt>
mov    0x8(%rsp),%rbx
mov    0x10(%rsp),%r13
mov    %rbx,%rdi
call   1070 <strlen@plt>
mov    %rax,%rbp
mov    %r13,%rdi
call   1070 <strlen@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %rbp,%rdx
mov    %rax,%rcx
call   1050 <methode1@plt>
mov    %r12,%rdi
call   1040 <time_measure_stop_and_print@plt>
lea    0xd29(%rip),%rdi
call   1030 <puts@plt>
lea    0xcba(%rip),%r12
mov    %r12,%rdi
call   1100 <time_measure_start@plt>
mov    0x8(%rsp),%rbx
mov    0x10(%rsp),%rbp
mov    %rbx,%rdi
call   1070 <strlen@plt>
mov    %rax,%r13
mov    %rbp,%rdi
call   1070 <strlen@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r13,%rdx
mov    %rax,%rcx
call   1110 <methode2@plt>
mov    %rax,%r13
mov    %r12,%rdi
call   1040 <time_measure_stop_and_print@plt>
lea    0xce5(%rip),%rdi
call   1030 <puts@plt>
lea    0xc76(%rip),%r12
mov    %r12,%rdi
call   1100 <time_measure_start@plt>
mov    0x8(%rsp),%rbx
mov    0x10(%rsp),%rbp
mov    %rbx,%rdi
call   1070 <strlen@plt>
mov    %rax,%r14
mov    %rbp,%rdi
call   1070 <strlen@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
mov    %rax,%rcx
call   1060 <methode3@plt>
mov    %r12,%rdi
call   1040 <time_measure_stop_and_print@plt>
lea    0xc41(%rip),%r14
mov    %r14,%rdi
call   1100 <time_measure_start@plt>
mov    0x10(%rsp),%rbp
mov    %rbp,%rdi
call   1070 <strlen@plt>
mov    %rax,%rbx
mov    0x8(%rsp),%rdi
call   1070 <strlen@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %rax,%rcx
call   10c0 <extract_subsequence@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <time_measure_stop_and_print@plt>
lea    0xc10(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   10a0 <printf@plt>
mov    0x10(%rsp),%rdi
call   1070 <strlen@plt>
lea    0x1(%rax),%rbx
mov    0x8(%rsp),%rdi
call   1070 <strlen@plt>
lea    0x1(%rax),%rcx
mov    %r15,%rdi
mov    %r13,%rsi
mov    %rbx,%rdx
call   10d0 <table_2d_check_1d@plt>
lea    0xbdf(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10a0 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"String 1: %s\0A\00"
@.str.1 = [14 x i8] c"String 2: %s\0A\00"
@.str.2 = [10 x i8] c"kernel.cl\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [12 x i8] c"Make table\0A\00"
@.str.5 = [7 x i8] c"CPU: \0A\00"
@.str.6 = [14 x i8] c"lcs_table_CPU\00"
@.str.7 = [17 x i8] c"GPU methode 1: \0A\00"
@.str.8 = [14 x i8] c"lcs_table_gpu\00"
@.str.9 = [17 x i8] c"GPU methode 2: \0A\00"
@.str.10 = [16 x i8] c"lcs_table_gpu_2\00"
@.str.11 = [17 x i8] c"GPU methode 3: \0A\00"
@.str.12 = [16 x i8] c"lcs_table_gpu_7\00"
@.str.13 = [20 x i8] c"extract_subsequence\00"
@.str.14 = [10 x i8] c"LCS='%s'\0A\00"
@.str.15 = [4 x i8] c"%i\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32**
%11 = alloca i8*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = load i32, i32* %4
%16 = icmp slt i32 %15, 2
br i1 %16, label %17, label %22
17: ; preds = %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 @usage(i8* %20)
store i32 1, i32* %3
br label %101
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32 @read_input_strings(i8* %25, i8** %6, i8** %7)
%27 = load i8*, i8** %6
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %27)
%29 = load i8*, i8** %7
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %29)
%31 = call i32 @time(i32* null)
%32 = call i32 @srand(i32 %31)
%33 = call i32 (...) @ocl_select_platform()
store i32 %33, i32* %8
%34 = load i32, i32* %8
%35 = call i32 @ocl_select_device(i32 %34)
store i32 %35, i32* %9
%36 = load i32, i32* %9
%37 = call i32 @init_ocl(i32 %36)
%38 = call i32 @create_program(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%41 = call i32 @time_measure_start(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
%42 = load i8*, i8** %6
%43 = load i8*, i8** %6
%44 = call i64 @strlen(i8* %43)
%45 = load i8*, i8** %7
%46 = load i8*, i8** %7
%47 = call i64 @strlen(i8* %46)
%48 = call i32** @make_lcs_table(i8* %42, i64 %44, i8* %45, i64 %47)
store i32** %48, i32*** %10
%49 = call i32 @time_measure_stop_and_print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%51 = call i32 @time_measure_start(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
%52 = load i8*, i8** %7
%53 = load i8*, i8** %6
%54 = load i8*, i8** %7
%55 = call i64 @strlen(i8* %54)
%56 = load i8*, i8** %6
%57 = call i64 @strlen(i8* %56)
%58 = call i32* @methode1(i8* %52, i8* %53, i64 %55, i64 %57)
store i32* %58, i32** %12
%59 = call i32 @time_measure_stop_and_print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0))
%61 = call i32 @time_measure_start(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
%62 = load i8*, i8** %7
%63 = load i8*, i8** %6
%64 = load i8*, i8** %7
%65 = call i64 @strlen(i8* %64)
%66 = load i8*, i8** %6
%67 = call i64 @strlen(i8* %66)
%68 = call i32* @methode2(i8* %62, i8* %63, i64 %65, i64 %67)
store i32* %68, i32** %13
%69 = call i32 @time_measure_stop_and_print(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
%71 = call i32 @time_measure_start(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%72 = load i8*, i8** %7
%73 = load i8*, i8** %6
%74 = load i8*, i8** %7
%75 = call i64 @strlen(i8* %74)
%76 = load i8*, i8** %6
%77 = call i64 @strlen(i8* %76)
%78 = call i32* @methode3(i8* %72, i8* %73, i64 %75, i64 %77)
store i32* %78, i32** %14
%79 = call i32 @time_measure_stop_and_print(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%80 = call i32 @time_measure_start(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%81 = load i32**, i32*** %10
%82 = load i8*, i8** %6
%83 = load i8*, i8** %6
%84 = call i64 @strlen(i8* %83)
%85 = load i8*, i8** %7
%86 = call i64 @strlen(i8* %85)
%87 = call i8* @extract_subsequence(i32** %81, i8* %82, i64 %84, i64 %86)
store i8* %87, i8** %11
%88 = call i32 @time_measure_stop_and_print(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%89 = load i8*, i8** %11
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i8* %89)
%91 = load i32**, i32*** %10
%92 = load i32*, i32** %13
%93 = load i8*, i8** %6
%94 = call i64 @strlen(i8* %93)
%95 = add nsw i64 %94, 1
%96 = load i8*, i8** %7
%97 = call i64 @strlen(i8* %96)
%98 = add nsw i64 %97, 1
%99 = call i32 @table_2d_check_1d(i32** %91, i32* %92, i64 %95, i64 %98)
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i32 %99)
br label %101
101: ; preds = %22, %17
%102 = load i32, i32* %3
ret i32 %102
}

LLVM IR (-O2):
@.str = [14 x i8] c"String 1: %s\0A\00"
@.str.1 = [14 x i8] c"String 2: %s\0A\00"
@.str.2 = [10 x i8] c"kernel.cl\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.6 = [14 x i8] c"lcs_table_CPU\00"
@.str.8 = [14 x i8] c"lcs_table_gpu\00"
@.str.10 = [16 x i8] c"lcs_table_gpu_2\00"
@.str.12 = [16 x i8] c"lcs_table_gpu_7\00"
@.str.13 = [20 x i8] c"extract_subsequence\00"
@.str.14 = [10 x i8] c"LCS='%s'\0A\00"
@.str.15 = [4 x i8] c"%i\0A\00"
@str = [11 x i8] c"Make table\00"
@str.16 = [6 x i8] c"CPU: \00"
@str.17 = [16 x i8] c"GPU methode 1: \00"
@str.18 = [16 x i8] c"GPU methode 2: \00"
@str.19 = [16 x i8] c"GPU methode 3: \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = icmp slt i32 %0, 2
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = tail call i32 @usage(i8* %7)
br label %74
9: ; preds = %2
%10 = bitcast i8** %3 to i8*
%11 = bitcast i8** %4 to i8*
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @read_input_strings(i8* %13, i8** %3, i8** %4)
%15 = load i8*, i8** %3
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = load i8*, i8** %4
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %17)
%19 = call i32 @time(i32* null)
%20 = call i32 @srand(i32 %19)
%21 = call i32 (...) @ocl_select_platform()
%22 = call i32 @ocl_select_device(i32 %21)
%23 = call i32 @init_ocl(i32 %22)
%24 = call i32 @create_program(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.16, i64 0, i64 0))
%27 = call i32 @time_measure_start(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
%28 = load i8*, i8** %3
%29 = call i64 @strlen(i8* dereferenceable(1) %28)
%30 = load i8*, i8** %4
%31 = call i64 @strlen(i8* dereferenceable(1) %30)
%32 = call i32** @make_lcs_table(i8* %28, i64 %29, i8* %30, i64 %31)
%33 = call i32 @time_measure_stop_and_print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
%34 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.17, i64 0, i64 0))
%35 = call i32 @time_measure_start(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
%36 = load i8*, i8** %4
%37 = load i8*, i8** %3
%38 = call i64 @strlen(i8* dereferenceable(1) %36)
%39 = call i64 @strlen(i8* dereferenceable(1) %37)
%40 = call i32* @methode1(i8* %36, i8* %37, i64 %38, i64 %39)
%41 = call i32 @time_measure_stop_and_print(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.18, i64 0, i64 0))
%43 = call i32 @time_measure_start(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
%44 = load i8*, i8** %4
%45 = load i8*, i8** %3
%46 = call i64 @strlen(i8* dereferenceable(1) %44)
%47 = call i64 @strlen(i8* dereferenceable(1) %45)
%48 = call i32* @methode2(i8* %44, i8* %45, i64 %46, i64 %47)
%49 = call i32 @time_measure_stop_and_print(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.19, i64 0, i64 0))
%51 = call i32 @time_measure_start(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%52 = load i8*, i8** %4
%53 = load i8*, i8** %3
%54 = call i64 @strlen(i8* dereferenceable(1) %52)
%55 = call i64 @strlen(i8* dereferenceable(1) %53)
%56 = call i32* @methode3(i8* %52, i8* %53, i64 %54, i64 %55)
%57 = call i32 @time_measure_stop_and_print(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%58 = call i32 @time_measure_start(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%59 = load i8*, i8** %3
%60 = call i64 @strlen(i8* dereferenceable(1) %59)
%61 = load i8*, i8** %4
%62 = call i64 @strlen(i8* dereferenceable(1) %61)
%63 = call i8* @extract_subsequence(i32** %32, i8* %59, i64 %60, i64 %62)
%64 = call i32 @time_measure_stop_and_print(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i8* %63)
%66 = load i8*, i8** %3
%67 = call i64 @strlen(i8* dereferenceable(1) %66)
%68 = add nsw i64 %67, 1
%69 = load i8*, i8** %4
%70 = call i64 @strlen(i8* dereferenceable(1) %69)
%71 = add nsw i64 %70, 1
%72 = call i32 @table_2d_check_1d(i32** %32, i32* %48, i64 %68, i64 %71)
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i32 %72)
br label %74
74: ; preds = %9, %6
%75 = phi i32 [ 1, %6 ], [ 0, %9 ]
ret i32 %75
}