#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 */
char **mallocBis(int);
char *strdup(char *);
char **associerTableauString(char **tab1, char **tab2, int taille1,
                             int taille2) {
  int i;
  int j;
  char **t_str_result;
  t_str_result = mallocBis(sizeof(char *) * (taille1 + taille2));
  for (i = 0; i < taille1; i += 1) {
    t_str_result[i] = strdup(tab1[i]);
  }
  for (j = 0; j < taille2; j += 1, i++) {
    t_str_result[i] = strdup(tab2[j]);
  }
  return t_str_result;
}


x86 assembly (clang, -O0):
<associerTableauString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <mallocBis@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    118e <associerTableauString+0x6e>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <strdup@plt>
mov    %rax,%rdx
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1154 <associerTableauString+0x34>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    11d8 <associerTableauString+0xb8>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <strdup@plt>
mov    %rax,%rdx
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1195 <associerTableauString+0x75>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<associerTableauString>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %edx,%r13d
mov    %rsi,%r14
mov    %rdi,%r15
lea    0x0(%rbp,%r13,1),%edi
shl    $0x3,%edi
call   1030 <mallocBis@plt>
mov    %rax,%r12
test   %r13d,%r13d
jle    1180 <associerTableauString+0x60>
mov    %rbp,(%rsp)
mov    %r13d,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r15,%rbp,8),%rdi
call   1040 <strdup@plt>
mov    %rax,(%r12,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1160 <associerTableauString+0x40>
mov    (%rsp),%rbp
test   %ebp,%ebp
jg     1186 <associerTableauString+0x66>
jmp    11a6 <associerTableauString+0x86>
xor    %ebx,%ebx
test   %ebp,%ebp
jle    11a6 <associerTableauString+0x86>
mov    %ebp,%r15d
lea    (%r12,%rbx,8),%rbx
xor    %ebp,%ebp
nop
mov    (%r14,%rbp,8),%rdi
call   1040 <strdup@plt>
mov    %rax,(%rbx,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r15
jne    1190 <associerTableauString+0x70>
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8** @associerTableauString(i8** %0, i8** %1, i32 %2, i32 %3) {
%5 = alloca i8**
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8**
store i8** %0, i8*** %5
store i8** %1, i8*** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = add nsw i32 %12, %13
%15 = sext i32 %14 to i64
%16 = mul i64 8, %15
%17 = trunc i64 %16 to i32
%18 = call i8** @mallocBis(i32 %17)
store i8** %18, i8*** %11
store i32 0, i32* %9
br label %19
19: ; preds = %34, %4
%20 = load i32, i32* %9
%21 = load i32, i32* %7
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %37
23: ; preds = %19
%24 = load i8**, i8*** %5
%25 = load i32, i32* %9
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %24, i64 %26
%28 = load i8*, i8** %27
%29 = call i8* @strdup(i8* %28)
%30 = load i8**, i8*** %11
%31 = load i32, i32* %9
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i8*, i8** %30, i64 %32
store i8* %29, i8** %33
br label %34
34: ; preds = %23
%35 = load i32, i32* %9
%36 = add nsw i32 %35, 1
store i32 %36, i32* %9
br label %19
37: ; preds = %19
store i32 0, i32* %10
br label %38
38: ; preds = %53, %37
%39 = load i32, i32* %10
%40 = load i32, i32* %8
%41 = icmp slt i32 %39, %40
br i1 %41, label %42, label %58
42: ; preds = %38
%43 = load i8**, i8*** %6
%44 = load i32, i32* %10
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8*, i8** %43, i64 %45
%47 = load i8*, i8** %46
%48 = call i8* @strdup(i8* %47)
%49 = load i8**, i8*** %11
%50 = load i32, i32* %9
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i8*, i8** %49, i64 %51
store i8* %48, i8** %52
br label %53
53: ; preds = %42
%54 = load i32, i32* %10
%55 = add nsw i32 %54, 1
store i32 %55, i32* %10
%56 = load i32, i32* %9
%57 = add nsw i32 %56, 1
store i32 %57, i32* %9
br label %38
58: ; preds = %38
%59 = load i8**, i8*** %11
ret i8** %59
}

LLVM IR (-O2):
define i8** @associerTableauString(i8** nocapture %0, i8** nocapture %1, i32 %2, i32 %3) {
%5 = add nsw i32 %3, %2
%6 = shl i32 %5, 3
%7 = tail call i8** @mallocBis(i32 %6)
%8 = icmp sgt i32 %2, 0
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = zext i32 %2 to i64
br label %18
11: ; preds = %18
%12 = zext i32 %2 to i64
br label %13
13: ; preds = %11, %4
%14 = phi i64 [ 0, %4 ], [ %12, %11 ]
%15 = icmp sgt i32 %3, 0
br i1 %15, label %16, label %36
16: ; preds = %13
%17 = zext i32 %3 to i64
br label %26
18: ; preds = %9, %18
%19 = phi i64 [ 0, %9 ], [ %24, %18 ]
%20 = getelementptr inbounds i8*, i8** %0, i64 %19
%21 = load i8*, i8** %20
%22 = tail call i8* @strdup(i8* %21)
%23 = getelementptr inbounds i8*, i8** %7, i64 %19
store i8* %22, i8** %23
%24 = add nuw nsw i64 %19, 1
%25 = icmp eq i64 %24, %10
br i1 %25, label %11, label %18
26: ; preds = %16, %26
%27 = phi i64 [ 0, %16 ], [ %33, %26 ]
%28 = phi i64 [ %14, %16 ], [ %34, %26 ]
%29 = getelementptr inbounds i8*, i8** %1, i64 %27
%30 = load i8*, i8** %29
%31 = tail call i8* @strdup(i8* %30)
%32 = getelementptr inbounds i8*, i8** %7, i64 %28
store i8* %31, i8** %32
%33 = add nuw nsw i64 %27, 1
%34 = add nuw nsw i64 %28, 1
%35 = icmp eq i64 %33, %17
br i1 %35, label %36, label %26
36: ; preds = %26, %13
ret i8** %7
}